:root {
  color-scheme: dark;
  --ink: #17121f;
  --ink-soft: #211928;
  --panel: rgba(39, 30, 48, 0.88);
  --panel-strong: #2e2338;
  --line: rgba(255, 255, 255, 0.095);
  --muted: #aaa0b4;
  --text: #fff8fd;
  --pink: #ff66aa;
  --pink-hot: #ff4095;
  --pink-soft: #ffb2d5;
  --cyan: #72d7e8;
  --good: #74e5a8;
  --warning: #f4cf78;
  --danger: #ff7f9f;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(5, 3, 8, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; background: var(--pink); border-radius: 12px; color: #271222; }
.skip-link:focus { top: 14px; }
.ambient { position: fixed; border-radius: 50%; filter: blur(1px); opacity: .18; pointer-events: none; z-index: -1; }
.ambient-one { width: 560px; height: 560px; right: -230px; top: 70px; background: radial-gradient(circle, var(--pink), transparent 67%); }
.ambient-two { width: 470px; height: 470px; left: -250px; bottom: -170px; background: radial-gradient(circle, #745cff, transparent 68%); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  padding: 0 clamp(22px, 4vw, 68px);
  border-bottom: 1px solid var(--line);
  background: rgba(23, 18, 31, .82);
  backdrop-filter: blur(22px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border: 3px solid var(--pink); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px rgba(255,102,170,.42); }
.brand-mark span { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 20px var(--pink); }
.brand-copy { display: grid; line-height: .9; }
.brand-copy b { letter-spacing: -.04em; font-size: 17px; }
.brand-copy small { color: var(--pink); font-weight: 700; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: center; gap: 30px; }
.desktop-nav a { position: relative; padding: 27px 0 25px; color: var(--muted); font-size: 13px; font-weight: 700; }
.desktop-nav a::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--pink); transition: .2s; }
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--text); }
.desktop-nav a.is-active::after { left: 0; width: 100%; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.lang-button { width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.account-button { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 5px 13px 5px 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.04); font-size: 12px; font-weight: 700; cursor: pointer; }
.account-button:hover { border-color: rgba(255,102,170,.5); }
.account-avatar { display: grid; place-items: center; width: 30px; height: 30px; overflow: hidden; border-radius: 10px; background: var(--pink); color: #3a1830; font-size: 17px; font-weight: 800; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }

.view { display: none; width: min(1440px, 100%); margin: 0 auto; padding: 0 clamp(22px, 5vw, 82px) 90px; }
.view.is-active { display: block; animation: view-in .3s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } }
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(390px, .78fr); align-items: center; gap: clamp(50px, 8vw, 120px); min-height: calc(100vh - 76px); padding: 70px 0; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 22px; color: var(--pink-soft); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 12px var(--good); }
.hero h1, .page-heading h1, .about-hero h1 { margin: 0; letter-spacing: -.065em; line-height: .98; font-size: clamp(46px, 6vw, 86px); }
.hero h1 em { color: var(--pink); font-style: normal; }
.hero-lead { max-width: 620px; margin: 30px 0; color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.75; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 25px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-meta span { display: flex; gap: 6px; align-items: baseline; }
.hero-meta b { color: var(--text); font-size: 14px; }

.recognizer-card { position: relative; padding: 25px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(160deg, rgba(50,38,61,.95), rgba(33,25,41,.96)); box-shadow: var(--shadow); }
.recognizer-card::before { content: ""; position: absolute; width: 170px; height: 170px; right: -90px; top: -80px; border: 1px solid rgba(255,102,170,.18); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,102,170,.04), 0 0 0 52px rgba(255,102,170,.025); }
.card-head, .section-heading, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card-head { position: relative; margin-bottom: 20px; }
.card-head h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.03em; }
.step-label { color: var(--pink); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.status-pill { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.status-pill.ready i { background: var(--good); }
.status-pill.unavailable i { background: var(--danger); }
.drop-zone { display: flex; flex-direction: column; align-items: center; padding: 30px 20px 24px; border: 1px dashed rgba(255,255,255,.18); border-radius: 20px; background: rgba(255,255,255,.022); text-align: center; outline: none; transition: .2s; cursor: pointer; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-over { border-color: var(--pink); background: rgba(255,102,170,.06); transform: translateY(-2px); }
.pulse-disc { display: grid; place-items: center; width: 75px; height: 75px; margin-bottom: 18px; border: 1px solid rgba(255,102,170,.28); border-radius: 50%; background: radial-gradient(circle at 45% 40%, #5b3c56, #281d31 65%); box-shadow: 0 0 0 8px rgba(255,102,170,.04), 0 0 0 16px rgba(255,102,170,.02); }
.disc-core { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--pink); color: #341828; font-weight: 800; }
.drop-zone strong { font-size: 15px; }
.drop-zone > span:not(.pulse-disc) { margin: 5px 0 16px; color: var(--muted); font-size: 11px; }
.drop-zone small { margin-top: 12px; color: #7f7588; font-size: 9px; }
.primary-button, .quiet-button, .notice button { border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; transition: .18s; }
.primary-button { padding: 12px 19px; background: linear-gradient(135deg, var(--pink), var(--pink-hot)); color: #351526; box-shadow: 0 9px 22px rgba(255,64,149,.18); font-size: 11px; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,64,149,.28); }
.primary-button.compact { padding: 12px 18px; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 15px 0; color: #746b7d; font-size: 9px; text-transform: uppercase; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.record-button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); text-align: left; cursor: pointer; }
.record-button:hover { border-color: rgba(255,102,170,.45); }
.record-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255,102,170,.13); }
.record-icon i { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.record-button > span:nth-child(2) { display: grid; gap: 2px; }
.record-button b { font-size: 11px; }
.record-button small, .record-button time { color: var(--muted); font-size: 9px; }
.record-button.is-recording .record-icon i { animation: blink 1s infinite; background: var(--danger); }
@keyframes blink { 50% { opacity: .2; } }
.progress-panel { display: flex; align-items: center; gap: 16px; margin-top: 15px; padding: 15px; border-radius: 15px; background: rgba(114,215,232,.07); }
.progress-panel > div:last-child { display: grid; gap: 3px; }
.progress-panel strong { font-size: 11px; }
.progress-panel span { color: var(--muted); font-size: 9px; }
.scan-orbit { position: relative; width: 34px; height: 34px; border: 2px solid rgba(114,215,232,.2); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.scan-orbit i { position: absolute; inset: 8px; border-radius: 50%; background: var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 15px; padding: 13px; border: 1px solid rgba(255,127,159,.25); border-radius: 15px; background: rgba(255,127,159,.07); }
.notice-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--danger); color: #35151e; font-weight: 800; }
.notice strong { font-size: 11px; }
.notice p { margin: 2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.notice button { padding: 8px 10px; background: rgba(255,255,255,.08); font-size: 9px; }

.results-section { padding: 90px 0 40px; }
.section-heading { margin-bottom: 26px; }
.section-heading h2 { margin: 5px 0 0; font-size: clamp(28px, 4vw, 45px); letter-spacing: -.05em; }
.quiet-button { padding: 11px 15px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; }
.results-grid, .library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.map-card { position: relative; min-height: 280px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); transition: .2s; }
.map-card:hover { border-color: rgba(255,102,170,.3); transform: translateY(-3px); box-shadow: 0 18px 38px rgba(0,0,0,.22); }
.map-cover { position: relative; height: 135px; overflow: hidden; background: linear-gradient(135deg, #53334d, #242033); }
.map-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .76; transition: .35s; }
.map-card:hover .map-cover img { transform: scale(1.04); opacity: .88; }
.map-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--panel-strong)); }
.match-score { position: absolute; left: 13px; top: 13px; z-index: 2; padding: 6px 9px; border-radius: 20px; background: rgba(19,14,24,.75); backdrop-filter: blur(8px); color: var(--good); font-size: 9px; font-weight: 800; }
.favorite-button { position: absolute; z-index: 3; right: 12px; top: 12px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(19,14,24,.72); color: white; font-size: 18px; cursor: pointer; }
.favorite-button.is-saved { color: var(--pink); }
.map-body { position: relative; z-index: 2; margin-top: -15px; padding: 0 16px 16px; }
.map-body h3 { margin: 0; overflow: hidden; font-size: 15px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.map-artist { margin: 4px 0 13px; overflow: hidden; color: var(--pink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.map-tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.map-tags span { padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.055); color: var(--muted); font-size: 8px; font-weight: 700; }
.map-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.map-footer a { color: var(--text); font-size: 9px; font-weight: 800; }
.map-footer time { color: #7c7285; font-size: 8px; }
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-strip article { display: flex; gap: 16px; padding: 32px clamp(12px, 2.5vw, 35px); border-right: 1px solid var(--line); }
.feature-strip article:last-child { border: 0; }
.feature-number { color: var(--pink); font-size: 9px; font-weight: 800; }
.feature-strip h3 { margin: 0 0 7px; font-size: 13px; }
.feature-strip p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.dashboard-view { min-height: calc(100vh - 76px); padding-top: 80px; }
.page-heading { margin-bottom: 42px; }
.page-heading h1 { margin-top: 8px; font-size: clamp(40px, 6vw, 72px); }
.page-heading p { margin: 15px 0 0; color: var(--muted); }
.auth-wall, .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 380px; padding: 50px 20px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(51,38,61,.68), rgba(29,23,36,.78)); text-align: center; }
.big-disc { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 22px; border: 3px solid var(--pink); border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,102,170,.06); color: var(--pink); font-size: 30px; font-weight: 800; }
.auth-wall h2, .empty-state h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.auth-wall p, .empty-state p { max-width: 450px; margin: 10px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.osu-login { display: flex; align-items: center; gap: 12px; padding: 7px 17px 7px 7px; border: 0; border-radius: 14px; background: var(--pink); color: #351526; cursor: pointer; }
.osu-login span { display: grid; place-items: center; width: 35px; height: 35px; border: 2px solid #351526; border-radius: 50%; font-size: 11px; font-weight: 800; }
.osu-login b { font-size: 11px; }
.library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.library-grid .map-card { min-height: 270px; }
.empty-state { grid-column: 1 / -1; }
.empty-state > span { color: var(--pink); font-size: 50px; }

.profile-shell { max-width: 960px; margin: 0 auto; }
.profile-guest { padding-top: 50px; }
.profile-card { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); }
.profile-cover { height: 210px; overflow: hidden; background: radial-gradient(circle at 15% 40%, rgba(255,102,170,.42), transparent 30%), linear-gradient(120deg, #472d49, #292239); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.profile-main { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 22px; padding: 0 30px 30px; }
.profile-avatar { width: 118px; height: 118px; margin-top: -54px; border: 7px solid var(--panel-strong); border-radius: 28px; object-fit: cover; background: var(--ink); }
.profile-name h1 { margin: 0; font-size: 32px; letter-spacing: -.05em; }
.profile-name p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.profile-actions { display: flex; gap: 8px; }
.profile-actions a, .profile-actions button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.profile-stats div { padding: 25px 30px; border-right: 1px solid var(--line); }
.profile-stats div:last-child { border: 0; }
.profile-stats span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.profile-stats b { display: block; margin-top: 6px; font-size: 19px; }

.about-hero { max-width: 910px; padding: 30px 0 70px; }
.about-hero h1 { max-width: 880px; margin-top: 12px; }
.about-hero p { max-width: 710px; margin-top: 25px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-grid article { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.025); }
.about-grid article > span { color: var(--pink); font-size: 25px; }
.about-grid h3 { margin: 25px 0 9px; }
.about-grid p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.status-card { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(116,229,168,.035); }
.status-card > div { display: flex; align-items: center; gap: 14px; }
.status-card b { font-size: 11px; }
.status-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.status-card a { color: var(--pink-soft); font-size: 10px; font-weight: 700; }
.mobile-nav { display: none; }

@media (max-width: 1000px) {
  .topbar { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 75px 0 60px; }
  .hero-copy { max-width: 770px; }
  .recognizer-card { max-width: 650px; width: 100%; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  body { padding-bottom: 72px; }
  .topbar { height: 64px; padding: 0 16px; }
  .brand-copy { display: none; }
  .account-button > span:last-child { display: none; }
  .account-button { padding-right: 6px; }
  .view { padding-left: 16px; padding-right: 16px; padding-bottom: 50px; }
  .hero { gap: 40px; padding-top: 50px; }
  .hero h1 { font-size: clamp(43px, 13vw, 66px); }
  .hero-lead { margin: 22px 0; font-size: 14px; }
  .hero-meta { gap: 12px 18px; }
  .recognizer-card { padding: 18px; border-radius: 22px; }
  .drop-zone { padding: 25px 12px 20px; }
  .results-section { padding-top: 60px; }
  .results-grid, .library-grid, .about-grid { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip article { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-strip article:last-child { border-bottom: 0; }
  .dashboard-view { padding-top: 45px; }
  .page-heading { align-items: flex-end; }
  .page-heading h1 { font-size: 42px; }
  .page-heading p { font-size: 12px; }
  .page-heading .primary-button { display: none; }
  .auth-wall { min-height: 360px; }
  .profile-cover { height: 150px; }
  .profile-main { grid-template-columns: auto 1fr; align-items: end; gap: 14px; padding: 0 18px 20px; }
  .profile-avatar { width: 86px; height: 86px; margin-top: -36px; border-width: 5px; border-radius: 22px; }
  .profile-name h1 { font-size: 24px; }
  .profile-actions { grid-column: 1 / -1; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-stats div:nth-child(2) { border-right: 0; }
  .profile-stats div { padding: 20px; border-bottom: 1px solid var(--line); }
  .profile-stats div:nth-last-child(-n+2) { border-bottom: 0; }
  .about-hero { padding-bottom: 45px; }
  .about-hero h1 { font-size: 45px; }
  .status-card { align-items: flex-start; gap: 20px; }
  .mobile-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: 68px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(23,18,31,.94); backdrop-filter: blur(20px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); }
  .mobile-nav a span { font-size: 19px; line-height: 1; }
  .mobile-nav a small { font-size: 8px; font-weight: 700; }
  .mobile-nav a.is-active { color: var(--pink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
