@layer legacy {
/* kitabshu — ink & paper. One accent: hanko seal red, used like a stamp. */

:root {
  --paper: #F6F1E5; --paper-raised: #FCF8EE; --shelf: #EEE7D5; --shelf-deep: #E7DEC9;
  --ink: #1C1917; --muted: #6C6455; --faint: #9C9284;
  --line: #DCD2BB; --hairline: #E7DFCB;
  --seal: #B3402A; --seal-deep: #92321F; --seal-soft: #F1E0D6;
  --stamp-paper: #F6F1E5;
  --shadow: 0 1px 3px rgba(41, 33, 22, .08), 0 10px 28px rgba(41, 33, 22, .09);
  --shadow-lift: 0 4px 10px rgba(41, 33, 22, .12), 0 22px 48px rgba(41, 33, 22, .18);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  --display: "Fraunces", "Literata", "Iowan Old Style", Palatino, Georgia, "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", serif;
  --serif: "Literata", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", "Geeza Pro", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171310; --paper-raised: #201B14; --shelf: #1C1712; --shelf-deep: #262019;
    --ink: #EAE1CC; --muted: #A89C85; --faint: #746A58;
    --line: #38301F; --hairline: #2C2619;
    --seal: #D0603F; --seal-deep: #E07352; --seal-soft: #382018;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .4);
    --shadow-lift: 0 4px 10px rgba(0, 0, 0, .5), 0 22px 48px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--paper); background-image: var(--grain);
  color: var(--ink); margin: 0; line-height: 1.6;
  font-family: var(--serif); font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body.has-player { padding-bottom: 7.75rem; }
.sans, button, input, .chip, .eyebrow, nav { font-family: var(--sans); }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; font-family: var(--display); }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--seal) 55%, transparent); }
a:hover { color: var(--seal); text-decoration-color: var(--seal); }
button { cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--seal-soft); }

.eyebrow { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.eyebrow::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--seal); margin-right: .55rem; vertical-align: 1px; }

/* ---------- masthead ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1.4rem;
  padding: .7rem 1.4rem; background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.seal {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--seal); color: var(--stamp-paper); border-radius: 4px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", serif;
  font-size: 19px; font-weight: 600; transform: rotate(-3.5deg);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--stamp-paper) 70%, transparent), 0 1px 2px rgba(41, 33, 22, .25);
}
.brand-stack { display: flex; flex-direction: column; line-height: 1.15; }
.wordmark { font-family: var(--display); font-size: 1.4rem; font-weight: 600; letter-spacing: -.015em; }
.tagline { font-size: .68rem; color: var(--muted); font-style: italic; letter-spacing: .02em; }
.masthead-stats {
  margin: 0 auto; font-family: var(--serif); font-variant-caps: all-small-caps; letter-spacing: .1em;
  font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.masthead-stats b { color: var(--ink); font-weight: 600; }
.masthead-stats .s { color: var(--seal); padding: 0 .35rem; }
.topbar nav { margin-left: auto; display: flex; gap: 1.2rem; flex-shrink: 0; }
.topbar nav a { font-size: .76rem; color: var(--muted); text-decoration: none; letter-spacing: .03em; }
.topbar nav a:hover { color: var(--seal); }
@media (max-width: 980px) { .masthead-stats { display: none; } .topbar nav { margin-left: auto; } }
@media (max-width: 560px) { .tagline { display: none; } .topbar { gap: .9rem; } }

/* ---------- hero ---------- */
.hero { max-width: 68rem; margin: 0 auto; padding: 3.4rem 1.5rem 1.4rem; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.15rem); line-height: 1.12; font-weight: 620; letter-spacing: -.01em; }
.hero .rotator { color: var(--seal); border-bottom: 3px solid var(--seal); display: inline-block; min-width: 5.5ch; }
.hero p.lede { font-size: 1.02rem; color: var(--muted); max-width: 46rem; margin: 1.1rem 0 0; }
.hero p.lede b { color: var(--ink); font-variant-numeric: tabular-nums; }
.statusline { max-width: 68rem; margin: 0 auto; padding: .5rem 1.5rem 1.6rem; font-size: .72rem; color: var(--faint); }
.statusline b { color: var(--muted); font-weight: 600; }
.statusline .dot-live { color: var(--seal); } .statusline .dot-seed { color: var(--muted); }

/* ---------- browser section ---------- */
.browser-section { max-width: 74rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
.site-mode { display: flex; gap: .8rem; margin-bottom: 1.1rem; }
.site-mode button {
  flex: 1; max-width: 22rem; text-align: left; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper-raised); color: var(--muted); padding: .8rem 1.1rem;
  font-family: var(--display); font-size: 1rem; font-weight: 600; position: relative;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.site-mode button span { display: block; font-family: var(--sans); font-size: .68rem; font-weight: 500; color: var(--faint); margin-top: .2rem; letter-spacing: .02em; }
.site-mode button.on { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow); }
.site-mode button.on::before { content: ""; position: absolute; top: .7rem; right: .7rem; width: 8px; height: 8px; background: var(--seal); transform: rotate(-4deg); }
.site-mode button.on span { color: var(--muted); }

.browser { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper-raised); box-shadow: var(--shadow-lift); }

/* region ribbon — a card-catalog drawer */
.store-tabs {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: stretch; padding: .8rem .9rem;
  background: var(--shelf); border-bottom: 1px solid var(--line);
  box-shadow: inset 0 2px 6px rgba(41, 33, 22, .05);
}
.tab-group {
  display: flex; flex-direction: column; gap: .3rem; padding: .45rem .6rem .5rem;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper-raised); box-shadow: var(--shadow);
}
.tab-group .tg-name {
  font-family: var(--sans); font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); padding-bottom: .25rem; border-bottom: 1px solid var(--hairline);
}
.tab-group .tg-row { display: flex; flex-wrap: wrap; gap: .15rem; }
.store-tab { border: none; background: transparent; color: var(--ink); font-size: .72rem; font-weight: 600; padding: .3rem .55rem; border-radius: 3px; white-space: nowrap; }
.store-tab:hover { background: var(--shelf); }
.store-tab.on { background: var(--ink); color: var(--paper-raised); }
.store-tab.on::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--seal); margin-right: .45rem; transform: rotate(-4deg); vertical-align: 1px; }

.addr-bar { display: flex; align-items: center; gap: .65rem; padding: .55rem .9rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.addr-bar .navglyphs { color: var(--faint); font-size: .85rem; letter-spacing: .35em; user-select: none; }
.addr-url { flex: 1; min-width: 180px; font-family: var(--mono); font-size: .71rem; color: var(--muted); background: var(--shelf); border: 1px solid var(--hairline); border-radius: 999px; padding: .38rem .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-url .lock { display: inline-block; width: 8px; height: 6px; margin-right: .5rem; background: var(--faint); border-radius: 1.5px; position: relative; }
.addr-url .lock::before { content: ""; position: absolute; left: 1px; top: -4px; width: 6px; height: 4px; border: 1.5px solid var(--faint); border-bottom: none; border-radius: 3px 3px 0 0; box-sizing: border-box; }
.addr-url .addr-trans { color: var(--seal); }
.translate-btn { border: none; border-radius: 999px; padding: .45rem 1rem; font-size: .72rem; font-weight: 700; flex-shrink: 0; letter-spacing: .01em; }
.translate-btn.needs { background: var(--seal); color: var(--stamp-paper); animation: nudge 2.6s ease infinite; box-shadow: 0 1px 2px rgba(41, 33, 22, .3); }
.translate-btn.done { background: transparent; color: var(--muted); border: 1px solid var(--line); }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: scale(1.035); } }

.store-page { position: relative; min-height: 420px; }
.store-head { padding: 1.1rem 1.3rem 1rem; }
.store-head .sh-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.store-head .sh-logo { font-family: var(--display); font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
.store-head .sh-search { flex: 1; min-width: 170px; display: flex; }
.store-head .sh-search input {
  flex: 1; font-size: .78rem; padding: .48rem .95rem; border: none; border-radius: 3px 0 0 3px;
  background: rgba(252, 248, 238, .95); color: #33302A;
}
.store-head .sh-search input::placeholder { color: #8A8272; }
.store-head .sh-search button { border: none; border-radius: 0 3px 3px 0; background: rgba(20, 16, 12, .35); color: #F6F1E5; font-size: .8rem; font-weight: 700; padding: 0 .95rem; }
.store-head .sh-nav { display: flex; gap: 1.2rem; margin-top: .7rem; font-size: .72rem; opacity: .92; flex-wrap: wrap; }
.store-head .sh-note { margin-top: .6rem; font-size: .68rem; opacity: .85; }
.store-body { padding: .4rem 1.3rem 1.5rem; }

.sec-h {
  display: flex; align-items: baseline; gap: .6rem; font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 1.6rem 0 .75rem; border-bottom: 1px solid var(--hairline); margin-bottom: 1rem;
}
.sec-h .sec-n { color: var(--faint); font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.sec-h .sec-live { color: var(--seal); letter-spacing: .06em; }
.sec-h .sec-src { font-weight: 600; letter-spacing: .06em; color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: .05rem .4rem; text-transform: none; }

.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1rem; }
.prod {
  border: 1px solid var(--line); border-radius: 5px; background: var(--paper); background-image: var(--grain);
  padding: .9rem; display: flex; flex-direction: column; gap: .5rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.prod:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--faint); }
.prod .p-top { display: flex; gap: .85rem; }

/* covers — spine presence */
.p-cover, .si-cover, .ab-cover { position: relative; }
.p-cover::after, .si-cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, rgba(15, 10, 5, .28) 0, rgba(255, 252, 240, .14) 5%, rgba(15, 10, 5, .08) 8%, transparent 13%),
              linear-gradient(180deg, rgba(255, 252, 240, .10), transparent 12%);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, .07);
}
.prod .p-cover {
  width: 58px; height: 86px; border-radius: 2px 4px 4px 2px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--display); font-size: .66rem; font-weight: 600; line-height: 1.35; padding: .3rem;
  box-shadow: var(--shadow); overflow: hidden;
}
.p-cover:not(.has-art), .si-cover:not(.has-art) { text-shadow: 0 1px 1px rgba(15, 10, 5, .35); }
.has-art { padding: 0 !important; }
.has-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-broken { font-family: var(--display); opacity: .9; }
.cover-broken::before { content: "書"; font-size: 1.3rem; opacity: .4; }

.prod .p-title { font-weight: 600; font-size: .87rem; line-height: 1.35; }
.prod .p-author { font-size: .72rem; color: var(--muted); margin-top: .2rem; font-style: italic; }
.prod .p-badge { display: inline-block; font-family: var(--sans); font-size: .58rem; font-weight: 700; color: var(--seal); border: 1px solid currentColor; border-radius: 2px; padding: .08rem .35rem; margin-top: .35rem; letter-spacing: .04em; transform: rotate(-1.5deg); }
.prod .p-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.prod .p-price { font-weight: 700; font-size: .88rem; font-variant-numeric: tabular-nums; }
.bs-usd { display: inline-block; margin-left: .45rem; vertical-align: 1px; font-family: var(--sans); font-size: .6rem; font-weight: 700; background: var(--shelf); color: var(--muted); border: 1px solid var(--hairline); border-radius: 999px; padding: .12rem .5rem; cursor: help; font-variant-numeric: tabular-nums; }
.buy-mini { border: none; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: .7rem; font-weight: 700; padding: .45rem .75rem; white-space: nowrap; }
.buy-mini:hover { background: var(--seal); color: var(--stamp-paper); }
.buy-mini:disabled { background: transparent; color: var(--muted); cursor: default; border: 1px solid var(--line); }
.untrans { font-size: .58rem; color: var(--faint); font-style: italic; }
.p-foot .buy-mini { margin-left: auto; }

.more-row { display: flex; justify-content: center; padding: 1.1rem 0 .4rem; }
.load-more { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: .73rem; font-weight: 700; padding: .55rem 1.4rem; letter-spacing: .02em; }
.load-more:hover { border-color: var(--seal); color: var(--seal); }
.load-more:disabled { color: var(--faint); border-color: var(--hairline); }

.translating-veil { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: .6rem; align-items: center; justify-content: center; background: color-mix(in srgb, var(--paper-raised) 80%, transparent); backdrop-filter: blur(3px); font-family: var(--sans); font-size: .85rem; color: var(--muted); font-weight: 600; }
.translating-veil .spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--shelf-deep); border-top-color: var(--seal); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- listening room ---------- */
.audio-row { display: flex; gap: 1.05rem; overflow-x: auto; padding: .2rem .15rem 1.1rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ab-card { flex: 0 0 138px; background: none; border: none; padding: 0; text-align: left; color: inherit; font-family: var(--serif); scroll-snap-align: start; }
.ab-cover {
  width: 138px; height: 138px; border-radius: 4px; overflow: hidden; background: var(--shelf-deep);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; align-items: center; justify-content: center;
}
.ab-card:hover .ab-cover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ab-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: var(--seal);
  box-shadow: 0 2px 12px rgba(15, 10, 5, .4), inset 0 0 0 1.5px color-mix(in srgb, var(--stamp-paper) 65%, transparent);
  transition: transform .18s ease;
}
.ab-play::after { content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%); border-left: 12px solid var(--stamp-paper); border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent; }
.ab-card:hover .ab-play { transform: translate(-50%, -50%) scale(1.08); }
.ab-time { position: absolute; right: .35rem; bottom: .35rem; font-family: var(--sans); font-size: .6rem; font-weight: 700; color: #F6F1E5; background: rgba(15, 10, 5, .72); border-radius: 3px; padding: .13rem .42rem; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.ab-t { font-weight: 600; font-size: .78rem; line-height: 1.35; margin-top: .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ab-a { font-size: .68rem; color: var(--muted); font-style: italic; margin-top: .1rem; }

/* track list (inside reader overlay) */
.tracks { border-top: 1px solid var(--hairline); }
.track {
  display: flex; align-items: baseline; gap: 1rem; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--hairline);
  font-family: var(--serif); font-size: .92rem; color: var(--ink); padding: .7rem .35rem;
}
.track:hover { background: var(--shelf); }
.track .tr-n { font-variant-numeric: tabular-nums; color: var(--faint); font-size: .78rem; min-width: 2.2ch; }
.track .tr-t { flex: 1; min-width: 0; }
.track .tr-d { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .78rem; }
.track.playing { color: var(--seal); }
.track.playing .tr-n { color: var(--seal); }
.track.playing .tr-t { font-weight: 600; }
.reader.audio .mode-switch { display: none; }

/* ---------- my shelf ---------- */
.myshelf { margin-top: 1.8rem; }
.myshelf-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; min-height: 96px; align-items: flex-start; }
.myshelf-empty { font-size: .8rem; color: var(--faint); font-style: italic; padding: .8rem 0; }
.shelf-item { background: none; border: none; padding: 0; text-align: left; color: inherit; width: 132px; font-family: var(--serif); }
.shelf-item .si-cover { width: 64px; height: 94px; border-radius: 2px 4px 4px 2px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--display); font-size: .64rem; font-weight: 600; line-height: 1.35; padding: .3rem; transition: transform .2s ease, box-shadow .2s ease; overflow: hidden; }
.shelf-item:hover .si-cover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.shelf-item.just-added .si-cover { outline: 2px solid var(--seal); outline-offset: 2px; }
.shelf-item .si-t { font-size: .72rem; font-weight: 600; margin-top: .45rem; line-height: 1.3; }
.shelf-item .si-s { font-size: .62rem; color: var(--muted); font-style: italic; }

/* ---------- reader — the crown jewel ---------- */
.reader-overlay { position: fixed; inset: 0; z-index: 100; display: none; background: color-mix(in srgb, #14100B 55%, transparent); backdrop-filter: blur(2px); }
.reader-overlay.open { display: block; }
.reader {
  position: absolute; inset: 0; margin: 0 auto; max-width: 47rem; overflow-y: auto;
  background-color: var(--paper-raised); background-image: var(--grain);
  box-shadow: var(--shadow-lift); transition: max-width .2s ease;
}
@media (min-width: 900px) { .reader { inset: 2.2rem 0; border-radius: 6px; border: 1px solid var(--line); } }
@media (min-width: 1020px) { .reader.mode-inter { max-width: 76rem; } }
.reader-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper-raised) 93%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: .85rem 1.6rem; display: flex; align-items: center; gap: 1rem; }
.reader-top .rt-native { font-family: var(--display); font-weight: 650; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-top .rt-en { font-size: .72rem; color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-switch { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.mode-switch button { background: transparent; border: none; color: var(--muted); font-size: .7rem; font-weight: 600; padding: .42rem .75rem; letter-spacing: .02em; }
.mode-switch button + button { border-left: 1px solid var(--hairline); }
.mode-switch button.on { background: var(--ink); color: var(--paper-raised); }
.reader-close { background: transparent; border: 1px solid var(--line); border-radius: 50%; width: 30px; height: 30px; color: var(--muted); font-size: .85rem; line-height: 1; flex-shrink: 0; }
.reader-close:hover { color: var(--seal); border-color: var(--seal); }

.reader-body { padding: 2.4rem 1.6rem 5rem; max-width: 68ch; margin: 0 auto; }
@media (min-width: 700px) { .reader-body { padding: 2.8rem 3rem 5.5rem; } }
.reader.mode-inter .reader-body { max-width: none; }
@media (min-width: 1020px) { .reader.mode-inter .reader-body { padding: 2.8rem 4rem 5.5rem; } }

.rb-head { margin-bottom: 2.2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); position: relative; }
.rb-head::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 34px; border-bottom: 1px solid var(--seal); }
.rb-head .rb-title { font-family: var(--display); font-size: 1.9rem; font-weight: 650; line-height: 1.22; letter-spacing: -.01em; }
.rb-head .rb-sub { color: var(--muted); font-size: .92rem; font-style: italic; margin-top: .45rem; }
.rb-head .rb-note { font-size: .72rem; color: var(--faint); margin-top: .8rem; letter-spacing: .02em; }
.rb-hint { font-size: .73rem; color: var(--muted); background: var(--shelf); border: 1px solid var(--hairline); padding: .5rem .85rem; border-radius: 3px; margin-bottom: 1.8rem; display: inline-block; font-family: var(--sans); }

.para { margin-bottom: 1.6rem; }
.para .orig { font-size: 1.08rem; line-height: 1.95; cursor: pointer; border-radius: 3px; padding: .15rem .3rem; margin: -.15rem -.3rem; transition: background .15s ease; }
.para .orig:hover { background: var(--shelf); box-shadow: inset 2px 0 0 var(--seal); }
.para .orig[dir="rtl"] { text-align: right; font-size: 1.22rem; line-height: 2.05; }
.para .trans { display: none; margin-top: .55rem; padding: .1rem 0 .1rem .95rem; border-left: 2px solid var(--seal); color: var(--muted); font-size: .95rem; line-height: 1.75; font-style: italic; }
.para.show .trans { display: block; }
.para .trans.loading { color: var(--faint); font-style: normal; }

/* rubricated drop cap on the opening paragraph */
.rb-hint + .para .orig::first-letter,
#readParas > .para:first-child .orig::first-letter {
  font-family: var(--display); font-weight: 600; font-size: 3.1em; line-height: .82;
  float: inline-start; padding: .06em .12em 0 0; color: var(--seal);
}
.reader.mode-en .rb-hint + .para .trans::first-letter,
.reader.mode-en #readParas > .para:first-child .trans::first-letter {
  font-family: var(--display); font-weight: 600; font-size: 3.1em; line-height: .82;
  float: inline-start; padding: .06em .12em 0 0; color: var(--seal);
}

.reader.mode-en .para .orig { display: none; }
.reader.mode-en .para .trans { display: block; border-left: none; padding-left: 0; font-style: normal; color: var(--ink); font-size: 1.05rem; line-height: 1.85; }
.reader.mode-inter .para .trans { display: block; }
@media (min-width: 1020px) {
  .reader.mode-inter .para { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: start; padding-bottom: 1.4rem; border-bottom: 1px solid var(--hairline); }
  .reader.mode-inter .para .trans { margin-top: .1rem; border-left: none; padding-left: 0; }
  .reader.mode-inter .rb-hint + .para .orig::first-letter,
  .reader.mode-inter #readParas > .para:first-child .orig::first-letter { font-size: 2.4em; }
}

.greek { height: .68rem; border-radius: 3px; background: var(--shelf-deep); margin: .6rem 0; opacity: .75; }
.demo-note { border: 1px solid var(--line); border-left: 3px solid var(--seal); border-radius: 4px; background: var(--shelf); padding: .9rem 1.1rem; font-size: .8rem; color: var(--muted); line-height: 1.65; margin-top: 1.6rem; font-family: var(--sans); }

/* ---------- legal band + footer ---------- */
.band { border-top: 1px solid var(--line); background: var(--shelf); background-image: var(--grain); }
.band-inner { max-width: 74rem; margin: 0 auto; padding: 3.2rem 1.5rem; }
.band h2 { font-size: 1.55rem; margin-bottom: .4rem; }
.band .band-lede { color: var(--muted); max-width: 44rem; font-size: .94rem; font-style: italic; margin-bottom: 1.9rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.step { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 5px; padding: 1.35rem; box-shadow: var(--shadow); }
.step h3 { font-size: 1rem; margin-bottom: .4rem; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.step p { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.65; }
.verdict { font-family: var(--sans); font-size: .58rem; font-weight: 700; letter-spacing: .09em; padding: .16rem .5rem; border-radius: 2px; text-transform: uppercase; transform: rotate(-1.5deg); }
.verdict.ok { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.verdict.warn { background: var(--seal-soft); color: var(--seal); border: 1px solid color-mix(in srgb, var(--seal) 40%, transparent); }

footer { max-width: 74rem; margin: 0 auto; padding: 2.2rem 1.5rem 3.2rem; font-size: .74rem; color: var(--faint); line-height: 1.8; }
footer b { color: var(--muted); }
.foot-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--seal); color: var(--stamp-paper); border-radius: 3px; font-size: 12px; transform: rotate(-3.5deg); margin-right: .45rem; vertical-align: -5px; font-family: "Hiragino Mincho ProN", serif; }

/* ---------- persistent audio player ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background-color: var(--paper-raised); background-image: var(--grain);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 30px rgba(15, 10, 5, .22);
}
.player::before { content: ""; position: absolute; top: 2px; left: 0; right: 0; border-top: 1px solid var(--hairline); }
.player-inner { max-width: 70rem; margin: 0 auto; display: flex; align-items: center; gap: 1.1rem; padding: .6rem 1.2rem .7rem; }
.pl-art { width: 42px; height: 42px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--shelf); color: var(--muted); display: grid; place-items: center; font-size: 1.05rem; }
.pl-art:hover { color: var(--seal); border-color: var(--seal); }
.pl-meta { width: 15rem; min-width: 0; flex-shrink: 1; }
.pl-title { font-family: var(--serif); font-weight: 600; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.pl-controls { display: flex; align-items: center; justify-content: center; gap: .55rem; }
.pl-controls button { background: transparent; border: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.pl-controls button:hover { color: var(--seal); }
.pl-controls svg { width: 13px; height: 13px; fill: currentColor; }
.pl-toggle { width: 38px !important; height: 38px !important; background: var(--seal) !important; color: var(--stamp-paper) !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--stamp-paper) 55%, transparent), 0 1px 3px rgba(15, 10, 5, .3); }
.pl-toggle:hover { background: var(--seal-deep) !important; color: var(--stamp-paper) !important; }
.pl-toggle svg { width: 14px; height: 14px; }
.pl-toggle .ic-pause { display: none; }
.player.playing .pl-toggle .ic-play { display: none; }
.player.playing .pl-toggle .ic-pause { display: block; }
.pl-seek { display: flex; align-items: center; gap: .7rem; }
.pl-time { font-family: var(--sans); font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.4ch; text-align: center; }
#plBar { flex: 1; appearance: none; -webkit-appearance: none; height: 2px; background: var(--line); border-radius: 0; outline-offset: 6px; }
#plBar::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 11px; height: 11px; background: var(--seal); border: none; border-radius: 2px; transform: rotate(-4deg); cursor: pointer; box-shadow: 0 1px 2px rgba(15, 10, 5, .3); }
#plBar::-moz-range-thumb { width: 11px; height: 11px; background: var(--seal); border: none; border-radius: 2px; cursor: pointer; }
.pl-speed { flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 700; padding: .32rem .7rem; font-variant-numeric: tabular-nums; min-width: 3.6rem; }
.pl-speed:hover { color: var(--seal); border-color: var(--seal); }
.pl-close { flex-shrink: 0; background: transparent; border: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); }
.pl-close:hover { color: var(--seal); }
.pl-close svg { width: 11px; height: 11px; fill: currentColor; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%) translateY(8px); background: var(--ink); color: var(--paper); font-size: .8rem; padding: .7rem 1.1rem; border-radius: 4px; box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200; max-width: 90vw; text-align: center; font-family: var(--sans); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.has-player .toast { bottom: 8.2rem; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .store-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .tab-group { flex: 0 0 auto; scroll-snap-align: start; }
  .tab-group .tg-row { flex-wrap: nowrap; }
  .sec-grid { display: flex; overflow-x: auto; gap: .9rem; padding-bottom: .6rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .sec-grid .prod { flex: 0 0 min(74vw, 260px); scroll-snap-align: start; }
  .site-mode { flex-direction: column; }
  .site-mode button { max-width: none; }
  .player-inner { flex-wrap: wrap; gap: .6rem .9rem; padding: .55rem .9rem .65rem; }
  .pl-meta { flex: 1; width: auto; }
  .pl-main { order: 5; flex-basis: 100%; }
  .reader-top { padding: .75rem 1rem; flex-wrap: wrap; }
  .mode-switch { margin-left: 0; order: 5; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

}
