:root {
  --paper: #f4ead2;
  --paper-deep: #e8d8b7;
  --paper-light: #fff9e9;
  --ink: #2b2118;
  --ink-soft: #6f604c;
  --rule: #bda982;
  --red: #8f3028;
  --red-deep: #6f211c;
  --green: #425f42;
  --shadow: 0 18px 45px rgba(56, 39, 22, .12);
  --serif: Georgia, "Times New Roman", Times, serif;
  --book: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #d9c8a8; color: var(--ink); }
body { margin: 0; min-height: 100vh; font-family: var(--book); background:
  radial-gradient(circle at 15% 10%, rgba(255,255,255,.28), transparent 28rem),
  linear-gradient(90deg, rgba(91,66,37,.045) 1px, transparent 1px),
  var(--paper); background-size: auto, 28px 28px, auto; }
.paper-grain { position: fixed; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply; background-image:
  repeating-radial-gradient(circle at 20% 30%, rgba(58,38,18,.16) 0 1px, transparent 1px 5px); background-size: 43px 37px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.shell { position: relative; z-index: 1; width: min(100%, 980px); margin: 0 auto; padding: 18px 14px calc(44px + env(safe-area-inset-bottom)); }
.brand-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 44px; height: 44px; display: block; flex: 0 0 auto; border: 1px solid rgba(91,66,37,.32); border-radius: 50%; object-fit: contain; object-position: 50% 35%; padding: 2px; background: rgba(255,249,233,.22); box-shadow: 0 2px 8px rgba(56,39,22,.08); }
.brand b { display: block; font-size: 20px; line-height: 1; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 4px; color: var(--ink-soft); font-family: var(--ui); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.manuscript { position: relative; padding: 34px 24px; border: 1px solid rgba(90,61,31,.42); background: rgba(255,249,233,.56); box-shadow: inset 0 0 0 4px rgba(244,234,210,.9), inset 0 0 0 5px rgba(90,61,31,.13), var(--shadow); }
 .hero { overflow: hidden; }
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.hero h1 { margin-bottom: 5px; }
.hero-tagline { margin: 0 0 14px; color: var(--red); font-family: var(--book); font-size: clamp(22px, 6vw, 33px); font-style: italic; font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
.hero-art-wrap { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; min-width: 0; margin: 18px -8px -16px; }
.hero-art { display: block; width: min(100%, 430px); height: auto; max-height: 315px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 12px rgba(56,39,22,.08)); }
.manuscript::before, .manuscript::after { content: ""; position: absolute; left: 18px; right: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--rule), transparent); }
.manuscript::before { top: 17px; } .manuscript::after { bottom: 17px; }
.manuscript.compact { padding: 25px 20px; display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 16px; }
.manuscript.compact > * { min-width: 0; }
.room-title-line { min-width: 0; }
.room-title-line h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.room-code-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ornament { color: var(--red); font-size: 28px; margin-bottom: 14px; }
.kicker, .folio-no, .setting-label, .credits span, .section-banner span, .clue-box span { margin: 0 0 8px; color: var(--red); font-family: var(--ui); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-family: var(--serif); font-size: clamp(38px, 11vw, 68px); line-height: .96; font-weight: 700; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-family: var(--serif); font-size: 29px; line-height: 1.05; letter-spacing: -.025em; }
.lead { max-width: 36rem; margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.home-actions, .view-grid { display: grid; gap: 14px; margin-top: 14px; }
.folio-card { position: relative; padding: 22px; border: 1px solid rgba(91,66,37,.22); background: rgba(255,249,233,.78); box-shadow: 0 10px 30px rgba(69,46,24,.07); }
.folio-no { display: inline-block; margin-bottom: 18px; }
.stack { display: grid; gap: 13px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field > span { color: var(--ink-soft); font-family: var(--ui); font-size: 11px; font-weight: 750; letter-spacing: .05em; }
input, textarea { width: 100%; border: 1px solid var(--rule); border-radius: 0; background: rgba(255,252,243,.72); color: var(--ink); outline: none; padding: 14px 15px; font-family: var(--book); font-size: 17px; line-height: 1.45; box-shadow: inset 0 -1px 0 rgba(68,43,20,.08); }
textarea { min-height: 106px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(143,48,40,.1); }
.code-input { text-transform: uppercase; letter-spacing: .25em; font-family: var(--ui); font-weight: 850; }
.primary, .secondary, .ghost, .ready-button { min-height: 51px; border: 1px solid transparent; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-family: var(--ui); font-size: 14px; font-weight: 850; }
.primary { background: var(--red); color: #fff9ed; border-color: var(--red-deep); box-shadow: inset 0 1px rgba(255,255,255,.2); }
.primary:disabled { opacity: .38; cursor: not-allowed; }
.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.ghost { background: transparent; color: var(--ink-soft); border-color: var(--rule); }
.seal-button { min-width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--red); background: rgba(255,249,233,.6); color: var(--red); font-family: var(--ui); font-weight: 900; }
.recent { margin-top: 24px; }
.section-title { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-family: var(--ui); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.section-title::before, .section-title::after { content: ""; height: 1px; flex: 1; background: var(--rule); }
.recent-list { display: grid; gap: 8px; margin-top: 12px; }
.recent-item { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.recent-item b { font-family: var(--ui); letter-spacing: .14em; }.recent-item span { color: var(--ink-soft); }
.room-code-box { flex: 0 0 auto; min-width: 0; text-align: left; }
.room-code-box small { display: block; color: var(--ink-soft); font-family: var(--ui); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.room-code { margin-top: 4px; padding: 0; border: 0; background: transparent; color: var(--red); font-family: var(--ui); font-size: 22px; font-weight: 900; letter-spacing: .15em; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head .folio-no { margin-bottom: 6px; }
.counter, .host-badge { color: var(--red); font-family: var(--ui); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.players-list { margin: 18px 0; border-top: 1px solid var(--rule); }
.player-row { min-height: 54px; min-width: 0; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--rule); }
.player-row.offline { opacity: .5; }
.player-glyph { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; font-family: var(--ui); font-size: 11px; font-weight: 800; }
.player-row b, .player-row small { display: block; }.player-row small { margin-top: 3px; color: var(--ink-soft); font-family: var(--ui); font-size: 10px; }
.ready-button { width: 100%; background: transparent; border-color: var(--green); color: var(--green); }
.ready-button.active { background: var(--green); color: white; }
.microcopy { margin: 10px 0 0; color: var(--ink-soft); font-family: var(--ui); font-size: 11px; line-height: 1.45; }
.setting-group { margin-top: 22px; }
.setting-label { display: block; color: var(--ink-soft); }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--rule); }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented button { min-width: 0; min-height: 45px; padding: 5px 4px; border: 0; border-right: 1px solid var(--rule); background: transparent; color: var(--ink-soft); font-family: var(--ui); font-weight: 800; }
.segmented button:last-child { border-right: 0; }.segmented button.active { background: var(--ink); color: var(--paper-light); }
.locked { opacity: .62; pointer-events: none; }
.mode-grid, .song-presets { display: grid; gap: 8px; }
.mode-card, .song-presets button { min-width: 0; overflow-wrap: anywhere; text-align: left; min-height: 70px; padding: 12px 13px; border: 1px solid var(--rule); background: transparent; color: var(--ink); }
.mode-card b, .mode-card small, .song-presets b, .song-presets small { display: block; }.mode-card b, .song-presets b { font-family: var(--serif); font-size: 16px; }.mode-card small, .song-presets small { margin-top: 5px; color: var(--ink-soft); font-family: var(--ui); font-size: 10px; line-height: 1.35; }
.mode-card.active, .song-presets button.active { border-color: var(--red); box-shadow: inset 3px 0 var(--red); background: rgba(143,48,40,.045); }
.lobby-actions { display: grid; gap: 9px; margin-top: 24px; }
.writing-status { margin: 20px 4px 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }.writing-status h2 { margin: 0; }.progress-text { color: var(--red); font-family: var(--ui); font-weight: 900; }
.section-banner, .clue-box { margin: 10px 0; padding: 15px 17px; border: 1px solid var(--rule); background: rgba(255,249,233,.55); }
.section-banner span, .section-banner b, .clue-box span, .clue-box strong { display: block; }.section-banner b, .clue-box strong { font-family: var(--serif); font-size: 25px; }.clue-box strong { overflow-wrap: anywhere; }.clue-box.required { border-color: var(--red); }
.writing-card { padding-top: 16px; }.verse-lines { min-height: 120px; margin-bottom: 18px; }.verse-line { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px dotted rgba(111,96,76,.42); }.verse-line span { padding-top: 4px; color: var(--rule); font-family: var(--ui); font-size: 10px; }.verse-line p { margin: 0; font-size: 18px; line-height: 1.5; }.inline-section { margin: 18px 0 5px; color: var(--red); font-family: var(--ui); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.empty-page { padding: 32px 10px; text-align: center; color: var(--ink-soft); font-style: italic; line-height: 1.5; }
.line-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--ink); }.waiting { min-height: 78px; display: flex; align-items: center; gap: 14px; padding: 14px; border-top: 1px solid var(--rule); }.waiting b, .waiting small { display: block; }.waiting small { margin-top: 4px; color: var(--ink-soft); font-family: var(--ui); font-size: 10px; }.ink-drop { color: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.result-manuscript { margin-top: 12px; }.result-text { margin: 28px 0; padding: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 21px; line-height: 1.55; }.result-text p { margin: 0 0 6px; }.result-text h3 { margin: 25px 0 10px; color: var(--red); font-family: var(--ui); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }.result-text h3:first-child { margin-top: 0; }.stanza-gap { height: 18px; }
.credits { margin-top: 20px; }.credits p { margin: 0; font-style: italic; color: var(--ink-soft); }.reaction-row { margin-top: 24px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 12px; }.like-button { min-width: 78px; height: 46px; border: 1px solid var(--red); background: transparent; color: var(--red); font-family: var(--ui); font-size: 18px; font-weight: 900; }.like-button.active { background: var(--red); color: white; }.save-state { color: var(--ink-soft); font-family: var(--ui); font-size: 10px; text-align: right; }.result-actions { display: grid; gap: 9px; margin-top: 12px; }
.tiny-button, .tiny-link { border: 0; background: transparent; color: var(--ink-soft); font-family: var(--ui); font-size: 10px; text-decoration: underline; padding: 6px; }.tiny-button.danger { color: var(--red); }
dialog { width: calc(100% - 20px); max-width: 760px; max-height: calc(100dvh - 20px); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 18px; box-shadow: 0 28px 100px rgba(43,33,24,.35); } dialog::backdrop { background: rgba(43,33,24,.55); backdrop-filter: blur(2px); }.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }.dialog-head h2 { margin: 0; }.library-toolbar { display: flex; gap: 5px; padding: 12px 0; overflow-x: auto; }.library-toolbar button { white-space: nowrap; border: 1px solid var(--rule); background: transparent; padding: 8px 10px; color: var(--ink-soft); font-family: var(--ui); font-size: 10px; }.library-toolbar button.active { background: var(--ink); color: var(--paper); }.library-list { display: grid; gap: 10px; }.library-item { padding: 15px; border: 1px solid var(--rule); background: rgba(255,249,233,.55); }.library-item-head { display: flex; justify-content: space-between; gap: 10px; }.library-item-head b, .library-item-head small { display: block; }.library-item-head small, .library-item > small { color: var(--ink-soft); font-family: var(--ui); font-size: 9px; }.library-item p { margin: 12px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }.library-likes { color: var(--red); font-family: var(--ui); font-weight: 900; }.library-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 18px); width: calc(100% - 28px); max-width: 520px; padding: 13px 15px; background: var(--ink); color: var(--paper-light); font-family: var(--ui); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .shell { padding: 30px 24px 60px; }
  .home-actions, .view-grid { grid-template-columns: 1fr 1.25fr; gap: 18px; }
  .hero { padding: 52px 46px; }.folio-card { padding: 28px; }.mode-grid { grid-template-columns: 1fr 1fr; }.song-presets { grid-template-columns: 1fr 1fr; }.result-actions { grid-template-columns: 1.4fr 1fr 1fr; }.result-actions .ghost { grid-column: 1 / -1; }.line-form { grid-template-columns: 1fr auto; align-items: end; }.line-form .primary { min-width: 190px; }.manuscript.compact { padding: 30px 34px; }
}
.library-full { margin: 14px 0; padding: 14px 0; border-top: 1px dotted var(--rule); border-bottom: 1px dotted var(--rule); font-size: 17px; line-height: 1.45; }
.library-full p { margin: 0 0 5px; display: block; overflow: visible; }
.library-full h3 { margin: 18px 0 8px; color: var(--red); font-family: var(--ui); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }

/* Active-turn recovery controls */
.turn-control { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:4px; padding:12px 14px; border-top:1px dotted var(--rule); background:rgba(112,82,47,.035); }
.turn-clock { min-width:0; }
.turn-clock b, .turn-clock small { display:block; }
.turn-clock b { font-family:var(--ui); font-size:12px; letter-spacing:.08em; font-variant-numeric:tabular-nums; }
.turn-clock small { margin-top:3px; color:var(--ink-soft); font-family:var(--ui); font-size:9px; line-height:1.35; }
.tiny-action { min-height:38px; flex:0 0 auto; border:1px solid var(--rule); background:transparent; color:var(--red); padding:0 12px; font-family:var(--ui); font-size:10px; font-weight:850; }
.tiny-action:disabled { opacity:.42; color:var(--ink-soft); }
.host-game-tools { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin:10px 0 0; }
.host-game-tools .ghost { width:100%; }
.library-likes { appearance:none; border:0; background:transparent; padding:5px 2px; cursor:pointer; }
.library-likes.active { text-decoration:underline; text-underline-offset:3px; }

@media (min-width: 720px) {
  .host-game-tools .ghost { width:auto; }
}

/* v0.4 mobile/privacy UX */
.room-title-line { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.room-title-line h1 { flex:1 1 180px; min-width:0; }
.room-title-line .tiny-button { flex:0 0 auto; }
.room-code { max-width:100%; overflow-wrap:anywhere; }
.player-row > *, .card-head > *, .writing-status > *, .library-item-head > * { min-width:0; }
.player-row b, .player-row small, .library-item-head b, .library-item-head small { overflow-wrap:anywhere; }
.likes-by { grid-column:1 / -1; color:var(--ink-soft); font-family:var(--ui); font-size:10px; line-height:1.4; }
.liked-by { display:block; margin-top:4px; overflow-wrap:anywhere; }
.danger-action { color:var(--red); border-color:rgba(143,48,40,.55); }
textarea { max-width:100%; }
@media (min-width: 520px) {
  .manuscript.compact { flex-direction:row; align-items:flex-end; }
  .room-code-box { text-align:right; }
  .room-code-actions { justify-content:flex-end; }
}
.library-actions { flex-wrap: wrap; }
.recent-item > * { min-width: 0; overflow-wrap: anywhere; }

/* v0.5 compact clues, timer, dialogs and install UX */
.header-actions { display:flex; align-items:center; gap:8px; }
.clue-box { margin:6px 0; padding:8px 10px; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:baseline; gap:7px 10px; }
.clue-box span { margin:0; white-space:nowrap; font-size:9px; }
.clue-box strong { min-width:0; font-size:17px; line-height:1.25; overflow-wrap:anywhere; }
.clue-box:not(.required) strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.verse-lines { min-height:0; }
.blind-note { margin:2px 0 10px; color:var(--ink-soft); font-family:var(--ui); font-size:10px; font-style:italic; }
.select-field { display:grid; gap:7px; }
.select-field select { width:100%; min-height:46px; border:1px solid var(--rule); border-radius:0; background:rgba(255,249,233,.7); color:var(--ink); padding:0 12px; font-family:var(--ui); font-size:13px; }
.select-field select:disabled { opacity:.6; }
.turn-actions { display:flex; align-items:center; gap:7px; }
.turn-clock b.warning, #turnTimer.warning { color:var(--red); }
.work-title-line { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.work-title-line h1 { flex:1 1 210px; min-width:0; margin-bottom:0; overflow-wrap:anywhere; }
.small-dialog { max-width:480px; }
.dialog-copy { margin:18px 0; line-height:1.55; color:var(--ink-soft); }
.dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:16px; }
.dialog-actions > * { width:100%; }
.danger-fill { background:var(--red) !important; border-color:var(--red) !important; color:white !important; }
.library-item-head b { font-family:var(--serif); font-size:16px; }
@media (max-width: 420px) {
  .clue-box { grid-template-columns:1fr; gap:2px; }
  .clue-box span { white-space:normal; }
  .clue-box strong { font-size:16px; }
  .turn-control { align-items:flex-start; }
  .turn-actions { flex-direction:column; align-items:stretch; }
  .turn-actions .tiny-action { min-height:34px; }
}

/* v0.6 Battle + waiting toy */
.mode-card.battle-mode { border-color: rgba(143,48,40,.5); background: rgba(143,48,40,.025); }
.battle-panel { margin: 8px 0 10px; padding: 12px 14px; border: 1px solid rgba(143,48,40,.45); background: rgba(255,249,233,.62); }
.battle-stage { display:grid; gap:3px; }
.battle-stage span { color:var(--red); font-family:var(--ui); font-size:9px; font-weight:850; letter-spacing:.14em; text-transform:uppercase; }
.battle-stage b { font-family:var(--serif); font-size:19px; line-height:1.2; }
.battle-stage small { color:var(--ink-soft); font-family:var(--ui); font-size:10px; line-height:1.35; }
.battle-candidates { display:grid; gap:8px; margin-top:12px; }
.battle-candidate { width:100%; min-width:0; display:grid; grid-template-columns:28px minmax(0,1fr); gap:2px 9px; text-align:left; padding:11px 12px; border:1px solid var(--rule); background:rgba(255,252,243,.72); color:var(--ink); }
.battle-candidate span { grid-row:1 / span 2; align-self:start; color:var(--red); font-family:var(--ui); font-size:10px; font-weight:900; }
.battle-candidate b { min-width:0; font-family:var(--book); font-size:16px; line-height:1.35; overflow-wrap:anywhere; }
.battle-candidate small { color:var(--ink-soft); font-family:var(--ui); font-size:9px; }
.battle-candidate:not(:disabled):active { transform:translateY(1px); }
.battle-candidate.mine { opacity:.54; border-style:dashed; }
.waiting { flex-wrap:wrap; }
.waiting-copy { min-width:0; flex:1 1 170px; }
.waiting-toy { flex:1 1 100%; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:5px 10px; padding-top:9px; border-top:1px dotted var(--rule); }
.ink-tap { min-height:42px; border:1px solid var(--rule); background:transparent; color:var(--ink); font-family:var(--ui); font-size:10px; font-weight:850; letter-spacing:.03em; }
.waiting-toy > small { margin:0; text-align:right; font-variant-numeric:tabular-nums; }
.ink-reward { grid-column:1 / -1; padding:8px 10px; border:1px double var(--red); color:var(--red); text-align:center; font-size:12px; }
.tap-pop { animation:tapPop .18s ease-out; }
@keyframes tapPop { 50% { transform:scale(.97); background:rgba(143,48,40,.08); } }
.battle-ranking { margin-top:22px; padding-top:16px; border-top:1px solid var(--rule); }
.battle-rank-row { display:grid; grid-template-columns:26px minmax(0,1fr) auto; gap:8px; align-items:baseline; padding:8px 0; border-bottom:1px dotted var(--rule); }
.battle-rank-row span { color:var(--red); font-family:var(--ui); font-size:10px; font-weight:900; }
.battle-rank-row b { min-width:0; overflow-wrap:anywhere; }
.battle-rank-row small { color:var(--ink-soft); font-family:var(--ui); font-size:9px; text-align:right; }
.chief-rhymester { margin:14px 0 0; color:var(--red); font-family:var(--serif); font-size:19px; font-weight:700; }
@media (max-width:420px) {
  .battle-rank-row { grid-template-columns:24px minmax(0,1fr); }
  .battle-rank-row small { grid-column:2; text-align:left; }
}

.mode-divider { grid-column:1 / -1; margin-top:8px; color:var(--red); font-family:var(--ui); font-size:9px; font-weight:850; letter-spacing:.14em; text-transform:uppercase; }
.battle-mode { grid-column:1 / -1; }

@media (min-width: 760px) {
  .hero.manuscript { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); align-items: center; gap: 18px; padding: 38px 28px; min-height: 390px; }
  .hero .ornament { margin-bottom: 12px; }
  .hero h1 { font-size: clamp(54px, 6.2vw, 72px); }
  .hero-tagline { font-size: 31px; margin-bottom: 17px; }
  .hero-art-wrap { align-self: stretch; justify-content: flex-end; margin: -14px -20px -20px 0; }
  .hero-art { width: min(100%, 500px); max-height: 355px; align-self: end; object-position: right bottom; }
}
@media (min-width: 960px) {
  .hero.manuscript { grid-template-columns: minmax(0, 1fr) minmax(390px, .95fr); gap: 8px; }
  .hero-art { width: 520px; max-width: 100%; max-height: 370px; }
}
