:root {
  --bg:        #080a18;
  --bg-2:      #0e1128;
  --surface:   #13172e;
  --surface-2: #1c2140;
  --border:    rgba(255,255,255,0.08);
  --text:      #eeeeff;
  --text-dim:  #7a80a8;
  --accent:    #ff5a4e;
  --accent-dim:rgba(255,90,78,0.12);
  --blue:      #4a7eff;
  --blue-dim:  rgba(74,126,255,0.15);
  --radius:    14px;
  --font: -apple-system,"Helvetica Neue","Segoe UI","Noto Sans SC","PingFang SC",sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg:        #f3f4ff;
    --bg-2:      #eaecff;
    --surface:   #ffffff;
    --surface-2: #eef0ff;
    --border:    rgba(0,0,0,0.08);
    --text:      #111328;
    --text-dim:  #6068a0;
    --accent:    #e04438;
    --accent-dim:rgba(224,68,56,0.10);
    --blue:      #2d63e8;
    --blue-dim:  rgba(45,99,232,0.10);
  }
}
:root[data-theme="dark"] {
  --bg:#080a18;--bg-2:#0e1128;--surface:#13172e;--surface-2:#1c2140;
  --border:rgba(255,255,255,0.08);--text:#eeeeff;--text-dim:#7a80a8;
  --accent:#ff5a4e;--accent-dim:rgba(255,90,78,0.12);--blue:#4a7eff;--blue-dim:rgba(74,126,255,0.15);
}
:root[data-theme="light"] {
  --bg:#f3f4ff;--bg-2:#eaecff;--surface:#ffffff;--surface-2:#eef0ff;
  --border:rgba(0,0,0,0.08);--text:#111328;--text-dim:#6068a0;
  --accent:#e04438;--accent-dim:rgba(224,68,56,0.10);--blue:#2d63e8;--blue-dim:rgba(45,99,232,0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: rgba(8,10,24,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}
@media (prefers-color-scheme: light) {
  .topbar { background: rgba(243,244,255,0.90); }
}
:root[data-theme="light"] .topbar { background: rgba(243,244,255,0.90); }

.topbar .brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.topbar nav {
  display: flex;
  gap: 6px;
  flex: 1;
}

.topbar nav a, .topbar .signout {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 15px;
}

.topbar nav a.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- Search page ---------- */
.search-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 24px;
}

.search-hero h1 {
  font-size: 28px;
  margin: 0 0 22px;
  color: var(--text-dim);
  font-weight: 500;
}

.search-bar {
  width: 100%;
  max-width: 640px;
  display: flex;
  gap: 10px;
}

.search-bar input {
  flex: 1;
  padding: 16px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
}

.search-bar input:focus { outline: 2px solid var(--accent); }

.search-bar button {
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0a08;
  font-size: 17px;
  font-weight: 600;
}

/* ---------- Result / song cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding: 24px 28px 60px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card .body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card .title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  font-size: 13px;
  color: var(--text-dim);
}

.card .actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.card .actions button {
  width: 100%;
  min-height: 48px;
  padding: 12px 0;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
}

.card .actions button.primary {
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
}

/* ---------- Playlist rows ---------- */
.playlist-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--surface-2);
}

.playlist-row img {
  width: 96px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.playlist-row .info { flex: 1; min-width: 0; }
.playlist-row .info .title { font-weight: 600; font-size: 16px; }
.playlist-row .info .meta { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

.playlist-row .row-actions { display: flex; gap: 8px; }
.playlist-row .row-actions button {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}

/* ---------- Player page ---------- */
.player-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #000;
}

#yt-player-frame {
  width: 100%;
  height: 100%;
}

.player-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.player-controls button {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
}

.player-controls button.fullscreen-btn { margin-left: auto; }

.player-controls .now-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lyrics overlay — stays usable when video interaction is locked while driving */
.lyrics-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: #0e0f12;
}

.lyrics-overlay.active { display: flex; }

.lyrics-overlay .line {
  font-size: 32px;
  color: var(--text-dim);
  margin: 16px 0;
  transition: color 0.2s, transform 0.2s, opacity 0.2s;
  opacity: 0.5;
}

.lyrics-overlay .line.current {
  color: #2d7dff;
  -webkit-text-stroke: 1.5px #ffffff;
  text-shadow:
    -1.5px -1.5px 0 #fff,
    1.5px -1.5px 0 #fff,
    -1.5px 1.5px 0 #fff,
    1.5px 1.5px 0 #fff;
  font-size: 48px;
  font-weight: 700;
  transform: scale(1.03);
  opacity: 1;
}

/* ---------- Display (rear screen) page ---------- */
.display-wrap {
  width: 100%;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.display-empty {
  color: var(--text-dim);
  font-size: 22px;
  text-align: center;
}

/* ---------- Login page ---------- */
.login-wrap {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.login-wrap h1 { font-size: 26px; margin: 0; }

.login-wrap button {
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0a08;
  font-size: 17px;
  font-weight: 600;
}

/* ---------- Playlist picker modal (used from search results) ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  width: min(420px, 90%);
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}

.modal-box h3 { margin: 0 0 14px; font-size: 17px; }

.modal-playlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 8px;
}

.modal-playlist-row span { font-size: 15px; }

.modal-playlist-row button {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #1a0a08;
  font-size: 13px;
  font-weight: 600;
}

.modal-playlist-row button.added {
  background: var(--surface);
  color: var(--text-dim);
}

.modal-new-playlist {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.modal-new-playlist input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.modal-new-playlist button {
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
}

.modal-close {
  display: block;
  margin: 16px auto 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------- Playlist management page ---------- */
.playlist-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 14px 28px;
  padding: 16px 18px;
}

.playlist-card .playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.playlist-card .playlist-header .name {
  font-size: 18px;
  font-weight: 700;
}

.playlist-card .playlist-header .count {
  font-size: 13px;
  color: var(--text-dim);
  margin-left: 8px;
}

.playlist-card .header-actions {
  display: flex;
  gap: 8px;
}

.playlist-card .header-actions button {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13px;
}

.playlist-card .songs-list {
  margin-top: 12px;
  display: none;
}

.playlist-card .songs-list.open { display: block; }

.playlist-song-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--surface-2);
}

.playlist-song-row img {
  width: 80px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
}

.playlist-song-row .info { flex: 1; min-width: 0; }
.playlist-song-row .info .title { font-size: 14px; font-weight: 600; }
.playlist-song-row .info .meta { font-size: 12px; color: var(--text-dim); }

.playlist-song-row .row-buttons { display: flex; gap: 6px; }
.playlist-song-row .row-buttons button {
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
}
.playlist-song-row .row-buttons button.remove { color: var(--accent); }

.new-playlist-bar {
  display: flex;
  gap: 10px;
  margin: 20px 28px;
}

.new-playlist-bar input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}

.new-playlist-bar button {
  padding: 14px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
}

.rename-input {
  font-size: 18px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
}

.queue-section h2 {
  font-size: 16px;
  color: var(--text-dim);
  padding: 0 28px;
  margin: 18px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ---------------------------------------------------------------------
   Tesla touch-target sizing — large, easy-to-hit controls for in-car use.
   Applied broadly rather than per-component so nothing gets missed.
--------------------------------------------------------------------- */
button, .topbar nav a, .topbar .signout, input[type="text"], input[type="email"], input[type="password"], select {
  min-height: 52px;
  font-size: 16px;
}

button {
  padding: 14px 22px;
}

.topbar nav a, .topbar .signout {
  padding: 14px 20px;
  font-size: 16px;
}

.brand-logo-img {
  height: 36px;
}

.lang-select {
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  border: none;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  min-height: 52px;
  appearance: auto;
  -webkit-appearance: auto;
}

.lang-select:hover { background: var(--surface-2); color: var(--text); }

.search-bar button, .new-playlist-bar button {
  min-height: 56px;
  font-size: 17px;
  font-weight: 700;
}

.search-bar input, .new-playlist-bar input {
  min-height: 56px;
  font-size: 17px;
}

.playlist-card .header-actions button {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 14px;
}

.playlist-song-row .row-buttons button {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
}

.playlist-song-row {
  padding: 14px 0;
}

.playlist-card {
  padding: 20px 22px;
}

.playlist-card .playlist-header .name { font-size: 20px; }
.playlist-card .playlist-header .count { font-size: 14px; }

/* Generous spacing between touch targets, app-wide */
.row-buttons, .header-actions, .queue-actions { gap: 8px; }

/* ---------------------------------------------------------------------
   Move song(s) between playlists — select mode + checkboxes
--------------------------------------------------------------------- */
.playlist-card .header-actions button.select-active {
  background: #2d7dff;
  color: #fff;
}

.playlist-song-row .select-checkbox {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.move-selected-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 10px;
}
.move-selected-bar.visible { display: flex; }
.move-selected-bar button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
  font-size: 14px;
}

.move-target-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 8px;
  font-size: 16px;
}
.move-target-row button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
  font-size: 14px;
}

/* ---------------------------------------------------------------------
   Search page: List/Grid view toggle
--------------------------------------------------------------------- */
.view-toggle {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.view-toggle-btn {
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 15px;
  min-height: 48px;
}
.view-toggle-btn.active {
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
}

/* List view: full-width rows, optimized for quickly browsing many songs */
.list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 28px 60px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.list-row img {
  width: 130px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

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

.list-row .info .title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-row .info .meta {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

.list-row .list-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 150px;
}

.list-row .list-actions button {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
}

.list-row .list-actions button.primary {
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   Lyrics modal: editable title/artist before search
--------------------------------------------------------------------- */
.lyrics-edit-fields {
  margin-bottom: 16px;
}
.lyrics-edit-fields label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.lyrics-edit-fields input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  min-height: 48px;
}
.lyrics-edit-fields button {
  width: 100%;
  min-height: 48px;
  padding: 12px 0;
  border-radius: 10px;
  background: var(--accent);
  color: #1a0a08;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Footer ---------- */
.site-footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 18px 24px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--surface-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover { color: var(--text); }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 28px 60px;
  line-height: 1.7;
}

.legal-wrap h1 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.legal-wrap .legal-date { font-size: 13px; color: var(--text-dim); margin-bottom: 36px; }
.legal-wrap h2 { font-size: 17px; font-weight: 700; margin: 32px 0 10px; }
.legal-wrap p, .legal-wrap li { font-size: 15px; color: var(--text-dim); margin: 0 0 10px; }
.legal-wrap ul { padding-left: 22px; }
.legal-wrap li { margin-bottom: 6px; }
.legal-wrap a { color: var(--accent); text-decoration: underline; }


/* ---------- Contact page ---------- */
.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.contact-wrap h1 { font-size: 26px; font-weight: 700; margin: 0 0 8px; }
.contact-wrap .contact-sub { font-size: 15px; color: var(--text-dim); margin: 0 0 36px; }

.contact-form { display: flex; flex-direction: column; gap: 18px; }

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}

.contact-form input,
.contact-form textarea {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  min-height: 52px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--accent); }

.contact-form textarea { min-height: 140px; }

.contact-form .submit-btn {
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0a08;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  min-height: 56px;
  align-self: flex-start;
}

.contact-form .submit-btn:hover { opacity: 0.88; }

.contact-success {
  display: none;
  background: var(--surface);
  border-radius: 14px;
  padding: 32px 28px;
  text-align: center;
}

.contact-success .success-icon { font-size: 40px; margin-bottom: 14px; }
.contact-success h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.contact-success p { font-size: 15px; color: var(--text-dim); margin: 0; }


/* ══════════════════════════════════════════════
   MOBILE RESPONSIVE — shared across all pages
   ══════════════════════════════════════════════ */

/* ── Topbar ── */
@media (max-width: 768px) {
  .topbar {
    padding: 0 16px;
    min-height: 52px;
  }
  .brand-logo-img { height: 28px; }

  /* Nav links hide on mobile */
  .nav-links { display: none !important; }

  /* Lang select compact */
  .lang-select {
    min-height: 36px;
    font-size: 13px;
    padding: 0 8px;
  }

  /* Logout button smaller */
  .btn-logout {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ── Login page ── */
@media (max-width: 480px) {
  .login-wrap {
    padding: 28px 20px 24px;
    margin: 0 16px;
    border-radius: 16px;
  }
  .login-legal {
    white-space: normal !important;
    text-overflow: unset !important;
    overflow: visible !important;
    font-size: 11px;
    line-height: 1.5;
  }
  .login-form input,
  .login-form button {
    font-size: 15px;
  }
}

/* ── Legal pages (privacy / terms) ── */
@media (max-width: 600px) {
  .legal-wrap {
    padding: 28px 20px;
    margin: 0 16px;
  }
  .legal-wrap h1 { font-size: 24px; }
  .legal-wrap h2 { font-size: 17px; }
  .legal-wrap p, .legal-wrap li { font-size: 14px; }
}

/* ── Contact page ── */
@media (max-width: 600px) {
  .contact-wrap {
    padding: 28px 20px;
    margin: 0 16px;
  }
  .contact-wrap h1 { font-size: 24px; }
  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    font-size: 15px;
  }
}

/* ── How-to page ── */
@media (max-width: 768px) {
  .howto-body { padding: 24px 16px; }
  .howto-body h1 { font-size: 26px; }
  .howto-body h2 { font-size: 20px; }
  .howto-body p, .howto-body li { font-size: 15px; }
}

/* ── App (app.html) search / playlist / player ── */
@media (max-width: 640px) {
  .view { padding: 0 8px; }

  /* Search results grid → 1 column */
  .grid {
    grid-template-columns: 1fr !important;
  }

  /* Song cards full width */
  .song-card { width: 100%; }

  /* Player controls stack */
  .player-controls {
    flex-direction: column;
    gap: 8px;
  }

  /* Lyrics font smaller */
  .lyrics-line { font-size: 18px !important; }
  .lyrics-line.active { font-size: 22px !important; }

  /* Modal full-width */
  .modal-inner {
    width: calc(100vw - 32px) !important;
    max-width: 100% !important;
    margin: 16px;
  }
}

/* ── Site footer ── */
@media (max-width: 600px) {
  .site-footer {
    padding: 24px 20px;
    text-align: center;
  }
  .site-footer .footer-cols {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  .site-footer .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
  }
  .footer-copy { display: block; margin-top: 16px; }
}

/* ── Language visibility (used by all pages that load style.css) ── */
[data-lang] { display: none !important; }
html[data-current-lang="en"]    [data-lang="en"],
html[data-current-lang="zh-TW"] [data-lang="zh-TW"],
html[data-current-lang="zh-CN"] [data-lang="zh-CN"] { display: revert !important; }
