/* Game Manual: the "Printed manual" look (Bence, 2026-10-26): numbered chapters, paper and ink,
   serif text, Sora headings. Light is the tiles' cream, dark is ink green with amber. */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('fonts/sora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('fonts/sora-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/source-serif-4-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/source-serif-4-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/source-serif-4-latin-400-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/source-serif-4-latin-ext-400-italic.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/source-serif-4-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/playfair-latin.woff2') format('woff2'); }

:root {
  --bg: #f4ebd8; --panel: #fbf5e7; --slot: #ebdfc4; --pill: #e6d3a9; --line: #cdbb8e; --text: #2b2418; --muted: #6b5d45; --accent: #8a4b12; --side: #eee2c8;
  --pts: #a8461c; --mul: #0b6b6c; --fs: #6f3bb3;
  --r-common: #5f6670; --r-uncommon: #237a3b; --r-rare: #23609f; --r-epic: #8a3aa3; --r-legendary: #b04f0c;
  --k-modifier: #3f8a55; --k-upgrade: #8a5a2b; --k-gift: #b8365f; --k-balance: #0f7f80;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: 60px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17241f; --panel: #1f302a; --slot: #263a33; --pill: #34503f; --line: #4a6458; --text: #f4ebd8; --muted: #c2b79e; --accent: #f2b36b; --side: #132019;
  --pts: #f2a06e; --mul: #5ccfcf; --fs: #c49bff;
  --r-common: #a8aeb6; --r-uncommon: #5fd27a; --r-rare: #6bb4f5; --r-epic: #d38be6; --r-legendary: #ff9a52;
  --k-modifier: #4fa86a; --k-upgrade: #b07a44; --k-gift: #d4527c; --k-balance: #3fb6b0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--serif); }
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.85em; background: var(--slot); padding: 1px 5px; border-radius: 4px; }

/* ----- top bar ----- */
.top { position: sticky; top: 0; z-index: 10; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); background: var(--bg); border-bottom: 3px double var(--line); font-family: var(--sans); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.logo .name { font-weight: 700; font-size: 16px; white-space: nowrap; }
.logo .kind { color: var(--muted); font-weight: 500; }
.search { position: relative; flex: 1; min-width: 0; max-width: 520px; margin-left: auto; }
.search input { width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); font: 15px var(--sans); }
.search input::placeholder { color: var(--muted); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(420px, 70dvh); overflow: auto; background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22); display: grid; gap: 2px; }
.results[hidden] { display: none; }
.results a { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 7px; color: var(--text); font: 500 15px var(--sans); }
.results a:hover, .results a[aria-selected="true"] { background: var(--slot); }
.results small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.results p { margin: 8px 10px; color: var(--muted); font: 14px var(--sans); }
.icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; padding: 0; }
.icon-btn svg { width: 19px; height: 19px; }
:root[data-theme="dark"] #theme svg:first-child, :root:not([data-theme="dark"]) #theme svg:last-child { display: none; }
.menu-btn { display: none; }

/* ----- chapters and page ----- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; }
.chapters { position: sticky; top: var(--top); align-self: start; height: calc(100dvh - var(--top)); overflow: auto; padding: 22px 12px 32px; display: grid; align-content: start; gap: 2px; font-family: var(--sans); }
.chapters a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 15px; }
.chapters a:hover { color: var(--text); }
.chapters a[aria-current="page"] { background: var(--pill); color: var(--text); font-weight: 700; }
.chapters .ch { width: 18px; text-align: right; font-size: 12px; font-weight: 600; flex: none; }
.chapters svg { display: none; width: 18px; height: 18px; flex: none; color: var(--accent); }
main { min-width: 0; padding: 26px max(16px, env(safe-area-inset-right)) 40px 36px; }
.page { max-width: 760px; }
.page > * { margin-top: 0; }
.crumbs { margin: 0 0 6px; font: 13px var(--sans); color: var(--muted); }
.kicker { margin: 0 0 4px; font: 700 12px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.stamp { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; font: 12px var(--sans); color: var(--muted); }
.stamp span { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
h1 { font: 800 clamp(28px, 5vw, 38px)/1.15 var(--sans); letter-spacing: -0.01em; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 3px double var(--line); text-wrap: balance; }
h2 { font: 700 15px/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 30px 0 10px; }
h3 { font: 700 17px var(--sans); margin: 22px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.quiet { color: var(--muted); font-size: 15px; }
.term { color: inherit; font-weight: inherit; border-bottom: 1.5px dotted var(--accent); }
.term:hover { color: var(--accent); }
.note { margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 8px 8px 0; }
.pts { color: var(--pts); font-weight: 700; font-variant-numeric: tabular-nums; }
.pick { display: inline-block; min-width: 1.1em; text-align: center; border-bottom: 2px solid currentColor; font-weight: 700; }
.foot { max-width: 760px; margin-top: 40px; padding-top: 14px; border-top: 3px double var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font: 13px var(--sans); color: var(--muted); }

/* ----- tables ----- */
.table { overflow-x: auto; margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; color: var(--text); }
th { text-align: left; font: 700 11.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--line); vertical-align: bottom; }
td.pts { white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 600; }
tbody tr:target { background: var(--pill); }
.by-difficulty { margin: 0; padding-left: 18px; }

/* ----- start page boxes ----- */
.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; }
.box { display: grid; grid-template-columns: 42px 1fr; gap: 2px 12px; align-items: start; padding: 14px; border: 3px double var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: 14px/1.45 var(--sans); }
.box:hover { border-color: var(--accent); color: var(--text); }
.box .ic { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; }
.box .ic svg { width: 22px; height: 22px; }
.box strong { font-size: 16px; }
.box span:last-child { color: var(--muted); font-weight: 400; }

/* ----- perk cards: green modifiers, brown upgrades, pink gifts, like the game ----- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; font-family: var(--sans); }
.chips button { font: 600 13px var(--sans); padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; min-height: 34px; }
.chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--pill); color: var(--text); }
.count { font: 13px var(--sans); color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 16px; }
.card { --k: var(--k-modifier); display: grid; gap: 4px; align-content: start; padding: 11px 13px; border: 2px solid var(--k); border-radius: 10px; background: var(--panel); color: var(--text); font: 400 13.5px/1.4 var(--sans); min-height: 118px; }
.card.k-upgrade { --k: var(--k-upgrade); }
.card.k-gift { --k: var(--k-gift); }
a.card:hover { color: var(--text); box-shadow: 0 0 0 2px var(--k); }
.card[hidden] { display: none; }
.card .rarity { font: 700 11px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.card strong { font-size: 15.5px; }
.card .text { color: var(--muted); }
.card.big { min-height: 0; }
.card.big .text { color: var(--text); font-size: 14.5px; }
.r-common { color: var(--r-common); } .r-uncommon { color: var(--r-uncommon); } .r-rare { color: var(--r-rare); } .r-epic { color: var(--r-epic); } .r-legendary { color: var(--r-legendary); }
.infobox { float: right; width: 290px; margin: 0 0 16px 24px; display: grid; gap: 10px; }
.infobox dl { margin: 0; border: 3px double var(--line); border-radius: 8px; background: var(--panel); font: 14px var(--sans); }
.infobox dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); }
.infobox dl div:first-child { border-top: 0; }
.infobox dt { color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 2px; }
.infobox dd { margin: 0; text-align: right; font-weight: 600; }
.page h2 { clear: none; }
#changes, #more { clear: both; }
.changes { padding-left: 18px; }
.changes .ver { font: 600 12.5px var(--sans); color: var(--muted); }

/* ----- list entries (tiles, gifts) ----- */
.entries { display: grid; gap: 10px; margin: 0 0 16px; }
.entry { display: grid; grid-template-columns: 58px 1fr; gap: 16px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.entry.gift { grid-template-columns: 1fr; border-left: 4px solid var(--k-gift); }
.entry:target { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.entry h2 { margin: 0 0 4px; font: 700 18px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.entry h2 .quiet, .entry h2 .rarity { font: 600 12px var(--sans); }
.entry h2 .rarity { letter-spacing: 0.06em; text-transform: uppercase; }
.entry p { margin: 0 0 6px; font-size: 16px; }
.entry p:last-child { margin-bottom: 0; }
.from-line { font: 13px var(--sans); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.from { font: 600 12.5px var(--sans); padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--k-gift); color: var(--text); }
.from.k-upgrade { border-color: var(--k-upgrade); }
.from.k-balance { border-color: var(--k-balance); }

/* ----- glossary ----- */
.glossary { margin: 0; display: grid; gap: 0; }
.glossary div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.glossary div:target { background: var(--pill); }
.glossary dt { font: 700 15.5px var(--sans); }
.glossary dd { margin: 0; }

/* ----- tiles, from the game (src/ui/styles.css) ----- */
.tile { --t: 54px; position: relative; display: inline-grid; place-items: center; width: var(--t); height: calc(var(--t) * 1.04); border-radius: calc(var(--t) * 0.17); border: 2px solid #cdbb8e; background: #f4ebd8; color: #17322b; box-shadow: 0 3px 0 #a8976b; font-family: var(--sans); flex: none; }
.tile .letter { font-weight: 500; font-size: calc(var(--t) * 0.48); line-height: 1; }
.tile .points { position: absolute; top: calc(var(--t) * 0.05); right: calc(var(--t) * 0.09); font-size: calc(var(--t) * 0.17); line-height: 1.2; }
.tile.special::after { position: absolute; bottom: 1px; left: 3px; font-size: calc(var(--t) * 0.16); line-height: 1; }
.tile.k-golden { background: linear-gradient(145deg, #ffe58a, #e6b422 60%, #f6d36b); border-color: #a77d00; color: #4a3500; }
.tile.k-golden::after { content: '×'; color: #6b4f00; font-weight: 800; }
.tile.k-spreader { background: radial-gradient(circle at 50% 50%, #f4ebd8 55%, #f1b38a 100%); border-color: #d0753a; }
.tile.k-spreader::after { content: '✣'; color: #c25a1c; }
.tile.k-dot .letter::after { content: ''; display: inline-block; width: 0.22em; height: 0.22em; margin-left: 0.04em; border-radius: 50%; background: #c23a3a; }
.tile.k-bold .letter::first-letter { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 1.24em; line-height: 0.8; color: #10261f; }
.tile.k-diamond { background: linear-gradient(145deg, #cfe6ff, #6aa7f0); border-color: #2c6cc4; color: #0e2f5c; }
.tile.k-diamond::after { content: '◆'; color: #1d4f99; }
.tile.k-emerald { background: linear-gradient(145deg, #c9f2d6, #4fbf7a); border-color: #1f8a4c; color: #0b3b20; }
.tile.k-emerald::after { content: '¼×4'; color: #0f5e31; font-weight: 700; }
.tile.k-bang { background: #f4ebd8; }
.tile.k-plus, .tile.k-comma, .tile.k-quote { background: #3b3355; border-color: #1c1730; color: #fff; }
.tile.u-midas { background: radial-gradient(circle at 30% 20%, #3a2c10, #120d04 70%); border: calc(var(--t) * 0.06) solid #d9a21f; box-shadow: inset 0 0 0 calc(var(--t) * 0.025) #6e4800, 0 3px 0 #6e4800, 0 0 12px rgba(230, 180, 34, 0.45); color: #f6d36b; }
.tile.u-midas .letter { font-weight: 800; background: linear-gradient(180deg, #fff1b8, #f2c437 45%, #b07a0c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile.u-midas::after { content: '♛'; position: absolute; top: 1px; left: 4px; font-size: calc(var(--t) * 0.18); line-height: 1; color: #f2c437; }
.tile.u-midas .points { color: #f2c437; font-weight: 700; }
.tile.u-phoenix { background: radial-gradient(circle at 50% 115%, #ffb347 0%, #e8541c 32%, #8e1414 70%, #3f0808); border-color: #2b0505; color: #fff1dc; box-shadow: 0 3px 0 #2b0505, 0 0 12px rgba(255, 90, 30, 0.45); }
.tile.u-phoenix .letter { font-weight: 700; text-shadow: 0 0 calc(var(--t) * 0.08) rgba(255, 170, 70, 0.9); }
.tile.u-phoenix .points { color: #ffd9a0; font-weight: 700; }
.tile.u-phoenix::after { content: '✹'; position: absolute; bottom: 1px; left: 4px; font-size: calc(var(--t) * 0.17); line-height: 1; color: #ffcf70; }
.tile.u-keystone { background: linear-gradient(160deg, #2e373b, #171d20); border-color: #f29e4c; color: #fde7cf; box-shadow: 0 3px 0 #0c1012, 0 0 10px rgba(242, 158, 76, 0.35); }
.tile.u-keystone::before { content: ''; position: absolute; left: 17%; right: 17%; top: 14%; bottom: 12%; border: calc(var(--t) * 0.035) solid #f29e4c; border-bottom: 0; border-radius: 50% 50% 0 0 / 38% 38% 0 0; box-shadow: 0 0 calc(var(--t) * 0.08) rgba(242, 158, 76, 0.7); }
.tile.u-keystone .letter { font-weight: 800; position: relative; top: calc(var(--t) * 0.04); }
.tile.u-keystone .points { color: #f29e4c; font-weight: 700; }
.tile.u-magnet { background: repeating-radial-gradient(ellipse at 50% 125%, transparent 0 calc(var(--t) * 0.12), rgba(200, 215, 235, 0.35) calc(var(--t) * 0.12) calc(var(--t) * 0.14)), linear-gradient(160deg, #1c3355, #0b1628); border-color: #a9bcd0; color: #eef4fb; box-shadow: 0 3px 0 #06101e, 0 0 10px rgba(169, 188, 208, 0.3); }
.tile.u-magnet .letter { font-weight: 800; text-shadow: 0 0 calc(var(--t) * 0.08) rgba(200, 220, 255, 0.8); }
.tile.u-magnet .points { color: #d6e2f0; font-weight: 700; }
.tile.u-magnet::after { content: '⋃'; position: absolute; bottom: 1px; left: 4px; font-size: calc(var(--t) * 0.17); line-height: 1; font-weight: 800; color: #e05a5a; }
.tile.logo-tile { --t: 30px; box-shadow: 0 2px 0 #a8976b; }
.logo-tile .letter { font-weight: 700; }

/* ----- phones ----- */
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: grid; }
  .logo .game { display: none; }
  .chapters { display: none; position: fixed; inset: var(--top) 0 0 0; height: auto; z-index: 9; background: var(--bg); padding: 12px 16px 32px; }
  .chapters.open { display: grid; }
  .chapters a { font-size: 17px; padding: 11px 12px; }
  .chapters .ch { display: none; }
  .chapters svg { display: block; }
  body.menu-open { overflow: hidden; }
  main { padding: 18px 16px 32px; }
  .infobox { float: none; width: auto; margin: 0 0 16px; }
  .boxes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .box { grid-template-columns: 1fr; padding: 12px; }
  .box .ic { grid-row: auto; margin-bottom: 6px; }
  .glossary div { grid-template-columns: 1fr; gap: 2px; }
  .entry { grid-template-columns: 48px 1fr; gap: 12px; padding: 12px; }
  .tile { --t: 46px; }
    table { font-size: 14.5px; }
  th, td { padding: 7px 6px; }
}

/* ----- offline copy ----- */
.offline-row { display: none; }
.offline-panel { position: fixed; z-index: 12; top: calc(var(--top) + 8px); right: max(16px, env(safe-area-inset-right)); width: min(340px, calc(100vw - 32px)); padding: 16px 18px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22); font: 15px/1.45 var(--sans); display: grid; gap: 10px; }
.offline-panel[hidden] { display: none; }
.offline-panel h3 { margin: 0; font: 700 13px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.offline-panel p { margin: 0; }
.offline-panel .quiet { color: var(--muted); font-size: 13.5px; }
.offline-panel .act { min-height: 42px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: 600 15px var(--sans); cursor: pointer; }
.offline-panel .act.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.offline-panel .act:disabled { opacity: 0.6; cursor: default; }
.offline-panel .act.danger { color: #b3412f; border-color: color-mix(in srgb, #b3412f 50%, var(--line)); }
:root[data-theme="dark"] .offline-panel .act.danger { color: #f0907c; }
.offline-panel .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.offline-panel .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.offline-panel .bar, .offline-strip .bar { display: block; height: 8px; border-radius: 4px; background: var(--slot); overflow: hidden; }
.offline-panel .bar i, .offline-strip .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.offline-strip { position: fixed; z-index: 11; top: var(--top); left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); background: var(--panel); border-bottom: 1.5px solid var(--line); font: 600 13.5px var(--sans); color: var(--muted); }
.offline-strip[hidden] { display: none; }
.offline-strip .bar { flex: 0 0 min(220px, 35%); }
.offline-strip.done .bar { display: none; }
@media (max-width: 760px) {
  .offline-btn { display: none; }
  .offline-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: 500 17px var(--sans); cursor: pointer; }
  .offline-row svg { display: block; width: 18px; height: 18px; color: var(--accent); }
  .offline-panel { left: 16px; right: 16px; width: auto; }
}
.offline-panel .head { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px -2px 0; }
.offline-panel .close { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.offline-panel .close:hover { background: var(--slot); color: var(--text); }
