:root {
  --bg: #09090b;
  --card: rgba(17, 17, 20, 0.86);
  --card-solid: #131317;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ecebe8;
  --muted: #9c9a94;
  --accent: #ffcf5c;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); font-size: 0.88em; }

/* Traps: invisible to people and screen readers, present for models. */
.trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- Home: canvas + cards ---------------------------------------------- */

body.home { overflow: hidden; height: 100vh; }
.stage { position: fixed; inset: 0; }
#grid { width: 100vw; height: 100vh; display: block; cursor: grab; touch-action: none; }
#grid.dragging { cursor: grabbing; }
.dockbar { position: absolute; right: 20px; bottom: 20px; z-index: 40; display: flex; gap: 8px; align-items: stretch; }
.dock { display: flex; background: #eee6d4; border: 1.5px solid #1e2f8f; }
.dock button, .dock a {
  border: 0; background: none; color: #1e2f8f; height: 36px; padding: 0 12px; cursor: pointer; display: inline-flex; align-items: center;
  font: 800 13px 'Big Shoulders Display', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.dock > * + * { border-left: 1.5px solid #1e2f8f; }
.dock [aria-pressed='true'] { background: #1e2f8f; color: #eee6d4; }
.dock button:hover, .dock a:hover { background: rgba(30, 47, 143, 0.12); }
.dock [aria-pressed='true']:hover { background: #15226c; }
.dock .dock-os { font-style: normal; }
.card { max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain; }
.zoom {
  position: relative; display: flex;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.zoom button { border: 0; background: none; color: var(--text); min-width: 40px; height: 36px; padding: 0 10px; cursor: pointer; font: 500 15px var(--sans); }
.zoom button + button { border-left: 1px solid var(--line); }
.zoom button:hover { background: rgba(255, 255, 255, 0.08); }
.zoom [data-zoom-fit] { font: 500 12px var(--mono); }

.cards { position: fixed; inset: 0; pointer-events: none; }
.card {
  position: absolute; pointer-events: auto; width: 360px; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}
.card[hidden] { display: none; }
.card[data-card='live'] { width: 300px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px 0 18px; cursor: grab; user-select: none; touch-action: none;
}
.card-head:active { cursor: grabbing; }
.card-head h2 { margin: 0; font: 500 12px/1 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.card[data-card='intro'] .card-head h2 { font: 400 34px/1.1 var(--serif); letter-spacing: 0; color: var(--text); padding-top: 6px; }
.close {
  border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1;
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
}
.close:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.card-body { padding: 10px 18px 18px; }
.card-body p { margin: 0 0 12px; }
.card-body h3 { margin: 16px 0 6px; font: 500 12px/1 var(--mono); color: var(--muted); }
.lede { font-size: 16px; }

.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 4px; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linklike:hover { text-decoration-color: var(--accent); }

.posts, .families, .arrivals { list-style: none; margin: 0; padding: 0; }
.posts li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.posts time, .arrivals time { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }

.ghost {
  margin-top: 16px; width: 100%; padding: 9px; border: 1px dashed var(--line-strong);
  background: none; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 13px;
}
.ghost:hover { color: var(--text); border-color: var(--accent); }

.count b { font: 400 26px/1 var(--serif); color: var(--accent); }
.families { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 12px; font-size: 13px; }
.families li { display: flex; align-items: center; gap: 8px; }
.families span { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.sw, .families i, .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.arrivals li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; border-top: 1px solid var(--line); }
.arrivals li time { margin-left: auto; }
.arrivals li.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { background: rgba(255, 207, 92, 0.18); } to { background: transparent; } }
.more { margin: 10px 0 0 !important; font-size: 13px; color: var(--muted); }

.prompt {
  margin: 0 0 12px; padding: 12px; white-space: pre-wrap; background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 10px; color: #f3e6c4; font-size: 12.5px; line-height: 1.55;
}
.btn {
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06); cursor: pointer; font-size: 13px; font-weight: 500;
}
.btn:hover { border-color: var(--accent); }
.btn.floating { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--card-solid); z-index: 50; }

form label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
form input, form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: 14px var(--sans); color: var(--text);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 8px;
}
form input:focus, form textarea:focus { outline: none; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Asking for a drawing: the card on the home page and the empty-cell panel. */
[data-ask] textarea, .ask textarea {
  display: block; width: 100%; margin: 0 0 10px; padding: 9px 10px; resize: vertical; min-height: 54px;
  font: 14px/1.45 var(--sans); color: var(--text); background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong); border-radius: 9px;
}
[data-ask] textarea:focus, .ask textarea:focus { outline: none; border-color: var(--accent); }
[data-ask] .prompt, .ask .prompt { max-height: 132px; overflow: auto; font-size: 11.5px; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.quiet { background: none; color: var(--muted); }
.btn.quiet:hover { color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: default; }
.status { margin: 10px 0 0 !important; font-size: 13px; color: var(--muted); }

#tip {
  position: fixed; z-index: 60; pointer-events: none; max-width: 260px; padding: 8px 10px;
  background: var(--card-solid); border: 1px solid var(--line-strong); border-radius: 8px;
  font: 12px/1.5 var(--mono); color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
#tip b { font-weight: 500; }
#tip .dim { color: var(--muted); }

/* Phones: the canvas sits on top, the cards stack and scroll below it. */
@media (max-width: 760px) {
  body.home { overflow: auto; height: auto; }
  .stage { position: relative; }
  #grid { height: auto; }
  .dockbar { right: 12px; bottom: 12px; }
  .dock { display: none; }
  .card { max-height: none; }
  .zoom button { min-width: 44px; height: 40px; }
  .cards { position: static; display: flex; flex-direction: column; gap: 12px; padding: 16px; pointer-events: auto; }
  .card, .card[data-card='live'] { position: static; width: auto; max-width: none; backdrop-filter: none; background: var(--card-solid); }
  .card-head { cursor: default; }
  .card .close { display: none; }
  .card[data-card='contact'] .close { display: inline-block; }
  .ghost { display: none; }
}

/* ---- The paper ---------------------------------------------------------------
   Everything that isn't the canvas is printed: one dark ink and one spot colour
   on grainy newsprint. Swap --spot to recolour the whole paper. */

.paper, .card, .panel, #tip, .toast {
  --bg: var(--paper);
  --paper: #eee6d4;
  --paper-2: #e2d8c1;
  --ink: #1e2f8f;
  --ink-soft: #4d5a9e;
  --spot: #1e2f8f;
  --spot-ink: #15226c;
  --text: var(--ink);
  --muted: var(--ink-soft);
  --line: rgba(30, 47, 143, 0.25);
  --line-strong: rgba(30, 47, 143, 0.8);
  --accent: var(--spot);
  --card: var(--paper);
  --card-solid: var(--paper);
  --head: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Serif 4', Georgia, serif;
  --script: 'Yellowtail', cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .18 0 0 0 0 .56 0 0 0 .7 -.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .96 0 0 0 0 .88 0 0 0 2.2 -1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  background: var(--grain), var(--paper);
  font-family: var(--serif);
}
html:has(body.paper) { background: #eee6d4; }
body.paper { min-height: 100vh; font-size: 17px; line-height: 1.6; }
.paper a, .card a, .panel a { color: var(--ink); text-decoration-color: var(--spot); text-decoration-thickness: 1.5px; }
.paper a:hover, .card a:hover, .panel a:hover { color: var(--spot-ink); }
.paper ::selection { background: var(--spot); color: var(--paper); }

/* Spot colour with extra grain, so it reads as ink on paper rather than a flat fill. */
.grain-ink { color: var(--spot); }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .grain-ink { background: var(--speckle), var(--spot); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.spot-block { background: var(--speckle), var(--spot); color: var(--paper); }
.script { font-family: var(--script); font-weight: 400; color: var(--spot); }
.icon { width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex: none; }

/* Masthead */
.masthead { max-width: 1120px; margin: 0 auto; padding: 18px 16px 0; }
.mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; border-bottom: 4px double var(--ink); padding-bottom: 10px; }
.ear { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--ink); padding: 8px 12px; justify-self: start; text-align: center; }
.ear .script { font-size: 20px; line-height: 1; }
.ear small { font: 700 11px/1.2 var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.ear-r { border: 0; padding: 0; justify-self: end; }
.seal { width: 92px; height: 92px; color: var(--spot); }
.flag { display: flex; flex-direction: column; align-items: center; text-decoration: none !important; }
.masthead .flag .kicker { font: 800 clamp(13px, 2vw, 20px)/1 var(--head); letter-spacing: 0.32em; margin: 0 0 4px; }
.flag-name { font: 900 clamp(52px, 9vw, 112px)/0.86 var(--head); text-transform: uppercase; letter-spacing: 0.01em; }
.dateline { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1.5px solid var(--ink); font: 700 12px/1.2 var(--head); letter-spacing: 0.14em; text-transform: uppercase; }
.sections { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px; padding: 8px 0; border-bottom: 1.5px solid var(--ink); }
.sections a { font: 800 15px/1.2 var(--head); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none !important; }
.sections a[aria-current] { color: var(--spot); }

/* The sheet */
main.sheet { max-width: 1120px; margin: 0 auto; padding: 8px 16px 64px; }
.sect { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 36px 0 14px; padding-top: 6px; border-top: 5px solid var(--ink); }
.sect span { font: 900 30px/1 var(--head); letter-spacing: 0.02em; text-transform: uppercase; }
.sect small { font: italic 14px var(--serif); color: var(--ink-soft); }
.kicker { margin: 0 0 6px; font: 800 13px/1 var(--head); letter-spacing: 0.16em; text-transform: uppercase; color: var(--spot); }
.dek { font: italic 22px/1.35 var(--serif); color: var(--ink-soft); margin: 10px 0 14px; max-width: 760px; }
.byline { margin: 0; padding: 7px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); font: 700 12.5px/1.2 var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.muted { color: var(--muted); }

.lead h1 { font: 900 clamp(44px, 7vw, 84px)/0.92 var(--head); text-transform: uppercase; margin: 0; letter-spacing: -0.005em; }
.lead h1 a { text-decoration: none; }
.lead { padding-bottom: 18px; }
.columns { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1.5px solid var(--ink); }
.columns li { padding: 14px 18px 16px 0; margin-right: 18px; border-bottom: 1px solid var(--line); }
.columns h3 { margin: 0 0 6px; font: 800 26px/1 var(--head); text-transform: uppercase; }
.columns h3 a { text-decoration: none; }
.columns p { margin: 0 0 6px; font-size: 15px; }
.columns time, .scores time, .classifieds time, .feed time { font: 700 11.5px var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

/* A story: one readable column with newspaper furniture. */
.story { max-width: 720px; margin: 28px auto 0; }
.story h1 { font: 900 clamp(46px, 8vw, 92px)/0.9 var(--head); text-transform: uppercase; margin: 0; letter-spacing: -0.005em; }
.story .byline { margin-top: 12px; }
.story .body, .story > p, .story > ul { font-size: 18.5px; line-height: 1.65; }
.story .body > p:first-of-type::first-letter {
  float: left; font: 900 88px/0.74 var(--head); color: var(--spot); padding: 8px 10px 0 0;
}
.story h2 { font: 800 30px/1 var(--head); text-transform: uppercase; margin: 38px 0 8px; padding-top: 8px; border-top: 1.5px solid var(--ink); }
.story h3 { font: 800 22px/1.05 var(--head); text-transform: uppercase; margin: 28px 0 6px; }
.story blockquote { margin: 26px 0; padding: 14px 0; border-top: 3px solid var(--spot); border-bottom: 3px solid var(--spot); font: italic 26px/1.3 var(--serif); color: var(--spot-ink); }
.story code, .paper code { font-family: var(--mono); font-size: 0.82em; background: var(--paper-2); padding: 1px 5px; }
.story pre { background: var(--paper-2); border: 1px solid var(--line-strong); padding: 14px; overflow-x: auto; }
.story pre code { background: none; padding: 0; }
.story ul { padding-left: 20px; }
.story li { margin: 6px 0; }
.story img { display: block; max-width: 100%; height: auto; margin: 28px auto; mix-blend-mode: multiply; }
.story hr { border: 0; border-top: 4px double var(--ink); margin: 32px 0; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 10px; border-top: 1.5px solid var(--ink); }
.tags b { font: 800 12px var(--head); letter-spacing: 0.14em; text-transform: uppercase; margin-right: 4px; }
.tags span { font: 700 12px var(--head); letter-spacing: 0.1em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: 2px 8px; }

.legend { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 16px; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.legend i, .sw { display: inline-block; width: 11px; height: 11px; flex: none; }

/* Standings, box scores and classifieds. */
.boxscore, .board { width: 100%; border-collapse: collapse; font-size: 15px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.boxscore th, .board th { font: 800 12px var(--head); letter-spacing: 0.14em; text-transform: uppercase; text-align: left; padding: 7px 10px 7px 0; border-bottom: 1.5px solid var(--ink); }
.boxscore td, .board td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.boxscore td:nth-child(n+3), .boxscore th:nth-child(n+3) { text-align: right; font: 800 18px var(--head); }
.boxscore th:nth-child(n+3) { font-size: 12px; }
.boxscore .rank { width: 28px; font: 900 18px var(--head); color: var(--spot); }
.boxscore td .sw, .board td .sw { margin-right: 8px; }
.scores { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.scores li { padding: 12px 16px 14px 0; border-bottom: 1px solid var(--line); }
.scores b { font: 800 22px/1 var(--head); text-transform: uppercase; }
.scores a { text-decoration: none; }
.scores .byline { border: 0; padding: 4px 0; font-size: 11px; color: var(--ink-soft); }
.scores p { margin: 0 0 4px; font-size: 14.5px; }
.classifieds { list-style: none; padding: 0; margin: 0; columns: 3 220px; column-gap: 16px; }
.classifieds li { break-inside: avoid; position: relative; margin: 0 0 12px; padding: 10px 12px; border: 1.5px solid var(--ink); font-size: 15px; line-height: 1.4; }
.classifieds b { display: block; font: 900 20px/1 var(--head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--spot); margin-bottom: 4px; }
.classifieds time { display: block; margin-top: 6px; }
.stamp { position: absolute; top: 8px; right: 8px; transform: rotate(-8deg); border: 2px solid var(--spot); color: var(--spot) !important; padding: 0 6px; font: 900 14px/1.4 var(--head); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none !important; }
.classifieds li.done { color: var(--ink-soft); }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.feed time { margin-left: auto; }
.letters { list-style: none; padding: 0; margin: 0; }
.letters li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.letters p { margin: 0; font-style: italic; }
.letters cite { font: 700 12px var(--head); letter-spacing: 0.12em; text-transform: uppercase; font-style: normal; }

/* Colophon */
footer.colophon {
  max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start;
  border-top: 4px double var(--ink);
}
.monogram { width: 76px; height: 76px; color: var(--ink); }
.colophon p { margin: 0 0 6px; font-size: 15px; max-width: 460px; }
.colophon .script { font-size: 26px; line-height: 1; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.colophon li a { display: inline-flex; gap: 8px; align-items: center; font: 700 14px var(--head); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }

@media (max-width: 760px) {
  .mast { grid-template-columns: 1fr; justify-items: center; }
  .ear { display: none; }
  .dateline { justify-content: center; }
  .dateline span:last-child { display: none; }
  .sections { justify-content: space-between; gap: 4px 12px; }
  .sections a { font-size: 13px; }
  .two-up { grid-template-columns: 1fr; }
  .boxscore { font-size: 14px; }
  .boxscore td:nth-child(6), .boxscore th:nth-child(6) { display: none; }
  footer.colophon { grid-template-columns: 1fr; }
  .story .body, .story > p { font-size: 17.5px; }
}

/* ---- /os ------------------------------------------------------------------ */

body.os { font-size: 14px; }
.os-shell { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.os-nav { border-right: 1px solid var(--line); padding: 24px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.os-brand { font: 400 22px/1 var(--serif); text-decoration: none; padding: 0 10px 20px; }
.os-nav nav { display: flex; flex-direction: column; gap: 2px; }
.os-nav nav a { padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.os-nav nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.os-nav nav a[aria-current] { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.os-who { margin-top: auto; padding: 0 10px; color: var(--muted); font: 12px var(--mono); word-break: break-all; }
.os-main { padding: 28px 32px 80px; min-width: 0; }
.os-main > h1 { font: 400 34px/1.1 var(--serif); margin: 0 0 20px; }
.os-main > h2 { font: 400 22px/1.2 var(--serif); margin: 32px 0 10px; }
.small { font-size: 12px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.tile:hover { border-color: var(--line-strong); }
.tile b { font: 400 32px/1 var(--serif); }
.tile span { color: var(--muted); font-size: 13px; }

.pill { font: 11px var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); }
.pill-published { color: #19c37d; border-color: rgba(25, 195, 125, 0.4); }
.pill-draft { color: var(--accent); border-color: rgba(255, 207, 92, 0.4); }
.btn.primary { background: var(--accent); color: #111; border-color: var(--accent); }
.btn.danger { color: #ff8a80; }
.btn.small { padding: 4px 10px; font-size: 12px; }
a.btn { display: inline-block; text-decoration: none; }

.editor-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.editor-meta .wide { grid-column: 1 / -1; }
.editor-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor-panes textarea { font: 13px/1.6 var(--mono); min-height: 520px; }
.pane-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.preview { border: 1px solid var(--line); border-radius: 2px; padding: 4px 24px; margin-top: 4px; min-height: 520px; max-height: 70vh; overflow: auto; font-size: 15px; }
.editor-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
.editor-actions .status { margin: 0 !important; }

.scroll { overflow-x: auto; }
.board.data td { font: 12px var(--mono); max-width: 360px; }
.pager { display: flex; gap: 16px; }
.code { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 12.5px; }
form[data-sql] textarea { font: 13px var(--mono); margin-bottom: 8px; }

.messages { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.message { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.message-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.message-head select { margin-left: auto; background: var(--card-solid); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.message p { margin: 8px 0 0; }

.key-form { max-width: 620px; }
.key-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.check { display: flex; gap: 8px; align-items: baseline; color: var(--text); font-size: 13px; }
.check input { width: auto; display: inline; margin: 0; }
.new-key { margin-top: 14px; padding: 14px; border: 1px solid var(--accent); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.new-key code { font-size: 13px; word-break: break-all; }
tr.revoked td { color: var(--muted); text-decoration: line-through; }
tr.revoked td:last-child { text-decoration: none; }

@media (max-width: 860px) {
  .os-shell { grid-template-columns: 1fr; }
  .os-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .os-nav nav { flex-direction: row; flex-wrap: wrap; }
  .os-who { display: none; }
  .os-main { padding: 20px 16px 64px; }
  .editor-meta, .editor-panes { grid-template-columns: 1fr; }
  .preview, .editor-panes textarea { min-height: 280px; }
}

/* ---- Pixel detail panel ------------------------------------------------------ */

#tip .tip-intent { margin-top: 4px; color: #f3e6c4; font-family: var(--sans); }
.panel {
  position: fixed; z-index: 70; top: 12px; right: 12px; bottom: 12px; width: 420px; max-width: calc(100vw - 24px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--card-solid); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); padding: 20px 20px 16px;
}
.panel[hidden] { display: none; }
.panel.loading [data-panel-body] { opacity: 0.5; transition: opacity 0.2s; }
.panel-close { position: sticky; top: 0; float: right; margin: -8px -8px 0 0; z-index: 2; background: var(--card-solid); }
.panel-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font: 400 28px/1.1 var(--serif); word-break: break-word; }
.panel-head p { margin: 4px 0 8px; font-size: 13px; }
.swatch { flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--c); }
.swatch.seen { opacity: 0.5; }
.swatch.captured { opacity: 0.85; box-shadow: inset 0 0 0 3px var(--card-solid), inset 0 0 0 5px var(--c); }
.swatch.claimed { box-shadow: 0 0 22px -2px var(--c); }
.swatch.empty { border: 1px dashed var(--line-strong); }
.state { font: 11px var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.state-claimed { color: var(--accent); border-color: rgba(255, 207, 92, 0.45); }
.state-drawing { color: #9fd3ff; border-color: rgba(159, 211, 255, 0.4); }
.answered { color: #9fd3ff; }
.requests { list-style: none; margin: 0; padding: 0; }
.requests li { padding: 8px 0; border-top: 1px solid var(--line); }
.requests li:first-child { border-top: 0; }
.requests p { margin: 0 0 6px; }
.state-captured { color: #ff9f80; border-color: rgba(255, 159, 128, 0.45); }
.panel-quote { margin: 0 0 12px; padding: 10px 14px; border-left: 2px solid var(--accent); background: rgba(255, 255, 255, 0.03); font: 400 20px/1.3 var(--serif); }
.panel-section { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.panel-section h3 { margin: 0 0 8px; font: 500 12px/1 var(--mono); color: var(--muted); }
.panel-section h4 { margin: 10px 0 4px; font: 500 13px var(--sans); color: var(--muted); }
.panel-section p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; }
.panel-section .note { padding: 8px 12px; border-radius: 8px; background: rgba(255, 207, 92, 0.07); border: 1px solid rgba(255, 207, 92, 0.18); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 4px 0; font-size: 13px; }
.kv span:first-child { color: var(--muted); }
.plain { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.plain li { padding: 3px 0; }
.pages li { display: flex; justify-content: space-between; gap: 10px; }
.pages code { font-size: 12px; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jump {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font: 12px var(--mono);
}
.jump:hover { border-color: var(--accent); }
.thread, .timeline, .nearby { list-style: none; margin: 0; padding: 0; }
.thread li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.thread-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.thread-head time, .timeline time { margin-left: auto; color: var(--muted); font: 11px var(--mono); }
.thread li p { margin: 4px 0 0 17px; }
.timeline li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.nearby li { padding: 6px 0; }
.nearby li p { margin: 4px 0 0; font-size: 13px; color: var(--text); }
.panel-foot { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.panel .prompt { font-size: 12px; }

@media (max-width: 760px) {
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 55vh; border-radius: 18px 18px 0 0; padding: 18px 16px 24px; }
}

/* ---- Clippings: the cards, panel and tooltip on the canvas are cut from the paper. */
.card { border-radius: 2px; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 1px 0 rgba(0,0,0,.4), 0 24px 50px -18px rgba(0, 0, 0, 0.85); }
.card::before { content: ''; position: absolute; inset: 6px; border: 1.5px solid var(--ink); pointer-events: none; }
.card-head { padding: 16px 16px 0 20px; position: relative; }
.card-head h2 { font: 800 15px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.card[data-card='intro'] .card-head h2 { display: flex; flex-direction: column; padding-top: 2px; }
.card[data-card='intro'] .card-head .script { font-size: 22px; line-height: 0.9; letter-spacing: 0; text-transform: none; }
.card[data-card='intro'] .card-head .flag-name { font-size: 46px; }
.card-body { padding: 10px 20px 20px; position: relative; font-size: 15px; }
.card-body h3 { font: 800 13px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); border-top: 1.5px solid var(--ink); padding-top: 8px; }
.lede { font-size: 17px; line-height: 1.45; }
.links a, .linklike { display: inline-flex; align-items: center; gap: 6px; }
.card .close, .panel .close { color: var(--ink); border-radius: 0; }
.card .close:hover, .panel .close:hover { background: var(--paper-2); color: var(--spot); }
.card .prompt, .panel .prompt { background: var(--paper-2); border: 1px dashed var(--line-strong); border-radius: 0; color: var(--ink); }
.card .btn, .panel .btn { border-radius: 0; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font: 800 13px/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 12px; }
.card .btn:hover, .panel .btn:hover { background: var(--spot); border-color: var(--spot); }
.card .btn.quiet, .panel .btn.quiet, .card .btn.small, .panel .btn.small { background: none; color: var(--ink); }
.card .btn.quiet:hover, .panel .btn.quiet:hover, .card .btn.small:hover, .panel .btn.small:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card .btn.small, .panel .btn.small { font-size: 11.5px; padding: 6px 9px; }
.card .ghost, .panel .ghost { border-radius: 0; border-color: var(--line-strong); color: var(--ink-soft); font: 700 12px var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.card .ghost:hover, .panel .ghost:hover { color: var(--spot); border-color: var(--spot); }
.count b { font: 900 34px/1 var(--head); color: var(--spot); }
.families span, .posts time, .arrivals time { color: var(--ink-soft); }
.card [data-ask] textarea, .panel [data-ask] textarea, .card .ask textarea, .panel .ask textarea, .card form input, .panel form input, .card form textarea, .panel form textarea { background: rgba(255, 255, 255, 0.35); border: 1.5px solid var(--ink); border-radius: 0; color: var(--ink); font-family: var(--serif); }
.card form label { color: var(--ink-soft); font: 700 12px var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.btn.floating { background: var(--ink); color: var(--paper); }

.panel { border-radius: 2px; border: 0; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); }
.panel-close { background: var(--paper); }
.panel-head h2 { font: 900 34px/0.95 var(--head); text-transform: uppercase; }
.panel-head p { font: 700 12px var(--head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.swatch { border-radius: 0; box-shadow: inset 0 0 0 1.5px var(--ink); }
.swatch.claimed { box-shadow: inset 0 0 0 1.5px var(--ink); }
.swatch.captured { box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--c); }
.state { border-radius: 0; border: 1.5px solid var(--ink); color: var(--ink); font: 800 11px var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.state-claimed, .state-drawing { color: var(--spot); border-color: var(--spot); }
.state-captured { color: var(--spot-ink); border-color: var(--spot-ink); }
.answered { color: var(--spot-ink); font-style: italic; }
.panel-quote { border-left: 3px solid var(--spot); background: none; font: italic 22px/1.3 var(--serif); }
.panel-section { border-top: 1.5px solid var(--ink); }
.panel-section h3 { font: 800 13px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.panel-section h4 { font: 700 12px var(--head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--spot); }
.panel-section p { font-size: 15px; }
.panel-section .note { border-radius: 0; background: var(--paper-2); border: 1px dashed var(--line-strong); font-style: italic; }
.jump { border-radius: 0; background: none; border: 1.5px solid var(--ink); font: 700 12px var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.jump:hover { background: var(--ink); color: var(--paper); }
.kv { font-size: 14px; }
.kv span:first-child { font: 700 12px var(--head); letter-spacing: 0.1em; text-transform: uppercase; }
#tip { border-radius: 0; border: 1.5px solid var(--ink); font: 14px/1.4 var(--serif); }
#tip b { font: 800 17px/1 var(--head); text-transform: uppercase; }
#tip .tip-intent { color: var(--ink); font-family: var(--serif); font-style: italic; }
.zoom { border-radius: 0; background: var(--grain), var(--paper); border: 1.5px solid var(--ink); backdrop-filter: none; }
.zoom button { color: var(--ink); font: 800 16px var(--head, sans-serif); }
.zoom button + button { border-left: 1.5px solid var(--ink); }
.zoom button:hover { background: var(--ink); color: #eee6d4; }
.zoom { --ink: #1e2f8f; --paper: #eee6d4; --head: 'Big Shoulders Display', sans-serif; --grain: none; }

/* ---- /os/brand ---------------------------------------------------------------- */
.brand-sheet { padding: 24px 28px 32px; margin-top: 16px; max-width: 1040px; }
.brand-marks { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.seal.big { width: 170px; height: 170px; }
.monogram.big { width: 120px; height: 120px; }
.brand-swatches, .brand-type, .brand-icons, .brand-rules { list-style: none; padding: 0; margin: 0; }
.brand-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.brand-swatches .chip { display: block; height: 72px; border: 1.5px solid var(--ink); margin-bottom: 6px; }
.brand-swatches .chip.spot-block { background: var(--speckle), var(--spot); }
.brand-swatches b { font: 800 16px var(--head); margin-right: 6px; }
.brand-swatches p, .brand-type p { margin: 4px 0 0; font-size: 14px; }
.brand-type { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.specimen { font-size: 34px !important; line-height: 1 !important; margin: 0 0 8px !important; }
.brand-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.brand-icons li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border: 1.5px solid var(--ink); }
.icon.big { width: 36px; height: 36px; }
.brand-rules li { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---- /os/media ------------------------------------------------------------------- */
.studio { max-width: 860px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; }
.studio-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.studio-row label { flex: 1 1 200px; }
.studio select { display: block; width: 100%; margin-top: 4px; padding: 8px; background: rgba(0, 0, 0, 0.35); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
.studio-row .btn { margin-bottom: 10px; }
.studio-preview { padding: 16px; border-radius: 4px; margin: 10px 0; }
.studio-preview img { display: block; max-width: 100%; max-height: 520px; margin: 0 auto; }
.library { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.library li { display: flex; flex-direction: column; gap: 4px; }
.thumb { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 4px; }
.thumb img { max-width: 100%; max-height: 100%; }
.library-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
dialog.picker { width: min(960px, 94vw); max-height: 88vh; overflow: auto; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 14px; padding: 18px; }
dialog.picker::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog.picker header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
dialog.picker h2 { margin: 0; font: 400 24px var(--serif); }
dialog.picker details { margin-bottom: 16px; }
dialog.picker summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; }

/* ---- Reference images in the generator ----------------------------------------------- */
.refs { margin: 4px 0 12px; padding: 10px 12px; border: 1.5px dashed var(--line-strong); }
.refs.over { background: var(--paper-2, rgba(255, 255, 255, 0.05)); border-style: solid; }
.refs p { margin: 0; font-size: 13px; }
.refs input[type=file] { display: none !important; }
.refs .linklike { display: inline; font-size: 13px; color: inherit; }
.ref-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.ref-list:not(:empty) { margin-top: 8px; }
.ref-list li { position: relative; }
.ref-list img { display: block; width: 84px; height: 84px; object-fit: cover; border: 1.5px solid var(--line-strong); }
.ref-list button { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink, #fff); background: var(--paper, #111); color: var(--ink, #fff); cursor: pointer; line-height: 1; padding: 0; }

/* ---- /os on paper ------------------------------------------------------------------- */
body.os { font-size: 15px; line-height: 1.5; }
.os .os-nav { border-right: 4px double var(--ink); background: var(--grain), var(--paper); }
.os .os-brand { display: flex; flex-direction: column; text-decoration: none; padding: 0 10px 18px; margin-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.os .os-brand .kicker { font-size: 12px; margin: 0 0 4px; }
.os .os-brand .flag-name { font-size: 34px; line-height: 0.9; }
.os .os-brand small { font: 700 11px var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.os .os-nav nav a { border-radius: 0; color: var(--ink); font: 800 14px var(--head); letter-spacing: 0.1em; text-transform: uppercase; padding: 7px 10px; }
.os .os-nav nav a:hover { background: var(--paper-2); color: var(--ink); }
.os .os-nav nav a[aria-current] { background: var(--ink); color: var(--paper); }
.os .os-who { color: var(--ink-soft); }
.os .os-main > h1 { font: 900 52px/0.95 var(--head); text-transform: uppercase; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 4px double var(--ink); }
.os .os-main > h2 { font: 900 26px/1 var(--head); text-transform: uppercase; margin: 32px 0 12px; padding-top: 6px; border-top: 5px solid var(--ink); }
.os .muted { color: var(--ink-soft); }
.os code { background: var(--paper-2); padding: 1px 5px; font-size: 0.86em; }
.os form label, .os .pane-label { color: var(--ink-soft); font: 700 12px var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.os form label .muted { text-transform: none; letter-spacing: 0; font: italic 12px var(--serif); }
.os form input, .os form textarea, .os select, .os .studio select, .os .message-head select {
  background: rgba(255, 255, 255, 0.45); border: 1.5px solid var(--ink); border-radius: 0; color: var(--ink);
  font: 15px/1.45 var(--serif); text-transform: none; letter-spacing: 0;
}
.os .editor-panes textarea, .os form[data-sql] textarea { font: 13px/1.6 var(--mono); }
.os form input:focus, .os form textarea:focus, .os select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.os .btn { border-radius: 0; border: 1.5px solid var(--ink); background: none; color: var(--ink); font: 800 13px/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 12px; }
.os .btn:hover { background: var(--paper-2); }
.os .btn.primary { background: var(--ink); color: var(--paper); }
.os .btn.primary:hover { background: var(--spot-ink); }
.os .btn.danger { color: #9b2c1a; border-color: #9b2c1a; }
.os .btn.small { font-size: 11.5px; padding: 6px 9px; }
.os .pill, .os .state { border-radius: 0; border: 1.5px solid var(--ink); color: var(--ink); font: 800 11px var(--head); letter-spacing: 0.12em; text-transform: uppercase; padding: 1px 7px; }
.os .pill-published { background: var(--ink); color: var(--paper); }
.os .pill-draft { border-style: dashed; }
.os .tile { border-radius: 0; border: 1.5px solid var(--ink); }
.os .tile:hover { background: var(--paper-2); }
.os .tile b { font: 900 40px/1 var(--head); }
.os .tile span { color: var(--ink-soft); }
.os .board th { color: var(--ink); }
.os .code { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 0; }
.os .message, .os .studio, .os .key-form fieldset, .os .new-key { border-radius: 0; border: 1.5px solid var(--ink); }
.os .editor-actions { background: var(--grain), var(--paper); border-top: 4px double var(--ink); }
.os .preview { border: 1.5px solid var(--ink); }
.os .brand-sheet { border: 1.5px solid var(--ink); }
.os .studio-preview, .os .thumb { border: 1.5px solid var(--line); }
.os dialog.picker { background: var(--grain), var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 0; }
.os dialog.picker::backdrop { background: rgba(21, 34, 108, 0.45); }
.os dialog.picker h2 { font: 900 28px/1 var(--head); text-transform: uppercase; }
.os dialog.picker summary { color: var(--ink); font: 800 13px var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.os .check { color: var(--ink); text-transform: none; letter-spacing: 0; font: 14px var(--serif); }
.os tr.revoked td { color: var(--ink-soft); }
.os .board.data td { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; padding-right: 16px; }
.os ::selection { background: var(--ink); color: var(--paper); }
@media (max-width: 860px) {
  .os .os-nav { border-right: 0; border-bottom: 4px double var(--ink); }
  .os .os-main > h1 { font-size: 40px; }
}
.save-row { align-items: center; }
.save-row .btn { margin-bottom: 0; }
.save-status { font: 700 13px var(--head, sans-serif); letter-spacing: 0.08em; text-transform: uppercase; }
.save-status.busy::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; }
.save-status.done::before { content: '✓ '; }
.save-status.failed { color: #9b2c1a; }
.library li.fresh { animation: arrive 1.2s ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arrive { from { background: rgba(30, 47, 143, 0.18); } to { background: transparent; } }
.os [data-studio] button[type=submit]:disabled { opacity: 0.6; }

/* ---- Live light and new-drawing notice --------------------------------------------- */
.dock .dock-live { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; height: 36px; color: #1e2f8f; font: 800 13px 'Big Shoulders Display', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; cursor: default; }
.dock-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9aa0b8; }
.dock-live[data-state='on']::before { background: #2f9e5b; box-shadow: 0 0 0 0 rgba(47, 158, 91, 0.6); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(47, 158, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 91, 0); } }
.toast {
  position: fixed; z-index: 80; top: 20px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 16px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.85); animation: drop 0.35s ease-out;
}
.toast[hidden] { display: none; }
.toast::before { content: ''; position: absolute; inset: 4px; border: 1.5px solid var(--ink); pointer-events: none; }
.toast-kicker { font: 800 11px var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.toast b { font: 900 20px/1 var(--head); text-transform: uppercase; }
.toast-by { font: italic 14px var(--serif); }
.toast .btn, .toast .close { position: relative; }
.toast .btn { border-radius: 0; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font: 800 11.5px/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 10px; cursor: pointer; }
.toast .close { color: var(--ink); }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .dock-live[data-state='on']::before { animation: none; } }
@media (max-width: 760px) { .toast { top: 12px; } }
.os td.seq { font: 12px var(--mono); white-space: normal; min-width: 320px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches span { width: 40px; height: 40px; border: 1.5px solid var(--ink); }
.boxscore td.muted { font: italic 13px var(--serif); text-align: right; }
