.theme-menu { position: relative; }
.theme-popover { position: absolute; right: 0; top: calc(100% + 8px); min-width: 156px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-2); }
.theme-popover button { width: 100%; min-height: 40px; padding: 8px 10px; text-align: left; background: transparent; border-radius: var(--radius-s); }
.theme-popover button:hover, .theme-popover button[aria-checked="true"] { background: var(--surface-2); }
.toast-region { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(380px, calc(100vw - 32px)); padding: 12px 14px; background: var(--inverted-bg); color: var(--inverted); box-shadow: var(--shadow-2); border-radius: var(--radius-s); font-size: 13px; font-weight: 650; animation: toast-in var(--dur-med) var(--ease-out); }
.toast[data-tone="danger"] { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.dialog-root:empty { display: none; }
.dialog-root { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(10,11,12,.58); backdrop-filter: blur(7px); }
.dialog-panel { width: min(680px, 100%); max-height: min(82vh, 760px); overflow: auto; padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-2); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-head h2 { margin: 0; font-size: var(--fs-4); }
.section-heading { display: grid; gap: 10px; max-width: 780px; margin-bottom: clamp(28px,4vw,52px); }
.section-heading h1 { font-size: var(--fs-5); margin: 0; }
.section-heading p { margin: 0; font-size: var(--fs-3); max-width: 680px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line); font: 650 11px/1 var(--font-sans); color: var(--text-2); }
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.status-chip.done::before { background: var(--signal); }
.status-chip.current::before { background: var(--accent); }
.metric { display: grid; gap: 4px; }
.metric strong { font-size: var(--fs-4); letter-spacing: -.03em; }
.metric small { color: var(--text-3); font-size: 11px; }
.progress-track { height: 4px; background: var(--surface-3); overflow: hidden; }
.progress-track > i { display: block; height: 100%; width: var(--progress,0%); background: var(--accent); transition: width var(--dur-slow) var(--ease-out); }
.data-panel { border-top: 1px solid var(--line); padding-top: 18px; }
.callout { border-left: 2px solid var(--accent); padding: 14px 16px; background: var(--accent-soft); }
.callout p:last-child { margin-bottom: 0; }
.search-dialog input[type='search'] { margin-bottom: 14px; }
.search-results { display: grid; border-top: 1px solid var(--line); }
.search-result { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.search-result strong { display: block; margin: 7px 0 4px; }
.search-result p { margin: 0; font-size: 12px; }
.danger-text { color: var(--danger); }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
