:root {
  --bg: #0a0a12;
  --panel: rgba(23, 22, 35, 0.82);
  --panel-solid: #181724;
  --line: rgba(255, 255, 255, 0.1);
  --muted: #a8a6b9;
  --text: #fbfaff;
  --lime: #dbff55;
  --coral: #ff5a65;
  --violet: #9b6dff;
  --cyan: #57e3e8;
  --orange: #ff974a;
  --pink: #f26aa7;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.52'/%3E%3C/svg%3E");
}

body::before, body::after {
  content: "";
  position: fixed;
  width: 46vw;
  height: 46vw;
  z-index: -2;
  pointer-events: none;
  filter: blur(10px);
}

body::before {
  top: -21vw;
  left: -18vw;
  background: radial-gradient(circle, rgba(154, 93, 255, .21), transparent 65%);
}
body::after {
  right: -23vw;
  bottom: -24vw;
  background: radial-gradient(circle, rgba(255, 90, 101, .17), transparent 65%);
}

.app-shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; }
.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: 0; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: #14130d; border-radius: 9px; background: var(--lime); }
.brand-mark svg { width: 19px; }
.nav-tabs { display: flex; align-self: stretch; gap: 6px; }
.nav-tab {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 0 15px;
  color: #88869a; background: transparent; border: 0; font-size: 14px; transition: color .2s ease;
}
.nav-tab svg { width: 16px; }
.nav-tab::after { content: ""; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: var(--lime); transform: scaleX(0); transition: transform .2s ease; }
.nav-tab:hover, .nav-tab.active { color: var(--text); }
.nav-tab.active::after { transform: scaleX(1); }
.topbar-actions { display: flex; align-items: center; gap: 8px; color: #aaa8b9; font-size: 12px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(219, 255, 85, .75); }
.icon-button {
  width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .04); transition: border-color .2s, background .2s, transform .2s;
}
.icon-button:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.1); transform: translateY(-1px); }
.icon-button svg { width: 17px; }

main { padding-bottom: 72px; }
.view { display: none; animation: page-in .35s ease both; }
.view.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.hero-copy { padding: 58px 0 24px; max-width: 760px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--lime); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; }
.eyebrow > span { width: 7px; height: 7px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
h1, h2, p { margin: 0; }
.hero-copy h1, .page-heading h1 { margin-top: 16px; font-size: 56px; line-height: 1.12; letter-spacing: 0; }
.hero-copy h1 em { color: var(--lime); font-style: normal; }
.hero-copy > p, .page-heading p { margin-top: 16px; color: var(--muted); font-size: 15px; }

.stage-grid { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(430px, 1.8fr) minmax(250px, 1fr); align-items: center; gap: 26px; min-height: 480px; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(145deg, rgba(32, 31, 47, .92), rgba(18, 18, 28, .88)); box-shadow: var(--shadow); }
.session-panel, .result-panel { min-height: 300px; padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; color: #c2c0ce; font-size: 12px; font-weight: 600; }
.panel-heading > svg { width: 16px; color: var(--lime); }
.stat-number { margin-top: 24px; font-size: 54px; font-weight: 800; line-height: 1; color: var(--lime); font-family: var(--mono); }
.stat-label { margin-top: 7px; color: var(--muted); font-size: 13px; }
.mini-divider { height: 1px; margin: 22px 0; background: var(--line); }
.streak-row { display: flex; gap: 10px; align-items: center; }
.streak-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--orange); background: rgba(255,151,74,.12); }
.streak-icon svg { width: 16px; }
.streak-row div { display: flex; flex-direction: column; }
.streak-row strong { color: var(--text); line-height: 1.2; font-size: 17px; }
.streak-row span:not(.streak-icon) { color: var(--muted); font-size: 11px; }
.panel-note { margin: 22px 0 10px; color: #898798; font-size: 12px; line-height: 1.75; }
.text-button, .ghost-button {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--lime); border: 0; background: transparent; font-size: 13px; font-weight: 600;
}
.text-button:hover, .ghost-button:hover { color: #efffae; }
.text-button svg, .ghost-button svg { width: 15px; }

.wheel-stage { position: relative; display: grid; min-height: 500px; place-items: center; }
.wheel-shadow { position: absolute; width: min(360px, 70%); height: min(360px, 70%); border-radius: 50%; background: rgba(158,105,255,.2); filter: blur(50px); transform: translateY(16px); }
.wheel {
  position: relative; z-index: 1; display: grid; width: min(430px, 90%); aspect-ratio: 1; place-items: center; overflow: hidden;
  border: 8px solid #252437; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 22px 42px rgba(0,0,0,.55), inset 0 0 50px rgba(0,0,0,.5);
  transition: transform 3.8s cubic-bezier(.12,.78,.16,1);
}
.wheel::before { content: ""; position: absolute; inset: 6%; border: 1px dashed rgba(255,255,255,.28); border-radius: inherit; }
.wheel::after { content: ""; position: absolute; inset: 16%; border: 1px solid rgba(255,255,255,.16); border-radius: inherit; }
.wheel-rings { position: absolute; z-index: 1; width: 72%; height: 72%; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 68px rgba(255,255,255,.022); }
.wheel-center { position: relative; z-index: 2; display: flex; width: 33%; aspect-ratio: 1; flex-direction: column; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,.6); border-radius: 50%; color: #1c1a14; background: var(--lime); box-shadow: 0 0 0 7px rgba(20,19,27,.86), 0 10px 20px rgba(0,0,0,.3); }
.wheel-center .center-kicker { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .13em; }
.wheel-center strong { margin: -2px 0; font-family: var(--mono); font-size: 38px; line-height: 1; }
.wheel-center > span:last-child { font-size: 10px; }
.pointer { position: absolute; z-index: 3; top: 28px; left: 50%; width: 38px; height: 50px; transform: translateX(-50%); }
.pointer::before { content: ""; position: absolute; top: 0; left: 8px; width: 22px; height: 22px; transform: rotate(45deg); border-radius: 4px 4px 4px 0; background: var(--coral); box-shadow: 0 4px 12px rgba(255,90,101,.5); }
.pointer span { position: absolute; top: 9px; left: 15px; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.spin-button {
  position: absolute; z-index: 4; bottom: 15px; display: flex; align-items: center; gap: 9px; padding: 11px 17px 11px 11px; color: #171710; border: 1px solid rgba(255,255,255,.7); border-radius: 7px; background: var(--lime); box-shadow: 0 10px 25px rgba(0,0,0,.35); font-size: 14px; font-weight: 800; transition: transform .2s, box-shadow .2s;
}
.spin-button:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(219,255,85,.2); }
.spin-button:disabled { cursor: progress; filter: saturate(.55); transform: none; }
.spin-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 5px; background: rgba(0,0,0,.12); }
.spin-icon svg { width: 16px; }
.spin-hint { position: absolute; bottom: -15px; color: #858391; font-size: 11px; }

.result-panel { align-self: center; overflow: hidden; }
.live-badge { padding: 3px 6px; color: #ff9198; border: 1px solid rgba(255,90,101,.35); border-radius: 3px; background: rgba(255,90,101,.08); font-family: var(--mono); font-size: 9px; }
.result-placeholder { position: relative; display: grid; min-height: 230px; place-items: center; color: #777585; text-align: center; overflow: hidden; }
.result-placeholder svg { position: relative; z-index: 1; width: 31px; height: 31px; margin-bottom: -30px; color: rgba(219,255,85,.74); }
.result-placeholder p { position: relative; z-index: 1; font-size: 13px; }
.result-orbit { position: absolute; width: 132px; height: 132px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; animation: orbit 8s linear infinite; }
.result-orbit::after { content: ""; position: absolute; top: 16px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
@keyframes orbit { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.result-content { padding-top: 34px; animation: result-pop .4s cubic-bezier(.18,.89,.32,1.28) both; }
@keyframes result-pop { from { opacity: 0; transform: scale(.88) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.topic-group { display: inline-block; padding: 4px 7px; color: var(--cyan); border-radius: 3px; background: rgba(87,227,232,.1); font-size: 11px; }
.result-content h2 { margin: 16px 0 10px; font-size: 26px; line-height: 1.35; }
.result-content p { min-height: 42px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.primary-compact { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: #181710; border: 0; border-radius: 5px; background: var(--lime); font-size: 12px; font-weight: 800; }
.primary-compact:hover, .primary-button:hover { filter: brightness(1.08); }
.primary-compact svg { width: 15px; }
.result-content .primary-compact { margin-top: 20px; }

.quick-picks { padding-top: 74px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.section-title h2 { margin-top: 8px; font-size: 24px; }
.mood-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mood-card { position: relative; min-height: 138px; padding: 17px; overflow: hidden; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--card-bg); transition: transform .22s, border-color .22s; }
.mood-card:hover { border-color: var(--card-accent); transform: translateY(-4px); }
.mood-card::after { content: ""; position: absolute; right: -14px; bottom: -24px; width: 88px; height: 88px; border: 1px solid color-mix(in srgb, var(--card-accent) 50%, transparent); border-radius: 50%; box-shadow: 0 0 0 14px color-mix(in srgb, var(--card-accent) 10%, transparent); }
.mood-card svg { width: 21px; color: var(--card-accent); }
.mood-card strong { display: block; margin-top: 23px; font-size: 15px; }
.mood-card span { display: block; margin-top: 4px; color: #aca9b7; font-size: 11px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 58px 0 28px; }
.page-heading h1 { font-size: 45px; }
.search-box { display: flex; align-items: center; width: min(330px, 100%); gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.04); }
.search-box svg, .admin-search svg { width: 16px; color: #aaa7b8; }
.search-box input, .admin-search input { width: 100%; height: 43px; color: var(--text); outline: 0; border: 0; background: transparent; font-size: 13px; }
.search-box input::placeholder, .admin-search input::placeholder { color: #777484; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 24px; }
.filter-button { padding: 7px 11px; color: #a9a6b7; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.035); font-size: 12px; }
.filter-button:hover, .filter-button.active { color: #15140f; border-color: var(--lime); background: var(--lime); }
.library-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.topic-card { position: relative; min-height: 176px; padding: 17px; overflow: hidden; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(130deg, rgba(32,31,47,.92), rgba(18,18,29,.94)); transition: transform .2s, border-color .2s; }
.topic-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 70%, #fff); }
.topic-card::before { content: ""; position: absolute; top: 0; right: 0; width: 42%; height: 3px; background: var(--accent); }
.topic-index { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.topic-card h2 { margin-top: 19px; min-height: 48px; font-size: 17px; line-height: 1.4; }
.topic-card p { position: relative; z-index: 1; margin-top: 15px; overflow: hidden; color: #aaa8b7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topic-card .arrow-mark { position: absolute; right: 15px; bottom: 14px; color: var(--accent); opacity: .85; }
.topic-card .arrow-mark svg { width: 16px; }

.admin-heading { padding-bottom: 22px; }
.admin-actions { display: flex; gap: 9px; }
.primary-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.primary-button { color: #171710; border: 0; background: var(--lime); }
.outline-button { color: #d6d4df; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.outline-button:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.09); }
.primary-button svg, .outline-button svg { width: 16px; }
.small-button { min-height: 33px; padding: 0 10px; font-size: 12px; }
.admin-overview { display: grid; grid-template-columns: 1fr 1fr 1.4fr; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); }
.overview-stat { min-height: 96px; display: flex; flex-direction: column; justify-content: center; padding: 16px 22px; border-right: 1px solid var(--line); }
.overview-stat:last-child { border: 0; }
.overview-stat span { color: #9693a4; font-size: 12px; }
.overview-stat strong { margin-top: 5px; font-family: var(--mono); font-size: 29px; color: var(--lime); }
.source-stat { align-items: flex-start; }
.source-stat button { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--cyan); border: 0; background: transparent; font-size: 14px; font-weight: 700; }
.source-stat button:hover { color: #9afbff; }
.source-stat svg { width: 15px; }
.admin-layout { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(450px, 1.3fr); gap: 16px; min-height: 600px; }
.admin-list, .editor-panel { padding: 17px; }
.count-pill { display: inline-grid; min-width: 26px; height: 20px; place-items: center; color: #171710; border-radius: 10px; background: var(--lime); font-family: var(--mono); font-size: 10px; }
.admin-search { display: flex; align-items: center; gap: 7px; margin: 14px 0 10px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: rgba(0,0,0,.15); }
.admin-search input { height: 34px; font-size: 12px; }
.topic-admin-list { max-height: 492px; overflow-y: auto; padding-right: 3px; }
.topic-admin-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 7px; color: var(--text); text-align: left; border: 0; border-left: 2px solid transparent; background: transparent; }
.topic-admin-row:hover, .topic-admin-row.active { border-left-color: var(--lime); background: rgba(255,255,255,.06); }
.topic-admin-row .admin-number { width: 23px; color: #727080; font-family: var(--mono); font-size: 10px; }
.topic-admin-row .admin-topic-title { flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topic-admin-row small { color: #8f8c9c; font-size: 10px; }
.empty-editor { display: grid; min-height: 520px; place-content: center; color: #878493; text-align: center; }
.empty-editor span { display: grid; width: 55px; height: 55px; margin: auto; place-items: center; color: var(--lime); border: 1px solid rgba(219,255,85,.28); border-radius: 50%; background: rgba(219,255,85,.08); }
.empty-editor svg { width: 24px; }
.empty-editor h2 { margin-top: 17px; font-size: 18px; color: var(--text); }
.empty-editor p { margin-top: 8px; font-size: 12px; }
.topic-editor label { display: grid; gap: 7px; margin-top: 20px; color: #c5c2cf; font-size: 12px; font-weight: 600; }
.topic-editor input, .topic-editor select, .song-form input { min-height: 39px; width: 100%; padding: 0 10px; color: var(--text); border: 1px solid var(--line); border-radius: 5px; outline: 0; background: rgba(0,0,0,.18); }
.topic-editor input:focus, .topic-editor select:focus, .song-form input:focus { border-color: var(--lime); }
.topic-editor select option { color: #171710; }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.editor-heading h2 { margin-top: 7px; font-size: 22px; }
.danger-button { color: #ffa8ae; }
.danger-button:hover { border-color: rgba(255,90,101,.6); background: rgba(255,90,101,.1); }
.editor-actions { display: flex; justify-content: flex-end; margin-top: 18px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.song-editor-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.song-editor-heading div { display: flex; flex-direction: column; }
.song-editor-heading span { font-size: 14px; font-weight: 700; }
.song-editor-heading small { margin-top: 3px; color: #848190; font-size: 11px; }
.song-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; margin-top: 14px; padding: 10px; border: 1px solid rgba(219,255,85,.18); border-radius: 6px; background: rgba(219,255,85,.04); }
.song-form > div { display: flex; gap: 8px; }
.song-admin-list { margin-top: 11px; }
.song-admin-row { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.song-admin-row > i { color: var(--cyan); width: 15px; }
.song-admin-row div { flex: 1; display: flex; flex-direction: column; }
.song-admin-row strong { font-size: 13px; font-weight: 600; }
.song-admin-row span { margin-top: 1px; color: #918e9d; font-size: 11px; }
.song-row-actions { display: flex; gap: 5px; }
.song-row-actions .icon-button { width: 29px; height: 29px; }
.song-row-actions .icon-button svg { width: 14px; }

dialog { color: var(--text); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: #1a1926; box-shadow: 0 25px 100px rgba(0,0,0,.8); }
dialog::backdrop { background: rgba(3,3,9,.76); backdrop-filter: blur(8px); }
.topic-dialog { position: relative; width: min(660px, calc(100% - 28px)); max-height: calc(100vh - 32px); padding: 34px; overflow-y: auto; }
.dialog-close { position: absolute; z-index: 2; top: 14px; right: 14px; }
.dialog-glow { position: absolute; top: -130px; right: -130px; width: 310px; height: 310px; border-radius: 50%; background: rgba(219,255,85,.13); filter: blur(25px); }
.dialog-topic-meta { position: relative; display: flex; justify-content: space-between; align-items: center; padding-right: 35px; color: var(--cyan); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.dialog-topic-meta span:last-child { color: #8b8899; }
.topic-dialog h2 { position: relative; margin-top: 16px; font-size: 31px; }
.dialog-subtitle { position: relative; margin-top: 9px; color: #aaa7b7; font-size: 13px; }
.song-cards { position: relative; display: grid; gap: 9px; margin-top: 24px; }
.song-card { display: flex; align-items: center; gap: 13px; padding: 13px; color: #fbfaff; border: 1px solid rgba(255,255,255,.17); border-radius: 6px; background: rgba(255,255,255,.065); }
.song-card:hover { border-color: rgba(219,255,85,.62); background: rgba(219,255,85,.1); }
.song-card-index { display: grid; width: 29px; height: 29px; place-items: center; color: #1b1a13; border-radius: 50%; background: var(--lime); font-family: var(--mono); font-size: 11px; }
.song-card div { flex: 1; display: flex; flex-direction: column; }
.song-card strong { color: #ffffff; font-size: 15px; }
.song-card span { margin-top: 3px; color: #d0cdd9; font-size: 12px; }
.song-card > i { color: #a8e8eb; width: 18px; }
.dialog-footer { position: relative; display: flex; justify-content: space-between; align-items: center; margin-top: 25px; }
.ghost-button { color: #d4d1de; }
.song-pick-dialog { width: min(390px, calc(100% - 28px)); padding: 45px 30px 32px; text-align: center; }
.selected-song-mark { display: grid; width: 62px; height: 62px; margin: 0 auto 21px; place-items: center; color: #171710; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 8px rgba(219,255,85,.08), 0 0 38px rgba(219,255,85,.2); }
.selected-song-mark svg { width: 27px; }
.song-pick-dialog h2 { margin-top: 15px; font-size: 31px; }
.song-pick-dialog p { margin-top: 8px; color: #aaa7b7; }
.song-pick-dialog .primary-button { margin-top: 29px; }
.source-dialog { width: min(920px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 31px; overflow-y: auto; }
.source-dialog-heading h2 { margin-top: 9px; font-size: 23px; }
.source-dialog img { display: block; width: 100%; margin-top: 21px; border: 1px solid var(--line); }
.toast { position: fixed; z-index: 10; bottom: 25px; left: 50%; padding: 10px 14px; color: #16150f; border-radius: 5px; background: var(--lime); box-shadow: 0 13px 35px rgba(0,0,0,.35); font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .stage-grid { grid-template-columns: 1fr 1.2fr; }
  .session-panel { display: none; }
  .result-panel { max-width: 330px; width: 100%; justify-self: center; }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
  .library-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 730px) {
  .app-shell { width: min(100% - 28px, 620px); }
  main { padding-bottom: 102px; }
  .topbar { height: 70px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-tabs {
    position: fixed; z-index: 20; bottom: 10px; left: 50%; width: min(calc(100% - 28px), 430px); height: 62px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 5px; border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px; background: rgba(21, 20, 32, .94); box-shadow: 0 13px 34px rgba(0,0,0,.42); backdrop-filter: blur(18px);
    transform: translateX(-50%);
  }
  .nav-tab { justify-content: center; align-items: center; flex-direction: column; gap: 3px; padding: 4px 7px; border-radius: 5px; font-size: 10px; }
  .nav-tab span { display: block; }
  .nav-tab svg { width: 16px; }
  .nav-tab.active { color: var(--lime); background: rgba(219,255,85,.09); }
  .nav-tab::after { right: 18px; bottom: 1px; left: 18px; }
  .sync-label { display: none; }
  .topbar-actions { gap: 6px; }
  .hero-copy { padding: 32px 0 12px; }
  .hero-copy h1, .page-heading h1 { font-size: 35px; }
  .hero-copy > p { margin-top: 12px; font-size: 13px; }
  .stage-grid { grid-template-columns: 1fr; gap: 22px; }
  .wheel-stage { min-height: 355px; order: 1; }
  .result-panel { order: 2; max-width: none; min-height: 220px; }
  .wheel { width: min(314px, 84vw); }
  .wheel-center strong { font-size: 31px; }
  .pointer { top: 3px; }
  .spin-button { bottom: -1px; }
  .spin-hint { bottom: -20px; }
  .result-placeholder { min-height: 162px; }
  .result-content { padding-top: 16px; }
  .quick-picks { padding-top: 42px; }
  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .mood-card { min-height: 116px; }
  .mood-card strong { margin-top: 17px; }
  .section-title h2 { font-size: 20px; }
  .page-heading { display: block; padding-top: 42px; }
  .search-box { width: 100%; margin-top: 22px; }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-card { min-height: 157px; }
  .topic-card h2 { font-size: 15px; }
  .admin-heading { padding-bottom: 19px; }
  .admin-actions { margin-top: 22px; flex-wrap: wrap; }
  .admin-overview { grid-template-columns: 1fr 1fr; }
  .overview-stat { min-height: 82px; padding: 13px; }
  .source-stat { grid-column: span 2; border-top: 1px solid var(--line); }
  .admin-layout { grid-template-columns: 1fr; }
  .topic-admin-list { max-height: 250px; }
  .editor-panel { min-height: 500px; }
  .song-form { grid-template-columns: 1fr; }
  .topic-dialog { padding: 28px 20px 22px; }
  .topic-dialog h2 { font-size: 25px; }
  .topic-dialog, .song-pick-dialog, .source-dialog { max-height: calc(100dvh - 24px); }
  .topic-dialog { overflow-y: auto; }
  .dialog-footer { gap: 17px; align-items: flex-start; flex-direction: column-reverse; }
}
