/* Bluearc Interactive
   A reading room at night: navy walls, books standing on shelves, the page itself the brightest thing.
   Light mode is the same room by day. Every color comes from the tokens below, so both themes stay in step.
   Type: Literata (a typeface made for reading books on screens) for titles and story text, Figtree for the interface. */

:root {
  --bg: #0C121D;
  --band: #101827;
  --card: #152033;
  --card-2: #1B2840;
  --line: #26344F;
  --line-strong: #3A4C70;
  --ink: #EEF2F8;
  --muted: #9AA8C0;
  --mint: #9EF0DE;
  --on-mint: #05261F;
  --mint-ink: #9EF0DE;
  --mint-soft: rgba(158, 240, 222, .13);
  --arc: #7097FF;
  --on-arc: #0B1530;
  --arc-soft: rgba(112, 151, 255, .16);
  --sun: #FFC94A;
  --sun-soft: #3D331A;
  --tap: #FFF1B8;
  --danger: #FF8C77;
  --danger-soft: rgba(255, 140, 119, .13);
  --ok: #7EE0A8;
  --paper: #FEFDF9;
  --paper-ink: #1D2029;
  --paper-muted: #6B6F7A;
  --ledge: #1E2B44;
  --ledge-edge: #34466B;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .35);
  --display: 'Literata', 'Iowan Old Style', Georgia, serif;
  --ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --top-h: 64px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F2F4F8; --band: #FFFFFF; --card: #FFFFFF; --card-2: #EEF2F8; --line: #D6DEEA; --line-strong: #B4C1D6;
    --ink: #111A2B; --muted: #546079; --mint: #8DEBD5; --on-mint: #05261F; --mint-ink: #0A7C66; --mint-soft: #DDF6EF;
    --arc: #2556D9; --on-arc: #FFFFFF; --arc-soft: #E6EDFF; --sun: #F2A900; --sun-soft: #FFF2C2; --danger: #B4361F; --danger-soft: #FBE7E2;
    --ok: #1E8A50; --ledge: #DCE3EE; --ledge-edge: #C3CEDF;
    --shadow: 0 16px 36px rgba(17, 26, 43, .16); --shadow-sm: 0 4px 14px rgba(17, 26, 43, .12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F2F4F8; --band: #FFFFFF; --card: #FFFFFF; --card-2: #EEF2F8; --line: #D6DEEA; --line-strong: #B4C1D6;
  --ink: #111A2B; --muted: #546079; --mint: #8DEBD5; --on-mint: #05261F; --mint-ink: #0A7C66; --mint-soft: #DDF6EF;
  --arc: #2556D9; --on-arc: #FFFFFF; --arc-soft: #E6EDFF; --sun: #F2A900; --sun-soft: #FFF2C2; --danger: #B4361F; --danger-soft: #FBE7E2;
  --ok: #1E8A50; --ledge: #DCE3EE; --ledge-edge: #C3CEDF;
  --shadow: 0 16px 36px rgba(17, 26, 43, .16); --shadow-sm: 0 4px 14px rgba(17, 26, 43, .12);
  color-scheme: light;
}

/* ---------- base ---------- */
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-text="large"] { font-size: 112.5%; }
html[data-text="larger"] { font-size: 125%; }
* , *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band); }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--arc-soft); }
:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--mint); color: var(--on-mint); padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { flex: 1; outline: none; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) { main { padding-bottom: 56px; } }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.mint { color: var(--mint-ink); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--band) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 10px; min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; border-radius: 10px; }
.brand svg { width: 40px; height: 24px; flex: none; }
.word { white-space: nowrap; font-weight: 800; font-size: 1.375rem; letter-spacing: -.02em; line-height: 1; }
.word span { font-weight: 500; color: var(--muted); }
.nav { display: none; gap: 4px; margin-right: 6px; }
.nav a { text-decoration: none; font-weight: 700; font-size: .9375rem; color: var(--muted); padding: 8px 14px; border-radius: 999px; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--card-2); }
.nav a:hover { color: var(--ink); }
@media (min-width: 860px) { .nav { display: flex; } }
.iconbtn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0; text-decoration: none; }
.iconbtn:hover { border-color: var(--line-strong); }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn[aria-pressed="false"] { color: var(--muted); }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: linear-gradient(140deg, var(--arc), var(--mint)); color: #08121F; font-weight: 800; font-size: 1rem; display: grid; place-items: center; padding: 0; }
.avatar.big { width: 72px; height: 72px; font-size: 1.75rem; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 40; }
.menu-list .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-list .who b { display: block; font-size: .9375rem; }
.menu-list .who span { font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; text-decoration: none; font-weight: 600; font-size: .9375rem; }
.menu-list a:hover, .menu-list button:hover { background: var(--card-2); }
.signin-link { text-decoration: none; font-weight: 700; font-size: .9375rem; padding: 0 16px; min-height: 42px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; }
@media (max-width: 420px) { .top .search-btn { display: none; } }

/* ---------- bottom tabs (phones) ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--band); border-top: 1px solid var(--line);
  padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: repeat(4, 1fr); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-decoration: none; font-size: .75rem; font-weight: 700; color: var(--muted); border-radius: 12px; }
.tabs svg { width: 24px; height: 24px; }
.tabs [aria-current="page"] { color: var(--mint-ink); }
.tabs .make span.dot { width: 46px; height: 30px; border-radius: 999px; background: var(--mint); color: var(--on-mint); display: grid; place-items: center; }
.tabs .make[aria-current="page"] span.dot { box-shadow: 0 0 0 2px var(--band), 0 0 0 4px var(--mint); }
@media (min-width: 760px) { .tabs { display: none; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) { .foot { margin-bottom: 0; } }
.foot .wrap { padding-block: 24px; display: flex; gap: 12px 28px; flex-wrap: wrap; justify-content: space-between; align-items: center; color: var(--muted); font-size: .875rem; }
.foot nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
body.is-reading .top, body.is-reading .tabs, body.is-reading .foot { display: none; }
body.is-reading main { padding-bottom: 0; }

/* ---------- type ---------- */
.page-head { padding-top: 32px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.page-head h1, .h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.6vw, 2.75rem); line-height: 1.08; letter-spacing: -.015em; }
.page-head p { color: var(--muted); font-size: 1.0625rem; max-width: 62ch; }
.page-head .row { margin-top: 6px; }
.crumb { font-size: .9375rem; font-weight: 700; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; width: fit-content; border-radius: 8px; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 16px; height: 16px; }
h2.h2, .h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 1.875rem); line-height: 1.15; letter-spacing: -.01em; }
.h3 { font-weight: 800; font-size: 1.0625rem; line-height: 1.3; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 62ch; }
.section { padding-block: 28px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-head p { color: var(--muted); }
.sec-head a.more { font-weight: 700; color: var(--mint-ink); text-decoration: none; white-space: nowrap; }
.sec-head a.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 14px; font-size: 1.0625rem; line-height: 1.65; }
.prose h2 { font-family: var(--display); font-size: 1.375rem; margin-top: 14px; }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- buttons and small controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); font-weight: 700; font-size: .9375rem; line-height: 1.2; text-decoration: none; white-space: nowrap; color: var(--ink); }
.btn:hover { border-color: var(--line-strong); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn.primary { background: var(--mint); border-color: var(--mint); color: var(--on-mint); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.quiet { background: transparent; }
.btn.danger { color: var(--danger); background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: var(--bg); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--mint-ink); font-weight: 700; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.badge.draft { background: var(--sun-soft); color: var(--ink); }
.badge.published { background: var(--mint-soft); color: var(--mint-ink); }
.badge.retired { background: var(--card-2); color: var(--muted); }
.badge.owned { background: var(--mint-soft); color: var(--mint-ink); }
.badge.test { background: var(--arc-soft); color: var(--arc); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-weight: 700; font-size: .875rem; color: var(--muted); white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .7; margin-left: 4px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card-2); border-radius: 14px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: .9375rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field > .label { font-weight: 700; font-size: .9375rem; }
.field small, .hint { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .field select, .field textarea {
  width: 100%; min-height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card-2); padding: 10px 14px; font-size: 1rem; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--mint-ink); outline: 2px solid color-mix(in srgb, var(--mint-ink) 35%, transparent); outline-offset: 0; }
.field .with-unit { position: relative; display: flex; align-items: center; }
.field .with-unit b { position: absolute; left: 14px; color: var(--muted); font-weight: 600; pointer-events: none; }
.field .with-unit input { padding-left: 30px !important; }
.grid2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.form-error { color: var(--danger); font-weight: 700; font-size: .9375rem; }
.form-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--mint-ink); flex: none; }
.pw { position: relative; }
.pw input { padding-right: 74px !important; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-weight: 700; font-size: .8125rem; color: var(--muted); padding: 8px 10px; border-radius: 8px; }

/* switch: a real checkbox, drawn as a toggle */
.switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch:first-of-type { border-top: 0; }
.switch b { display: block; font-size: 1rem; }
.switch small { display: block; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line-strong); position: relative; margin: 0; flex: none; transition: background .15s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked { background: var(--mint-ink); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:disabled { opacity: .5; }

/* choice cards (theme, content level) */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--mint-ink); box-shadow: 0 0 0 1px var(--mint-ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--mint-ink); outline-offset: 2px; }
.choice b { font-size: .9375rem; }
.choice small { color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.swatch { height: 54px; border-radius: 9px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); }
.swatch i { display: block; }
.sw-light { background: linear-gradient(#FFFFFF 0 34%, #F2F4F8 34%); }
.sw-light i:last-child { background: linear-gradient(#FFFFFF 0 34%, #F2F4F8 34%); }
.sw-dark i { background: linear-gradient(#101827 0 34%, #0C121D 34%); }
.sw-system i:first-child { background: linear-gradient(#FFFFFF 0 34%, #F2F4F8 34%); }
.sw-system i:last-child { background: linear-gradient(#101827 0 34%, #0C121D 34%); }
.swatch i span { display: block; margin: 26% 14% 0; height: 6px; border-radius: 3px; background: #8DEBD5; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors label { position: relative; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.colors input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.colors label:has(input:checked) { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.colors label:has(input:focus-visible) { outline: 3px solid var(--mint-ink); outline-offset: 4px; }

/* ---------- panels ---------- */
.panel { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 640px) { .panel { padding: 26px; } }
.panel > h2, .panel > header h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; }
.panel > p, .panel > header p { color: var(--muted); max-width: 62ch; }
.panel.quiet { background: transparent; }
.panel.warn { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--arc-soft); color: var(--ink); font-size: .9375rem; }
.note svg { width: 20px; height: 20px; flex: none; color: var(--arc); margin-top: 1px; }
.note.sun { background: var(--sun-soft); }
.note.sun svg { color: var(--sun); }

/* ---------- covers and shelves ---------- */
/* A drawn cover: color band, the first page's picture, the title set in Literata. Uploaded covers replace it. */
.cover { container-type: inline-size; position: relative; aspect-ratio: 25 / 32; width: 100%; background: var(--paper); border-radius: 5px; overflow: hidden; box-shadow: var(--shadow-sm); color: var(--paper-ink); display: flex; flex-direction: column; align-items: center; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 4%; background: linear-gradient(90deg, rgba(0, 0, 0, .16), transparent); pointer-events: none; }
.cover-band { width: 100%; min-height: 11.5%; padding: 0 6%; background: var(--b, #2B59C3); display: grid; place-items: center; color: #FFFFFF; font-size: 3.2cqw; font-weight: 800; letter-spacing: .06em; text-align: center; line-height: 1.15; }
.cover-art { width: 70%; margin-top: 6.5%; aspect-ratio: 1; border-radius: 3.5cqw; overflow: hidden; background: color-mix(in srgb, var(--b, #2B59C3) 22%, #F1EDE4); display: grid; place-items: center; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-art svg { width: 46%; color: var(--b, #2B59C3); opacity: .55; }
.cover-title { margin-top: 5%; padding: 0 8%; font-family: var(--display); font-weight: 600; font-size: 7cqw; line-height: 1.12; text-align: center; text-wrap: balance; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cover-sub { margin-top: 1.6%; padding: 0 8%; font-size: 3.6cqw; font-weight: 700; color: var(--b, #2B59C3); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.cover-by { margin-top: auto; margin-bottom: 5%; font-size: 3.2cqw; color: var(--paper-muted); letter-spacing: .02em; }
.cover.real { background: #1B2840; }
.cover.real img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.real::after { width: 3%; }

/* books stand on a shelf: each cover's ledge joins its neighbours into one board */
.shelf { list-style: none; margin: 0; padding: 0; --gap-x: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px var(--gap-x); }
@media (min-width: 600px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); --gap-x: 22px; } }
@media (min-width: 1100px) { .shelf.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.book { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.book .stand { position: relative; display: block; text-decoration: none; border-radius: 5px; padding: 0 6%; }
.book .stand::after { content: ""; position: absolute; left: calc(var(--gap-x) / -2 - 1px); right: calc(var(--gap-x) / -2 - 1px); bottom: -9px; height: 9px; background: var(--ledge); border-top: 2px solid var(--ledge-edge); border-radius: 0 0 3px 3px; z-index: -1; }
.book .stand:hover .cover, .book .stand:focus-visible .cover { transform: translateY(-4px); }
.book .cover { transition: transform .2s ease; }
.book .strip { position: absolute; left: 6%; right: 6%; bottom: 0; height: 5px; background: rgba(29, 32, 41, .18); overflow: hidden; border-radius: 0 0 5px 5px; }
.book .strip i { display: block; height: 100%; background: var(--mint); }
.book .info { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.book h3 { font-size: 1rem; font-weight: 800; line-height: 1.25; }
.book h3 a { text-decoration: none; }
.book h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.book .by { font-size: .875rem; color: var(--muted); }
.book .by a { text-decoration: none; }
.book .by a:hover { color: var(--ink); text-decoration: underline; }
.book .meta { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.book .meta .price { color: var(--ink); font-weight: 700; }
.book .meta .own { color: var(--mint-ink); font-weight: 700; }
.empty { grid-column: 1 / -1; padding: 32px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty b { color: var(--ink); font-size: 1.0625rem; }

/* ---------- home ---------- */
.welcome { padding-top: 40px; padding-bottom: 12px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 940px) { .welcome { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; padding-top: 56px; } }
.welcome h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -.02em; }
.welcome .intro { color: var(--muted); font-size: 1.125rem; max-width: 46ch; margin-top: 16px; }
.welcome .row { margin-top: 24px; }
/* the signature: a word you can tap, as in the books */
.tapword { font: inherit; color: inherit; border: 3px dashed currentColor; background: transparent; border-radius: .22em; padding: 0 .16em; line-height: 1.12; display: inline-block; cursor: pointer; position: relative; }
.tapword:hover { background: var(--sun-soft); }
.tapword.go { animation: tap-wiggle .8s ease; border-style: solid; background: var(--sun-soft); }
@keyframes tap-wiggle { 0% { transform: none; } 25% { transform: translateY(-.12em) rotate(-3deg); } 50% { transform: translateY(0) rotate(3deg); } 75% { transform: rotate(-1.5deg); } 100% { transform: none; } }
.page-demo { position: relative; border-radius: 16px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); padding: 12px; margin: 0; }
.page-demo .bas[data-bas-theme="host"] { --bas-ink: var(--paper-ink); --bas-sun-soft: var(--tap); }
.page-demo .bas-story { font-size: 1.125rem; line-height: 1.85; padding: 8px 6px 0; }
.page-demo .stage { border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 2; background: #0E1A45; position: relative; }
.page-demo .stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-demo .line { font-family: var(--display); font-size: 1.1875rem; line-height: 1.8; padding: 12px 8px 4px; text-align: center; }
.page-demo .tap { font: inherit; border: 2px dashed #1D2029; background: var(--tap); color: #1D2029; border-radius: 9px; padding: 0 7px; line-height: 1.35; display: inline-block; cursor: pointer; }
.page-demo .tap.go { animation: tap-wiggle .7s ease; background: #9EF0DE; border-style: solid; }
.page-demo .hint { font-size: .8125rem; color: var(--paper-muted); text-align: center; padding-bottom: 4px; }
.page-demo .bubble { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); background: #FFFFFF; color: #1C2030; font-family: var(--display); font-weight: 700; font-size: 1.125rem; padding: 6px 14px; border: 3px solid #1C2030; border-radius: 16px; box-shadow: 0 4px 0 #1C2030; white-space: nowrap; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.page-demo .bubble.on { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.steps-3 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); counter-reset: step; }
@media (min-width: 760px) { .steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps-3 li { counter-increment: step; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.steps-3 li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-soft); color: var(--mint-ink); font-weight: 800; margin-bottom: 6px; }
.steps-3 b { font-size: 1.0625rem; }
.steps-3 p { color: var(--muted); font-size: .9375rem; }
.hello { padding-top: 32px; display: flex; flex-direction: column; gap: 6px; }
.hello h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.08; letter-spacing: -.015em; }
.hello p { color: var(--muted); font-size: 1.0625rem; }
.reading { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .reading { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.hero { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); padding: 22px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: center;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--hb, #2B59C3) 30%, transparent), transparent 60%), var(--card); }
@media (min-width: 560px) { .hero { grid-template-columns: 180px minmax(0, 1fr); padding: 28px; gap: 30px; } }
.hero-cover { width: min(180px, 52vw); justify-self: center; transform: rotate(-3deg); text-decoration: none; }
.hero-cover .cover { box-shadow: var(--shadow); }
.hero-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hero-info .kicker { font-weight: 700; color: var(--mint-ink); font-size: .9375rem; }
.hero-info h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.1; letter-spacing: -.01em; }
.hero-info .by { color: var(--muted); }
.progress { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--mint); transition: width .4s ease; }
.also { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.also h2 { font-weight: 800; font-size: 1rem; }
.also-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.also-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px; border-radius: 14px; background: var(--card-2); }
.also-row b { display: block; font-size: .9375rem; line-height: 1.25; }
.also-row .progress { font-size: .8125rem; margin-top: 6px; }
.pair { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.make-panel { background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--arc) 24%, transparent), transparent 60%), var(--card); }

/* ---------- bookshop ---------- */
.shop-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 22px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); padding: 0 16px 0 42px; font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.sort { min-height: 46px; border-radius: 999px; border: 1px solid var(--line); background-color: var(--card-2); padding: 0 42px 0 18px; font-weight: 600; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.shop-note { font-size: .875rem; color: var(--muted); margin-top: -8px; margin-bottom: 18px; }
.shop-note a { color: var(--mint-ink); font-weight: 700; }

/* ---------- book page ---------- */
.bookpage { padding-top: 24px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .bookpage { grid-template-columns: 280px minmax(0, 1fr); gap: 44px; padding-top: 36px; } }
.bookpage .cover-col { width: min(280px, 70vw); justify-self: center; }
@media (min-width: 760px) { .bookpage .cover-col { justify-self: start; position: sticky; top: calc(var(--top-h) + 24px); align-self: start; } }
.bookpage .cover { box-shadow: var(--shadow); }
.bookpage .details { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bookpage .series { font-weight: 700; color: var(--mint-ink); }
.bookpage h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.06; letter-spacing: -.015em; }
.bookpage .subtitle { font-family: var(--display); font-size: 1.25rem; color: var(--muted); font-style: italic; }
.bookpage .by { font-size: 1.0625rem; }
.bookpage .by a { font-weight: 700; color: var(--mint-ink); text-decoration: none; }
.bookpage .by a:hover { text-decoration: underline; text-underline-offset: 3px; }
.buybox { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); max-width: 520px; }
.buybox .price { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1; }
.buybox .price small { font-family: var(--ui); font-size: .875rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.description { font-family: var(--display); font-size: 1.125rem; line-height: 1.7; max-width: 62ch; white-space: pre-line; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; max-width: 620px; }
.facts div { padding: 12px 14px; border-radius: 12px; background: var(--card-2); }
.facts dt { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.facts dd { font-weight: 700; margin-top: 2px; }

/* ---------- reader ---------- */
.reader { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.reader-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 10px) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.reader-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.reader-title b { font-family: var(--display); font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-title span { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.reader-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); }
.reader-page { width: 100%; max-width: min(1120px, calc((100svh - 230px) * 1.5)); min-width: min(100%, 320px); margin: 0 auto; position: relative; }
.reader-page .bas-story { font-size: clamp(1.125rem, 2.2vw, 1.5rem); line-height: 1.9; max-width: 46ch; margin: 0 auto; }
.reader-end { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; max-width: 560px; margin: 0 auto; }
.reader-end h2 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.1; }
.reader-end p { color: var(--muted); max-width: 44ch; }
.reader-end .cover { width: 120px; }
.reader-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.reader-nav .bar { height: 5px; }
.reader-loading { min-height: 40vh; display: grid; place-items: center; color: var(--muted); }

/* ---------- creator studio ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat span { font-size: .875rem; color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { font-size: .8125rem; color: var(--muted); }
.mybooks { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px 18px; --gap-x: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .mybooks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .mybooks { grid-template-columns: repeat(5, minmax(0, 1fr)); --gap-x: 22px; } }
.book .stand.plain::after { display: none; }
.newbook { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 25 / 32; width: 100%; border-radius: 6px; border: 2px dashed var(--line-strong); background: transparent; color: var(--mint-ink); font-weight: 800; text-align: center; padding: 10px; }
.newbook:hover { border-color: var(--mint-ink); background: var(--mint-soft); }
.newbook .plus { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.become { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .become { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.perks li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.perks li > span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-soft); color: var(--mint-ink); }
.perks li > span svg { width: 18px; height: 18px; }
.perks b { display: block; }
.perks p { color: var(--muted); font-size: .9375rem; }

/* book editor */
.editor-head { padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.editor-head .titlebar { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.editor-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.tabbar a, .tabbar button { padding: 12px 14px; border: 0; background: none; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 8px 8px 0 0; }
.tabbar [aria-selected="true"], .tabbar [aria-current="page"] { color: var(--ink); border-bottom-color: var(--mint-ink); }
.pages-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pagecard { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pagecard .thumb { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); text-decoration: none; }
.pagecard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pagecard .thumb .blank { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: .875rem; text-align: center; padding: 10px; }
.pagecard .thumb .no { position: absolute; left: 8px; top: 8px; background: rgba(12, 18, 29, .82); color: #FFFFFF; font-weight: 800; font-size: .8125rem; padding: 2px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.pagecard .thumb:hover { border-color: var(--line-strong); }
.pagecard .cap { font-size: .875rem; color: var(--muted); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.8em; }
.pagecard .tools { display: flex; gap: 4px; flex-wrap: wrap; }
.pagecard .tools button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: .8125rem; font-weight: 700; color: var(--muted); }
.pagecard .tools button:hover:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.pagecard .tools button:disabled { opacity: .35; cursor: default; }
.pagecard .tools button.del:hover { color: var(--danger); }
.addpage { aspect-ratio: 3 / 2; width: 100%; border-radius: 12px; border: 2px dashed var(--line-strong); background: transparent; color: var(--mint-ink); font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.addpage:hover { border-color: var(--mint-ink); background: var(--mint-soft); }
.addpage .plus { font-family: var(--display); font-size: 2.2rem; line-height: 1; }
.two-col { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.cover-edit { display: grid; gap: 18px; grid-template-columns: 150px minmax(0, 1fr); align-items: start; }
@media (max-width: 480px) { .cover-edit { grid-template-columns: 110px minmax(0, 1fr); } }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card-2); color: var(--muted); font-size: .8125rem; font-weight: 800; }
.checklist li.done > span { background: var(--mint-soft); color: var(--mint-ink); }
.checklist li.todo { color: var(--muted); }
.earn { font-size: .9375rem; color: var(--muted); }
.earn b { color: var(--ink); }

/* page editor */
.editor-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); z-index: 15; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.editor-bar .wrap { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-height: 58px; padding-block: 8px; }
.editor-bar .back { margin-right: auto; min-width: 0; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.pager .iconbtn { width: 36px; height: 36px; }
.save-state { font-size: .875rem; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-width: 76px; }
.save-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.save-state[data-state="saved"]::before { background: var(--ok); }
.save-state[data-state="saving"]::before { background: var(--sun); }
.save-state[data-state="error"] { color: var(--danger); }
.save-state[data-state="error"]::before { background: var(--danger); }
.studio-host { padding-top: 14px; }
/* the scene builder takes its colors and type from the site */
.bas[data-bas-theme="host"] {
  --bas-bg: transparent; --bas-surface: var(--card); --bas-sunken: var(--card-2); --bas-ink: var(--ink); --bas-muted: var(--muted); --bas-line: var(--line);
  --bas-accent: var(--mint-ink); --bas-accent-soft: var(--mint-soft); --bas-on-accent: var(--bg); --bas-sun: var(--sun); --bas-sun-soft: var(--sun-soft); --bas-on-sun: #1C2030;
  --bas-danger: var(--danger); --bas-stage: #0A1230; --bas-check-a: var(--card-2); --bas-check-b: var(--card); --bas-pop: var(--shadow);
  --bas-display: var(--display); --bas-body: var(--ui); color-scheme: inherit; padding-top: 0;
}
.bas[data-bas-theme="host"] .bas-inspector, .bas[data-bas-theme="host"] .bas-bench { border: 1px solid var(--line); }
.studio-host .bas[data-bas-theme="host"] { padding-left: 0; padding-right: 0; }
@media (max-width: 700px) { .editor-bar { position: static; } }
.bas[data-bas-theme="host"].bas-reader .bas-bench { border: 0; }
.bas[data-bas-theme="host"] .bas-stage { box-shadow: var(--shadow-sm); }
.bas[data-bas-theme="host"] .bas-story { font-weight: 500; }
.bas[data-bas-theme="host"] .bas-btn.bas-primary { color: var(--on-mint); background: var(--mint); border-color: var(--mint); }
.bas[data-bas-theme="host"] .bas-mode button[aria-pressed="true"] { background: var(--mint); color: var(--on-mint); }
.bas[data-bas-theme="host"] .bas-pill { border-color: currentColor; }

/* ---------- settings ---------- */
.settings { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
@media (min-width: 960px) { .settings { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; } }
.settings-nav { display: none; }
@media (min-width: 960px) {
  .settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--top-h) + 24px); align-self: start; }
  .settings-nav a { padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: .9375rem; color: var(--muted); }
  .settings-nav a:hover { color: var(--ink); background: var(--card-2); }
  .settings-nav a.on { color: var(--ink); background: var(--card-2); }
}
.settings-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.settings-main .panel { scroll-margin-top: calc(var(--top-h) + 20px); }
.settings-main .panel > header { display: flex; flex-direction: column; gap: 4px; }
.settings-main .panel h2 { font-size: 1.375rem; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv b { display: block; }
.kv span { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.purchases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.purchases li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.purchases li:first-child { border-top: 0; }
.purchases a { font-weight: 700; text-decoration: none; }
.purchases a:hover { text-decoration: underline; text-underline-offset: 3px; }
.purchases small { color: var(--muted); grid-column: 1; font-size: .8125rem; }
.purchases .amt { font-weight: 700; font-variant-numeric: tabular-nums; grid-row: 1 / span 2; grid-column: 2; text-align: right; }

/* ---------- sign in ---------- */
.auth { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 36px 0; }
.auth .panel { width: min(460px, 100%); gap: 18px; }
.auth h1 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.1; }
.auth .alt { text-align: center; color: var(--muted); font-size: .9375rem; }
.auth .alt a { color: var(--mint-ink); font-weight: 700; }
.goal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- creator profile ---------- */
.profile-head { padding-top: 32px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.6vw, 2.75rem); line-height: 1.08; }
.profile-head p { color: var(--muted); }
.profile-bio { max-width: 66ch; font-size: 1.0625rem; margin-top: 16px; white-space: pre-line; }

/* ---------- admin ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table thead th { border-top: 0; font-size: .8125rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.table td.n, .table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- dialogs, toasts, loading ---------- */
dialog.dlg { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(540px, calc(100vw - 24px)); width: 100%; max-height: calc(100vh - 24px); }
dialog.dlg::backdrop { background: rgba(5, 9, 18, .66); }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.sheet h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.sheet p { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .9375rem; padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center; }
.toast.err { background: var(--danger); color: #FFFFFF; }
@media (min-width: 760px) { .toast { bottom: 28px; } }
body.is-reading .toast { bottom: auto; top: calc(66px + env(safe-area-inset-top, 0px)); }
.loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.loading::before { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--mint-ink); animation: spin .8s linear infinite; margin-bottom: 12px; display: block; justify-self: center; }
.loading { grid-template-rows: auto auto; align-content: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.oops { padding: 60px 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 560px; }
.oops h1 { font-family: var(--display); font-weight: 700; font-size: 2.25rem; line-height: 1.1; }
.oops p { color: var(--muted); }
.gate { padding: 48px 0; }
.gate .panel { max-width: 560px; }

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

/* ---------- plans and AI credits ---------- */
.note-test { font-size: .9375rem; color: var(--ink); background: var(--arc-soft); border-radius: 12px; padding: 8px 14px; width: fit-content; max-width: 100%; }
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.plan.pop { border-color: var(--mint-ink); box-shadow: 0 0 0 1px var(--mint-ink), var(--shadow-sm); }
.plan.mine { background: linear-gradient(180deg, var(--mint-soft), var(--card) 46%); }
.plan h2 { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; }
.plan-blurb { color: var(--muted); margin-top: -8px; }
.plan-flag { position: absolute; top: -12px; left: 22px; background: var(--mint); color: var(--on-mint); font-size: .75rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-family: var(--display); font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--muted); font-weight: 600; }
.ticks { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ticks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.ticks svg { width: 20px; height: 20px; color: var(--mint-ink); margin-top: 2px; }
.costs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.costs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.costs li:first-child { border-top: 0; padding-top: 4px; }
.costs li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.costs small { color: var(--muted); font-size: .8125rem; }
.costs .amt, .purchases .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.purchases .amt.up { color: var(--mint-ink); }
.plain-list { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.plan-strip { display: grid; gap: 14px 24px; grid-template-columns: minmax(0, 1fr); align-items: center; margin-top: 18px; padding: 18px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
@media (min-width: 720px) { .plan-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; } }
.plan-strip > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-strip .row { flex-direction: row; }
.plan-strip b { font-family: var(--display); font-size: 1.375rem; line-height: 1.2; }
.plan-strip small { color: var(--muted); font-size: .8125rem; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.credit-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.credit-chip svg { width: 16px; height: 16px; color: var(--mint-ink); }
.credit-chip:hover { border-color: var(--line-strong); }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .stats.two { grid-template-columns: minmax(0, 1fr); } }
.stat b.neg, .table b.neg { color: var(--danger); }
.small-note { font-size: .875rem; margin-top: 10px; }
.plan-box { display: flex; flex-direction: column; gap: 20px; }
.plan-box > .form { border-top: 1px solid var(--line); padding-top: 18px; gap: 10px; }

/* ---------- content guidelines ---------- */
.guide-short { margin-top: 18px; }
.guide-short .ticks { margin: 0; }

/* Bookshop: young readers / all ages / adult readers */
.seg.audience { margin: 4px 0 16px; }
@media (max-width: 480px) { .seg.audience { display: flex; } .seg.audience button { flex: 1 1 0; padding-inline: 8px; } }

/* ---------- For grown-ups: always the night reading room, whatever the theme ---------- */
.gu { --bg: #0C121D; --band: #101827; --card: #152033; --card-2: #1B2840; --line: #26344F; --line-strong: #3A4C70; --ink: #EEF2F8; --muted: #9AA8C0; --mint: #9EF0DE; --on-mint: #05261F; --mint-ink: #9EF0DE; --mint-soft: rgba(158, 240, 222, .13); --arc: #7097FF; --on-arc: #0B1530; --arc-soft: rgba(112, 151, 255, .16); --sun: #FFC94A; --sun-soft: #3D331A; --danger: #FF8C77; --danger-soft: rgba(255, 140, 119, .13); --ok: #7EE0A8; --ledge: #1E2B44; --ledge-edge: #34466B; --shadow: 0 18px 44px rgba(0, 0, 0, .45); --shadow-sm: 0 6px 18px rgba(0, 0, 0, .35); color-scheme: dark; background: var(--bg); color: var(--ink); padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); margin-bottom: calc(-96px - env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) { .gu { padding-bottom: 80px; margin-bottom: -56px; } }
.gu .muted, .gu .sec-head p { color: var(--muted); }
.gu-hero { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 24px; align-items: center; }
@media (min-width: 900px) { .gu-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; padding-top: 72px; } }
.gu-copy { display: flex; flex-direction: column; gap: 14px; }
.gu-copy h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -.02em; }
.gu-copy h1 em { font-style: italic; font-weight: 500; color: var(--arc); }
.gu-copy p { color: var(--muted); font-size: 1.125rem; max-width: 46ch; }
.gu-feat { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); align-items: center; }
@media (min-width: 560px) { .gu-feat { grid-template-columns: 190px minmax(0, 1fr); padding: 24px; } }
.gu-feat .cover { box-shadow: var(--shadow); }
.gu-feat-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gu-feat-info h2 { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; }
.gu-feat-info .sub { color: var(--muted); font-style: italic; }
.gu-feat-info .by { color: var(--muted); font-size: .9375rem; }
.gu-feat-info .blurb { font-family: var(--display); font-style: italic; margin: 4px 0 6px; }
.gu-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .gu-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gu-steps li { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--band); display: flex; flex-direction: column; gap: 6px; }
.gu-steps span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--arc-soft); color: var(--arc); }
.gu-steps span svg { width: 22px; height: 22px; }
.gu-steps b { font-size: 1.0625rem; }
.gu-steps p { color: var(--muted); }
.gu-taste { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); padding: 24px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--card); }
@media (min-width: 900px) { .gu-taste { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); padding: 32px; } }
.gu-taste h2 { font-family: var(--display); font-size: 1.75rem; margin: 6px 0; }
.gu-ferry { display: flex; flex-direction: column; gap: 14px; }
.gu-ferry-text { font-family: var(--display); font-size: 1.1875rem; line-height: 1.6; }
.gu-ferry-choices { display: flex; flex-direction: column; gap: 8px; }
.gu-ferry-choices .btn { justify-content: flex-start; white-space: normal; text-align: left; min-height: 48px; border-radius: 14px; }
.gu-ferry-choices .btn svg { width: 18px; height: 18px; color: var(--arc); flex: none; }
.gu-found { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--mint-soft); color: var(--mint-ink); }
.gu-found span { color: var(--ink); font-size: .9375rem; }
.gu-genres { margin-bottom: 18px; }
.gu-genres .chip { text-decoration: none; }
.gu-writers { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; padding: 28px; border-radius: var(--radius); background: linear-gradient(120deg, var(--arc-soft), transparent 70%), var(--band); border: 1px solid var(--line); }
.gu-writers > div:first-child { max-width: 60ch; display: flex; flex-direction: column; gap: 8px; }
.gu-writers h2 { font-family: var(--display); font-size: 1.75rem; line-height: 1.15; }
.gu-writers p { color: var(--muted); }
.gu-trust { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .9375rem; }
.gu-trust svg { width: 20px; height: 20px; flex: none; color: var(--mint-ink); margin-top: 1px; }
.gu-trust a { color: var(--ink); }
/* the door to it from the visitors' home page */
.gu-door { display: flex; flex-direction: column; gap: 6px; padding: 26px 28px; border-radius: var(--radius); text-decoration: none; color: #EEF2F8; background: radial-gradient(120% 140% at 100% 0%, rgba(112, 151, 255, .28), transparent 60%), #0C121D; border: 1px solid #26344F; }
.gu-door .eyebrow { color: #9AA8C0; }
.gu-door b { font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.15; }
.gu-door span { color: #C5CEDD; max-width: 60ch; }
.gu-door .go { color: #9EF0DE; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.gu-door .go svg { width: 18px; height: 18px; }
.gu-door:hover { border-color: #3A4C70; }

/* Frosted back plate, so dark covers stand out on the dark page */
.gu-hero { position: relative; }
.gu-hero::before { content: ""; position: absolute; right: 4%; top: 18%; width: min(560px, 70vw); height: 70%; background: radial-gradient(closest-side, rgba(112, 151, 255, .30), rgba(158, 240, 222, .10) 60%, transparent); filter: blur(24px); pointer-events: none; }
.gu-feat { position: relative; background: linear-gradient(140deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, .09)); border: 1px solid rgba(255, 255, 255, .20); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 24px 60px rgba(0, 0, 0, .40); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.gu-cover { display: block; padding: 10px; border-radius: 14px; background: linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08)); border: 1px solid rgba(255, 255, 255, .24); box-shadow: 0 0 44px rgba(127, 184, 255, .28); }
.gu-cover .cover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 26px rgba(0, 0, 0, .55); }
/* the same idea on the grown-ups shelves */
.gu .shelf .stand { border-radius: 12px; padding: 10px; background: linear-gradient(160deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, .07)); border: 1px solid rgba(255, 255, 255, .20); box-shadow: 0 0 34px rgba(127, 184, 255, .18); }
.gu .shelf .cover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 22px rgba(0, 0, 0, .5); }
.gu-hero::before { z-index: 0; }
.gu-copy, .gu-feat { position: relative; z-index: 1; }

/* ---------- languages ---------- */
.lang-btn { width: auto; border-radius: 999px; padding: 0 12px 0 10px; display: inline-flex; gap: 5px; font-weight: 800; font-size: .8125rem; letter-spacing: .03em; }
.lang-btn svg { width: 18px; height: 18px; }
.foot-langs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.foot-langs svg { width: 16px; height: 16px; margin-right: 4px; }
.foot-langs button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: .875rem; padding: 6px 8px; border-radius: 8px; min-height: 36px; }
.foot-langs button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot-langs button:hover { color: var(--ink); }
.lang-tag { font-size: .6875rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.lang-note { width: fit-content; max-width: 100%; }
/* the reader's language menu */
.read-lang .btn { gap: 6px; padding: 0 12px; }
.read-lang .btn svg { width: 18px; height: 18px; }
.read-lang .menu-list { min-width: 220px; }
.read-lang .menu-list button { display: flex; flex-direction: column; gap: 1px; }
.read-lang .menu-list button small { color: var(--muted); font-weight: 600; font-size: .8125rem; }
.read-lang .menu-list button[aria-checked="true"] { background: var(--mint-soft); color: var(--mint-ink); }
@media (max-width: 520px) { .reader-top [data-act="hints"] { display: none; } }
/* the book editor's Languages panel */
.langs-panel { display: flex; flex-direction: column; gap: 14px; }
.lang-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lang-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.lang-list li > span { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.lang-list small { color: var(--muted); font-size: .8125rem; }
.tr-progress { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; color: var(--muted); }
.tr-progress .bar { display: block; height: 8px; border-radius: 999px; background: var(--card-2); overflow: hidden; border: 1px solid var(--line); }
.tr-progress .bar i { display: block; height: 100%; width: 0; background: var(--mint); transition: width .3s ease; }
/* reviewing a translation */
.tr-summary { color: var(--muted); font-weight: 600; }
.tr-summary[data-ready="true"] { color: var(--mint-ink); }
.tr-details { display: flex; flex-direction: column; gap: 14px; }
.tr-pages { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.tr-page { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px; border-radius: var(--radius, 18px); background: var(--card); border: 1px solid var(--line); }
.tr-page.empty { opacity: .7; }
.tr-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tr-side img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.tr-no { font-weight: 800; font-size: .875rem; color: var(--muted); }
.tr-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tr-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tr-orig, .tr-new { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-orig p { white-space: pre-line; padding: 10px 12px; border-radius: 10px; background: var(--card-2); color: var(--ink); line-height: 1.5; font-family: var(--display); }
.tr-new textarea { font-family: var(--display); line-height: 1.5; resize: vertical; }
.tr-pair.small .tr-orig p { font-family: inherit; font-weight: 600; padding: 8px 12px; }
.tr-obj { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tr-obj-name { font-size: .9375rem; }
.tr-warn { color: var(--danger); font-size: .8125rem; font-weight: 600; }
.tr-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.tr-state { font-size: .8125rem; font-weight: 700; color: var(--muted); }
.tr-state[data-state="ok"] { color: var(--mint-ink); }
.tr-state[data-state="ai"], .tr-state[data-state="stale"] { color: var(--ink); background: var(--sun-soft); padding: 3px 10px; border-radius: 999px; }
.tr-state[data-state="error"] { color: var(--danger); }
@media (max-width: 720px) {
  .tr-page { grid-template-columns: minmax(0, 1fr); }
  .tr-side { flex-direction: row; align-items: center; }
  .tr-side img { width: 96px; }
  .tr-pair { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* reading in two languages: the page gets a little smaller to make room for the second line */
.reader-page.both { max-width: min(1120px, calc((100svh - 300px) * 1.5)); }
.reader-page .bas-story-alt { font-size: clamp(1rem, 1.8vw, 1.25rem); line-height: 1.6; max-width: 52ch; margin: 0 auto; }
.tr-view .tr-details { margin-top: 18px; }
/* phones: the tabs at the bottom already have Sign in, so the header keeps room for the language switch */
@media (max-width: 480px) { .top .signin-link { display: none; } }
/* small phones: the theme switch lives in Settings, so the header fits the language switch and the account button */
@media (max-width: 400px) { .top [data-act="theme"] { display: none; } }
/* hidden labels inside a scrolling table stay inside it */
.table-wrap { position: relative; }
.tr-new textarea { overflow: hidden; min-height: 4.5em; }

/* the longer name on the smallest phones */
@media (max-width: 350px) { .top .word { font-size: 1.12rem; } }
