:root {
  --ink: #24312d;
  --muted: #68746d;
  --paper: #f3eadb;
  --sheet: #fffaf0;
  --orange: #e96632;
  --orange-soft: #f2b28b;
  --blue: #b9d9df;
  --blue-deep: #477986;
  --line: rgba(36, 49, 45, .18);
  --shadow: 0 22px 58px rgba(75, 53, 31, .13);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 3%, rgba(185, 217, 223, .82), transparent 26rem),
    radial-gradient(circle at 96% 22%, rgba(233, 102, 50, .16), transparent 26rem),
    var(--paper);
  font: 15px/1.5 "DM Sans", system-ui, sans-serif;
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(71, 121, 134, .62);
  outline-offset: 3px;
}

.shell {
  width: min(1440px, calc(100% - 48px));
  margin: auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.065em;
  text-decoration: none;
}

.brand > span span { color: var(--orange); }
.brand-mark {
  width: 31px;
  height: 31px;
  color: var(--orange);
  transform: rotate(-10deg);
}

.top-actions,
.live-chip,
.listen-row,
.tray-foot,
.board-foot,
footer {
  display: flex;
  align-items: center;
}

.top-actions { gap: 8px; }
.live-chip {
  max-width: 190px;
  gap: 8px;
  margin-right: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chip i,
.tiny-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8b948e;
}

.live-chip i.on,
.status.on::before {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(233, 102, 50, .18);
}

.quiet,
.stop,
.text-button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 250, 240, .72);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.quiet:hover,
.stop:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(54, 42, 27, .08);
  transform: translateY(-1px);
}

.quiet:disabled,
.stop:disabled,
.listen:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  padding: 34px 5% 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #a64427;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
}

.intro h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3rem, 5.4vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -.09em;
  line-height: .85;
}

.intro h1 em {
  color: var(--orange);
  font-family: Caveat, cursive;
  font-size: 1.13em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.04em;
}

.lede {
  max-width: 610px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.how {
  position: relative;
  max-width: 215px;
  margin: 0 0 7px;
  padding-left: 42px;
  color: var(--muted);
  font-size: .76rem;
}

.how strong { color: var(--ink); }
.how-arrow {
  position: absolute;
  top: -15px;
  left: 1px;
  color: var(--orange);
  font: 3.1rem/.9 Caveat, cursive;
  transform: rotate(8deg);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(290px, 338px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tooltray,
.board-wrap {
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: var(--shadow);
}

.tooltray {
  position: sticky;
  top: 16px;
  padding: 24px;
  background: rgba(255, 250, 240, .62);
}

.tray-head,
.board-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.tray-head h2,
.board-head h2 {
  margin: 0;
  font-size: 1.34rem;
  letter-spacing: -.05em;
  line-height: 1.05;
}

.status,
.board-state {
  color: var(--muted);
  font-size: .68rem;
  white-space: nowrap;
}

.status::before,
.board-state::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 6px 1px 0;
  border-radius: 50%;
  background: #8b948e;
  content: "";
}

.field {
  display: grid;
  gap: 7px;
  margin: 27px 0 20px;
  color: var(--ink);
  font-size: .76rem;
  font-weight: 700;
}

.field input,
.tooltray textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .58);
}

.field input::placeholder,
.tooltray textarea::placeholder { color: #98a29c; }

.listen-row {
  gap: 8px;
  padding: 17px 0;
  border-top: 1px dashed var(--line);
}

.listen {
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  color: #fff9ef;
  background: var(--ink);
  box-shadow: 0 3px 0 #111a17;
  cursor: pointer;
  font-weight: 700;
}

.listen:hover { background: #3a4a43; }
.mic {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-radius: 8px;
  vertical-align: -2px;
}

.mic::after {
  position: absolute;
  bottom: -8px;
  left: -1px;
  width: 7px;
  height: 6px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 7px 7px;
  content: "";
}

.assist {
  margin: -7px 0 19px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}

.transcript-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: .76rem;
  font-weight: 700;
}

.transcript-label small {
  color: var(--muted);
  font-weight: 500;
}

.tooltray textarea {
  min-height: 230px;
  resize: vertical;
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.58;
}

.tray-foot {
  justify-content: space-between;
  gap: 8px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: .66rem;
}

.tiny-dot {
  margin-right: 5px;
  background: var(--orange);
}

.text-button {
  padding: 4px;
  border: 0;
  color: #9c3b23;
  background: transparent;
}

.board-wrap {
  overflow: hidden;
  background: rgba(255, 250, 240, .42);
}

.board-head { padding: 24px 25px 19px; }

.paper-board {
  position: relative;
  min-height: 860px;
  margin: 0 16px;
  overflow: hidden;
  border: 1px solid rgba(36, 49, 45, .18);
  background-color: var(--sheet);
  background-image: radial-gradient(rgba(36, 49, 45, .13) .55px, transparent .75px);
  background-size: 5px 5px;
  box-shadow: inset 0 0 60px rgba(92, 65, 32, .07);
}

.paper-board::before,
.paper-board::after {
  position: absolute;
  z-index: 0;
  border-radius: 48%;
  opacity: .37;
  content: "";
  filter: blur(1px);
  pointer-events: none;
}

.paper-board::before {
  top: 19%;
  left: -8%;
  width: 46%;
  height: 135px;
  background: var(--blue);
  transform: rotate(-7deg);
}

.paper-board::after {
  right: -5%;
  bottom: 10%;
  width: 43%;
  height: 115px;
  background: var(--orange-soft);
  transform: rotate(11deg);
}

.blank {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.blank[hidden] { display: none; }

.blank-scribble {
  width: 120px;
  height: 88px;
  color: var(--orange);
  transform: rotate(-8deg);
}

.blank h3 {
  margin: 4px 0 6px;
  color: var(--ink);
  font: 600 2rem/1 Caveat, cursive;
}

.blank p {
  max-width: 380px;
  margin: 0;
  font-size: .8rem;
  line-height: 1.55;
}

.connectors {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.board-throughline {
  position: absolute;
  z-index: 3;
  top: 2.5%;
  left: 50%;
  width: min(700px, 84%);
  margin: 0;
  color: var(--ink);
  font: 600 clamp(1.2rem, 2.1vw, 1.75rem)/1.05 Caveat, cursive;
  text-align: center;
  transform: translateX(-50%) rotate(-1deg);
}

.board-throughline::after {
  display: block;
  width: 44%;
  height: 8px;
  margin: 3px auto 0;
  border-bottom: 3px solid var(--orange);
  border-radius: 50%;
  content: "";
  transform: rotate(1deg);
}

.scribe-cluster {
  position: absolute;
  z-index: 2;
  left: var(--x);
  top: var(--y);
  display: grid;
  grid-template-columns: minmax(110px, 43%) minmax(120px, 1fr);
  align-items: center;
  width: min(390px, 43%);
  gap: 5px;
  color: var(--ink);
  transform: translate(var(--tx, -50%), -50%) rotate(var(--r));
  transform-origin: center;
  outline: 0;
}

.scribe-cluster.emphasis-3 {
  grid-template-columns: minmax(135px, 46%) minmax(140px, 1fr);
  width: min(440px, 47%);
}

@media (min-width: 681px) {
  .cluster-slot-5,
  .cluster-slot-6,
  .cluster-slot-7 {
    grid-template-columns: minmax(92px, 40%) minmax(108px, 1fr);
    width: min(310px, 31%);
    gap: 1px;
  }

  .cluster-slot-5 .cluster-copy strong,
  .cluster-slot-6 .cluster-copy strong,
  .cluster-slot-7 .cluster-copy strong {
    font-size: clamp(1.35rem, 2vw, 2rem);
  }

  .cluster-slot-5 .cluster-detail,
  .cluster-slot-6 .cluster-detail,
  .cluster-slot-7 .cluster-detail {
    font-size: clamp(.58rem, .72vw, .68rem);
  }
}

.cluster-wash {
  position: absolute;
  z-index: -1;
  top: 53%;
  left: 58%;
  width: 59%;
  height: 65%;
  border-radius: 50%;
  background: rgba(185, 217, 223, .55);
  filter: blur(.5px);
  transform: translate(-50%, -50%) rotate(-4deg);
}

.scribe-cluster--learning .cluster-wash,
.scribe-cluster--quote .cluster-wash {
  background: rgba(242, 178, 139, .48);
  transform: translate(-50%, -50%) rotate(4deg);
}

.cluster-scene {
  position: relative;
  display: block;
  width: 100%;
}

.cluster-scene svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(36, 49, 45, .08));
}

.cluster-copy {
  position: relative;
  min-width: 0;
  text-align: center;
}

.cluster-copy small {
  display: block;
  margin-bottom: 3px;
  color: var(--blue-deep);
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
}

.cluster-copy strong {
  display: block;
  font: 700 clamp(1.5rem, 2.5vw, 2.4rem)/.83 Caveat, cursive;
  letter-spacing: -.01em;
  text-wrap: balance;
  text-shadow: .35px .35px 0 var(--ink);
}

.emphasis-3 .cluster-copy strong {
  color: #c94e25;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
}

.scribe-cluster--tension .cluster-copy strong { color: #b94729; }

.cluster-copy strong::after {
  display: block;
  width: 70%;
  height: 5px;
  margin: 1px auto 4px;
  border-bottom: 3px solid var(--orange);
  border-radius: 50%;
  content: "";
  transform: rotate(-4deg);
}

.scribe-cluster--learning .cluster-copy strong::after,
.scribe-cluster--action .cluster-copy strong::after { border-color: var(--blue-deep); }

.cluster-detail {
  display: block;
  max-width: 210px;
  margin: 0 auto;
  font-size: clamp(.62rem, .82vw, .74rem);
  font-weight: 500;
  line-height: 1.34;
}

.cluster-copy q {
  display: block;
  max-width: 200px;
  margin: 6px auto 0;
  padding: 5px 8px;
  border: 2px solid rgba(36, 49, 45, .72);
  border-radius: 48% 42% 46% 40%;
  background: rgba(255, 250, 240, .58);
  font: 600 clamp(.92rem, 1.5vw, 1.2rem)/.96 Caveat, cursive;
  quotes: "“" "”";
  transform: rotate(1deg);
}

.scribe-cluster.is-landing { animation: ink-in .54s ease-out both; }

.board-foot {
  gap: 12px;
  padding: 13px 24px;
  color: var(--muted);
  font-size: .69rem;
}

.board-foot .interim {
  flex: 1;
  overflow: hidden;
  color: #c75026;
  font: 1.23rem/1 Caveat, cursive;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-foot .quiet {
  padding: 6px 9px;
  font-size: .68rem;
}

.record-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 16px 18px;
  padding: 16px 17px 17px 20px;
  border: 1px dashed rgba(36,49,45,.28);
  border-radius: 14px;
  background: rgba(185,217,223,.22);
}
.record-reveal .eyebrow { margin-bottom: 3px; font-size: .57rem; }
.record-reveal strong { display: block; font: 600 1.3rem/1 Caveat, cursive; }
.record-reveal span:not(.reveal-mark) { display: block; max-width: 420px; color: var(--muted); font-size: .68rem; }
.reveal-record {
  display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto;
  padding: 11px 14px; border: 0; border-radius: 10px; color: #fff9ef;
  background: var(--ink); box-shadow: 0 3px 0 #111a17; cursor: pointer; font-weight: 700;
  transition: transform .18s ease, opacity .18s ease;
}
.reveal-record:not(:disabled):hover { transform: translateY(-2px); }
.reveal-record:disabled { background: #7e8781; box-shadow: none; cursor: not-allowed; opacity: .65; }
.reveal-mark { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 3px; transform: rotate(-6deg); }

.record-dialog {
  width: min(1440px, calc(100% - 32px)); max-width: none; max-height: min(890px, calc(100dvh - 32px));
  padding: 0; overflow: hidden; border: 1px solid rgba(36,49,45,.28); border-radius: 20px;
  color: var(--ink); background: #f3eadb; box-shadow: 0 28px 90px rgba(36,49,45,.28);
}
.record-dialog::backdrop { background: rgba(30,42,38,.68); backdrop-filter: blur(3px); }
.record-dialog-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 24px; border-bottom:1px solid var(--line); background:rgba(255,250,240,.78); }
.record-dialog-bar .eyebrow { margin-bottom:2px; }
.record-dialog-bar h2 { margin:0; font:600 clamp(1.45rem,2.1vw,2rem)/1 Caveat,cursive; }
.record-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.record-action,.record-close,.style-choice,.hide-element { border:1px solid var(--line); border-radius:8px; color:var(--ink); background:rgba(255,250,240,.8); cursor:pointer; font:700 .7rem/1 "DM Sans",sans-serif; transition:background .18s ease,transform .18s ease; }
.record-action,.record-close { padding:9px 10px; }
.record-action:hover,.record-close:hover,.style-choice:hover,.hide-element:hover { background:#fffaf0; transform:translateY(-1px); }
.record-close { border-color:rgba(169,68,39,.35); color:#9c3b23; }
.record-stage { display:grid; grid-template-columns:264px minmax(0,1fr); min-height:650px; }
.record-editor { padding:22px 19px; background:#e7ddcc; border-right:1px solid var(--line); overflow:auto; }
.editor-intro { display:flex; gap:10px; margin-bottom:21px; }
.editor-number { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; color:#fff9ef; background:var(--orange); font-size:.66rem; font-weight:700; }
.editor-intro strong,.editor-intro small { display:block; }
.editor-intro strong { font-size:.78rem; }.editor-intro small,.editor-help { margin-top:2px; color:var(--muted); font-size:.64rem; line-height:1.4; }
.editor-field { display:grid; gap:6px; margin:0 0 15px; color:var(--ink); font-size:.68rem; font-weight:700; }
.editor-field input,.editor-field textarea,.editor-field select { width:100%; padding:9px 10px; border:1px solid rgba(36,49,45,.22); border-radius:8px; color:var(--ink); background:#fffaf0; font:400 .72rem/1.4 "DM Sans",sans-serif; }
.editor-field textarea { resize:vertical; }
.hide-element { width:100%; padding:10px; color:#9c3b23; background:rgba(255,250,240,.42); }.editor-help { margin:14px 0 0; }
.record-preview-area { min-width:0; padding:18px; overflow:auto; background:radial-gradient(circle at 25% 20%,rgba(185,217,223,.35),transparent 28rem),#f3eadb; }
.style-switcher { display:flex; gap:6px; margin:0 0 15px; min-width:max-content; }
.style-choice { padding:8px 10px; white-space:nowrap; color:var(--muted); background:rgba(255,250,240,.55); }
.style-choice.is-selected { color:#fff9ef; border-color:var(--ink); background:var(--ink); }
.record-canvas-wrap { min-width:700px; padding:12px; border:1px solid rgba(36,49,45,.18); border-radius:12px; background:rgba(255,250,240,.45); box-shadow:0 12px 30px rgba(75,53,31,.12); }
.graphic-record-svg { display:block; width:100%; height:auto; border:1px solid rgba(36,49,45,.13); background:#fff9ef; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

footer {
  justify-content: space-between;
  margin-top: 28px;
  color: var(--muted);
  font-size: .68rem;
}

footer span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff9ef;
  background: var(--ink);
  box-shadow: 0 12px 34px rgba(33, 40, 36, .24);
  font-size: .76rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.dialog {
  width: min(640px, calc(100% - 30px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--sheet);
}

.dialog::backdrop { background: rgba(36, 49, 45, .58); }
.dialog h2 {
  margin: 0 0 18px;
  font: 600 2rem/1 Caveat, cursive;
}

.close {
  float: right;
  border: 0;
  color: var(--ink);
  background: none;
  cursor: pointer;
  font-size: 1.6rem;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px dashed var(--line);
  font-size: .8rem;
}

.archive-item strong,
.archive-item small { display: block; }
.archive-item small { color: var(--muted); font-size: .7rem; }
.archive-item button { font-size: .68rem; }
.empty-archive { color: var(--muted); font-size: .8rem; }

@keyframes ink-in {
  from { opacity: 0; transform: translate(var(--tx, -50%), -40%) rotate(calc(var(--r) - 3deg)) scale(.88); }
  to { opacity: 1; transform: translate(var(--tx, -50%), -50%) rotate(var(--r)) scale(1); }
}

@media (max-width: 980px) {
  .intro { align-items: start; flex-direction: column; }
  .workspace { grid-template-columns: 1fr; }
  .tooltray { position: static; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 26px, 620px); }
  .topbar { align-items: start; }
  .top-actions { gap: 5px; }
  .top-actions .quiet { padding: 8px 9px; font-size: .68rem; }
  .live-chip { display: none; }
  .intro { padding: 48px 2px 35px; }
  .intro h1 { font-size: clamp(3.4rem, 15vw, 5.7rem); }
  .how { margin-top: 25px; }
  .tooltray { padding: 20px; }
  .paper-board { min-height: 1750px; margin: 0 10px; }
  .board-head { padding: 20px 18px; }
  .board-throughline { top: 1.5%; width: 90%; font-size: 1.45rem; }
  .scribe-cluster,
  .scribe-cluster.emphasis-3 {
    grid-template-columns: minmax(108px, 38%) minmax(145px, 1fr);
    width: min(420px, calc(100% - 24px));
    gap: 2px;
  }
  .cluster-copy strong,
  .emphasis-3 .cluster-copy strong { font-size: clamp(1.75rem, 8vw, 2.45rem); }
  .cluster-detail { max-width: 230px; font-size: .7rem; }
  .board-foot { gap: 8px; padding: 11px 16px; flex-wrap: wrap; }
  .board-foot .interim { order: 3; width: 100%; flex-basis: 100%; }
  .record-reveal { align-items: flex-start; flex-direction: column; gap: 13px; margin: 0 10px 14px; }
  .reveal-record { width: 100%; justify-content: center; }
  .record-dialog { width: 100%; max-height: 100dvh; border: 0; border-radius: 0; }
  .record-dialog-bar { align-items: flex-start; flex-direction: column; padding: 17px; }
  .record-actions { justify-content:flex-start; }
  .record-stage { grid-template-columns: 1fr; }
  .record-editor { border-right: 0; border-bottom: 1px solid var(--line); }
  .record-preview-area { padding: 12px; }
  .record-canvas-wrap { min-width: 620px; }
}

@media (max-width: 430px) {
  .shell { width: calc(100% - 20px); }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 27px; height: 27px; }
  .top-actions .quiet { padding: 8px 7px; }
  .paper-board { min-height: 1700px; }
  .board-head { display: block; }
  .board-state { display: block; margin-top: 8px; }
  .scribe-cluster,
  .scribe-cluster.emphasis-3 {
    grid-template-columns: 112px minmax(0, 1fr);
    width: calc(100% - 12px);
  }
  .cluster-copy strong,
  .emphasis-3 .cluster-copy strong { font-size: 1.85rem; }
  .blank h3 { font-size: 1.7rem; }
  footer { display: block; line-height: 2; }
}

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