/* Quiet chrome, generous editing space, one persistent command bar. */
body { background-image: none !important; }
#app-container { height: 100dvh; padding: 14px 18px 10px; gap: 10px; }
#app-container > header { padding: 10px 14px; box-shadow: none; }
.brand-tag { color: var(--mute); background: var(--soft); border-color: var(--line); }
.system-status-badge { background: transparent; border: 0; font-size: 12px; }
.pulse-dot { animation: none; box-shadow: none; width: 6px; height: 6px; }
#stop-button { display: none; }
.panel { border-radius: 12px; box-shadow: none; }
.panel-header, .output-header { min-height: 54px; padding: 10px 14px; }
.panel-title-group { min-width: 0; }
.output-header { flex-wrap: wrap; }
.output-header > .panel-title-group { flex: 1 1 auto; }
.output-actions { flex: 0 0 auto; flex-wrap: nowrap; }
.panel-icon { background: transparent; border: 0; width: 20px; }
.status-capsule { padding: 3px 7px; font-size: 11px; border-color: transparent; }
.runtime-progress { flex: 0 0 auto; padding: 9px 16px; color: var(--mute); font-size: 12px; line-height: 1.6; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; max-height: 76px; overflow-y: auto; }
.runtime-progress:empty { display: none; }
#output { padding: 18px 20px; font-size: 14px; line-height: 1.8; }
.workspace-toolbar { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; gap: 6px; flex-wrap: nowrap; position: relative; z-index: 6; }
.workspace-toolbar > .action-button:not(#run-button), #more-actions-button { border-color: transparent; background: transparent; }
.workspace-toolbar .action-button { min-height: 36px; padding: 7px 12px; }
#run-button { background: var(--primary); box-shadow: none; min-width: 94px; }
#run-button:hover:not(:disabled) { background: var(--link-hover); box-shadow: none; transform: none; }
#run-button.btn-stop::before { mask: none; -webkit-mask: none; border-radius: 2px; width: 9px; height: 9px; }
.toolbar-hint { margin-left: auto; padding-right: 6px; color: var(--mute); font-size: 11px; white-space: nowrap; }
kbd { font-family: inherit; font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; background: var(--soft); }
.more-actions { position: relative; }
.more-actions-menu { position: absolute; bottom: calc(100% + 12px); left: 0; width: 212px; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px #0003; }
.more-actions-menu[hidden] { display: none; }
.menu-caption { padding: 8px 10px 5px; color: var(--mute); font-size: 11px; }
.more-actions-menu .action-button { width: 100%; justify-content: flex-start; background: transparent; border: 0; padding: 10px; border-radius: 7px; }
.more-actions-menu #clear-code-button { color: var(--err); margin-top: 5px; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; }
.more-actions-menu .action-button:hover { background: var(--soft-hover); transform: none; }
.mobile-panel-switch, .more-actions-menu .menu-share { display: none; }
.directory-note { color: var(--mute); font-size: 12px; padding: 10px; border-top: 1px solid var(--line); }
.edge-loading-notice { box-sizing: border-box; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid var(--line2); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 20px 70px #0004; }
.edge-loading-notice::backdrop { background: #0007; backdrop-filter: blur(3px); }
.edge-notice-label { color: var(--primary); font-size: 11px; margin-bottom: 8px; }
.edge-loading-notice h2 { margin: 0 0 12px; font-size: 19px; line-height: 1.4; }
.edge-loading-notice p { margin: 0 0 12px; font-size: 13px; line-height: 1.8; color: var(--ink-secondary); }
.edge-loading-notice .edge-notice-help { font-size: 12px; color: var(--mute); }
.edge-notice-help a { display: inline-block; color: var(--link); text-decoration: none; margin-left: 4px; }
.edge-notice-help a:hover { text-decoration: underline; }
.edge-notice-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.edge-notice-footer label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); cursor: pointer; }
.edge-notice-footer input { accent-color: var(--primary); }
.edge-notice-footer button { min-height: 38px; padding: 8px 20px; border: 0; border-radius: 8px; background: var(--primary); color: #fff; cursor: pointer; box-shadow: none; }
.modal-content { border-radius: 16px; }
.file-item { min-height: 52px; gap: 10px; }
.site-footer { font-size: 10px; padding: 0; opacity: .7; }
@media (max-width: 1100px) {
    .header-center-info, .template-selector-wrapper > label { display: none; }
    .template-selector-wrapper { min-width: 0; max-width: 48%; }
    .output-actions .tiny-button { padding: 6px 8px; }
}
@media (max-width: 768px) {
    #app-container { padding: 8px; gap: 8px; }
    #app-container > header { padding: 9px 10px; border-radius: 12px; }
    .brand-logo { width: 27px; height: 27px; }
    .brand-group { gap: 7px; }
    .brand-name { font-size: 14px; }
    .brand-tag { display: none; }
    .header-actions { gap: 3px; }
    .header-actions .icon-button { width: 32px; height: 34px; }
    .mobile-panel-switch { display: flex; gap: 4px; flex-shrink: 0; padding: 4px; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; }
    .mobile-panel-switch button { flex: 1; border: 0; background: transparent; color: var(--mute); border-radius: 7px; min-height: 36px; font: inherit; font-size: 13px; cursor: pointer; }
    .mobile-panel-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px #0001; font-weight: 600; }
    #mobile-run-state { font-size: 10px; color: var(--warn); margin-left: 4px; }
    #app-container[data-mobile-panel="editor"] .output-panel,
    #app-container[data-mobile-panel="output"] .editor-panel { display: none; }
    .playground-wrapper { gap: 0; }
    .editor-panel, .output-panel { height: 100%; min-height: 0; }
    .panel-header, .output-header { padding: 9px 10px; min-height: 50px; gap: 6px; }
    .editor-panel .panel-header { flex-wrap: wrap; }
    .editor-panel .panel-header > .panel-title-group { flex: 1 1 100% !important; }
    .template-selector-wrapper { width: 100%; max-width: none; }
    .output-actions { gap: 3px; }
    .output-actions .tiny-button { min-height: 34px; padding: 6px; }
    .output-header .panel-icon { display: none; }
    .output-header .panel-title { font-size: 12px; }
    .runtime-progress { padding: 8px 12px; font-size: 11px; }
    #output { padding: 14px; font-size: 13px; }
    .workspace-toolbar { padding: 6px; gap: 2px; border-radius: 10px; }
    .workspace-toolbar .action-button { min-height: 40px; padding: 8px; font-size: 12px; gap: 4px; }
    #run-button { min-width: 72px; margin-right: 3px; }
    #share-button { display: none; }
    .toolbar-hint { display: none; }
    .more-actions { margin-left: auto; }
    .more-actions-menu { left: auto; right: 0; bottom: calc(100% + 10px); }
    .more-actions-menu .menu-share { display: flex; }
    .modal-content { width: calc(100vw - 24px) !important; max-height: calc(100dvh - 32px); margin: 12px; }
    .modal-body { padding: 14px; }
    .file-item { flex-wrap: wrap; padding: 10px; }
    .file-item .name { flex: 1 1 100%; overflow-wrap: anywhere; }
    .site-footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
