:root {
  --paper: #f1eee5;
  --ink: #223731;
  --muted: #64776d;
  --line: #d4d9cc;
  --accent: #c36142;
  --teal: #2c827f;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 system-ui, sans-serif; }
header, main, footer { max-width: 1550px; margin: auto; padding: 26px 34px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
h1 { font: 500 60px/1.1 Georgia, serif; letter-spacing: -2px; margin: 5px 0; }
h1 span { color: var(--accent); }
header p { color: var(--muted); margin: 8px 0 0; }
.eyebrow { font-size: 10px; letter-spacing: 3px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
button, select, input { font: inherit; }
button, select { border: 1px solid var(--line); border-radius: 8px; background: #faf9f3; color: var(--ink); padding: 9px 12px; min-height: 40px; }
button { cursor: pointer; }
button:hover { border-color: var(--teal); }
button:disabled { opacity: .5; cursor: wait; }
button.dark { background: var(--ink); color: #fff9ed; border-color: var(--ink); }
button.accent { background: var(--accent); color: white; border-color: var(--accent); }
button:focus-visible, select:focus-visible, input:focus-visible, canvas:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
a { color: var(--teal); }
.version { font: 12px ui-monospace, monospace; color: var(--muted); }
main { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; padding-top: 10px; }
aside section { border-top: 1px solid var(--line); padding: 21px 0; }
h2 { font-size: 14px; font-weight: 600; margin: 0 0 16px; }
h2 span { font: 12px ui-monospace, monospace; color: var(--accent); margin-right: 8px; }
aside select { width: 100%; margin-top: 6px; font-size: 12px; }
label { font-size: 12px; color: var(--muted); }
.control { margin: 15px 0; }
.control label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.control input[type=number] { width: 83px; padding: 4px 5px; border: 1px solid var(--line); background: transparent; border-radius: 5px; color: var(--ink); font: 12px ui-monospace, monospace; }
input[type=range] { accent-color: var(--teal); width: 100%; touch-action: none; }
.control input[type=range] { margin-top: 10px; }
.note, details { font-size: 12px; color: var(--muted); }
.equation { font: 12px/1.7 ui-monospace, monospace; padding: 12px; background: #e7e9df; border-radius: 8px; }
.workspace { min-width: 0; }
.viewGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.viewCard, .analysisCard { background: #faf9f3; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.cardTitle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px; }
.cardTitle h2 { margin: 0; }
.cardTitle > span { color: var(--muted); font-size: 9px; letter-spacing: 1.5px; }
.viewCard canvas { width: 100%; height: 350px; display: block; }
#relief { touch-action: none; cursor: grab; }
#plane { background: #102522; }
.cardFoot { display: flex; gap: 9px; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 10px; color: var(--muted); }
.cardFoot button { font-size: 11px; padding: 4px 8px; min-height: 30px; }
.legend { display: inline-block; width: 50px; height: 6px; margin: 0 5px; background: linear-gradient(90deg,#206c77,#152b2a,#eeaa73); }
.transport { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.transport button { font-size: 12px; white-space: nowrap; }
.transport input { flex: 1; min-width: 40px; }
.transport output { font: 12px ui-monospace, monospace; white-space: nowrap; }
#clockLabel { font-size: 9px; color: var(--muted); white-space: nowrap; }
.analysisCard { margin-bottom: 15px; }
#wave { height: 82px; width: 100%; display: block; cursor: crosshair; }
#spectrogram { height: 205px; width: 100%; display: block; cursor: crosshair; }
#windowSize { font-size: 11px; max-width: 155px; }
#status { min-height: 22px; color: var(--accent); font-size: 12px; }
.captures { border-top: 1px solid var(--line); padding-top: 5px; }
.captures .cardTitle { padding-left: 0; padding-right: 0; }
#gallery { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 14px; }
.capture { flex: 0 0 180px; border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #faf9f3; }
.capture img { width: 100%; height: 90px; object-fit: cover; border-radius: 5px; cursor: pointer; }
.capture button { min-height: 28px; padding: 3px 5px; font-size: 10px; }
.capture p { font: 10px ui-monospace, monospace; }
.exportCard { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 10px; }
.exportCard h2 { margin-bottom: 4px; }
.exportCard a { font-size: 12px; }
details { margin-top: 25px; }
summary { cursor: pointer; color: var(--ink); }
footer { color: var(--muted); font-size: 11px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 1050px) { main { gap: 20px; grid-template-columns: 230px minmax(0,1fr); } .viewCard canvas { height: 260px; } .cardTitle > span { display: none; } }
@media (max-width: 750px) { header, main, footer { padding: 18px; } header { flex-direction: column; align-items: flex-start; } main { display: flex; flex-direction: column; } aside { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; } aside section:last-child { grid-column: 1/-1; } .workspace { width: 100%; } h1 { font-size: 50px; } .viewCard canvas { height: 230px; } }
@media (max-width: 430px) { .viewGrid { grid-template-columns: 1fr; } aside { display: block; } .viewCard canvas { height: 280px; } #clockLabel { display: none; } .cardTitle { padding: 12px; } .cardTitle .actions { gap: 5px; } }
