:root {
  --bg: #fff5f8;
  --ink: #4b2942;
  --muted: #9a7a90;
  --line: rgba(75, 41, 66, 0.1);
  --line-2: rgba(75, 41, 66, 0.16);
  --card: #ffffff;
  --pink: #ff5c9a;
  --pink-2: #ff8fb8;
  --pink-soft: #ffe1ec;
  --lav: #8f74ff;
  --lav-soft: #ece6ff;
  --peach-soft: #ffe8d9;
  --mint-soft: #d9f4ea;
  --gold: #ffb84d;
  --shadow: 0 10px 30px rgba(255, 92, 154, 0.14), 0 2px 6px rgba(75, 41, 66, 0.05);
  --panel: rgba(255, 255, 255, 0.78);
  --frame: #ffffff;
  --pink-ink: #c06a90;
  --lav-ink: #8a7db8;
  --blurb: #6e5268;
  --ph-s: 90%;
  --ph-l: 90%;
  --pht-s: 40%;
  --pht-l: 38%;
  --backdrop: rgba(255, 214, 230, 0.55);
  --ray: rgba(255, 143, 184, 0.16);
  --round: "Fredoka", "Nunito", system-ui, sans-serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cw: 168px;
  --gap: 20px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1a1020;
  --ink: #fbeaf3;
  --muted: #b598ab;
  --line: rgba(255, 220, 240, 0.1);
  --line-2: rgba(255, 220, 240, 0.17);
  --card: #2a1b2e;
  --pink: #ff6fa8;
  --pink-2: #ff8fb8;
  --pink-soft: #43213a;
  --lav-soft: #2c2448;
  --peach-soft: #36202a;
  --mint-soft: #1d3731;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  --panel: rgba(42, 27, 46, 0.8);
  --frame: #3b2840;
  --pink-ink: #ff9cc6;
  --lav-ink: #a99be0;
  --blurb: #dccbd6;
  --ph-s: 35%;
  --ph-l: 26%;
  --pht-s: 70%;
  --pht-l: 82%;
  --backdrop: rgba(12, 6, 14, 0.62);
  --ray: rgba(255, 111, 168, 0.1);
  color-scheme: dark;
}
:root[data-theme="dark"] .tag { color: #c3b6ff; }
:root[data-theme="dark"] .tag:nth-child(3n+2) { color: #ffa3c8; }
:root[data-theme="dark"] .tag:nth-child(3n) { color: #8fe0c0; }
:root[data-theme="dark"] .sprinkles svg { opacity: 0.3 !important; }
body, .filters, .modal, .chip, .pill-btn, .card .pbox, select { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; }
body {
  color: var(--ink);
  font: 600 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  background:
    radial-gradient(700px 500px at 8% 0%, var(--lav-soft), transparent 60%),
    radial-gradient(800px 600px at 100% 20%, var(--pink-soft), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, var(--peach-soft), transparent 60%),
    var(--bg);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--pink-2); outline-offset: 2px; }
svg { width: 1em; height: 1em; }
.defs { position: absolute; width: 0; height: 0; }

/* floating hearts and stars */
.sprinkles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sprinkles svg { position: absolute; animation: bob 7s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-22px) rotate(14deg); } }

/* header */
.top {
  position: relative; z-index: 2;
  height: 70px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 600 27px/1 var(--round); letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.brand b { color: var(--pink); font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 13px; object-fit: cover; flex: none;
  border: 2px solid var(--pink); background: var(--pink-soft);
  box-shadow: 0 6px 16px rgba(255, 92, 154, 0.35); transform: rotate(-8deg);
}
.top-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center; font-size: 24px; line-height: 1;
  color: var(--muted); transition: background 0.15s, color 0.15s, transform 0.15s;
}
.icon-btn:hover { background: rgba(255, 92, 154, 0.1); color: var(--pink); }
.icon-btn svg { width: 20px; height: 20px; }

.theme-btn {
  height: 40px; padding: 0 14px 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); box-shadow: var(--shadow); font-weight: 800; font-size: 14px; color: var(--ink);
  transition: transform 0.15s;
}
.theme-btn:hover { transform: translateY(-2px); }
.theme-btn svg { width: 20px; height: 20px; color: var(--pink); }
.theme-btn .theme-icon { display: grid; place-items: center; animation: themePop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes themePop { from { transform: rotate(-90deg) scale(0.4); opacity: 0; } }

.pill-btn {
  height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pill-btn:hover { transform: translateY(-2px); }
.pill-btn { white-space: nowrap; }
.lists-icon { display: none; width: 18px; height: 18px; color: var(--pink); }
.pill-btn.on { color: var(--pink); }
.pill-btn.veto { color: #e0457b; }
.pill-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.text-btn { color: var(--muted); font-weight: 700; text-decoration: underline wavy; text-underline-offset: 4px; text-decoration-color: var(--pink-2); text-decoration-thickness: 1px; }
.text-btn:hover { color: var(--pink); }
.badge {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: var(--pink); color: #fff;
  font-size: 12px; font-weight: 800; display: inline-grid; place-items: center;
}
.badge:empty { display: none; }

.spin-btn {
  position: relative; height: 64px; padding: 0 46px; border-radius: 999px;
  background: linear-gradient(180deg, #ff7aae, var(--pink));
  color: #fff; font: 600 26px/1 var(--round); letter-spacing: 0.01em;
  box-shadow: 0 8px 0 #e0457b, 0 18px 34px rgba(255, 92, 154, 0.38);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}
.spin-btn::after {
  content: ""; position: absolute; left: 22px; top: 10px; width: 26px; height: 9px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.45); transform: rotate(-10deg);
}
.spin-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.04); }
.spin-btn:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #e0457b, 0 8px 18px rgba(255, 92, 154, 0.3); }
.spin-btn:disabled { filter: grayscale(0.5) opacity(0.6); cursor: default; }
.spin-btn.small { height: 48px; padding: 0 26px; font-size: 19px; box-shadow: 0 5px 0 #e0457b, 0 12px 24px rgba(255, 92, 154, 0.3); }
.spin-btn.small::after { left: 16px; top: 8px; width: 18px; height: 6px; }
.spin-btn.small:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #e0457b; }

/* layout */
.layout {
  position: relative; z-index: 1;
  height: calc(100% - 70px);
  display: grid; grid-template-columns: 370px 1fr;
}

/* filters */
.filters {
  margin: 0 0 20px 20px;
  background: var(--panel); backdrop-filter: blur(10px);
  border-radius: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 0;
}
.sheet-head { display: none; }
.filter-scroll { overflow-y: auto; padding: 22px 24px 30px; scrollbar-width: thin; scrollbar-color: var(--pink-soft) transparent; }
.filters.paused .group:not(:last-of-type) { opacity: 0.35; pointer-events: none; }
.saved-note {
  display: none; margin-bottom: 14px; padding: 10px 14px; border-radius: 16px;
  background: var(--pink-soft); color: var(--pink-ink); font-size: 14px;
}
.filters.paused .saved-note { display: block; }

.group { padding: 16px 0; border-bottom: 2px dotted var(--line-2); }
.group:first-of-type { padding-top: 0; }
.group h3 {
  margin: 0 0 12px; font: 600 16px/1.2 var(--round);
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.group h3 .hint { font: 600 12px var(--sans); color: var(--muted); }
.group h3 output { color: var(--pink); font: 700 14px var(--sans); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--line); font-size: 14px; font-weight: 700;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  user-select: none;
}
.chip:hover { border-color: var(--pink-2); transform: translateY(-1px); }
.chip.on { background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: 0 4px 12px rgba(255, 92, 154, 0.3); }
.chip.ex { background: var(--lav-soft); border-color: transparent; color: var(--lav-ink); text-decoration: line-through; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; margin-bottom: 10px;
  border-radius: 16px; background: var(--pink-soft);
}
.seg.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }
#spinLen { margin-bottom: 10px; }
.seg button { height: 32px; border-radius: 12px; font-size: 13px; color: var(--pink-ink); font-weight: 700; }
.seg button.on { background: var(--card); color: var(--pink); box-shadow: 0 2px 8px rgba(255, 92, 154, 0.2); }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 0;
  --pct: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 10px;
  background: linear-gradient(to right, var(--pink-2) var(--pct), var(--pink-soft) var(--pct));
}
input[type="range"]::-moz-range-track { height: 10px; border-radius: 10px; background: var(--pink-soft); }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 10px; background: var(--pink-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -7px; border-radius: 50%;
  background: var(--card); border: 4px solid var(--pink); box-shadow: 0 3px 10px rgba(255, 92, 154, 0.35);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 4px solid var(--pink);
}

.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2.5px solid var(--pink); border-bottom: 2.5px solid var(--pink); transform: rotate(45deg); pointer-events: none;
}
select {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; padding: 0 38px 0 16px;
  border-radius: 16px; border: 2px solid var(--line); background: var(--card); font-weight: 700;
}

.switch { display: flex; align-items: center; gap: 12px; margin-top: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span {
  flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--pink-soft);
  position: relative; transition: background 0.2s;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(75, 41, 66, 0.2); transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.switch input:checked + span { background: var(--pink); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--pink-2); outline-offset: 2px; }
#resetFilters { margin-top: 18px; }

/* stage */
.stage {
  min-width: 0; min-height: 0; padding: 8px 0 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.stage-head { text-align: center; padding: 0 16px; }
.kicker { margin: 0; color: var(--pink); font: 600 15px var(--round); display: inline-flex; gap: 6px; align-items: center; }
.kicker svg { width: 14px; height: 14px; }
.stage-head h1 { margin: 2px 0 0; font: 600 clamp(26px, 3.4vw, 40px)/1.1 var(--round); letter-spacing: -0.01em; }
.stage-head h1 span { color: var(--pink); }

.reel {
  position: relative; width: 100%; height: calc(var(--cw) * 1.5 + 110px); flex: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
.rays {
  position: absolute; left: 50%; top: 50%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px;
  background: repeating-conic-gradient(from 0deg, var(--ray) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 34%);
  mask-image: radial-gradient(circle, #000 0, transparent 34%);
  animation: spinRays 60s linear infinite;
}
.reel.spinning .rays { animation-duration: 8s; }
@keyframes spinRays { to { transform: rotate(360deg); } }
.track { position: absolute; inset: 0; }
.track.blur { filter: url(#mblur); }

.card {
  position: absolute; left: 0; top: 50%; width: var(--cw);
  margin-top: calc(var(--cw) * -0.75 - 26px);
  will-change: transform;
}
.card .pbox {
  position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden;
  background-color: hsl(var(--h, 340) var(--ph-s) var(--ph-l));
  background-repeat: no-repeat;
  box-shadow: 0 10px 24px rgba(75, 41, 66, 0.16);
  border: 4px solid var(--frame);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.card .ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  font: 600 17px/1.15 var(--round); color: hsl(var(--h, 340) var(--pht-s) var(--pht-l));
}
.card .pbox.spr .ph { display: none; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s; }
.card img.ok { opacity: 1; }
.card .ct {
  margin-top: 10px; text-align: center; font: 600 15px/1.2 var(--round);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
}
.card .cs { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.card .cs b { color: var(--gold); }
.card.center .pbox { border-color: var(--pink); box-shadow: 0 0 0 5px rgba(255, 92, 154, 0.18), 0 16px 36px rgba(255, 92, 154, 0.35); }
.card.win .pbox { animation: winPulse 0.9s ease-in-out infinite alternate; }
@keyframes winPulse { to { box-shadow: 0 0 0 10px rgba(255, 92, 154, 0.25), 0 20px 50px rgba(255, 92, 154, 0.55); } }

.marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; pointer-events: none; z-index: 50; }
.marker .line {
  position: absolute; left: -1.5px; top: 30px; bottom: 30px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--pink), rgba(255, 92, 154, 0.15) 30%, rgba(255, 92, 154, 0.15) 70%, var(--pink));
}
.marker .pin {
  position: absolute; left: -17px; width: 34px; height: 34px; color: var(--pink);
  filter: drop-shadow(0 4px 8px rgba(255, 92, 154, 0.45));
}
.marker .pin svg { display: block; width: 34px; height: 34px; }
.marker .pin.up { top: 2px; transform-origin: 50% 0; }
.marker .pin.down { bottom: 2px; transform: rotate(180deg); }

.now { text-align: center; min-height: 58px; padding: 0 16px; }
.now-label { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.now-title { display: block; font: 600 clamp(20px, 2.4vw, 28px)/1.2 var(--round); color: var(--ink); }

.vetoes { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; color: var(--muted); font-weight: 700; font-size: 14px; }
.vetoes .hearts { display: inline-flex; gap: 3px; }
.vetoes .hearts svg { width: 18px; height: 18px; color: var(--pink); }
.vetoes .hearts svg.used { color: var(--pink-soft); }
.vetoes select { width: auto; height: 36px; border-radius: 999px; padding: 0 34px 0 14px; font-size: 13px; }
.vetoes .select-wrap { display: inline-block; }
.vetoes .select-wrap::after { right: 14px; width: 6px; height: 6px; }

.filters-fab, .scrim, .sheet-foot { display: none; }

/* modals */
.modal {
  border: 0; border-radius: 32px; padding: 0;
  background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px rgba(255, 92, 154, 0.3);
  max-height: calc(100% - 32px); overflow: hidden;
}
.modal::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); }
.modal[open] { animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.9); } }
.close { position: absolute; right: 14px; top: 14px; z-index: 3; }

.result { width: min(860px, calc(100% - 32px)); }
.result-body {
  position: relative; display: grid; grid-template-columns: 250px 1fr; gap: 34px; padding: 34px;
  max-height: calc(100vh - 32px); overflow-y: auto;
  background: radial-gradient(500px 300px at 0% 0%, var(--pink-soft), transparent 70%);
}
.poster-wrap { position: relative; align-self: start; }
.poster {
  aspect-ratio: 2 / 3; border-radius: 22px; overflow: hidden; transform: rotate(-3deg);
  background: var(--pink-soft); border: 6px solid var(--frame);
  box-shadow: 0 18px 40px rgba(75, 41, 66, 0.22);
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster.fallback, .thumb.fallback {
  display: grid; place-items: center; text-align: center; padding: 16px;
  background: linear-gradient(160deg, var(--pink-soft), var(--lav-soft)); font: 600 26px/1.1 var(--round); color: var(--pink-ink);
}
.sticker {
  position: absolute; right: -14px; top: -12px; padding: 8px 14px; border-radius: 999px;
  background: var(--gold); color: #5a3300; font: 600 15px var(--round); transform: rotate(8deg);
  box-shadow: 0 6px 14px rgba(255, 184, 77, 0.45);
}
.info { min-width: 0; display: flex; flex-direction: column; }
.info h2 { margin: 6px 0 0; font: 600 clamp(32px, 4.6vw, 46px)/1.04 var(--round); letter-spacing: -0.01em; padding-right: 30px; }
.meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-weight: 700; }
.meta .star { color: var(--gold); }
.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--lav-soft); font-size: 13px; font-weight: 700; color: #6c58c9; }
.tag:nth-child(3n+2) { background: var(--pink-soft); color: #c94a7f; }
.tag:nth-child(3n) { background: var(--mint-soft); color: #2f8a68; }
.blurb { margin: 14px 0 0; color: var(--blurb); line-height: 1.6; font-weight: 600; }
.blurb:empty { display: none; }
.links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.links a { color: var(--pink); font-weight: 800; text-decoration: none; border-bottom: 2px dotted var(--pink-2); }
.links a:hover { border-bottom-style: solid; }
.actions { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.second { margin-top: 0; padding-top: 14px; gap: 16px; }

/* lists */
.lists { width: min(560px, calc(100% - 32px)); height: min(720px, calc(100% - 32px)); }
.lists[open] { display: flex; flex-direction: column; }
.lists-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 18px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--pink-soft); border-radius: 16px; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 12px; color: var(--pink-ink); font-weight: 800; font-size: 14px; }
.tabs button.on { color: var(--pink); background: var(--card); box-shadow: 0 2px 8px rgba(255, 92, 154, 0.2); }
.search { padding: 14px 18px 0; }
.search input {
  width: 100%; height: 46px; padding: 0 16px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--bg); font-weight: 700;
}
.search input:focus { border-color: var(--pink-2); outline: none; }
.search .rows { padding: 0; margin-top: 6px; border-bottom: 2px dotted var(--line-2); padding-bottom: 8px; max-height: 45vh; }
.search .rows:empty { display: none; }
.rows { overflow-y: auto; padding: 8px 10px 18px; flex: 1; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; }
.row:hover { background: var(--bg); }
.thumb { flex: none; width: 42px; height: 63px; border-radius: 10px; overflow: hidden; background: var(--pink-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.fallback { font-size: 22px; padding: 0; }
.row .txt { flex: 1; min-width: 0; }
.row .name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { color: var(--muted); font-size: 13px; }
.row .sub .star { color: var(--gold); font-weight: 800; }
.row button.mini {
  flex: none; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); font-size: 13px; font-weight: 800; color: var(--muted);
}
.row button.mini:hover { color: var(--pink); border-color: var(--pink-2); }
.row button.mini.on { color: #fff; background: var(--pink); border-color: var(--pink); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* toast + confetti */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 800;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
  box-shadow: 0 10px 30px rgba(75, 41, 66, 0.3); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }

/* phones */
@media (max-width: 900px) {
  :root { --cw: 132px; --gap: 14px; }
  body { overflow: auto; }
  .top { padding: 0 16px; height: 64px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .pill-btn { height: 40px; padding: 0 14px; }
  .theme-btn { width: 40px; padding: 0; justify-content: center; }
  .theme-btn .theme-label { display: none; }
}
@media (max-width: 440px) {
  .top { padding: 0 12px; }
  .top-actions { gap: 4px; }
  .brand { font-size: 21px; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 16px; border-radius: 11px; }
  .icon-btn { width: 36px; }
  .theme-btn { width: 36px; height: 36px; }
  #openLists { height: 36px; padding: 0 10px; gap: 4px; }
  .lists-label { display: none; }
  .lists-icon { display: block; }
  .layout { display: block; height: auto; }
  .stage { padding: 6px 0 110px; min-height: calc(100vh - 64px); justify-content: flex-start; gap: 14px; }
  .filters {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 86vh; margin: 0;
    border-radius: 30px 30px 0 0; background: var(--card);
    transform: translateY(105%); transition: transform 0.4s cubic-bezier(0.2, 1.1, 0.4, 1);
  }
  .filters.open { transform: none; }
  .sheet-head {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 4px 24px;
    font: 600 26px/1 var(--round);
  }
  .filter-scroll { padding: 8px 24px 20px; }
  .sheet-foot { display: block; padding: 12px 24px calc(18px + env(safe-area-inset-bottom)); border-top: 2px dotted var(--line-2); }
  .sheet-foot .spin-btn { width: 100%; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 29; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .filters-fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: 20px; z-index: 20; transform: translateX(-50%);
    height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 800;
    background: var(--ink); color: var(--bg); box-shadow: 0 10px 30px rgba(75, 41, 66, 0.3);
  }
  .filters-fab .badge { background: var(--pink); }
  .spin-btn { height: 58px; font-size: 23px; }
  .result-body { grid-template-columns: 1fr; gap: 22px; padding: 28px 20px; }
  .poster-wrap { width: 52%; margin: 0 auto; }
  .info h2 { padding-right: 0; text-align: center; }
  .meta, .tags, .links, .actions { text-align: center; justify-content: center; }
  .modal { max-height: calc(100% - 24px); }
  .result-body { max-height: calc(100vh - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .modal[open], .sprinkles svg, .rays { animation: none; }
}
