:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* Header */
.hdr {
  flex: 0 0 auto;
  padding: 18px 22px 12px;
  border-bottom: 1px solid #24243a;
  background: var(--bg-primary);
}
.hdr h1 { font-size: 24px; font-weight: 700; letter-spacing: 0.2px; }
.hdr .sub { font-size: 14px; color: var(--text-secondary); margin-top: 3px; }

/* Content */
.content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 18px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a40 transparent;
}
.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-thumb { background: #2a2a40; border-radius: 3px; }

/* Footer hint */
.hint {
  flex: 0 0 auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid #24243a;
  background: var(--bg-primary);
  padding: 0 12px;
  text-align: center;
}

/* Menu list */
.menu { display: flex; flex-direction: column; gap: 12px; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  width: 100%;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--text-primary);
  text-align: left;
}
.mi-title { font-size: 19px; font-weight: 600; }
.mi-meta { font-size: 14px; color: var(--text-secondary); }

/* Grid of symbols */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  color: var(--text-primary);
}
.card.fav { box-shadow: inset 0 0 0 1px rgba(0, 255, 136, 0.35); }
.card .cs { font-size: 30px; font-weight: 600; line-height: 1.1; }
.card .cw {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail */
.detail-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.symbol {
  font-size: 96px;
  font-weight: 600;
  line-height: 1;
  margin-top: 6px;
  color: var(--text-primary);
}
.examples { font-size: 19px; color: var(--text-primary); }
.examples b { color: var(--accent); }
.desc { font-size: 14px; color: var(--text-secondary); }
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 2px;
}
.btn {
  min-height: 58px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}
.btn.primary { background: var(--accent); color: #001620; }
.btn.saved { background: rgba(0, 255, 136, 0.16); color: var(--accent-secondary); }
.is-playing .btn.primary { background: var(--accent-secondary); color: #002016; }

/* Favorites empty / about */
.empty { text-align: center; color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-top: 40px; }
.about-body p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 12px; }
.about-body b { color: var(--text-primary); }
.about-body .muted { color: var(--text-muted); font-size: 13px; }
.about-body .btn { width: 100%; margin-top: 8px; }
