:root {
  color-scheme: light;
  --bg:#f7f6f0; --paper:#fffef9; --white:#fff; --ink:#203850; --muted:#586d7d;
  --line:#dce4e5; --blue:#e5eef5; --blue-strong:#346081; --navy:#233e58;
  --gold:#f2e4c4; --gold-ink:#725522; --green:#e5eee3; --green-ink:#446552;
  --rose:#f4e8eb; --rose-ink:#91485e; --lilac:#efebf4; --lilac-ink:#63537d;
  --shadow:0 10px 30px #263e5210; --hero:#e8f0f5; --outline:#3e759d;
  font-family:Inter,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Heiti SC",system-ui,sans-serif;
  line-height:1.5; font-size:16px;
}
:root[data-theme="night"] {
  color-scheme:dark;
  --bg:#132031; --paper:#1c2a3b; --white:#202f42; --ink:#eef4fa; --muted:#bccbd8;
  --line:#3b4b5e; --blue:#253c54; --blue-strong:#a8cde8; --navy:#c5def1;
  --gold:#443b33; --gold-ink:#f4d791; --green:#253d3b; --green-ink:#c2dfc5;
  --rose:#463443; --rose-ink:#f7bdcc; --lilac:#38364c; --lilac-ink:#d7caed;
  --shadow:0 10px 30px #050b1227; --hero:#273d54; --outline:#aad3f4;
}
* {box-sizing:border-box}
html {scrollbar-gutter:stable;overflow-anchor:none}
body {margin:0;background:var(--bg);color:var(--ink);min-height:100vh}
button,input,select,textarea {font:inherit;color:inherit}
button,a,input,select,textarea {-webkit-tap-highlight-color:transparent}
button {cursor:pointer}
a {color:inherit;text-decoration:none}
ul {padding:0;list-style:none}
button:disabled {cursor:default;opacity:.48}
:focus-visible {outline:2px solid var(--outline);outline-offset:3px}
h1,h2,h3,p {margin:0}
h1,h2,h3 {line-height:1.2}
img {max-width:100%;display:block}
.icon {width:22px;height:22px;flex:none;vertical-align:middle}
.skip {position:absolute;z-index:20;left:1rem;top:-4rem;background:var(--paper);padding:.7rem}
.skip:focus {top:1rem}
.topbar {position:sticky;top:0;z-index:8;background:var(--bg);border-bottom:1px solid var(--line)}
.top-inner {display:flex;align-items:center;justify-content:space-between;max-width:1220px;margin:auto;padding:0 28px;height:68px;gap:18px}
.brand {display:flex;align-items:center;gap:11px;font-weight:800;letter-spacing:.06em;white-space:nowrap}
.brand-mark {width:37px;height:37px;border-radius:12px;display:grid;place-items:center;background:#233e58;color:#f8dfaa;position:relative}
.brand-mark .icon {width:22px;height:22px;transform:translate(-2px,2px)}
.brand-mark .brand-star {width:12px;height:12px;position:absolute;right:5px;top:5px;fill:currentColor;transform:none}
.top-nav,.top-actions {display:flex;gap:6px;align-items:center}
.nav-link {padding:8px 14px;min-height:42px;display:inline-flex;align-items:center;gap:8px;border-radius:24px;font-weight:650;font-size:.875rem;color:var(--muted)}
.nav-link .icon {width:18px;height:18px}
.nav-link[aria-current="page"],.nav-link:hover {color:var(--blue-strong);background:var(--blue)}
.bottom-nav {display:none}
#main {width:min(1164px,calc(100% - 56px));margin:0 auto;padding:30px 0 55px;min-height:calc(100vh - 68px);outline:none}
.home {display:grid;gap:25px;animation:enter .22s ease both}
.hero {min-height:355px;position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;background:var(--hero);border:1px solid var(--line);border-radius:32px}
.hero::before {content:"";position:absolute;inset:0;z-index:-2;background:radial-gradient(ellipse at 9% 86%,var(--paper) 1%,transparent 75%)}
.hero-content {width:59%;position:relative;z-index:3;padding:46px 0 44px 55px}
.hero-meta {display:inline-flex;gap:8px;align-items:center;color:var(--blue-strong);font-size:.875rem;font-weight:700;margin-bottom:11px}
.hero-meta .icon {width:16px;height:16px;fill:var(--gold)}
.hero h1 {font-size:clamp(2.75rem,6vw,4.5rem);font-weight:850;letter-spacing:.075em;margin-bottom:24px}
.hero-search {max-width:505px}
.search-box {display:flex;align-items:center;gap:11px;border:1px solid var(--line);background:var(--white);padding:6px 6px 6px 15px;border-radius:16px;box-shadow:var(--shadow);min-width:0;color:var(--blue-strong)}
.search-box:focus-within {border-color:var(--outline)}
.search-box input {width:100%;min-width:0;border:0;background:transparent;color:var(--ink);outline:none;padding:7px 0;font-size:1rem}
.search-box input::placeholder {color:var(--muted);opacity:1}
.search-box .btn {height:44px;white-space:nowrap}
.search-hint {font-size:.86rem;color:var(--muted);margin-top:10px}
.hero-art {position:absolute;z-index:-1;inset:0 1% 0 58%;display:grid;place-items:end center;pointer-events:none}
.hero-art img {z-index:2;height:95%;width:auto;max-width:95%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 9px 10px #47638020);position:absolute;bottom:1px;right:10%}
.hero-orbit {position:absolute;bottom:0;right:11%;width:76%;height:91%;border-radius:50% 50% 0 0;background:linear-gradient(170deg,#bcd5e9ab,#ebf2f6aa 70%);border:1px solid #fff9}
[data-theme=night] .hero-orbit {background:linear-gradient(170deg,#385d7b,#263b52);border-color:#90b4d37a}
.hero-orbit::before,.hero-orbit::after {content:"";position:absolute;inset:8px -15px -2px;border:1px solid #7c9fbd65;border-radius:50% 50% 0 0}
.hero-orbit::after {inset:21% -17% -36%;border-radius:50%;transform:rotate(-31deg);height:52%;top:39%;border-color:#fff9}
.hero-art .star,.cover-decoration .star {color:#c49951;fill:#f0d49c;position:absolute;z-index:3}
.hero-art .a {left:6%;top:24%;width:18px;height:18px}.hero-art .b {right:5%;top:21%;width:26px;height:26px}
.hero-art .c {left:16%;top:58%;width:11px;height:11px}.hero-art .d {right:16%;bottom:23%;width:13px;height:13px}
.hero-art .e {left:27%;top:12%;width:10px;height:10px}.hero-art .art-moon {position:absolute;right:6%;top:40%;width:38px;height:38px;color:#cbac6c;transform:rotate(-13deg);opacity:.78}
.section-head {display:flex;align-items:end;justify-content:space-between;gap:15px;margin:2px 0 12px}
.section-head h2 {font-size:1.2rem;letter-spacing:.06em}
.bento {display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}
.tile {background:var(--paper);border:1px solid var(--line);border-radius:22px;position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;min-height:124px;padding:19px 21px;color:var(--ink);transition:transform .18s,border-color .18s}
.tile:hover {transform:translateY(-2px);border-color:var(--outline)}
.tile small {font-size:.875rem;color:var(--muted);line-height:1.4;z-index:1}
.tile strong {font-size:1.125rem;z-index:1}
.tile.wide {min-height:151px;grid-column:span 7;padding:21px 24px;gap:9px}
.tile.wide + .tile.wide {grid-column:span 5}
.tile.wide strong {font-size:1.45rem}
.tile.secondary {grid-column:span 3}
.tile.home-cat {grid-column:span 6;min-height:137px}
.tile.home-out {grid-column:span 3;min-height:137px}
.tile.blue,.tone-blue {background:var(--blue);--tile-ink:var(--blue-strong)}
.tile.gold,.tone-gold {background:var(--gold);--tile-ink:var(--gold-ink)}
.tile.green,.tone-green {background:var(--green);--tile-ink:var(--green-ink)}
.tile.rose,.tone-rose {background:var(--rose);--tile-ink:var(--rose-ink)}
.tile.lilac,.tone-lilac {background:var(--lilac);--tile-ink:var(--lilac-ink)}
.badge-icon {width:41px;height:41px;display:grid;place-items:center;border-radius:13px;background:var(--paper);color:var(--tile-ink,var(--blue-strong));border:1px solid var(--line);flex:none}
.badge-icon .icon {width:21px;height:21px}
.tile:not(.wide) .badge-icon {width:35px;height:35px;border-radius:11px}
.tile:not(.wide) .badge-icon .icon {width:18px;height:18px}
.tile-end {position:absolute;right:16px;top:18px;color:var(--tile-ink,var(--muted));z-index:1}
.tile-end .icon {width:18px;height:18px}
.cover-decoration {position:absolute;z-index:-1;right:-17px;bottom:-37px;width:43%;height:154px;opacity:.73;pointer-events:none}
.cover-decoration.vinyl {right:6%;bottom:-70px;width:165px;height:165px;border-radius:50%;border:1px solid #88704153;background:repeating-radial-gradient(circle,#9d783837 0 1px,#ad843115 2px 9px,#ad843130 10px 11px)}
.cover-decoration.vinyl::before {content:"";position:absolute;inset:56px;border:1px solid #9f8858a6;background:#f7e7bd80;border-radius:50%}
.cover-decoration.vinyl::after {content:"";position:absolute;inset:77px;background:#8e754d;border-radius:50%}
.cover-decoration.notes {right:4%;bottom:-33px;width:190px;height:160px;background:repeating-linear-gradient(0deg,transparent 0 11px,#6891b351 12px 13px,transparent 14px 17px);transform:rotate(-14deg);mask-image:radial-gradient(ellipse,#000 20%,transparent 72%)}
.cover-decoration.notes .icon {position:absolute;width:77px;height:77px;bottom:60px;left:39%;color:var(--blue-strong);fill:#a4c2d9}
.cover-decoration .star {top:-8%;left:-19%;width:22px;height:22px}
.tile-cat {height:118px;max-width:44%;object-fit:contain;position:absolute;bottom:-6px;right:6%;z-index:-1}
.page {max-width:945px;margin:0 auto;animation:enter .19s ease both}
.page-head {display:flex;align-items:center;justify-content:space-between;gap:14px;margin:3px 0 21px}
.page-head h1 {font-size:clamp(1.7rem,4.6vw,2.6rem);letter-spacing:.045em}
.page-title {display:flex;align-items:center;gap:12px}
.page-actions {display:flex;align-items:center;gap:7px}
.panel {background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:19px;box-shadow:var(--shadow)}
.btn,.icon-btn,.chip {display:inline-flex;justify-content:center;align-items:center;gap:7px;font-weight:650;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:8px 13px;min-height:42px;line-height:1.2}
.btn:hover,.icon-btn:hover,.chip:hover {background:var(--blue);color:var(--blue-strong)}
.btn.primary {background:var(--navy);border-color:var(--navy);color:var(--white)}
[data-theme=night] .btn.primary {color:#152838}
.btn.primary:hover {filter:brightness(1.13)}
.btn.small {font-size:.875rem;padding:7px 10px;min-height:36px}
.btn .icon,.icon-btn .icon {width:19px;height:19px}
.icon-btn {width:44px;height:44px;min-width:44px;padding:0}
.icon-btn.ghost {background:transparent;border-color:transparent}
.icon-btn.ghost:hover {background:var(--blue)}
.icon-btn.heart[aria-pressed=true] {color:var(--rose-ink);background:var(--rose)}
.icon-btn.heart[aria-pressed=true] .icon {fill:currentColor}
.btn.danger {color:var(--rose-ink)}
.tool-row,.chips,.stack-line {display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tool-row {justify-content:space-between;margin:12px 0}
.tool-row .grow {flex:1}
.chips {margin:10px 0}
.chip {border-radius:20px;font-size:.875rem;min-height:36px;padding:6px 11px;color:var(--muted)}
.chip[aria-pressed=true],.chip.selected {color:var(--blue-strong);border-color:var(--blue-strong);background:var(--blue)}
.active-filters {font-size:.875rem;color:var(--muted)}
.index {display:flex;flex-wrap:wrap;gap:3px;align-items:center;margin:10px 0 12px}
.index .chip {padding:5px 7px;min-width:29px;min-height:34px}
.index .chip:first-child {min-width:50px}
.status-line {color:var(--muted);font-size:.875rem;margin:9px 0;min-height:21px}
.list-panel {padding:0;overflow:hidden}
.group-label {padding:7px 16px;background:var(--blue);color:var(--blue-strong);font-weight:750;font-size:.875rem}
.song-row {display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:center;padding:7px 10px 7px 15px;border-bottom:1px solid var(--line);min-height:65px}
.song-row:last-child {border-bottom:0}
.song-row:hover {background:color-mix(in srgb,var(--blue) 45%,var(--paper))}
.song-link {padding:0;border:0;background:none;text-align:left;min-width:0;cursor:pointer;font-size:inherit}
.song-link strong,.song-link small {display:block;overflow-wrap:anywhere}
.song-link small {color:var(--muted);font-size:.875rem}
.compact .song-row {min-height:48px;padding-top:2px;padding-bottom:2px}
.compact .song-link {display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.compact .song-link small {font-size:.8rem}
.list-more {display:block;width:100%;border:0;border-top:1px solid var(--line);background:var(--paper);color:var(--blue-strong);padding:13px;font-weight:700}
.placeholder {padding:29px 15px;text-align:center;color:var(--muted);display:grid;justify-items:center;gap:9px}
.placeholder h2 {font-size:1.18rem;color:var(--ink)}
.placeholder img {width:115px;max-height:120px;object-fit:contain}
.select {appearance:none;border:1px solid var(--line);border-radius:11px;background:var(--paper);min-height:42px;padding:7px 30px 7px 11px;max-width:100%}
.select-wrap {display:inline-flex;align-items:center;position:relative;max-width:100%}
.select-wrap>.icon {position:absolute;right:8px;pointer-events:none;width:15px;height:15px}
.sheet {border:1px solid var(--line);border-radius:23px;background:var(--paper);color:var(--ink);width:min(620px,calc(100% - 24px));max-height:87dvh;padding:0;box-shadow:0 15px 50px #13243845}
.sheet::backdrop {background:#15283d70}
.sheet-head {position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--paper);padding:10px 14px 10px 19px;border-bottom:1px solid var(--line)}
.sheet-head h2 {font-size:1.22rem}
.sheet-body {padding:17px 19px}
.sheet-foot {position:sticky;bottom:0;display:flex;justify-content:space-between;gap:8px;background:var(--paper);padding:12px 19px;border-top:1px solid var(--line)}
.filter-group {margin:0 0 8px;border:1px solid var(--line);border-radius:12px}
.filter-group summary {padding:9px 12px;cursor:pointer;font-weight:650}
.filter-choices {display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:5px;max-height:210px;overflow:auto;padding:0 10px 10px}
.filter-choices label {display:flex;align-items:flex-start;gap:6px;font-size:.875rem;padding:5px 3px;overflow-wrap:anywhere}
.filter-choices input {accent-color:var(--blue-strong);min-width:15px;align-self:start;margin-top:3px}
.filter-find {width:calc(100% - 20px);margin:0 10px 10px;padding:7px 9px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.field {display:grid;gap:6px;font-weight:650}
.field input,.field textarea {width:100%;padding:9px 11px;border-radius:10px;border:1px solid var(--line);background:var(--bg);font-weight:400}
.account,.setting-row {display:flex;align-items:center;justify-content:space-between;gap:13px;border-bottom:1px solid var(--line);padding:10px 0}
.account:last-child,.setting-row:last-child {border-bottom:0}
.account-name {display:flex;gap:9px;align-items:center;font-weight:700}
.settings h2 {font-size:1.17rem;margin-bottom:7px}
.settings,.panels {display:grid;gap:14px}
.settings .setting-row small {display:block;font-size:.83rem;color:var(--muted);margin-top:2px}
.switch {width:21px;height:21px;accent-color:var(--blue-strong)}
.toast {position:fixed;bottom:24px;left:50%;transform:translate(-50%,12px);visibility:hidden;opacity:0;transition:.17s;z-index:25;color:#fff;background:#203850;border:1px solid #ffffff29;border-radius:13px;box-shadow:var(--shadow);padding:10px 16px;max-width:calc(100% - 32px);pointer-events:none;text-align:center}
.toast.show {transform:translate(-50%,0);visibility:visible;opacity:1}
.random {background:linear-gradient(115deg,var(--paper),var(--gold));display:grid;gap:13px}
.random .random-title {display:flex;align-items:center;gap:13px}
.random h2 {font-size:1.24rem}
.random .draw {background:var(--paper);padding:4px;border-radius:15px;overflow:hidden}
.random .draw.reveal {animation:reveal .24s ease both}
.random label {display:inline-flex;align-items:center;gap:8px;font-size:.875rem}
.result-list {display:grid;gap:10px}
.detail-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:12px;margin:13px 0}
.detail-grid dt {color:var(--muted);font-size:.875rem}
.detail-grid dd {margin:3px 0 0;overflow-wrap:anywhere}
.event-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.event {min-height:228px;position:relative;overflow:hidden;padding:22px;background:var(--gold)}
.event + .event {background:var(--blue)}
.event .badge-icon {margin-bottom:12px}
.event h2 {font-size:1.35rem;margin-bottom:8px}
.event p {color:var(--muted);margin-top:4px}
.event .remaining {font-size:2.1rem;font-weight:820;letter-spacing:.03em;color:var(--gold-ink);margin-top:13px}
.event + .event .remaining {color:var(--blue-strong)}
.event>.icon {position:absolute;right:5%;bottom:5%;opacity:.19;width:100px;height:100px}
.celebrate {position:fixed;inset:0;z-index:15;pointer-events:none;overflow:hidden}
.celebrate span {position:absolute;top:-25px;left:var(--x);color:var(--color);animation:fall 1.3s var(--delay) ease-in both}
.celebrate svg {fill:currentColor}
@keyframes enter {from {opacity:.55;transform:translateY(3px)}to{opacity:1;transform:none}}
@keyframes reveal {from {opacity:.45;transform:translateY(7px)}}
@keyframes fall {to{transform:translate(var(--drift),105vh) rotate(250deg);opacity:.15}}
[data-motion=off] *, [data-motion=off] *::before,[data-motion=off] *::after {animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce) {*,*::before,*::after {animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}
@media(max-width:850px) {
  .hero-content {padding-left:31px;width:64%}
  .hero-art {left:61%}
  .hero-art img {height:92%;max-width:100%;right:0}
  .top-inner {padding:0 18px}
  #main {width:calc(100% - 36px)}
  .nav-link {padding:8px 9px}
  .top-nav .nav-link {gap:5px}
  .tile small {font-size:.8rem}
}
@media(max-width:620px) {
  html {scrollbar-gutter:auto}
  .top-inner {height:56px}
  .brand {font-size:.94rem}
  .brand-mark {width:33px;height:33px}
  .top-nav {display:none}
  #main {width:calc(100% - 24px);padding:12px 0 calc(91px + env(safe-area-inset-bottom));min-height:calc(100vh - 57px)}
  .bottom-nav {position:fixed;z-index:8;display:flex;justify-content:space-around;gap:3px;bottom:0;left:0;right:0;border-top:1px solid var(--line);background:var(--paper);padding:5px 8px calc(5px + env(safe-area-inset-bottom))}
  .bottom-nav .nav-link {flex:1;max-width:120px;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:5px 2px;font-size:.75rem;border-radius:13px}
  .bottom-nav .nav-link .icon {width:20px;height:20px}
  .home {gap:18px}
  .hero {min-height:250px;align-items:flex-end;border-radius:23px}
  .hero-content {width:100%;padding:24px 14px 14px}
  .hero-meta {margin-bottom:7px;font-size:.78rem}
  .hero h1 {font-size:clamp(1.9rem,9vw,3rem);margin-bottom:27px;letter-spacing:.05em}
  .hero-search {max-width:100%}
  .hero-art {left:61%;right:2%;bottom:56px}
  .hero-art img {height:100%;max-width:100%;right:0}
  .hero-orbit {width:86%;right:5%;height:86%}
  .hero-art .a {left:0;top:15%;width:13px;height:13px}.hero-art .b {right:0;top:24%;width:16px;height:16px}
  .hero-art .art-moon {width:20px;height:20px;right:-4%;top:43%}
  .hero-art .c,.hero-art .d,.hero-art .e {display:none}
  .search-hint {margin-top:7px;font-size:.75rem}
  .bento {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .tile,.tile.wide,.tile.wide + .tile.wide,.tile.secondary,.tile.home-cat,.tile.home-out {grid-column:span 1;padding:12px;min-height:107px;border-radius:16px;gap:5px}
  .tile.wide {min-height:124px}
  .tile.wide + .tile.wide {min-height:124px}
  .tile.home-cat {grid-column:span 2;min-height:108px}
  .tile.wide strong {font-size:1.12rem}
  .tile strong {font-size:1rem}
  .tile small {max-width:95%;font-size:.76rem}
  .tile-end {right:7px;top:9px}
  .tile-end .icon {width:15px;height:15px}
  .cover-decoration.vinyl {right:-10px;width:137px;height:137px}
  .cover-decoration.notes {right:-27px}
  .tile-cat {height:95px}
  .section-head {margin:0 0 9px}
  .section-head h2 {font-size:1.08rem}
  .page-head {margin:3px 0 13px}
  .page-title {gap:6px}
  .page-actions {gap:3px}
  .page-actions .btn {font-size:.8rem;padding:7px 8px}
  .panel {padding:14px;border-radius:16px}
  .list-panel {padding:0}
  .song-row {padding-left:11px;padding-right:5px;gap:2px}
  .tool-row {gap:6px}
  .tool-row .btn,.select {font-size:.875rem}
  .chips.quick {overflow-x:auto;flex-wrap:nowrap;padding:2px;scrollbar-width:thin}
  .chips.quick .chip {white-space:nowrap}
  .index .chip {min-height:33px}
  .sheet {margin:auto auto 0;width:100%;border-radius:21px 21px 0 0;max-height:90dvh;padding-bottom:env(safe-area-inset-bottom)}
  .toast {bottom:calc(65px + env(safe-area-inset-bottom));width:max-content;font-size:.875rem}
  .event-grid {grid-template-columns:1fr}
  .event {min-height:182px}
}
.index {touch-action:pan-y}
.filter-choices label[hidden] {display:none}
.song-link strong small {display:inline}
