/* ===== MoBot v2 — Telegram Mini App ===== */
:root {
  --bg: #09090f;
  --bg-2: #101018;
  --card: #15151f;
  --card-2: #1c1c29;
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f6f6fb;
  --muted: #a3a3bb;
  --faint: #6c6c87;
  --accent: #ff6b45;
  --grad: linear-gradient(135deg, #ff9b3d 0%, #ff5468 55%, #ff2e8a 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 155, 61, .16), rgba(255, 46, 138, .14));
  --good: #2fd27a;
  --bad: #ff4d5e;
  --love: #ff3d8b;
  --meh: #b4b4c8;
  --info: #4da3ff;
  --seen: #a78bfa;
  --gold: #fbbf24;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, .3);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --safe-b: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --tab-h: 64px;
  --tab-space: calc(var(--tab-h) + 22px + var(--safe-b));
  --bar-bg: rgba(20, 20, 30, .78);
  color-scheme: dark;
}
:root.light {
  --bg: #f3f3f8;
  --bg-2: #ebebf3;
  --card: #ffffff;
  --card-2: #f0f1f6;
  --glass: rgba(10, 10, 30, .045);
  --glass-2: rgba(10, 10, 30, .08);
  --line: rgba(15, 15, 40, .09);
  --line-2: rgba(15, 15, 40, .16);
  --text: #14141d;
  --muted: #5d5d73;
  --faint: #9494a8;
  --meh: #7b7b90;
  --shadow: 0 18px 44px rgba(20, 20, 60, .16);
  --shadow-sm: 0 6px 18px rgba(20, 20, 60, .1);
  --bar-bg: rgba(255, 255, 255, .82);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; display: inline-block; vertical-align: -.22em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
#screen { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tab-space) + 10px); }
#screen.fixed { overflow: hidden; padding-bottom: 0; }

/* ---------- boot ---------- */
.boot { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.logo-mark { width: 64px; height: 64px; border-radius: 20px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 14px 36px rgba(255, 70, 110, .35); }
.logo-mark .ic { width: 34px; height: 34px; }
.boot .logo-mark { animation: float 2.4s ease-in-out infinite; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- floating tab bar ---------- */
#tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 30;
  height: var(--tab-h); padding: 6px; border-radius: 24px; display: flex; gap: 2px;
  background: var(--bar-bg); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
#tabbar button {
  flex: 1; border: 0; background: none; border-radius: 18px; color: var(--faint); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: 600 10.5px/1.2 var(--display); transition: color .2s, background .2s;
}
#tabbar .ic { width: 24px; height: 24px; }
#tabbar .ic.on { display: none; }
#tabbar button.on { color: var(--text); background: var(--glass-2); }
#tabbar button.on .ic.off { display: none; }
#tabbar button.on .ic.on { display: inline-block; color: var(--accent); }
#tabbar .dot { position: absolute; top: 7px; left: calc(50% + 7px); min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; background: var(--love); color: #fff; font: 700 10px/16px var(--font); }

/* ---------- generic ---------- */
.page { padding: 14px 16px 0; animation: fadeUp .3s ease both; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 16px; }
.page-head h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.page-head h1 .ic { color: var(--accent); }
.page-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sec { font: 700 15.5px/1.4 var(--display); margin: 24px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec .ic { color: var(--accent); width: 20px; height: 20px; }
.sec .more { margin-inline-start: auto; }
.icon-btn {
  width: 42px; height: 42px; flex: none; border-radius: 14px; border: 1px solid var(--line);
  background: var(--glass); display: grid; place-items: center; color: var(--text); transition: transform .12s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn .ic { width: 21px; height: 21px; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 11px; }
.icon-btn.sm .ic { width: 17px; height: 17px; }
.icon-btn.spin .ic { animation: spin .8s linear infinite; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--glass); color: var(--text);
  font: 600 15px/1 var(--display); transition: transform .12s, opacity .2s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 26px rgba(255, 70, 110, .3); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.btn.danger { color: var(--bad); border-color: rgba(255, 77, 94, .3); }
.btn[disabled] { opacity: .4; pointer-events: none; }

.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; padding: 2px 16px; margin: 0 -16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass); color: var(--text); font: 500 13px/1 var(--font); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s;
}
.chip .ic { width: 17px; height: 17px; }
.chip .n { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; }
.chip.on .n { color: inherit; opacity: .6; }
.chip.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.chip.sm .ic { width: 15px; height: 15px; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; background: var(--glass-2); color: var(--muted); }
.tag.good { background: rgba(47, 210, 122, .13); color: var(--good); }
.tag.bad { background: rgba(255, 77, 94, .13); color: var(--bad); }

.seg { display: inline-flex; padding: 3px; background: var(--glass); border: 1px solid var(--line); border-radius: 13px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 10px; font: 600 13px/1 var(--display); color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.seg button .ic { width: 16px; height: 16px; }
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
:root.light .seg button.on { background: #fff; }
.seg.block { display: flex; width: 100%; }
.seg.block button { flex: 1; justify-content: center; height: 40px; font-size: 14px; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); font-size: 14px; }
.empty .em-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 22px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); }
.empty .em-ic .ic { width: 34px; height: 34px; }
.empty b { color: var(--text); display: block; font: 700 17px/1.4 var(--display); margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

.skel { background: linear-gradient(90deg, var(--glass) 0%, var(--glass-2) 50%, var(--glass) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- discover ---------- */
.discover { position: relative; height: 100%; display: flex; flex-direction: column; padding-bottom: var(--tab-space); overflow: hidden; }
.ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient .amb { position: absolute; inset: -15%; background: center/cover no-repeat; filter: blur(48px) saturate(1.5); opacity: 0; transition: opacity .9s ease; }
.ambient .amb.show { opacity: .55; }
.ambient::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 9, 15, .55) 0%, rgba(9, 9, 15, .35) 40%, rgba(9, 9, 15, .85) 100%); }
:root.light .ambient .amb.show { opacity: .35; }
:root.light .ambient::after { background: linear-gradient(180deg, rgba(243, 243, 248, .6), rgba(243, 243, 248, .3) 40%, rgba(243, 243, 248, .9)); }
.discover > *:not(.ambient) { position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 8px; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 20px/1 var(--display); }
.brand .logo-mark { width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 6px 16px rgba(255, 70, 110, .35); }
.brand .logo-mark .ic { width: 20px; height: 20px; }
.moods { padding: 2px 0 12px; }
.moods .chip { background: rgba(20, 20, 30, .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
:root.light .moods .chip { background: rgba(255, 255, 255, .7); }
.moods .chip.on, :root.light .moods .chip.on { background: var(--text); color: var(--bg); }
.moods .chip .ic { color: var(--vc, var(--accent)); }
.moods .chip.on .ic { color: inherit; }

.deck { position: relative; flex: 1; margin: 0 16px; min-height: 280px; }
.card {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden; background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .06); touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .38s; will-change: transform;
}
.card[data-i="1"] { transform: translateY(14px) scale(.95); }
.card[data-i="2"] { transform: translateY(28px) scale(.9); opacity: .55; }
.card img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 36%, rgba(6, 6, 12, .74) 58%, rgba(6, 6, 12, .97) 100%); }
.card .badges { position: absolute; top: 14px; right: 14px; left: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.glass-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; color: #fff;
  font: 600 12.5px/1 var(--display); background: rgba(12, 12, 20, .5); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.glass-pill .ic { width: 16px; height: 16px; }
.glass-pill.match .ic { color: var(--good); }
.glass-pill.match.mid .ic { color: var(--gold); }
.glass-pill.explore .ic { color: var(--seen); }
.glass-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); color: #fff;
  background: rgba(12, 12, 20, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: grid; place-items: center;
}
.glass-btn .ic { width: 20px; height: 20px; }
.card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 16px; color: #fff; }
.card .reason { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font: 600 12.5px/1.2 var(--font); padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); margin-bottom: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.card .reason .ic { width: 15px; height: 15px; color: #ffb36b; }
.card h2 { font-size: 26px; line-height: 1.18; font-weight: 700; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.card .sub { font-size: 13px; color: rgba(255, 255, 255, .7); margin-top: 3px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; margin-top: 8px; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta .ic { width: 15px; height: 15px; opacity: .75; }
.meta .star { color: var(--gold); font-weight: 700; }
.meta .star .ic { opacity: 1; }
.card .meta { color: rgba(255, 255, 255, .86); }
.card .genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.card .genres span { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .12); }
.card .ov { font-size: 13.5px; color: rgba(255, 255, 255, .8); margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .row-btns { display: flex; gap: 8px; margin-top: 13px; }
.card .xbtn { height: 40px; padding: 0 15px; border-radius: 13px; border: 0; color: #fff; font: 600 13.5px/1 var(--display); display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .15); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.card .xbtn .ic { width: 18px; height: 18px; }
.card .xbtn.ai { background: var(--grad); box-shadow: 0 6px 18px rgba(255, 70, 110, .35); }
.stamp {
  position: absolute; top: 32%; left: 50%; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 18px;
  font: 800 24px/1 var(--display); color: #fff; opacity: 0; pointer-events: none; white-space: nowrap;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.stamp .ic { width: 28px; height: 28px; }
.stamp.like { background: rgba(47, 210, 122, .88); transform: translate(-50%, -50%) rotate(-10deg); }
.stamp.nope { background: rgba(255, 77, 94, .88); transform: translate(-50%, -50%) rotate(10deg); }
.stamp.love { background: rgba(255, 61, 139, .9); transform: translate(-50%, -50%); }
.stamp.skip { background: rgba(110, 110, 135, .88); transform: translate(-50%, -50%); }
.stamp.later { background: rgba(77, 163, 255, .9); transform: translate(-50%, -50%); }
.deck-ph { position: absolute; inset: 0; border-radius: 28px; }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; border-radius: 28px; border: 1.5px dashed var(--line-2); background: var(--glass); }

.actions { display: flex; align-items: flex-start; justify-content: center; gap: 12px; padding: 14px 10px 6px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; font: 600 11px/1 var(--display); color: var(--muted); }
.act .circle { border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); transition: transform .12s; }
.act:active .circle { transform: scale(.88); }
.act .circle .ic { width: 46%; height: 46%; }
.act.sm .circle { width: 46px; height: 46px; }
.act.md .circle { width: 58px; height: 58px; }
.act.lg .circle { width: 68px; height: 68px; }
.act.skip .circle { color: var(--meh); }
.act.nope .circle { color: var(--bad); }
.act.like .circle { color: var(--good); }
.act.later .circle { color: var(--info); }
.act.love .circle { color: #fff; background: var(--grad); border: 0; box-shadow: 0 12px 28px rgba(255, 61, 139, .42); }

.coach { direction: ltr; position: absolute; inset: 0; z-index: 20; border-radius: 28px; background: rgba(6, 6, 12, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; display: grid; grid-template: 1fr auto 1fr / 1fr auto 1fr; align-items: center; justify-items: center; padding: 18px; text-align: center; animation: fadeUp .35s ease both; }
.coach .h, .coach .mid { direction: rtl; }
.coach .h { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 13px/1.3 var(--display); }
.coach .h .ic { width: 30px; height: 30px; }
.coach .up { grid-area: 1 / 2; align-self: start; } .coach .up .ic { color: var(--love); }
.coach .down { grid-area: 3 / 2; align-self: end; } .coach .down .ic { color: var(--meh); }
.coach .right { grid-area: 2 / 3; } .coach .right .ic { color: var(--good); }
.coach .left { grid-area: 2 / 1; } .coach .left .ic { color: var(--bad); }
.coach .mid { grid-area: 2 / 2; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 170px; font-size: 13.5px; }
.coach .mid .hand { width: 54px; height: 54px; color: #ffb36b; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }

/* ---------- rows / grids ---------- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; padding: 10px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); position: relative; transition: opacity .3s, transform .15s; animation: fadeUp .3s ease both; }
.row:active { transform: scale(.985); }
.row .thumb { width: 82px; height: 123px; flex: none; border-radius: 13px; object-fit: cover; background: var(--card-2); }
.row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row .t { font: 700 15.5px/1.35 var(--display); }
.row .t .y { font: 500 12.5px/1 var(--font); color: var(--faint); }
.row .meta { margin-top: 0; color: var(--muted); font-size: 12.5px; }
.row .why { font-size: 13px; opacity: .92; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row .reason { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.row .reason .ic { width: 15px; height: 15px; color: var(--accent); }
.row .ai { font-size: 12.5px; display: flex; gap: 7px; align-items: flex-start; margin-top: 2px; }
.fit { flex: none; display: inline-flex; align-items: center; gap: 3px; font-weight: 700; padding: 0 7px; border-radius: 8px; font-size: 12px; line-height: 21px; }
.fit .ic { width: 14px; height: 14px; }
.fit.hi { background: rgba(47, 210, 122, .14); color: var(--good); }
.fit.mid { background: rgba(251, 191, 36, .14); color: var(--gold); }
.fit.lo { background: rgba(255, 77, 94, .14); color: var(--bad); }
.row.dim { opacity: .55; }
.ring { position: absolute; top: 10px; left: 10px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--display); background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--card-2) 0); }
.ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; }
.row .body.has-ring { padding-left: 52px; }
.quick { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }
.quick button { height: 32px; min-width: 40px; padding: 0 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.quick button .ic { width: 17px; height: 17px; }
.quick button.on.like { color: var(--good); border-color: rgba(47, 210, 122, .45); background: rgba(47, 210, 122, .1); }
.quick button.on.love { color: var(--love); border-color: rgba(255, 61, 139, .45); background: rgba(255, 61, 139, .1); }
.quick button.on.nope { color: var(--bad); border-color: rgba(255, 77, 94, .45); background: rgba(255, 77, 94, .1); }
.quick button.on.later { color: var(--info); border-color: rgba(77, 163, 255, .45); background: rgba(77, 163, 255, .1); }

.banner { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); font-size: 13px; margin-bottom: 12px; }
.banner .ic { width: 20px; height: 20px; color: var(--accent); }
.banner.ok { border-color: rgba(47, 210, 122, .3); }
.banner.ok .ic { color: var(--good); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.tile { position: relative; min-width: 0; animation: fadeUp .3s ease both; }
.tile .p { width: 100%; aspect-ratio: 2/3; border-radius: 14px; object-fit: cover; background: var(--card-2); box-shadow: var(--shadow-sm); }
.tile .tt { font: 600 12.5px/1.35 var(--display); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .ty { font-size: 11.5px; color: var(--faint); display: flex; align-items: center; gap: 3px; }
.tile .ty .ic { width: 12px; height: 12px; color: var(--gold); }
.tile .st { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 10, 16, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile .st .ic { width: 16px; height: 16px; }
.tile .kind { position: absolute; top: 7px; right: 7px; font: 700 10px/1 var(--display); padding: 5px 7px; border-radius: 8px; background: rgba(10, 10, 16, .66); color: #fff; }
.tile .more-btn { position: absolute; bottom: 52px; left: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(10, 10, 16, .72); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile .more-btn .ic { width: 18px; height: 18px; }
.c-good { color: var(--good); } .c-bad { color: var(--bad); } .c-love { color: var(--love); } .c-info { color: var(--info); } .c-seen { color: var(--seen); } .c-meh { color: var(--meh); }

/* ---------- search & ask ---------- */
.search-top { position: sticky; top: 0; z-index: 5; margin: -14px -16px 8px; padding: 12px 16px 10px; background: var(--bg); }
.search-wrap { position: relative; margin-top: 10px; }
.search-wrap > .ic { position: absolute; right: 14px; top: 14px; width: 20px; height: 20px; color: var(--faint); }
.input { width: 100%; height: 48px; border-radius: 15px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px; padding: 0 44px 0 14px; outline: none; transition: border-color .15s; }
.input:focus { border-color: rgba(255, 107, 69, .55); }
.ask-box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ask-box textarea { width: 100%; border: 0; outline: none; background: none; color: var(--text); font-size: 15.5px; resize: none; min-height: 84px; line-height: 1.65; }
.ask-box textarea::placeholder { color: var(--faint); }
.understood { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 16px; background: var(--grad-soft); border: 1px solid rgba(255, 107, 69, .22); margin: 18px 0 12px; font-size: 14px; }
.understood .ic { width: 22px; height: 22px; color: var(--accent); }
.thinking { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-top: 18px; color: var(--muted); font-size: 14px; }
.dots i { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; background: #ff5468; }
.dots i:nth-child(3) { animation-delay: .3s; background: #ff2e8a; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-6px); opacity: 1; } }

/* ---------- library ---------- */
.lib-cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--grad-soft); border: 1px solid rgba(255, 107, 69, .22); margin-bottom: 18px; }
.lib-cta .bigic { width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.lib-cta .bigic .ic { width: 28px; height: 28px; }
.lib-cta b { display: block; font: 700 15.5px/1.4 var(--display); }
.lib-cta span { font-size: 12.5px; color: var(--muted); }
.lib-cta .btn { margin-inline-start: auto; }
.lists-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.lists-row::-webkit-scrollbar { display: none; }
.lcard { width: 132px; flex: none; border: 0; background: none; padding: 0; text-align: right; color: var(--text); }
.lcard .collage { width: 132px; height: 132px; border-radius: 18px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; background: var(--card-2); border: 1px solid var(--line); position: relative; }
.lcard .collage img { width: 100%; height: 100%; object-fit: cover; }
.lcard .collage .one { grid-column: 1 / -1; grid-row: 1 / -1; }
.lcard .collage .ph { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-items: center; color: var(--accent); }
.lcard .collage .ph .ic { width: 40px; height: 40px; }
.lcard.on .collage { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.lcard .nm { font: 600 13.5px/1.35 var(--display); margin-top: 7px; display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lcard .nm .ic { width: 16px; height: 16px; color: var(--accent); }
.lcard .cnt { font-size: 12px; color: var(--faint); }
.lcard.new .collage { border: 1.5px dashed var(--line-2); background: var(--glass); grid-template-columns: 1fr; }
.lib-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 14px; }
.select { height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 13.5px; padding: 0 10px; }
.list-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; }
.list-head h3 { font: 700 18px/1.3 var(--display); flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.list-head h3 .ic { color: var(--accent); }

/* ---------- profile ---------- */
.me-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); margin: 6px 0 14px; position: relative; overflow: hidden; }
.me-card::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: .7; }
.me-card > * { position: relative; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--grad); display: grid; place-items: center; font: 700 26px/1 var(--display); color: #fff; flex: none; border: 2px solid rgba(255, 255, 255, .2); }
.me-card h1 { font-size: 21px; }
.persona { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font: 600 13px/1 var(--display); padding: 6px 12px; border-radius: 999px; background: var(--grad); color: #fff; }
.persona .ic { width: 16px; height: 16px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat .ic { width: 20px; height: 20px; }
.stat b { font: 700 18px/1.2 var(--display); }
.stat span { font-size: 10.5px; color: var(--muted); }
.taste .p-title { display: flex; align-items: center; gap: 12px; font: 700 19px/1.3 var(--display); }
.taste .p-title .badge-ic { width: 46px; height: 46px; border-radius: 15px; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; }
.taste .p-title .badge-ic .ic { width: 26px; height: 26px; }
.taste .summary { margin-top: 12px; font-size: 14.5px; }
.taste .lbl { font: 700 12.5px/1 var(--display); color: var(--muted); margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.taste .lbl .ic { width: 16px; height: 16px; }
.taste ul { margin: 0; padding: 0; list-style: none; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.taste li { display: flex; gap: 8px; align-items: flex-start; }
.taste li .ic { width: 17px; height: 17px; color: var(--accent); margin-top: 3px; }
.picks { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.picks::-webkit-scrollbar { display: none; }
.picks .tile { width: 108px; flex: none; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 84px 1fr 32px; align-items: center; gap: 10px; font-size: 13px; }
.bar .track { height: 10px; border-radius: 10px; background: var(--card-2); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 10px; background: var(--grad); }
.bar .v { font-size: 12px; color: var(--faint); text-align: left; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; padding-bottom: 0; }
.set-row:first-child { padding-top: 0; }
.set-row .l { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.set-row .l .ic { color: var(--muted); }
.attrib { text-align: center; font-size: 11.5px; color: var(--faint); padding: 26px 10px 4px; line-height: 1.8; }
.attrib .tmdb { display: inline-block; font-weight: 800; letter-spacing: .5px; padding: 2px 9px; border-radius: 6px; background: linear-gradient(90deg, #90cea1, #01b4e4); color: #0d253f; font-size: 11px; direction: ltr; }

/* ---------- details sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); transform: translateY(100%); transition: transform .4s cubic-bezier(.2, .8, .2, 1); visibility: hidden; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet.open { transform: none; visibility: visible; }
.hero { position: relative; height: 270px; background: var(--card-2) center/cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 35%, var(--bg) 100%); }
.hero .glass-btn { position: absolute; top: 14px; left: 14px; z-index: 2; }
.d-head { display: flex; gap: 14px; padding: 0 16px; margin-top: -96px; position: relative; z-index: 2; align-items: flex-end; }
.d-head .poster { width: 116px; height: 174px; border-radius: 16px; object-fit: cover; box-shadow: var(--shadow); flex: none; background: var(--card-2); border: 1px solid rgba(255, 255, 255, .1); }
.d-head h2 { font-size: 23px; line-height: 1.22; }
.d-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.d-head .meta { color: var(--muted); }
.d-body { padding: 0 16px 44px; }
.d-genres { margin-top: 16px; }
.d-label { font: 700 13px/1 var(--display); color: var(--muted); margin: 20px 0 10px; display: flex; align-items: center; gap: 6px; }
.d-label .ic { width: 16px; height: 16px; }
.react { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 5px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.react button { height: 64px; border: 0; border-radius: 15px; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 600 12px/1 var(--display); transition: all .18s; }
.react button .ic { width: 25px; height: 25px; }
.react button .ic.f { display: none; }
.react button.on .ic.b { display: none; }
.react button.on .ic.f { display: inline-block; animation: pop .35s ease both; }
.react button[data-r="dislike"].on { background: rgba(255, 77, 94, .14); color: var(--bad); }
.react button[data-r="meh"].on { background: rgba(180, 180, 200, .14); color: var(--meh); }
.react button[data-r="like"].on { background: rgba(47, 210, 122, .14); color: var(--good); }
.react button[data-r="love"].on { background: rgba(255, 61, 139, .15); color: var(--love); }
.toggles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.toggle { height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 13px/1 var(--display); position: relative; transition: all .15s; }
.toggle .ic { width: 19px; height: 19px; }
.toggle.on.later { color: var(--info); border-color: rgba(77, 163, 255, .45); background: rgba(77, 163, 255, .1); }
.toggle.on.seen { color: var(--seen); border-color: rgba(167, 139, 250, .45); background: rgba(167, 139, 250, .1); }
.toggle.on.lists { color: var(--accent); border-color: rgba(255, 107, 69, .4); background: rgba(255, 107, 69, .08); }
.toggle .cnt { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; padding: 0 5px; }
.ov-box { font-size: 14.5px; line-height: 1.8; }
.ov-box .lang-toggle { border: 0; background: none; color: var(--accent); font: 600 12.5px/1 var(--display); padding: 0; margin-top: 8px; display: inline-flex; align-items: center; gap: 5px; }
.ov-box .lang-toggle .ic { width: 15px; height: 15px; }
.providers { display: flex; flex-wrap: wrap; gap: 10px; }
.prov { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.prov img { width: 32px; height: 32px; border-radius: 9px; }
.prov-sec { font-size: 12px; color: var(--faint); margin: 10px 0 7px; }
.cast { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.cast::-webkit-scrollbar { display: none; }
.person { width: 76px; flex: none; text-align: center; }
.person img, .person .ph { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; margin: 0 auto; background: var(--card-2); display: grid; place-items: center; color: var(--faint); font: 700 18px/1 var(--display); }
.person .n { font: 600 11.5px/1.3 var(--display); margin-top: 6px; }
.person .c { font-size: 10.5px; color: var(--faint); line-height: 1.3; }

/* AI explanation */
.ai-cta { width: 100%; margin-top: 18px; min-height: 60px; border-radius: 18px; border: 0; color: #fff; background: var(--grad); display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 12px 28px rgba(255, 61, 139, .3); font: 700 16px/1.2 var(--display); }
.ai-cta small { display: block; font: 500 11.5px/1.3 var(--font); opacity: .9; margin-top: 2px; }
.ai-cta .ic { width: 26px; height: 26px; }
.ai-card { margin-top: 18px; border-radius: 22px; padding: 18px; background: linear-gradient(165deg, rgba(255, 155, 61, .1), rgba(255, 46, 138, .06) 45%, var(--card) 100%); border: 1px solid rgba(255, 107, 69, .24); animation: fadeUp .4s ease both; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 700 14px/1 var(--display); }
.ai-head > span { display: inline-flex; align-items: center; gap: 6px; }
.ai-head .ic { width: 20px; height: 20px; color: var(--accent); }
.ai-head .badge { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(47, 210, 122, .14); color: var(--good); display: inline-flex; align-items: center; gap: 4px; }
.ai-head .badge .ic { color: var(--good); width: 14px; height: 14px; }
.ai-card .hook { font: 700 17.5px/1.55 var(--display); margin-top: 12px; display: flex; gap: 8px; }
.ai-card .hook .ic { width: 22px; height: 22px; color: var(--accent); opacity: .7; flex: none; margin-top: 4px; }
.ai-card .story { font-size: 14.5px; margin-top: 10px; line-height: 1.8; }
.ai-card .vibes { margin-top: 12px; }
.ai-card .blk { margin-top: 14px; font-size: 14px; line-height: 1.75; }
.ai-card .blk b { display: flex; align-items: center; gap: 6px; font: 700 12.5px/1 var(--display); color: var(--muted); margin-bottom: 6px; }
.ai-card .blk b .ic { width: 16px; height: 16px; color: var(--accent); }
.ai-card .two { display: grid; gap: 8px; margin-top: 14px; }
.ai-card .two div { display: flex; gap: 8px; padding: 11px 12px; border-radius: 13px; font-size: 13.5px; line-height: 1.6; }
.ai-card .two .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ai-card .two .yes { background: rgba(47, 210, 122, .1); } .ai-card .two .yes .ic { color: var(--good); }
.ai-card .two .no { background: rgba(255, 77, 94, .1); } .ai-card .two .no .ic { color: var(--bad); }
.meters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.meter { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 12px; background: var(--glass); font-size: 12.5px; }
.meter > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.meter .ic { width: 16px; height: 16px; color: var(--muted); }
.meter .lv { display: inline-flex; gap: 3px; direction: ltr; }
.meter .lv i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.meter .lv i.f { background: var(--accent); }
.ai-card .note { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 6px; }
.ai-card .note .ic { width: 15px; height: 15px; margin-top: 3px; }
.ai-card .verdict { margin-top: 14px; padding: 13px; border-radius: 14px; background: var(--glass-2); font: 600 14px/1.6 var(--display); display: flex; gap: 8px; }
.ai-card .verdict .ic { width: 20px; height: 20px; color: var(--gold); flex: none; margin-top: 2px; }
.ai-loading { margin-top: 18px; border-radius: 22px; padding: 24px 16px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--muted); font-size: 14px; }
.ai-loading .orb { width: 50px; height: 50px; border-radius: 50%; background: var(--grad); animation: pulse 1.4s ease-in-out infinite; display: grid; place-items: center; color: #fff; }
.ai-loading .orb .ic { width: 26px; height: 26px; }
@keyframes pulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 12px rgba(255, 61, 139, .12); } }
.ai-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 11.5px; color: var(--faint); }
.ai-foot button { border: 0; background: none; color: var(--accent); font: 600 12px/1 var(--display); padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.ai-foot button .ic { width: 14px; height: 14px; }

/* ---------- modal (bottom sheet) ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; visibility: hidden; }
.modal.open { visibility: visible; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; }
.modal.open .backdrop { opacity: 1; }
.modal .panel { position: relative; max-height: 88vh; overflow-y: auto; background: var(--bg-2); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line); padding: 10px 16px calc(20px + var(--safe-b)); transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.modal.open .panel { transform: none; }
.modal .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; }
.modal h3 { font: 700 18px/1.3 var(--display); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.modal h3 .ic { color: var(--accent); }
.m-title { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.m-title img { width: 54px; height: 81px; border-radius: 10px; object-fit: cover; background: var(--card-2); }
.m-title b { font: 700 16px/1.35 var(--display); display: block; }
.m-title span { font-size: 12.5px; color: var(--muted); }
.m-list { display: flex; flex-direction: column; gap: 8px; }
.m-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); text-align: right; font: 600 14.5px/1.3 var(--display); color: var(--text); width: 100%; }
.m-item .ic { width: 22px; height: 22px; color: var(--accent); }
.m-item .grow { flex: 1; min-width: 0; }
.m-item small { display: block; font: 500 12px/1.3 var(--font); color: var(--faint); }
.m-item .chk { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.m-item .chk .ic { width: 16px; height: 16px; color: inherit; }
.m-item.on .chk { background: var(--accent); border-color: var(--accent); color: #fff; }
.m-item.danger, .m-item.danger .ic { color: var(--bad); }
.m-new { display: flex; gap: 8px; margin-top: 10px; }
.m-new .input { padding: 0 14px; height: 46px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.icon-pick button { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); color: var(--muted); display: grid; place-items: center; }
.icon-pick button .ic { width: 22px; height: 22px; }
.icon-pick button.on { border-color: var(--accent); color: var(--accent); background: rgba(255, 107, 69, .1); }

/* ---------- quick rate ---------- */
.qr { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: 12px 16px calc(16px + var(--safe-b)); animation: fadeUp .3s ease both; }
.qr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qr-top h3 { font: 700 17px/1.3 var(--display); }
.qr-top .count { font: 600 12.5px/1 var(--display); color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.qr-top .count .ic { width: 15px; height: 15px; color: var(--good); }
.qr-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; margin: 14px 0; min-height: 0; }
.qr-card { height: 100%; max-height: 470px; aspect-ratio: 2/3; border-radius: 24px; overflow: hidden; position: relative; box-shadow: var(--shadow); background: var(--card-2); animation: fadeUp .3s ease both; }
.qr-card img { width: 100%; height: 100%; object-fit: cover; }
.qr-card .cap { position: absolute; inset: auto 0 0 0; padding: 50px 14px 14px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .9)); color: #fff; }
.qr-card .cap b { font: 700 19px/1.25 var(--display); display: block; }
.qr-card .cap span { font-size: 12.5px; opacity: .8; }
.qr-q { text-align: center; font: 600 14px/1 var(--display); color: var(--muted); margin-bottom: 10px; }
.qr .react button { height: 70px; }
.qr-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

/* ---------- onboarding ---------- */
.onb { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; }
.onb-in { flex: 1; display: flex; flex-direction: column; padding: 22px 18px calc(18px + var(--safe-b)); animation: fadeUp .35s ease both; }
.onb-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.onb-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--card-2); }
.onb-progress i.on { background: var(--grad); }
.onb h1 { font-size: 26px; line-height: 1.3; }
.onb p.lead { color: var(--muted); margin-top: 8px; font-size: 15px; }
.onb-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; }
.onb-hero .posters { display: flex; gap: 10px; margin-bottom: 18px; transform: rotate(-4deg); }
.onb-hero .posters div { width: 88px; height: 132px; border-radius: 14px; background: var(--card-2) center/cover; box-shadow: var(--shadow); }
.onb-hero .posters div:nth-child(2) { transform: translateY(-16px) scale(1.06); }
.onb-points { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; text-align: right; width: 100%; max-width: 340px; }
.onb-points div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.onb-points .ic { width: 22px; height: 22px; color: var(--accent); }
.onb-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.opt-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); text-align: right; transition: all .15s; }
.opt .oi { width: 50px; height: 50px; border-radius: 15px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); flex: none; }
.opt .oi .ic { width: 28px; height: 28px; }
.opt b { display: block; font: 700 16px/1.3 var(--display); }
.opt span { font-size: 13px; color: var(--muted); }
.opt.on { border-color: var(--accent); background: rgba(255, 107, 69, .07); }
.vibe-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 20px; }
.vibe { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); font: 600 14px/1.3 var(--display); text-align: right; transition: all .15s; color: var(--text); }
.vibe .vi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--vcbg, rgba(255,255,255,.08)); color: var(--vc); flex: none; }
.vibe .vi .ic { width: 23px; height: 23px; }
.vibe.on { border-color: var(--vc); background: var(--vcbg, var(--card)); }
.vibe .ok { margin-inline-start: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--vc); color: #0b0b12; display: none; place-items: center; }
.vibe .ok .ic { width: 14px; height: 14px; }
.vibe.on .ok { display: grid; animation: pop .3s ease both; }
.rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.rt { position: relative; border-radius: 15px; overflow: hidden; aspect-ratio: 2/3; background: var(--card-2); transition: transform .15s; }
.rt img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.rt::after { content: ''; position: absolute; inset: 40% 0 0 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .92)); pointer-events: none; }
.rt .nm { position: absolute; inset: auto 0 44px 0; z-index: 1; padding: 0 7px; font: 700 11.5px/1.25 var(--display); color: #fff; text-align: center; text-shadow: 0 1px 6px #000; }
.rt .bt { position: absolute; inset: auto 0 0 0; z-index: 1; display: flex; padding: 6px; gap: 5px; }
.rt .bt button { flex: 1; height: 32px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .17); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: all .15s; }
.rt .bt button .ic { width: 18px; height: 18px; }
.rt .badge { position: absolute; top: 7px; right: 7px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.rt .badge .ic { width: 17px; height: 17px; }
.rt.liked .badge { display: grid; background: var(--good); animation: pop .3s ease both; }
.rt.loved .badge { display: grid; background: var(--love); animation: pop .3s ease both; }
.rt.disliked .badge { display: grid; background: var(--bad); animation: pop .3s ease both; }
.rt.liked { box-shadow: 0 0 0 3px var(--good); }
.rt.loved { box-shadow: 0 0 0 3px var(--love); }
.rt.disliked { box-shadow: 0 0 0 3px var(--bad); }
.rt.disliked img { filter: grayscale(1) brightness(.55); }
.rt .bt button.on[data-a="like"] { background: var(--good); }
.rt .bt button.on[data-a="love"] { background: var(--love); }
.rt .bt button.on[data-a="dislike"] { background: var(--bad); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-space) + 112px); z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 9px 10px 9px 14px; border-radius: 16px; background: rgba(26, 26, 38, .95); color: #fff; font: 600 13.5px/1.3 var(--display); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); transition: all .25s; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .08); }
.toast .ic { width: 19px; height: 19px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 10px; height: 30px; padding: 0 11px; font: 700 12.5px/1 var(--display); display: inline-flex; align-items: center; gap: 4px; }
.toast button .ic { width: 15px; height: 15px; }
body.sheet-open .toast { bottom: calc(26px + var(--safe-b)); }
body.modal-open .toast { bottom: auto; top: calc(14px + var(--tg-content-safe-area-inset-top, 0px)); transform: translate(-50%, -20px); }
body.modal-open .toast.show { transform: translate(-50%, 0); }

.outside { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 30px; }

@media (min-width: 560px) {
  #screen > .page, .discover > *:not(.ambient) { max-width: 560px; margin-inline: auto; width: 100%; }
  .deck { width: calc(100% - 32px); }
  .grid { grid-template-columns: repeat(4, 1fr); }
  #tabbar { max-width: 520px; margin: 0 auto; }
}
@media (max-height: 680px) {
  .card h2 { font-size: 22px; }
  .card .ov { display: none; }
  .act.md .circle { width: 52px; height: 52px; }
  .act.lg .circle { width: 60px; height: 60px; }
  .act.sm .circle { width: 42px; height: 42px; }
  .actions { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
