/* ─── Variables ─────────────────────────────── */
:root {
  --bg:     #0d0d0d;
  --bg2:    #161616;
  --bg3:    #202020;
  --bg4:    #2c2c2c;
  --green:  #00ff88;
  --gdim:   rgba(0,255,136,.12);
  --gring:  rgba(0,255,136,.28);
  --text:   #ffffff;
  --t2:     rgba(255,255,255,.58);
  --t3:     rgba(255,255,255,.28);
  --bdr:    rgba(255,255,255,.07);
  --bdr2:   rgba(255,255,255,.13);
  --r:      14px;
  --rsm:    9px;
  --font:   'Outfit', system-ui, sans-serif;
  --ease:   cubic-bezier(.25,.46,.45,.94);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --sb:     env(safe-area-inset-bottom, 0px);
  --st:     env(safe-area-inset-top, 0px);
}


/* ─── SEO hidden content — off screen, never visible ───
   position:absolute + left:-9999px is the correct technique.
   display:none would hide from crawlers too — we don't want that. */
.seo-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Reset ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  display: flex;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ─── Screens ───────────────────────────────── */
/*  All screens exist in DOM always.
    Only .active is visible.
    Switching = remove active + add active. No innerHTML. */
.screen {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 430px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  flex-direction: column;
  overflow: hidden;
}
.screen.active {
  display: flex;
  animation: fadeUp .22s var(--ease) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Welcome ───────────────────────────────── */
.center-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px calc(32px + var(--sb));
  text-align: center;
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.logo-box {
  width: 62px; height: 62px;
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  text-align: left;
}
.logo-text span { color: var(--green); }
.logo-sub {
  font-size: 12px;
  color: var(--t3);
  text-align: left;
  margin-top: 3px;
  letter-spacing: .3px;
}
.tagline {
  font-size: 15px;
  color: var(--t2);
  line-height: 1.65;
  margin-bottom: 44px;
  max-width: 270px;
}
.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  max-width: 300px;
}
.or-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.or-line::before, .or-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bdr);
}
.or-line span { font-size: 12px; color: var(--t3); }

/* ─── Buttons ───────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s var(--ease), opacity .15s;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active  { transform: scale(.96); }
.btn:disabled { opacity: .3; pointer-events: none; }
.btn.green   { background: var(--green); color: #000; }
.btn.outline { background: var(--bg3); color: var(--text); border: 1px solid var(--bdr2); }
.btn.ghost   { background: transparent; color: var(--t3); border: none; font-size: 13px; }

/* ─── Forms ─────────────────────────────────── */
.form-wrap {
  flex: 1;
  padding: calc(14px + var(--st)) 22px calc(30px + var(--sb));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.back {
  background: none;
  border: none;
  color: var(--t2);
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  align-self: flex-start;
  transition: color .15s;
}
.back:active { transform: scale(.9); }
h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 5px;
}
.sub {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: 22px;
}
.lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: .7px;
  text-transform: uppercase;
  margin-bottom: 6px;
  margin-top: 14px;
}
.lbl:first-of-type { margin-top: 0; }
.inp {
  display: block;
  width: 100%;
  padding: 13px 14px;
  background: var(--bg3);
  border: 1.5px solid var(--bdr2);
  border-radius: var(--rsm);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.inp:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--gdim);
}
.inp::placeholder { color: var(--t3); }
.inp::-webkit-search-cancel-button { display: none; }
.code-inp {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
  text-transform: uppercase;
  color: var(--green);
}
.prem-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--bdr2);
  border-radius: var(--r);
  padding: 14px;
  margin: 18px 0 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color .15s;
}
.prem-row[aria-pressed="true"] { border-color: var(--gring); }
.prem-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--t3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  margin-top: 1px;
}
.prem-row[aria-pressed="true"] .prem-dot {
  background: var(--green);
  border-color: var(--green);
}
.prem-row strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.prem-row span   { font-size: 12px; color: var(--t2); line-height: 1.5; }
.note { font-size: 12px; color: var(--t3); text-align: center; margin-top: 10px; line-height: 1.5; }

/* ─── Player screen layout ──────────────────── */
/* Height budget (total = 100dvh):
   top-bar:      ~50px
   mini-player:  ~70px
   prog-wrap:    4px
   time-row:     18px
   vote-strip:   0 or ~38px
   tab-bar:      44px
   panels:       FLEX 1 (remaining)
*/
#s-player {
  height: 100dvh;
  height: 100vh;
}

/* ─── Top bar ───────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--st)) 14px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--bdr);
  flex-shrink: 0;
}
.pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  border-radius: 100px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .15s;
}
.pill:active { opacity: .65; }
.dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.28} }
.top-right { display: flex; align-items: center; gap: 7px; }
.rider-lbl { font-size: 12px; color: var(--t2); }
.role-tag  { font-size: 11px; color: var(--t2); background: var(--bg3); border: 1px solid var(--bdr); border-radius: 100px; padding: 3px 9px; }
.icon-btn  { background: none; border: none; color: var(--t2); cursor: pointer; padding: 7px; border-radius: 9px; display: flex; align-items: center; transition: background .15s, color .15s; }
.icon-btn:hover  { background: var(--bg3); color: var(--text); }
.icon-btn:active { transform: scale(.88); }

/* ─── Mini player ───────────────────────────── */
.mini-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bdr);
  flex-shrink: 0;
}
.mini-art {
  width: 48px; height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
  position: relative;
}
.mini-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .3s;
}
.mini-art-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--t3);
}
.mini-meta { flex: 1; min-width: 0; }
.mini-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.1px;
}
.mini-ch {
  font-size: 11px;
  color: var(--t2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-btns { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.ctrl-btn {
  background: none; border: none;
  cursor: pointer; color: var(--t2);
  padding: 7px; border-radius: 50%;
  display: flex; align-items: center;
  transition: color .15s, transform .1s;
}
.ctrl-btn:hover  { color: var(--text); }
.ctrl-btn:active { transform: scale(.8); }
.ctrl-btn.off    { opacity: .22; pointer-events: none; }
.play-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green);
  border: none; cursor: pointer;
  color: #000;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s var(--spring);
  flex-shrink: 0;
}
.play-btn:active  { transform: scale(.87); }
.play-btn:disabled { opacity: .25; pointer-events: none; }
.play-btn svg { pointer-events: none; }

/* ─── Progress ──────────────────────────────── */
.prog-wrap {
  position: relative;
  height: 4px;
  background: var(--bg4);
  flex-shrink: 0;
}
.prog-bg { position: absolute; inset: 0; }
.prog-fill {
  height: 100%;
  background: var(--green);
  transition: width .7s linear;
  will-change: width;
  min-width: 0;
}
.prog-input {
  position: absolute; inset: -8px 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.time-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 14px 0;
  font-size: 10px;
  color: var(--t3);
  flex-shrink: 0;
}

/* ─── Vote strip ────────────────────────────── */
.vote-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: var(--gdim);
  border-bottom: 1px solid var(--gring);
  flex-shrink: 0;
}
.vote-lbl { font-size: 12px; color: var(--green); }
.vote-btn {
  background: var(--green);
  color: #000; border: none;
  border-radius: 7px;
  padding: 6px 13px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.vote-btn:active   { transform: scale(.93); }
.vote-btn:disabled { opacity: .35; cursor: default; }

/* ─── Tab bar ───────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--bdr);
  background: var(--bg);
  flex-shrink: 0;
}
.tab {
  flex: 1;
  padding: 12px 0;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--t3);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tab.active { color: var(--green); border-bottom-color: var(--green); }
.badge {
  background: var(--green);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  border-radius: 100px;
  padding: 1px 6px;
  line-height: 1.5;
}
.badge:empty { display: none; }

/* ─── Panels ────────────────────────────────── */
.panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.panel {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(14px + var(--sb));
}
.panel.active { display: block; }

/* ─── Queue list ────────────────────────────── */
.q-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bdr);
  transition: opacity .2s;
}
.q-item:last-child { border-bottom: none; }
.q-item.past       { opacity: .32; }
.q-item.can-click  { cursor: pointer; }
.q-item.can-click:hover .q-title { color: var(--green); }
.q-num { font-size: 11px; color: var(--t3); min-width: 16px; text-align: center; flex-shrink: 0; }
.q-thumb {
  width: 46px; height: 34px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
  position: relative;
}
.q-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-now-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.q-info { flex: 1; min-width: 0; }
.q-title {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.q-title.playing { color: var(--green); }
.q-sub  { font-size: 11px; color: var(--t3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-del  {
  background: none; border: none;
  cursor: pointer; color: var(--t3);
  padding: 6px; border-radius: 6px;
  transition: color .15s, transform .1s;
  flex-shrink: 0;
}
.q-del:hover  { color: #ff4444; }
.q-del:active { transform: scale(.82); }
.empty {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  padding: 50px 20px;
  color: var(--t3); text-align: center;
}
.empty p { font-size: 14px; line-height: 1.7; }
.empty strong { color: var(--green); }

/* ─── Add song ──────────────────────────────── */
.add-wrap { display: flex; flex-direction: column; gap: 10px; }
.mode-row { display: flex; gap: 5px; }
.mode {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--bdr2);
  border-radius: 8px;
  color: var(--t2);
  font-family: var(--font);
  font-size: 12px; font-weight: 700;
  padding: 9px 4px;
  cursor: pointer;
  transition: all .15s;
}
.mode.active { background: var(--gdim); border-color: var(--gring); color: var(--green); }
.limit-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gdim);
  border: 1px solid var(--gring);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--green);
  align-self: flex-start;
}
.add-section { display: none; flex-direction: column; gap: 8px; }
.add-section.active { display: flex; }
.input-row { display: flex; gap: 7px; align-items: stretch; }
.input-row .inp { flex: 1; padding: 11px 13px; font-size: 14px; }
.go-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--green);
  border: none; border-radius: var(--rsm);
  color: #000; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s, transform .1s var(--spring);
}
.go-btn:active  { transform: scale(.88); }
.go-btn:disabled { opacity: .3; pointer-events: none; }
.results { display: flex; flex-direction: column; gap: 7px; }
.hint { font-size: 13px; color: var(--t3); text-align: center; padding: 14px 0 6px; line-height: 1.6; }

/* Spinner */
.spin-row { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 18px 0; color: var(--t2); font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--bdr2); border-top-color: var(--green); border-radius: 50%; animation: spin .65s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result card */
.rcard {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: var(--bg2);
  border: 1px solid transparent;
  border-radius: var(--rsm);
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.rcard:hover  { border-color: var(--gring); }
.rcard:active { transform: scale(.98); }
.rcard img { width: 62px; height: 46px; border-radius: 5px; object-fit: cover; background: var(--bg3); flex-shrink: 0; }
.rcard-info { flex: 1; min-width: 0; }
.rcard-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.rcard-ch    { font-size: 11px; color: var(--t3); }
.rcard-plus  { flex-shrink: 0; color: var(--green); opacity: .75; }

/* Playlist preview */
.pl-wrap { display: flex; flex-direction: column; gap: 8px; }
.pl-hdr { display: flex; justify-content: space-between; align-items: flex-start; background: var(--bg2); border-radius: var(--rsm); padding: 10px 12px; }
.pl-title-txt { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.pl-count-txt { font-size: 11px; color: var(--t2); }
.pl-sel-btns  { display: flex; gap: 3px; }
.pl-sel-btn   { background: none; border: none; font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--green); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: background .15s; }
.pl-sel-btn:hover { background: var(--gdim); }
.pl-sel-btn.dim   { color: var(--t3); }
.pl-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--bdr); border-radius: var(--rsm); -webkit-overflow-scrolling: touch; }
.pl-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--bdr); cursor: pointer; transition: background .1s; }
.pl-item:last-child { border-bottom: none; }
.pl-item:hover { background: var(--bg2); }
.pl-item img { width: 38px; height: 28px; border-radius: 4px; object-fit: cover; background: var(--bg3); flex-shrink: 0; }
.pl-chk { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--t3); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.pl-item.sel .pl-chk { background: var(--green); border-color: var(--green); }

/* ─── Settings ──────────────────────────────── */
.settings { display: flex; flex-direction: column; }
.s-group-lbl { font-size: 11px; font-weight: 700; color: var(--t3); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px; }
.s-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--bdr); gap: 12px; }
.s-row:last-child { border-bottom: none; }
.s-row > span { font-size: 14px; color: var(--t2); }
.toggle {
  width: 44px; height: 25px;
  background: var(--bg4);
  border: 1px solid var(--bdr2);
  border-radius: 13px;
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.toggle.on { background: var(--green); border-color: var(--green); }
.toggle::after {
  content: '';
  position: absolute;
  width: 19px; height: 19px;
  background: #fff; border-radius: 50%;
  top: 2px; left: 2px;
  transition: transform .2s var(--spring);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.toggle.on::after { transform: translateX(19px); }
.s-sel { background: var(--bg3); border: 1px solid var(--bdr2); color: var(--text); font-family: var(--font); font-size: 13px; border-radius: 8px; padding: 7px 10px; outline: none; cursor: pointer; }

/* ─── Invite sheet ──────────────────────────── */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 40; animation: bdin .2s ease; }
.backdrop.hidden { display: none; }
.sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: var(--bg2); border-radius: 20px 20px 0 0; padding: 18px 22px calc(26px + var(--sb)); z-index: 50; animation: shin .23s var(--ease); }
.sheet.hidden { display: none; }
@keyframes bdin { from{opacity:0} to{opacity:1} }
@keyframes shin { from{transform:translateX(-50%) translateY(100%)} to{transform:translateX(-50%) translateY(0)} }
.sheet-bar  { width: 36px; height: 4px; background: var(--bg4); border-radius: 2px; margin: 0 auto 20px; }
.sheet-title { font-size: 20px; font-weight: 800; margin-bottom: 14px; letter-spacing: -.3px; }
.code-box { font-size: 42px; font-weight: 900; letter-spacing: 12px; text-align: center; color: var(--green); background: var(--bg3); border-radius: var(--r); padding: 20px; margin-bottom: 10px; font-family: var(--font); }
.sheet-url { font-size: 11px; color: var(--t3); text-align: center; margin-bottom: 18px; word-break: break-all; line-height: 1.7; }

/* ─── Toasts ────────────────────────────────── */
#toasts { position: fixed; bottom: calc(22px + var(--sb)); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--bg3); border: 1px solid var(--bdr2); border-radius: 100px; padding: 9px 18px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; animation: tin .22s var(--spring) both; }
.toast.out { animation: tout .18s var(--ease) both; }
@keyframes tin  { from{opacity:0;transform:translateY(6px) scale(.9)} to{opacity:1;transform:none} }
@keyframes tout { to{opacity:0;transform:translateY(4px) scale(.95)} }

/* ─── Hidden YouTube IFrame ─────────────────── */
#yt-wrap { position: fixed; top: -9999px; left: -9999px; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }

/* ─── Utilities ─────────────────────────────── */
.hidden { display: none !important; }
::-webkit-scrollbar { width: 0; height: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── Donation link ─────────────────────────── */
.donate-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 20px;
  border: 1px solid rgba(0,255,136,.22);
  border-radius: var(--r);
  background: rgba(0,255,136,.06);
  color: var(--green);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .1s;
  margin-top: 2px;
}
.donate-link:hover  { background: rgba(0,255,136,.12); }
.donate-link:active { transform: scale(.96); }

/* ─── Branding footer on welcome ────────────── */
.branding-footer {
  margin-top: 32px;
  text-align: center;
}
.branding-footer .brand-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--t2);
  letter-spacing: -.3px;
}
.branding-footer .brand-name span { color: var(--green); }
.branding-footer .brand-by {
  font-size: 11px;
  color: var(--t3);
  margin-top: 2px;
}

/* ─── Branding fixes ────────────────────────── */
.logo-by {
  font-size: 12px;
  color: var(--t3);
  margin-top: 3px;
  letter-spacing: .3px;
}
.logo-by strong {
  color: rgba(255,255,255,.45);
  font-weight: 700;
}

.welcome-credit {
  font-size: 12px;
  color: var(--t3);
  margin-top: 20px;
  letter-spacing: .2px;
}
.welcome-credit strong { font-weight: 700; }

/* CarJam wordmark in sheet */
.sheet-brand {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--t2);
  margin-bottom: 14px;
}
.sheet-brand span { color: var(--green); }

/* Player header — subtle CarJam credit next to party name */
.player-credit {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: .3px;
  flex-shrink: 0;
}
.player-credit span { color: var(--green); opacity: .7; }

/* ─── Leave button ──────────────────────────── */
.leave-btn { color: var(--t3); }
.leave-btn:hover { color: #ff5555; background: rgba(255,60,60,.1); }

/* ─── Panel donate strip ────────────────────── */
.panel-donate {
  padding: 16px 0 4px;
  text-align: center;
}
.panel-donate-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid var(--bdr);
  border-radius: 100px;
  transition: color .15s, border-color .15s, background .15s;
  font-family: var(--font);
}
.panel-donate-link:hover {
  color: var(--green);
  border-color: var(--green-ring);
  background: var(--gdim);
}
.panel-donate-link strong { color: rgba(255,255,255,.45); font-weight: 700; }
.panel-donate-link:hover strong { color: var(--green); }

/* ─── Install banner ────────────────────────── */
.install-banner {
  position: fixed;
  bottom: calc(16px + var(--sb));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px);
  max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  border-radius: var(--r);
  padding: 14px 16px;
  z-index: 90;
  opacity: 0;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.install-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.install-banner.hidden { display: none; }

.install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.install-icon {
  width: 40px; height: 40px;
  background: var(--bg3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.install-text { flex: 1; min-width: 0; }
.install-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.install-text span {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.4;
}
.install-actions { display: flex; gap: 8px; }
.install-btn-yes {
  flex: 1;
  padding: 10px;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: var(--rsm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.install-btn-yes:active { transform: scale(.96); }
.install-btn-no {
  padding: 10px 16px;
  background: var(--bg3);
  color: var(--t2);
  border: 1px solid var(--bdr2);
  border-radius: var(--rsm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s;
}
.install-btn-no:hover { color: var(--text); }
