/* LewdMap catalog UI. System font stack only (no webfonts, no CDN). Dark by default.
   Palette comes from lewdmap.com: ink + signal pink, amber and cyan used sparingly.
   Minimum text size is 13px everywhere (Chinese typography), body line-height 1.5. */
:root {
  --ink: #0b0c11; --ink2: #0f1016; --panel: #15161f; --panel2: #1b1d28; --panel3: #232636;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .15);
  --hot: #ff3860; --hot-d: #e0284f; --amber: #ffae3d; --cyan: #3dd5c4; --cyan-lite: #7be8da; --good: #37c9a3;
  --tx: #f0f1f6; --mut: #a9adc0; --mut2: #8387a0;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", Tahoma, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Roboto Mono", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", monospace;
  --tabh: 60px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--ink); color: var(--tx); }
body {
  font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
img { display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--mut); }
.small { font-size: 13px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--panel3) transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.eyebrow { font: 600 13px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut2); }
.ic { display: inline-flex; flex: none; line-height: 0; }

/* ---------- app frame ---------- */
#app { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 480px; margin: 0 auto; background: var(--ink); overflow: hidden; }
@media (min-width: 520px) {
  body { background: #07080c repeating-linear-gradient(135deg, rgba(255, 56, 96, .05) 0 2px, transparent 2px 16px); }
  #app { border-inline: 1px solid var(--line2); box-shadow: 0 0 80px rgba(0, 0, 0, .6); }
}
#views { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ink); }
.view-scroll { flex: 1; min-height: 0; padding-bottom: 24px; }

#tabbar { display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabh) + var(--sab)); padding-bottom: var(--sab); background: var(--ink2); border-top: 1px solid var(--line); flex: none; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mut2); font: 600 13px/1.2 var(--font); min-width: 0; padding: 0 2px; transition: color .15s; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { color: var(--tx); }
.tab.on .ic { color: var(--hot); }
.tab.on .ic svg { fill: color-mix(in srgb, var(--hot) 22%, transparent); }
.tab.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--hot); }

#netbar { flex: none; padding: calc(var(--sat) + 6px) 12px 8px; text-align: center; font: 600 14px/1.35 var(--font); }
#netbar.switching { background: var(--amber); color: #1a1204; }
#netbar.offline { background: #2a1218; color: #ffc2cd; border-bottom: 1px solid var(--hot-d); }
#netbar + #views .home-head { padding-top: 10px; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: 700 15px/1.2 var(--font); transition: transform .12s, background .15s; text-align: center; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--hot-d); color: #fff; }
.btn.ghost { border-color: var(--line2); color: var(--tx); background: transparent; }
.btn.danger { background: #7d1f33; color: #fff; }
.btn.lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--tx); flex: none; }
.icon-btn.sm { width: 44px; height: 44px; } /* every tap target is 44 x 44 px at least (round 3, U09); the 18 px glyph keeps its size */
.icon-btn.round { border: 1px solid var(--line2); }
.icon-btn.danger { color: var(--hot); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--mut); font: 600 14px var(--font); }
.link-btn:hover { color: var(--tx); }
.field { width: 100%; min-height: 48px; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; color: var(--tx); padding: 12px 14px; font: 500 16px/1.4 var(--font); }
.field:focus { outline: 0; border-color: var(--cyan); }
textarea.field { resize: vertical; }
.form { display: flex; flex-direction: column; gap: 12px; }
.page-body > .form { padding: 16px; }
.form-msg { min-height: 22px; color: var(--hot); font-size: 14px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .field { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--hot-d); }
.warn-text { color: var(--amber); font-size: 14px; }
.rule { height: 1px; background: var(--line); margin: 20px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font: 600 14px/1 var(--font); color: var(--tx); white-space: nowrap; }
.chip.sm { min-height: 44px; padding: 0 14px; }
.chip.on { background: var(--hot-d); border-color: var(--hot-d); color: #fff; }
.chip.add { border-style: dashed; color: var(--mut); }
.chip-n { font-size: 13px; opacity: .75; }
.chip.on .chip-n { opacity: 1; } /* white at 75% on the pink chip is 3.11:1, white is 4.58:1 (round 3, A3: "全部 0") */
.chip.tag { color: var(--cyan); }
.chip-static { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 8px; background: var(--panel2); font: 600 13px/1 var(--font); }
.drop { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-block: 0; padding-inline: 12px 10px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); font-size: 13px; line-height: 1; max-width: 100%; }
.drop b { font-weight: 700; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg-btn { min-height: 44px; padding: 0 14px; border-radius: 9px; font: 700 14px/1 var(--font); color: var(--mut); }
.seg-btn.on { background: var(--panel3); color: var(--tx); }
.seg-wrap { padding: 4px 16px 10px; }

/* ---------- posters / badges ---------- */
.poster { position: relative; overflow: hidden; isolation: isolate; container-type: inline-size; background: #1a1219; background: color-mix(in srgb, var(--acc, #ff3860) 14%, #11121b); } /* plain colour first: iOS < 16.2 has no color-mix() */
.poster::before { content: ""; position: absolute; inset: 0; z-index: 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--acc, #ff3860) 24%, transparent) 0 2px, transparent 2px 15px); }
.poster-mark { position: absolute; right: 6%; bottom: 5%; z-index: 0; font: 900 40px/1 var(--font); font-size: 40cqw; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--acc, #ff3860) 78%, transparent); pointer-events: none; user-select: none; }
.poster img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.poster:not(.loaded) img { opacity: 0; } /* a picture that is still loading, or retrying on the next mirror, shows nothing: the placeholder never blinks */
/* The placeholder letter is sized from the WIDTH of its own box (container query units), so it always fits and is never cut at an edge; per shape: */
.row-thumb .poster-mark { font-size: 52cqw; -webkit-text-stroke-width: 1.5px; }
.hot-thumb .poster-mark { font-size: 50cqw; -webkit-text-stroke-width: 1.5px; }
.mini-poster .poster-mark, .tile-poster .poster-mark { font-size: 46cqw; }
.strip-poster .poster-mark { font-size: 70cqw; }
.hero-poster .poster-mark { font-size: 40cqw; }
.ss-shot .poster-mark { font-size: 42cqw; }
.banner-poster .poster-mark { font-size: 30cqw; }
.tease-bg .poster-mark { font-size: 70cqw; top: 24%; bottom: auto; }
.poster.loaded .poster-mark { display: none; } /* a real picture is there: the letter is only a stand-in for "no picture" */
@supports not (container-type: inline-size) { .poster-mark { display: none; } } /* an old WebView cannot size it safely: no letter at all */

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font: 700 13px/1 var(--mono); letter-spacing: .03em; text-transform: uppercase; flex: none; }
.b-new { background: var(--hot-d); color: #fff; }
.b-growing { background: var(--amber); color: #1a1204; }
.b-sfw { background: var(--cyan); color: #04121a; }
.metric { font: 500 13px/1.3 var(--mono); color: var(--mut); }
.metric b { font-weight: 700; color: var(--tx); }
.metric .unit { white-space: pre-wrap; }
.metric.dim b { color: var(--mut); }

/* ---------- headers ---------- */
.plain-head, .home-head { display: flex; align-items: center; justify-content: space-between; padding-block: calc(var(--sat) + 10px) 6px; padding-inline: 16px 8px; flex: none; }
#netbar:not([hidden]) ~ #views .plain-head, #netbar:not([hidden]) ~ #views .home-head { padding-top: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font: 900 21px/1 var(--font); letter-spacing: -.01em; }
.brand-pin { color: var(--hot); }
.head-actions { display: flex; align-items: center; }
.bell-badge { position: absolute; top: 3px; right: 0; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; background: var(--hot-d); color: #fff; font: 700 13px/19px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--ink); }

/* ---------- home ---------- */
.home { background: var(--ink); }
.home-head { flex-wrap: wrap; row-gap: 0; padding-bottom: 0; }
.subtabs { flex: 1 0 100%; display: flex; gap: 8px; margin-inline-start: -8px; overflow-x: auto; scrollbar-width: none; padding: 0; }
.subtab { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; min-width: 44px; text-align: center; font: 700 16px/1 var(--font); color: var(--mut2); white-space: nowrap; }
.subtab.on { color: var(--tx); }
.subtab.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 2px; background: var(--hot); }
.home .pane { flex: 1; min-height: 0; }
.home .pane.scroll { overflow-y: auto; padding-bottom: 28px; overscroll-behavior: contain; }
.home.immersive .home-head { position: absolute; z-index: 6; top: 0; left: 0; right: 0; background: linear-gradient(to bottom, rgba(8, 9, 13, .82), rgba(8, 9, 13, 0)); padding-bottom: 14px; }
.home.immersive .subtab { color: rgba(255, 255, 255, .72); text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.home.immersive .subtab.on { color: #fff; }
.home.immersive .pane-feed { position: absolute; inset: 0; }
.pane-feed { overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; background: #08090d; }
.pane-feed::-webkit-scrollbar { display: none; }

.tease { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #08090d; }
/* feed card pictures (contract 3.2): .tease-bg = blurred, darkened copy of the thumb (also the first frame while the real picture loads);
   .tease-main = the vertical poster, cover, no filter and no scaling; .tease-shot = the horizontal thumb WHOLE (16:9 box, full width) when there is no poster */
.tease-bg { position: absolute; inset: 0; }
.tease-bg img { object-position: center; filter: blur(22px) brightness(.55) saturate(1.15); transform: scale(1.2); }
.tease .poster img { transition: opacity .35s ease; }
.tease-main { position: absolute; inset: 0; background: none; }
.tease-main::before, .tease-main .poster-mark, .tease-shot .poster-mark { display: none; } /* the placeholder letter lives on .tease-bg only */
.tease-shot { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 150px); top: calc(var(--sat) + clamp(132px, 17vh, 168px)); height: 0; padding-top: 56.25%; background: none; border-radius: 0; }
.tease-shot::before { display: none; }
.tease-shot img { object-fit: contain; object-position: center; }
/* top layer: a site screenshot has its own header; it must not fight the app header and the tabs */
.tease-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 9, 13, .97) 0, rgba(8, 9, 13, .88) 14%, rgba(8, 9, 13, 0) 30%), linear-gradient(to top, rgba(8, 9, 13, .94) 0%, rgba(8, 9, 13, .6) 34%, rgba(8, 9, 13, 0) 60%); }
.tease-top { position: absolute; left: 16px; right: 16px; top: calc(var(--sat) + 112px); display: flex; align-items: center; gap: 8px; }
.tease-cat { font: 600 13px/1.3 var(--font); color: rgba(255, 255, 255, .85); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.tease-body { position: absolute; left: 16px; right: 92px; bottom: 88px; display: flex; flex-direction: column; gap: 6px; text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
.tease-dom { font-size: 13px; color: var(--cyan-lite); } /* over a picture: the lighter cyan holds 4.5:1 on a mid-grey backdrop too (round 3, A3) */
.tease-title { font: 900 26px/1.2 var(--font); }
.tease-desc { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tease-meta { font-size: 13px; }
.tease-meta .metric { color: rgba(255, 255, 255, .8); }
.tease-meta .metric b { color: #fff; }
.tease-rail { position: absolute; right: 6px; bottom: 96px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.rail-btn, .fav-btn.rail { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 78px; min-height: 56px; justify-content: center; border-radius: 14px; font: 600 13px/1.2 var(--font); white-space: nowrap; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); background: rgba(8, 9, 13, .35); backdrop-filter: blur(4px); }
.tease-cta { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; background: var(--hot-d); color: #fff; font: 800 17px/1 var(--font); }
.tease-cta:active { transform: scale(.985); }
.swipe-hint { position: absolute; left: 50%; top: calc(var(--sat) + 150px); transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(8, 9, 13, .7); font: 600 13px/1 var(--font); color: #fff; animation: nudge 1.6s var(--ease) infinite; pointer-events: none; }
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.ad-card .ad-card-media { position: absolute; inset: 0; background: #11121b; display: grid; place-items: center; }
.ad-card .ad-img { width: 100%; height: 100%; object-fit: contain; } /* a banner-shaped creative keeps its shape inside the full-screen card */
.ad-card .ad-label { top: calc(var(--sat) + 112px); left: 16px; padding: 6px 14px; border-radius: 8px; background: var(--amber); color: #1a1204; font: 800 16px/1.2 var(--font); } /* a big amber mark: nothing like the site cards */
/* the ad button must not sit where the red "open" bar of a site card sits (full width, bottom): a small outlined pill, lifted, on the start side */
.ad-card .ad-cta { left: 16px; right: auto; bottom: 40px; width: auto; min-width: 150px; height: 48px; padding: 0 22px; border-radius: 999px; background: rgba(8, 9, 13, .78); border: 2px solid var(--amber); color: var(--amber); font: 700 15px/1 var(--font); }

.banner-wrap { padding: 4px 0 6px; }
.banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.banners::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 88%; aspect-ratio: 18 / 7; scroll-snap-align: center; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); display: block; }
.banner-poster { position: absolute; inset: 0; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 9, 13, .78), rgba(8, 9, 13, 0) 60%); }
.banner-title { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 10px; font: 800 16px/1.3 var(--font); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line2); transition: width .2s, background .2s; }
.banner-dots i.on { width: 18px; background: var(--hot); }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 16px 10px; }
.sec-head h2 { font: 900 21px/1.25 var(--font); }
.sec-gap { height: 4px; }

.hot-row { display: grid; grid-template-columns: minmax(46px, max-content) minmax(0, 1fr) 64px; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; }
.hot-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); opacity: 0; }
.hot-row.top::before { opacity: 1; }
.hot-rank { font: 800 32px/1 var(--mono); color: transparent; -webkit-text-stroke: 1.5px var(--mut2); letter-spacing: -.05em; text-align: end; }
.hot-row.top .hot-rank { color: var(--acc); -webkit-text-stroke: 0; }
.hot-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hot-name { display: flex; align-items: center; gap: 8px; font: 800 17px/1.35 var(--font); min-width: 0; }
.hot-niche { font-size: 14px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-meta { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--mut2); min-width: 0; }
.hot-meta .ellip { flex: 1 1 0; }
.hot-meta .metric { flex: none; white-space: nowrap; }
.hot-thumb { width: 64px; height: 64px; border-radius: 12px; }
.list-hot { transition: opacity .15s ease; }
.list-hot.swap { opacity: 0; } /* 换一批: the old portion fades out, the new one fades in (home.js swap) */
.hot-more { padding: 18px 16px 88px; } /* the room under the button keeps it clear of the corner banner */
.hot-shuffle { width: 100%; }
.hot-shuffle.busy { pointer-events: none; }
.hot-shuffle.busy .shuffle-ic { animation: spin .8s linear infinite; }

.strip { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-card { position: relative; flex: 0 0 132px; scroll-snap-align: start; text-align: start; }
.strip-poster { aspect-ratio: 3 / 4; border-radius: 14px; border: 1px solid var(--line2); }
.strip-over { position: absolute; top: 8px; left: 8px; z-index: 2; }
.strip-name { display: block; margin: 8px 0 1px; font: 800 15px/1.3 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { flex: 0 0 120px; text-align: start; }
.mini-poster { aspect-ratio: 16 / 10; border-radius: 10px; border: 1px solid var(--line); }
.mini-name { display: block; margin-top: 6px; font: 700 14px/1.3 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list.feat-grid, .feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; padding: 0 16px; }
.feat-grid > .hero, .feat-grid > .span2 { grid-column: 1 / -1; }
.hero { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3.2; border-radius: 20px; overflow: hidden; border: 1px solid var(--line2); text-align: start; }
.hero-poster { position: absolute; inset: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 9, 13, .92) 0%, rgba(8, 9, 13, .35) 45%, rgba(8, 9, 13, 0) 65%); }
.hero-rank { position: absolute; top: 12px; right: 14px; z-index: 2; font-size: 13px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.hero-over { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.hero-top { display: flex; gap: 8px; align-items: center; }
.hero-dom { font-size: 13px; color: var(--cyan-lite); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.hero-name { font: 900 28px/1.15 var(--font); text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.hero-niche { font-size: 14px; color: rgba(255, 255, 255, .85); }
.hero-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.hero-go { display: inline-flex; align-items: center; gap: 4px; font: 700 14px var(--font); color: var(--acc); }
.tile { display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: start; min-width: 0; } /* a <button> defaults to align-items:flex-start: the poster (container-type: inline-size) would shrink to 0 px */
.tile-media { position: relative; display: block; align-self: stretch; width: 100%; }
.tile-poster { aspect-ratio: 16 / 10; border-radius: 12px; border: 1px solid var(--line); }
.tile-rank { position: absolute; top: 7px; left: 7px; z-index: 2; padding: 2px 6px; border-radius: 6px; background: rgba(8, 9, 13, .7); border: 1px solid rgba(255, 255, 255, .16); font-size: 13px; color: #fff; }
.tile-badge { position: absolute; top: 7px; right: 7px; z-index: 2; }
.tile-name { margin-top: 5px; font: 800 16px/1.3 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; font-size: 13px; line-height: 1.5; color: var(--mut2); }
.tile-niche { font-size: 13px; line-height: 1.45; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.row-hit { flex: 1; min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; text-align: start; }
.row-more { align-self: center; margin-inline-end: 6px; color: var(--mut); }
.row-thumb { width: 76px; height: 58px; border-radius: 10px; border: 1px solid var(--line); }
.row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-name { font: 800 16px/1.35 var(--font); }
.row-niche { font-size: 14px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 13px; color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-metric { text-align: end; }
.metric.stack { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.metric.stack b { font-size: 15px; }

.ad-feed { position: relative; margin: 14px 16px; }
.ad-feed-link { display: block; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); }
.ad-media { position: relative; display: block; background: #11121b; width: 100%; }
.ad-img, .ad-frame { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.ad-frame { pointer-events: none; } /* html creatives are static markup: the wrapping link receives the tap (counts the click) */
.ad-label { position: absolute; top: 8px; left: 8px; z-index: 3; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .68); color: #fff; font: 700 13px/1.2 var(--font); }
.ad-feed .ad-media { aspect-ratio: 2 / 1; }
.ad-feed.ad-detail { margin: 22px 0 0; } /* banner at the bottom of the site sheet (slot "detail") */
/* a creative of another shape than the list asked for (a tall picture): whole, on the dark ground, at most 220 px high, never five rows */
.ad-feed.ad-contain .ad-media { max-height: 220px; }
.ad-feed.ad-contain .ad-img { object-fit: contain; }

.sentinel { height: 1px; }
.more-loader { display: flex; justify-content: center; gap: 6px; padding: 18px 0 8px; }
.more-loader i { width: 7px; height: 7px; border-radius: 50%; background: var(--mut2); animation: pulse 1s infinite ease-in-out; }
.more-loader i:nth-child(2) { animation-delay: .15s; }
.more-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.skel-wrap { display: flex; flex-direction: column; gap: 14px; padding: 12px 16px; }
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel-row { height: 74px; }
.skel-feed { height: 100%; min-height: 60vh; border-radius: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 28px; grid-column: 1 / -1; }
.empty-art { width: 76px; height: 76px; border-radius: 50%; border: 1.5px dashed var(--line2); display: grid; place-items: center; color: var(--hot); margin-bottom: 4px; }
.empty h3 { font: 800 18px/1.35 var(--font); }
.empty p { color: var(--mut); max-width: 28ch; }
.empty .btn { margin-top: 8px; }

/* ---------- categories ---------- */
.cat-layout { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--line); }
.cat-rail { flex: 0 0 92px; overflow-y: auto; background: var(--ink2); border-inline-end: 1px solid var(--line); padding: 6px 0 16px; scrollbar-width: none; }
.rail-item { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 14px 4px; text-align: center; font: 700 13px/1.3 var(--font); color: var(--mut); }
.rail-item.on { color: var(--tx); background: var(--ink); }
.rail-item.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--hot); }
.rail-item.on .ic { color: var(--hot); }
.cat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.cat-count { flex: 1 0 100%; font-size: 13px; }
.cat-body { flex: 1; min-height: 0; padding: 6px 12px 28px; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 10px; }
.tile-grid > .span2 { grid-column: 1 / -1; }
.tile-grid .ad-feed { margin: 0; }

/* ---------- search ---------- */
.search-head { padding: calc(var(--sat) + 10px) 16px 10px; flex: none; }
.q-form { display: flex; align-items: center; gap: 6px; height: 50px; padding-block: 0; padding-inline: 14px 4px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; }
.q-form:focus-within { border-color: var(--hot); }
.q-ic { color: var(--mut2); }
.q-input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: var(--tx); font: 500 16px/1.4 var(--font); }
.q-input::placeholder { color: var(--mut2); }
.q-input::-webkit-search-cancel-button { display: none; }
.search-idle { flex: 1; min-height: 0; padding: 4px 16px 28px; display: flex; flex-direction: column; gap: 24px; }
.idle-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.idle-sec h3 { font: 800 16px/1.3 var(--font); margin-bottom: 10px; }
.idle-head h3 { margin: 0; }
.search-results { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; flex: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .drop { flex: none; }
.result-count { padding: 0 16px 6px; font-size: 13px; }
.res-body { flex: 1; min-height: 0; padding-bottom: 28px; }

/* ---------- favourites ---------- */
.recent { padding-bottom: 6px; }
.ss-h3 { font: 800 16px/1.3 var(--font); padding: 12px 16px 8px; }
.recent .strip { padding-bottom: 4px; }
.folder-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.folder-row::-webkit-scrollbar { display: none; }
.folder-row .chip { flex: none; }
.fav-tools { display: flex; justify-content: flex-end; padding: 0 16px; }
.folder-item { display: flex; align-items: center; gap: 4px; min-height: 52px; border-top: 1px solid var(--line); }
.folder-item .ellip { flex: 1; font-weight: 700; }

/* ---------- profile ---------- */
.me-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }
.big { font: 800 46px/1 var(--mono); letter-spacing: -.04em; }
.me-checkin { min-height: 46px; }
.me-id { display: flex; align-items: center; gap: 8px; padding: 4px 16px 14px; }
.id-text { font-size: 15px; letter-spacing: .06em; color: var(--mut); }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 16px 8px; padding: 12px 14px; border-inline-start: 3px solid var(--amber); background: var(--panel); border-radius: 0 10px 10px 0; font-size: 14px; }
.menu-group { margin-top: 18px; }
.menu-title { padding: 0 16px 8px; font: 600 13px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut2); }
.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 16px; border-top: 1px solid var(--line); font: 600 16px/1.3 var(--font); }
.menu-list .menu-row:last-child { border-bottom: 1px solid var(--line); }
.menu-row:active { background: var(--panel); }
.menu-ic { color: var(--mut); }
.menu-label { flex: 1; min-width: 0; }
.menu-value { color: var(--mut2); font: 500 14px var(--font); max-width: 45%; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-chev { color: var(--mut2); }
.btn.sm { min-height: 44px; min-width: 44px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.storage-row { padding-top: 10px; padding-bottom: 10px; }
.storage-title, .storage-state { display: block; }
.storage-state { margin-top: 2px; color: var(--mut2); font: 500 14px/1.35 var(--font); }
.storage-row.warn .storage-state { color: var(--amber); }
.switch-row { text-align: start; padding-top: 10px; padding-bottom: 10px; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--panel3); border: 1px solid var(--line2); transition: background .18s, border-color .18s; }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--mut); transition: transform .18s var(--ease), background .18s; }
.switch-row[aria-checked="true"] .switch { background: var(--hot-d); border-color: var(--hot-d); }
.switch-row[aria-checked="true"] .switch i { background: #fff; transform: translateX(20px); }
.pin-input { text-align: center; font-size: 22px; letter-spacing: .3em; }
.pin-input::placeholder { font-size: 16px; letter-spacing: normal; }
.menu-row.danger { color: var(--hot); }
.menu-row.danger .menu-ic { color: var(--hot); }
.count-pill { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--hot-d); color: #fff; font: 700 13px/22px var(--mono); text-align: center; }
.me-foot { padding: 26px 16px 8px; text-align: center; font-size: 13px; }

/* ---------- layers ---------- */
#layers { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.layer { position: fixed; inset: 0; pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(5, 6, 9, .66); opacity: 0; transition: opacity .22s; }
.scrim.opaque { background: var(--ink); }
.layer.in .scrim { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-bottom: 0; border-radius: 22px 22px 0 0; transform: translateY(104%); transition: transform .28s var(--ease); outline: 0; }
.sheet.tall { height: 88dvh; }
.layer.in .sheet { transform: none; }
.layer.out .sheet { transform: translateY(104%); transition-duration: .2s; }
.sheet-grab { flex: none; display: grid; place-items: center; height: 26px; cursor: grab; touch-action: none; }
.sheet-grab i { width: 40px; height: 4px; border-radius: 2px; background: var(--line2); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(22px + var(--sab)); }
.sheet-title { font: 900 20px/1.3 var(--font); margin-bottom: 12px; }
.page { position: absolute; inset: 0; margin-inline: auto; max-width: 480px; display: flex; flex-direction: column; background: var(--ink); transform: translateX(100%); transition: transform .28s var(--ease); outline: 0; }
.layer.in .page { transform: none; }
.layer.out .page { transform: translateX(100%); transition-duration: .2s; }
.page-head { display: flex; align-items: center; gap: 4px; flex: none; padding: calc(var(--sat) + 6px) 8px 6px; border-bottom: 1px solid var(--line); }
.page-title { flex: 1; font: 800 18px/1.3 var(--font); }
.page-right { padding-inline-end: 8px; }
.page-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.layer-modal, .layer-full { display: grid; place-items: center; padding: 16px; }
.modal { position: relative; width: min(100%, 420px); max-height: 90dvh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; padding: 22px; transform: translateY(14px) scale(.98); opacity: 0; transition: transform .24s var(--ease), opacity .2s; outline: 0; }
.layer.in .modal { transform: none; opacity: 1; }
.layer.out .modal { opacity: 0; }
.modal.wide { width: min(100%, 440px); }
.layer-full { padding: 0; }
.layer-full .modal { width: 100%; max-width: 480px; height: 100%; max-height: none; border: 0; border-radius: 0; background: var(--ink); padding: 0; }
.confirm h3 { font: 900 19px/1.35 var(--font); margin-bottom: 8px; }
.confirm p { color: var(--mut); }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.stack-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.recovery h3 { font: 900 20px/1.35 var(--font); margin-bottom: 10px; }
.recovery p + p { margin-top: 10px; }
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; outline: 0; }
.code-grid span { padding: 14px 8px; text-align: center; font: 800 22px/1 var(--mono); letter-spacing: .1em; border: 1px solid var(--line2); border-radius: 12px; background: var(--ink2); }
.radio-list { display: flex; flex-direction: column; }
.radio { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-top: 1px solid var(--line); font: 600 16px var(--font); }
.radio.on { color: var(--hot); }
.toast { position: fixed; z-index: 300; left: 50%; bottom: calc(var(--tabh) + var(--sab) + 18px); max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 12px; background: var(--tx); color: #0b0c11; font: 600 14px/1.4 var(--font); text-align: center; transform: translate(-50%, 14px); opacity: 0; pointer-events: none; transition: transform .24s var(--ease), opacity .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: var(--amber); color: #1a1204; }
.toast.good { background: var(--cyan); color: #04121a; }

/* site sheet */
.ss-gal-wrap { margin: 0 -16px 14px; }
.ss-gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.ss-gallery::-webkit-scrollbar { display: none; }
.ss-shot { flex: 0 0 86%; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--line2); scroll-snap-align: center; }
.ss-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.ss-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line2); transition: width .2s, background .2s; }
.ss-dots i.on { width: 18px; background: var(--acc); }
.ss-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 900 27px/1.2 var(--font); }
.ss-dom { font-size: 14px; margin-top: 2px; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.ss-niche { font-weight: 700; color: var(--tx); color: color-mix(in srgb, var(--acc) 75%, var(--tx)); }
.ss-desc { margin-top: 6px; color: var(--mut); }
.ss-extra { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.fact { display: flex; flex-direction: column; font-size: 13px; }
.fact b { font-size: 15px; color: var(--tx); }
.ss-actions { display: grid; grid-template-columns: 1fr 1fr 52px 52px; gap: 10px; margin-top: 18px; }
.ss-open { grid-column: 1 / -1; }
.ss-actions .fav-btn.wide { grid-column: 1 / 3; }
.ss-actions .icon-btn.round { width: 100%; height: 100%; min-height: 48px; }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); color: var(--tx); font: 700 15px/1 var(--font); }
.fav-btn.on { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 60%, transparent); }
.fav-btn.on svg { fill: currentColor; }
.fav-btn.rail { border: 0; padding: 0; }
.fav-btn.rail.on { color: var(--hot); text-shadow: none; }
.ss-related { margin-top: 22px; }
.ss-related .ss-h3 { padding: 0 0 8px; }
.ss-related .strip { padding: 0; }

/* checkin / tasks / invite / notifications */
.checkin .big { text-align: center; margin: 4px 0 2px; }
.checkin-sum { text-align: center; margin-bottom: 14px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; color: var(--mut); min-width: 0; }
.day b { font-size: 15px; color: var(--tx); }
.day-empty { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed var(--line2); display: block; }
.day.on { background: color-mix(in srgb, var(--good) 14%, transparent); border-color: var(--good); color: var(--good); }
.day.today { box-shadow: 0 0 0 2px var(--hot) inset; }
.checkin .btn { width: 100%; }
.checkin p { margin-top: 12px; }
.tasks, .invite { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.task { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.task-title { font: 700 16px/1.35 var(--font); }
.task.done .task-title { color: var(--mut); }
.bar { height: 6px; border-radius: 3px; background: var(--panel3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--good); border-radius: 3px; }
.invite-code { font: 900 40px/1.1 var(--mono); letter-spacing: .14em; padding: 18px 0; text-align: center; border: 1px dashed var(--line2); border-radius: 14px; }
.invite-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.invite-actions .btn { flex: 1; }
.invite-stat { font: 700 16px/1.4 var(--font); }
.notif-list { display: flex; flex-direction: column; }
.notif { display: grid; grid-template-columns: 40px 1fr 12px; gap: 12px; align-items: start; padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: start; width: 100%; }
.notif-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; color: var(--cyan); }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-title { font: 700 16px/1.35 var(--font); }
.notif-body { color: var(--mut); font-size: 14px; }
.notif:not(.unread) .notif-title { font-weight: 600; color: var(--mut); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hot); margin-top: 8px; }
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 14px; }
.steps b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--hot-d); color: #fff; flex: none; }
.legal-frame { flex: 1; width: 100%; border: 0; background: var(--ink); min-height: 0; }
.page-body:has(.legal-frame) { overflow: hidden; }

/* ---------- ads ---------- */
.splash { position: relative; height: 100%; background: #000; }
.splash-link { display: block; height: 100%; }
.splash .ad-img, .splash .ad-frame { object-fit: cover; }
.splash .ad-label { top: calc(var(--sat) + 14px); left: 14px; }
.ad-skip { position: absolute; z-index: 4; top: calc(var(--sat) + 10px); right: 12px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font: 700 15px/1 var(--mono); border: 1px solid rgba(255, 255, 255, .35); }
.ad-skip.ready { background: var(--hot-d); border-color: var(--hot-d); }
.preroll-note { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: calc(var(--sab) + 18px); display: flex; flex-direction: column; gap: 2px; font-size: 14px; text-shadow: 0 1px 8px #000; }
.popup-modal { background: transparent !important; border: 0 !important; padding: 0 !important; overflow: visible !important; width: auto !important; }
.popup-ad { position: relative; }
.popup-media { display: block; width: min(78vw, 340px); border-radius: 16px; overflow: hidden; background: #11121b; border: 1px solid var(--line2); }
.popup-link { display: block; position: relative; }
.ad-close { position: absolute; top: -18px; right: -12px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #000; border: 1px solid rgba(255, 255, 255, .4); color: #fff; }
.splash-modal { background: #000 !important; }
#app.immersive #floats { display: none; }
#floats { position: absolute; z-index: 20; right: 10px; bottom: calc(var(--tabh) + var(--sab) + 22px); pointer-events: none; } /* 22 px above the tabs: a clear gap of 20 dp or more, not a mis-tap */
.float-ad { position: relative; width: 132px; pointer-events: auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); background: #11121b; }
.float-link { display: block; position: relative; }
.float-media { display: block; width: 100%; }
.float-ad .ad-label { top: 4px; left: 4px; padding: 2px 6px; }
/* close of the floating banner and of the list ads: the touch area is 44 x 44 dp, the dark disc (28 px) is only the drawing; it is a sibling of the ad link, so a tap on it is never a click on the ad */
.float-x, .ad-x { position: absolute; top: 0; right: 0; z-index: 4; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; }
.float-x::before, .ad-x::before { content: ""; grid-area: 1 / 1; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .7); }
.float-x .ic, .ad-x .ic { grid-area: 1 / 1; }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 24px; background: var(--ink); transition: opacity .25s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-brand { display: flex; align-items: center; gap: 10px; font: 900 30px/1 var(--font); }
.boot-brand svg { color: var(--hot); }
.boot-body { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 320px; }
.boot-body h2 { font: 900 20px/1.3 var(--font); }
.boot-body p { color: var(--mut); }
.boot-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--panel3); border-top-color: var(--hot); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-status { color: var(--mut); font-size: 14px; }
.noscript { padding: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 340px) {
  .hot-row { grid-template-columns: minmax(38px, max-content) minmax(0, 1fr) 56px; }
  .hot-thumb { width: 56px; height: 56px; }
}

/* ---------- 热搜榜, invite poster, invitees, help (gaps vs 91) ---------- */
.hot-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hot-list li { border-bottom: 1px solid var(--line); }
.hot-word { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 4px; text-align: start; font: 600 16px/1.3 var(--font); }
.hot-word:active { background: var(--panel); }
.hot-n { flex: none; width: 26px; text-align: center; font: 800 16px/1 var(--mono); color: var(--mut2); }
.hot-word.top .hot-n { color: #fff; background: var(--hot-d); border-radius: 7px; padding: 5px 0; }
.hot-word.top .hot-w { font-weight: 800; }
.hot-w { flex: 1; min-width: 0; }
.poster-open { width: 100%; }
.invitees h3 { font: 800 16px/1.3 var(--font); margin-bottom: 8px; }
.invitee-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.invitee-list li { display: flex; align-items: center; gap: 14px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 15px; }
.invitee-list li .dim { flex: 1; }
.invitee-list li b { color: var(--good); }
.poster-wrap { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.poster-img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line2); -webkit-touch-callout: default; user-select: auto; }
.poster-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.poster-actions .btn { flex: 1; }
.help { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.faq h3, .help-form h3 { font: 800 16px/1.3 var(--font); margin-bottom: 10px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; position: relative; padding-block: 14px; padding-inline: 0 32px; font: 700 16px/1.4 var(--font); cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 600 22px/1.4 var(--mono); color: var(--mut2); }
.faq-item[open] summary::after { content: "\2212"; color: var(--hot); }
.faq-item p { color: var(--mut); font-size: 15px; line-height: 1.55; padding: 0 0 12px; }
.help-support { width: 100%; }
.help-count { text-align: end; margin-top: -6px; }

/* ---------- other scripts: the regional font first (Han characters in Japanese / Korean must not take the Chinese glyph forms) ---------- */
:root:lang(ja) { --font: "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans CJK JP", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:root:lang(ko) { --font: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:root:lang(ar) { --font: "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
:root:lang(vi) { --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
/* Arabic letters join: no letter-spacing, no forced capitals (Latin codes keep theirs) */
:root:lang(ar) *:not(.invite-code):not(.code-input):not(.hot-n):not(.code-grid) { letter-spacing: normal; text-transform: none; }

/* ---------- right-to-left (Arabic): boxes placed with physical left / right are mirrored here; the rest uses logical properties ---------- */
[dir="rtl"] .poster-mark { right: auto; left: 6%; }
[dir="rtl"] .bell-badge { right: auto; left: 0; }
[dir="rtl"] .tease-body { left: 92px; right: 16px; }
[dir="rtl"] .tease-rail { right: auto; left: 6px; }
[dir="rtl"] .ad-label { left: auto; right: 8px; }
[dir="rtl"] .ad-card .ad-label { left: auto; right: 16px; }
[dir="rtl"] .splash .ad-label { left: auto; right: 14px; }
[dir="rtl"] .float-ad .ad-label { left: auto; right: 4px; }
[dir="rtl"] .hot-row::before { left: auto; right: 0; border-radius: 3px 0 0 3px; }
[dir="rtl"] .rail-item.on::before { left: auto; right: 0; border-radius: 3px 0 0 3px; }
[dir="rtl"] .notice { border-radius: 10px 0 0 10px; }
[dir="rtl"] .strip-over { left: auto; right: 8px; }
[dir="rtl"] .hero-rank { right: auto; left: 14px; }
[dir="rtl"] .tile-rank { left: auto; right: 7px; }
[dir="rtl"] .tile-badge { right: auto; left: 7px; }
[dir="rtl"] .ad-skip { right: auto; left: 12px; }
[dir="rtl"] .ad-close { right: auto; left: -12px; }
[dir="rtl"] #floats { right: auto; left: 10px; }
[dir="rtl"] .float-x, [dir="rtl"] .ad-x { right: auto; left: 0; }
[dir="rtl"] .ad-card .ad-cta { left: auto; right: 16px; }
[dir="rtl"] .faq-item summary::after { right: auto; left: 4px; }
[dir="rtl"] .page { transform: translateX(-100%); }
[dir="rtl"] .layer.in .page { transform: none; }
[dir="rtl"] .layer.out .page { transform: translateX(-100%); }
[dir="rtl"] .ic-left svg, [dir="rtl"] .ic-right svg, [dir="rtl"] .ic-out svg { transform: scaleX(-1); }
[dir="rtl"] .switch-row[aria-checked="true"] .switch i { transform: translateX(-20px); }
[dir="rtl"] .mono, [dir="rtl"] .tease-dom, [dir="rtl"] .ss-dom { unicode-bidi: isolate; }
