/* ============================================================
   devuandoru.com — shared stylesheet
   iOS 4 skeuomorphic. Everything is built from the same 4-layer
   recipe the system used on app icons back then:
     1. vertical colour gradient (light top -> dark bottom)
     2. gloss: top ~52%, white 0.5 -> 0.12, elliptical bottom edge
     3. bevel: inset 1px white top, inset dark bottom
     4. lift: outer drop shadow + 1px dark edge
   ============================================================ */

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

body {
  min-height: 100vh;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #15151a;
  background-image:
    radial-gradient(120% 55% at 50% -8%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(100% 60% at 50% 108%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 65%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.028) 0px, rgba(255,255,255,0.028) 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 5px);
  background-attachment: fixed;
  padding-bottom: 92px; /* room for the tab bar */
}

/* ── STATUS BAR ── */
.status-bar {
  height: 20px;
  background: linear-gradient(to bottom, #2a2a30 0%, #0d0d10 55%, #000 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 2px rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; font-size: 11px; font-weight: 600;
  color: #fff; letter-spacing: 0.02em; text-shadow: 0 -1px 0 rgba(0,0,0,0.9);
  position: relative; z-index: 5;
}
.status-icons { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.sig { display: flex; align-items: flex-end; gap: 1px; height: 12px; }
.sig span { width: 3px; background: #fff; border-radius: 1px; box-shadow: 0 1px 0 rgba(0,0,0,0.7); }
.sig span:nth-child(1) { height: 3px; }
.sig span:nth-child(2) { height: 5px; }
.sig span:nth-child(3) { height: 7px; }
.sig span:nth-child(4) { height: 9px; }
.sig span:nth-child(5) { height: 11px; }
.battery { width: 22px; height: 11px; border: 1.5px solid rgba(255,255,255,0.75); border-radius: 2.5px; position: relative; display: flex; align-items: center; padding: 1.5px; }
.battery::after { content:''; position:absolute; right:-4px; top:50%; transform:translateY(-50%); width:2px; height:5px; background:rgba(255,255,255,0.75); border-radius:0 1px 1px 0; }
.battery-fill { height:100%; width:78%; background:linear-gradient(to bottom,#fff,#c8c8cc); border-radius:1px; }

/* ── NAV BAR ── */
.nav-bar {
  height: 44px;
  background: linear-gradient(to bottom, #55555c 0%, #43434a 48%, #33333a 49%, #232328 100%);
  border-bottom: 1px solid #08080a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 2px 5px rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 4;
}
.nav-title { font-size: 17px; font-weight: 700; color: #fff; text-shadow: 0 -1px 1px rgba(0,0,0,0.75); letter-spacing: -0.3px; position: relative; z-index: 2; }
.nav-bar::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 49%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.14) 100%);
  pointer-events:none;
}
/* back chevron button */
.nav-back {
  position: absolute; left: 8px; top: 7px; z-index: 3;
  display: flex; align-items: center; gap: 3px;
  height: 30px; padding: 0 11px 0 8px;
  border-radius: 5px; text-decoration: none;
  background: linear-gradient(to bottom, #63636b 0%, #4c4c54 48%, #3c3c44 49%, #2b2b32 100%);
  border: 1px solid rgba(0,0,0,0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 1px 2px rgba(0,0,0,0.6);
  font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 -1px 1px rgba(0,0,0,0.7);
}
.nav-back:active { filter: brightness(0.82); box-shadow: inset 0 2px 4px rgba(0,0,0,0.55); }

/* ── CONTENT ── */
.content { padding: 20px 14px 0; max-width: 480px; margin: 0 auto; position: relative; z-index: 1; }

/* ============================================================
   THE APP-TILE RECIPE — shared by row icons and sidebar apps
   ============================================================ */
.row-icon, .ios-app {
  position: relative; overflow: hidden;
  background-color: #3a3a44;
  background-repeat: no-repeat;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.6),
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -2px 3px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(0,0,0,0.22);
}
/* layer 2 — the gloss, with its elliptical lower edge */
.row-icon::before, .ios-app::before {
  content:''; position:absolute; left:0; right:0; top:0; height:52%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.28) 55%, rgba(255,255,255,0.12) 100%);
  border-radius: inherit;
  border-bottom-left-radius: 100% 60%;
  border-bottom-right-radius: 100% 60%;
  pointer-events:none; z-index: 3;
}
/* layer 2b — hotspot, sells the curvature */
.row-icon::after, .ios-app::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(75% 45% at 50% -8%, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 70%);
  pointer-events:none; z-index: 4;
}
/* the silhouette sits above the gloss, like a real icon */
.row-icon > svg, .ios-app > svg {
  position: relative; z-index: 5;
  filter: drop-shadow(0 -1px 0 rgba(0,0,0,0.45)) drop-shadow(0 1px 0 rgba(255,255,255,0.22));
}

/* ── PROFILE CARD ── */
.profile-card {
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(to bottom, #43434a 0%, #35353c 50%, #24242a 100%);
  border: 1px solid rgba(0,0,0,0.65);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.75),
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -2px 4px rgba(0,0,0,0.45);
  margin-bottom: 20px; position: relative;
}
.profile-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.03) 100%);
  border-radius: 14px 14px 100% 100% / 14px 14px 22% 22%;
  z-index:2; pointer-events:none;
}
.pfp-row { display: flex; align-items: flex-end; gap: 0; position: relative; }
.pfp-main {
  width: 130px; height: 130px; flex-shrink:0;
  overflow: hidden; position: relative;
  background: linear-gradient(135deg, #2a2a3a, #1a1a24);
  box-shadow: inset -1px 0 0 rgba(0,0,0,0.5), inset 0 0 22px rgba(0,0,0,0.45);
}
.pfp-main img {
  width:100%; height:100%; object-fit:cover; object-position: top center;
  filter: brightness(0.92) contrast(1.06); display:block;
}
.pfp-main::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(160deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 45%);
  pointer-events:none;
}
.pfp-main.no-photo { display: flex; align-items: center; justify-content: center; font-size: 52px; }
.pfp-info { flex:1; padding: 14px 14px 14px 12px; position: relative; z-index: 3; }
.pfp-name { font-size: 18px; font-weight: 700; color: #fff; text-shadow: 0 -1px 1px rgba(0,0,0,0.8), 0 1px 3px rgba(0,0,0,0.6); letter-spacing: -0.3px; margin-bottom: 4px; }
.pfp-handle { font-size: 12px; color: rgba(255,255,255,0.45); text-shadow: 0 -1px 0 rgba(0,0,0,0.6); }
.pfp-bio { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.45; margin-top: 8px; text-shadow: 0 -1px 0 rgba(0,0,0,0.6); }
.pfp-badge {
  display: inline-block; margin-top: 10px; padding: 3px 11px; border-radius: 999px; position: relative; overflow: hidden;
  background: linear-gradient(to bottom, #6aa9f9 0%, #3f80e4 48%, #2f6fd4 49%, #1f57b4 100%);
  border: 1px solid rgba(0,0,0,0.45);
  box-shadow: 0 2px 5px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 2px rgba(0,0,0,0.3);
  font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 -1px 1px rgba(0,0,0,0.45);
}
.pfp-badge::before {
  content:''; position:absolute; left:0; right:0; top:0; height:50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.45), rgba(255,255,255,0.12));
  border-radius: 999px 999px 100% 100% / 999px 999px 60% 60%; pointer-events:none;
}

/* ── SECTION HEADERS ── */
.section-header {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0 6px 8px; text-shadow: 0 -1px 1px rgba(0,0,0,0.8);
  display: flex; align-items: baseline; justify-content: space-between;
}
.section-header a { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35); text-decoration: none; text-transform: none; letter-spacing: 0; }

/* ── PHOTO GRID ── */
.photo-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 11px; padding: 4px; margin-bottom: 22px;
}
.photo-grid .ph {
  aspect-ratio: 1; overflow: hidden; position: relative;
  background: #1e1e24; border-radius: 22.5%; border: none; padding: 0; cursor: pointer;
  box-shadow:
    0 2px 3px rgba(0,0,0,0.6),
    0 6px 14px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -2px 4px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0,0,0,0.55);
}
.photo-grid .ph img {
  width:100%; height:100%; object-fit:cover; object-position: top center; display:block;
  filter: brightness(0.88) saturate(0.85) contrast(1.05);
}
.photo-grid .ph::after {
  content:''; position:absolute; top:0; left:0; right:0; height:52%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 100%);
  border-radius: 22.5% 22.5% 100% 100% / 22.5% 22.5% 55% 55%;
  pointer-events:none; z-index: 2;
}
.photo-grid .ph:active { filter: brightness(0.78); }

/* ── TABLE / LIST ── */
.table {
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.75);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.6),
    0 1px 2px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.16);
  margin-bottom: 22px;
}
.row {
  display: flex; align-items: center; min-height: 46px;
  padding: 0 14px; background: linear-gradient(to bottom, #43434a 0%, #3a3a41 50%, #2f2f36 100%);
  border-bottom: 1px solid rgba(0,0,0,0.55);
  text-decoration: none; gap: 10px; position: relative;
}
.row:last-child { border-bottom: none; }
.row:not(:last-child)::after { content:''; position:absolute; bottom:0; left:0; right:0; height:1px; background:rgba(255,255,255,0.09); }
.row::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.02) 50%, rgba(0,0,0,0.08) 100%);
  pointer-events:none;
}
.row-icon {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size: 16px;
  background-size: cover; background-position: center;
  z-index:1;
}
.row-label { flex:1; font-size: 14px; color: #fff; font-weight: 500; text-shadow: 0 -1px 1px rgba(0,0,0,0.7); position:relative; z-index:1; }
.row-sub { font-size: 12px; color: rgba(255,255,255,0.35); position:relative; z-index:1; }
.row-arrow { color: rgba(255,255,255,0.3); font-size: 15px; font-weight: 300; text-shadow: 0 -1px 0 rgba(0,0,0,0.7); position:relative; z-index:1; }
.row-num {
  width: 20px; text-align: center; flex-shrink:0; position:relative; z-index:1;
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.3);
  text-shadow: 0 -1px 0 rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.08);
}
.row:active { filter: brightness(0.8); }
.row-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width:0; position: relative; z-index: 1; }
.row-body .row-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.conn-stat { font-size: 11px; color: rgba(255,255,255,0.32); text-shadow: 0 -1px 0 rgba(0,0,0,0.6); }
.conn-stat strong { color: rgba(255,255,255,0.68); font-weight: 600; }

/* ── BUTTON ── */
.gloss-btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  padding: 13px; border-radius: 10px;
  background: linear-gradient(to bottom, #6aa9f9 0%, #4285e4 48%, #2f6fd4 49%, #1d54ae 100%);
  border: 1px solid rgba(0,0,0,0.65);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.55),
    0 1px 2px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -2px 3px rgba(0,0,0,0.28);
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.2px;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.5); position: relative; overflow: hidden; margin-bottom: 22px;
}
.gloss-btn::after {
  content:''; position:absolute; top:0; left:0; right:0; height:52%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.32), rgba(255,255,255,0.08));
  border-radius: 10px 10px 100% 100% / 10px 10px 40% 40%;
  pointer-events:none;
}
.gloss-btn:active { filter: brightness(0.86); box-shadow: inset 0 3px 6px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.5); }
.gloss-btn + .gloss-btn { margin-top: -12px; }
.gloss-btn.discord { background: linear-gradient(to bottom,#8a9df0 0%,#6a7fdc 48%,#5266c6 49%,#3c4fae 100%); }
.gloss-btn.dark { background: linear-gradient(to bottom,#55555e 0%,#42424a 48%,#35353c 49%,#232329 100%); }

/* ── FOOTER ── */
.foot-note { text-align: center; padding: 10px 14px 0; font-size: 11px; color: rgba(255,255,255,0.15); line-height: 1.6; text-shadow: 0 -1px 0 rgba(0,0,0,0.6); }
.foot-note a { color: rgba(255,255,255,0.2); text-decoration: none; }

/* ── NOW PLAYING CARD ── */
.spotify-card {
  display: block; text-decoration: none;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(to bottom, #253826 0%, #1d2b1e 50%, #141a15 100%);
  border: 1px solid rgba(0,0,0,0.7);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.7),
    0 1px 2px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -2px 4px rgba(0,0,0,0.4);
  margin-bottom: 20px; position: relative;
}
.spotify-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.11) 0%, rgba(255,255,255,0.01) 100%);
  border-radius: 14px 14px 100% 100% / 14px 14px 22% 22%;
  pointer-events:none;
}
.spotify-inner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; position: relative; z-index: 2; }
.spotify-icon-wrap { filter: drop-shadow(0 -1px 0 rgba(0,0,0,0.6)) drop-shadow(0 1px 1px rgba(255,255,255,0.12)); }
.spotify-art {
  width: 58px; height: 58px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.25), 0 0 0 1px rgba(0,0,0,0.6);
}
.spotify-meta { flex: 1; min-width: 0; }
.spotify-badge { font-size: 9px; font-weight: 700; color: #1db954; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 4px; margin-bottom: 4px; text-shadow: 0 -1px 0 rgba(0,0,0,0.7); }
.spotify-dot { width: 5px; height: 5px; border-radius: 50%; background: #1db954; box-shadow: 0 0 6px rgba(29,185,84,0.9); animation: spulse 1.2s ease-in-out infinite; }
@keyframes spulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.7)} }
.spotify-song { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 -1px 1px rgba(0,0,0,0.7); }
.spotify-artist { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 -1px 0 rgba(0,0,0,0.6); }

/* ── ALBUM ART THUMB (charts) ── */
.art-thumb {
  width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
  background: #14141a; position: relative; z-index: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 1px rgba(0,0,0,0.55);
}

/* ── TEXT CARD ── */
.note {
  border-radius: 12px; padding: 16px;
  background: linear-gradient(to bottom, #3e3e45 0%, #34343b 50%, #26262c 100%);
  border: 1px solid rgba(0,0,0,0.7);
  box-shadow:
    0 5px 14px rgba(0,0,0,0.6),
    0 1px 2px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -2px 4px rgba(0,0,0,0.35);
  margin-bottom: 22px; position: relative; overflow: hidden;
}
.note::before {
  content:''; position:absolute; top:0; left:0; right:0; height:50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.09), rgba(255,255,255,0));
  border-radius: 12px 12px 100% 100% / 12px 12px 20% 20%; pointer-events:none;
}
.note p { font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.72); position: relative; z-index: 1; text-shadow: 0 -1px 1px rgba(0,0,0,0.6); }
.note p + p { margin-top: 12px; }
.note strong { color: #fff; font-weight: 600; }
.note a { color: #79b0ff; text-decoration: none; }

/* ── TAG PILLS ── */
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.tag {
  padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; position: relative; overflow: hidden;
  color: rgba(255,255,255,0.78); text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
  background: linear-gradient(to bottom, #47474f, #2c2c33);
  border: 1px solid rgba(0,0,0,0.7);
  box-shadow: 0 2px 4px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.24), inset 0 -1px 2px rgba(0,0,0,0.3);
}
.tag::before {
  content:''; position:absolute; left:0; right:0; top:0; height:50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.22), rgba(255,255,255,0.04));
  border-radius: 999px 999px 100% 100% / 999px 999px 60% 60%; pointer-events:none;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(60% 60% at 50% 45%, rgba(20,20,26,0.94), rgba(0,0,0,0.97));
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 82vh; border-radius: 8px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,255,255,0.09), inset 0 1px 0 rgba(255,255,255,0.2);
}
.lightbox-close, .lightbox-nav {
  position: absolute; cursor: pointer; color: #fff;
  background: linear-gradient(to bottom, #4d4d55, #26262c);
  border: 1px solid rgba(0,0,0,0.75);
  box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 2px rgba(0,0,0,0.4);
  text-shadow: 0 -1px 1px rgba(0,0,0,0.7);
}
.lightbox-close { top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 42px; height: 56px; border-radius: 9px; font-size: 22px; line-height: 1; }
.lightbox-nav.prev { left: 10px; }
.lightbox-nav.next { right: 10px; }
.lightbox-close:active, .lightbox-nav:active { filter: brightness(0.8); box-shadow: inset 0 2px 5px rgba(0,0,0,0.6); }

/* ── TAB BAR ── */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  height: 49px; display: flex; align-items: stretch;
  background: linear-gradient(to bottom, #43434b 0%, #2f2f36 49%, #232329 50%, #131317 100%);
  border-top: 1px solid #000;
  box-shadow:
    0 -3px 12px rgba(0,0,0,0.75),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.6);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: rgba(255,255,255,0.45); position: relative;
  font-size: 10px; font-weight: 600; letter-spacing: 0.01em; text-shadow: 0 -1px 1px rgba(0,0,0,0.85);
}
.tab svg, .tab span { position: relative; z-index: 2; }
.tab svg { width: 23px; height: 23px; fill: currentColor; filter: drop-shadow(0 -1px 0 rgba(0,0,0,0.8)) drop-shadow(0 1px 0 rgba(255,255,255,0.14)); }
.tab.active { color: #8dbcff; }
.tab.active::before {
  /* pill stays icon-sized instead of stretching across a wide desktop tab */
  content:''; position:absolute; top:3px; bottom:3px; left:50%; transform:translateX(-50%);
  width: 84px; max-width: calc(100% - 14px); border-radius: 8px;
  background: linear-gradient(to bottom, rgba(130,180,255,0.3) 0%, rgba(60,110,210,0.14) 50%, rgba(20,50,110,0.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -2px 4px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.07);
  z-index: 1;
}
.tab:active { filter: brightness(1.35); }

/* ── iOS 4 SIDEBARS (decorative, desktop only) ── */
.ios-sidebar { display: none; }
@media (min-width: 760px) {
  .ios-sidebar {
    position: fixed; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 12px;
    z-index: 3;
  }
  .ios-sidebar.left  { left: 20px; }
  .ios-sidebar.right { right: 20px; }
  /* each tile is a real link now: dimmed at rest, lit on hover, pressed on click */
  .ios-app-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; opacity: 0.55; border-radius: 12px;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }
  .ios-app-wrap:hover, .ios-app-wrap:focus-visible { opacity: 1; transform: translateY(-2px); }
  .ios-app-wrap:active { opacity: 1; transform: translateY(0) scale(0.94); }
  .ios-app-wrap:active .ios-app { filter: brightness(0.82); }
  .ios-app {
    width: 54px; height: 54px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow:
      0 2px 3px rgba(0,0,0,0.7),
      0 6px 14px rgba(0,0,0,0.6),
      inset 0 1px 0 rgba(255,255,255,0.6),
      inset 0 -3px 5px rgba(0,0,0,0.45),
      inset 0 0 0 1px rgba(0,0,0,0.3);
  }
  .ios-app-lbl {
    font-size: 10px; color: rgba(255,255,255,0.78); letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.95); text-align: center;
    font-weight: 500; max-width: 58px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
}

/* ── 404 ── */
/* fills the space between nav bar and tab bar so short pages don't sit at the top */
.content.center-screen {
  min-height: calc(100vh - 205px); /* status 20 + nav 44 + tab bar 49 + body padding 92 */
  display: flex; flex-direction: column; justify-content: center;
}
.big-emoji { text-align: center; font-size: 64px; padding: 26px 0 10px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7)); }
.big-title { text-align: center; font-size: 20px; font-weight: 700; color: #fff; text-shadow: 0 -1px 1px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.6); }
.big-sub { text-align: center; font-size: 13px; color: rgba(255,255,255,0.4); margin: 8px 0 22px; text-shadow: 0 -1px 0 rgba(0,0,0,0.7); }

/* ── watermark ── */
.wm { position: fixed; bottom: 56px; right: 12px; font-size: 9px; color: #1a1a1a; text-decoration: none; letter-spacing: 0.05em; z-index: 98; transition: color 0.2s; }
.wm:hover { color: #444; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   DETAIL PASS — texture, hairlines, letterpress, sticky chrome
   ============================================================ */

/* film grain over the whole screen; sits under the lightbox */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 500; pointer-events: none;
  opacity: 0.055; mix-blend-mode: overlay;
  background-size: 170px 170px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='170' height='170' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* status bar wifi fan */
.wifi { width: 15px; height: 11px; fill: #fff; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.8)); }

/* nav bar gets a seam of light down each side, like brushed metal */
.nav-bar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, rgba(0,0,0,0.28) 100%);
}

/* section headers: letterpressed, with a hairline rule running off the text */
.section-header {
  text-shadow: 0 -1px 1px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.07);
  position: relative;
}

/* chevrons pick up a lit lower edge */
.row-arrow { text-shadow: 0 -1px 0 rgba(0,0,0,0.85), 0 1px 0 rgba(255,255,255,0.13); }

/* tab bar: hairline dividers between tabs */
.tab + .tab::after {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0) 100%);
  box-shadow: 1px 0 0 rgba(255,255,255,0.055);
}

/* ============================================================
   CAMERA ROLL
   ============================================================ */
.content.roll { padding-top: 14px; }

.album-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.65);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  margin-bottom: 14px;
}
.album-thumb {
  width: 58px; height: 58px; border-radius: 5px; overflow: hidden; flex-shrink: 0; position: relative;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.7), 0 5px 12px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 1px rgba(0,0,0,0.7);
}
.album-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; filter: brightness(0.9) contrast(1.05); }
.album-thumb::after {
  content:''; position:absolute; left:0; right:0; top:0; height:50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0));
  border-radius: 5px 5px 100% 100% / 5px 5px 40% 40%;
}
.album-title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px; text-shadow: 0 -1px 1px rgba(0,0,0,0.85), 0 1px 0 rgba(255,255,255,0.07); }
.album-sub { font-size: 11.5px; color: rgba(255,255,255,0.38); margin-top: 3px; text-shadow: 0 -1px 0 rgba(0,0,0,0.7); }

/* one group per day, header sticks while you scroll it */
.roll-group { margin-bottom: 18px; }
.roll-header, .day-header {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  height: 26px; padding: 0 10px; margin: 0 -4px 7px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #4b4b53 0%, #3a3a42 48%, #33333a 49%, #26262c 100%);
  border: 1px solid rgba(0,0,0,0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.45),
    0 2px 5px rgba(0,0,0,0.55);
}
.roll-date {
  font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,0.88);
  text-shadow: 0 -1px 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.09);
  letter-spacing: 0.01em;
}
.roll-tally { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35); text-shadow: 0 -1px 0 rgba(0,0,0,0.75); }

/* the grid itself — tight squares, the way the roll actually looked */
.roll-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.roll-grid .ph {
  aspect-ratio: 1; position: relative; overflow: hidden; cursor: pointer;
  border: none; padding: 0; border-radius: 3px; background: #101014;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.75),
    inset 0 0 0 1px rgba(255,255,255,0.09),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.roll-grid .ph img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block;
  filter: brightness(0.9) saturate(0.9) contrast(1.04);
}
/* glass sheen across the top third */
.roll-grid .ph::after {
  content:''; position:absolute; left:0; right:0; top:0; height:42%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.08) 60%, rgba(255,255,255,0) 100%);
  border-radius: 3px 3px 100% 100% / 3px 3px 55% 55%;
  pointer-events: none;
}
.roll-grid .ph:active { filter: brightness(1.25); }
.roll-grid .ph:active::after { opacity: 0.4; }

.roll-foot {
  text-align: center; padding: 4px 0 18px;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.3);
  text-shadow: 0 -1px 1px rgba(0,0,0,0.85), 0 1px 0 rgba(255,255,255,0.05);
}

@media (min-width: 520px) {
  .roll-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ── lightbox caption bar ── */
.lightbox-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(to bottom, rgba(20,20,24,0.6) 0%, rgba(0,0,0,0.9) 100%);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px; color: rgba(255,255,255,0.75); text-shadow: 0 -1px 1px rgba(0,0,0,0.9);
}
.lightbox-caption .lb-date { font-weight: 600; }
.lightbox-caption .lb-index { color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; }

/* ============================================================
   DEEP PASS — interaction, materials, loading states
   ============================================================ */

/* ── authentic row selection: iOS turned the whole cell blue ── */
.row:active {
  filter: none;
  background-image: linear-gradient(to bottom, #62a4f8 0%, #3d84e6 48%, #2c6fd2 49%, #1b57b4 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.35);
}
.row:active .row-label,
.row:active .row-arrow,
.row:active .row-num,
.row:active .conn-stat,
.row:active .conn-stat strong { color: #fff; text-shadow: 0 -1px 1px rgba(0,0,0,0.4); }
.row:active::after { background: rgba(0,0,0,0.25); }

/* ── keyboard focus, since everything here is a link ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(130,180,255,0.95);
  outline-offset: 2px; border-radius: 5px;
}

/* ── nav bar deepens its shadow once the content scrolls under it ── */
.nav-bar { transition: box-shadow 0.18s ease; }
body.scrolled .nav-bar {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 5px 14px rgba(0,0,0,0.85);
}

/* ── push / pop transitions between pages ── */
@keyframes pushIn   { from { transform: translateX(100%); opacity: 0.35; } to { transform: none; opacity: 1; } }
@keyframes pushOut  { from { transform: none; opacity: 1; } to { transform: translateX(-26%); opacity: 0; } }
@keyframes popIn    { from { transform: translateX(-26%); opacity: 0.35; } to { transform: none; opacity: 1; } }
@keyframes popOut   { from { transform: none; opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
body.page-in   .content { animation: pushIn  0.26s cubic-bezier(0.22,0.61,0.36,1) both; }
body.page-out  .content { animation: pushOut 0.22s cubic-bezier(0.55,0.06,0.68,0.19) both; }
body.page-back-in  .content { animation: popIn  0.26s cubic-bezier(0.22,0.61,0.36,1) both; }
body.page-back-out .content { animation: popOut 0.22s cubic-bezier(0.55,0.06,0.68,0.19) both; }
/* nav title crossfades with the page, like a real push */
@keyframes titleIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
body.page-in .nav-title, body.page-back-in .nav-title { animation: titleIn 0.3s ease both; }

/* ── the pinwheel, drawn spoke by spoke ── */
.spinner { position: relative; display: inline-block; width: 18px; height: 18px; vertical-align: -4px; }
.spinner i {
  position: absolute; left: 50%; top: 50%; width: 2px; height: 5px; margin: -8px 0 0 -1px;
  border-radius: 1px; background: rgba(255,255,255,0.9);
  transform-origin: 1px 8px; animation: spoke 1s linear infinite;
}
@keyframes spoke { to { opacity: 0.12; } }
.spinner i:nth-child(1)  { transform: rotate(0deg);   animation-delay: -1.000s; }
.spinner i:nth-child(2)  { transform: rotate(30deg);  animation-delay: -0.917s; }
.spinner i:nth-child(3)  { transform: rotate(60deg);  animation-delay: -0.833s; }
.spinner i:nth-child(4)  { transform: rotate(90deg);  animation-delay: -0.750s; }
.spinner i:nth-child(5)  { transform: rotate(120deg); animation-delay: -0.667s; }
.spinner i:nth-child(6)  { transform: rotate(150deg); animation-delay: -0.583s; }
.spinner i:nth-child(7)  { transform: rotate(180deg); animation-delay: -0.500s; }
.spinner i:nth-child(8)  { transform: rotate(210deg); animation-delay: -0.417s; }
.spinner i:nth-child(9)  { transform: rotate(240deg); animation-delay: -0.333s; }
.spinner i:nth-child(10) { transform: rotate(270deg); animation-delay: -0.250s; }
.spinner i:nth-child(11) { transform: rotate(300deg); animation-delay: -0.167s; }
.spinner i:nth-child(12) { transform: rotate(330deg); animation-delay: -0.083s; }

/* ── skeleton rows while a chart loads ── */
.skel-row { pointer-events: none; }
.skel-block {
  position: relative; overflow: hidden; border-radius: 4px;
  background: rgba(255,255,255,0.055);
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.4);
}
.skel-block::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.11) 50%, rgba(255,255,255,0) 80%);
  transform: translateX(-100%); animation: sweep 1.35s ease-in-out infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }
.skel-icon { width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; }
.skel-line { height: 10px; }
.skel-line.short { width: 42%; }
.skel-line.tiny { height: 8px; width: 26%; margin-top: 6px; opacity: 0.7; }

.load-note {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: rgba(255,255,255,0.4); text-shadow: 0 -1px 0 rgba(0,0,0,0.7);
}

/* ── lightbox: lock the page behind it, and hint the swipe ── */
html.lb-open, html.lb-open body { overflow: hidden; }
.lightbox img { touch-action: pan-y; user-select: none; -webkit-user-drag: none; }

/* ── linen behind the content column on wide screens ── */
@media (min-width: 760px) {
  body {
    background-image:
      radial-gradient(120% 55% at 50% -8%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 60%),
      radial-gradient(100% 60% at 50% 108%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 65%),
      repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 4px),
      repeating-linear-gradient(-45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 4px),
      repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0px, rgba(0,0,0,0.16) 1px, transparent 1px, transparent 3px);
  }
  /* the column reads as a device screen sitting on that linen */
  .content {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.55), 0 0 40px 8px rgba(0,0,0,0.45);
    background: rgba(255,255,255,0.012);
    padding-left: 16px; padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-in .content, body.page-out .content,
  body.page-back-in .content, body.page-back-out .content,
  body.page-in .nav-title, body.page-back-in .nav-title { animation: none !important; }
  .skel-block::after { animation: none !important; }
}

/* ============================================================
   HOME — the deep pass
   ============================================================ */

/* a slow specular sweep across the profile card, like light moving over glass */
.card-sheen {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
  border-radius: 14px;
}
.card-sheen::before {
  content: ''; position: absolute; top: -60%; bottom: -60%; width: 38%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-180%) rotate(8deg);
  animation: sheen 9s ease-in-out 2s infinite;
}
@keyframes sheen {
  0%   { transform: translateX(-180%) rotate(8deg); }
  18%  { transform: translateX(420%)  rotate(8deg); }
  100% { transform: translateX(420%)  rotate(8deg); }
}

/* glass over the avatar: hard highlight top-left, soft falloff */
.pfp-glass {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(158deg, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0.07) 34%, rgba(255,255,255,0) 52%),
    radial-gradient(140% 70% at 50% 118%, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 60%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.09), inset 0 -1px 0 rgba(0,0,0,0.5);
}

/* the card sits on a shelf — a thin reflected lip under the bottom edge */
.card-shelf {
  position: absolute; left: 8%; right: 8%; bottom: -7px; height: 7px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.07), rgba(255,255,255,0));
  border-radius: 0 0 40% 40% / 0 0 100% 100%;
  filter: blur(1px); pointer-events: none;
}

.pfp-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pfp-badge.slate {
  background: linear-gradient(to bottom, #55555f 0%, #43434c 48%, #3a3a42 49%, #2a2a31 100%);
  color: rgba(255,255,255,0.8);
}

/* ── now playing: equaliser instead of a made-up progress bar ── */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 13px; margin-top: 8px; }
.eq[hidden] { display: none; }
.eq i {
  width: 3px; height: 100%; border-radius: 1px; transform-origin: bottom;
  background: linear-gradient(to top, #0d7f37 0%, #1db954 55%, #3ee87f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 1px 2px rgba(0,0,0,0.6);
  animation: eqbar 0.9s ease-in-out infinite;
}
.eq i:nth-child(1) { animation-delay: -0.05s; }
.eq i:nth-child(2) { animation-delay: -0.38s; }
.eq i:nth-child(3) { animation-delay: -0.62s; }
.eq i:nth-child(4) { animation-delay: -0.21s; }
.eq i:nth-child(5) { animation-delay: -0.79s; }
@keyframes eqbar { 0%, 100% { transform: scaleY(0.28); } 50% { transform: scaleY(1); } }

/* album art with its reflection, the way a cover sat on a shelf */
.art-wrap { position: relative; flex-shrink: 0; display: block; }
.art-wrap[hidden] { display: none; }
.art-mirror {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); height: 60%;
  background-size: cover; background-position: center bottom;
  transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 72%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 72%);
  border-radius: 8px; opacity: 0.55; pointer-events: none;
}

/* ── recently played: a strip of covers with reflections ── */
/* minmax(0,1fr) not 1fr: a 1fr column's automatic minimum is its content's
   min-content width, and the captions are white-space:nowrap — one long
   track title would otherwise blow its own column out and squash the rest */
.cover-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; padding: 2px; margin-bottom: 18px; align-items: start;
}
.cover-strip[hidden] { display: none; }
.cover {
  display: block; text-decoration: none; position: relative; min-width: 0;
}
.cover-art {
  display: block;                       /* a bare span is inline; aspect-ratio needs a block */
  position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  background: #14141a center/cover no-repeat;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.7), 0 6px 14px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.28), 0 0 0 1px rgba(0,0,0,0.65);
}
.cover-art::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.26), rgba(255,255,255,0));
  border-radius: 6px 6px 100% 100% / 6px 6px 50% 50%;
}
/* the reflection sits in flow under the cover: mirrored bottom slice, faded out.
   The mask is authored bottom-up because scaleY(-1) flips it along with the paint. */
.cover-reflect {
  display: block; margin-top: 2px; aspect-ratio: 1 / 0.42;
  background-size: cover; background-position: center bottom;
  transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0) 80%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0) 80%);
  border-radius: 6px; opacity: 0.5; pointer-events: none;
}
.cover-cap {
  display: block; margin-top: 7px; font-size: 10px; line-height: 1.25;
  color: rgba(255,255,255,0.42); text-shadow: 0 -1px 0 rgba(0,0,0,0.75);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cover:active .cover-art { filter: brightness(1.2); }

/* ── photo preview: the last tile carries the count, like an album stack ── */
.photo-grid.stacked .ph:last-child::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0) 55%);
}
.ph-count {
  position: absolute; right: 7px; bottom: 6px; z-index: 4;
  min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.28), rgba(255,255,255,0.12));
  border: 1px solid rgba(0,0,0,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 1px 3px rgba(0,0,0,0.7);
  font-size: 11px; font-weight: 700; color: #fff; text-align: center;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
}

@media (prefers-reduced-motion: reduce) {
  .card-sheen::before, .eq i { animation: none !important; }
  .eq i { transform: scaleY(0.7); }
}

/* ============================================================
   MUSIC — the deep pass
   ============================================================ */

/* the now-playing card runs bigger on its own page */
.np-hero .spotify-inner { padding: 15px 16px; gap: 14px; }
.np-hero .spotify-art { width: 74px; height: 74px; border-radius: 9px; }
.np-hero .spotify-song { font-size: 15.5px; }
.np-hero .spotify-artist { font-size: 12.5px; }
.np-hero .art-mirror { border-radius: 9px; }
.np-hero .eq { height: 15px; }
.np-hero .eq i { width: 4px; }

/* ── engraved stat plate ── */
.stat-plate {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-radius: 10px; overflow: hidden; margin-bottom: 22px; position: relative;
  background: linear-gradient(to bottom, #3f3f47 0%, #35353c 50%, #26262c 100%);
  border: 1px solid rgba(0,0,0,0.75);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -2px 4px rgba(0,0,0,0.4);
}
.stat-plate::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0));
  border-radius: 10px 10px 100% 100% / 10px 10px 22% 22%; pointer-events: none;
}
.stat-cell {
  padding: 12px 8px 11px; text-align: center; position: relative; z-index: 1;
}
.stat-cell + .stat-cell {
  border-left: 1px solid rgba(0,0,0,0.55);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.06);
}
.stat-num {
  display: block; font-size: 17px; font-weight: 700; color: #fff;
  letter-spacing: -0.4px; font-variant-numeric: tabular-nums;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.1);
}
.stat-lbl {
  display: block; margin-top: 3px; font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: rgba(255,255,255,0.33); text-shadow: 0 -1px 0 rgba(0,0,0,0.8);
}

/* ── play-count meter behind each chart row ── */
/* a bar along the bottom edge, not a wash across the row — a full-height tint
   reads as the blue selection state and fights with the label */
.row-meter {
  position: absolute; left: 0; bottom: 0; height: 3px; z-index: 2; pointer-events: none;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(to bottom, #7cb8ff 0%, #4b8ae8 45%, #2f6fd4 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 -1px 2px rgba(0,0,0,0.55);
}
.row:active .row-meter { background: linear-gradient(to bottom, #fff, #cfe0ff); }

/* ── day dividers in the scrobble history, same bar as the camera roll ── */
.day-header .roll-date { font-size: 11.5px; }
.day-group { margin-bottom: 16px; }
.day-group .table { margin-bottom: 0; }

/* live row gets a green rail down its left edge */
.row.is-live::before {
  background: linear-gradient(to bottom, rgba(29,185,84,0.16) 0%, rgba(29,185,84,0.04) 100%);
}
.row.is-live { box-shadow: inset 3px 0 0 #1db954; }

/* ============================================================
   ABOUT — the deep pass
   ============================================================ */

.id-plate {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; margin-bottom: 20px; border-radius: 14px; position: relative;
  background: linear-gradient(to bottom, #43434a 0%, #35353c 50%, #24242a 100%);
  border: 1px solid rgba(0,0,0,0.65);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.75), 0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -2px 4px rgba(0,0,0,0.45);
}
.id-plate::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.14), rgba(255,255,255,0.02));
  border-radius: 14px 14px 100% 100% / 14px 14px 22% 22%; pointer-events: none;
}

/* the site mark as an app tile, built from the same recipe as the icons */
.monogram {
  width: 62px; height: 62px; border-radius: 14px; flex-shrink: 0; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; z-index: 2;
  background: linear-gradient(to bottom, #6aa9f9 0%, #3d7fe0 48%, #2a68c8 49%, #1e56b0 100%);
  box-shadow:
    0 2px 3px rgba(0,0,0,0.7), 0 6px 14px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -3px 5px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(0,0,0,0.3);
}
.monogram::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 52%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.14) 100%);
  border-radius: 14px 14px 100% 100% / 14px 14px 60% 60%; z-index: 2;
}
.monogram-letter {
  position: relative; z-index: 3;
  font-size: 36px; font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.3);
}
.id-meta { position: relative; z-index: 2; min-width: 0; }
.id-name {
  font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.3px;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.6);
}
.id-handle {
  margin-top: 3px; font-size: 12px; color: rgba(255,255,255,0.42);
  text-shadow: 0 -1px 0 rgba(0,0,0,0.7);
}

/* the bio panel reads as stamped into the metal rather than raised off it */
.note.engraved {
  background: linear-gradient(to bottom, #2a2a30 0%, #303036 60%, #38383f 100%);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.7), inset 0 -1px 0 rgba(255,255,255,0.09),
    0 1px 0 rgba(255,255,255,0.05);
}
.note.engraved::before { display: none; }
.note.engraved p { text-shadow: 0 -1px 1px rgba(0,0,0,0.85), 0 1px 0 rgba(255,255,255,0.05); }

/* engraved signature, hairlines running out to both edges */
.wordmark {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 2px 6px; user-select: none;
}
.wordmark::before, .wordmark::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0) 100%);
  box-shadow: 0 1px 0 rgba(0,0,0,0.6);
}
.wordmark span {
  font-size: 12px; font-weight: 700; letter-spacing: 0.28em; text-transform: lowercase;
  color: rgba(255,255,255,0.2);
  text-shadow: 0 -1px 1px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.08);
}

/* ── skip link, for anyone driving this from the keyboard ── */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 10px 16px; border-radius: 0 0 8px 0;
  background: linear-gradient(to bottom, #4285e4, #1d54ae);
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.7);
}
.skip-link:focus { left: 0; }

/* recency line under each cover in the home strip */
.cover-when {
  display: block; margin-top: 2px; font-size: 9.5px;
  color: rgba(255,255,255,0.28); text-shadow: 0 -1px 0 rgba(0,0,0,0.75);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cover-when.live { color: #1db954; font-weight: 600; }

/* the most recent cover runs big — the rest sit small beside it, top-aligned */
.cover.hero .cover-art {
  border-radius: 8px;
  box-shadow:
    0 3px 6px rgba(0,0,0,0.75), 0 10px 22px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.32), 0 0 0 1px rgba(0,0,0,0.7);
}
.cover.hero .cover-art::after { border-radius: 8px 8px 100% 100% / 8px 8px 50% 50%; }
.cover.hero .cover-reflect { border-radius: 8px; opacity: 0.58; }
.cover.hero .cover-cap {
  margin-top: 9px; font-size: 12.5px; font-weight: 700;
  color: rgba(255,255,255,0.78); letter-spacing: -0.2px;
}
.cover-artist {
  display: block; margin-top: 1px; font-size: 10.5px;
  color: rgba(255,255,255,0.38); text-shadow: 0 -1px 0 rgba(0,0,0,0.75);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cover.hero .cover-when { font-size: 10px; }

/* ============================================================
   THE iOS SWITCH — the one control the site was missing
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.switch { position: relative; z-index: 1; flex-shrink: 0; cursor: pointer; display: block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.switch-track {
  display: block; position: relative; width: 78px; height: 28px; border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(to bottom, #2a2a30 0%, #3a3a42 60%, #45454e 100%);
  border: 1px solid rgba(0,0,0,0.8);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.75),
    inset 0 -1px 0 rgba(255,255,255,0.1),
    0 1px 0 rgba(255,255,255,0.07);
  transition: background 0.18s ease;
}
/* the blue fill slides in from the left with the knob */
.switch-track::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, #64a6f7 0%, #3a7fe0 48%, #2b6bcd 49%, #1f57b2 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.35), inset 0 -1px 0 rgba(255,255,255,0.25);
  transform: translateX(-100%); transition: transform 0.18s ease;
}
.switch input:checked + .switch-track::before { transform: translateX(0); }

.switch-on, .switch-off {
  position: absolute; top: 0; line-height: 28px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  transition: opacity 0.18s ease;
}
.switch-on {
  left: 10px; color: #fff; opacity: 0;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.45);
}
.switch-off {
  right: 11px; color: rgba(255,255,255,0.45); opacity: 1;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.8);
}
.switch input:checked + .switch-track .switch-on { opacity: 1; }
.switch input:checked + .switch-track .switch-off { opacity: 0; }

.switch-knob {
  position: absolute; top: 1px; left: 1px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(to bottom, #ffffff 0%, #f2f2f4 48%, #e2e2e6 49%, #cfcfd4 100%);
  border: 1px solid rgba(0,0,0,0.55);
  box-shadow: 0 1px 3px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.95);
  transition: transform 0.18s cubic-bezier(0.3, 0.9, 0.4, 1);
}
.switch input:checked + .switch-track .switch-knob { transform: translateX(48px); }
.switch input:focus-visible + .switch-track { outline: 2px solid rgba(130,180,255,0.95); outline-offset: 2px; }
.switch input:active + .switch-track .switch-knob { filter: brightness(0.94); }

/* grouped-table footer text, the way iOS explained a group under it */
.table-foot {
  margin: -14px 6px 22px; font-size: 11.5px; line-height: 1.5;
  color: rgba(255,255,255,0.3); text-shadow: 0 -1px 1px rgba(0,0,0,0.8);
}

/* ── what the switches actually do ── */
:root.opt-dim body, html.opt-dim body { background-color: #0c0c0f; }
html.opt-dim .content { filter: none; }
html.opt-no-sidebars .ios-sidebar { display: none !important; }
html.opt-reduce-motion *,
html.opt-reduce-motion *::before,
html.opt-reduce-motion *::after { animation: none !important; transition: none !important; }
html.opt-reduce-motion .eq i { transform: scaleY(0.7); }

/* ============================================================
   MUSIC CONTROLS — segmented switch, search field, refresh, pull
   ============================================================ */

/* ── segmented control ── */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  margin: 0 0 20px; border-radius: 7px; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.8);
  box-shadow: 0 2px 6px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.16);
}
.seg {
  position: relative; height: 32px; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 700; letter-spacing: -0.1px; color: rgba(255,255,255,0.7);
  text-shadow: 0 -1px 1px rgba(0,0,0,0.8);
  background: linear-gradient(to bottom, #4a4a53 0%, #3b3b43 48%, #33333a 49%, #26262c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.seg + .seg { border-left: 1px solid rgba(0,0,0,0.75); box-shadow: inset 1px 0 0 rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.2); }
.seg:active { filter: brightness(0.85); }
.seg.is-on {
  color: #fff;
  background: linear-gradient(to bottom, #4d86e0 0%, #3a6fc9 48%, #2d5db2 49%, #204a95 100%);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), inset 0 -1px 0 rgba(255,255,255,0.18);
}

/* ── search field ── */
.search-bar {
  position: relative; display: flex; align-items: center; margin: -4px 0 14px;
}
.search-bar .search-icon {
  position: absolute; left: 9px; width: 14px; height: 14px;
  fill: rgba(255,255,255,0.35); pointer-events: none; z-index: 2;
}
.search-bar input {
  width: 100%; height: 32px; padding: 0 30px 0 29px;
  border-radius: 16px; border: 1px solid rgba(0,0,0,0.8);
  background: linear-gradient(to bottom, #232329 0%, #2d2d34 65%, #37373f 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.07);
  color: #fff; font-size: 13px; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.search-bar input::placeholder { color: rgba(255,255,255,0.3); }
.search-bar input:focus { outline: none; box-shadow: inset 0 2px 4px rgba(0,0,0,0.7), 0 0 0 2px rgba(130,180,255,0.5); }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 7px; z-index: 2;
  width: 19px; height: 19px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.5); background: rgba(255,255,255,0.22);
  color: #1a1a1f; font-size: 11px; line-height: 1; font-weight: 700;
}

/* ── nav bar action button ── */
.nav-action {
  position: absolute; right: 8px; top: 7px; z-index: 3;
  width: 32px; height: 30px; border-radius: 5px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, #63636b 0%, #4c4c54 48%, #3c3c44 49%, #2b2b32 100%);
  border: 1px solid rgba(0,0,0,0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.6);
}
.nav-action svg { width: 17px; height: 17px; fill: #fff; filter: drop-shadow(0 -1px 0 rgba(0,0,0,0.6)); }
.nav-action:active { filter: brightness(0.82); box-shadow: inset 0 2px 4px rgba(0,0,0,0.55); }
.nav-action.spinning svg { animation: navspin 0.8s linear infinite; }
@keyframes navspin { to { transform: rotate(-360deg); } }

/* ── pull to refresh ── */
.ptr {
  height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: rgba(255,255,255,0.38); font-size: 12px; font-weight: 600;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.85);
  transition: height 0.2s ease;
}
.ptr-arrow { display: inline-block; transition: transform 0.2s ease; }
.ptr.ready { color: rgba(255,255,255,0.7); }
.ptr.ready .ptr-arrow { transform: rotate(180deg); }
.ptr.ready .ptr-label::after { content: ' — release'; }

/* ── album covers, three across ── */
.cover-strip.albums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cover-strip.albums .cover-cap { margin-top: 8px; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,0.6); }
.skel-cover { display: block; aspect-ratio: 1; border-radius: 6px; }

/* red badge, the iOS unread pill */
.app-badge {
  position: absolute; top: -6px; right: -6px; z-index: 6;
  min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, #ff6a5e 0%, #e8352a 48%, #d21d13 49%, #a80f08 100%);
  border: 1.5px solid rgba(255,255,255,0.92);
  box-shadow: 0 2px 4px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.45);
  font-size: 11px; font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 -1px 1px rgba(0,0,0,0.45);
}
/* the badge has to escape the tile's rounded clip */
@media (min-width: 760px) {
  .ios-app { overflow: visible; }
  .ios-app::before { border-radius: 12px 12px 100% 100% / 12px 12px 60% 60%; overflow: hidden; }
}
