:root {
  --ink: #e6eef3;
  --muted: #b8c7e2;
  --muted-dim: #8a9bb4;
  --line: rgba(230,238,243,.12);
  --deep: #0a1f33;
  --panel: rgba(10,39,61,.72);
  --teal: #3bb0b0;
  --mint: #9ce0c4;
  --sea: #1c5f8a;
  --sand: #e6c99a;
  --violet: #bcaaff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--deep); font-family: 'DM Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; } button { cursor: pointer; }
:where(button, input, select, textarea, a, canvas):focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
textarea { resize: vertical; }
.ambient { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(1100px 520px at 25% 40%, rgba(156,224,196,.07), transparent 40%), radial-gradient(900px 520px at 80% 55%, rgba(188,170,255,.06), transparent 40%); }
.app-shell { position: relative; max-width: 1440px; min-height: 100vh; margin: auto; padding: 0 5vw; display: grid; grid-template-rows: auto 1fr auto; }
.nav { height: 80px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .08em; }
.back { color: var(--muted); }.back:hover { color: var(--ink); }
.maker span { color: var(--muted); } .maker strong { color: var(--mint); }
.status-light { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .08em; }
.status-light i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.layout { display: grid; grid-template-columns: minmax(280px, .55fr) minmax(0, 1fr); gap: 6vw; align-items: start; padding: 56px 0 60px; }
.eyebrow { color: var(--teal); margin: 0 0 22px; font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .08em; }
.copy h1 { margin: 0 0 20px; font-size: clamp(56px, 8vw, 100px); line-height: .85; font-weight: 600; }
.copy h1 em { font-family: 'Fraunces', Georgia, serif; font-weight: 500; color: var(--mint); }
.lede { max-width: 330px; margin: 0 0 28px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.editor textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 12px 13px; font-size: 1rem; line-height: 1.45; resize: vertical; }
.editor textarea::placeholder { color: var(--muted); }
.editor textarea:disabled { opacity: .5; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.count { font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.count.over { color: var(--coral); }
button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 9px 16px; font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .07em; }
button:hover { background: rgba(230,238,243,.06); }
button.ghost { color: var(--muted); } button.ghost:hover { color: var(--ink); }
button.tiny { padding: 4px 10px; font-size: 9px; }
.subhead { font: 11px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 10px; }
.hint-small { font-weight: 400; color: var(--muted); }
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inbox li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5; position: relative; }
.inbox li.empty { color: var(--muted); font-style: italic; }
.inbox li button { position: absolute; top: 6px; right: 8px; background: transparent; border: 0; color: var(--muted); font-size: 12px; padding: 0; }
.log-block { margin-top: 24px; }
.drawer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 220px; overflow-y: auto; }
#logbook-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#logbook-list li { font-size: 12px; color: var(--muted); line-height: 1.5; word-break: break-word; }
#logbook-list .ts { font: 9px 'DM Mono', monospace; color: var(--muted); }
.keys, .note { font: 11px 'DM Mono', monospace; color: var(--muted); line-height: 1.55; }
.keys kbd { background: var(--panel); border: 1px solid var(--line); padding: 2px 6px; border-radius: 3px; }
.note { display: flex; gap: 12px; align-items: center; margin-top: 20px; color: var(--muted); }
.note-line { width: 34px; height: 1px; background: var(--teal); }
.stage { position: relative; width: 100%; height: min(460px, 52vw); max-width: 820px; margin: 0 auto; }
#lagoon { width: 100%; height: 100%; display: block; border-radius: 14px; background: #051524; box-shadow: 0 40px 90px rgba(0,0,0,.5); image-rendering: auto; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 40px; padding-top: 12px; } .stage { max-width: 100%; } }
@media (max-width: 540px) {
  .nav { height: 64px; }
  .maker strong, .status-light { display: none; }
  .copy h1 { font-size: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
canvas { touch-action: none; }
button { touch-action: manipulation; }
button:active { filter: brightness(.92); }
