:root {
  --bg: #ffffff;
  --text: #121212;
  --muted: #6f7684;
  --line: #ebedf0;
  --accent: #ffd25a;
  --accent-dark: #f0c246;
  --soft: #f6f7f9;
  --green: #26a65b;
  --red: #e5484d;
  --shadow: 0 20px 45px rgba(18, 18, 18, 0.06);
  --radius: 22px;
  --player-color: #ffd25a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
img { max-width: 100%; display: block; }

.material-symbols-rounded { font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.app { min-height: 100vh; padding-bottom: 130px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.brand-kicker, .section-kicker {
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.brand-title, h1, h2, h3, .hero-title, .card-title, .account-name, .stat-value {
  font-family: Unbounded, Inter, sans-serif;
}

.brand-title { font-size: 22px; }
.page-shell { max-width: 1240px; margin: 0 auto; padding: 18px 20px 0; }
.admin-page-shell { padding-bottom: 40px; }

.view { display: none; }
.view.active { display: block; }

.section {
  padding: 12px 0 26px;
  border-bottom: 1px solid var(--line);
}
.section:last-child { border-bottom: 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}
.section-head h2 { margin: 6px 0 0; font-size: clamp(24px, 4vw, 38px); }

.hero {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 28px;
  padding: 12px 0 28px;
  border-bottom: 1px solid var(--line);
}

.hero-copy { padding: 24px 0; }
.hero-title { font-size: clamp(32px, 7vw, 66px); line-height: 1.04; margin: 8px 0 14px; }
.hero-text { color: var(--muted); max-width: 720px; font-size: 16px; line-height: 1.6; }

.hero-side { padding: 18px 0 0; }
.info-lines { display: grid; gap: 12px; }
.info-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.info-line:last-child { border-bottom: 0; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.track-card, .simple-card, .history-item {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
}

.card-visual, .style-color-preview, .profile-color-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  background: var(--soft);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #f0f1f4;
}

.style-color-preview { aspect-ratio: 1.15 / 1; }

.card-meta { padding: 12px 2px 0; }
.card-title { font-size: 16px; line-height: 1.35; margin: 0 0 5px; }
.card-subtitle, .card-stats, .muted { color: var(--muted); }
.card-stats { font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 18px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.btn.wide { width: 100%; }
.btn.btn-accent { background: var(--accent); color: #151515; }
.btn.btn-accent:hover { background: var(--accent-dark); }
.btn.btn-soft { background: var(--soft); color: var(--text); border-color: var(--line); }
.btn.btn-danger { background: rgba(229,72,77,.12); color: var(--red); border-color: rgba(229,72,77,.15); }
.btn.btn-success { background: rgba(38,166,91,.12); color: var(--green); border-color: rgba(38,166,91,.15); }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 30;
  width: min(720px, calc(100vw - 24px));
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px;
  box-shadow: var(--shadow);
}

.nav-item {
  min-height: 54px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
}

.nav-item.active {
  background: var(--soft);
  color: var(--text);
}
.nav-item span:last-child { font-size: 12px; }

.notice { min-height: 20px; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 14px; }
.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
}
.field textarea { min-height: 160px; resize: vertical; }

.search-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 22px; }
.search-row input { flex: 1; min-width: 220px; }

.simple-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.simple-card h3 { margin: 0 0 8px; font-size: 18px; }
.simple-card p { margin: 0; color: var(--muted); line-height: 1.55; }

.world-hero {
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fff8e2 0%, #ffffff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.world-hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,90,.35) 0%, rgba(255,210,90,0) 70%);
}
.world-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}
.world-title {
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.02;
  margin: 0 0 12px;
  font-family: Unbounded, Inter, sans-serif;
}
.world-subtitle {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.world-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.profile-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
}
.profile-color-card {
  aspect-ratio: auto;
  min-height: 340px;
  position: relative;
}
.profile-color-core {
  position: absolute;
  inset: 22px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.profile-color-copy {
  position: relative;
  z-index: 1;
  padding: 22px;
}
.profile-hex {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  margin-top: 14px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(18,18,18,.06);
  font-weight: 700;
}

.mini-player {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 92px;
  z-index: 29;
  width: min(760px, calc(100vw - 24px));
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
}
.mini-player.hidden { display: none; }
.mini-player-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.mini-player-wave {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--player-color);
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
.mini-player-copy { min-width: 0; }
.mini-player-title, .mini-player-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-player-title { font-weight: 800; }
.mini-player-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.mini-player-actions { display: flex; gap: 10px; }
.mini-btn { min-width: 88px; }

.hidden { display: none !important; }

.admin-auth-card {
  max-width: 540px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}
.panel-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
}
.panel-stack { display: grid; gap: 20px; }
.panel-block { padding: 6px 0 22px; border-bottom: 1px solid var(--line); }
.panel-block:last-child { border-bottom: 0; }
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-list { display: grid; gap: 14px; }
.admin-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.admin-item-main { display: grid; gap: 6px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-meta { color: var(--muted); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }

.empty-state { padding: 22px 0; color: var(--muted); }

@media (max-width: 980px) {
  .hero, .profile-grid, .panel-grid { grid-template-columns: 1fr; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { padding: 14px 14px; }
  .page-shell { padding: 14px 14px 0; }
  .grid-cards { grid-template-columns: 1fr; }
  .bottom-nav { bottom: 10px; width: calc(100vw - 16px); }
  .mini-player { width: calc(100vw - 16px); bottom: 82px; flex-direction: column; align-items: stretch; }
  .mini-player-actions { width: 100%; }
  .mini-btn { flex: 1; }
  .dual-grid { grid-template-columns: 1fr; }
}


.admin-item-edit {
  gap: 16px;
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-full {
  grid-column: 1 / -1;
}

.field-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
}

.field-checkbox span {
  color: var(--text);
  font-size: 14px;
}

.field-checkbox input {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  .admin-edit-grid {
    grid-template-columns: 1fr;
  }
}


.color-input-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
}

.color-picker-input {
  width: 64px;
  min-width: 64px;
  height: 48px;
  padding: 4px;
  border-radius: 16px !important;
  cursor: pointer;
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 12px;
}

.color-picker-input::-webkit-color-swatch {
  border: 0;
  border-radius: 12px;
}

.color-picker-input::-moz-color-swatch {
  border: 0;
  border-radius: 12px;
}

@media (max-width: 720px) {
  .color-input-row {
    grid-template-columns: 56px 1fr;
  }

  .color-picker-input {
    width: 56px;
    min-width: 56px;
    height: 46px;
  }
}
