/* Elvebredd website. Layout and rhythm follow happyvalues.net (the owner's
   reference); colours are the app icon's charcoal + cream. */
:root {
  --bg: #fbf6f0;
  --surface: #ffffff;
  --surface-soft: #f6ece2;
  --segment: #f3e7db;
  --line: #ede0d2;
  --ink: #2a2120;
  --ink-soft: #594a44;
  --muted: #8a7b72;
  --faint: #d3c2b2;
  --accent: #3a3535;
  --accent-deep: #231c1b;
  --on-accent: #ffffff;
  --tint: #f2dcc4;
  --tint-ink: #6b4a30;
  --tile: #f6e8da;
  --link: #8a5a36;
  --green: #2e8b57;
  --green-tint: #e2f5e9;
  --danger: #b53d32;
  --danger-tint: #f5deda;
  --win: #2e8b57;
  --fair: #c08514;
  --lose: #c4473b;
  --r-legendary: #b9821a;
  --r-ultra: #7b56d6;
  --r-rare: #2f7fd0;
  --r-uncommon: #2e8b57;
  --r-common: #8b817a;
  --t-d: #ff6b6b;
  --t-f: #2f9fd6;
  --t-r: #f0457f;
  --t-n: #7fbf2e;
  --t-m: #6a3fd6;
  --radius: 16px;
  --shadow-lg: 0 18px 40px rgba(43, 29, 20, .16);
  --top-bg: rgba(251, 246, 240, .92);
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1b1716;
  --surface: #262020;
  --surface-soft: #2e2726;
  --segment: #332b2a;
  --line: #3b3231;
  --ink: #f7f0e8;
  --ink-soft: #d6cbc1;
  --muted: #a0948c;
  --faint: #5a4f4a;
  --accent: #f2dcc4;
  --accent-deep: #e6c6a4;
  --on-accent: #231c1b;
  --tint: #4a3f3a;
  --tint-ink: #f2dcc4;
  --tile: #3a3535;
  --link: #f2dcc4;
  --green: #4fc28b;
  --green-tint: rgba(79, 194, 139, .14);
  --danger-tint: rgba(238, 106, 106, .14);
  --win: #4fc28b;
  --fair: #e3b04f;
  --lose: #ee6a6a;
  --r-legendary: #e9b44c;
  --r-ultra: #a98bf0;
  --r-rare: #6aa8e8;
  --r-uncommon: #67c28d;
  --r-common: #a49a93;
  --t-m: #8a63e8;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  --top-bg: rgba(27, 23, 22, .92);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--faint); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.1; font-weight: 700; margin: 0; color: var(--ink); }
h1 { font-size: clamp(26px, 3.4vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ── header ─────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 30; background: var(--top-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(10px, 2vw, 26px); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink) !important; font: 700 19px/1 var(--display); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: none; justify-content: center; align-items: center; gap: clamp(2px, 1.4vw, 18px); }
@media (min-width: 980px) { .nav { display: flex; } }
.nav > a, .drop > summary { color: var(--ink-soft) !important; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; list-style: none; }
.drop > summary::-webkit-details-marker { display: none; }
.nav > a:hover, .drop > summary:hover { background: var(--surface-soft); color: var(--ink) !important; text-decoration: none; }
.nav > a[aria-current="page"], .drop > summary[aria-current="page"] { background: var(--tint); color: var(--tint-ink) !important; }
.drop { position: relative; }
.drop > summary svg { width: 15px; height: 15px; }
.drop-sheet, .menu-sheet { position: absolute; top: calc(100% + 10px); z-index: 40; display: grid; gap: 2px; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.drop-sheet { left: 0; }
.drop-sheet a, .menu-sheet a, .menu-theme { color: var(--ink-soft) !important; white-space: nowrap; border-radius: 10px; padding: 9px 12px; font-size: 14.5px; font-weight: 700; }
.drop-sheet a:hover, .menu-sheet a:hover, .menu-theme:hover { background: var(--surface-soft); color: var(--ink) !important; text-decoration: none; }
.menu-sheet a[aria-current="page"] { background: var(--tint); color: var(--tint-ink) !important; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-soft); border: 1px solid var(--line); background: var(--surface); border-radius: 11px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-soft); color: var(--ink); }
.icon-btn.discord:hover { color: #5865f2; }
.icon-btn svg { width: 18px; height: 18px; }
.menu { position: relative; }
.menu > summary { list-style: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; cursor: pointer; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 20px; height: 20px; }
.menu-sheet { right: 0; min-width: 220px; max-height: calc(100vh - 90px); overflow-y: auto; }
.menu-theme { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; cursor: pointer; width: 100%; }
.menu-theme svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .hide-sm { display: none !important; } }

/* ── buttons, chips, pills ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent) !important; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--accent-deep); text-decoration: none; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn.ghost { background: var(--surface); color: var(--ink) !important; border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-soft); }
.btn svg { width: 17px; height: 17px; }
.btn:disabled { opacity: .5; cursor: progress; }
.linkbtn { border: 0; background: none; color: var(--link); font-weight: 800; font-size: 14px; cursor: pointer; padding: 0; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft) !important; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--surface-soft); text-decoration: none; }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent) !important; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrapped { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft) !important; }
.badge.rar { border: 0; }
.badge.trend-up { background: var(--green-tint); color: var(--green) !important; border: 0; }
.badge.trend-down { background: var(--danger-tint); color: var(--danger) !important; border: 0; }
.badge.trend-flat { background: var(--segment); color: var(--muted) !important; border: 0; }
.rar-legendary { color: var(--r-legendary) !important; }
.rar-ultra-rare { color: var(--r-ultra) !important; }
.rar-rare { color: var(--r-rare) !important; }
.rar-uncommon { color: var(--r-uncommon) !important; }
.rar-common, .rar-none { color: var(--r-common) !important; }
.badge.rar-legendary { background: color-mix(in srgb, var(--r-legendary) 14%, transparent); }
.badge.rar-ultra-rare { background: color-mix(in srgb, var(--r-ultra) 13%, transparent); }
.badge.rar-rare { background: color-mix(in srgb, var(--r-rare) 12%, transparent); }
.badge.rar-uncommon { background: color-mix(in srgb, var(--r-uncommon) 13%, transparent); }
.badge.rar-common, .badge.rar-none { background: var(--segment); }
.tag { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 6px; font: 800 10.5px/1 var(--body); color: #fff; }
.tag-D { background: var(--t-d); } .tag-F { background: var(--t-f); } .tag-R { background: var(--t-r); }
.tag-N { background: var(--t-n); } .tag-M { background: var(--t-m); }
.up { color: var(--win); } .down { color: var(--lose); }
.live-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── page structure ────────────────────────────────────────────────── */
main { display: block; min-height: 60vh; }
.section { margin: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.section-head a { font-weight: 800; font-size: 14px; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 16px; }
@media (min-width: 720px) { .pad { padding: 22px; } }
.ptitle { border-left: 4px solid var(--tint); padding: 2px 0 2px 16px; margin: 28px 0 22px; }
.ptitle h1 { margin-bottom: 8px; }
.ptitle p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 640px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--ink-soft) !important; font-weight: 600; }
.crumbs span[aria-hidden] { color: var(--faint); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.more-row { display: flex; justify-content: center; margin: 18px 0; }

/* ── articles (the owner's text) ───────────────────────────────────── */
.article { max-width: 720px; padding-top: 40px; padding-bottom: 24px; }
.article > h1 { margin-bottom: 10px; }
.article > .meta { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.prose { display: grid; gap: 14px; max-width: 720px; color: var(--ink-soft); overflow-wrap: anywhere; }
.home-article .prose { margin: 0 auto; }
.prose > * { margin: 0; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }
.prose p.lede { font-size: 18px; line-height: 1.5; }
.prose strong, .prose b { color: var(--ink); font-weight: 800; }
.prose h1 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 8px; }
.prose h2 { font-size: 22px; margin-top: 18px; }
.prose h3 { font-size: 17px; margin-top: 8px; }
.prose h1 strong, .prose h2 strong, .prose h3 strong { font-weight: inherit; color: inherit; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; }
.prose li::marker { color: var(--muted); }
.prose a { font-weight: 700; }
.prose mark { background: var(--tint); color: var(--tint-ink); padding: 1px 6px; border-radius: 6px; }
.prose figure { margin: 6px 0; }
.prose figure img, .prose > img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.prose figcaption { color: var(--muted); font-size: 13px; text-align: center; margin-top: 8px; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 14.5px; background: var(--surface); border-radius: 12px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.prose th { background: var(--surface-soft); color: var(--ink); }
.prose blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--faint); background: var(--surface-soft); border-radius: 0 12px 12px 0; }
.prose details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.prose details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; font-weight: 800; color: var(--ink); font-size: 15px; }
.prose details summary strong { font-weight: 800; }
.prose details summary::-webkit-details-marker { display: none; }
.prose details summary::after { content: "+"; flex: none; font: 600 22px/1 var(--body); color: var(--tint-ink); }
.prose details[open] summary::after { content: "–"; }
.prose details > :not(summary) { margin: 0 0 16px; }
.prose details + details { margin-top: -6px; }
.prose-cta { margin-top: 10px !important; }
.prose .section { margin: 10px 0; }

/* ── home hero ─────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 0 0 4px; }
.hero-art { position: relative; height: 180px; margin: 0 -16px 18px; overflow: hidden; border-radius: 0 0 28px 28px; background: radial-gradient(60% 90% at 50% 100%, #4a4343, #2a2423 70%); }
@media (min-width: 720px) { .hero-art { margin: 0 0 22px; border-radius: 0 0 28px 28px; height: 220px; } }
.hero-art .floaters { position: absolute; inset: 0; }
.hero-art .floaters img { position: absolute; width: 66px; height: 66px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
@media (min-width: 720px) { .hero-art .floaters img { width: 84px; height: 84px; } }
.hero-art .logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 108px; height: 108px; border-radius: 26px; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .7), 0 0 0 4px rgba(242, 220, 196, .18); }
.hero-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 0 auto 16px; }
.hero-ctas .btn { height: 52px; font-size: 15px; padding: 0 10px; }
.hero-ctas .btn svg { width: 16px; height: 16px; }
.title-pill { display: inline-block; max-width: 100%; padding: 8px 16px; border-radius: 14px; background: var(--tint); color: var(--tint-ink); margin: 0 auto 12px; }
.title-pill h1 { font: 700 clamp(15px, 3.6vw, 19px)/1.35 var(--display); color: inherit; letter-spacing: -.01em; }
.hero .intro { max-width: 620px; margin: 0 auto; color: var(--ink-soft); font-size: 16.5px; line-height: 1.55; }
.hero .intro p { margin: 0; }
.hero .stores { justify-content: center; margin-top: 16px; }

/* ── calculator (laid out like the app) ────────────────────────────── */
.calc .result { padding: 12px; margin-bottom: 12px; }
.wfl { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 12px; overflow: hidden; background: var(--segment); }
.wfl span { text-align: center; padding: 9px 0; font: 800 13px/1 var(--body); letter-spacing: .06em; color: var(--muted); transition: background .2s, color .2s; }
.wfl span + span { border-left: 1px solid var(--surface); }
.wfl[data-r="WIN"] .w { background: var(--win); color: #fff; }
.wfl[data-r="FAIR"] .f { background: var(--fair); color: #fff; }
.wfl[data-r="LOSE"] .l { background: var(--lose); color: #fff; }
.scores { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; margin: 12px 0 6px; text-align: center; }
.scores > i { height: 40px; background: linear-gradient(transparent, var(--line), transparent); }
.scores span { display: block; font: 800 11px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.scores b { font: 800 24px/1.3 var(--display); font-variant-numeric: tabular-nums; }
.scores div:last-child b { color: var(--green); }
.diffrow { display: flex; justify-content: center; align-items: center; gap: 8px; font: 800 11px var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.diffrow b { font: 800 14px var(--body); letter-spacing: 0; color: var(--ink-soft); padding: 3px 10px; border-radius: 999px; background: var(--segment); }
.meter { position: relative; height: 10px; border-radius: 9px; margin: 12px 4px 2px; background: linear-gradient(90deg, var(--win), var(--fair) 50%, var(--lose)); }
.meter i { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); transform: translate(-50%, -50%); left: 50%; transition: left .35s cubic-bezier(.2, .8, .2, 1); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
@media (min-width: 760px) { .sides { gap: 16px; } }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; border-top: 4px solid var(--accent); }
.side[data-side="them"] { border-top-color: var(--green); }
.side-head { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.side-head h3 { font: 800 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.side-head h3 small { display: block; font: 600 11px/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 4px; }
.side-head .tot { margin-left: auto; font-weight: 800; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-sum { font: 800 17px/1 var(--display); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.side[data-side="them"] .side-sum { color: var(--green); }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 760px) { .slots { gap: 8px; } }
.slot { position: relative; aspect-ratio: 1; border-radius: 11px; border: 1px dashed var(--faint); background: var(--bg); display: grid; place-items: center; cursor: pointer; padding: 3px; color: var(--muted); min-width: 0; }
.slot:hover { border-color: var(--muted); color: var(--ink); }
.slot.filled { border: 0; background: var(--tile); }
.slot .plus { display: grid; justify-items: center; font-size: 10px; font-weight: 800; gap: 3px; line-height: 1; }
.slot .plus b { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 16px; font-weight: 500; }
.slot img { width: 78%; height: 78%; object-fit: contain; }
.slot .tags { position: absolute; left: 2px; bottom: 2px; display: flex; gap: 1px; }
.slot .tags .tag { min-width: 13px; height: 13px; font-size: 8px; border-radius: 4px; padding: 0 2px; }
.slot .x { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 11px; line-height: 1; display: grid; place-items: center; }
.slot .v { position: absolute; right: 3px; top: 2px; font-size: 9px; font-weight: 800; color: var(--tint-ink); }
.calc-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-top: 12px; }
.calc-actions { display: flex; gap: 8px; }
.calc-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.unit-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--surface); }
.unit-toggle button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--muted); }
.unit-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* item picker + sheets */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(30, 20, 15, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 90vh; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.sheet.open { transform: none; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(680px, 94vw); max-height: 84vh; border-radius: 22px; transform: translate(-50%, -47%) scale(.985); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
}
.sheet-grip { width: 40px; height: 4px; border-radius: 9px; background: var(--line); margin: 10px auto 2px; }
@media (min-width: 720px) { .sheet-grip { display: none; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; }
.sheet-head h2 { font-size: 20px; }
.sheet-head .icon-btn { margin-left: auto; }
.sheet-body { overflow-y: auto; padding: 0 16px 18px; overscroll-behavior: contain; }
.app-sheet { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 6px 0 10px; }
.app-sheet img { border-radius: 18px; }
.app-sheet h3 { font-size: 22px; }
.app-sheet p { margin: 0; color: var(--ink-soft); }
.app-sheet .note { color: var(--muted); font-size: 13px; }
.picker-tools { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 2px 0 10px; display: grid; gap: 10px; }
.search { position: relative; display: block; }
.search input { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px 0 44px; font: 500 15.5px var(--body); color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--faint); box-shadow: 0 0 0 4px var(--surface-soft); }
.search svg { position: absolute; left: 15px; top: 14px; width: 20px; height: 20px; color: var(--muted); }
.variant-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vbtn { height: 38px; min-width: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; font-size: 13.5px; cursor: pointer; color: var(--ink-soft); }
.vbtn[aria-pressed="true"][data-k="r"] { background: var(--t-d); border-color: var(--t-d); color: #fff; }
.vbtn[aria-pressed="true"][data-k="n"] { background: var(--t-n); border-color: var(--t-n); color: #fff; }
.vbtn[aria-pressed="true"][data-k="m"] { background: var(--t-m); border-color: var(--t-m); color: #fff; }
.vbtn[aria-pressed="true"][data-k="f"] { background: var(--t-f); border-color: var(--t-f); color: #fff; }
.vbtn[aria-pressed="true"][data-k="ri"] { background: var(--t-r); border-color: var(--t-r); color: #fff; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 480px) { .pick-grid { grid-template-columns: repeat(4, 1fr); } }
.pick { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 6px 9px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; }
.pick:hover { background: var(--surface-soft); }
.pick img { width: 56px; height: 56px; object-fit: contain; background: var(--tile); border-radius: 12px; padding: 4px; }
.pick b { font-size: 12px; font-weight: 800; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink); }
.pick small { font-weight: 800; color: var(--tint-ink); font-size: 12.5px; }

/* ── live trades ───────────────────────────────────────────────────── */
.trades { display: grid; gap: 12px; }
@media (min-width: 860px) { .trades { grid-template-columns: 1fr 1fr; } }
.trade { padding: 12px; }
.trade-head { display: flex; align-items: center; gap: 10px; }
.trade-head .av { width: 40px; height: 40px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; font: 800 13px var(--body); color: var(--tint-ink); overflow: hidden; flex: none; }
.trade-head .av img { width: 100%; height: 100%; object-fit: cover; }
.trade-head .who { min-width: 0; }
.trade-head .who b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-head .who span { font-size: 12.5px; color: var(--muted); }
.trade-head .st { margin-left: auto; font: 800 11px/1 var(--body); letter-spacing: .08em; color: var(--green); background: var(--green-tint); padding: 6px 10px; border-radius: 999px; }
.trade-body { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; margin: 12px 0; }
.tbox { border-radius: 14px; padding: 8px; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.tbox.give { background: color-mix(in srgb, var(--tint) 40%, var(--surface)); border: 1px solid var(--tint); }
.tbox.want { background: color-mix(in srgb, var(--green) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }
.tbox .thumbs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.tbox .th { position: relative; width: 38px; height: 38px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; }
.tbox .th img { width: 86%; height: 86%; object-fit: contain; }
.tbox .th .tags { position: absolute; right: -3px; bottom: -3px; display: flex; gap: 1px; }
.tbox .th .tags .tag { min-width: 12px; height: 12px; font-size: 8px; border-radius: 3px; padding: 0 2px; }
.tbox .th.more { font: 800 12px var(--body); color: var(--muted); }
.tbox .lbl { text-align: center; font: 800 10px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--tint-ink); }
.tbox.want .lbl { color: var(--green); }
.tbox .lbl em { font-style: normal; display: inline-grid; place-items: center; min-width: 16px; height: 16px; border-radius: 99px; background: var(--surface); margin-left: 4px; font-size: 10px; }
.trade-body .arrow { width: 28px; height: 28px; border-radius: 50%; background: var(--segment); display: grid; place-items: center; color: var(--muted); }
.trade-body .arrow svg { width: 14px; height: 14px; }
.trade-foot { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.trade-foot .ibtn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-soft); }
.trade-foot .ibtn:hover { background: var(--surface-soft); color: var(--ink); }
.trade-foot .ibtn svg { width: 16px; height: 16px; }
.wflb { font: 800 11px/1 var(--body); letter-spacing: .04em; padding: 6px 9px; border-radius: 8px; }
.wflb.WIN { background: var(--green-tint); color: var(--win); }
.wflb.FAIR { background: color-mix(in srgb, var(--fair) 15%, transparent); color: var(--fair); }
.wflb.LOSE { background: var(--danger-tint); color: var(--lose); }
.trade-foot .acts { margin-left: auto; display: flex; gap: 6px; }
.trade-foot .acts .btn { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.trade-foot .acts .btn.go { background: var(--green); color: #fff !important; }
.skeleton { min-height: 190px; }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--segment), var(--surface-soft), var(--segment)); background-size: 200% 100%; animation: sk 1.2s infinite; }
.sk-head { height: 40px; width: 60%; }
.sk-body { height: 100px; margin-top: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── values ────────────────────────────────────────────────────────── */
.vtools { display: grid; gap: 10px; margin: 0 0 12px; }
.vtools.card { padding: 12px; }
.vtools-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.select { height: 38px; border-radius: 11px; border: 1px solid var(--line); background-color: var(--surface); color: var(--ink); padding: 0 32px 0 12px; font: 700 13.5px var(--body); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a7b72' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.result-count { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.icard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 10px; color: var(--ink) !important; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: background .15s; }
.icard:hover { background: var(--surface-soft); text-decoration: none; }
.icard .art { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--tile); margin-bottom: 8px; }
.icard .art img { width: 82%; height: 82%; object-fit: contain; }
.icard .rank { position: absolute; left: 10px; top: 9px; font-size: 11px; font-weight: 800; color: var(--muted); }
.icard .chg { position: absolute; right: 10px; top: 9px; font-size: 11px; font-weight: 800; }
.icard .nm { font-weight: 800; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard .rl { font: 800 10px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.icard .val { margin-top: 6px; font: 800 19px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.icard .mini { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 6px; font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.icard .mini span { background: var(--segment); border-radius: 6px; padding: 2px 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.icard .mini i { font-style: normal; margin-right: 2px; }
.icard .mini .n i { color: var(--t-n); } .icard .mini .m i { color: var(--t-m); } .icard .mini .r i { color: var(--t-d); }
.catgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 860px) { .catgrid { grid-template-columns: repeat(3, 1fr); } }
.catcard { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 14px; color: var(--ink) !important; }
.catcard:hover { background: var(--surface-soft); text-decoration: none; }
.catcard .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--tile); display: grid; place-items: center; }
.catcard .ic img { width: 80%; height: 80%; object-fit: contain; }
.catcard b { font: 700 17px/1.2 var(--display); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.catcard b em { font: 800 11px/1 var(--body); font-style: normal; padding: 3px 7px; border-radius: 999px; background: var(--segment); color: var(--muted); }
.catcard small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 4px; }
@media (max-width: 420px) { .catcard { grid-template-columns: 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; } }
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink) !important; min-width: 0; }
.tile:hover { background: var(--surface-soft); text-decoration: none; }
.tile .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--tile); display: grid; place-items: center; }
.tile .ic img { width: 82%; height: 82%; object-fit: contain; }
.tile b { font-size: 12.5px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile small { font: 800 9.5px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 10px; overflow-x: auto; padding: 2px 16px 8px; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .tile { scroll-snap-align: start; padding: 12px 8px; }
.hscroll .tile small { font-size: 12.5px; letter-spacing: 0; text-transform: none; }
@media (min-width: 900px) { .hscroll { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; margin: 0; padding: 0; } }

/* ── item page ─────────────────────────────────────────────────────── */
.item-top { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: start; margin-top: 18px; }
@media (min-width: 720px) { .item-top { grid-template-columns: 220px 1fr; gap: 26px; } }
.item-art { aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.item-art img { width: 80%; height: 80%; object-fit: contain; }
.item-top h1 { margin-bottom: 8px; }
.item-top .desc { color: var(--ink-soft); margin: 0 0 12px; font-size: 16px; }
.item-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bigval { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.bigval b { font: 800 clamp(30px, 8vw, 40px)/1 var(--display); font-variant-numeric: tabular-nums; }
.bigval span { color: var(--muted); font-size: 14px; }
@media (max-width: 719px) { .item-top .wide { grid-column: 1 / -1; } }
.vtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 12px; }
.vtable th, .vtable td { padding: 12px 8px; text-align: right; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.vtable th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.vtable td:first-child, .vtable th:first-child { text-align: left; white-space: nowrap; }
.vtable tr:last-child td { border-bottom: 0; }
.vtable .tag { margin-right: 8px; }
@media (max-width: 420px) { .vtable th, .vtable td { padding: 10px 5px; font-size: 14px; } .vtable .tag { margin-right: 5px; } }
.chart-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--segment); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.chart { position: relative; height: 220px; }
@media (min-width: 720px) { .chart { height: 280px; } }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; touch-action: pan-y; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 800; transform: translate(-50%, -125%); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.chart .tip.on { opacity: 1; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); }
.chart-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.chart-foot b { color: var(--ink); }
.changes { list-style: none; margin: 0; padding: 0; }
.changes li { display: flex; align-items: center; gap: 6px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.changes li:last-child { border-bottom: 0; }
.changes .when { color: var(--muted); font-size: 13px; min-width: 84px; }
.changes .ft { margin-left: auto; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── value updates ─────────────────────────────────────────────────── */
.uday { margin-bottom: 16px; overflow: hidden; }
.uday-head { display: flex; align-items: center; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.uday-head h2 { font-size: 17px; }
.uday-head .cnt { margin-left: auto; display: flex; gap: 10px; font-weight: 800; font-size: 13px; color: var(--muted); }
.urow { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; color: var(--ink) !important; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: 0; }
.urow:hover { background: var(--surface-soft); text-decoration: none; }
.urow img { width: 44px; height: 44px; object-fit: contain; background: var(--tile); border-radius: 12px; padding: 3px; }
.urow .nm { font-weight: 800; line-height: 1.25; font-size: 14.5px; }
.urow .nm small { display: flex; gap: 3px; align-items: center; color: var(--muted); font-weight: 600; margin-top: 4px; font-size: 12px; }
.urow .ft { text-align: right; font-weight: 800; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.urow .ft small { display: block; font-size: 12px; margin-top: 2px; }
.uday details summary { list-style: none; cursor: pointer; padding: 13px 16px; text-align: center; font-weight: 800; color: var(--link); border-top: 1px solid var(--line); }
.uday details summary::-webkit-details-marker { display: none; }
.uday details[open] summary { display: none; }
.pager { display: flex; justify-content: center; gap: 10px; margin: 18px 0 8px; }

/* ── app card (owner's words) + stores ─────────────────────────────── */
.promo { display: grid; gap: 14px; align-items: center; padding: 20px; border: 0; color: #f7f0e8; background: radial-gradient(120% 140% at 0% 0%, #4a4343, #2a2423 65%); border-radius: var(--radius); }
@media (min-width: 760px) { .promo { grid-template-columns: auto 1fr auto; padding: 24px 28px; } }
.promo img { width: 60px; height: 60px; border-radius: 15px; margin: 0 !important; border: 0 !important; }
.promo h2 { color: #fff !important; font-size: 21px; margin: 0 0 4px !important; }
.promo p { margin: 0 !important; color: #d9cec3 !important; font-size: 15px; }
.promo-tags { list-style: none; display: flex !important; flex-wrap: wrap; gap: 6px !important; padding: 0 !important; margin: 10px 0 0 !important; }
.promo-tags li { font-size: 12px !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(242, 220, 196, .14); color: #f2dcc4 !important; margin: 0; }
.app-sheet .promo-tags { justify-content: center; }
.app-sheet .promo-tags li { background: var(--tint); color: var(--tint-ink) !important; }
.promo-tags li::marker { content: ""; }
.promo .promo-note { font-size: 12.5px !important; color: #b8aaa0 !important; margin-top: 8px !important; }
.stores { display: flex; gap: 8px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 15px; border-radius: 12px; background: #111; color: #fff !important; font-weight: 800; font-size: 14.5px; }
.store small { display: block; font-size: 9.5px; font-weight: 600; opacity: .8; line-height: 1; }
.store span { line-height: 1.1; text-align: left; }
.store:hover { text-decoration: none; filter: brightness(1.25); }
.store svg { width: 21px; height: 21px; }
.promo .store { background: #f2dcc4; color: #2a2221 !important; }

/* ── footer (happyvalues layout) ───────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); margin-top: 56px; padding: 40px 0 32px; font-size: 13px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: clamp(16px, 3vw, 32px); }
.foot-brand { grid-column: 1 / -1; display: grid; gap: 12px; align-content: start; max-width: 360px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.5fr repeat(5, 1fr); } .foot-brand { grid-column: auto; } }
.foot-brand p { color: var(--ink-soft); margin: 0; font-size: 13.5px; line-height: 1.55; }
.foot-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.foot-cta .btn svg { width: 16px; height: 16px; }
.foot-col { display: grid; gap: 9px; align-content: start; min-width: 0; }
.foot-col h2 { font: 800 12px/1.2 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.foot-col a { color: var(--ink-soft) !important; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.foot-bottom { border-top: 1px solid var(--line); display: grid; gap: 8px; margin-top: 32px; padding-top: 18px; }
.foot-bottom p { max-width: 780px; margin: 0; font-size: 12px; line-height: 1.55; }

/* ── forms, search results, toast ──────────────────────────────────── */
.form { display: grid; gap: 12px; }
.form label { font-weight: 800; font-size: 14px; display: grid; gap: 6px; color: var(--ink); }
.form input, .form textarea, .form select { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 11px 13px; font: 500 15.5px var(--body); }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--faint); box-shadow: 0 0 0 4px var(--surface-soft); }
.form .note { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.form-msg { padding: 11px 14px; border-radius: 12px; font-weight: 800; font-size: 14.5px; }
.form-msg.ok { background: var(--green-tint); color: var(--green); }
.form-msg.err { background: var(--danger-tint); color: var(--danger); }
.sresults { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sresults a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; color: var(--ink) !important; }
.sresults a:hover, .sresults a.sel { background: var(--surface); text-decoration: none; }
.sresults img { width: 44px; height: 44px; object-fit: contain; background: var(--tile); border-radius: 12px; padding: 3px; }
.sresults b { font-weight: 800; }
.sresults small { color: var(--muted); display: block; font-size: 12.5px; }
.sresults .v { font: 800 16px var(--display); }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--surface-soft); color: var(--ink-soft); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; z-index: 70; background: var(--accent); color: var(--on-accent); padding: 10px 18px; border-radius: 12px; font-weight: 800; font-size: 14px; transition: all .2s; pointer-events: none; box-shadow: var(--shadow-lg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── Grow a Garden calculator ──────────────────────────────────────── */
.gag { padding: 0; overflow: hidden; }
.gag-head { padding: 16px; background: var(--surface-soft); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.gag-body { padding: 16px; display: grid; gap: 16px; }
@media (min-width: 820px) { .gag-body { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.gag h3 { margin: 0 0 8px; font-size: 16px; }
.gag-plant { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.gag-plant img { width: 76px; height: 76px; object-fit: contain; border-radius: 18px !important; background: var(--tile); margin: 0 !important; border: 0 !important; padding: 6px; }
.gag-plant h3 { margin: 0 0 6px; font-size: 20px; }
.gag-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.gag-facts div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; font-size: 14px; line-height: 1.35; }
.gag-facts span { display: block; color: var(--muted); font: 800 10px/1.4 var(--body); text-transform: uppercase; letter-spacing: .1em; }
.gag-facts b { font-weight: 800; color: var(--ink); }
.gag-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gag-fields label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.gag-fields input, .gag-fields select { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: 700 15.5px var(--body); width: 100%; }
.gag-muts { display: flex; flex-wrap: wrap; gap: 6px; max-height: 230px; overflow-y: auto; padding: 2px; }
.gag-mut { height: 34px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 13px; font-weight: 800; cursor: pointer; }
.gag-mut small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.gag-mut[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gag-mut[aria-pressed="true"] small { color: inherit; opacity: .75; }
.gag-result { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gag-result div { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; min-width: 0; }
.gag-result span { display: block; font: 800 10px/1.4 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.gag-result b { font: 800 18px/1.3 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gag-result .total { grid-column: 1 / -1; background: var(--accent); border-color: var(--accent); }
.gag-result .total span, .gag-result .total b { color: var(--on-accent); }
.gag-result .total b { font-size: 28px; }
.gag-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 290px; overflow-y: auto; padding: 2px; }
@media (min-width: 560px) { .gag-list { grid-template-columns: repeat(5, 1fr); } }
.gag-pick { display: grid; justify-items: center; gap: 3px; padding: 7px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 800; color: var(--ink); text-align: center; line-height: 1.2; }
.gag-pick img { width: 42px; height: 42px; object-fit: contain; margin: 0 !important; border: 0 !important; border-radius: 10px !important; }
.gag-pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
@media (min-width: 980px) { .menu { display: none; } }

/* ── designed content blocks inside the owner's text ───────────────── */
.prose h2 { padding-top: 6px; }
.prose h2::after { content: ""; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--tint); margin-top: 12px; }
.prose h3 { color: var(--ink); }
.fi { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--tint-ink); display: grid; place-items: center; }
.fi svg { width: 20px; height: 20px; }
.fi b { font: 800 16px var(--display); color: var(--tint-ink) !important; }

/* "Term: explanation" lists → feature cards */
.feats { display: grid; gap: 10px; }
@media (min-width: 620px) { .feats { grid-template-columns: 1fr 1fr; } .feats.odd > :last-child { grid-column: 1 / -1; } }
.feat { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feat b { display: block; color: var(--ink); font: 700 16px/1.3 var(--display); letter-spacing: -.01em; margin-top: 2px; }
.feat p { margin: 4px 0 0; font-size: 14.5px !important; line-height: 1.55; color: var(--ink-soft); }

/* lists that name real items → item cards with live value */
.pcards { display: grid; gap: 10px; }
@media (min-width: 620px) { .pcards { grid-template-columns: 1fr 1fr; } }
.pcard { display: grid; grid-template-columns: 56px 1fr; gap: 6px 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink) !important; font-weight: 400 !important; }
a.pcard:hover { background: var(--surface-soft); text-decoration: none; }
.pcard .ic { width: 56px; height: 56px; border-radius: 14px; background: var(--tile); display: grid; place-items: center; }
.pcard .ic img { width: 84%; height: 84%; object-fit: contain; }
.pcard .ic.fi { background: var(--tint); }
.pc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pc-main b { font: 700 16px/1.25 var(--display); color: var(--ink); }
.pc-val { display: inline-flex; align-items: baseline; gap: 8px; font: 800 18px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-val small { font: 800 10px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pcard p { grid-column: 1 / -1; margin: 4px 0 0; font-size: 14.5px !important; line-height: 1.55; color: var(--ink-soft); }

/* a single highlighted line */
.pointer { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--tint) 45%, var(--surface)); border: 1px solid var(--tint); }
.pointer b { color: var(--ink); font: 700 16px/1.3 var(--display); }
.pointer b mark { background: none; padding: 0; color: inherit; }
.pointer p { margin: 3px 0 0; font-size: 14.5px !important; }

/* legal "Term: text" lists → calm definition rows */
.defs { margin: 0; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.defs > div { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.defs > div:last-child { border-bottom: 0; }
.defs dt { font-weight: 800; color: var(--ink); font-size: 15px; }
.defs dt strong { font-weight: inherit; }
.defs dd { margin: 3px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

/* plain lists → check marks; numbered lists → steps */
.prose ul.ticks { list-style: none; padding: 0; gap: 8px; }
.prose ul.ticks > li { position: relative; padding-left: 30px; }
.prose ul.ticks > li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.2 3 3 6-6' fill='none' stroke='%236b4a30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
:root[data-theme="dark"] .prose ul.ticks > li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.2 3 3 6-6' fill='none' stroke='%23f2dcc4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.prose ol.steps { list-style: none; padding: 0; counter-reset: st; gap: 10px; }
.prose ol.steps > li { counter-increment: st; position: relative; padding: 14px 16px 14px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.prose ol.steps > li::before { content: counter(st); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 800 14px/1 var(--body); }

/* old WordPress buttons → link buttons; numbered info boxes → steps */
.lbtn-row { margin: 2px 0 !important; }
.lbtn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink) !important; font-weight: 800 !important; font-size: 15px; max-width: 100%; }
.lbtn:hover { background: var(--surface-soft); text-decoration: none; }
.lbtn small { font: 800 10.5px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--tint-ink); background: var(--tint); padding: 5px 8px; border-radius: 8px; }
.lbtn svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.lbtn:hover svg { color: var(--ink); transform: translateX(2px); }
.prose ol.steps > li strong:first-child { display: block; color: var(--ink); font: 700 16px/1.3 var(--display); letter-spacing: -.01em; margin-bottom: 3px; }
@media (min-width: 620px) { .pcards.odd > :last-child { grid-column: 1 / -1; } }
.lbtn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
@media (max-width: 460px) { .lbtn-grid { grid-template-columns: 1fr 1fr; } }
.lbtn-grid .lbtn { justify-content: space-between; width: 100%; font-size: 14px; padding: 12px 14px; }

/* compact trade cards (owner: half the size) */
.trades { gap: 8px; }
@media (min-width: 700px) { .trades { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .trades { grid-template-columns: 1fr 1fr 1fr; } }
.trade { padding: 8px 10px; border-radius: 14px; }
.trade-head { gap: 8px; }
.trade-head .av { position: relative; width: 28px; height: 28px; font-size: 10px; }
.trade-head .av img { position: absolute; inset: 0; }
.trade-head .who { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.trade-head .who b { font-size: 13.5px; }
.trade-head .who span { font-size: 11px; white-space: nowrap; }
.trade-head .st { font-size: 9px; padding: 4px 7px; }
.trade-body { gap: 4px; margin: 6px 0; }
.tbox { padding: 5px; min-height: 0; gap: 3px; border-radius: 10px; }
.tbox .thumbs { gap: 3px; }
.tbox .th { width: 28px; height: 28px; border-radius: 7px; }
.tbox .th .tags { right: -2px; bottom: -2px; }
.tbox .th .tags .tag { min-width: 9px; height: 9px; font-size: 6.5px; border-radius: 2px; padding: 0 1px; }
.tbox .lbl { font-size: 8px; }
.tbox .lbl em { min-width: 13px; height: 13px; font-size: 8px; }
.trade-body .arrow { width: 20px; height: 20px; }
.trade-body .arrow svg { width: 11px; height: 11px; }
.trade-foot { gap: 5px; padding-top: 6px; }
.trade-foot .ibtn { width: 26px; height: 26px; border-radius: 8px; }
.trade-foot .ibtn svg { width: 13px; height: 13px; }
.wflb { font-size: 9.5px; padding: 4px 7px; border-radius: 6px; }
.trade-foot .acts { gap: 5px; }
.trade-foot .acts .btn { height: 26px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.skeleton { min-height: 110px; }
.sk-head { height: 24px; }
.sk-body { height: 54px; margin-top: 8px; }

/* blog */
.posts { display: grid; gap: 14px; }
@media (min-width: 720px) { .posts { grid-template-columns: 1fr 1fr; } }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink) !important; }
.post-card:hover { background: var(--surface-soft); text-decoration: none; }
.post-card .pc-img { aspect-ratio: 16 / 9; background: var(--tile); overflow: hidden; }
.post-card .pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .pc-body { display: grid; gap: 8px; padding: 16px 18px 18px; }
.post-card b { font: 700 20px/1.2 var(--display); letter-spacing: -.02em; }
.post-card .pc-body > span { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.post-card em { font-style: normal; font-weight: 800; font-size: 14px; color: var(--link); display: inline-flex; align-items: center; gap: 6px; }
.post-card em svg { width: 15px; height: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--muted) !important; margin-bottom: 14px; }
.back svg { width: 15px; height: 15px; transform: rotate(180deg); }
.post-card .pc-cat { justify-self: start; font: 800 10.5px/1 var(--body) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--tint-ink) !important; background: var(--tint); padding: 5px 8px; border-radius: 7px; }
.empty-cat { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 32px 16px; }
.empty-cat b { font: 700 19px var(--display); }
.empty-cat p { margin: 0 0 6px; color: var(--muted); }

/* ── item picker (laid out like the app's) ─────────────────────────── */
.sheet.picker { height: 90vh; max-height: 90vh; }
@media (min-width: 720px) { .sheet.picker { width: min(820px, 94vw); height: 86vh; max-height: 86vh; } }
.sheet.picker .sheet-head { padding-bottom: 8px; }
.pk-for { font: 800 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--tint-ink); background: var(--tint); padding: 5px 8px; border-radius: 7px; }
.pk-top { display: grid; gap: 8px; padding: 0 12px 8px; border-bottom: 1px solid var(--line); }
.pk-top .search input { height: 42px; border-radius: 12px; font-size: 15px; box-shadow: none; }
.pk-top .search svg { top: 11px; }
.pk-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pk-mode { flex: none; display: inline-flex; background: var(--segment); border-radius: 10px; padding: 3px; }
.pk-mode button { border: 0; background: none; padding: 6px 9px; border-radius: 8px; font: 800 12px var(--body); color: var(--muted); cursor: pointer; }
.pk-mode button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.pk-cats { flex: 1; min-width: 0; margin: 0; padding: 0; }
.pk-cats .chip { height: 32px; padding: 0 12px; font-size: 13px; }
.pk-cats .chip .star { color: #E0A21B; }
.pk-cats .chip.on .star { color: #fff; }
.pk-rar { margin: 0 -12px; padding: 0 12px; gap: 6px; }
.rchip { flex: none; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); color: color-mix(in srgb, var(--rc) 75%, #000); font: 800 12px var(--body); cursor: pointer; white-space: nowrap; }
:root[data-theme="dark"] .rchip { color: color-mix(in srgb, var(--rc) 70%, #fff); }
.rchip[aria-pressed="true"] { background: var(--rc); border-color: var(--rc); color: #fff; }
.pk-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px 12px; }
.pk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 560px) { .pk-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (min-width: 720px) { .pk-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; } }
.pk-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 3px 6px; min-width: 0; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); background: #fffaf3; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:root[data-theme="dark"] .pk-cell { background: var(--surface); border-color: var(--line); }
.pk-cell:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.pk-cell.on { border: 2px solid var(--accent); background: #f6e3cd; padding: 4px 2px 5px; }
:root[data-theme="dark"] .pk-cell.on { background: var(--tint); }
.pk-cell img { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }
.pk-cell b { font-size: 10px; font-weight: 700; line-height: 1.1; text-align: center; color: #2a2120; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.2em; }
:root[data-theme="dark"] .pk-cell b { color: var(--ink); }
.pk-cell small { font-size: 9.5px; font-weight: 800; color: #6b5b4e; }
:root[data-theme="dark"] .pk-cell small { color: var(--muted); }
.pk-fav { position: absolute; top: 2px; right: 3px; font-style: normal; font-size: 11px; color: #E0A21B; line-height: 1; }
.pk-bar { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 9fr); gap: 10px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -8px 20px rgba(43, 29, 20, .08); }
@media (max-width: 520px) { .pk-bar { grid-template-columns: 1fr; gap: 8px; } }
.pk-bar.empty .pk-sel { visibility: hidden; }
.pk-sel { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 8px 5px 6px; border-radius: 10px; background: #f6e3cd; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
:root[data-theme="dark"] .pk-sel { background: var(--tint); }
.pk-sel img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.pk-sel > div { min-width: 0; flex: 1; display: grid; }
.pk-sel b { font-size: 14px; font-weight: 800; color: #2a2120; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .pk-sel b { color: var(--ink); }
.pk-sel span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-sel strong { font: 900 15px var(--body); color: var(--accent); }
.pk-sel em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); margin-left: 8px; }
.pk-star { flex: none; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--faint); cursor: pointer; }
.pk-star[aria-pressed="true"] { color: #E0A21B; }
.pk-ctrl { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pk-pills { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; min-width: 0; }
.pk-pills button { height: 38px; border-radius: 10px; border: 2px solid var(--pc); background: color-mix(in srgb, var(--pc) 10%, var(--surface)); color: var(--pc); font: 900 15px var(--body); cursor: pointer; }
.pk-pills button[aria-pressed="true"] { background: var(--pc); color: #fff; }
.pk-pills button:disabled { opacity: .3; cursor: not-allowed; }
.pill-f { --pc: var(--t-f); } .pill-r { --pc: var(--t-r); } .pill-d { --pc: var(--t-d); } .pill-n { --pc: var(--t-n); } .pill-m { --pc: var(--t-m); }
.pk-add { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #43A047, #2E7D32); color: #fff; font: 800 14px var(--body); cursor: pointer; }
.pk-add svg { width: 17px; height: 17px; }
.pk-add:hover { filter: brightness(1.06); }

/* support email card (replaces the contact form) */
.mailcard { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mailcard .fi svg { width: 20px; height: 20px; }
.mc-main { display: grid; gap: 3px; min-width: 0; }
.mc-main b { font: 700 17px var(--display); color: var(--ink); }
.mc-main a { font-size: 17px !important; font-weight: 800 !important; overflow-wrap: anywhere; }
.mc-main p { margin: 4px 0 0 !important; font-size: 14.5px !important; color: var(--muted) !important; }
.mc-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 620px) { .mailcard { grid-template-columns: auto 1fr auto; align-items: center; } .mc-act { grid-column: auto; } }
