/* ─── RESET & BASE ─── */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', sans-serif;
  overflow: hidden;
}

/* ─── APP SHELL ─── */
#app { height: 100dvh; display: flex; flex-direction: column; }

/* ─── SCREENS ─── */
.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--safe-t);
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  scroll-behavior: smooth;
}
.screen.active { display: block; }
.screen::-webkit-scrollbar { display: none; }

/* ─── SHARED LAYOUT ─── */
.section { padding: 20px 20px 0; }
.section-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.page-header {
  padding: calc(var(--safe-t) + 20px) 20px 0;
  margin-bottom: 4px;
}
.page-title {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}
.page-subtitle { font-size: 13px; color: var(--text2); margin-top: 6px; font-style: italic; }

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 0;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 16px 14px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s;
  font-weight: 600;
}
.tab.active { color: var(--accent); }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.tab-content { display: none; padding-top: 4px; }
.tab-content.active { display: block; }

/* ─── BUTTONS ─── */
.btn {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg4);
  color: var(--text2);
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}
.btn.primary {
  background: var(--accent);
  color: #080808;
  border-color: var(--accent);
}
.btn:active { opacity: 0.7; }

/* ─── TAGS ─── */
.tag {
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
}
.tag.mood { border-color: rgba(200,169,110,0.2); color: var(--accent); background: var(--accent-dim); }

/* ─── ANIMATIONS ─── */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}
.skeleton-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
}
.skeleton-line      { height: 13px; margin-bottom: 8px; }
.skeleton-line.wide { width: 70%; }
.skeleton-line.mid  { width: 45%; }
.skeleton-line.slim { width: 25%; }

  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease both; }
.fade-up:nth-child(2) { animation-delay: 0.05s; }
.fade-up:nth-child(3) { animation-delay: 0.1s; }
.fade-up:nth-child(4) { animation-delay: 0.15s; }
.fade-up:nth-child(5) { animation-delay: 0.2s; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

.equalizer { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.equalizer span {
  width: 3px; background: var(--accent); border-radius: 1px;
  animation: eq 0.8s ease-in-out infinite alternate;
}
.equalizer span:nth-child(2) { animation-delay: 0.2s; }
.equalizer span:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq {
  from { height: 4px; }
  to { height: 14px; }
}
