:root {
  --bg: #020617;
  --surface: #0f172a;
  --surface-alt: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --brand: #0ea5e9;
  --border: #1f2937;
  --shadow: 0 10px 30px rgba(15,23,42,0.6);
  --footer-h: 80px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0ea5e91a 0, #020617 50%);
  color: var(--text);
}

.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: .5rem .75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .5rem;
  align-items: center;
  background: rgba(15,23,42,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 10;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: .25rem;
}

.app-main {
  padding: 4rem .75rem calc(var(--footer-h) + 1rem);
}

.view {
  max-width: 900px;
  margin: 0 auto;
}

.menu-grid {
  display: grid;
  gap: .75rem;
}

.menu-card {
  width: 100%;
  text-align: start;
  padding: .75rem .9rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(15,23,42,0.9), rgba(15,23,42,0.7));
  color: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-card .title {
  font-weight: 600;
}

.menu-card .meta {
  display: inline-flex;
  gap: .25rem;
  align-items: center;
  font-size: .8rem;
  color: var(--muted);
}

.app-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--footer-h);
  padding: .35rem .75rem .5rem;
  background: rgba(15,23,42,0.98);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 25px rgba(15,23,42,0.7);
  display: flex;
  align-items: center;
}

.player {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
}

.player-btn {
  border-radius: 999px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
}

.track {
  flex: 1;
}

.now-playing {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
}

#seekBar {
  width: 100%;
}

.panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15,23,42,0.6);
  z-index: 20;
}

.panel-inner {
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: .75rem .9rem 1rem;
  width: min(480px, 100%);
  box-shadow: var(--shadow);
}

.panel .row.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-secondary {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: .3rem .7rem;
  cursor: pointer;
}

.playlist-list {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}

.playlist-item {
  border-radius: 10px;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  cursor: pointer;
  display: grid;
  gap: .15rem;
}

.playlist-item .title {
  font-size: .9rem;
  font-weight: 600;
}

.playlist-item .meta {
  font-size: .78rem;
  color: var(--muted);
}

.playlist-item.active {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

/* Poetry + bracketed letters */
.poetry .verse { margin-bottom: .25rem; }
.poetry .hemistich { display: block; }
.poetry .hemistich.a { text-align: end; }
.poetry .hemistich.b { text-align: start; }
.letter-box { color: #ef4444; font-weight: 600; }

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #0ea5e91a 0, #020617 60%);
  z-index: 30;
}
.splash.hidden { display: none; }
.splash-inner {
  text-align: center;
}
.logo { width: 80px; height: 80px; }
