:root { color-scheme: dark; --bg: #11130f; --panel: #181b15; --line: #34392e; --muted: #a2aa96; --text: #e9edde; --green: #c3ff72; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 14px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .38; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }
.topbar { height: 86px; padding: 0 30px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.identity { display: flex; align-items: center; gap: 30px; }
.wordmark { color: var(--text); text-decoration: none; font-size: 23px; font-weight: 750; letter-spacing: -.08em; }
.wordmark span { color: var(--green); padding-left: 6px; font-size: 28px; }
.edition { border-left: 1px solid var(--line); padding-left: 24px; color: var(--muted); font-size: 12px; line-height: 1.8; letter-spacing: .08em; }
.edition b { display: block; font-size: 11px; font-weight: 400; color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 24px; }
.primary, .secondary { border-radius: 3px; padding: 13px 17px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 44px; }
.primary { background: var(--green); color: #18200f; }
.primary:hover:not(:disabled) { background: #d4ff9b; }
.secondary { background: #30372a; color: var(--text); border: 1px solid #59624d; }
.shortcut { opacity: .6; font-size: 12px; }
.quiet { color: var(--muted); padding: 9px 6px; min-height: 38px; }
.quiet:hover:not(:disabled) { color: var(--text); }
.workspace { display: grid; grid-template-columns: 210px minmax(340px, 1fr) 340px; min-height: calc(100dvh - 124px); }
.library { border-right: 1px solid var(--line); padding: 28px 22px; display: flex; flex-direction: column; }
.section-label { font-size: 11px; letter-spacing: .09em; color: var(--muted); }
.library h1 { font-family: Arial, sans-serif; font-size: 35px; font-weight: 500; letter-spacing: -.04em; line-height: 1.03; margin: 22px 0 13px; }
.intro { color: var(--muted); line-height: 1.6; font-size: 13px; margin: 0 0 32px; }
.preset-list { display: grid; gap: 9px; }
.preset { text-align: left; border: 1px solid var(--line); border-radius: 3px; padding: 14px 12px; min-height: 78px; transition: border-color .15s, background .15s; }
.preset span { display: block; font-size: 15px; }
.preset small { display: block; font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.preset:hover { border-color: #75815f; }
.preset[aria-pressed="true"] { border-color: var(--green); background: #252c1c; box-shadow: inset 3px 0 var(--green); }
.preset[aria-pressed="true"] span { color: var(--green); }
.library-bottom { margin-top: auto; padding-top: 40px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.local-symbol { color: var(--green); font-size: 25px; }
.text-button { color: var(--muted); padding: 5px 0; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover:not(:disabled) { color: var(--green); }
.viewer { padding: 22px 26px 8px; display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.viewer-heading, .viewer-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; letter-spacing: .04em; min-height: 27px; align-items: center; }
#photo-name { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-mode { white-space: nowrap; color: var(--green); }
.stage { position: relative; flex: 1; min-height: 440px; height: calc(100dvh - 270px); max-height: calc(100dvh - 250px); background: #090b08; border: 1px solid #292e23; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage::before, .stage::after { position: absolute; content: "+"; color: #58634b; z-index: 1; font-size: 16px; pointer-events: none; }
.stage::before { top: 10px; left: 12px; }
.stage::after { bottom: 10px; right: 12px; }
#preview { display: block; width: 100%; height: 100%; object-fit: contain; }
.empty-state { padding: 32px 15px; text-align: center; }
.empty-art { position: relative; width: 134px; height: 100px; margin: 0 auto 34px; transform: rotate(-8deg); background: #3c4e31; overflow: hidden; }
.empty-art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, #080e0880 0 1px, transparent 1px 5px); z-index: 2; }
.empty-art span { position: absolute; width: 105px; height: 27px; background: var(--green); top: 18px; left: -12px; transform: skewY(-18deg); }
.empty-art span:nth-child(2) { top: 40px; left: 60px; background: #be77a7; }
.empty-art span:nth-child(3) { top: 71px; left: 17px; height: 13px; background: #9dc6bc; }
.empty-art span:nth-child(4) { top: 42px; left: 29px; height: 14px; width: 26px; background: #e8eacb; }
.empty-state h2 { font-family: Arial, sans-serif; font-size: 32px; font-weight: 400; line-height: 1.1; letter-spacing: -.035em; margin: 0 0 18px; }
.empty-state p { color: var(--muted); line-height: 1.8; font-size: 13px; margin-bottom: 26px; }
.startup { min-height: calc(100dvh - 124px); display: grid; place-items: center; padding: 40px 24px; }
.startup-card { width: 100%; max-width: 560px; text-align: center; }
.startup h1 { font: 400 32px/1.2 Arial, sans-serif; letter-spacing: -.035em; margin: 0 0 18px; }
.startup p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.startup-spinner { width: 24px; height: 24px; margin: 28px auto; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: startup-spin 1s linear infinite; }
.startup[data-state="failed"] .startup-spinner { display: none; }
.startup[data-state="failed"] .startup-help { display: none; }
.startup .startup-help { font-size: 14px; }
.startup a { color: var(--green); text-underline-offset: 3px; }
.startup .technical-details { text-align: left; color: var(--muted); font-size: 14px; }
.startup pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
@keyframes startup-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .startup-spinner { animation: none; } }
.transport { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.view-actions, .geometry-actions { display: flex; align-items: center; gap: 14px; }
.transport-button { border: 1px solid #525d45; border-radius: 3px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; min-width: 106px; min-height: 44px; }
#pause-icon { color: var(--green); font-size: 18px; line-height: 1; }
#original[aria-pressed="true"] { color: var(--green); }
#axis { font-size: 12px; }
#rotate { display: flex; align-items: center; gap: 6px; font-size: 20px; }
#rotate span { font-size: 12px; }
.save-button { font-size: 13px; gap: 17px; }
.save-button span { font-size: 10px; border-left: 1px solid #718e4c; padding-left: 12px; }
.viewer-footer { margin-top: 10px; font-size: 10px; }
.notice { min-height: 20px; color: var(--green); margin: 4px 0 0; font-size: 12px; line-height: 1.5; }
.notice.error { color: #ffb49e; }
.loading, .drop-hint { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; background: #0d130be8; color: var(--green); }
.drop-hint { border: 2px dashed var(--green); font-size: 22px; }
.adjustments { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.adjustments-heading { display: flex; align-items: center; justify-content: space-between; padding: 28px 22px 22px; border-bottom: 1px solid var(--line); }
.adjustments-heading h2 { margin: 9px 0 0; font-size: 20px; letter-spacing: -.04em; font-weight: 450; }
.control-groups { overflow-y: auto; height: calc(100dvh - 270px); padding: 0 20px; scrollbar-width: thin; scrollbar-color: #59624d var(--panel); }
.control-group { border-bottom: 1px solid var(--line); }
.control-group summary { list-style: none; display: flex; justify-content: space-between; gap: 10px; padding: 19px 0; color: #dce5cf; cursor: pointer; font-size: 13px; }
.control-group summary::-webkit-details-marker { display: none; }
.control-group summary::after { content: "+"; color: var(--muted); }
.control-group[open] summary::after { content: "−"; }
.control { padding-bottom: 20px; }
.control label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; align-items: baseline; font-size: 12px; }
.control output { color: var(--green); font-variant-numeric: tabular-nums; font-size: 12px; }
.control input { width: 100%; margin: 0; display: block; accent-color: var(--green); cursor: pointer; height: 18px; }
.control input:disabled { opacity: .3; cursor: default; }
.control input:focus-visible { outline: 1px solid var(--green); outline-offset: 4px; }
.adjustments-footer { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; margin-top: auto; font-size: 10px; color: var(--muted); border-top: 1px solid var(--line); }
#fps { white-space: nowrap; color: var(--green); }
.bottom-bar { min-height: 38px; padding: 12px 25px; display: flex; justify-content: space-between; gap: 12px; font-size: 9px; color: #8c9780; border-top: 1px solid var(--line); letter-spacing: .04em; }
dialog { max-width: 620px; width: calc(100% - 40px); background: #1a2015; color: var(--text); border: 1px solid #657b4b; border-radius: 5px; padding: 26px; line-height: 1.75; }
dialog::backdrop { background: #050803b8; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dialog-heading h2 { font-size: 20px; font-weight: 500; margin: 0; }
dialog p { font-size: 14px; color: #c1ccb4; }
dialog pre { font-size: 11px; overflow-wrap: anywhere; white-space: pre-wrap; color: #96ac7e; }
@media (min-width: 1600px) { .workspace { grid-template-columns: 250px minmax(400px, 1fr) 370px; } .viewer { padding-inline: 40px; } .library { padding-inline: 30px; } }
@media (max-width: 1120px) { .workspace { grid-template-columns: 170px minmax(300px, 1fr) 290px; } .library { padding: 25px 15px; } .library h1 { font-size: 30px; } .viewer { padding-inline: 16px; } .geometry-actions { gap: 6px; } #rotate span { display: none; } .edition { display: none; } }
@media (max-width: 840px) { .topbar { padding: 0 16px; height: 70px; } .header-actions { gap: 12px; } .shortcut { display: none; } .workspace { grid-template-columns: 1fr; } .library { border-right: 0; padding: 18px 16px; } .library h1, .intro, .library-bottom, .library > .section-label { display: none; } .preset-list { display: flex; } .preset { flex: 1; min-height: 60px; padding: 10px; } .preset small { display: none; } .viewer { padding: 0 16px 14px; } .stage { height: 62dvh; min-height: 300px; max-height: none; } .adjustments { border-left: 0; border-top: 1px solid var(--line); } .control-groups { height: auto; max-height: 500px; } .adjustments-heading { padding: 20px; } .bottom-bar { font-size: 9px; } .bottom-bar > span:first-child { max-width: 60%; } }

/* Readable controls take priority over imitating tiny camera labels. */
:root { font-size: 16px; }
.section-label, .edition b, .preset small, .shortcut, .viewer-heading, .viewer-footer,
.adjustments-footer, .bottom-bar, .save-button span, dialog pre { font-size: 12px; }
.control label, .control output, .control-group summary, .text-button, #axis,
#rotate span, .save-button, .notice, .quiet { font-size: 14px; }
.intro, .empty-state p, dialog p { font-size: 16px; }
.library-bottom { font-size: 14px; }
.library-bottom .text-button { display: block; text-align: left; }
.bottom-bar a { color: inherit; text-underline-offset: 3px; }
.technical-details { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }
.technical-details summary { cursor: pointer; }
.policy-page { max-width: 760px; margin: 0 auto; padding: 30px 24px 60px; font-size: 16px; line-height: 1.75; }
.policy-page h1, .policy-page h2 { line-height: 1.25; font-family: Arial, sans-serif; }
.policy-page h2 { margin-top: 36px; }
.policy-page a, dialog a { color: var(--green); text-underline-offset: 3px; }
.speed-control { width: 100px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.speed-control > span { display: flex; justify-content: space-between; margin-bottom: 4px; }
.speed-control output { color: var(--green); font-variant-numeric: tabular-nums; }
.speed-control input { display: block; width: 100%; height: 16px; margin: 0; accent-color: var(--green); }
.image-adjustment { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.image-adjustment label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; }
.image-adjustment output { color: var(--green); font-variant-numeric: tabular-nums; }
.image-adjustment input, .tape-panel input[type="range"] { width: 100%; margin: 0; accent-color: var(--green); }
#text-toggle { margin-left: auto; }
#text-toggle[aria-pressed="true"] { color: var(--green); }
.tape-panel { padding: 16px 20px; border-bottom: 1px solid var(--line); max-height: 420px; overflow: auto; flex-shrink: 0; }
.tape-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.tape-panel label { display: block; color: var(--muted); font-size: 12px; margin: 12px 0 6px; }
.tape-panel input[type="text"], .tape-panel select { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 3px; background: #0d110b; color: var(--text); padding: 8px; font: inherit; font-size: 14px; }
.tape-panel p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.tape-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.tape-handle { position: absolute; border: 1px dashed #dce9ca; min-width: 16px; min-height: 16px; pointer-events: auto; touch-action: none; cursor: grab; background: transparent; border-radius: 0; }
.tape-handle[aria-pressed="true"] { border: 2px solid var(--green); }
.tape-handle:active { cursor: grabbing; }
.qa-page { padding: 30px; max-width: 1000px; margin: auto; }
.qa-page pre { white-space: pre-wrap; font-size: 13px; line-height: 1.6; }
.qa-page canvas { max-width: 300px; margin-top: 20px; }
.recipe-modes { display: flex; gap: 6px; margin-bottom: 10px; }
.recipe-modes button { flex: 1; min-height: 42px; padding: 8px; border: 1px solid var(--line); border-radius: 3px; font-size: 14px; white-space: nowrap; }
.recipe-modes button[aria-pressed="true"] { border-color: var(--green); background: #252c1c; color: var(--green); }
.random-hint { margin: 0 0 24px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.has-photo .library > .section-label, .has-photo .library h1, .has-photo .intro { display: none; }
@media (max-width: 840px) { .intro + .recipe-modes { max-width: 300px; } .random-hint { display: none; } }

@media (min-width: 841px) {
  .workspace { height: calc(100dvh - 124px); min-height: 470px; }
  .library { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .library-bottom { padding-top: 24px; }
  .viewer { min-height: 0; }
  .stage { min-height: 0; height: auto; max-height: none; }
  .control-groups { height: auto; min-height: 0; flex: 1; }
}
