/* KurdLabs Radio — Spotify-style dark UI, YouTube-style search */
:root {
  --bg: #121212;
  --bg2: #0a0a0a;
  --surface: #181818;
  --card: #1f1f1f;
  --card-hover: #2a2a2a;
  --border: #282828;
  --border-light: #3e3e3e;
  --green: #1db954;
  --green-bright: #1ed760;
  --accent: var(--green);
  --kl-blue: #3b82f6;
  --kl-cyan: #22d3ee;
  --red: #ff4e45;
  --amber: #f59e0b;
  --text: #ffffff;
  --sub: #a7a7a7;
  --muted: #6a6a6a;
  --progress-bg: #4d4d4d;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --grad: linear-gradient(135deg, var(--kl-blue), var(--kl-cyan));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
input { font: inherit; }
::-webkit-scrollbar { display: none; }
svg { display: block; }

/* ════ Login ════ */
.login-view {
  position: relative;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, #1f2937 0%, var(--bg2) 55%);
}
.login-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 20% -10%, rgba(59, 130, 246, 0.22), transparent 70%),
    radial-gradient(500px 400px at 90% 110%, rgba(29, 185, 84, 0.12), transparent 70%);
  pointer-events: none;
}
.login-card {
  position: relative;
  width: 100%; max-width: 360px;
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: rise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.login-logo { text-align: center; margin-bottom: 28px; }
.logo-mark {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #06121f;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35);
}
.logo-mark svg { width: 40px; height: 40px; }
.login-logo h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.login-logo h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub { color: var(--sub); font-size: 13px; margin-top: 6px; }
.login-card input {
  width: 100%; margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.2s;
}
.login-card input:focus { outline: none; border-color: var(--green); }
.login-card button {
  width: 100%; padding: 14px;
  border-radius: 100px;
  background: var(--green);
  color: #000;
  font-weight: 800; font-size: 15px;
  transition: transform 0.1s, background 0.2s;
}
.login-card button:active { transform: scale(0.98); background: var(--green-bright); }
.login-error { margin-top: 14px; color: var(--red); font-size: 13px; text-align: center; }

/* ════ App layout ════ */
.app-view { display: flex; flex-direction: column; height: 100dvh; }
.content {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(16px + var(--safe-top)) 16px 24px;
}
.tab-panel { animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-title { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 16px; }
.section-title { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; margin: 22px 0 12px; }

/* Home header */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.greeting { font-size: 13px; color: var(--sub); font-weight: 500; }
.greeting-name { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; text-transform: capitalize; }

/* Icon buttons */
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--sub);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: var(--card-hover); color: var(--text); }
.icon-btn.big svg { width: 28px; height: 28px; }
.icon-btn.big { width: 52px; height: 52px; color: var(--text); }
.icon-btn.mode { color: var(--muted); }
.icon-btn.mode.on { color: var(--green); }
.icon-btn.faved { color: var(--green); }

/* ════ Recently played — Spotify tile grid ════ */
.recent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.recent-tile {
  display: flex; align-items: center; gap: 10px;
  background: #ffffff12;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  height: 52px;
  transition: background 0.15s;
}
.recent-tile:active { background: #ffffff24; }
.recent-tile img { width: 52px; height: 52px; object-fit: cover; flex-shrink: 0; background: var(--card); }
.recent-tile .rt-title {
  font-size: 12px; font-weight: 700;
  padding-right: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ════ Spotify-style track rows ════ */
.song-list { display: flex; flex-direction: column; }
.song-row {
  display: flex; align-items: center; gap: 12px;
  border-radius: 6px;
  padding: 7px 8px;
  cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.song-row:active { background: var(--card-hover); }
.song-rank {
  width: 22px;
  text-align: center;
  font-size: 15px; font-weight: 700;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.song-row.playing .song-rank { color: var(--green); }
.song-thumb-wrap { position: relative; flex-shrink: 0; }
.song-thumb {
  width: 48px; height: 48px;
  border-radius: 4px; object-fit: cover;
  background: var(--card);
  display: block;
}
/* animated equalizer overlay on the playing row */
.eq {
  position: absolute; inset: 0;
  display: none;
  align-items: flex-end; justify-content: center; gap: 2.5px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  padding-bottom: 10px;
}
.song-row.playing .eq { display: flex; }
.eq i { width: 3.5px; background: var(--green-bright); border-radius: 2px; animation: eqbar 0.9s ease-in-out infinite; }
.eq i:nth-child(1) { height: 11px; animation-delay: 0s; }
.eq i:nth-child(2) { height: 18px; animation-delay: 0.22s; }
.eq i:nth-child(3) { height: 8px; animation-delay: 0.46s; }
@keyframes eqbar { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.15); } }
.song-row.playing.paused .eq i { animation-play-state: paused; }

.song-info { flex: 1; min-width: 0; }
.song-title {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-row.playing .song-title { color: var(--green-bright); }
.song-sub { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.song-time { font-size: 12.5px; color: var(--sub); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.song-more { color: var(--muted); }
.song-more:active { color: var(--text); }

/* ════ YouTube-style search results ════ */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 16px; padding: 2px 16px;
}
.chip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px; font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s, filter 0.15s;
}
.chip:active { transform: scale(0.95); filter: brightness(1.2); }

.yt-list { display: flex; flex-direction: column; gap: 18px; }
.yt-card { cursor: pointer; user-select: none; }
.yt-thumb-wrap { position: relative; }
.yt-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--card);
  display: block;
}
.yt-card:active .yt-thumb { filter: brightness(1.15); }
.yt-duration {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.yt-playing-badge {
  position: absolute; left: 8px; bottom: 8px;
  display: none;
  align-items: center; gap: 5px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--green-bright);
  font-size: 12px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
}
.yt-card.playing .yt-playing-badge { display: flex; }
.yt-card.playing .yt-thumb { box-shadow: 0 0 0 2.5px var(--green); }
.yt-meta { display: flex; gap: 12px; margin-top: 10px; align-items: flex-start; }
.yt-texts { flex: 1; min-width: 0; }
.yt-title {
  font-size: 15px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-card.playing .yt-title { color: var(--green-bright); }
.yt-channel { font-size: 12.5px; color: var(--sub); margin-top: 4px; }

/* Library head */
.lib-head { display: flex; align-items: baseline; justify-content: space-between; }
.lib-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.search-bar.slim { margin-bottom: 10px; }
.search-bar.slim input { padding: 10px 0; font-size: 16px; }
#popular-sentinel { height: 1px; }

/* Search bar */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #ffffff14;
  border: 1px solid transparent;
  border-radius: 100px;
  padding: 0 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.search-bar:focus-within { background: #ffffff1f; border-color: var(--border-light); }
.search-ico { color: var(--sub); display: flex; }
.search-ico svg { width: 18px; height: 18px; }
.search-bar input {
  flex: 1; padding: 13px 0;
  background: none; border: none;
  color: var(--text); font-size: 16px;
}
.search-bar input:focus { outline: none; }
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-bar input::placeholder { color: var(--muted); }

/* Segmented control — Spotify chip style */
.segmented { display: flex; gap: 8px; margin-bottom: 16px; }
.seg-btn {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  background: #ffffff12;
  transition: all 0.2s;
}
.seg-btn.active { background: var(--green); color: #000; font-weight: 700; }

/* skeleton shimmer */
.skel-row { display: flex; gap: 12px; padding: 7px 8px; align-items: center; }
.skel { background: var(--card); border-radius: 4px; position: relative; overflow: hidden; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel-thumb { width: 48px; height: 48px; flex-shrink: 0; }
.skel-lines { flex: 1; }
.skel-line { height: 12px; border-radius: 6px; margin-bottom: 8px; }
.skel-line.short { width: 55%; margin-bottom: 0; }
.skel-yt { width: 100%; aspect-ratio: 16/9; border-radius: 14px; margin-bottom: 18px; }

.empty-state { color: var(--muted); text-align: center; padding: 48px 20px; font-size: 14px; }
.empty-ico { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--border-light); }
.empty-ico svg { width: 100%; height: 100%; }

/* ════ Mini player — Spotify bar ════ */
.miniplayer {
  flex-shrink: 0;
  margin: 0 8px 8px;
  background: #292929;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: rise 0.3s ease;
  position: relative;
}
.mini-inner { display: flex; align-items: center; gap: 10px; padding: 7px 10px 9px 8px; }
.mini-thumb { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; background: var(--card); }
.mini-meta { flex: 1; min-width: 0; }
.mini-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-channel { font-size: 11.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mini-fav, .mini-play, .mini-next { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; color: var(--text); flex-shrink: 0; }
.mini-fav { color: var(--sub); }
.mini-fav.faved { color: var(--green); }
.mini-fav svg { width: 20px; height: 20px; }
.mini-play svg, .mini-next svg { width: 24px; height: 24px; }
.mini-progress { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: #ffffff2e; border-radius: 1px; }
#mini-progress-fill { height: 100%; width: 0%; background: #fff; border-radius: 1px; transition: width 0.3s linear; }

/* ════ Bottom tabs — Spotify style ════ */
.tabbar {
  flex-shrink: 0;
  display: flex;
  background: linear-gradient(rgba(10, 10, 10, 0.88), #0a0a0a);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-bottom: var(--safe-bottom);
}
.tab-btn {
  flex: 1;
  color: var(--sub);
  font-size: 10.5px; font-weight: 500;
  padding: 10px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: color 0.15s;
}
.tab-ico { display: flex; }
.tab-ico svg { width: 23px; height: 23px; }
.tab-btn.active { color: #fff; font-weight: 700; }

/* ════ Now Playing — Spotify full screen ════ */
.nowplaying {
  position: fixed; inset: 0;
  z-index: 50;
  transform: translateY(102%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0.2, 1);
  display: flex; flex-direction: column;
  background: var(--bg);
  visibility: hidden;
}
.nowplaying.open { transform: translateY(0); visibility: visible; }
.np-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #3b82f6aa 0%, #12121200 55%), var(--bg);
  transition: background 0.6s ease;
  pointer-events: none;
}
.np-inner {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
  padding: calc(12px + var(--safe-top)) 26px calc(22px + var(--safe-bottom));
  max-width: 480px; margin: 0 auto; width: 100%;
}
.np-head { display: flex; align-items: center; justify-content: space-between; }
.np-head-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #ffffffd0; }
.np-art-wrap {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 20px 0;
}
.np-art-glow { display: none; }
.np-art {
  position: relative;
  width: 100%; max-width: 340px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7);
}
.np-titlerow { display: flex; align-items: center; gap: 8px; }
.np-titles { flex: 1; min-width: 0; }
.np-title { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-channel { font-size: 14.5px; color: var(--sub); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.np-seek { margin-top: 18px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  border-radius: 2px;
  background: var(--progress-bg);
  accent-color: #fff;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.np-times { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }

.np-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.np-play {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s;
}
.np-play:active { transform: scale(0.93); }
.np-play svg { width: 32px; height: 32px; }
.mode-badge { position: relative; }
.icon-btn.mode .badge1 {
  position: absolute;
  font-size: 8px; font-weight: 800;
  bottom: 6px; right: 6px;
  background: var(--green); color: #000;
  border-radius: 50%;
  width: 12px; height: 12px;
  display: flex; align-items: center; justify-content: center;
}

.np-extras { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.volume-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.vol-ico { color: var(--sub); display: flex; }
.vol-ico svg { width: 20px; height: 20px; }
.pill-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  color: var(--sub);
  font-size: 12.5px; font-weight: 600;
  transition: all 0.2s;
}
.pill-btn.on { border-color: var(--green); color: var(--green-bright); background: rgba(29, 185, 84, 0.12); }
.pill-ico { display: flex; }
.pill-ico svg { width: 15px; height: 15px; }

/* ════ Action sheet ════ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 60;
  animation: fadebd 0.2s ease;
}
@keyframes fadebd { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 61;
  background: #212121;
  border-radius: 16px 16px 0 0;
  padding: 10px 16px calc(18px + var(--safe-bottom));
  max-width: 480px; margin: 0 auto;
  animation: sheetup 0.28s cubic-bezier(0.3, 0.9, 0.3, 1);
}
@keyframes sheetup { from { transform: translateY(60%); opacity: 0.5; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--border-light); margin: 2px auto 12px; }
.sheet-song { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.sheet-song img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.sheet-song-meta { min-width: 0; }
.sheet-song-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-song-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }
.sheet-item {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 6px;
  font-size: 15px; font-weight: 500;
  border-radius: 10px;
  text-align: left;
}
.sheet-item:active { background: var(--card-hover); }
.sheet-item .si-ico { display: flex; color: var(--sub); }
.sheet-item .si-ico svg { width: 21px; height: 21px; }
.sheet-item.danger, .sheet-item.danger .si-ico { color: var(--red); }
.sheet-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  margin: 10px 0;
}
.sheet-input:focus { outline: none; border-color: var(--green); }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions button {
  flex: 1; padding: 13px;
  border-radius: 100px;
  font-weight: 700; font-size: 14px;
}
.sheet-cancel { background: var(--card-hover); color: var(--text); }
.sheet-confirm { background: var(--red); color: #fff; }

/* ════ Admin ════ */
.adduser-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.adduser-form input[type="text"] {
  flex: 1; min-width: 110px;
  padding: 11px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}
.adduser-form input[type="text"]:focus { outline: none; border-color: var(--green); }
.adduser-admin { color: var(--sub); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.adduser-form button {
  padding: 11px 22px;
  border-radius: 100px;
  background: var(--green); color: #000; font-weight: 800;
}
.users-list { display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600;
}
.user-row .badge {
  font-size: 10px; font-weight: 700; color: var(--amber);
  border: 1px solid var(--amber); border-radius: 6px;
  padding: 2px 7px; margin-left: 8px;
  letter-spacing: 0.5px;
}
.user-del { color: var(--red); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.user-del:active { background: rgba(255, 78, 69, 0.1); }
.unblock-btn {
  color: var(--green-bright); font-size: 13px; font-weight: 700;
  padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--green);
  flex-shrink: 0;
}
#blocked-list .song-thumb { width: 64px; height: 40px; border-radius: 6px; }

/* ════ Toast ════ */
.toast {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(150px + var(--safe-bottom));
  background: #f2f2f2;
  color: #121212;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  z-index: 100;
  max-width: 88vw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.25s ease;
}

@media (min-width: 700px) {
  .content > * { max-width: 640px; margin-left: auto; margin-right: auto; }
  .miniplayer { max-width: 640px; margin-left: auto; margin-right: auto; }
  .tabbar { justify-content: center; }
  .tab-btn { max-width: 110px; }
  .recent-grid { grid-template-columns: 1fr 1fr 1fr; }
}
