:root {
  --bg: #121014;
  --bg-2: #1a171d;
  --card: #211d25;
  --line: #342e3a;
  --text: #ece6ef;
  --muted: #a99fb0;
  --accent: #d4a373;
  --accent-2: #b5485d;
  --ok: #6fbf8e;
  --warn: #e0b04a;
  --err: #e06a6a;
  --radius: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: 1.45rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }

/* header */
.top { border-bottom: 1px solid var(--line); background: rgba(18,16,20,.92); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.35rem; color: var(--text); letter-spacing: .02em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.on { color: var(--text); text-decoration: none; }
.spacer { flex: 1; }
.search input { width: 180px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.pill.gold { border-color: var(--accent); color: var(--accent); }
.pill.free { border-color: var(--ok); color: var(--ok); }
.pill.owned { border-color: var(--ok); color: var(--ok); }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--text); }

main { padding: 28px 0 60px; min-height: 70vh; }
footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .875rem; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }

/* flash */
.flash { background: #2a2330; border: 1px solid var(--accent); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 20px; }
.error { background: #2f1b1f; border: 1px solid var(--err); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; padding: 10px 18px; border-radius: 10px;
       border: 1px solid var(--accent); background: var(--accent); color: #1b1410; font-weight: 600; cursor: pointer; font-size: .95rem; text-decoration: none; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.red { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input, textarea, select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; max-width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { width: 100%; min-height: 110px; }
label { display: block; margin: 0 0 14px; }
label > span { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
label.check { display: flex; gap: 8px; align-items: flex-start; }
label.check input { margin-top: 4px; }
.form { max-width: 440px; }
.form input:not([type=checkbox]):not([type=radio]) { width: 100%; }
.hp { position: absolute; left: -9999px; }

/* cards */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.card:hover { text-decoration: none; }
.card .cover { aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); position: relative; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .cover img { transform: scale(1.03); }
.card .cover .pill { position: absolute; top: 8px; left: 8px; background: rgba(18,16,20,.85); }
.card .t { font-family: var(--serif); font-size: 1.05rem; line-height: 1.25; }
.card .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; gap: 6px; }
.stars { color: var(--accent); letter-spacing: 1px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; margin-bottom: 18px; }
.hero p.lead { font-size: 1.1rem; color: var(--muted); }
.hero .covers { display: flex; gap: 12px; justify-content: flex-end; }
.hero .covers img { width: 31%; border-radius: 10px; border: 1px solid var(--line); aspect-ratio: 2/3; object-fit: cover; }
.hero .covers img:nth-child(2) { transform: translateY(18px); }

/* series rows */
.series-row { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; color: var(--text); }
.series-row img { border-radius: 8px; aspect-ratio: 2/3; object-fit: cover; }
.series-row:hover { text-decoration: none; border-color: var(--accent); }

/* book page */
.book { display: grid; grid-template-columns: 320px 1fr; gap: 36px; }
.book .cover img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.book .subtitle { color: var(--muted); font-style: italic; margin-top: -.3em; }
.book .tagline { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); }
.blurb p { white-space: pre-line; }
.buybox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.price { font-size: 1.6rem; font-weight: 700; }
.price s { color: var(--muted); font-weight: 400; font-size: 1rem; margin-left: 6px; }
.notes { font-size: .9rem; color: var(--muted); padding-left: 1.2em; }
.parts { list-style: none; padding: 0; margin: 0; }
.parts li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.parts li img { width: 46px; border-radius: 4px; aspect-ratio: 2/3; object-fit: cover; }
.parts li .grow { flex: 1; min-width: 0; }
.parts li.current { background: rgba(212,163,115,.06); }
.heat { color: var(--accent-2); letter-spacing: 2px; }

/* reviews */
.review { border-top: 1px solid var(--line); padding: 14px 0; }
.review .who { color: var(--muted); font-size: .85rem; }
.review p { white-space: pre-line; margin: 6px 0 0; }
.rate { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rate input { display: none; }
.rate label { font-size: 1.8rem; color: var(--line); cursor: pointer; margin: 0; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: var(--accent); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--muted); }
.tablewrap { overflow-x: auto; }

/* wallet */
.amounts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.amounts label { margin: 0; }
.amounts input { display: none; }
.amounts span { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text); font-size: 1rem; margin: 0; }
.amounts input:checked + span { border-color: var(--accent); background: rgba(212,163,115,.12); color: var(--accent); }
.balance { font-size: 2.2rem; font-weight: 700; }
.codes { font-family: ui-monospace, monospace; font-size: 1.1rem; columns: 2; background: var(--bg-2); padding: 16px 20px; border-radius: 10px; border: 1px dashed var(--accent); }

/* age gate */
.gate { max-width: 560px; margin: 8vh auto; text-align: center; }
.gate .panel { padding: 34px; }

/* filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chips a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .85rem; }
.chips a.on, .chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* progress */
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* admin */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-nav a { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.admin-nav a.on { border-color: var(--accent); color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
input.price-in { width: 80px; }
input.part-in { width: 60px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero .covers { justify-content: flex-start; }
  .book { grid-template-columns: 1fr; }
  .book .cover { max-width: 280px; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .series-row { grid-template-columns: 90px 1fr; gap: 14px; padding: 12px; }
  .search input { width: 130px; }
  .codes { columns: 1; }
}

/* reader */
body.reader { overflow: hidden; }
.reader-top { position: fixed; top: 0; left: 0; right: 0; height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 5; }
.reader-top .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); }
.reader-top button, .reader-top a.rbtn, .reader-top select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: .85rem; }
#viewer { position: fixed; top: 48px; bottom: 34px; left: 0; right: 0; }
.reader-bottom { position: fixed; bottom: 0; left: 0; right: 0; height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); background: var(--bg); }
.reader-bottom .bar { flex: 1; }
.tap { position: fixed; top: 48px; bottom: 34px; width: 18%; z-index: 4; cursor: pointer; }
.tap.left { left: 0; } .tap.right { right: 0; }
#toc { position: fixed; top: 48px; left: 0; bottom: 34px; width: min(340px, 90vw); background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; z-index: 6; padding: 12px; display: none; }
#toc.open { display: block; }
#toc a { display: block; padding: 7px 4px; color: var(--text); border-bottom: 1px solid var(--line); }
.reader-end { position: fixed; inset: 48px 0 34px 0; display: none; align-items: center; justify-content: center; background: rgba(18,16,20,.94); z-index: 7; text-align: center; padding: 16px; }
.reader-end.show { display: flex; }
.nav a.btn { color: #1b1410; }
.nav a.btn:hover { color: #1b1410; }
/* reader: one centred page */
#viewer { left: 50%; right: auto; width: min(760px, 100vw); transform: translateX(-50%); }

/* ---- polish ---- */
button, .btn, input, select, textarea { font-family: inherit; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; }
label.check { align-items: center; }
label.check input { margin-top: 0; }
.btn { line-height: 1.2; }
.card .meta { justify-content: space-between; align-items: center; margin-top: auto; }
.card .price-tag { color: var(--text); font-weight: 600; }
.owned-tag { color: var(--ok); font-weight: 600; }
.free-tag { color: var(--ok); }
.card .t { min-height: 2.5em; }
td { vertical-align: middle; }
.btns > label { margin-bottom: 0; }
details summary { cursor: pointer; }
.buybox .price { line-height: 1; }

@media (max-width: 720px) {
  .top .wrap { gap: 6px 14px; padding-top: 8px; padding-bottom: 8px; }
  .brand { font-size: 1.2rem; }
  .top .spacer { display: none; }
  .user-nav { margin-left: auto; gap: 10px; font-size: .9rem; }
  .main-nav { order: 3; }
  .search { order: 4; flex: 1; min-width: 140px; }
  .search input { width: 100%; padding: 6px 10px; }
  .book .cover { max-width: 230px; margin: 0 auto; }
  main { padding-top: 18px; }
  h1 { font-size: 1.6rem; }
}
@media (max-width: 400px) {
  .user-nav a[href="/account"] { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* downloads row */
.downloads { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.lib-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 560px) { .parts li { flex-wrap: wrap; } .lib-actions { width: 100%; align-items: flex-start; } }

/* gallery: masonry columns, CSS-only lightbox (:target) */
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.gallery { columns: 3 280px; column-gap: 14px; }
.g-item { display: block; margin-bottom: 14px; break-inside: avoid; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.g-item img { width: 100%; transition: transform .2s; }
.g-item:hover img { transform: scale(1.02); }
.lightbox { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(8,7,9,.96); align-items: center; justify-content: center; flex-direction: column; padding: 12px; }
.lightbox:target { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 70px); object-fit: contain; border-radius: 6px; position: relative; z-index: 1; }
.lb-close { position: absolute; inset: 0; }
.lb-nav { position: relative; z-index: 1; display: flex; gap: 24px; justify-content: center; padding-top: 10px; }
.lb-nav a { color: var(--text); }

/* purchase dialog */
.dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.dialog::backdrop { background: rgba(8,7,9,.7); backdrop-filter: blur(2px); }
.dialog h2 { margin-top: 0; }
.dialog .bd-rows { margin: 12px 0 16px; }
.dialog .bd-rows td { padding: 6px 0; }
.dialog .bd-rows tr:first-child td { font-weight: 700; font-size: 1.1rem; }
.custom-amount { max-width: 220px; }
.custom-amount input { width: 100%; }

/* reader: side gutters turn pages on wide screens; on phones taps inside the page do */
.tap { width: max(0px, calc((100vw - 760px) / 2)); }
@media (max-width: 900px) { .tap { display: none; } }
.img-focus { position: fixed; inset: 0; z-index: 20; background: #08070a; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; gap: 10px; }
.img-focus[hidden] { display: none; }
.img-focus img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 6px; cursor: zoom-out; }
.if-bar { display: flex; gap: 18px; align-items: center; }

/* ---- sales ---- */
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--accent); margin-bottom: 10px; }
.perks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.perks li { padding-left: 22px; position: relative; color: var(--muted); }
.perks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.perks b { color: var(--text); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 10px; }
.steps > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #1b1410; font-weight: 700; margin-bottom: 8px; }
.steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0; }
.pill.hot { border-color: var(--accent-2); color: #f2b8c3; }
.pill.new { border-color: var(--accent); color: var(--accent); }
.pill s { color: var(--muted); margin-left: 4px; }
.series-deal { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.deal { margin: 0; color: var(--muted); }
.deal b { color: var(--text); }
.deal s { color: var(--muted); }
.teasers { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 6px 0 18px; }
.teaser-row { display: flex; gap: 8px; }
.teaser-row img { width: 64px; height: 96px; object-fit: cover; border-radius: 6px; }
.teaser-text { display: flex; flex-direction: column; gap: 4px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; max-width: 820px; }
.faq summary { font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--muted); }
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
  .teaser-row img { width: 52px; height: 78px; }
}

/* ---- admin analytics ---- */
:root { --chart: #c47a3c; }
.chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--chart); }
.chart .hit:hover .bar { fill: #d88a4a; }
.funnel { display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.f-row { display: grid; grid-template-columns: 220px 1fr 60px 140px; gap: 12px; align-items: center; }
.f-track { height: 14px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.f-bar { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; min-width: 2px; }
.f-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.f-rate { font-size: .85rem; }
@media (max-width: 720px) { .f-row { grid-template-columns: 1fr 50px; } .f-track, .f-rate { grid-column: 1 / -1; } }
.hero .covers a { width: 31%; display: block; }
.hero .covers a img { width: 100%; }
.hero .covers a:nth-child(2) { transform: translateY(18px); }
.hero .covers a:nth-child(2) img { transform: none; }
.minimums { margin-top: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.minimums ul { list-style: none; padding: 0; margin: 6px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 16px; }
.minimums li { display: flex; justify-content: space-between; font-size: .92rem; }
.minimums b { font-variant-numeric: tabular-nums; }

/* ---- wallet ---- */
.wallet { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; margin-bottom: 10px; }
.wallet-side { display: flex; flex-direction: column; gap: 16px; }
.balance-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 22px;
  border-radius: 16px; color: #fff3ea;
  background: radial-gradient(120% 140% at 100% 0%, rgba(212,163,115,.55) 0%, transparent 55%),
              linear-gradient(135deg, #5b2333 0%, #2a1a2c 60%, #1d1820 100%);
  border: 1px solid rgba(212,163,115,.35); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.balance-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%;
  border: 22px solid rgba(255,255,255,.04); }
.bc-label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.bc-amount { font-size: 2.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bc-sub { color: #f1d3b6; }
.bc-foot { margin-top: 10px; font-size: .78rem; opacity: .6; }
.pending .pending-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.pending .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(224,176,74,.15); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.how { margin: 0; padding: 0 0 0 1.2em; color: var(--muted); font-size: .92rem; display: flex; flex-direction: column; gap: 8px; }
.how b { color: var(--text); font-weight: 600; }
.topup h1 { font-size: 1.7rem; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 18px 0 10px; }
.step-title span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #1b1410; font-size: .8rem; }
.amounts span small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.amounts input:checked + span small { color: var(--accent); }
.amounts span { text-align: center; min-width: 92px; }
.amounts .custom-in { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.amounts .custom-in input { display: inline-block; width: 70px; border: 0; background: transparent; padding: 6px 0; color: var(--text); font-weight: 600; }
.amounts .custom-in:focus-within { border-color: var(--accent); }
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.coin { margin: 0; cursor: pointer; }
.coin input { position: absolute; opacity: 0; pointer-events: none; }
.coin-body { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg-2); transition: border-color .15s, background .15s, transform .15s; height: 100%; }
.coin:hover .coin-body { border-color: #57495f; transform: translateY(-1px); }
.coin input:checked + .coin-body { border-color: var(--accent); background: linear-gradient(180deg, rgba(212,163,115,.12), rgba(212,163,115,.04)); }
.coin input:focus-visible + .coin-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.coin-mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c);
  color: #fff; font-weight: 700; font-size: 1.15rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.coin-text { display: flex; flex-direction: column; min-width: 0; }
.coin-name { font-weight: 600; }
.coin-name em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 2px; }
.coin-meta { font-size: .8rem; color: var(--muted); }
.coin-badge { position: absolute; top: -9px; right: 10px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; padding: 2px 8px;
  border-radius: 999px; background: var(--accent); color: #1b1410; }
.coin-badge.alt { background: #2f2836; color: var(--accent); border: 1px solid var(--accent); }
.min-warn { margin: 14px 0 0; padding: 8px 12px; border-radius: 8px; background: #2f1b1f; border: 1px solid var(--err); font-size: .9rem; }
.pay-btn { margin-top: 18px; width: 100%; padding: 14px; font-size: 1.05rem; }
.pay-btn[disabled] { filter: grayscale(.6); }
.fine { margin-top: 12px; }
@media (max-width: 860px) { .wallet { grid-template-columns: 1fr; } .wallet-side { order: 2; } }
.coin-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.coin-tips > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(111,191,142,.10), rgba(111,191,142,.03)); border: 1px solid rgba(111,191,142,.35); }
.tip-k { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.tip-v { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.tip-v b { margin-left: auto; font-variant-numeric: tabular-nums; }
.mini-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: .78rem; font-weight: 700; }
@media (max-width: 560px) { .coin-tips { grid-template-columns: 1fr; } }
.amounts .custom-in input:focus, .amounts .custom-in input:focus-visible { outline: none; box-shadow: none; }
.amounts .custom-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,163,115,.18); color: var(--accent); }
.amounts .custom-in input::placeholder { color: var(--muted); font-weight: 500; }

/* ---- payment status ---- */
.status-card { max-width: 620px; margin: 0 auto; padding: 26px; }
.status-card h1 { font-size: 1.6rem; margin-top: 22px; }
.status-card .ref { margin-top: 22px; }
.stepper { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.stepper::before { content: ""; position: absolute; top: 15px; left: 16%; right: 16%; height: 2px; background: var(--line); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; text-align: center; }
.s-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--line); font-weight: 700; z-index: 1; }
.stepper li.done { color: var(--text); }
.stepper li.done .s-dot { background: var(--ok); border-color: var(--ok); color: #10241a; }
.stepper li.active { color: var(--text); }
.stepper li.active .s-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 5px rgba(212,163,115,.15); animation: pulse 1.6s infinite; }
.stepper.is-failed li .s-dot { border-color: var(--err); color: var(--err); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; animation: pulse 1.6s infinite; }
.receipt { max-width: 420px; margin: 4px 0 18px; }
.receipt td { padding: 6px 0; }
.receipt tr.total td { border-top: 1px solid var(--muted); border-bottom: 0; font-weight: 700; }

/* genre landing pages and the about page */
.genre-intro { max-width: 760px; color: var(--muted); font-size: 1.02rem; margin-bottom: 18px; }
.genre-intro p { margin: 0 0 .8em; }
.prose { max-width: 760px; }
.prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose .lead { font-size: 1.1rem; color: var(--muted); }
