:root {
  --bg: #161617;
  --panel: #1f1f20;
  --row: #2a2a2b;
  --row-hover: #333335;
  --ink: #ffffff;
  --muted: #9b9b9e;
  --line: rgba(255, 255, 255, 0.08);
  --sans: "Poppins", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(90% 55% at 50% 0%, rgba(255,255,255,.06), transparent 70%), var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body.is-booting { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* splash */
.splash {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity .45s ease, visibility .45s ease;
}
.splash img { width: min(62vw, 260px); height: auto; }
.splash-bar { width: 90px; height: 1px; margin-top: 26px; overflow: hidden; background: rgba(255,255,255,.12); }
.splash-bar i { display: block; width: 40%; height: 100%; background: #fff; animation: bar 1s ease-in-out infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
body.is-ready .splash { opacity: 0; visibility: hidden; }

/* layout: always exactly one screen */
.app {
  height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  padding-top: env(safe-area-inset-top);
}
.deck { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.track {
  min-height: 0; display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; outline: none;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; min-width: 0; min-height: 0;
  scroll-snap-align: center; scroll-snap-stop: always;
  display: grid; place-items: center;
  padding: 14px 14px 4px;
}
.face {
  position: relative;
  width: min(100%, 430px); height: 100%; max-height: 780px;
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #232324, #18181a);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.8);
}

/* ---------- card ---------- */
.face-card { display: flex; flex-direction: column; padding: 0 20px 18px; }
.fc-glow {
  position: absolute; inset: -20% -20% auto; height: 60%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.09), transparent 70%);
  pointer-events: none;
}
.fc-head {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-top: 18px;
}
.fc-photo {
  width: clamp(96px, 22vh, 176px); height: auto; aspect-ratio: 1;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px #1c1c1d, 0 0 0 4px rgba(255,255,255,.35), 0 18px 40px rgba(0,0,0,.6);
}
.fc-name { margin: clamp(10px, 2.4vh, 20px) 0 0; line-height: 0; }
.fc-name img { width: min(72%, 280px); height: auto; margin: 0 auto; }
.fc-role {
  margin: clamp(8px, 1.6vh, 14px) 0 0;
  font-size: .62rem; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; color: #d6d6d8;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px;
}
.fc-role i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.4); }

.fc-social { position: relative; display: flex; justify-content: center; gap: 10px; margin: clamp(12px, 2.4vh, 20px) 0 0; }
.fc-social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--row); border: 1px solid var(--line);
  transition: background .15s ease, transform .15s ease;
}
.fc-social a:hover { background: var(--row-hover); }
.fc-social a:active { transform: scale(.95); }
.fc-social svg { width: 18px; height: 18px; }

.fc-lines { position: relative; list-style: none; margin: clamp(12px, 2.4vh, 20px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.fc-lines li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: clamp(7px, 1.3vh, 11px) 2px; border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.fc-lines span { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.fc-lines a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fc-cta { position: relative; margin-top: clamp(12px, 2.2vh, 18px); display: grid; gap: 10px; text-align: center; }
.fc-policies { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.fc-policies:hover { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  border: 0; border-radius: 12px; cursor: pointer;
  font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  transition: background .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-light { background: #fff; color: #111; }
.btn-light:hover { background: #e9e9ea; }
.btn-ghost { background: var(--row); border: 1px solid var(--line); color: #fff; }
.btn-ghost:hover { background: var(--row-hover); }

/* ---------- panels ---------- */
.face-panel { display: flex; flex-direction: column; padding: 22px 18px 18px; }
.eyebrow { margin: 0; font-size: .64rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.eyebrow-gap { margin-top: 14px; }
.face-panel h2 { margin: 2px 0 0; font-size: 1.8rem; font-weight: 300; letter-spacing: .02em; }

.rows {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; gap: 8px; min-height: 0;
}
.rows-7 { flex: 1 1 auto; grid-template-rows: repeat(7, minmax(0, 1fr)); max-height: 470px; }
.rows-3 { flex: 3 1 0; grid-template-rows: repeat(3, minmax(0, 1fr)); max-height: 200px; }
.rows-5 { flex: 5 1 0; grid-template-rows: repeat(5, minmax(0, 1fr)); max-height: 330px; }
.rows li { min-height: 0; }
.rows a {
  height: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px 0 16px;
  border-radius: 12px; background: var(--row); border: 1px solid rgba(255,255,255,.04);
  font-size: .9rem; font-weight: 400;
  transition: background .15s ease;
}
.rows a:hover { background: var(--row-hover); }
.chev { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }

/* pay */
.pay { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.pay a {
  display: flex; align-items: center; gap: 14px;
  min-height: clamp(54px, 9vh, 72px); padding: 0 16px;
  border-radius: 14px; background: var(--row); border: 1px solid rgba(255,255,255,.05);
  font-size: 1rem; transition: background .15s ease;
}
.pay a:hover { background: var(--row-hover); }
.pay a > svg:first-child { width: 22px; height: 22px; flex: 0 0 auto; }
.pay span { flex: 1 1 auto; }
.pay-cash > svg:first-child { color: #00d54b; }
.pay-paypal > svg:first-child { color: #4aa3ff; }
.pay-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; text-align: center; }
.pay-foot a { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 6px; }
.pay-foot a:hover { color: #fff; }

/* qr */
.face-qr { align-items: center; justify-content: center; text-align: center; }
.qr-box {
  width: min(76%, 290px, 38vh); width: min(76%, 290px, 38dvh); aspect-ratio: 1;
  margin: 20px auto 6px; padding: 14px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.3), 0 24px 50px -12px rgba(0,0,0,.8);
}
.qr-box svg { width: 100%; height: 100%; display: block; stroke: none; }
.note { margin: 8px 0 16px; color: var(--muted); font-size: .84rem; }

/* dots + dock */
.dots { display: flex; justify-content: center; gap: 7px; padding: 9px 0 10px; }
.dot { width: 6px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.2); transition: width .25s ease, background .25s ease; }
.dot.is-on { width: 20px; background: #fff; }

.dock {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(20, 20, 21, .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 50px; padding: 5px 2px;
  border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  color: rgba(255,255,255,.55); font-size: .66rem; letter-spacing: .04em;
  transition: background .15s ease, color .15s ease;
}
.action svg { width: 20px; height: 20px; }
.action:hover { color: #fff; }
.action.is-on { background: rgba(255,255,255,.09); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60; padding: 10px 16px; border-radius: 99px;
  background: #fff; color: #111; font-size: .85rem;
}

@media (min-width: 700px) {
  .app { max-width: 520px; margin: 0 auto; }
  .dock { border-radius: 18px 18px 0 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* short phones */
@media (max-height: 700px) {
  .slide { padding: 10px 12px 2px; }
  .dots { padding: 7px 0 8px; }
  .action { min-height: 44px; padding: 3px 2px; }
  .face-panel { padding: 16px 14px 14px; }
  .face-panel h2 { font-size: 1.5rem; }
  .rows { gap: 6px; margin-top: 8px; }
  .rows a { font-size: .84rem; border-radius: 10px; }
  .eyebrow-gap { margin-top: 10px; }
  .face-card { padding: 0 16px 14px; }
  .fc-social a { width: 38px; height: 38px; }
  .btn { min-height: 44px; padding: 10px 16px; }
  .note { margin: 6px 0 12px; }
}
@media (max-height: 600px) {
  .fc-lines li:nth-child(3) { display: none; }
  .fc-role { font-size: .56rem; letter-spacing: .2em; }
  .face-panel h2 { font-size: 1.3rem; }
  .pay a { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* center the list views vertically on tall phones */
#services .face-panel, #shop .face-panel { justify-content: center; }
.face-pay .pay { margin-top: auto; }
.face-pay .pay-foot { margin-top: auto; }
.rows-7 { max-height: 520px; }

/* ---------- QR view: download-app banner ---------- */
.face-qr { justify-content: flex-start; padding-bottom: 14px; }
.qr-main {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.qr-box { width: min(72%, 270px, 31vh); width: min(72%, 270px, 31dvh); margin-top: 16px; }

.app-banner {
  flex: 0 0 auto;
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f2f31, #232325);
  border: 1px solid rgba(255,255,255,.12);
  text-align: left;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.7);
}
.app-banner[hidden] { display: none; }
.app-banner img { width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.app-banner-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.app-banner-text strong { font-size: .92rem; font-weight: 600; }
.app-banner-text span { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.app-banner-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 99px;
  background: #fff; color: #111;
  font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
}
.app-banner-btn svg { width: 15px; height: 15px; stroke-width: 2; }
.app-banner-btn:active { transform: translateY(1px); }

/* iPhone how-to sheet */
.install-sheet { position: fixed; inset: 0; z-index: 70; display: grid; align-items: end; }
.install-sheet[hidden] { display: none; }
.install-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.install-panel {
  position: relative;
  width: min(100%, 460px); margin: 0 auto;
  padding: 22px 22px calc(20px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #222224; border: 1px solid var(--line);
  text-align: center;
  animation: sheet-up .25s ease;
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.install-panel img { width: 58px; height: 58px; border-radius: 14px; margin: 0 auto; }
.install-panel h3 { margin: 12px 0 6px; font-size: 1.1rem; font-weight: 500; }
.install-steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; text-align: left; display: grid; gap: 10px; }
.install-steps li {
  counter-increment: s;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .9rem; color: #e4e4e6;
}
.install-steps li::before {
  content: counter(s);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255,255,255,.1); font-size: .75rem;
}
.install-steps svg { width: 17px; height: 17px; color: #4aa3ff; }
.install-panel .btn { width: 100%; }

@media (max-height: 700px) {
  .qr-box { margin-top: 10px; padding: 10px; }
  .face-qr .note { margin: 6px 0 10px; font-size: .78rem; }
  .face-qr .btn-ghost { min-height: 40px; padding: 8px 14px; }
  .app-banner { padding: 8px; gap: 10px; }
  .app-banner img { width: 40px; height: 40px; }
}
@media (max-height: 600px) {
  .face-qr .note { display: none; }
  .app-banner-text span { display: none; }
}

/* services: 6 rows */
.rows-6 { flex: 1 1 auto; grid-template-rows: repeat(6, minmax(0, 1fr)); max-height: 450px; }

/* shop: 4 portfolio rows + 6 store rows */
.rows-4 { flex: 4 1 0; grid-template-rows: repeat(4, minmax(0, 1fr)); max-height: 268px; }
.rows-6s { flex: 6 1 0; grid-template-rows: repeat(6, minmax(0, 1fr)); max-height: 400px; }
#shop .rows { gap: 7px; }

/* slide-up link sheets (Beats, Music) */
.link-sheet { position: fixed; inset: 0; z-index: 70; display: grid; align-items: end; }
.link-sheet[hidden] { display: none; }
.link-panel {
  position: relative; width: min(100%, 460px); margin: 0 auto; max-height: 88vh; overflow: auto; overscroll-behavior: contain;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0; background: #222224; border: 1px solid var(--line);
  animation: sheet-up .28s cubic-bezier(.22, 1, .36, 1);
}
.link-panel .grab { display: block; width: 38px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: rgba(255,255,255,.22); }
.link-panel h3 { margin: 2px 0 14px; font-size: 1.45rem; font-weight: 300; letter-spacing: .02em; }
.sheet-label { margin: 16px 0 8px; font-size: .64rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.sheet-label em { font-style: normal; letter-spacing: .1em; text-transform: none; color: #8f8f94; margin-left: 4px; }
.sheet-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sheet-links a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--row); border: 1px solid rgba(255,255,255,.05); transition: background .15s ease; }
.sheet-links a:hover { background: var(--row-hover); }
.sl-icon { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.sl-icon svg { width: 24px; height: 24px; }
.sl-store { background: linear-gradient(135deg, #3a3a3e, #1b1b1d); }
.sl-yt { background: #e62117; }
.sl-spotify { background: #1db954; color: #0b0b0b; }
.sl-play { background: linear-gradient(135deg, #6a5cff, #2f6bff); }
.sl-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.sl-text strong { font-weight: 500; font-size: .95rem; }
.sl-text span { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted); }
.sheet-close { width: 100%; margin-top: 16px; }
@media (min-width: 700px) { .link-sheet { align-items: center; } .link-panel { border-radius: 22px; } }

/* music sheet: streaming service tiles */
.svc-grid { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.svc { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 9px; border-radius: 14px; background: var(--row); border: 1px solid rgba(255,255,255,.05); font-size: .66rem; text-align: center; line-height: 1.2; transition: background .15s ease; }
.svc:hover { background: var(--row-hover); }
.svc-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.svc-icon svg { width: 22px; height: 22px; }
.svc-spotify .svc-icon { background: #1db954; color: #0b0b0b; }
.svc-apple .svc-icon { background: linear-gradient(160deg, #fb5c74, #fa233b); }
.svc-ytm .svc-icon { background: #ff0000; }
.svc-deezer .svc-icon { background: linear-gradient(135deg, #a238ff, #ef5466); }

/* music sheet: folder tabs */
.folder-tabs { display: flex; gap: 4px; margin: 0 0 -1px; position: relative; z-index: 1; }
.folder-tabs button {
  position: relative; height: 38px; padding: 0 20px; border-radius: 12px 12px 0 0;
  background: #1a1a1b; border: 1px solid var(--line); border-bottom-color: transparent;
  color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  transition: color .15s ease, background .15s ease;
}
.folder-tabs button[aria-selected="true"] { background: #2a2a2c; color: #fff; border-color: rgba(255,255,255,.12); border-bottom-color: #2a2a2c; }
.folder-tabs button:not([aria-selected="true"]):hover { color: #d6d6d8; }
.folder-pane { padding: 4px 12px 14px; border-radius: 0 14px 14px 14px; background: #2a2a2c; border: 1px solid rgba(255,255,255,.12); }
.folder-pane[hidden] { display: none; }
.folder-pane .sheet-label:first-child { margin-top: 12px; }
.folder-pane .svc, .folder-pane .sheet-links a { background: #333336; }
.folder-pane .svc:hover, .folder-pane .sheet-links a:hover { background: #3b3b3e; }

/* playlist: now playing */
.np { margin-top: 12px; }
.np-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.np-video iframe, .np-video #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.np-start { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: #0b0b0b; transition: opacity .3s ease; }
.np-start picture, .np-start img { position: absolute; inset: 0; width: 100%; height: 100%; }
.np-start img { object-fit: cover; filter: blur(18px) brightness(.55); transform: scale(1.15); }
.np-start::before { content: ""; position: relative; z-index: 1; width: 46%; aspect-ratio: 1; max-height: 82%; background: var(--art) center / cover; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.np-start-btn { position: absolute; z-index: 2; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #111; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.np-start-btn svg { width: 24px; height: 24px; margin-left: 3px; }
.np.is-started .np-start { opacity: 0; pointer-events: none; }
.np-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.np-text { min-width: 0; display: flex; flex-direction: column; }
.np-text strong { font-size: 1rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-text span { font-size: .78rem; color: var(--muted); }
.np-ctrls { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.np-ctrls button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.np-ctrls button:hover { background: rgba(255,255,255,.08); }
.np-ctrls svg { width: 20px; height: 20px; }
.np-ctrls .np-play { width: 46px; height: 46px; background: #fff; color: #111; }
.np-ctrls .np-play:hover { background: #e9e9ea; }
.np-play .i-pause, .np.is-playing .np-play .i-play { display: none; }
.np.is-playing .np-play .i-pause { display: block; }
.np-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.np-bar input { flex: 1; height: 4px; accent-color: #fff; cursor: pointer; }
.pl-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px !important; }
.pl-head span:last-child { letter-spacing: .08em; text-transform: none; }

/* playlist: songs */
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.trk { width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 6px; border-radius: 12px; text-align: left; color: inherit; transition: background .15s ease; }
.trk:hover { background: rgba(255,255,255,.06); }
.trk.is-cur { background: rgba(255,255,255,.09); }
.trk-art { position: relative; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: #111; }
.trk-art img { width: 100%; height: 100%; object-fit: cover; }
.trk-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.trk-text strong { font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-text span { font-size: .74rem; color: var(--muted); }
.trk.is-cur .trk-text strong { color: #4aa3ff; }
.trk-dur { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.trk-eq { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 12px; background: rgba(0,0,0,.5); }
.trk-eq i { width: 4px; height: 8px; border-radius: 2px; background: #fff; animation: eq .9s ease-in-out infinite; }
.trk-eq i:nth-child(2) { animation-delay: -.3s; }
.trk-eq i:nth-child(3) { animation-delay: -.6s; }
.trk.is-playing .trk-eq { display: flex; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 20px; } }
@media (prefers-reduced-motion: reduce) { .trk-eq i { animation: none; height: 14px; } }
.trk, .np-ctrls button, .np-start, .folder-tabs button { font: inherit; border: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
.trk, .np-ctrls button:not(.np-play) { background: transparent; color: #fff; }
.folder-tabs button { border: 1px solid var(--line); }
.folder-tabs button[aria-selected="true"] { border-color: rgba(255,255,255,.12); border-bottom-color: #2a2a2c; }
.trk:hover { background: rgba(255,255,255,.06); }
.trk.is-cur { background: rgba(255,255,255,.09); }
.np-ctrls button:not(.np-play):hover { background: rgba(255,255,255,.08); }

/* music sheet v2: compact centered tabs, darker panel, scrolling song list */
.folder-tabs { justify-content: center; gap: 6px; margin: 0 0 12px; }
.folder-tabs button { height: 30px; padding: 0 16px; border-radius: 99px; font-size: .62rem; letter-spacing: .16em; background: transparent; border: 1px solid var(--line); }
.folder-tabs button[aria-selected="true"] { background: #fff; color: #111; border-color: #fff; }
.folder-pane { border-radius: 16px; background: #19191a; border-color: rgba(255,255,255,.07); }
.folder-pane .svc, .folder-pane .sheet-links a { background: #262628; }
.folder-pane .svc:hover, .folder-pane .sheet-links a:hover { background: #2e2e30; }
.np-video { background: #0d0d0e; }
.tracks { max-height: 232px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; margin-right: -4px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent); mask-image: linear-gradient(180deg, #000 88%, transparent); }
.tracks.at-end { -webkit-mask-image: none; mask-image: none; }
.tracks::-webkit-scrollbar { width: 6px; }
.tracks::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 3px; }
.tracks::-webkit-scrollbar-track { background: transparent; }
.tracks { position: relative; }
#pane-artists .svc-grid { margin-bottom: 4px; }
.pay-foot a .pf-sub { display: block; margin-top: 3px; font-size: .9em; letter-spacing: .1em; text-transform: none; color: #77777c; }
/* Artists tab blends into the slide-up (no inner box) */
#pane-artists { background: transparent; border: 0; padding: 0; }
#pane-artists .svc { background: var(--row); }
#pane-artists .svc:hover { background: var(--row-hover); }
#pane-artists .svc span:last-child { white-space: nowrap; }
/* Playlist selected: whole slide-up takes the darker playlist color */
.music-panel { transition: background-color .25s ease; }
.music-panel:has(#tab-playlist[aria-selected="true"]) { background: #19191a; }
.music-panel:has(#tab-playlist[aria-selected="true"]) #pane-playlist { border-color: transparent; padding-left: 0; padding-right: 0; }
.music-panel:has(#tab-playlist[aria-selected="true"]) .sheet-close { background: #232325; }
/* tab switch animation */
@keyframes pane-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes pane-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.folder-pane.pane-in-right { animation: pane-in-right .32s cubic-bezier(.22, 1, .36, 1); }
.folder-pane.pane-in-left { animation: pane-in-left .32s cubic-bezier(.22, 1, .36, 1); }
.folder-tabs button { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.link-panel { overflow-x: hidden; }

/* Short screens (e.g. phone turned sideways): the bottom nav stays fixed and
   each tab scrolls inside its own frame instead of squishing or cutting off. */
@media (max-height: 540px) {
  .face { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
  .face { height: 100%; justify-content: flex-start !important; }
  .face > * { flex-shrink: 0; }
  .face-qr .qr-main { flex: none; }
  .rows, .rows-3, .rows-4, .rows-5, .rows-6, .rows-6s, .rows-7 { flex: none; max-height: none; grid-template-rows: none; grid-auto-rows: 44px; }
  #shop .rows { gap: 6px; }
  .pay a { min-height: 50px; }
  .face-qr .qr-box { width: min(60%, 200px); }
  .dock { position: relative; z-index: 5; }
}
html { overflow-x: clip; } body { max-width: 100%; }

/* pull-down photo -> Division One logo */
.fc-flip { position: relative; width: clamp(96px, 22vh, 176px); aspect-ratio: 1; perspective: 900px; touch-action: pan-x; cursor: grab; -webkit-user-select: none; user-select: none; outline: none; border-radius: 50%; }
.fc-flip:focus-visible { box-shadow: 0 0 0 3px #4aa3ff; }
.fc-flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateY(var(--pull, 0px)) rotateX(calc(var(--pull, 0px) * -0.6deg)); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.fc-flip .fc-photo { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.fc-flip .fc-front { transform: rotateY(0deg); -webkit-user-drag: none; }
.fc-flip .fc-back { transform: rotateY(180deg); display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2a2a2c, #111 75%); }
.fc-flip .fc-back img { width: 74%; height: auto; -webkit-user-drag: none; }
.fc-flip.is-flipped .fc-front { transform: rotateY(-180deg); }
.fc-flip.is-flipped .fc-back { transform: rotateY(0deg); }
.fc-flip.is-armed .fc-photo { box-shadow: 0 0 0 3px #1c1c1d, 0 0 0 4px rgba(74,163,255,.9), 0 18px 40px rgba(0,0,0,.6); }

/* passcode sheet */
.pin-panel { text-align: center; }
.pin-logo { width: 64px; height: 64px; margin: 4px auto 8px; display: block; }
.pin-panel h3 { margin: 0; }
.pin-sub { margin: 4px 0 16px; color: var(--muted); font-size: .85rem; }
.pin-boxes { position: relative; display: flex; justify-content: center; gap: 12px; margin: 0 auto; cursor: text; }
.pin-box { width: 54px; height: 62px; border-radius: 14px; background: var(--row); border: 1px solid rgba(255,255,255,.08); display: grid; place-items: center; font-size: 1.6rem; color: #fff; transition: border-color .15s, background .15s; }
.pin-box.is-active { border-color: #4aa3ff; }
.pin-box.is-filled { background: #333336; }
.pin-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; color: transparent; caret-color: transparent; }
.pin-msg { min-height: 1.3em; margin: 12px 0 0; font-size: .82rem; color: #ff6b6b; }
.pin-sheet.is-error .pin-boxes { animation: pin-shake .4s ease; }
.pin-sheet.is-error .pin-box { border-color: #ff6b6b; }
@keyframes pin-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .fc-flip .fc-photo, .fc-flip-inner { transition: none; } .pin-sheet.is-error .pin-boxes { animation: none; } }
/* swipe-to-turn version: the whole photo turns like a card */
.fc-flip { touch-action: pan-y; cursor: grab; }
.fc-flip-inner { transform: rotateY(var(--spin, 0deg)); }
.fc-flip .fc-front, .fc-flip.is-flipped .fc-front { transform: rotateY(0deg); }
.fc-flip .fc-back, .fc-flip.is-flipped .fc-back { transform: rotateY(180deg); }
.fc-flip.is-armed .fc-photo { box-shadow: 0 0 0 3px #1c1c1d, 0 0 0 4px rgba(255,255,255,.35), 0 18px 40px rgba(0,0,0,.6); }

/* in-place passcode: card info fades out, boxes fade in and rise slowly */
.face-card { position: relative; }
.face-card .fc-name, .face-card .fc-role, .face-card .fc-social, .face-card .fc-lines, .face-card .fc-cta, .face-card .fc-glow {
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear 0s;
}
.face-card.is-locking .fc-name, .face-card.is-locking .fc-role, .face-card.is-locking .fc-social,
.face-card.is-locking .fc-lines, .face-card.is-locking .fc-cta {
  opacity: 0; transform: translateY(10px); visibility: hidden; pointer-events: none;
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.fc-pin { position: absolute; left: 0; right: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px;
  opacity: 0; transform: translateY(36px); transition: opacity 1.1s ease, transform 1.3s cubic-bezier(.16, 1, .3, 1); }
.fc-pin[hidden] { display: none; }
.fc-pin.is-in { opacity: 1; transform: none; }
.fc-pin-title { margin: 0 0 16px; font-size: .64rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.fc-pin .pin-boxes { position: relative; display: flex; justify-content: center; gap: 12px; cursor: text; }
.fc-pin .pin-box { width: 54px; height: 64px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.6rem; color: #fff; transition: border-color .2s, background .2s; }
.fc-pin .pin-box.is-active { border-color: rgba(255,255,255,.75); }
.fc-pin .pin-box.is-filled { background: rgba(255,255,255,.12); }
.fc-pin .pin-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; color: transparent; caret-color: transparent; background: transparent; }
.fc-pin .pin-msg { min-height: 1.3em; margin: 14px 0 0; font-size: .8rem; color: #ff6b6b; }
.fc-pin.is-error .pin-boxes { animation: pin-shake .4s ease; }
.fc-pin.is-error .pin-box { border-color: #ff6b6b; }
.fc-flip { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .fc-pin { transition: opacity .3s ease; transform: none; }
  .face-card .fc-name, .face-card .fc-role, .face-card .fc-social, .face-card .fc-lines, .face-card .fc-cta { transition: none; }
}
.fc-pin-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* Division One view: TCO smoky light + laser beam inside the card */
.d1-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; overflow: hidden; --beam: 140px; background: #000;
  opacity: 0; transition: opacity 2.4s ease-in-out; }
.d1-fx.is-on { opacity: 1; }
.d1-fx canvas, .d1-laser-content { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.d1-light { opacity: .78;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--beam) - 120px), transparent calc(100% - var(--beam) - 20px));
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--beam) - 120px), transparent calc(100% - var(--beam) - 20px)); }
.d1-laser { z-index: 2; }
.d1-laser-content { visibility: hidden; }
/* keep the logo and boxes above the light */
.face-card .fc-head, .face-card .fc-pin { position: relative; z-index: 3; }
.face-card .fc-pin { position: absolute; }
.face-card.is-locking .fc-glow { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .d1-fx { transition: opacity .3s ease; } }
/* code boxes over the light: dark glass with TCO gold edges */
.fc-pin .pin-box { background: rgba(6, 6, 6, .78); border-color: rgba(212, 180, 131, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f1dcb4; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.fc-pin .pin-box.is-active { border-color: #d4b483; box-shadow: 0 0 0 2px rgba(212, 180, 131, .18), 0 10px 30px rgba(0,0,0,.55); }
.fc-pin .pin-box.is-filled { background: rgba(20, 16, 10, .85); }
.face-card.is-locking .fc-flip .fc-back { box-shadow: 0 0 0 3px #000, 0 0 0 4px rgba(212, 180, 131, .45), 0 18px 40px rgba(0,0,0,.7); }
/* Division One: logo glides to the middle as the boxes rise */
.fc-flip { transition: transform 1.4s cubic-bezier(.16, 1, .3, 1); }
.face-card.is-gliding .fc-flip { transform: translateY(var(--glide, 0px)); }
@media (prefers-reduced-motion: reduce) { .fc-flip { transition: none; } }

/* Division One: full-screen takeover */
.face-card.is-full {
  position: fixed; z-index: 80; max-height: none;
  top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh;
  border-radius: 0; border-color: transparent; background: #000;
  transition: top .65s cubic-bezier(.65, 0, .35, 1), left .65s cubic-bezier(.65, 0, .35, 1),
              width .65s cubic-bezier(.65, 0, .35, 1), height .65s cubic-bezier(.65, 0, .35, 1),
              border-radius .65s ease, background-color .65s ease;
}
.face-card.is-full.is-full-start { top: var(--fx-top); left: var(--fx-left); width: var(--fx-w); height: var(--fx-h); border-radius: 22px; }
body.d1-mode .dock, body.d1-mode .dots { opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.dock, .dots { transition: opacity .45s ease; }
body.d1-mode { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .face-card.is-full { transition: none; } }
/* full-screen size change is animated in JS; only colour fades here */
.face-card.is-full { transition: background-color .65s ease; }

/* Division One: everything rises together above the keypad */
.face-card .fc-head { transform: translateY(var(--kb-logo, 0px)); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.fc-flip-inner { transform: rotateY(var(--spin, 0deg)) scale(var(--kb-scale, 1)); }
.face-card.kb-open .fc-flip-inner, .face-card .fc-flip-inner.kb-ease { transition: transform .5s cubic-bezier(.22, 1, .36, 1) !important; }
.fc-pin .pin-boxes, .fc-pin .pin-msg { transform: translateY(var(--kb-shift, 0px)); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.d1-fx { transform: translateY(var(--kb-shift, 0px)); transition: opacity 2.4s ease-in-out, transform .5s cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) {
  .face-card .fc-head, .fc-pin .pin-boxes, .fc-pin .pin-msg { transition: none; }
  .d1-fx { transition: opacity .3s ease; }
}
/* anti-jitter: the real typing field is parked at the very top of the screen (invisible),
   so phones never scroll the page to show it; the boxes just display what is typed */
.fc-pin .pin-input { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; font-size: 16px; }
.fc-pin .pin-boxes { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* passcode: 4 boxes, then 2 more slide in; all six shrink a little to fit */
.fc-pin .pin-boxes { gap: 12px; transition: gap .6s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1); }
.fc-pin .pin-box { transition: width .6s cubic-bezier(.22, 1, .36, 1), opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1), border-color .2s, background .2s; }
.fc-pin .pin-extra { width: 0; opacity: 0; transform: translateY(14px) scale(.85); border-width: 0; margin-left: -12px; overflow: hidden; }
.fc-pin.is-six .pin-boxes { gap: 8px; }
.fc-pin.is-six .pin-box { width: 44px; }
.fc-pin.is-six .pin-extra { width: 44px; opacity: 1; transform: none; border-width: 1px; margin-left: 0; transition-delay: 0s, .15s, .15s, 0s, 0s; }
.fc-pin.is-six .pin-extra + .pin-extra { transition-delay: 0s, .28s, .28s, 0s, 0s; }
/* access granted / locked */
.fc-pin.is-granted .pin-box { border-color: #d4b483; background: rgba(212, 180, 131, .16); box-shadow: 0 0 22px rgba(212, 180, 131, .35); }
.fc-pin.is-granted .pin-msg { color: #f1dcb4; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; }
.fc-pin.is-locked .pin-box { opacity: .35; border-color: rgba(255, 107, 107, .5); }
.fc-pin.is-locked .pin-boxes { cursor: not-allowed; }
@media (max-width: 340px) { .fc-pin.is-six .pin-box { width: 38px; } .fc-pin.is-six .pin-boxes { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .fc-pin .pin-box, .fc-pin .pin-boxes { transition: none; } }

/* Division One directory (after the right code) */
.fc-pin.is-hidden-for-dir { opacity: 0 !important; transform: translateY(-10px) !important; pointer-events: none; transition: opacity .45s ease, transform .45s ease !important; }
.d1-dir { position: absolute; left: 50%; z-index: 4; width: min(calc(100% - 40px), 360px); transform: translateX(-50%); display: grid; gap: 10px; }
.d1-dir-link { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; border-radius: 16px; text-decoration: none; color: #f1dcb4;
  background: rgba(6, 6, 6, .78); border: 1px solid rgba(212, 180, 131, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s ease calc(.25s + var(--i) * .09s), transform 1.1s cubic-bezier(.16, 1, .3, 1) calc(.25s + var(--i) * .09s), border-color .2s, background .2s; }
.d1-dir.is-in .d1-dir-link { opacity: 1; transform: none; }
.d1-dir-link:hover, .d1-dir-link:focus-visible { border-color: #d4b483; background: rgba(20, 16, 10, .9); outline: none; }
.d1-dir-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.d1-dir-text strong { font-weight: 500; font-size: .95rem; letter-spacing: .04em; }
.d1-dir-text span { font-size: .72rem; color: #a99e91; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d1-dir-link svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #d4b483; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .d1-dir-link { transition: opacity .3s ease; transform: none; } }

/* lighter rendering: canvases drawn at half size, scaled up 2x (glow stays soft, ~1/4 the GPU work) */
.d1-fx canvas { width: 50%; height: 50%; inset: auto; top: 0; left: 0; transform: scale(2); transform-origin: 0 0; }
.d1-light {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--beam-r, 70px) - 60px), transparent calc(100% - var(--beam-r, 70px) - 10px));
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--beam-r, 70px) - 60px), transparent calc(100% - var(--beam-r, 70px) - 10px));
}
.d1-dir { gap: 9px; } .d1-dir-link { min-height: 54px; }

/* Division One: log out at the bottom of the directory */
.d1-logout { justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 20px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .55); color: #c9c2b6; font: inherit; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s ease calc(.25s + var(--i) * .09s), transform 1.1s cubic-bezier(.16, 1, .3, 1) calc(.25s + var(--i) * .09s), color .2s, border-color .2s; }
.d1-dir.is-in .d1-logout { opacity: 1; transform: none; }
.d1-logout:hover, .d1-logout:focus-visible { color: #fff; border-color: rgba(255, 255, 255, .4); outline: none; }
.d1-logout:disabled { opacity: .5; cursor: default; }
.d1-logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d1-fx { transform: none !important; }

/* Division One admin: visitor count, Activity button, IP log / Contacts panel */
.d1-stats { display: flex; justify-content: center; gap: 22px; margin-bottom: 4px; color: #a99e91; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; transform: translateY(18px); transition: opacity .9s ease .2s, transform 1.1s cubic-bezier(.16, 1, .3, 1) .2s; }
.d1-dir.is-in .d1-stats { opacity: 1; transform: none; }
.d1-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.d1-stats strong { color: #f1dcb4; font-size: 1.15rem; font-weight: 500; letter-spacing: .02em; text-transform: none; }
.d1-actions { display: flex; justify-content: center; gap: 10px; margin-top: 6px;
  opacity: 0; transform: translateY(26px); transition: opacity .9s ease calc(.25s + var(--i, 5) * .09s), transform 1.1s cubic-bezier(.16, 1, .3, 1) calc(.25s + var(--i, 5) * .09s); }
.d1-dir.is-in .d1-actions { opacity: 1; transform: none; }
.d1-actions .d1-logout { margin-top: 0; opacity: 1; transform: none; transition: color .2s, border-color .2s; }
.d1-activity { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; border: 1px solid rgba(212, 180, 131, .4); background: rgba(0, 0, 0, .55);
  color: #f1dcb4; font: inherit; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, background .2s; }
.d1-activity:hover, .d1-activity:focus-visible { border-color: #d4b483; background: rgba(20, 16, 10, .85); outline: none; }
.d1-activity svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.d1-panel { position: absolute; z-index: 6; left: 14px; right: 14px; top: calc(14px + env(safe-area-inset-top)); bottom: calc(14px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: rgba(8, 8, 8, .9); border: 1px solid rgba(212, 180, 131, .3); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0,0,0,.7);
  opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .35s ease, transform .45s cubic-bezier(.16, 1, .3, 1); }
.d1-panel.is-in { opacity: 1; transform: none; }
.d1-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.d1-tabs { display: flex; gap: 6px; }
.d1-tabs button { height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #a99e91; font: inherit; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.d1-tabs button[aria-selected="true"] { background: #f1dcb4; color: #111; border-color: #f1dcb4; }
.d1-panel-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: #ddd; display: grid; place-items: center; cursor: pointer; }
.d1-panel-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.d1-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 14px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.d1-rows { list-style: none; margin: 0; padding: 0; }
.d1-rows li { padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,.06); }
.d1-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #f1ece4; font-size: .9rem; }
.d1-row-top strong { font-weight: 500; overflow-wrap: anywhere; }
.d1-ip { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.d1-row-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; color: #8f887e; font-size: .74rem; }
.d1-row-time { flex: 0 0 auto; color: #8f887e; font-size: .72rem; }
.d1-msg { margin: 6px 0 0; color: #cfc7bb; font-size: .82rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.d1-row-links { display: flex; gap: 8px; margin-top: 8px; }
.d1-row-links a { padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(212, 180, 131, .35); color: #f1dcb4; font-size: .72rem; text-decoration: none; }
.d1-badge { flex: 0 0 auto; padding: 2px 9px; border-radius: 99px; font-size: .64rem; letter-spacing: .06em; background: rgba(255,255,255,.08); color: #ddd5c9; }
.d1-badge.good { background: rgba(80, 200, 120, .16); color: #8fe3a8; }
.d1-badge.warn { background: rgba(255, 180, 70, .16); color: #ffcf8a; }
.d1-badge.bad { background: rgba(255, 90, 90, .18); color: #ff9a9a; }
.d1-badge.muted { color: #8f887e; }
.d1-empty { margin: 28px 0; text-align: center; color: #8f887e; font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .d1-panel, .d1-stats, .d1-actions { transition: opacity .2s ease; transform: none; } }

/* Division One: Links / Logs / Submissions tabs */
.d1-dir { display: flex; flex-direction: column; gap: 12px; width: min(calc(100% - 32px), 400px); }
.d1-dir > * { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.d1-dir > :nth-child(1) { transition-delay: .2s; }
.d1-dir > :nth-child(2) { transition-delay: .3s; }
.d1-dir > :nth-child(3) { transition-delay: .4s; }
.d1-dir > :nth-child(4) { transition-delay: .55s; }
.d1-dir.is-in > * { opacity: 1; transform: none; }
.d1-dir .d1-stats { flex: 0 0 auto; margin: 0; }
.d1-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(212, 180, 131, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.d1-tab { height: 36px; border: 0; border-radius: 10px; background: transparent; color: #a99e91; font: inherit; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s; }
.d1-tab[aria-selected="true"] { background: #f1dcb4; color: #111; }
.d1-tab:focus-visible { outline: 2px solid #d4b483; outline-offset: 1px; }
.d1-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; border-radius: 16px; }
.d1-pane.from-right { animation: d1-pane-r .38s cubic-bezier(.22, 1, .36, 1); }
.d1-pane.from-left { animation: d1-pane-l .38s cubic-bezier(.22, 1, .36, 1); }
@keyframes d1-pane-r { from { opacity: 0; transform: translateX(24px); } }
@keyframes d1-pane-l { from { opacity: 0; transform: translateX(-24px); } }
.d1-links { display: grid; gap: 9px; }
.d1-links .d1-dir-link { opacity: 1; transform: none; transition: border-color .2s, background .2s; }
.d1-pane .d1-rows { padding: 2px 12px; border-radius: 16px; background: rgba(6, 6, 6, .78); border: 1px solid rgba(212, 180, 131, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.d1-pane .d1-rows li:last-child { border-bottom: 0; }
.d1-pane .d1-empty { margin: 0; padding: 30px 12px; border-radius: 16px; background: rgba(6, 6, 6, .6); }
.d1-dir .d1-logout { flex: 0 0 auto; margin: 0; }
@media (prefers-reduced-motion: reduce) { .d1-dir > *, .d1-pane { transition: opacity .2s; animation: none; transform: none; } }
.d1-dir .d1-logout { align-self: center; }
/* tabs: beat the older Activity-panel pill styles */
.d1-dir .d1-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; }
.d1-dir .d1-tabs .d1-tab { height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #a99e91; }
.d1-dir .d1-tabs .d1-tab[aria-selected="true"] { background: #f1dcb4; color: #111; }

/* submissions: Add to phone + Delete */
.d1-row-links { flex-wrap: wrap; }
.d1-row-links .d1-addphone { border-color: rgba(212, 180, 131, .6); background: rgba(212, 180, 131, .12); }
.d1-del { padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(255, 107, 107, .35); background: transparent; color: #ff9a9a; font: inherit; font-size: .72rem; cursor: pointer; margin-left: auto; transition: background .2s, color .2s; }
.d1-del.is-confirm { background: #ff6b6b; color: #111; border-color: #ff6b6b; }
.d1-del:disabled { opacity: .6; }
.d1-rows li { transition: opacity .3s ease, transform .3s ease; }
.d1-rows li.is-removing { opacity: 0; transform: translateX(30px); }
