:root {
  --cream: #F2EBD9;
  --cream-dark: #E8DFC7;
  --ink: #2A2018;
  --ink-soft: #5C4A3A;
  --ink-mute: #8A7560;
  --accent: #B8362C;
  --accent-dark: #8C2A22;
  --mustard: #D9A84C;
  --teal: #3F6E72;
  --purple: #6B4A8A;
  --paper: #FAF6EA;
  --shadow: rgba(42, 32, 24, 0.12);
  --tab-bar-h: 64px;
  --mini-player-h: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Onest', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184, 54, 44, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(63, 110, 114, 0.04) 0%, transparent 40%);
  overscroll-behavior-y: contain;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}

#app {
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  padding-bottom: calc(var(--tab-bar-h) + env(safe-area-inset-bottom, 0px));
}

.screen {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================ ONBOARDING ================ */
.onboarding {
  min-height: calc(100vh - var(--tab-bar-h));
  display: flex;
  flex-direction: column;
  padding: 40px 28px 28px;
  text-align: center;
}

.onboarding-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.onboarding-disc {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin-bottom: 36px;
  background:
    radial-gradient(circle at center,
      #B8362C 0px, #B8362C 28px,
      #1a1410 30px, #1a1410 32px,
      #2A2018 34px, #2A2018 54px,
      #1a1410 55px, #1a1410 56px,
      #2A2018 57px, #2A2018 80px);
  box-shadow: 0 16px 40px rgba(42, 32, 24, 0.3), inset 0 0 60px rgba(0,0,0,0.4);
  animation: spin 12s linear infinite;
  position: relative;
}

.onboarding-disc::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  background: #1a1410;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #B8362C;
}

.onboarding-slogan {
  color: var(--ink-mute);
  font-size: 15px;
  margin-top: 10px;
  font-family: 'Fraunces', serif;
  font-style: italic;
}

.onboarding-body {
  padding: 20px 0;
}

.onboarding-body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.onboarding-note {
  font-size: 12px !important;
  color: var(--ink-mute) !important;
  margin-top: 20px;
}

.onboarding-footer {
  padding-top: 16px;
}

/* ================ HOME ================ */
.home-header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: middle;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 16px;
  transition: background 0.15s;
}

.icon-btn:active { background: var(--cream-dark); }

.icon-btn.active {
  background: var(--accent);
  color: var(--paper);
}

.greeting {
  padding: 0 20px 18px;
}

.greeting h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.greeting p {
  color: var(--ink-mute);
  font-size: 14px;
  margin-top: 4px;
}

/* ================ FEATURED CARD ================ */
.featured {
  margin: 0 20px 26px;
  background: linear-gradient(135deg, #C8362C 0%, #8C2A22 100%);
  border-radius: 20px;
  padding: 20px;
  color: #FAF6EA;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(184, 54, 44, 0.25);
  cursor: pointer;
}

.featured::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, #2A2018 20%, #1a1410 35%, #2A2018 40%, #1a1410 55%, #2A2018 60%, #1a1410 75%);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.featured::after {
  content: '';
  position: absolute;
  right: 25px; top: 25px;
  width: 35px; height: 35px;
  border-radius: 50%;
  background: var(--mustard);
  z-index: 1;
}

.featured-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 8px;
  font-weight: 600;
}

.featured h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 600;
  padding-right: 90px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.featured-meta {
  font-size: 13px;
  opacity: 0.85;
  padding-right: 90px;
}

.featured-play {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FAF6EA;
  color: var(--accent-dark);
  padding: 9px 16px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13px;
  position: relative;
  z-index: 2;
}

/* ================ SECTIONS & COLLECTIONS ================ */
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  padding: 4px 20px 12px;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.collections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 24px;
}

.collection {
  border-radius: 16px;
  padding: 14px;
  height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s;
}

.collection:active { transform: scale(0.98); }

.collection-emoji { font-size: 22px; }

.collection-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-count {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 3px;
}

/* ================ COLLECTION SCREEN ================ */
.collection-intro {
  background: var(--cream);
  margin: 0 20px 16px;
  padding: 16px 18px;
  border-radius: 14px;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
}

.sort-row {
  display: flex;
  gap: 8px;
  padding: 0 20px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sort-row::-webkit-scrollbar { display: none; }

.sort-chip {
  padding: 6px 12px;
  border-radius: 100px;
  background: transparent;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}

.sort-chip.active {
  color: var(--accent);
  background: rgba(184, 54, 44, 0.08);
}

/* ================ RECORD LIST ================ */
.records-list {
  padding: 0 20px;
}

.record-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(42, 32, 24, 0.06);
  cursor: pointer;
  transition: opacity 0.1s;
}

.record-row:active { opacity: 0.6; }
.record-row:last-child { border-bottom: none; }

.mini-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF6EA;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  position: relative;
  overflow: hidden;
}

.mini-cover::after {
  content: '';
  position: absolute;
  right: -14px; bottom: -14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1410 0%, #1a1410 35%, transparent 36%, transparent 50%, #1a1410 51%, #1a1410 60%, transparent 61%);
  opacity: 0.5;
}

.mini-cover.palette-teal { background: linear-gradient(135deg, #3F6E72 0%, #2A4A4D 100%); }
.mini-cover.palette-mustard { background: linear-gradient(135deg, #D9A84C 0%, #A67D2C 100%); color: #2A2018; }
.mini-cover.palette-accent { background: linear-gradient(135deg, #B8362C 0%, #8C2A22 100%); }
.mini-cover.palette-purple { background: linear-gradient(135deg, #6B4A8A 0%, #4A3568 100%); }

.record-info { flex: 1; min-width: 0; }

.record-title {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-sub {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-duration {
  font-size: 12.5px;
  color: var(--ink-mute);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ================ CATALOG (GRID VIEW) ================ */
.catalog-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.filters-row {
  display: flex;
  gap: 8px;
  padding: 0 20px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-row::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}

.filter-chip.active {
  background: var(--ink);
  color: var(--paper);
}

.view-toggle {
  display: flex;
  gap: 6px;
  padding: 0 20px 14px;
  justify-content: flex-end;
}

.view-btn {
  padding: 6px 12px;
  border-radius: 100px;
  background: transparent;
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 500;
}

.view-btn.active {
  background: var(--cream);
  color: var(--ink);
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 20px 20px;
}

.grid-card {
  cursor: pointer;
  transition: transform 0.15s;
}

.grid-card:active { transform: scale(0.97); }

.grid-cover {
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px;
  position: relative;
  color: #FAF6EA;
  box-shadow: 0 6px 16px rgba(42, 32, 24, 0.12);
}

.grid-cover::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  opacity: 0.3;
  pointer-events: none;
}

.grid-cover.palette-mustard { background: linear-gradient(135deg, #D9A84C 0%, #B88A2C 100%); color: #2A2018; }
.grid-cover.palette-teal { background: linear-gradient(135deg, #5E8A8E 0%, #3F6E72 100%); }
.grid-cover.palette-accent { background: linear-gradient(135deg, #C84A40 0%, #8C2A22 100%); }
.grid-cover.palette-purple { background: linear-gradient(135deg, #8A6AA8 0%, #4A3568 100%); }

.grid-cover-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-cover-year {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 9px;
  font-weight: 600;
  opacity: 0.7;
}

.grid-info {
  padding: 8px 2px 0;
}

.grid-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 3px;
}

/* ================ DETAIL ================ */
.detail-top {
  padding: 14px 20px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ink);
}

.detail-hero {
  padding: 20px 20px 24px;
  text-align: center;
}

.cover-art {
  width: 240px;
  height: 240px;
  margin: 0 auto 24px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(42, 32, 24, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.cover-art.palette-mustard { background: linear-gradient(135deg, #D9A84C 0%, #B88A2C 100%); color: #2A2018; }
.cover-art.palette-teal { background: linear-gradient(135deg, #5E8A8E 0%, #3F6E72 100%); color: #FAF6EA; }
.cover-art.palette-accent { background: linear-gradient(135deg, #C84A40 0%, #8C2A22 100%); color: #FAF6EA; }
.cover-art.palette-purple { background: linear-gradient(135deg, #8A6AA8 0%, #4A3568 100%); color: #FAF6EA; }

.cover-art::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid currentColor;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.3;
}

.cover-brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.25em;
  opacity: 0.7;
  text-transform: uppercase;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.cover-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.08;
  text-align: center;
  letter-spacing: -0.01em;
  max-width: 200px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  hyphens: auto;
}

.cover-sub {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 12px;
  margin-top: 10px;
  opacity: 0.85;
}

.cover-year {
  position: absolute;
  bottom: 16px; right: 20px;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
}

.detail-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.01em;
  padding: 0 20px;
  text-align: center;
}

.detail-meta {
  color: var(--ink-mute);
  font-size: 14px;
  margin-top: 6px;
  padding: 0 20px;
  text-align: center;
}

.badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.badge {
  background: var(--cream);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

.curator-block {
  padding: 22px;
  background: var(--cream);
  margin: 24px 20px 20px;
  border-radius: 16px;
  position: relative;
}

.curator-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.curator-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  padding-left: 22px;
}

.curator-block::before {
  content: '«';
  font-size: 42px;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: 18px; left: 16px;
  line-height: 1;
  font-family: 'Fraunces', serif;
}

.play-section { padding: 0 20px 20px; }

.play-big {
  width: 100%;
  background: var(--accent);
  color: var(--paper);
  padding: 17px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(184, 54, 44, 0.3);
  transition: transform 0.1s;
}

.play-big:active { transform: scale(0.98); }

.secondary-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px 30px;
}

.sec-btn {
  flex: 1;
  background: var(--cream);
  padding: 12px;
  border-radius: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sec-btn-icon { font-size: 18px; }

/* ================ PLAYER ================ */
.player-top {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-title-bar {
  text-align: center;
  color: var(--ink-mute);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.timer-indicator {
  font-size: 10px;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.turntable {
  margin: 30px auto 40px;
  width: 280px;
  height: 280px;
  position: relative;
}

.vinyl {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      #D9A84C 0px, #D9A84C 42px,
      #1a1410 44px, #1a1410 46px,
      #2A2018 48px, #2A2018 76px,
      #1a1410 77px, #1a1410 78px,
      #2A2018 79px, #2A2018 108px,
      #1a1410 109px, #1a1410 110px,
      #2A2018 111px, #2A2018 140px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 0 80px rgba(0,0,0,0.4);
  position: relative;
  animation: spin 5s linear infinite;
  animation-play-state: paused;
}

.vinyl.playing { animation-play-state: running; }

.vinyl::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  background: #1a1410;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #D9A84C;
  z-index: 3;
}

.vinyl-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90px; height: 90px;
  background: linear-gradient(135deg, #B8362C 0%, #8C2A22 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF6EA;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.vinyl-label::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(250, 246, 234, 0.25);
}

.vinyl-label-content { padding: 6px; }

.vinyl-label-brand {
  font-size: 7px;
  letter-spacing: 0.18em;
  opacity: 0.8;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.vinyl-label-mark {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.vinyl-label-year {
  font-size: 7px;
  letter-spacing: 0.1em;
  opacity: 0.75;
  margin-top: 4px;
  font-weight: 500;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tonearm {
  position: absolute;
  top: -8px; right: 4px;
  width: 80px; height: 80px;
  transform: rotate(30deg);
  transform-origin: top right;
  pointer-events: none;
  z-index: 3;
  transition: transform 0.4s ease-out;
}

.tonearm.playing { transform: rotate(45deg); }

.tonearm::before {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 62px; height: 4px;
  background: linear-gradient(to left, #8A7560, #5C4A3A);
  border-radius: 2px;
  transform-origin: right center;
  transform: rotate(35deg);
}

.tonearm::after {
  content: '';
  position: absolute;
  top: 3px; right: 0;
  width: 18px; height: 18px;
  background: #3A2E22;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.now-playing {
  text-align: center;
  padding: 0 30px;
}

.now-playing h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.now-playing p {
  color: var(--ink-mute);
  font-size: 13px;
  margin-top: 6px;
}

.progress-section {
  padding: 28px 30px 16px;
}

.progress-bar {
  height: 4px;
  background: rgba(42, 32, 24, 0.1);
  border-radius: 100px;
  position: relative;
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: none;
}

.progress-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 100px;
}

.progress-knob {
  position: absolute;
  right: 0; top: 50%;
  transform: translate(50%, -50%);
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(184, 54, 44, 0.2);
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 16px 20px 20px;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink);
}

.control-arrow { font-size: 24px; line-height: 1; }

.control-secs {
  font-size: 9px;
  opacity: 0.6;
  font-weight: 500;
}

.play-circle {
  width: 68px; height: 68px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 20px;
  box-shadow: 0 6px 14px rgba(184, 54, 44, 0.3);
  flex-shrink: 0;
  transition: transform 0.1s;
}

.play-circle:active { transform: scale(0.95); }

.footer-actions {
  display: flex;
  justify-content: space-around;
  padding: 20px 30px 30px;
  border-top: 1px solid rgba(42, 32, 24, 0.06);
  margin-top: 8px;
}

.foot-btn {
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.foot-icon { font-size: 18px; }
.foot-btn.active { color: var(--accent); }

/* ================ SEARCH ================ */
.search-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  flex: 1;
  background: var(--cream);
  border-radius: 100px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
}

.search-box input::placeholder { color: var(--ink-mute); }

.search-clear {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(42, 32, 24, 0.15);
  color: var(--paper);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-section { padding: 6px 20px; }

.search-subtitle {
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 500;
  margin: 18px 0 10px;
}

.hint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hint-chip {
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.recent-searches {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recent-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--ink-soft);
  font-size: 14px;
  border-bottom: 1px solid rgba(42, 32, 24, 0.05);
  cursor: pointer;
}

.recent-search-icon {
  color: var(--ink-mute);
  font-size: 14px;
}

.recent-search-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-link {
  color: var(--accent);
  font-weight: 500;
  background: none;
  text-decoration: underline;
}

/* ================ FAVORITES ================ */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--ink-mute);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
  line-height: 1.5;
}

/* ================ ABOUT ================ */
.about-content { padding: 14px 20px 40px; }

.about-content h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.about-content h2 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 10px;
}

.about-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.about-links {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-link {
  background: var(--cream);
  padding: 14px 18px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  text-align: left;
  display: block;
  cursor: pointer;
}

.about-link:active { background: var(--cream-dark); }

/* ================ RIGHTS FORM ================ */
.rights-form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  padding-left: 4px;
}

.field input,
.field textarea,
.field select {
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  background: var(--paper);
}

.field textarea {
  min-height: 96px;
}

.form-note {
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
  margin-top: -4px;
}

.rights-success {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.rights-success h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.rights-success p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* ================ MINI-PLAYER ================ */
.mini-player {
  position: fixed;
  bottom: var(--tab-bar-h);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border-top: 1px solid rgba(42, 32, 24, 0.1);
  padding: 8px 12px 8px 14px;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(42, 32, 24, 0.08);
}

.mini-player.active { display: flex; }

.mini-player-cover {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF6EA;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  background: var(--ink-mute);
}

.mini-player-cover.palette-teal { background: linear-gradient(135deg, #3F6E72 0%, #2A4A4D 100%); }
.mini-player-cover.palette-mustard { background: linear-gradient(135deg, #D9A84C 0%, #A67D2C 100%); color: #2A2018; }
.mini-player-cover.palette-accent { background: linear-gradient(135deg, #B8362C 0%, #8C2A22 100%); }
.mini-player-cover.palette-purple { background: linear-gradient(135deg, #6B4A8A 0%, #4A3568 100%); }

.mini-player-info { flex: 1; min-width: 0; cursor: pointer; }

.mini-player-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.mini-player-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--ink-mute);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* when mini-player active, shift tab bar up */
.mini-player.active ~ .tab-bar { bottom: 0; }

/* ================ TAB BAR ================ */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  height: var(--tab-bar-h);
  background: var(--paper);
  border-top: 1px solid rgba(42, 32, 24, 0.08);
  display: flex;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab-bar.hidden { display: none; }

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 500;
  padding-top: 8px;
  transition: color 0.15s;
}

.tab-btn .tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-btn.active {
  color: var(--accent);
}

/* adjust #app padding when mini-player active */
body.mini-active #app {
  padding-bottom: calc(var(--tab-bar-h) + var(--mini-player-h) + env(safe-area-inset-bottom, 0px));
}

/* hide tab bar on specific screens */
body.hide-tabs .tab-bar { display: none; }
body.hide-tabs #app { padding-bottom: 0; }
body.hide-tabs.mini-active #app { padding-bottom: var(--mini-player-h); }
body.hide-tabs .mini-player { bottom: 0; }

/* ================ TIMER MODAL ================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 32, 24, 0.5);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s;
}

.modal-backdrop.active { display: flex; }

.modal {
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 420px;
  padding: 22px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}

.modal p {
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
  margin-bottom: 20px;
}

.timer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.timer-option {
  padding: 16px;
  background: var(--cream);
  border-radius: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  transition: all 0.15s;
}

.timer-option.active {
  background: var(--ink);
  color: var(--paper);
}

.timer-option[data-minutes="0"] {
  grid-column: span 2;
  background: transparent;
  color: var(--ink-mute);
  font-size: 13px;
}
