/* ==========================================================================
   Matrushri Kamalamma Book Shop – Poornaprajna Samshodhana Mandiram
   Identity: a heritage publishing house. Deep maroon and antique gold on warm
   ivory; Cormorant Garamond for display and titles, Manrope for reading and
   controls; Noto for Kannada and Devanagari. Soft, rounded, calm.
   ========================================================================== */
:root {
  /* colour */
  --maroon: #6B1020;
  --maroon-deep: #4A0A16;
  --maroon-ink: #3B0812;
  --maroon-2: #831A2E;
  --gold: #B68A35;
  --gold-2: #C9A24F;
  --gold-ink: #8A6322;       /* gold that reads on ivory (4.6:1) */
  --gold-soft: #F3E7CC;
  --ivory: #FAF8F4;
  --beige: #F2EADD;          /* warm beige surfaces */
  --beige-2: #E9DECB;
  --paper: #FFFDF9;          /* cards */
  --white: #FFFFFF;
  --brown: #3A2A1E;          /* text */
  --muted: #6B584A;          /* secondary text, 6.1:1 on ivory */
  --faint: #9C8B7C;          /* decorative only */
  --line: #E8DFD2;
  --line-strong: #D6C8B4;
  --ok: #2F6B4A;
  --ok-soft: #E5F0E8;
  --alert: #A32A2A;
  --alert-soft: #F8E7E4;

  /* names the admin page uses */
  --indigo: var(--maroon); --indigo-2: var(--maroon-2); --indigo-soft: #F6ECEC;
  --card: var(--paper); --kumkum: var(--alert); --kumkum-soft: var(--alert-soft);
  --leaf: var(--ok); --leaf-soft: var(--ok-soft); --navy: var(--maroon); --navy-deep: var(--maroon-deep);

  /* type */
  --display: 'Cormorant Garamond', 'Noto Serif Kannada', 'Noto Serif Devanagari', Georgia, 'Times New Roman', serif;
  --serif: var(--display);
  --serif-sa: 'Noto Serif Devanagari', 'Cormorant Garamond', Georgia, serif;
  --serif-kn: 'Noto Serif Kannada', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', 'Noto Sans Kannada', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* shape & rhythm */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1280px;
  --section: clamp(56px, 7vw, 96px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-sm: 0 1px 2px rgba(58, 42, 30, .06), 0 2px 8px -2px rgba(58, 42, 30, .08);
  --shadow-md: 0 2px 4px rgba(58, 42, 30, .05), 0 12px 28px -12px rgba(58, 42, 30, .22);
  --shadow-lg: 0 4px 10px rgba(58, 42, 30, .06), 0 28px 60px -24px rgba(58, 42, 30, .35);
  --shadow-cover: 0 1px 2px rgba(58, 42, 30, .16), 0 10px 22px -12px rgba(58, 42, 30, .45);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 150px; }
body { margin: 0; background: var(--ivory); color: var(--brown); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--maroon); text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--gold-soft); color: var(--maroon-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: var(--r-xs); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--maroon); padding: 10px 14px; z-index: 90; font-weight: 600; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sa { font-family: var(--serif-sa); }
.kn { font-family: var(--serif-kn); }
.ic { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic--go { transition: transform .22s var(--ease); }

/* ---------- Type ---------- */
.display { font-family: var(--display); font-weight: 500; font-size: clamp(2.9rem, 1.7rem + 4.6vw, 5.6rem); line-height: .98; letter-spacing: -.015em; margin: 0; }
.display em { font-style: italic; font-weight: 500; color: var(--gold-2); }
.h2 { font-family: var(--display); font-weight: 600; font-size: clamp(2.1rem, 1.6rem + 1.7vw, 3.1rem); line-height: 1.04; letter-spacing: -.01em; margin: 0; color: var(--maroon-ink); }
.h3 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.15; margin: 0; color: var(--maroon-ink); }
.lede { font-size: clamp(1.02rem, .96rem + .3vw, 1.15rem); line-height: 1.7; max-width: 52ch; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 700 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--gold-2); }
.hint { font-size: .875rem; color: var(--muted); margin: 0 0 14px; }
.hint--good { color: var(--ok); }
.ornament { display: flex; align-items: center; gap: 12px; color: var(--gold); }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, currentColor); }
.ornament::after { background: linear-gradient(90deg, currentColor, transparent); }
.ornament i { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }

/* ---------- Announcement & header ---------- */
.announce { margin: 0; background: var(--maroon-deep); color: #F3E7CC; text-align: center; font-size: .8125rem; font-weight: 500; letter-spacing: .01em; padding: 9px var(--gutter); }
.mast { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: rgba(250, 248, 244, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(214, 200, 180, .6); transition: box-shadow .25s ease, background-color .25s ease; }
.mast.is-stuck { box-shadow: 0 10px 30px -22px rgba(58, 42, 30, .5); background: rgba(250, 248, 244, .94); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 41; background: var(--ivory); }
.mast__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "menu brand tools" "search search search"; align-items: center; column-gap: 10px; row-gap: 10px; padding-top: 10px; padding-bottom: 12px; }
.menubtn { grid-area: menu; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--maroon); cursor: pointer; }
.menubtn:hover { background: var(--beige); }
.brand { grid-area: brand; display: flex; align-items: center; gap: 12px; color: var(--maroon-ink); text-decoration: none; min-width: 0; }
.brand__mark { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon); color: var(--gold-soft); box-shadow: inset 0 0 0 2px var(--maroon), inset 0 0 0 3px var(--gold); }
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: grid; gap: 2px; min-width: 0; }
.brand__name { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.7rem); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__sub { font: 600 .6rem/1.25 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { grid-area: search; position: relative; }
.search__box { position: relative; display: flex; align-items: center; height: 48px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.search__box:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(182, 138, 53, .22); }
.search__ic { position: absolute; left: 17px; color: var(--muted); pointer-events: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 10px 0 46px; font-size: 16px; color: var(--brown); border-radius: 999px; }
.search input::placeholder { color: #9A8878; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { display: grid; place-items: center; width: 36px; height: 36px; margin-right: 6px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.search__clear:hover { background: var(--beige); color: var(--brown); }
.suggest { position: absolute; z-index: 45; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); max-height: min(70vh, 460px); overflow-y: auto; animation: pop-in .18s var(--ease); }
.suggest__group { padding: 8px 12px 4px; font: 700 .66rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.suggest button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; cursor: pointer; }
.suggest button:hover, .suggest button[aria-selected="true"] { background: var(--beige); }
.suggest .cover--thumb { width: 34px; }
.suggest__t { display: block; font-weight: 600; font-size: .9rem; color: var(--brown); line-height: 1.3; }
.suggest__s { display: block; font-size: .78rem; color: var(--muted); }
.suggest mark { background: none; color: var(--maroon); font-weight: 800; }
.tools { grid-area: tools; display: flex; align-items: center; gap: 2px; }
.tool { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--maroon-ink); font-size: .85rem; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s; }
.tool:hover { background: var(--beige); }
.tool--cart { background: var(--maroon); color: var(--gold-soft); padding: 0 15px; margin-left: 6px; }
.tool--cart:hover { background: var(--gold); color: var(--maroon-ink); }
.tool__count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: var(--maroon-ink); font-size: .68rem; font-weight: 800; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.tool--cart .tool__count { background: var(--gold-soft); }
.tool:not(.tool--cart) .tool__count { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; }
.tool__count.bump { animation: bump .32s var(--ease); }
.tool__avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--maroon); font: 800 .72rem/1 var(--sans); overflow: hidden; }
.tool__avatar img { width: 100%; height: 100%; object-fit: cover; }
@keyframes bump { 45% { transform: scale(1.3); } }
@media (max-width: 759px) { .tool__label { display: none; } .tool { padding: 0 10px; } .tool--cart { padding: 0 12px; margin-left: 2px; } .brand__mark { width: 36px; height: 36px; } .brand__mark svg { width: 19px; height: 19px; } }
@media (max-width: 999px) { .brand__name { white-space: normal; font-size: 1.22rem; line-height: .98; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
@media (max-width: 479px) { .brand__sub { display: none; } }
@media (max-width: 389px) { .tool--wish { display: none; } }
.mainnav { display: none; }
@media (min-width: 1000px) {
  .menubtn { display: none; }
  .brand__name { overflow: visible; text-overflow: clip; }
  .mast__row { grid-template-columns: max-content minmax(240px, 560px) max-content; grid-template-areas: "brand search tools"; justify-content: space-between; column-gap: 36px; padding-top: 14px; padding-bottom: 12px; }
  .mainnav { display: flex; justify-content: center; gap: 4px; height: 46px; align-items: center; border-top: 1px solid rgba(214, 200, 180, .55); }
  .mainnav > a, .mainnav > .navdrop > button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--brown); font-size: .86rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: color .2s, background-color .2s; }
  .mainnav > a:hover, .mainnav > .navdrop > button:hover, .mainnav > .navdrop.open > button { color: var(--maroon); background: var(--beige); }
  .mainnav > a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
  .mainnav > a:hover::after, .mainnav > a[aria-current="true"]::after { transform: scaleX(1); }
}
.navdrop { position: relative; }
.navdrop .ic { transition: transform .2s; }
.navdrop.open > button .ic { transform: rotate(180deg); }
.navdrop__panel { position: absolute; z-index: 50; top: calc(100% + 10px); left: 50%; width: min(620px, 92vw); transform: translateX(-50%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop-in .2s var(--ease); }
.navdrop__panel button { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 0; border-radius: var(--r-md); background: none; text-align: left; cursor: pointer; }
.navdrop__panel button:hover { background: var(--beige); }
.navdrop__panel b { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--maroon-ink); }
.navdrop__panel small { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.demo-note { background: var(--gold-soft); color: #5F4512; text-align: center; font-size: .8125rem; padding: 7px var(--gutter); }

/* ---------- Mobile menu ---------- */
dialog.drawer { margin: 0 auto 0 0; height: 100dvh; max-height: 100dvh; width: min(86vw, 360px); max-width: 100%; border: 0; padding: 0; background: var(--paper); color: var(--brown); box-shadow: var(--shadow-lg); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
dialog.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .28s var(--ease); }
dialog.drawer::backdrop { background: rgba(59, 8, 18, .45); }
@keyframes drawer-in { from { transform: translateX(-30px); opacity: .4; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--line); }
.drawer__body { overflow-y: auto; padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 2px; align-content: start; }
.drawer__body a, .drawer__body button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 12px; border: 0; border-radius: var(--r-md); background: none; color: var(--brown); font-size: 1rem; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.drawer__body a:hover, .drawer__body button:hover { background: var(--beige); }
.drawer__sub { padding: 14px 12px 4px; font: 700 .68rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.drawer__body small { color: var(--muted); font-weight: 500; font-size: .8rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 85% 10%, #7A1426 0%, var(--maroon) 38%, var(--maroon-deep) 100%); color: var(--ivory); isolation: isolate; }
.hero::before { /* palm-leaf manuscript motif */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='180' viewBox='0 0 520 180'%3E%3Cg fill='none' stroke='%23C9A24F' stroke-opacity='.16'%3E%3Crect x='10' y='22' width='500' height='54' rx='27'/%3E%3Crect x='10' y='104' width='500' height='54' rx='27'/%3E%3Ccircle cx='140' cy='49' r='4'/%3E%3Ccircle cx='380' cy='49' r='4'/%3E%3Ccircle cx='140' cy='131' r='4'/%3E%3Ccircle cx='380' cy='131' r='4'/%3E%3C/g%3E%3Cg stroke='%23C9A24F' stroke-opacity='.10' stroke-linecap='round'%3E%3Cpath d='M44 38h80M156 38h90M262 38h104M396 38h80M44 49h70M156 49h110M282 49h84M396 49h66M44 60h88M156 60h76M248 60h118M396 60h88'/%3E%3Cpath d='M44 120h92M156 120h70M242 120h124M396 120h74M44 131h64M156 131h104M276 131h90M396 131h88M44 142h86M156 142h88M260 142h106M396 142h60'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 180px; -webkit-mask-image: linear-gradient(100deg, transparent 0%, #000 45%, #000 100%); mask-image: linear-gradient(100deg, transparent 0%, #000 45%, #000 100%);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 162, 79, .6), transparent); }
.hero__in { display: grid; gap: 44px; padding-top: clamp(44px, 7vw, 104px); padding-bottom: clamp(88px, 10vw, 132px); align-items: center; }
.hero__copy { animation: rise-in .6s var(--ease) both; }
.hero .display { color: #FFF8EC; margin: 4px 0 22px; }
.hero .lede { color: rgba(250, 243, 230, .82); margin-bottom: 32px; }
.hero__by { margin: 0 0 26px; display: flex; align-items: center; gap: 12px; color: rgba(250, 243, 230, .78); font-size: .88rem; }
.hero__by strong { color: var(--gold-soft); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__books { position: relative; height: clamp(260px, 34vw, 440px); animation: rise-in .7s .1s var(--ease) both; }
.fan { position: absolute; bottom: 0; z-index: 1; display: block; width: 30%; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .35s var(--ease); }
.fan .cover { border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 26px 40px -18px rgba(0, 0, 0, .75); }
.fan:nth-child(1) { left: 2%; width: 26%; bottom: 8%; z-index: 1; transform: rotate(-6deg); }
.fan:nth-child(2) { left: 19%; width: 29%; bottom: 3%; z-index: 2; transform: rotate(-2deg); }
.fan:nth-child(3) { left: 36%; width: 33%; bottom: 0; z-index: 4; }
.fan:nth-child(4) { left: 56%; width: 29%; bottom: 3%; z-index: 3; transform: rotate(3deg); }
.fan:nth-child(5) { left: 72%; width: 26%; bottom: 8%; z-index: 2; transform: rotate(7deg); }
.fan:hover, .fan:focus-visible { transform: translateY(-12px) rotate(0); z-index: 6; }
.hero__glow { position: absolute; left: 10%; right: 10%; bottom: -6%; height: 26%; background: radial-gradient(closest-side, rgba(201, 162, 79, .35), transparent); filter: blur(10px); z-index: 0; }
@media (max-width: 559px) { .fan:nth-child(1), .fan:nth-child(5) { display: none; } .fan:nth-child(2) { left: 4%; width: 34%; } .fan:nth-child(3) { left: 31%; width: 38%; } .fan:nth-child(4) { left: 62%; width: 34%; } }
@media (min-width: 1000px) { .hero__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Counters (floating card over the hero edge) ---------- */
.stats { position: relative; z-index: 2; margin-top: calc(clamp(56px, 7vw, 80px) * -1); }
.stats__card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.stat { padding: 22px 24px; display: grid; gap: 2px; align-content: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:nth-child(3) { border-left: 0; }
.stat:nth-child(n+3) { border-top: 1px solid var(--line); }
.stat b { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); line-height: 1; color: var(--maroon); font-variant-numeric: tabular-nums lining-nums; }
.stat span { font-size: .82rem; color: var(--muted); font-weight: 500; }
@media (min-width: 900px) { .stats__card { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stat:nth-child(3) { border-left: 1px solid var(--line); } .stat:nth-child(n+3) { border-top: 0; } .stat { padding: 28px 30px; } }

/* ---------- Section frame ---------- */
.section { padding-top: var(--section); }
.sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.sechead > div:first-child { min-width: 0; }
.sechead__sub { margin: 10px 0 0; color: var(--muted); font-size: .98rem; max-width: 58ch; }
.sechead__act { flex: none; display: flex; align-items: center; gap: 10px; }
.sechead--center { flex-direction: column; align-items: center; text-align: center; }
.sechead--center .sechead__sub { margin-left: auto; margin-right: auto; }
.seeall { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--maroon); font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.seeall:hover { background: var(--maroon); border-color: var(--maroon); color: var(--gold-soft); }
.seeall:hover .ic--go, .btn:hover .ic--go, .cartbar:hover .ic, .linkgo:hover .ic--go { transform: translateX(3px); }
.scrollbtns { display: none; gap: 6px; }
@media (min-width: 900px) and (hover: hover) { .scrollbtns { display: flex; } }
.scrollbtn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); color: var(--maroon); cursor: pointer; transition: background-color .2s, color .2s, opacity .2s; }
.scrollbtn:hover:not(:disabled) { background: var(--maroon); color: var(--gold-soft); border-color: var(--maroon); }
.scrollbtn:disabled { opacity: .35; cursor: default; }
@media (max-width: 599px) { .sechead { flex-wrap: wrap; } .rail .sechead { flex-wrap: nowrap; } }

/* ---------- Spin banner ---------- */
.spinband { margin-top: var(--section); }
.spinband__card { position: relative; overflow: hidden; display: grid; gap: 22px; align-items: center; padding: clamp(26px, 4vw, 44px); border-radius: var(--r-xl); background: linear-gradient(135deg, var(--maroon-deep), var(--maroon) 60%, #7E1A2B); color: var(--ivory); box-shadow: var(--shadow-lg); }
.spinband__card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(201, 162, 79, .3); box-shadow: 0 0 0 26px rgba(201, 162, 79, .06), 0 0 0 52px rgba(201, 162, 79, .04); pointer-events: none; }
.spinband__card > * { position: relative; z-index: 1; }
.spinband h2 { color: #FFF6E6; }
.spinband p { margin: 10px 0 0; color: rgba(250, 243, 230, .82); max-width: 54ch; }
.spinband__wheel { width: 132px; height: 132px; justify-self: center; border-radius: 50%; box-shadow: 0 0 0 4px var(--gold), 0 0 0 7px rgba(74, 10, 22, .6), 0 18px 40px -12px rgba(0, 0, 0, .5); animation: slow-turn 26s linear infinite; }
@keyframes slow-turn { to { transform: rotate(360deg); } }
@media (min-width: 760px) { .spinband__card { grid-template-columns: auto minmax(0, 1fr) auto; } }

/* ---------- Subject tiles ---------- */
.subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .subjects { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.subject { position: relative; display: grid; gap: 4px; align-content: end; min-height: 150px; padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); color: var(--brown); text-align: left; cursor: pointer; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.subject:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.subject__word { position: absolute; right: 14px; top: 6px; font-size: 2.8rem; line-height: 1.25; color: var(--gold); opacity: .34; transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
.subject__word.sa { font-family: var(--serif-sa); }
.subject__word.kn { font-family: var(--serif-kn); }
.subject:hover .subject__word { opacity: .55; transform: translateY(-2px); }
.subject b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1.1; color: var(--maroon-ink); }
.subject span { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------- Rails ---------- */
.rail { padding-top: var(--section); }
.rail__track { list-style: none; margin: 0; padding: 8px max(var(--gutter), env(safe-area-inset-left, 0px)) 22px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 44vw); gap: clamp(14px, 1.8vw, 24px); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth; }
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > li { scroll-snap-align: start; }
@media (min-width: 560px) { .rail__track { grid-auto-columns: 196px; } }
@media (min-width: 1100px) { .rail__track { grid-auto-columns: 212px; } }
@media (min-width: 1280px) { .rail__track { padding-left: calc((100vw - var(--maxw)) / 2 + var(--gutter)); padding-right: calc((100vw - var(--maxw)) / 2 + var(--gutter)); scroll-padding-inline: calc((100vw - var(--maxw)) / 2 + var(--gutter)); } }

/* ---------- Book card ---------- */
.book { display: flex; flex-direction: column; min-width: 0; padding: 12px 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.book:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--beige-2); }
.shelf > .book { content-visibility: auto; contain-intrinsic-size: auto 420px; }
.book__media { position: relative; }
.book__open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.book__open .cover { transition: transform .35s var(--ease); }
.book:hover .book__open .cover { transform: scale(1.015); }
.badges { position: absolute; left: 8px; top: 8px; display: grid; gap: 4px; justify-items: start; pointer-events: none; z-index: 1; }
.badge { font: 800 .6rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.badge--best { background: var(--gold); color: var(--maroon-ink); }
.badge--off { background: var(--maroon); color: var(--gold-soft); }
.badge--new { background: var(--paper); color: var(--maroon); }
.heart { position: absolute; right: 8px; top: 8px; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 253, 249, .94); color: var(--maroon); cursor: pointer; box-shadow: 0 2px 8px rgba(58, 42, 30, .18); transition: opacity .2s, transform .25s var(--ease); }
.heart:hover { transform: scale(1.08); }
.heart[aria-pressed="true"] { color: var(--maroon); }
.heart[aria-pressed="true"] .ic { fill: currentColor; }
.heart.pop { animation: bump .32s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .book .heart:not([aria-pressed="true"]) { opacity: 0; transform: scale(.9); }
  .book:hover .heart, .book:focus-within .heart { opacity: 1; transform: none; }
}
.book__meta { padding: 14px 2px 0; display: grid; gap: 3px; }
.book__pub { margin: 0; font: 700 .64rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book__title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.32rem; line-height: 1.12; color: var(--maroon-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.book__title.kn { font-family: var(--serif-kn); font-weight: 500; font-size: 1.05rem; line-height: 1.4; }
.book__title.sa { font-family: var(--serif-sa); font-weight: 500; font-size: 1.08rem; line-height: 1.4; }
.book__alt { font-size: .8rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.book__buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 14px 2px 0; min-height: 50px; }
.price { font-weight: 800; font-size: 1.05rem; color: var(--brown); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price s { font-weight: 500; color: var(--faint); font-size: .8rem; margin-left: 5px; }
.flag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; margin-top: 3px; }
.flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.flag--few { color: var(--alert); }
.flag--out { color: var(--muted); }
.flag--ok { color: var(--ok); }
.add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px 0 11px; flex: none; border: 0; border-radius: 999px; background: var(--maroon); color: var(--gold-soft); font-size: .8rem; font-weight: 800; cursor: pointer; transition: background-color .2s, color .2s, transform .12s; }
.add:hover { background: var(--gold); color: var(--maroon-ink); }
.add:active { transform: scale(.96); }
.add--notify { background: var(--beige); color: var(--maroon); }
.add--notify:hover { background: var(--gold-soft); color: var(--maroon-ink); }
.qty { display: inline-flex; align-items: center; height: 50px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); flex: none; }
.qty button { display: grid; place-items: center; width: 46px; height: 100%; border: 0; background: none; color: var(--maroon); cursor: pointer; border-radius: 999px; }
.qty button:hover:not(:disabled) { background: var(--beige); }
.qty button:disabled { color: #C4B6A6; cursor: default; }
.qty output { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.qty--sm { height: 38px; background: var(--beige); border-color: transparent; }
.qty--sm button { width: 34px; }
.qty--sm output { min-width: 20px; font-size: .86rem; }

/* ---------- Covers ---------- */
.cover { position: relative; container-type: inline-size; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-cover); background: var(--beige); }
.cover--photo img { width: 100%; height: 100%; object-fit: cover; }
.cover--cloth { --bg: #6B1020; --fg: #F3E7CC; --soft: rgba(243, 231, 204, .66); --rule: rgba(201, 162, 79, .7);
  display: flex; flex-direction: column; align-items: center; background: var(--bg); color: var(--fg); padding: 14% 11% 9%; text-align: center; }
.cover--cloth::before { content: ""; position: absolute; inset: 4.6cqi; border: 1px solid var(--rule); border-radius: 3px; pointer-events: none; }
.cover--cloth::after { content: ""; position: absolute; left: 50%; top: 2.6cqi; width: 4cqi; height: 4cqi; background: var(--bg); border: 1px solid var(--rule); transform: translateX(-50%) rotate(45deg); }
.tone-0 { --bg: #6B1020; --fg: #F3E7CC; --soft: rgba(243, 231, 204, .66); --rule: rgba(201, 162, 79, .7); }
.tone-1 { --bg: #4A0A16; --fg: #E7CB86; --soft: rgba(231, 203, 134, .64); --rule: rgba(201, 162, 79, .55); }
.tone-2 { --bg: #F2EADD; --fg: #6B1020; --soft: rgba(58, 42, 30, .62); --rule: rgba(182, 138, 53, .6); }
.tone-3 { --bg: #3A2A1E; --fg: #E9D3A0; --soft: rgba(233, 211, 160, .62); --rule: rgba(201, 162, 79, .5); }
.tone-4 { --bg: #B68A35; --fg: #3B0812; --soft: rgba(59, 8, 18, .66); --rule: rgba(59, 8, 18, .35); }
.tone-5 { --bg: #E4D6BF; --fg: #4A0A16; --soft: rgba(58, 42, 30, .6); --rule: rgba(107, 16, 32, .3); }
.tone-2, .tone-5 { box-shadow: inset 0 0 0 1px rgba(58, 42, 30, .1), var(--shadow-cover); }
.cover__pub { position: relative; max-width: 100%; font: 700 4.3cqi/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 1cqi; min-height: 1.2em; }
.cover__body { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6cqi; min-height: 0; }
.cover__title { font-family: var(--display); font-weight: 600; line-height: 1.02; color: var(--fg); text-wrap: balance; overflow-wrap: break-word; hyphens: manual; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.cover__title.kn { font-family: var(--serif-kn); font-weight: 500; line-height: 1.3; }
.cover__title.sa { font-family: var(--serif-sa); font-weight: 500; line-height: 1.3; }
.cover__title.fit-l { font-size: 17cqi; }
.cover__title.fit-m { font-size: 13.6cqi; }
.cover__title.fit-s { font-size: 11.4cqi; }
.cover__title.fit-xs { font-size: 9.6cqi; }
.cover__rule { width: 16cqi; height: 1px; background: var(--rule); flex: none; position: relative; }
.cover__rule::after { content: ""; position: absolute; left: 50%; top: -2px; width: 4px; height: 4px; background: var(--rule); transform: translateX(-50%) rotate(45deg); }
.cover__author { font: 600 4.8cqi/1.3 var(--sans); color: var(--soft); max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-out .cover { filter: grayscale(.65); opacity: .8; }
.cover--thumb { width: 56px; flex: none; border-radius: 4px; }
.cover--thumb .cover__pub, .cover--thumb .cover__author, .cover--thumb .cover__rule { display: none; }
.cover--thumb.cover--cloth { padding: 6px 4px; justify-content: center; }
.cover--thumb.cover--cloth::after { display: none; }
.cover--thumb .cover__title { -webkit-line-clamp: 4; }

/* ---------- Catalogue ---------- */
.catalog-band { margin-top: var(--section); background: var(--beige); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.catalog { padding-top: var(--section); padding-bottom: calc(var(--section) * 1.1); scroll-margin-top: 120px; }
.count { margin: 0; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.filterbar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; padding: 12px; margin-bottom: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.chips { flex: 1 1 320px; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 36px 2px 2px; margin: -2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--brown); font-size: .8rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover { border-color: var(--maroon); color: var(--maroon); }
.chip[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--gold-soft); }
.toolbar { display: flex; gap: 8px; align-items: center; flex: none; }
.ctl { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--maroon-ink); font-size: .84rem; font-weight: 700; cursor: pointer; transition: border-color .2s; }
.ctl:hover { border-color: var(--maroon); }
.ctl__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--maroon); color: var(--gold-soft); font-size: .68rem; display: inline-grid; place-items: center; }
.ctl--select { padding: 0; }
.ctl__lbl { position: absolute; left: 15px; color: var(--muted); font-weight: 500; pointer-events: none; }
.ctl--select select { appearance: none; -webkit-appearance: none; height: 100%; border: 0; background: transparent; padding: 0 36px 0 54px; font-weight: 700; color: var(--maroon-ink); cursor: pointer; border-radius: 999px; max-width: 62vw; }
.ctl--select .ic { position: absolute; right: 13px; pointer-events: none; color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.active-filters:empty { display: none; }
.afchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 14px; border: 0; border-radius: 999px; background: var(--maroon); color: var(--gold-soft); font-size: .78rem; font-weight: 700; cursor: pointer; }
.afchip:hover { background: var(--maroon-2); }
.shelf { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; } }
@media (min-width: 940px) { .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 22px; } }
@media (min-width: 1200px) { .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.shelf.is-swapping { animation: fade-in .3s ease; }
@keyframes fade-in { from { opacity: .35; } }
.more { display: flex; margin: 44px auto 0; min-width: 260px; }

/* ---------- Offers ---------- */
.offers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.offer { position: relative; display: grid; gap: 10px; align-content: start; padding: 24px 22px 20px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.offer::before { content: ""; position: absolute; left: -10px; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--line); }
.offer::after { content: ""; position: absolute; right: -10px; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--line); }
.offer b { font-family: var(--display); font-size: 2.3rem; font-weight: 600; line-height: 1; color: var(--maroon); }
.offer p { margin: 0; color: var(--muted); font-size: .88rem; }
.offer__code { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 8px 8px 8px 14px; border: 1.5px dashed var(--gold); border-radius: var(--r-md); background: var(--gold-soft); }
.offer__code code { font: 800 .95rem/1 var(--sans); letter-spacing: .08em; color: var(--maroon-ink); }
.offer__code button { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--maroon); color: var(--gold-soft); font-size: .74rem; font-weight: 800; cursor: pointer; }
.offer__code button:hover { background: var(--gold); color: var(--maroon-ink); }
.offer--auto .offer__code { border-style: solid; border-color: var(--line-strong); background: var(--beige); }
.offer--spin { background: linear-gradient(140deg, var(--maroon-deep), var(--maroon)); color: var(--ivory); border-color: transparent; }
.offer--spin b { color: var(--gold-soft); }
.offer--spin p { color: rgba(250, 243, 230, .8); }
.offer--spin::before, .offer--spin::after { display: none; }
@media (min-width: 760px) { .offer--spin { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; } .offer--spin b { flex: none; } .offer--spin p { flex: 1; margin: 0; } .offer--spin .btn { flex: none; width: auto; } }
.offers__note { margin: 14px 0 0; color: var(--muted); font-size: .82rem; }

/* ---------- About ---------- */
.about { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1000px) { .about { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; } }
.about__aside { position: relative; padding: 34px; border-radius: var(--r-xl); background: var(--maroon); color: var(--ivory); overflow: hidden; box-shadow: var(--shadow-lg); }
.about__aside::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(201, 162, 79, .45); border-radius: var(--r-lg); pointer-events: none; }
.about__verse { position: relative; margin: 0 0 18px; font-family: var(--serif-sa); font-size: 1.5rem; line-height: 1.6; color: var(--gold-soft); }
.about__verse small { display: block; margin-top: 6px; font-family: var(--sans); font-size: .78rem; letter-spacing: .06em; color: rgba(250, 243, 230, .7); }
.about__vision { position: relative; margin: 0; font-family: var(--display); font-size: 1.7rem; line-height: 1.25; color: #FFF6E6; }
.about__vision span { display: block; margin-bottom: 8px; font: 700 .7rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.about__text p { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.8; color: #4A382B; }
.about__text p:first-of-type::first-letter { float: left; font-family: var(--display); font-size: 4.2rem; line-height: .82; padding: 6px 10px 0 0; color: var(--maroon); font-weight: 600; }

/* ---------- Trust ---------- */
.trust { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trust__item { display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.trust__item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.trust__ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--maroon); }
.trust__item b { font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--maroon-ink); line-height: 1.15; }
.trust__item p { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------- Institution band & payments ---------- */
.bulk { margin-top: var(--section); }
.bulk__card { display: grid; gap: 24px; align-items: center; padding: clamp(26px, 4vw, 44px); border-radius: var(--r-xl); background: var(--beige); border: 1px solid var(--line); }
@media (min-width: 900px) { .bulk__card { grid-template-columns: minmax(0, 1fr) auto; } }
.bulk__card p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.pays { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pays span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .76rem; font-weight: 700; color: var(--brown); }

/* ---------- Loading & empty ---------- */
.loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px; margin-top: 24px; }
.ghost { aspect-ratio: 3 / 4.3; border-radius: var(--r-lg); background: linear-gradient(100deg, #EFE6D7 30%, #F8F2E8 50%, #EFE6D7 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }
.empty { margin-top: 24px; padding: 34px; max-width: 580px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.empty__title { font-family: var(--display); font-size: 1.8rem; font-weight: 600; line-height: 1.15; margin: 0 0 10px; color: var(--maroon-ink); }
.empty p { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px; background: var(--maroon); color: var(--gold-soft); font-size: .94rem; font-weight: 700; letter-spacing: .01em; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .12s ease, box-shadow .22s ease; }
.btn:hover { background: var(--gold); color: var(--maroon-ink); box-shadow: 0 10px 24px -12px rgba(182, 138, 53, .8); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--block { width: 100%; }
.btn--gold, .btn--pay { background: var(--gold); color: var(--maroon-ink); }
.btn--gold:hover, .btn--pay:hover { background: #CFA650; color: var(--maroon-ink); }
.btn--line, .btn--ghost { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn--line:hover, .btn--ghost:hover { background: var(--maroon); color: var(--gold-soft); box-shadow: none; }
.btn--quiet-light { background: rgba(255, 255, 255, .06); color: var(--ivory); border-color: rgba(250, 243, 230, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn--quiet-light:hover { background: rgba(255, 255, 255, .14); color: #fff; border-color: var(--gold-soft); box-shadow: none; }
.btn--google { background: var(--white); color: #2B2B2B; border-color: var(--line-strong); }
.btn--google:hover { background: var(--white); color: #111; border-color: #9C8B7C; box-shadow: var(--shadow-md); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .86rem; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .35); animation: ripple .55s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; text-align: left; font: inherit; }
.linkgo { display: inline-flex; align-items: center; gap: 6px; color: var(--maroon); font-weight: 700; text-decoration: none; }
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--brown); cursor: pointer; transition: background-color .2s; }
.iconbtn:hover { background: var(--beige); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(59, 8, 18, .25); border-top-color: var(--maroon-ink); border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.btn--gold):not(.btn--pay):not(.btn--google) .spinner { border-color: rgba(243, 231, 204, .35); border-top-color: var(--gold-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sticky cart bar (phones) ---------- */
.cartbar { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; border: 0; border-radius: 999px; background: var(--maroon-deep); color: var(--ivory); cursor: pointer; box-shadow: var(--shadow-lg); animation: rise-in .25s var(--ease); }
.cartbar__info { display: grid; text-align: left; line-height: 1.25; font-size: .74rem; color: rgba(250, 243, 230, .72); }
.cartbar__info strong { color: #FFF6E6; font-size: 1rem; font-variant-numeric: tabular-nums; }
.cartbar__go { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; background: var(--gold); color: var(--maroon-ink); font-size: .86rem; font-weight: 800; }
.cartbar .ic { transition: transform .22s var(--ease); }
@media (min-width: 1000px) { .cartbar { display: none; } }
body.has-cartbar .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Sheets (dialogs) ---------- */
dialog.sheet { border: 0; padding: 0; background: var(--paper); color: var(--brown); width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-lg); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .28s var(--ease); }
dialog.sheet::backdrop { background: rgba(59, 8, 18, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in .2s ease; }
@keyframes sheet-up { from { transform: translateY(28px); opacity: .5; } }
.sheet__head { display: flex; align-items: center; gap: 8px; min-height: 66px; padding: 10px 12px 10px 24px; border-bottom: 1px solid var(--line); }
.sheet__head h2 { flex: 1; margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1.1; color: var(--maroon-ink); }
.sheet__head--float { position: absolute; right: 12px; top: 12px; min-height: 0; padding: 0; border: 0; z-index: 3; }
.sheet__head--float .iconbtn { background: rgba(255, 253, 249, .96); box-shadow: var(--shadow-sm); }
.sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
dialog.sheet--full { max-height: 100dvh; height: 100dvh; border-radius: 0; }
dialog.sheet--wide { max-height: 94dvh; }
@media (min-width: 760px) {
  dialog.sheet { margin: auto; max-width: 600px; max-height: 88vh; border-radius: var(--r-xl); }
  dialog.sheet[open] { animation: pop-in .26s var(--ease); }
  dialog.sheet--wide { max-width: 1000px; }
  dialog.sheet--side { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; max-width: 470px; border-radius: var(--r-xl) 0 0 var(--r-xl); }
  dialog.sheet--side[open] { animation: slide-in .3s var(--ease); }
  dialog.sheet--full { height: auto; max-height: 92vh; max-width: 740px; border-radius: var(--r-xl); }
  .sheet__body { padding: 28px 32px 32px; }
  .sheet__head { padding-left: 32px; }
}
@keyframes pop-in { from { transform: translateY(12px) scale(.985); opacity: 0; } }
@keyframes slide-in { from { transform: translateX(36px); opacity: .4; } }

/* ---------- Book page ---------- */
.detail { display: grid; gap: 28px; }
.detail__media { position: relative; width: min(64vw, 280px); margin: 8px auto 0; }
.detail__media .cover { width: 100%; box-shadow: var(--shadow-lg); border-radius: 8px; }
.zoomable { cursor: zoom-in; }
@media (min-width: 720px) { .detail { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 48px; align-items: start; } .detail__media { width: 100%; margin: 0; position: sticky; top: 0; } }
.detail .eyebrow { margin-bottom: 12px; }
.detail h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3rem); line-height: 1.02; letter-spacing: -.01em; padding-right: 40px; color: var(--maroon-ink); }
.detail h2.kn { font-family: var(--serif-kn); font-weight: 500; font-size: 1.9rem; line-height: 1.3; }
.detail h2.sa { font-family: var(--serif-sa); font-weight: 500; font-size: 2rem; line-height: 1.3; }
.detail__alt { color: var(--muted); margin: 0 0 6px; font-size: 1.06rem; }
.detail__by { margin: 0 0 22px; color: var(--muted); font-size: .95rem; }
.detail__by b { color: var(--brown); font-weight: 600; }
.pricebox { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--beige); }
.pricebox .price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--maroon-ink); }
.pricebox s { font-size: 1rem; color: var(--faint); }
.pricebox .flag { flex-basis: 100%; }
.save { color: var(--ok); font-weight: 700; font-size: .86rem; }
.buyrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.buyrow .btn { flex: 1 1 150px; }
.detail .buyrow { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom, 0px)); z-index: 2; margin-left: -24px; margin-right: -24px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 253, 249, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
@media (min-width: 760px) { .detail .buyrow { bottom: -32px; margin-left: 0; margin-right: 0; padding: 14px 0 16px; border-top: 0; background: linear-gradient(to top, var(--paper) 80%, rgba(255, 253, 249, 0)); } }
.subactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.subactions button, .subactions a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--maroon-ink); font-size: .82rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: border-color .2s, background-color .2s; }
.subactions button:hover, .subactions a:hover { border-color: var(--maroon); background: var(--beige); }
.subactions [aria-pressed="true"] { color: var(--maroon); border-color: var(--maroon); }
.subactions [aria-pressed="true"] .ic { fill: currentColor; }
.facts-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; margin: 24px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); font-size: .88rem; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; color: var(--brown); font-weight: 600; overflow-wrap: anywhere; }
.facts-list button { padding: 0; border: 0; background: none; color: var(--maroon); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(107, 16, 32, .3); text-underline-offset: .2em; }
.facts-list button:hover { text-decoration-color: currentColor; }
.desc { margin-top: 22px; font-size: 1rem; line-height: 1.8; color: #4A382B; white-space: pre-line; }
.deliv { display: grid; gap: 12px; margin-top: 22px; padding: 18px 20px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: .88rem; line-height: 1.55; }
.deliv p { display: flex; gap: 12px; margin: 0; }
.deliv .ic { color: var(--gold-ink); margin-top: 1px; }
.notify { display: grid; gap: 12px; margin-top: 18px; padding: 20px; background: var(--beige); border-radius: var(--r-lg); }
.notify p { margin: 0; font-size: .94rem; }
.related { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.related h3 { margin: 0 0 16px; font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.15; color: var(--maroon-ink); }
.related .rail__track { padding-left: 0; padding-right: 0; scroll-padding-inline: 0; grid-auto-columns: 150px; gap: 14px; }
.related .book { padding: 8px 8px 10px; box-shadow: none; }
.related .book__alt, .related .book__buy, .related .book__pub, .related .flag { display: none; }
.related .book__title { font-size: 1.08rem; }
.book__title.is-longword { font-size: 1.12rem; overflow-wrap: anywhere; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96dvh; }
dialog.lightbox::backdrop { background: rgba(20, 6, 9, .86); }
dialog.lightbox img { max-width: 92vw; max-height: 90dvh; border-radius: 8px; box-shadow: var(--shadow-lg); cursor: zoom-out; }

/* ---------- Cart ---------- */
.meter { margin-bottom: 8px; padding: 16px 18px; background: var(--beige); border-radius: var(--r-lg); font-size: .875rem; }
.meter__track { height: 6px; margin-top: 10px; border-radius: 3px; background: var(--beige-2); overflow: hidden; }
.meter__fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--maroon)); border-radius: 3px; transition: width .4s var(--ease); }
.meter--done { color: var(--ok); font-weight: 700; }
.meter--done .meter__fill { background: var(--ok); }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line > * { min-width: 0; }
.line__title { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.15; color: var(--maroon-ink); }
.line__title.kn { font-family: var(--serif-kn); font-size: 1rem; }
.line__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.line__amt { font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line__amt s { font-weight: 500; }
.textbtn { padding: 0; border: 0; background: none; color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.textbtn:hover { color: var(--maroon); }
.sums { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin: 18px 0; font-size: .94rem; font-variant-numeric: tabular-nums; }
.sums > span:nth-child(even) { text-align: right; padding-left: 12px; }
.sums .total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 1.18rem; font-weight: 800; color: var(--maroon-ink); }
.sums .good { color: var(--ok); }
.cart-empty { text-align: center; padding: 40px 12px; }
.cart-empty .ic { color: var(--gold); margin: 0 auto 14px; display: block; }
.cart-empty p:first-of-type { margin: 0 0 6px; font-family: var(--display); font-size: 1.8rem; font-weight: 600; line-height: 1.15; color: var(--maroon-ink); }

/* ---------- Checkout ---------- */
.steps { list-style: none; display: flex; gap: 8px; margin: 0; padding: 14px 24px 0; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 2px solid var(--line); font-size: .74rem; font-weight: 700; color: var(--muted); }
.steps b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: .68rem; }
.steps li.on { color: var(--maroon); border-color: var(--maroon); }
.steps li.on b { background: var(--maroon); border-color: var(--maroon); color: var(--gold-soft); }
.steps li.done { color: var(--ok); border-color: var(--ok); }
.steps li.done b { background: var(--ok); border-color: var(--ok); color: var(--white); }
@media (min-width: 760px) { .steps { padding: 16px 32px 0; } }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .legend { font-size: .86rem; font-weight: 700; color: var(--brown); }
.field .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--white); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 96px; padding: 12px 16px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #BCA98F; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(182, 138, 53, .2); }
.field[data-error] input, .field[data-error] select { border-color: var(--alert); }
.field__err { color: var(--alert); font-size: .8rem; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row2 > * { min-width: 0; }
.choices { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.choices legend { margin-bottom: 10px; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; transition: border-color .2s, background-color .2s; }
.choice:hover { border-color: var(--maroon); }
.choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--maroon); }
.choice strong { font-weight: 700; }
.choice span { grid-column: 2; font-size: .8rem; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--maroon); background: #FBF3F1; box-shadow: inset 0 0 0 1px var(--maroon); }
.savedaddr { display: flex; flex-wrap: wrap; gap: 8px; }
.savedaddr button { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--paper); text-align: left; font-size: .8rem; cursor: pointer; max-width: 100%; }
.savedaddr button b { display: block; font-size: .86rem; }
.savedaddr button:hover, .savedaddr button[aria-pressed="true"] { border-color: var(--maroon); background: #FBF3F1; }
.coupon { display: flex; gap: 8px; margin: 18px 0 4px; }
.coupon input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1.5px dashed var(--gold); border-radius: 999px; background: var(--white); font-size: 16px; text-transform: uppercase; letter-spacing: .06em; }
.coupon input:focus { outline: 0; border-style: solid; border-color: var(--maroon); }
.coupon .btn { min-height: 48px; }
.couponsug { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.couponsug button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px dashed var(--gold); border-radius: 999px; background: var(--gold-soft); color: var(--maroon-ink); font-size: .76rem; font-weight: 700; cursor: pointer; }
.couponsug button:hover { border-style: solid; background: var(--gold); }
.couponsug button[disabled] { opacity: .55; cursor: not-allowed; background: var(--beige); }
.coupon-ok { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 4px; padding: 12px 16px; border-radius: var(--r-md); background: var(--ok-soft); color: var(--ok); font-size: .86rem; }
.alert { padding: 14px 16px; border-radius: var(--r-md); font-size: .875rem; }
.alert--warn { background: var(--alert-soft); color: #6E1F1F; }
.alert--info { background: var(--gold-soft); color: #5F4512; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.review-addr { margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--beige); font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: center; }
.done { text-align: center; padding: 8px 0 4px; }
.done__seal { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); animation: seal .5s var(--ease); }
@keyframes seal { from { transform: scale(.6); opacity: 0; } }
.done h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 600; font-size: 2.2rem; line-height: 1.08; color: var(--maroon-ink); }
.orderno { margin: 8px 0 6px; font-family: var(--display); font-weight: 600; font-size: 2.3rem; letter-spacing: .04em; color: var(--maroon); user-select: all; }
.done .lines { text-align: left; margin-top: 18px; }
.done .line, .plain .line { grid-template-columns: minmax(0, 1fr) auto; }
.done .sums .total { border-top: 0; padding-top: 0; }
.done .stack { display: grid; gap: 10px; margin-top: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.status--wait { background: var(--gold-soft); color: #6A4D12; }
.status--stop { background: var(--alert-soft); color: var(--alert); }

/* ---------- Sign in, guest, account ---------- */
.authbox { display: grid; gap: 14px; }
.authbox__or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.authbox__or::before, .authbox__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.authbox__intro { margin: 0; color: var(--muted); }
.authbox__perks { display: grid; gap: 8px; margin: 0; padding: 16px 18px; list-style: none; border-radius: var(--r-lg); background: var(--beige); font-size: .86rem; }
.authbox__perks li { display: flex; gap: 10px; align-items: center; }
.authbox__perks .ic { color: var(--gold-ink); }
.tabs2 { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--beige); }
.tabs2 button { flex: 1; height: 38px; border: 0; border-radius: 999px; background: none; font-size: .84rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs2 button[aria-selected="true"] { background: var(--paper); color: var(--maroon); box-shadow: var(--shadow-sm); }
.guest { padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); display: grid; gap: 12px; }
.guest p { margin: 0; font-size: .86rem; color: var(--muted); }
.acct__hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.acct__avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon); color: var(--gold-soft); font: 700 1.3rem/1 var(--display); overflow: hidden; flex: none; }
.acct__avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct__hero b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--maroon-ink); line-height: 1.1; }
.acct__hero div > span { font-size: .82rem; color: var(--muted); }
.acct__tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 18px; padding: 0 4px; }
.acct__tabs::-webkit-scrollbar { display: none; }
.acct__tabs button { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .8rem; font-weight: 700; color: var(--brown); cursor: pointer; }
.acct__tabs button[aria-selected="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--gold-soft); }
.mycoupon { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 10px; border: 1.5px dashed var(--gold); border-radius: var(--r-md); background: var(--gold-soft); }
.mycoupon.is-used { opacity: .55; border-style: solid; background: var(--beige); }
.mycoupon code { font: 800 .95rem/1 var(--sans); letter-spacing: .08em; color: var(--maroon-ink); }
.mycoupon small { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; }
.addr { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: .86rem; }
.addr b { display: block; }

/* ---------- Spin & Win ---------- */
.wheelwrap { position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 6px auto 18px; }
.wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--gold), 0 0 0 9px var(--maroon-deep), var(--shadow-lg); transition: transform 4.6s cubic-bezier(.12, .7, .08, 1); }
.wheel text { font: 800 15px var(--sans); }
.wheel__pin { position: absolute; left: 50%; top: -14px; width: 30px; height: 40px; transform: translateX(-50%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); z-index: 2; }
.wheel__hub { position: absolute; inset: 39%; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff8ea, var(--gold-soft)); box-shadow: 0 0 0 4px var(--gold), var(--shadow-md); font: 800 .76rem/1.1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--maroon); text-align: center; }
.spinresult { text-align: center; animation: rise-in .4s var(--ease); }
.spinresult b { display: block; font-family: var(--display); font-size: 2.4rem; line-height: 1.05; color: var(--maroon); font-weight: 600; }
.spinresult p { margin: 6px 0 14px; color: var(--muted); }
.spinodds { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: .76rem; color: var(--muted); }
.spinodds li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--line-strong); padding: 3px 0; }
canvas.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }

/* ---------- My orders & saved ---------- */
.ocard { display: grid; gap: 10px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.ocard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ocard__no { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--maroon); }
.ocard ul { margin: 0; padding-left: 18px; font-size: .875rem; }

/* ---------- Filters sheet ---------- */
.fgroup { margin: 0 0 26px; padding: 0; border: 0; }
.fgroup legend { margin-bottom: 12px; font: 700 .72rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.fgroup .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.toggle input { width: 20px; height: 20px; accent-color: var(--maroon); }
.check { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: .84rem; font-weight: 600; transition: border-color .2s, background-color .2s; }
.check input { accent-color: var(--maroon); }
.check:has(input:checked) { border-color: var(--maroon); background: #FBF3F1; color: var(--maroon); font-weight: 700; }

/* ---------- Footer ---------- */
.foot { position: relative; margin-top: var(--section); background: var(--maroon-ink); color: rgba(250, 243, 230, .72); font-size: .875rem; line-height: 1.75; padding-top: clamp(52px, 7vw, 84px); padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--maroon), var(--gold), var(--maroon)); }
.foot__grid { display: grid; gap: 36px; padding-bottom: 40px; }
@media (min-width: 800px) { .foot__grid { grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 48px; } }
.foot p { margin: 0; }
.foot__name { font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1.05; color: #FFF6E6; margin-bottom: 6px !important; }
.foot__tag { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--gold-2); margin-bottom: 14px !important; }
.foot__contact { margin-top: 14px !important; }
.foot__h { margin-bottom: 10px !important; font: 700 .68rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.foot nav { display: grid; gap: 4px; justify-items: start; align-content: start; }
.foot a, .foot .linkbtn { color: rgba(250, 243, 230, .88); text-decoration: none; background-image: linear-gradient(var(--gold-2), var(--gold-2)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s var(--ease), color .2s; }
.foot a:hover, .foot .linkbtn:hover { background-size: 100% 1px; color: #FFF6E6; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid rgba(250, 243, 230, .12); font-size: .75rem; color: rgba(250, 243, 230, .55); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 95; display: flex; align-items: center; gap: 16px; width: max-content; max-width: calc(100vw - 32px); padding: 13px 20px; border-radius: 999px; background: var(--maroon-ink); color: #FFF6E6; font-size: .86rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .2s ease, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { padding: 0; border: 0; background: none; color: var(--gold-2); font-weight: 800; white-space: nowrap; cursor: pointer; }
@media (min-width: 1000px) { .toast { bottom: 28px; } }

/* While searching, only the results show. */
body.searching .home-only { display: none !important; }
body.searching .catalog-band { margin-top: 0; }

/* ---------- Entrance ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Admin header (admin page) ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--maroon-deep); color: var(--white); }
.bar__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; padding-bottom: 10px; }
.bar .brand { color: #FFF6E6; display: grid; }
.bar .brand__name { font-size: 1.7rem; }
.bar .brand__sub { color: rgba(250, 243, 230, .7); letter-spacing: .08em; text-transform: none; font-size: .8rem; font-weight: 500; }

/* ---------- Information pages ---------- */
.mast--simple .mast__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand tools"; }
.backlink { grid-area: tools; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--maroon); font-size: .84rem; font-weight: 700; text-decoration: none; background: var(--paper); }
.backlink:hover { background: var(--maroon); color: var(--gold-soft); border-color: var(--maroon); }
.pagehead { position: relative; overflow: hidden; background: radial-gradient(120% 160% at 85% 0%, #7A1426, var(--maroon) 40%, var(--maroon-deep)); color: var(--ivory); }
.pagehead .wrap { padding-top: clamp(44px, 6vw, 80px); padding-bottom: clamp(36px, 5vw, 60px); }
.pagehead h1 { color: #FFF6E6; font-size: clamp(2.6rem, 1.8rem + 3vw, 4.2rem); }
.pagehead__intro { margin: 14px 0 0; max-width: 56ch; font-size: 1.08rem; color: rgba(250, 243, 230, .86); }
.pagehead .updated { margin: 14px 0 0; color: rgba(250, 243, 230, .7); font-size: .875rem; }
.policy-layout { display: grid; gap: 36px; padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(24px, 4vw, 40px); }
@media (min-width: 940px) { .policy-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; } }
.policy-nav { display: grid; gap: 2px; align-content: start; padding: 10px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); }
@media (min-width: 940px) { .policy-nav { position: sticky; top: 110px; } }
@media (max-width: 939px) { .policy-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 999px; } .policy-nav::-webkit-scrollbar { display: none; } .policy-nav a { flex: none; white-space: nowrap; padding: 8px 14px; border-radius: 999px; } }
.policy-nav a { display: block; padding: 10px 14px; border-radius: var(--r-md); color: var(--muted); font-size: .86rem; font-weight: 700; text-decoration: none; transition: color .2s, background-color .2s; }
.policy-nav a:hover { color: var(--maroon); background: var(--beige); }
.policy-nav a[aria-current="page"] { color: var(--gold-soft); background: var(--maroon); }
.policy { max-width: 70ch; font-size: 1.05rem; line-height: 1.8; }
.policy > p:first-child { font-size: 1.2rem; line-height: 1.65; color: var(--brown); }
.policy h2 { margin: 42px 0 10px; font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1.12; color: var(--maroon-ink); }
.policy h3 { margin: 26px 0 6px; font-size: 1.02rem; font-weight: 800; color: var(--brown); }
.policy p, .policy li { color: #4A382B; }
.policy ul, .policy ol { padding-left: 1.25em; }
.policy li { margin: 4px 0; }
.policy .fill { background: var(--gold-soft); padding: 1px 6px; border-radius: var(--r-xs); color: #5F4512; }
.policy a { font-weight: 700; }
.policy .callout { margin: 22px 0; padding: 18px 20px; border-radius: var(--r-lg); background: var(--beige); border: 1px solid var(--line); }
.policy .callout p { margin: 0; }
.policy table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .94rem; }
.policy code { font: 800 .86em/1 var(--sans); letter-spacing: .06em; color: var(--maroon); background: var(--gold-soft); padding: 3px 7px; border-radius: var(--r-xs); }
.policy table { display: block; overflow-x: auto; }
.contactgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.contactgrid .callout { margin: 0; line-height: 1.7; }
@media (max-width: 479px) { .backlink span { display: none; } .backlink { padding: 0 12px; } }
.policy th, .policy td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.policy th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--maroon-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-weight: 500; color: var(--gold-ink); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .spinband__wheel { animation: none; }
}
