:root {
  color-scheme: dark;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --bg: #0c1112;
  --panel: #12191a;
  --panel-2: #172021;
  --line: #263031;
  --muted: #829091;
  --text: #edf2ef;
  --warm: #f0bd65;
  --warm-2: #ffd58c;
  --mint: #75cfbd;
  --danger: #ff746c;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(104, 152, 140, .07), transparent 22rem),
    var(--bg);
  color: var(--text);
}

button, select, input { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  padding: 0 clamp(20px, 3vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 17, 18, .92);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 12px; width: fit-content; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 3px; letter-spacing: -.04em; }
.brand strong { font-size: 19px; }
.brand em { color: var(--warm); font-size: 12px; font-style: normal; font-family: var(--mono); }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid #41504f; border-radius: 50%; transform: rotate(-8deg); }
.brand-mark i { display: block; width: 3px; border-radius: 2px; background: var(--warm); }
.brand-mark i:nth-child(1) { height: 9px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 12px; opacity: .75; }

.main-nav { height: 100%; display: flex; align-items: center; gap: 34px; }
.nav-item { position: relative; height: 100%; padding: 0 3px; border: 0; background: none; color: #778384; font-size: 13px; font-weight: 600; }
.nav-item::after { content: ""; height: 2px; position: absolute; left: 0; right: 0; bottom: 0; background: var(--warm); transform: scaleX(0); transition: transform .2s; }
.nav-item.is-active { color: var(--text); }
.nav-item.is-active::after { transform: scaleX(1); }
.nav-item span { font-family: var(--mono); color: var(--warm); font-size: 9px; border: 1px solid #534630; background: #201b14; border-radius: 999px; padding: 2px 5px; margin-left: 3px; }

.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 17px; }
.local-status { color: #94a09f; font-size: 11px; font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 7px; }
.local-status i { width: 6px; height: 6px; background: var(--mint); box-shadow: 0 0 8px var(--mint); border-radius: 50%; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 7px; }
.icon-button:hover { background: var(--panel-2); border-color: #3b4748; }
.icon-button svg { width: 17px; fill: none; stroke: #aab4b3; stroke-width: 1.5; }

main { width: 100%; flex: 1; }
.view-section { padding: 0 clamp(20px, 3vw, 52px) 28px; }
.view-section.is-hidden { display: none; }

.project-bar { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; color: #778485; }
.eyebrow span { display: flex; align-items: center; gap: 7px; }
.eyebrow span::before { content: ""; display: block; width: 14px; height: 1px; background: var(--warm); }
.eyebrow b { color: var(--warm); font-weight: 500; border-left: 1px solid #3c4241; padding-left: 9px; }
.project-bar h1, .report-hero h1 { margin: 10px 0 0; font-size: clamp(21px, 2vw, 29px); letter-spacing: -.045em; line-height: 1.3; }
.project-bar h1 span, .report-hero h1 span { color: #8d9998; font-weight: 500; }
.project-meta { display: flex; align-items: center; gap: 10px; }
.project-meta > div { min-width: 104px; padding: 0 20px; border-right: 1px solid var(--line); }
.project-meta > div:first-child { border-left: 1px solid var(--line); }
.project-meta small { display: block; color: #6f7b7c; font-size: 9px; font-weight: 600; margin-bottom: 6px; letter-spacing: .07em; }
.project-meta strong { display: block; color: #d2d9d6; font: 500 11px var(--mono); }

.outline-button, .primary-button { height: 40px; border-radius: 7px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 700; border: 1px solid #364142; background: #151d1e; transition: transform .15s, background .15s, border-color .15s; }
.outline-button:hover { background: #1c2526; border-color: #4a5656; }
.primary-button { color: #16130d; background: var(--warm); border-color: var(--warm); min-width: 132px; }
.primary-button:hover { background: var(--warm-2); transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; cursor: wait; }
.outline-button svg, .primary-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.primary-button svg { fill: currentColor; stroke: none; }
.primary-button.is-loading svg { animation: pulse-play .8s infinite alternate; }
@keyframes pulse-play { to { transform: scale(.65); opacity: .5; } }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; align-items: start; }
.panel { background: linear-gradient(145deg, rgba(21, 30, 31, .98), rgba(16, 23, 24, .98)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.viewer-panel { min-width: 0; }
.panel-head { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px 0 18px; border-bottom: 1px solid var(--line); }
.panel-head > div { display: flex; align-items: center; gap: 9px; }
.panel-head strong { font-size: 11px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px rgba(255,116,108,.6); }
.camera-chip { font: 500 9px var(--mono); letter-spacing: .04em; color: var(--warm); border: 1px solid #594b31; background: rgba(80,61,28,.24); padding: 4px 7px; border-radius: 4px; }
.viewer-tools > span { color: #6e7a7b; font: 400 9px var(--mono); }
.mini-button { height: 26px; background: transparent; border: 1px solid #323c3d; border-radius: 5px; color: #899594; font-size: 9px; padding: 0 9px; }
.mini-button:hover { color: var(--text); border-color: #515d5c; }

.viewer-stage { position: relative; aspect-ratio: 16 / 8.55; background: #101718; overflow: hidden; cursor: grab; user-select: none; touch-action: none; outline: none; }
.viewer-stage:active { cursor: grabbing; }
.viewer-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--warm); }
#viewer-canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.view-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3,8,9,.2), transparent 28%, transparent 62%, rgba(3,8,9,.42)); }
.scenario-tag { --phase: var(--mint); position: absolute; left: 17px; top: 16px; height: 27px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 4px; background: rgba(9,15,16,.76); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,.12); font-size: 9px; font-weight: 600; }
.scenario-tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--phase); box-shadow: 0 0 7px var(--phase); }
.compass { position: absolute; top: 13px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.44); font: 500 8px var(--mono); }
.compass::before { content: ""; position: absolute; left: 50%; top: -13px; width: 1px; height: 10px; background: var(--warm); }
.compass span.active { color: var(--warm-2); font-size: 10px; }
.drag-hint { position: absolute; left: 50%; bottom: 19px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; font-size: 9px; color: rgba(255,255,255,.78); background: rgba(9,15,16,.68); border: 1px solid rgba(255,255,255,.14); border-radius: 99px; padding: 7px 12px; backdrop-filter: blur(8px); transition: opacity .2s; }
.drag-hint.is-hidden { opacity: 0; }
.drag-hint svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.fov-corners i { position: absolute; width: 18px; height: 18px; border-color: rgba(255,255,255,.25); border-style: solid; }
.fov-corners i:nth-child(1) { left: 13px; top: 57px; border-width: 1px 0 0 1px; }
.fov-corners i:nth-child(2) { right: 13px; top: 57px; border-width: 1px 1px 0 0; }
.fov-corners i:nth-child(3) { left: 13px; bottom: 15px; border-width: 0 0 1px 1px; }
.fov-corners i:nth-child(4) { right: 13px; bottom: 15px; border-width: 0 1px 1px 0; }

.transport { height: 64px; display: flex; align-items: center; gap: 11px; padding: 0 17px; border-top: 1px solid var(--line); }
.play-button { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #394445; border-radius: 50%; background: #182122; }
.play-button svg { grid-area: 1 / 1; width: 14px; height: 14px; fill: #d9dfdc; }
.play-button .play-icon { display: none; }
.play-button.is-paused .pause-icon { display: none; }
.play-button.is-paused .play-icon { display: block; }
.timecode { font: 500 9px var(--mono); color: #c1c9c7; white-space: nowrap; }
.timecode.muted { color: #687475; }
.timeline-wrap { position: relative; flex: 1; height: 36px; display: flex; align-items: center; }
#timeline { width: 100%; height: 2px; appearance: none; background: linear-gradient(90deg, var(--warm) 0%, #394344 0%); outline: none; }
#timeline::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; border: 2px solid #0d1213; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 1px var(--warm); }
#timeline::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #0d1213; border-radius: 50%; background: var(--warm); }
.event-markers { position: absolute; inset: 0; pointer-events: none; }
.event-markers i { position: absolute; top: 7px; height: 22px; border-left: 1px solid var(--warm); }
.event-markers i.warning { border-color: var(--danger); }
.event-markers span { position: absolute; left: 5px; top: -3px; font-style: normal; white-space: nowrap; color: #81765f; font-size: 7px; }
.event-markers i.warning span { color: #a4635f; }
.sound-button { width: 27px; height: 27px; padding: 0; border: 0; background: transparent; }
.sound-button svg { width: 15px; fill: none; stroke: #707c7d; stroke-width: 1.5; }
.sound-button.is-muted { opacity: .4; }

.side-panel { grid-column: 2; grid-row: 1; }
.side-head { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--line); }
.side-head > div { display: flex; align-items: center; gap: 10px; }
.side-head strong { font-size: 11px; }
.side-head > span { color: #606c6d; font: 500 8px var(--mono); letter-spacing: .12em; }
.section-number { color: var(--warm); font: 500 9px var(--mono); }
.camera-list { display: grid; gap: 7px; padding: 10px; }
.camera-card { position: relative; min-height: 59px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid transparent; background: #101718; border-radius: 7px; text-align: left; }
.camera-card:hover { background: #172021; }
.camera-card.is-active { border-color: #695535; background: linear-gradient(90deg, rgba(93,70,32,.2), #161e1f 55%); }
.camera-card.is-active::before { content: ""; position: absolute; left: -1px; top: 15px; bottom: 15px; width: 2px; background: var(--warm); }
.camera-badge { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent), transparent 65%); background: color-mix(in srgb, var(--accent), transparent 91%); border-radius: 6px; font: 500 10px var(--mono); }
.camera-copy { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.camera-copy strong { font-size: 10px; font-weight: 600; white-space: nowrap; }
.camera-copy em { font-style: normal; font-size: 7px; color: #788485; border: 1px solid #354041; border-radius: 3px; padding: 1px 4px; margin-left: 6px; }
.camera-copy small { color: #657172; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camera-state { margin-left: auto; color: #718080; font-size: 7px; white-space: nowrap; }
.camera-state i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--mint); margin-right: 3px; }
.sync-card { margin: 0 10px 10px; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #2b3737; border-radius: 7px; background: #11191a; }
.sync-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(117,207,189,.08); }
.sync-icon svg { width: 15px; fill: none; stroke: var(--mint); stroke-width: 1.5; }
.sync-card > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.sync-card strong { font-size: 9px; }
.sync-card span { color: #657172; font-size: 7px; }
.sync-card b { margin-left: auto; font: 500 9px var(--mono); color: var(--mint); }

.sequence-panel { grid-column: 1 / -1; }
.sequence-head, .output-head { padding-right: 18px; }
.sequence-track { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; padding: 14px 18px 17px; }
.sequence-item { position: relative; height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 1px solid #2d3839; border-radius: 6px; background: #101718; overflow: hidden; }
.sequence-item > span { color: #627071; font: 500 9px var(--mono); }
.sequence-item > div { display: flex; flex-direction: column; gap: 5px; }
.sequence-item strong { font-size: 10px; }
.sequence-item small { color: #677475; font: 400 8px var(--mono); }
.sequence-item i { position: absolute; right: 0; bottom: 0; width: 38px; height: 3px; background: #617072; }
.sequence-item.risk i { background: var(--warm); }
.sequence-item.brake i { background: var(--danger); }
.sequence-item.safe i { background: var(--mint); }
.sequence-arrow { color: #566263; font-size: 19px; padding: 0 9px; }

.output-panel { grid-column: 1 / -1; min-height: 155px; }
.render-progress { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.render-progress.is-hidden { display: none; }
.render-progress > div:first-child { display: flex; justify-content: space-between; font-size: 9px; }
.render-progress strong { font: 500 9px var(--mono); color: var(--warm); }
.progress-track { height: 3px; margin: 9px 0 7px; border-radius: 3px; background: #293333; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d7933e, var(--warm-2)); transition: width .1s linear; }
.render-progress small { color: #687475; font: 400 8px var(--mono); }
.artifact-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
.artifact-list.empty-state { display: flex; min-height: 105px; justify-content: center; align-items: center; gap: 18px; }
.empty-state > div:last-child { display: flex; flex-direction: column; gap: 7px; }
.empty-state strong { color: #9aa5a4; font-size: 10px; }
.empty-state span { color: #626f70; font-size: 8px; }
.empty-visual { position: relative; width: 52px; height: 43px; }
.empty-visual i { position: absolute; width: 34px; height: 23px; border: 1px solid #364243; border-radius: 4px; background: #121a1b; }
.empty-visual i:nth-child(1) { left: 0; top: 0; }
.empty-visual i:nth-child(2) { left: 9px; top: 7px; }
.empty-visual i:nth-child(3) { left: 18px; top: 14px; border-color: #5a4b31; }
.empty-visual.is-working i { animation: card-wave 1s infinite alternate; }
.empty-visual.is-working i:nth-child(2) { animation-delay: .15s; }
.empty-visual.is-working i:nth-child(3) { animation-delay: .3s; }
@keyframes card-wave { to { transform: translateY(-5px); border-color: var(--warm); } }
.artifact-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 9px; min-height: 52px; border: 1px solid #2b3637; border-radius: 6px; padding: 7px 8px; background: #101718; }
.file-icon { width: 35px; height: 35px; display: grid; place-items: center; background: #322a1d; color: var(--warm); border: 1px solid #59492e; border-radius: 5px; font: 500 7px var(--mono); }
.artifact-card > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.artifact-card strong { font: 500 8px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-card span { color: #667374; font-size: 7px; }
.metadata-pill { color: var(--mint) !important; font: 500 7px var(--mono) !important; border: 1px solid #315147; background: rgba(55,115,98,.12); border-radius: 99px; padding: 4px 6px; white-space: nowrap; }
.metadata-pill i { display: inline-block; width: 4px; height: 4px; background: var(--mint); border-radius: 50%; margin-right: 3px; }
.inspect-button { border: 0; background: transparent; color: #9ba6a4; font-size: 8px; padding: 5px; }
.inspect-button:hover { color: var(--warm); }
.download-button { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #303b3c; border-radius: 5px; background: #151e1f; }
.download-button:disabled { cursor: not-allowed; opacity: .3; }
.download-button svg { width: 13px; fill: none; stroke: #a6b0ae; stroke-width: 1.6; }

.report-hero { min-height: 178px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.report-hero p { max-width: 700px; color: #788485; font-size: 11px; line-height: 1.7; margin: 12px 0 0; }
.score-ring { width: 104px; height: 104px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 50%; background: radial-gradient(circle, var(--bg) 61%, transparent 63%), conic-gradient(#33403f 0%, #33403f 100%); }
.score-ring.is-complete { background: radial-gradient(circle, var(--bg) 61%, transparent 63%), conic-gradient(var(--mint) 0%, var(--warm) 100%); }
.score-ring strong { font: 500 27px var(--mono); }
.score-ring span { color: #748081; font-size: 8px; margin-top: 4px; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 12px; padding-top: 16px; }
.check-panel { grid-row: span 2; }
.report-panel-head { height: 51px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.report-panel-head strong { font-size: 11px; }
.report-panel-head span { color: #687475; font: 500 8px var(--mono); letter-spacing: .08em; }
.requirement-checks { padding: 8px; }
.requirement-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px 10px; border-bottom: 1px solid #252f30; }
.requirement-row:last-child { border-bottom: 0; }
.check-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #394445; border-radius: 50%; color: #697576; font-size: 11px; }
.requirement-row.is-passed .check-icon { border-color: #376356; background: rgba(72,146,126,.12); color: var(--mint); }
.requirement-row > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 5px 9px; }
.requirement-row > div > span { color: var(--warm); font: 500 8px var(--mono); }
.requirement-row strong { font-size: 10px; }
.requirement-row small { grid-column: 1 / -1; color: #687475; font-size: 8px; }
.requirement-row b { color: #667273; font: 500 8px var(--mono); border: 1px solid #303b3c; border-radius: 4px; padding: 4px 7px; }
.requirement-row.is-passed b { color: var(--mint); border-color: #315147; }
.spec-panel dl { margin: 0; padding: 8px 15px 13px; }
.spec-panel dl div { display: flex; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid #252f30; }
.spec-panel dl div:last-child { border: 0; }
.spec-panel dt { color: #697576; font: 400 8px var(--mono); }
.spec-panel dd { margin: 0; color: #bdc6c3; font: 500 8px var(--mono); }
.direction-map { padding: 16px; text-align: center; font: 500 7px var(--mono); color: #677374; }
.zenith, .nadir { padding: 8px; border: 1px dashed #354041; }
.directions { display: grid; grid-template-columns: repeat(5, 1fr); padding: 17px 0; background: linear-gradient(90deg, rgba(240,189,101,.05), rgba(117,207,189,.05)); }
.directions span { color: var(--warm); font-size: 10px; border-right: 1px solid #303a3b; }
.directions span:last-child { border: 0; }
.directions small { color: #657172; font-size: 6px; }

footer { min-height: 46px; margin-top: 12px; padding: 0 clamp(20px, 3vw, 52px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #526061; font: 500 7px var(--mono); letter-spacing: .07em; }
footer > div { display: flex; align-items: center; gap: 10px; }
footer strong { color: #707c7c; font-size: 7px; }
.footer-mark { width: 6px; height: 6px; background: var(--warm); transform: rotate(45deg); }

dialog { width: min(510px, calc(100vw - 30px)); padding: 0; color: var(--text); background: transparent; border: 0; }
dialog::backdrop { background: rgba(3,7,8,.78); backdrop-filter: blur(7px); }
.settings-card { background: #12191a; border: 1px solid #344041; border-radius: 10px; box-shadow: 0 25px 80px rgba(0,0,0,.5); overflow: hidden; }
.dialog-head { padding: 20px 21px 17px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.dialog-head span { color: var(--warm); font: 500 8px var(--mono); letter-spacing: .12em; }
.dialog-head h2 { margin: 6px 0 0; font-size: 18px; }
.dialog-head button { border: 0; background: transparent; color: #728080; font-size: 24px; line-height: 1; }
.setting-row { min-height: 66px; padding: 10px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #232d2e; }
.setting-row > div { display: flex; flex-direction: column; gap: 5px; }
.setting-row strong { font-size: 10px; }
.setting-row span { color: #687475; font-size: 8px; }
.setting-row select { min-width: 140px; height: 33px; color: #cbd2d0; background: #182122; border: 1px solid #354041; border-radius: 5px; padding: 0 8px; font: 400 9px var(--mono); }
.toggle-row { cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row > i { position: relative; width: 35px; height: 20px; background: #303a3b; border-radius: 99px; transition: background .2s; }
.toggle-row > i::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #879291; border-radius: 50%; transition: transform .2s; }
.toggle-row input:checked + i { background: #806333; }
.toggle-row input:checked + i::after { transform: translateX(15px); background: var(--warm); }
.format-note { margin: 14px 20px 0; padding: 12px; display: flex; gap: 10px; align-items: center; border: 1px solid #3a4545; background: #151d1e; border-radius: 6px; }
.format-note > i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #2c3637; color: #91a09d; font-style: normal; font-size: 11px; }
.format-note p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.format-note strong { font-size: 9px; }
.format-note span { color: #6c7879; font-size: 8px; }
.format-note.is-compatible { border-color: #2f554a; }
.format-note.is-compatible > i { background: rgba(69,151,128,.14); color: var(--mint); }
.format-note.is-warning { border-color: #614d2e; }
.format-note.is-warning > i { background: rgba(176,126,49,.15); color: var(--warm); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 17px 20px 20px; }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 300px; max-width: 420px; display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid #315147; background: rgba(17,26,26,.96); box-shadow: 0 14px 40px rgba(0,0,0,.38); border-radius: 7px; transform: translateY(10px); opacity: 0; transition: .25s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast > i { width: 28px; height: 28px; display: grid; place-items: center; font-style: normal; color: var(--mint); border-radius: 50%; background: rgba(77,154,133,.13); }
.toast.warning { border-color: #614d2e; }
.toast.warning > i { color: var(--warm); background: rgba(176,126,49,.15); }
.toast > div { display: flex; flex-direction: column; gap: 4px; }
.toast strong { font-size: 9px; }
.toast span { color: #778484; font-size: 8px; line-height: 1.5; }
.render-surfaces { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: 1fr auto 1fr; }
  .project-bar { align-items: flex-start; padding: 23px 0; }
  .project-meta > div { display: none; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 275px; }
}

@media (max-width: 780px) {
  .topbar { height: 62px; padding: 0 16px; grid-template-columns: 1fr auto; }
  .main-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 55px; z-index: 50; background: #101718; border-top: 1px solid var(--line); justify-content: center; }
  .nav-item { height: 55px; }
  .top-actions .local-status { display: none; }
  .view-section { padding: 0 12px 18px; }
  .project-bar { display: block; min-height: 0; }
  .project-meta { margin-top: 18px; }
  .project-meta button { flex: 1; }
  .workspace-grid { grid-template-columns: 1fr; }
  .side-panel { grid-column: 1; grid-row: auto; }
  .sequence-panel, .output-panel { grid-column: 1; }
  .sequence-track { grid-template-columns: 1fr 1fr; gap: 7px; }
  .sequence-arrow { display: none; }
  .artifact-list { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .check-panel { grid-row: auto; }
  .report-hero { min-height: 195px; }
  .report-hero p { padding-right: 20px; }
  .score-ring { width: 84px; height: 84px; flex: 0 0 auto; }
  footer { margin-bottom: 55px; }
}

@media (max-width: 540px) {
  .brand-mark { width: 29px; height: 29px; }
  .brand strong { font-size: 16px; }
  .project-meta { display: grid; grid-template-columns: 1fr 1.2fr; }
  .panel-head { height: 44px; }
  .viewer-tools > span { display: none; }
  .viewer-stage { aspect-ratio: 4 / 3; }
  .event-markers span { display: none; }
  .transport { padding: 0 10px; gap: 7px; }
  .sequence-track { padding: 10px; }
  .artifact-card { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .metadata-pill { display: none; }
  .report-hero { align-items: flex-start; padding-top: 28px; }
  .score-ring { margin-top: 23px; }
  .report-hero p { display: none; }
  .toast-region { left: 12px; right: 12px; bottom: 70px; }
  .toast { min-width: 0; width: 100%; }
  footer > div > span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
