/* ============================================================
   DramaFlash H5 — vertical-drama storefront
   Dark-first, photo-led, one red accent. Every colour comes from
   shared/tokens.css so the light flip and the admin stay in family.
   Readability floor: no real text under 13px, no control under 44px.
   ============================================================ */

:root {
  --plate: #141418;
  --on-art: #FFFFFF;
  --on-art-2: #D8D8E0;
  --on-art-3: #B4B4C0;
  --glass: rgba(18, 18, 24, .66);
  --glass-line: rgba(255, 255, 255, .14);
  --red-grad: linear-gradient(135deg, #F03A3A 0%, #D92525 52%, #A81A1A 100%);
  --promo-grad: linear-gradient(118deg, #2A1030 0%, #6E1B45 46%, #C22233 100%);
  --gold-grad: linear-gradient(135deg, #F7D06B, #F0B429 55%, #C98A12);
  --lift: 0 14px 30px -20px rgba(0, 0, 0, .95);
  --glow-red: 0 8px 26px -10px rgba(217, 37, 37, .65);
  --tbar-h: 56px;
  --tabbar-h: 0px;
}
html.light {
  --lift: 0 14px 30px -22px rgba(20, 20, 26, .55);
}

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font-family: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the artifact draws its own scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ---------------- shell ---------------- */
#app {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 60% at 85% -10%, rgba(217, 37, 37, .16), transparent 60%),
    radial-gradient(90% 50% at -10% 8%, rgba(22, 93, 255, .12), transparent 62%),
    var(--bg);
}
#views { flex: 1; position: relative; min-height: 0; }
.view { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: none; flex-direction: column; min-height: 0; background: var(--bg); }
.view.active { display: flex; animation: viewIn .26s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pad-x) 26px;
}
#app.bare .tbar { display: none; }

/* ---------------- top bar ---------------- */
.tbar {
  flex: none; height: var(--tbar-h);
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px 0 8px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.ibtn {
  flex: none; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 12px;
  cursor: pointer; transition: background var(--t-fast), transform var(--t-fast);
}
.ibtn:hover { background: var(--neutral-soft); }
.ibtn:active { transform: scale(.94); }
.ibtn.dark { background: var(--glass); border: 1px solid var(--glass-line); color: var(--on-art); }
.ibtn.dark:hover { background: rgba(30, 30, 38, .82); }
.burger { background: var(--card); border: 1px solid var(--line); }
.mark {
  flex: none; background: none; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 800; letter-spacing: -.3px; padding: 0 2px;
  color: var(--ink);
}
.mark i { font-style: normal; color: var(--accent-text); }
.cats {
  flex: 1; min-width: 0; height: 44px;
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
}
.cats::-webkit-scrollbar { height: 3px; }
.cats::-webkit-scrollbar-track { background: transparent; }
.cats::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.cats::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
.cats button {
  flex: none; height: 44px; padding: 0 10px;
  background: none; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted);
  position: relative; white-space: nowrap;
}
.cats button.on { color: var(--ink); font-weight: 800; }
.cats button.on::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 6px;
  height: 3px; border-radius: 3px; background: var(--primary-hi);
}
.pill-prem {
  flex: none; height: 44px; display: inline-flex; align-items: center; gap: 5px;
  padding: 0 11px; border-radius: 99px; cursor: pointer;
  background: var(--gold-grad); border: 0; color: #241A02;
  font-size: 13px; font-weight: 800; letter-spacing: .2px;
  box-shadow: 0 6px 18px -10px rgba(240, 180, 41, .9);
}
.pill-prem:active { transform: scale(.96); }
.authbtn { flex: none; height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
/* the genre strip keeps its room on a phone: the pill goes icon-only and the
   wordmark tightens, so "For You" is never cut in half */
@media (max-width: 479px) {
  .pill-prem { width: 44px; padding: 0; justify-content: center; }
  .pill-prem span { display: none; }
  .mark { font-size: 16px; }
  .authbtn { padding: 0 11px; font-size: 13px; }
  .tbar { gap: 6px; }
}
.tav {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--primary-hi); background: var(--card-2);
  color: var(--ink); font-size: 16px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.tav i {
  position: absolute; top: 1px; right: 1px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary-hi); border: 2px solid var(--bg);
}

/* ---------------- side drawer navigation ----------------
   底部 tab bar 已撤：导航统一走侧边抽屉，主区域拿回整屏高度。 */

/* ---------------- icons ---------------- */
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 17px; height: 17px; }
.icon.lg { width: 30px; height: 30px; }
.icon.fill { fill: currentColor; stroke: none; }

/* ---------------- atoms ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 13px;
  border: 1px solid transparent; cursor: pointer;
  font-size: 15px; font-weight: 700; letter-spacing: .1px;
  transition: transform var(--t-fast), filter var(--t-fast), background var(--t-fast);
}
.btn:active { transform: scale(.975); }
.btn.block { display: flex; width: 100%; }
.btn.primary { background: var(--red-grad); color: #fff; box-shadow: var(--glow-red); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { background: var(--elev); color: var(--muted-2); box-shadow: none; cursor: default; }
.btn.ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { background: var(--card-2); }
.btn.quiet { background: transparent; color: var(--muted); min-height: 44px; }
.btn.quiet:hover { color: var(--ink); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.gold { background: var(--gold-grad); color: #241A02; }

.chip {
  flex: none; height: 44px; padding: 0 16px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all var(--t-fast);
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.active {
  background: var(--primary-soft); border-color: var(--primary-hi);
  color: var(--ink); font-weight: 800;
  box-shadow: 0 0 0 1px var(--primary-line);
}
.qbtn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.qbtn.lock { color: var(--warn); border-color: rgba(224, 164, 88, .45); }
.qbtn:active { transform: scale(.94); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card.pad { padding: 16px; }
.card.list { overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 62px; padding: 10px 14px;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer; text-align: left;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--card-2); }
.row-ico {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--accent-text);
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-label { font-size: 15px; font-weight: 700; }
.row-sub { font-size: 13px; color: var(--muted); }
.row-meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.chev { color: var(--muted-2); }

.empty {
  padding: 34px 18px; text-align: center;
  background: var(--card); border: 1px dashed var(--line-2); border-radius: 16px;
}
.empty p { color: var(--muted); font-size: 14px; }
.note { margin: 16px 2px 0; font-size: 13px; color: var(--muted); }
.legal-note { margin: 14px 2px 0; font-size: 13px; color: var(--muted-2); }
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 13px;
}
.linklike {
  background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 4px;
  color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.linklike:hover { color: var(--ink); }

.sec { padding: 16px 0 0; }
.sec-h { display: grid; gap: 2px; padding: 0 2px 10px; }
.sec-h .eye {
  font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent-text);
}
.sec-h .t { display: flex; align-items: center; gap: 2px; }
.sec-h h4 { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.sec-h .ibtn.chev { width: 44px; height: 44px; margin: -8px 0 -8px -6px; color: var(--muted-2); }
.sec-h .d { font-size: 13px; color: var(--muted); }
.page-h { display: flex; align-items: center; gap: 8px; padding: 16px 0 12px; }
.page-h h2 { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.page-h .d { font-size: 13px; color: var(--muted); }
.page-h .ibtn { margin-left: -10px; }

.chips {
  display: flex; align-items: center;
  overflow-x: auto; overflow-y: hidden;
  padding: 2px 2px 8px; margin: 0 -2px;
  scrollbar-width: thin;
}
.chips::-webkit-scrollbar { height: 4px; }
.chips .chip { margin-right: 8px; }
#cat-row { display: contents; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.ctl {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--ink); font-size: 15px; font-family: inherit;
}
.ctl:focus { outline: none; border-color: var(--primary-hi); box-shadow: 0 0 0 3px var(--primary-soft); }
.ctl::placeholder { color: var(--muted-2); }
select.ctl { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.err { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.fine { margin: 10px 0 0; font-size: 13px; color: var(--muted-2); text-align: center; }

/* ---------------- HOME: hero ---------------- */
#hero-slot { padding-top: 12px; }
.hero {
  position: relative; height: 236px; border-radius: 18px; overflow: hidden;
  background: var(--plate); box-shadow: var(--lift);
  border: 1px solid var(--line); touch-action: pan-y;
}
.hero-art { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.cover { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center 22%; }
.cover .cover-mark {
  position: absolute; left: 14px; bottom: 14px; width: 54%; z-index: 2;
  padding: 8px 12px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line);
  color: var(--on-art); font-size: 18px; font-weight: 800; line-height: 1.2;
  letter-spacing: -.3px; backdrop-filter: blur(8px);
}
.hero-watch { position: absolute; right: 12px; bottom: 12px; min-height: 44px; padding: 0 14px; font-size: 14px; }
.hero .dots { position: absolute; top: 8px; right: 8px; display: flex; }
.hero .dots button {
  width: 32px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hero .dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .45); transition: all var(--t); }
.hero .dots button.on i { width: 20px; background: var(--primary-hi); }

/* ---------------- HOME: grid + cards ---------------- */
.grid { display: flex; flex-wrap: wrap; margin: -6px; padding: 4px 0 0; }
.grid > .dcard, .grid > .promo-tile { width: calc(50% - 12px); margin: 6px; }
@supports (display: grid) {
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
  .grid > .dcard, .grid > .promo-tile { width: auto; margin: 0; }
}
@supports not (display: grid) {
  .grid > .promo-tile { width: calc(100% - 12px); }
}
.dcard {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: none; cursor: pointer; text-align: left;
}
.dcard .art {
  position: relative; display: block; height: 214px; border-radius: 16px; overflow: hidden;
  background: var(--plate); box-shadow: var(--lift);
  border: 1px solid var(--line);
}
.dcard .art img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .5s var(--ease); }
.dcard:hover .art img { transform: scale(1.05); }
.dcard .sc {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(8, 8, 12, .34) 0%, transparent 26%, transparent 42%, rgba(8, 8, 12, .82) 78%, rgba(8, 8, 12, .94) 100%);
}
.dcard .tag {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 9px; border-radius: 8px;
  background: var(--red-grad); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: .6px;
  box-shadow: 0 6px 16px -8px rgba(217, 37, 37, .9);
}
.dcard .tag.gold { background: var(--gold-grad); color: #241A02; }
.dcard .tag.cool { background: linear-gradient(135deg, #3E7BFF, #165DFF); color: #fff; }
.dcard .slots {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--on-art-2);
}
.dcard .slots.on { color: var(--primary-hi); }
.dcard .slots .icon { width: 17px; height: 17px; }
.dcard .meta { position: absolute; left: 12px; right: 12px; bottom: 11px; display: grid; gap: 3px; }
.dcard .meta .t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--on-art); font-size: 14px; font-weight: 800; line-height: 1.25; letter-spacing: -.1px;
}
.dcard .meta .t .age { font-size: 13px; font-weight: 700; color: var(--on-art-3); margin-left: 6px; white-space: nowrap; }
.dcard .meta .sub {
  color: var(--on-art-2); font-size: 13px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dcard.mini { width: 132px; flex: none; }
.dcard.mini .art { height: 176px; }
.dcard.mini .meta .sub { display: none; }

.promo-tile {
  grid-column: 1 / -1; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 10px 12px;
  padding: 14px; border-radius: 16px;
  background: var(--promo-grad);
  border: 1px solid rgba(255, 120, 170, .4);
  box-shadow: 0 16px 34px -22px rgba(217, 37, 37, .9);
}
.promo-tile::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: radial-gradient(80% 120% at 100% 0%, rgba(255, 255, 255, .18), transparent 55%);
}
.promo-tile .pt { display: grid; gap: 4px; align-content: start; position: relative; z-index: 1; }
.promo-tile .p {
  font-size: 27px; font-weight: 800; letter-spacing: -.5px; line-height: 1;
  background: linear-gradient(100deg, #FFE9A8, #FFC9DE 60%, #FFFFFF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.promo-tile .l { font-size: 13px; line-height: 1.45; color: #F4E7EE; }
.promo-tile .cd { display: flex; gap: 6px; align-self: start; position: relative; z-index: 1; }
.promo-tile .cd span {
  width: 46px; padding: 6px 0 5px; border-radius: 10px; text-align: center;
  background: rgba(10, 6, 12, .42); border: 1px solid rgba(255, 255, 255, .18);
  display: grid; gap: 1px;
}
.promo-tile .cd b { font-size: 17px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.promo-tile .cd i { font-style: normal; font-size: 13px; color: #EBD9E2; }
.promo-tile .go {
  grid-column: 1 / -1; position: relative; z-index: 1;
  min-height: 44px; border: 0; border-radius: 11px; cursor: pointer;
  background: var(--red-grad); color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: var(--glow-red);
}
.promo-tile .go:active { transform: scale(.985); }

/* ---------------- SHORTS / player ---------------- */
#video { background: var(--plate); }
.feed { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--plate); }
.player-art { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; display: block; }
video.player-art { object-fit: cover; background: var(--plate); }
.player-scrim {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 6, 10, .62), rgba(6, 6, 10, .12) 26%, transparent 38%, rgba(6, 6, 10, .68) 56%, rgba(6, 6, 10, .88) 78%);
}
.feed-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; padding: 10px 10px 0;
}
.feed-top > * { margin-right: 6px; }
.feed-title {
  flex: 1; min-width: 0; text-align: center;
  color: var(--on-art); font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .8);
}
.tag {
  padding: 5px 10px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--glass-line);
  color: var(--on-art); font-size: 13px; font-weight: 700; backdrop-filter: blur(8px);
}
/* 抖音式声音开关：44px 触控区里画一枚 38px 半透明小圆盘，纯图标、无边框，
   开声/静音只靠喇叭图标区分，不做文字胶囊也不做颜色高亮 */
#player-sound {
  border-radius: 50%; border: 0;
  background: radial-gradient(circle 19px at 50% 50%, rgba(22, 22, 28, .5) 97%, rgba(22, 22, 28, 0) 100%);
}
#player-sound:hover {
  background: radial-gradient(circle 19px at 50% 50%, rgba(22, 22, 28, .72) 97%, rgba(22, 22, 28, 0) 100%);
}
#player-sound:active { transform: scale(.92); }
#player-sound .icon { width: 20px; height: 20px; }
.player-play {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 3;
  width: 68px; height: 68px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--on-art);
  backdrop-filter: blur(8px); transition: opacity var(--t), transform var(--t-fast);
}
.player-play:active { transform: translate(-50%, -50%) scale(.93); }
.player.playing .player-play { opacity: 0; pointer-events: none; }
.player:hover .player-play, .player.paused .player-play { opacity: 1; pointer-events: auto; }
.player-lock {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background: rgba(8, 8, 12, .74); backdrop-filter: blur(7px);
}
.lock-title { color: var(--on-art); font-size: 18px; font-weight: 800; }
.lock-sub { color: var(--on-art-2); font-size: 14px; max-width: 300px; }
.player-lock .btn { margin-top: 4px; }

.railr {
  position: absolute; right: 8px; bottom: 104px; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
}
.railr .act { margin-bottom: 10px; }
.act {
  display: flex; flex-direction: column; align-items: center;
  min-width: 44px; padding: 2px 0;
  background: none; border: 0; cursor: pointer;
  color: var(--on-art); font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .85);
}
.act .icon { width: 28px; height: 28px; margin-bottom: 3px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .7)); }
.act.on { color: var(--primary-hi); }
.act.on .icon { fill: currentColor; stroke: none; }
.act:active { transform: scale(.9); }

.feedcap {
  position: absolute; left: 14px; right: 66px; bottom: 76px; z-index: 3;
  display: grid; gap: 5px; pointer-events: none;
}
.feedcap h3 { color: var(--on-art); font-size: 15px; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .85); }

.epbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 8px 14px 12px; display: grid; gap: 6px;
  background: linear-gradient(180deg, transparent, rgba(6, 6, 10, .82) 46%);
}
.epbar .l { display: flex; align-items: baseline; gap: 6px; color: var(--on-art-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.epbar .l b { color: var(--on-art); font-size: 14px; font-weight: 800; }
.epbar .l .sep { color: var(--on-art-3); }
.epbar .nx { margin-left: auto; color: var(--on-art-3); font-size: 13px; text-align: right; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary-hi) var(--p, 0%), rgba(255, 255, 255, .26) var(--p, 0%));
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(217, 37, 37, .35);
}
.seek::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .26); }
.seek::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--primary-hi); }
.seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.seek:disabled { opacity: .45; cursor: default; }

.fx-heart { position: absolute; bottom: 34%; z-index: 5; color: var(--primary-hi); pointer-events: none; animation: heartUp 1.4s var(--ease) forwards; }
.fx-heart .icon { width: 30px; height: 30px; }
@keyframes heartUp {
  0% { opacity: 0; transform: translateY(10px) scale(.6); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), -130px) scale(1.25); }
}

.under {
  flex: none; max-height: 46%;
  background: var(--bg); border-top: 1px solid var(--line);
  padding-top: 12px;
}
.ep-row { display: flex; overflow-x: auto; padding: 2px 2px 10px; }
.ep-row .ep { margin-right: 8px; }
.ep-row::-webkit-scrollbar { height: 4px; }
.ep {
  flex: none; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.ep.active { background: var(--primary-soft); border-color: var(--primary-hi); color: var(--ink); box-shadow: 0 0 0 1px var(--primary-line); }
.ep.more { background: var(--card-2); color: var(--muted); }
.h-scroll { display: flex; overflow-x: auto; padding: 2px 2px 10px; }
.h-scroll > * { margin-right: 10px; }
.h-scroll::-webkit-scrollbar { height: 4px; }

/* ---------------- CHAT ---------------- */
.chead {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.cav {
  width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-grad); color: #fff;
}
.cav img { width: 100%; height: 100%; object-fit: cover; }
.cwho { flex: 1; min-width: 0; display: grid; }
.cwho b { font-size: 15px; font-weight: 800; }
.cwho .on { font-size: 13px; color: var(--ok); font-weight: 600; }
html.light .cwho .on { color: #177245; }
.charbar {
  flex: none; display: flex; gap: 10px; overflow-x: auto;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.charbar::-webkit-scrollbar { height: 3px; }
.charbar button {
  flex: none; width: 56px; background: none; border: 0; cursor: pointer;
  display: grid; gap: 4px; justify-items: center; padding: 0;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.charbar .cav { width: 48px; height: 48px; border: 2px solid transparent; }
.charbar button.on { color: var(--ink); }
.charbar button.on .cav { border-color: var(--primary-hi); }
.charbar .nm { width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.thread { padding-top: 12px; display: flex; flex-direction: column; }
.ai-scope {
  margin: 0 0 12px; padding: 9px 12px; border-radius: 11px;
  background: var(--secondary-soft); border: 1px solid var(--secondary-line);
  color: var(--ink-2); font-size: 13px;
}
.msgs { display: flex; flex-direction: column; margin-top: auto; }
.msgs .msg { margin-bottom: 12px; }
.msg { display: flex; flex-direction: column; max-width: 86%; }
.msg .bub {
  padding: 11px 14px; font-size: 14px; line-height: 1.5;
  border-radius: 16px; position: relative;
}
.msg.ai { align-self: flex-start; }
.msg.ai .bub { background: var(--card-2); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me .bub { background: var(--red-grad); color: #fff; border-bottom-right-radius: 5px; box-shadow: var(--glow-red); }
.msg .tm { margin-top: 4px; font-size: 13px; color: var(--muted-2); }
.pick {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; margin-top: 8px; padding: 6px 10px 6px 6px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  cursor: pointer; text-align: left; color: var(--ink);
}
.pick .cover { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 40px; height: 52px; flex: none; border-radius: 8px; background-size: cover; background-position: center; }
.pick b { font-size: 13px; font-weight: 700; line-height: 1.3; }
.pick:hover { border-color: var(--primary-hi); }
.sugg { display: flex; flex-wrap: wrap; padding: 14px 0 6px; }
.sugg > * { margin: 0 8px 8px 0; }
.inbar {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.inbar .ctl { flex: 1; min-height: 46px; border-radius: 99px; }
.send {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-grad); color: #fff; box-shadow: var(--glow-red);
}
.send:active { transform: scale(.93); }

/* ---------------- CREATE wizard ---------------- */
.wbar { flex: none; height: 3px; background: var(--line); }
.wbar i { display: block; height: 100%; width: 25%; background: var(--red-grad); transition: width .3s var(--ease); }
.whead {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 4px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.whead b { flex: 1; text-align: center; font-size: 16px; font-weight: 800; }
.wstep { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); min-width: 44px; text-align: right; }
.wnext { flex: none; padding: 10px 16px 12px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg-2); }
#create-body { padding-top: 16px; }
.wsec { margin-bottom: 20px; }
.wsec > h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.wsec > .hint { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; min-height: 46px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; font-weight: 700;
}
.seg button.on { background: var(--primary-soft); border-color: var(--primary-hi); color: var(--ink); }
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.style-tile {
  position: relative; height: 200px; border-radius: 16px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); background: var(--plate); padding: 0;
}
.style-tile img { width: 100%; height: 100%; object-fit: cover; }
.style-tile .lb {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 12, .9));
  color: var(--on-art); font-size: 14px; font-weight: 800; text-align: left;
}
.style-tile .lb span { display: block; font-size: 13px; font-weight: 600; color: var(--on-art-2); }
.style-tile.on { border-color: var(--primary-hi); box-shadow: var(--glow-red); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  position: relative; height: 124px; border-radius: 13px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); background: var(--plate); padding: 0;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .lb {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 12, .9));
  color: var(--on-art); font-size: 13px; font-weight: 700;
}
.tile.on { border-color: var(--primary-hi); }
.tile .ck, .style-tile .ck {
  position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--primary-hi); color: #fff;
}
.tile .ck .icon, .style-tile .ck .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.tile.on .ck, .style-tile.on .ck { display: flex; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 52px; height: 52px; border-radius: 14px; cursor: pointer; padding: 0;
  border: 2px solid var(--line); position: relative;
}
.swatch.on { border-color: var(--primary-hi); box-shadow: 0 0 0 3px var(--primary-soft); }
.swatch .ck { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: none; align-items: center; justify-content: center; color: #fff; }
.swatch.on .ck { display: flex; }
.slider { display: grid; gap: 8px; }
.slider .val {
  justify-self: start; padding: 5px 12px; border-radius: 99px;
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  color: var(--ink); font-size: 14px; font-weight: 800;
}
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--primary-hi) var(--p, 30%), var(--line-2) var(--p, 30%)); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 4px solid var(--primary-hi); }
.slider input::-moz-range-track { height: 6px; border-radius: 6px; background: var(--line-2); }
.slider input::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--primary-hi); }
.slider input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--primary-hi); }
.slider .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted-2); }
.namef { display: flex; gap: 8px; align-items: center; }
.namef .ctl { flex: 1; }
.cnt { font-size: 13px; color: var(--muted-2); text-align: right; margin-top: 6px; }
.sumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sum {
  position: relative; padding: 12px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--line);
  display: grid; gap: 3px;
}
.sum .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.sum .v { font-size: 14px; font-weight: 800; }
.sum .ed {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
}
.sum.wide { grid-column: 1 / -1; }
.wave { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 4px; }
.wave i { width: 4px; border-radius: 3px; background: var(--primary-hi); opacity: .8; }

.rhero { position: relative; height: 340px; border-radius: 18px; overflow: hidden; background: var(--plate); box-shadow: var(--lift); }
.rhero img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.rhero .sc { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 8, 12, .92)); }
.rhero .nm { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.rhero .nm h2 { color: var(--on-art); font-size: 22px; font-weight: 800; }
.rhero .rel { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; padding: 4px 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--on-art); font-size: 13px; font-weight: 700; }
.rtabs { display: flex; gap: 8px; margin: 14px 0 12px; }
.rtabs button {
  flex: 1; min-height: 44px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700;
}
.rtabs button.on { background: var(--primary-soft); border-color: var(--primary-hi); color: var(--ink); }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.spec { border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.spec img { height: 74px; width: 100%; object-fit: cover; }
.spec span { display: block; padding: 7px 9px; font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* ---------------- SEARCH ---------------- */
.sbar {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 0 6px 0 14px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--muted);
}
.sbar .ctl { flex: 1; border: 0; background: none; min-height: 50px; padding: 0; }
.sbar .ctl:focus { box-shadow: none; }
.sbar:focus-within { border-color: var(--primary-hi); box-shadow: 0 0 0 3px var(--primary-soft); }
#search-recent { padding-top: 12px; }
#search-recent .rk { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }

/* ---------------- PREMIUM ---------------- */
.pctr { padding: 22px 0 6px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.pk {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px;
  background: var(--gold-grad); color: #241A02; font-size: 13px; font-weight: 800; letter-spacing: .4px;
}
.pctr h2 { font-size: 26px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; }
.psub { font-size: 14px; color: var(--muted); max-width: 320px; }
.proof {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 16px 0; padding: 14px 10px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
}
.proof div { display: grid; gap: 2px; text-align: center; }
.proof b { font-size: 19px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.proof span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.plans { display: grid; gap: 12px; }
.plan {
  position: relative; padding: 24px 16px 16px; border-radius: 18px;
  background: var(--promo-grad); border: 1px solid rgba(255, 120, 170, .45);
  box-shadow: 0 18px 40px -26px rgba(217, 37, 37, .95);
  display: grid; gap: 6px;
}
.plan .off {
  position: absolute; top: -1px; left: 16px;
  padding: 4px 10px 5px; border-radius: 0 0 9px 9px;
  background: var(--gold-grad); color: #241A02; font-size: 13px; font-weight: 800; letter-spacing: .4px;
}
.plan .pn { font-size: 16px; font-weight: 800; color: #fff; }
.plan .pr { display: flex; align-items: baseline; gap: 7px; color: #fff; }
.plan .pr b { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.plan .pr span { font-size: 14px; color: #F2E3EA; }
.plan .pd { font-size: 13px; color: #F2E3EA; line-height: 1.45; }
.plan .get {
  margin-top: 8px; min-height: 48px; border: 0; border-radius: 12px; cursor: pointer;
  background: #fff; color: #A81A1A; font-size: 15px; font-weight: 800;
}
.plan .get:active { transform: scale(.985); }
.blk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brow {
  display: grid; gap: 4px; padding: 13px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.brow .bi { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--accent-text); }
.brow b { font-size: 14px; font-weight: 800; }
.brow span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.compare { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.compare .cr { display: grid; grid-template-columns: 1fr 74px 74px; gap: 6px; align-items: center; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
.compare .cr:last-child { border-bottom: 0; }
.compare .cr.head { background: var(--card-2); font-weight: 800; font-size: 13px; }
.compare .cr span { color: var(--ink-2); }
.compare .cr .yes { color: var(--ok); display: flex; justify-content: center; }
.compare .cr .no { color: var(--muted-2); display: flex; justify-content: center; }
.compare .cr .prem { color: var(--accent-text); font-weight: 800; display: flex; justify-content: center; }
.trust { display: grid; gap: 8px; margin: 16px 0; }
.trust div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.trust .icon { flex: none; color: var(--ok); margin-top: 1px; }

/* ---------------- account surfaces ---------------- */
.id-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-grad); color: #fff; font-size: 21px; font-weight: 800;
}
.id-line { font-size: 15px; font-weight: 800; word-break: break-all; }
.id-sub { font-size: 13px; color: var(--muted); }
.sub-card { margin-bottom: 12px; }
.sub-card.is-on { border-color: rgba(240, 180, 41, .5); background: linear-gradient(160deg, rgba(240, 180, 41, .1), var(--card) 60%); }
.sub-state { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.sub-card.is-on .sub-state { color: var(--warn); }
.sub-lines { display: grid; gap: 6px; margin-bottom: 12px; }
.sub-lines div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.sub-lines span:first-child { color: var(--muted); }
.sub-lines span:last-child { font-weight: 700; }
.sub-why { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
#profile-menu { margin-bottom: 12px; }
.saved-item { display: grid; gap: 8px; }
.saved-item .btn { min-height: 44px; font-size: 14px; }
.sec-title { font-size: 15px; font-weight: 800; margin: 4px 0 12px; }
.hist-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.hist-row .cover { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 52px; height: 70px; flex: none; border-radius: 10px; background-size: cover; background-position: center; }
.hist-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hist-main b { font-size: 14px; font-weight: 800; }
.hist-main span { font-size: 13px; color: var(--muted); }
.order-row { padding: 13px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; display: grid; gap: 6px; }
.order-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.order-top b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.order-top span { font-size: 13px; color: var(--muted); }
.order-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.pill { padding: 3px 9px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--accent-text); }

/* ---------------- drawer / dropdown ---------------- */
.dim { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(6, 6, 9, .58); backdrop-filter: blur(2px); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 31;
  width: min(320px, calc(100vw - 72px));
  display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--line);
  box-shadow: 30px 0 60px -40px rgba(0, 0, 0, .9);
  animation: slideIn .24s var(--ease);
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
.dw-top { display: flex; align-items: center; gap: 10px; padding: 14px 10px 14px 16px; border-bottom: 1px solid var(--line); }
.me {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-grad); color: #fff; font-size: 18px; font-weight: 800;
}
.dw-id { flex: 1; min-width: 0; display: grid; }
.dw-id b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-id span { font-size: 13px; color: var(--muted); }
.dw-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; }
.dw-nav .row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 50px; padding: 8px 12px; border-radius: 12px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--ink-2); font-size: 15px; font-weight: 600;
}
.dw-nav .row:hover { background: var(--card); }
.dw-nav .row.on { background: var(--primary-soft); color: var(--ink); font-weight: 800; }
.dw-nav .row .icon { color: var(--muted); }
.dw-nav .row.on .icon { color: var(--accent-text); }
.dw-nav .row .n { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--muted); }
.dw-nav .row.gold { color: var(--warn); }
.dw-nav .row.gold .icon { color: var(--warn); }
.dw-nav .sep { height: 1px; background: var(--line); margin: 8px 12px; }
.dw-foot { flex: none; padding: 12px 16px 14px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 6px; }
.dw-cat { display: grid; gap: 5px; margin-bottom: 4px; }
.dw-cat > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.dw-cat .ctl { min-height: 44px; }
.dw-link {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; text-align: left;
}
.dw-link:hover { color: var(--ink); }
.dw-lang { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; color: var(--muted); font-size: 14px; }
.dw-legal { display: flex; gap: 12px; }
.dd {
  position: fixed; top: calc(var(--tbar-h) + 4px); right: 10px; z-index: 32;
  width: 232px; padding: 6px; border-radius: 15px;
  background: var(--card); border: 1px solid var(--line-2);
  box-shadow: var(--sh-pop); animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.dd button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 46px; padding: 8px 10px; border-radius: 10px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--ink-2); font-size: 14px; font-weight: 600;
}
.dd button:hover { background: var(--card-2); }
.dd button .icon { color: var(--muted); }
.dd button.danger { color: var(--accent-text); }
.dd button.danger .icon { color: var(--accent-text); }
.dd .sep { height: 1px; background: var(--line); margin: 5px 8px; }
.dd .who { padding: 8px 10px 6px; font-size: 13px; color: var(--muted); word-break: break-all; }

/* ---------------- overlays ---------------- */
.overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: flex-end; justify-content: center;
  background: rgba(6, 6, 9, .6); backdrop-filter: blur(6px);
}
.overlay.show { display: flex; animation: fade .18s var(--ease); }
.overlay.centre { align-items: center; padding: 20px; }
.sheet {
  width: 100%; max-width: 460px; max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; box-shadow: var(--sh-pop);
  animation: sheetUp .26s var(--ease);
}
@keyframes sheetUp { from { transform: translateY(26px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.bar-title { flex: 1; font-size: 16px; font-weight: 700; }
.bar-title.strong { font-weight: 800; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }
.sheet-why { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.tabs2 { flex: 1; display: flex; gap: 6px; }
.t2 {
  flex: 1; min-height: 44px; border-radius: 11px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; font-weight: 700;
}
.t2.active { background: var(--primary-soft); border-color: var(--primary-hi); color: var(--ink); }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }
.sub-art {
  flex: none; height: 92px; display: flex; align-items: center; justify-content: center;
  background: var(--promo-grad); color: #FFE9A8; border-radius: 22px 22px 0 0;
}
.sub-art .icon { width: 44px; height: 44px; }
.sub-title { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.sub-price { text-align: center; margin: 8px 0 14px; }
.sub-price b { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.sub-price span { font-size: 14px; color: var(--muted); }
.sub-perks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.sub-perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.sub-perks .icon { flex: none; color: var(--ok); margin-top: 2px; }
.ep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ep-grid .ep { width: 100%; justify-content: center; padding: 0 6px; }
.doc-body { font-size: 14px; color: var(--ink-2); }
.doc-body h4 { font-size: 15px; font-weight: 800; margin: 16px 0 6px; color: var(--ink); }
.doc-body h4:first-child { margin-top: 0; }
.doc-body p { margin-bottom: 10px; }
.doc-body ul { margin: 0 0 10px; padding-left: 20px; }
.doc-body li { margin-bottom: 5px; }
.cm-list { display: grid; gap: 10px; margin-bottom: 14px; }
.cm {
  display: grid; gap: 3px; padding: 11px 13px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--line);
}
.cm b { font-size: 13px; font-weight: 800; }
.cm p { font-size: 14px; color: var(--ink-2); }
.cm span { font-size: 13px; color: var(--muted-2); }
.pv-list { display: grid; gap: 8px; margin-bottom: 16px; }
.pv-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  min-height: 56px; padding: 8px 12px; border-radius: 13px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--ink);
}
.pv-row .cover { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 40px; height: 54px; flex: none; border-radius: 8px; background-size: cover; background-position: center; }
.pv-row .m { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pv-row .m b { font-size: 14px; font-weight: 700; }
.pv-row .m span { font-size: 13px; color: var(--muted); }
.pv-row .icon { color: var(--warn); flex: none; }

.modal {
  position: relative; width: 100%; max-width: 320px;
  padding: 0 18px 18px; border-radius: 20px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--sh-pop);
  animation: pop .22s var(--ease);
}
.up-x { position: absolute; top: 8px; right: 8px; z-index: 2; color: var(--muted); }
.tilt {
  display: block; width: 116px; height: 154px; margin: -46px auto 12px;
  border-radius: 14px; overflow: hidden; transform: rotate(-7deg);
  background: var(--plate) center/cover; border: 3px solid var(--bg-2);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .9);
}
.modal h3 { font-size: 19px; font-weight: 800; }
.up-sub { font-size: 13px; color: var(--muted); margin: 6px 0 14px; }
.perks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; text-align: left; }
.perks li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.perks li i {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--warn-soft); border: 1px solid rgba(240, 180, 41, .5); color: var(--warn);
}
.perks .icon { width: 16px; height: 16px; }

/* ---------------- small additions used by chat, wizard and sheets ---------------- */
.cav.new {
  background: var(--card-2); border: 1px dashed var(--line-2) !important; color: var(--muted);
}
.pick i { display: block; font-size: 13px; font-style: normal; color: var(--muted); margin-top: 2px; }
.pick b { display: block; }
.spec {
  display: block; width: 100%; padding: 0; cursor: pointer; text-align: left;
  color: var(--ink); transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.spec:hover { border-color: var(--primary-hi); }
.spec:active { transform: scale(.97); }
.spec span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tilt img { width: 100%; height: 100%; object-fit: cover; }
.cm-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cm-x { margin: -8px -10px -8px 0; color: var(--muted-2); }
.cm-empty { font-size: 13px; color: var(--muted); padding: 4px 2px 10px; }
.sum { padding-right: 54px; }
.sum .ed { width: 44px; height: 44px; top: 4px; right: 4px; }

/* ---------------- consent + toast ---------------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px); z-index: 45;
  padding: 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh-pop);
}
.consent p { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.consent .btn-row { margin-top: 0; }
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); z-index: 60;
  transform: translate(-50%, 14px); max-width: min(360px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 12px;
  background: var(--elev); border: 1px solid var(--line-2); color: var(--ink);
  font-size: 14px; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none; transition: all var(--t) var(--ease);
  box-shadow: var(--sh-pop);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad-soft); border-color: var(--primary-line); color: var(--accent-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 560px) {
  .scroll, .under { padding-left: 22px; padding-right: 22px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  #home-grid .promo-tile { grid-column: 1 / -1; }
}

/* ---------------- 老内核兜底 ----------------
   不支持 gap 的浏览器（flex gap 要 Chrome 84+）会把所有间距吃掉，
   图标和文字贴在一起。这里用子元素 margin 补回同样的间距；
   多列 grid 在不支持 grid 的内核上退化为 flex 换行，不让选集变成一长条。
   支持 gap 的浏览器整块跳过，视觉与现在完全一致。 */
@supports not (gap: 1px) {
  .tbar > * + * { margin-left: 6px; }
  .cats > * + * { margin-left: 4px; }
  .btn > * + * { margin-left: 8px; }
  .chip > * + * { margin-left: 6px; }
  .pill-prem > * + * { margin-left: 5px; }
  .list-row > * + *, .dw-nav .row > * + *, .pick > * + *,
  .hist-row > * + *, .id-card > * + * { margin-left: 12px; }
  .page-h > * + *, .sheet-head > * + *, .btn-row > * + *, .tabs2 > * + *,
  .seg > * + *, .rtabs > * + *, .inbar > * + *, .whead > * + *,
  .namef > * + *, .cm-h > * + * { margin-left: 8px; }
  .dw-top > * + *, .dw-link > * + *, .dw-lang > * + *, .dd button > * + *,
  .charbar > * + *, .swatches > * + *, .trust div > * + *,
  .perks li > * + *, .sub-perks li > * + *, .epbar .l > * + * { margin-left: 10px; }
  .dw-legal > * + * { margin-left: 12px; }
  .wave > * + * { margin-left: 3px; }
  .foot > * { margin: 4px; }
  .order-top > * + *, .order-meta > * + *, .sub-lines div > * + *,
  .compare .cr > * + * { margin-left: 10px; }
  .dw-foot > * + *, .order-row > * + *, .epbar > * + * { margin-top: 6px; }
  .dw-cat > * + * { margin-top: 5px; }
  .sec-h > * + *, .hist-main > * + *, .dcard .meta > * + *,
  .pv-row .m > * + *, .proof div > * + * { margin-top: 2px; }
  .promo-tile .pt > * + * { margin-top: 4px; }
  .slider > * + *, .pctr > * + *, .trust > * + *, .pv-list > * + *,
  .saved-item > * + * { margin-top: 8px; }
  .sub-perks > * + *, .perks > * + * { margin-top: 9px; }
  .cm-list > * + * { margin-top: 10px; }
  .plans > * + * { margin-top: 12px; }
  .promo-tile > * + * { margin-top: 10px; }
  .ep-grid { display: flex; flex-wrap: wrap; margin: -4px; }
  .ep-grid .ep { width: calc(25% - 8px); margin: 4px; }
  .styles, .sumgrid, .blk { display: flex; flex-wrap: wrap; margin: -6px; }
  .styles > *, .sumgrid > *, .blk > * { width: calc(50% - 12px); margin: 6px; }
  .tiles, .specs, .proof { display: flex; flex-wrap: wrap; margin: -5px; }
  .tiles > *, .specs > *, .proof > * { width: calc(33.333% - 10px); margin: 5px; }
  .compare .cr { display: flex; align-items: center; }
}