/* ===========================================================
   Wivo design system
   -----------------------------------------------------------
   Built for businesses and events, so it stays quiet:

   · Surfaces and layout follow Shopify Polaris: a light grey
     canvas, white cards, hairline borders, 12px corners, a dark
     top bar, colour only where it means something.
   · Buttons and controls follow Material Design 3: pill buttons
     in filled, tonal, outlined and text variants, a state layer
     on hover and press, and a ripple from the point you touched.
   · Motion follows Uber's Base: short, eased, never bouncy.
     Views slide a few pixels and fade, sheets rise from the
     bottom on phones, nothing waits on an animation.
   · Type is Coolvetica (cd.tarmacq.com/fonts). It has one weight
     per cut, so emphasis comes from size, colour and the heavy
     compressed cut for titles, never from faux bold.
   · Icons are Material Symbols Rounded (js/icons.js).

   Loaded after styles.css (and room.css / admin.css where used).
   No gradients anywhere.
   =========================================================== */

@font-face { font-family: "Coolvetica"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("https://cd.tarmacq.com/fonts/Coolvetica%20Rg.otf") format("opentype"); }
@font-face { font-family: "Coolvetica"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("https://cd.tarmacq.com/fonts/Coolvetica%20Rg%20It.otf") format("opentype"); }
@font-face { font-family: "Coolvetica Cond"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("https://cd.tarmacq.com/fonts/Coolvetica%20Rg%20Cond.otf") format("opentype"); }
@font-face { font-family: "Coolvetica Cram"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("https://cd.tarmacq.com/fonts/Coolvetica%20Rg%20Cram.otf") format("opentype"); }
@font-face { font-family: "Coolvetica Heavy"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("https://cd.tarmacq.com/fonts/Coolvetica%20Hv%20Comp.otf") format("opentype"); }

/* ---------- tokens ---------- */
:root {
  --font-ui: "Coolvetica", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Coolvetica Heavy", "Coolvetica", system-ui, sans-serif;
  --font-cond: "Coolvetica Cond", "Coolvetica", system-ui, sans-serif;
  --font-num: "Coolvetica Cond", "Coolvetica", system-ui, sans-serif;
  /* Cram is very tight: only for big numbers, never for body-size text */
  --font-cram: "Coolvetica Cram", "Coolvetica Cond", system-ui, sans-serif;
  --track-display: .005em;
  --track-tight: .005em;

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 999px;
  --speed: .18s;
  --ease: cubic-bezier(.2, 0, 0, 1);          /* Material "emphasized" / Uber standard */
  --ease-out: cubic-bezier(.05, .7, .1, 1);
  --top-h: 56px;
  --nav-w: 240px;
  --bnav-h: 72px;
  --focus: #005BD3;
}
:root, [data-theme="light"] {
  --bg: #F1F1F1; --canvas: #F1F1F1; --bg-subtle: #F7F7F7; --bg-inset: #F1F1F1;
  --panel: #FFFFFF; --panel-2: #FAFAFA; --surface-hover: #F7F7F7; --surface-press: #F1F1F1;
  --border: #E3E3E3; --border-strong: #CCCCCC; --input-border: #8A8A8A;
  --text: #303030; --text-2: #616161; --text-3: #8A8A8A;
  --primary: #303030; --primary-text: #FFFFFF; --primary-hover: #1A1A1A;
  --tonal: #E3E3E3; --tonal-text: #303030;
  --nav-bg: #EBEBEB; --nav-active: #FAFAFA;
  --topbar: #1A1A1A; --topbar-text: #E3E3E3;
  --accent: #FC5130; --accent-soft: #FFE9E4; --accent-text: #B5260B; --on-accent: #FFFFFF;
  --danger: #C70A24; --danger-soft: #FEE9E8; --critical: #C70A24;
  --success: #29845A; --success-soft: #CDFEE1;
  --warn: #8F4E00; --warn-soft: #FFF1E3;
  --info-soft: #EAF4FF; --info: #00527C;
  --shadow-sm: 0 1px 0 rgba(26, 26, 26, .07);
  --shadow-card: 0 1px 0 rgba(26, 26, 26, .07), 0 0 0 1px rgba(26, 26, 26, .07);
  --shadow-md: 0 4px 6px -2px rgba(26, 26, 26, .2);
  --shadow-lg: 0 12px 20px -8px rgba(26, 26, 26, .24), 0 0 0 1px rgba(26, 26, 26, .06);
  --stage-bg: #E3E3E3; --tile-bg: #D4D4D4;
  --glass: rgba(255, 255, 255, .92); --glass-panel: #FFFFFF; --glass-solid: #FFFFFF;
  --glass-2: rgba(48, 48, 48, .06); --glass-brd: #E3E3E3; --glass-fg: #303030;
  --glass-sheen: none; --glass-edge: 0 0 0 0 transparent;
  --hud-shadow: var(--shadow-lg);
  --ring: #303030;
  --state: 48, 48, 48;
}
[data-theme="dark"] {
  --bg: #121212; --canvas: #121212; --bg-subtle: #1C1C1C; --bg-inset: #232323;
  --panel: #1F1F1F; --panel-2: #242424; --surface-hover: #2A2A2A; --surface-press: #303030;
  --border: #333333; --border-strong: #474747; --input-border: #6B6B6B;
  --text: #EDEDED; --text-2: #B0B0B0; --text-3: #8A8A8A;
  --primary: #EDEDED; --primary-text: #1A1A1A; --primary-hover: #FFFFFF;
  --tonal: #333333; --tonal-text: #EDEDED;
  --nav-bg: #181818; --nav-active: #2A2A2A;
  --topbar: #0A0A0A; --topbar-text: #D4D4D4;
  --accent: #FC5130; --accent-soft: #3A1810; --accent-text: #FF8A70; --on-accent: #FFFFFF;
  --danger: #E3243B; --danger-soft: #3A1418; --critical: #E3243B;
  --success: #4BB37E; --success-soft: #12301F;
  --warn: #E0A040; --warn-soft: #33240E;
  --info-soft: #10263A; --info: #7FB8E6;
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, .4);
  --shadow-card: 0 0 0 1px #2E2E2E;
  --shadow-md: 0 4px 10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, .6), 0 0 0 1px #333333;
  --stage-bg: #0A0A0A; --tile-bg: #1F1F1F;
  --glass: rgba(31, 31, 31, .94); --glass-panel: #1F1F1F; --glass-solid: #1F1F1F;
  --glass-2: rgba(237, 237, 237, .08); --glass-brd: #333333; --glass-fg: #EDEDED;
  --hud-shadow: var(--shadow-lg);
  --ring: #EDEDED;
  --state: 237, 237, 237;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui); font-size: 15px; line-height: 1.45; font-weight: 400;
  letter-spacing: .01em; font-synthesis: none; background: var(--bg); color: var(--text);
}
h1, h2, h3, h4, .display {
  font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: 1.1;
}
h3, h4 { font-family: var(--font-ui); }
b, strong { font-weight: 400; color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: #B3D4FC; color: #1A1A1A; }
.ic { width: 20px; height: 20px; }
.muted { color: var(--text-3); }

/* ===========================================================
   BUTTONS (Material 3)
   =========================================================== */
.btn, .icon-btn, .m-btn {
  position: relative; overflow: hidden; isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 22px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  font: 400 15px/1 var(--font-ui); letter-spacing: .02em; white-space: nowrap; text-decoration: none;
  transition: background-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed);
}
/* state layer: the colour of the label, at Material's opacities */
.btn::before, .icon-btn::before, .m-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: currentColor; opacity: 0; transition: opacity var(--speed) var(--ease);
}
.btn:hover::before, .icon-btn:hover::before, .m-btn:hover::before { opacity: .08; }
.btn:active::before, .icon-btn:active::before, .m-btn:active::before { opacity: .12; }
.btn:hover { background: transparent; }
.btn:active { transform: none; }
.btn .ic { width: 18px; height: 18px; margin-left: -4px; }
.btn.primary, .btn.accent { background: var(--primary); color: var(--primary-text); border-color: transparent; }
.btn.primary:hover, .btn.accent:hover { background: var(--primary); box-shadow: var(--shadow-md); }
.btn.tonal { background: var(--tonal); color: var(--tonal-text); border-color: transparent; }
.btn.tonal:hover { background: var(--tonal); }
.btn.ghost { background: transparent; border-color: transparent; padding: 0 14px; }
.btn.ghost:hover { background: transparent; }
.btn.danger { background: var(--critical); color: #fff; border-color: transparent; }
.btn.danger:hover { background: var(--critical); box-shadow: var(--shadow-md); }
.btn.danger-quiet { background: transparent; color: var(--critical); border-color: var(--border-strong); }
.btn.danger-quiet:hover { background: transparent; }
.btn.big { height: 48px; padding: 0 28px; font-size: 16px; }
.btn.sm { height: 32px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .38; cursor: not-allowed; box-shadow: none; }
.btn:disabled::before { opacity: 0 !important; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
  transition: color var(--speed);
}
.icon-btn:hover { background: transparent; color: var(--text); }
.icon-btn .ic { width: 22px; height: 22px; }

/* ripple, added by js/ds.js on press */
.ripple {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .16; transform: scale(0);
  animation: ripple .5s var(--ease-out) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ===========================================================
   FIELDS (Polaris text field)
   =========================================================== */
.input, .select {
  height: 40px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--input-border); background: var(--panel); color: var(--text);
  font: 400 15px var(--font-ui); letter-spacing: .01em;
  transition: border-color var(--speed), box-shadow var(--speed);
}
textarea.input { height: auto; padding: 10px 12px; line-height: 1.4; }
.input::placeholder { color: var(--text-3); }
.input:hover, .select:hover { border-color: var(--text-2); }
.input:focus, .select:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); outline: none; }
.input.shake { border-color: var(--critical); }
.field-label { font-size: 14px; color: var(--text); font-weight: 400; margin-bottom: 6px; }
.help { font-size: 13px; color: var(--text-3); margin-top: 6px; }

/* Material 3 switch */
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch .track {
  position: absolute; inset: 0; border-radius: 16px; background: var(--bg-inset);
  border: 2px solid var(--input-border); transition: background var(--speed) var(--ease), border-color var(--speed);
}
.switch .track::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--input-border); box-shadow: none;
  transition: transform .22s var(--ease), width .22s var(--ease), height .22s var(--ease), left .22s var(--ease), top .22s var(--ease), background var(--speed);
}
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::before { left: 2px; top: 2px; width: 24px; height: 24px; transform: translateX(20px); background: var(--primary-text); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Material 3 segmented button */
.seg { display: inline-flex; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-full); overflow: hidden; background: transparent; }
.seg button {
  position: relative; height: 38px; padding: 0 18px; border: 0; border-radius: 0; background: transparent;
  font: 400 14px var(--font-ui); color: var(--text); box-shadow: none;
}
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.active { background: var(--tonal); color: var(--tonal-text); box-shadow: none; }

/* ===========================================================
   POLARIS SURFACES
   =========================================================== */
.card { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 0; }
.card-head h2, .card-head h3 { margin: 0; font: 400 17px/1.3 var(--font-ui); color: var(--text); }
.card-head .sub { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.card-body { padding: 16px; }
.card-section + .card-section { border-top: 1px solid var(--border); }
.card-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--panel-2); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 8px;
  font: 400 13px/1 var(--font-ui); background: var(--bg-inset); color: var(--text-2); white-space: nowrap;
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.attention { background: var(--warn-soft); color: var(--warn); }
.badge.critical { background: var(--danger-soft); color: var(--critical); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.live { background: var(--accent); color: #fff; }

.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .5s var(--ease); }

.banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--info-soft); color: var(--text);
}
.banner .ic { color: var(--info); flex: none; margin-top: 1px; }
.banner b { display: block; }
.banner span { color: var(--text-2); font-size: 14px; }

/* resource list (Polaris), each row presses like a Material list item */
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist > li + li { border-top: 1px solid var(--border); }
.r-item {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  border: 0; background: transparent; color: var(--text); text-align: left; font: inherit;
  transition: background-color var(--speed) var(--ease);
}
.r-item:hover { background: var(--surface-hover); }
.r-item:active { background: var(--surface-press); }
.r-ic {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px;
  background: var(--bg-inset); color: var(--text);
}
[data-theme="light"] .r-ic { background: #F1F1F1; }
.r-item.lead .r-ic { background: var(--primary); color: var(--primary-text); }
.r-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.r-txt b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-txt small { font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-end { color: var(--text-3); flex: none; display: flex; align-items: center; gap: 8px; }

/* ===========================================================
   APP FRAME (Polaris admin frame, Material nav on phones)
   =========================================================== */
.ds-shell { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.ds-top {
  position: sticky; top: 0; z-index: 50; height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 12px;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: var(--topbar); color: var(--topbar-text);
}
.ds-brand { display: inline-flex; align-items: center; width: calc(var(--nav-w) - 16px); flex: none; }
.ds-brand img { height: 26px; width: auto; display: block; }
.ds-search { flex: 1; max-width: 520px; position: relative; }
.ds-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #8A8A8A; pointer-events: none; }
.ds-search input {
  width: 100%; height: 36px; padding: 0 92px 0 38px; border-radius: 10px; border: 1px solid #3A3A3A;
  background: #303030; color: #F1F1F1; font: 400 15px var(--font-ui);
}
.ds-search input::placeholder { color: #9A9A9A; }
.ds-search input:focus { outline: none; border-color: #8A8A8A; background: #3A3A3A; }
.ds-search .btn { position: absolute; right: 3px; top: 3px; height: 30px; padding: 0 14px; background: #F1F1F1; color: #1A1A1A; border: 0; }
.ds-top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ds-top .icon-btn { color: #CCCCCC; }
.ds-top .icon-btn:hover { color: #FFFFFF; }
.ds-top .btn.top-chip { height: 32px; padding: 0 14px; border-color: #474747; color: #F1F1F1; font-size: 14px; }
.ds-acct {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 10px; border: 0;
  background: transparent; color: #F1F1F1; font: 400 14px var(--font-ui);
}
.ds-acct:hover { background: #303030; }
.ds-acct .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.ds-acct .plus-badge { height: 20px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; }

.ds-body { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: calc(100dvh - var(--top-h)); }
.ds-nav {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100dvh - var(--top-h));
  display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; background: var(--nav-bg);
  border-right: 1px solid var(--border);
}
.ds-nav-item {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; border: 0;
  background: transparent; color: var(--text-2); font: 400 15px var(--font-ui); text-align: left; text-decoration: none;
  transition: background-color var(--speed) var(--ease), color var(--speed);
}
.ds-nav-item .ic { width: 20px; height: 20px; }
.ds-nav-item:hover { background: rgba(var(--state), .06); color: var(--text); }
.ds-nav-item.on { background: var(--nav-active); color: var(--text); box-shadow: var(--shadow-sm); }
.ds-nav-item .count { margin-left: auto; font-size: 13px; color: var(--text-3); }
.ds-nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.ds-nav-foot { margin-top: auto; font-size: 13px; color: var(--text-3); padding: 8px 10px; display: flex; gap: 12px; flex-wrap: wrap; }
.ds-nav-foot a { color: inherit; }

.ds-main { min-width: 0; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 48px 24px; }
.page { max-width: 1000px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 34px; letter-spacing: .01em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* views slide a few pixels and fade, Uber style */
.view { display: none; }
.view.on { display: block; animation: viewIn .26s var(--ease); }
.view.on.from-left { animation-name: viewInL; }
@keyframes viewIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes viewInL { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* bottom navigation bar (Material 3), phones only */
.ds-bnav { display: none; }

/* ---------- home ---------- */
.join-card .join-row { display: flex; gap: 8px; flex-wrap: nowrap; }
.join-card .join-row .input { flex: 1 1 auto; min-width: 0; }
.join-card .join-row .btn { flex: none; }
.quest-mini { cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.qm-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.qm-top b { font-size: 16px; }
.qm-top small { font-size: 14px; color: var(--text-2); }
.seg-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.seg-bar i { height: 6px; border-radius: 3px; background: var(--border); }
.seg-bar i.half { background: var(--text-3); }
.seg-bar i.on { background: var(--primary); }
.ad-slot .ad-unit { max-width: none; border: 0; border-radius: var(--r-md); background: var(--bg-inset); }
.ad-slot .ad-tag { display: none; }
.spot-head { display: flex; justify-content: space-between; align-items: center; }
.spot-head a { font-size: 14px; color: var(--text-2); }

/* ---------- Wivo+ ---------- */
.perks { display: grid; grid-template-columns: repeat(3, 1fr); }
.perk { padding: 16px; }
.perk + .perk { border-left: 1px solid var(--border); }
.perk b { display: block; font: 400 28px/1 var(--font-display); color: var(--text); margin-bottom: 4px; }
.perk span { font-size: 14px; color: var(--text-2); }
.plus-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.plus-state b { font-size: 17px; }
.plus-state small { font-size: 14px; color: var(--text-2); }
.quest-list { list-style: none; margin: 0; padding: 0; }
.quest {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
  padding: 14px 16px;
}
.quest + .quest { border-top: 1px solid var(--border); }
.quest .q-ic { grid-row: span 3; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-inset); color: var(--text-2); align-self: start; }
[data-theme="light"] .quest .q-ic { background: #F1F1F1; }
.quest.done .q-ic { background: var(--success-soft); color: var(--success); }
.quest .q-t { font-size: 16px; }
.quest .q-n { font: 400 15px var(--font-num); color: var(--text-2); white-space: nowrap; }
.quest .q-bar { grid-column: 2 / 4; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.quest .q-bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .6s var(--ease); }
.quest.done .q-bar i { background: var(--success); }
.quest .q-note { grid-column: 2 / 4; font-size: 13px; color: var(--text-3); }
.quest .q-act { grid-column: 3; grid-row: 1; }
.code-input { font-family: var(--font-num) !important; letter-spacing: .12em; text-transform: uppercase; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row .input { flex: 1 1 180px; min-width: 0; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.socials a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); color: var(--text); text-decoration: none; font-size: 14px;
}
.socials a:hover { background: var(--surface-hover); }
.form-msg { min-height: 18px; margin: 8px 0 0; font-size: 14px; color: var(--text-2); }
.form-msg.ok { color: var(--success); }
.form-msg.bad { color: var(--critical); }

/* ---------- friends, recent ---------- */
.ds-shell .app-friends { background: none; border: 0; padding: 0; gap: 0; border-radius: 0; }
.ds-shell .friends-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ds-shell .friends-head .field-label { margin: 0; font-size: 17px; }
.ds-shell .friend-list, .ds-shell .friend-reqs { gap: 0; }
.ds-shell .friend-item, .ds-shell .friend-req { margin: 0; padding: 12px 16px; border-radius: 0; border: 0; }
.ds-shell .friend-item + .friend-item, .ds-shell .friend-req + .friend-req { border-top: 1px solid var(--border); }
.ds-shell .friend-item:hover { background: var(--surface-hover); }
.ds-shell .friend-req { background: var(--info-soft); }
.ds-shell .friend-item .avatar, .ds-shell .friend-req .avatar { width: 40px; height: 40px; border-radius: 50%; }
.ds-shell .recent-empty { padding: 16px; margin: 0; color: var(--text-2); font-size: 15px; }
.ds-shell .recent-list .r-item .r-end .ic { transform: rotate(180deg); }
.avatar { border-radius: 50%; font-family: var(--font-ui); font-weight: 400; }

/* ---------- settings ---------- */
.set-list .r-item { cursor: default; }
.set-list .r-item:hover { background: transparent; }

/* ---------- install banner ---------- */
.install-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.install-nudge img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.install-nudge .in-txt { flex: 1; min-width: 0; }
.install-nudge b { display: block; font-size: 16px; }
.install-nudge span { font-size: 14px; color: var(--text-2); }
.ios-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.ios-steps svg { width: 18px; height: 18px; vertical-align: -3px; }

/* ===========================================================
   OVERLAYS
   =========================================================== */
.modal-back { background: rgba(0, 0, 0, .5); animation: fadeIn .2s var(--ease); }
.modal {
  border: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text);
  box-shadow: var(--shadow-lg); animation: modalIn .26s var(--ease-out);
}
.modal-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font: 400 18px var(--font-ui); }
.modal-foot { border-top: 1px solid var(--border); background: var(--panel); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.toast {
  border-radius: var(--r-md); background: #1A1A1A; color: #F1F1F1; font: 400 15px var(--font-ui);
  padding: 12px 16px; box-shadow: var(--shadow-lg);
  transition: opacity .2s var(--ease), transform .26s var(--ease-out);
}
[data-theme="dark"] .toast { background: #EDEDED; color: #1A1A1A; }

.ob-card, .notif-card, .chat-dock { border-radius: var(--r-lg); background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-lg); border: 0; }
.ob-ic { border-radius: 12px; background: var(--bg-inset); color: var(--text); }
.ob-rail-fill, .ob-dot.on { background: var(--primary); }
.ob-eyebrow { text-transform: none; letter-spacing: .01em; font-size: 14px; font-weight: 400; color: var(--text-2); }
.ob-title { font-family: var(--font-display); font-size: 28px; }
.ob-chip { border-radius: 8px; }
.chat-msg.mine .chat-bubble { background: var(--primary); color: var(--primary-text); }
.chat-bubble { border-radius: 16px 16px 16px 4px; }
.chat-msg.mine .chat-bubble { border-radius: 16px 16px 4px 16px; }

/* What's new (js/changelog.js) */
.cl-back .modal { max-width: 520px; }
.cl-lead { margin: 0 0 12px; color: var(--text-2); }
.cl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.cl-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; }
.cl-list li + li { border-top: 1px solid var(--border); }
.cl-list li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.cl-list b { font-size: 16px; }
.cl-list li > span:last-child > span { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.cl-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bg-inset); color: var(--text); }
.cl-ic .ic { width: 20px; height: 20px; }

/* the wordmark has white strokes, so on light surfaces it sits on ink */
.ob-logo, .admin .logo, .admin-gate-card .logo, .brand .logo {
  background: #1A1A1A; padding: 6px 10px; border-radius: 8px; box-sizing: content-box;
}
.ds-brand img, .lobby-bar .brand .logo, .hud-logo img { background: none; padding: 0; }

/* ===========================================================
   LEGAL PAGES, EVENTS, ADMIN
   =========================================================== */
.legal { color: var(--text); }
.legal h1 { font-size: 40px; }
.legal h2 { font-family: var(--font-ui); font-size: 20px; }
.admin-navi.active { background: var(--nav-active); color: var(--text); box-shadow: var(--shadow-sm); }
.admin-side { background: var(--nav-bg); }
.stat-card, .panel { border: 0; box-shadow: var(--shadow-card); border-radius: var(--r-lg); }
.sc-n { font-family: var(--font-cram); font-weight: 400; font-size: 44px; line-height: 1; }
.utable th { text-transform: none; letter-spacing: .01em; font-size: 13px; font-weight: 400; }
.code-chip { font-family: var(--font-num); }

/* ===========================================================
   CALL (room.html)
   Chrome is solid Polaris surfaces now, and the dock is a row of
   Material icon buttons: round, with a state layer, filled red
   when something is off, a red pill to leave.
   =========================================================== */
.call, .lobby2, .postcall { --tile: #E3E3E3; --tile-fg: #303030; }
[data-theme="dark"] .call, [data-theme="dark"] .lobby2, [data-theme="dark"] .postcall { --tile: #242424; --tile-fg: #EDEDED; }
.loader { background: #1A1A1A; }
.loader-logo { width: 170px; }
.lobby2 { background: var(--bg); }
.lobby-bar { background: var(--topbar); color: var(--topbar-text); padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 10px; }
.lobby-bar .brand img { max-height: 26px; }
.lobby-bar .icon-btn { color: #CCCCCC; }
.lobby-wrap { padding-top: 28px; }
.lobby-panel { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 24px; }
.lobby-panel h2 { font-size: 32px; }
.lobby-stage-card { border-radius: var(--r-lg); }
.lobby-code { border-radius: 8px; }
.gr-item { border-radius: 8px; }
#joinRoomBtn { height: 48px; font-size: 16px; }

.hud-pill, .dock, .side, .menu, .self-mini, .hand-queue, .wb-wrap, .preview-bar, .level-meter, .preview-off-label {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.hud-pill { border-radius: var(--r-lg); border: 0; box-shadow: var(--shadow-lg); }
.hud-title .nm { font-family: var(--font-ui); font-size: 15px; }
.hud-title .meta, #clock { font-family: var(--font-num); }
.badge-soft { text-transform: none; letter-spacing: .01em; font-weight: 400; font-size: 12px; border-radius: 6px; }
.hud-btn { border-radius: var(--r-full); font-weight: 400; font-size: 14px; }
.hud-btn.solid { background: var(--primary); color: var(--primary-text); }
/* Fixed pixel sizes on purpose: a percentage height inside the grid box
   could not resolve and let the 2510px-wide file render at full size. */
.hud-logo { display: flex; align-items: center; width: auto; height: 26px; padding: 0 8px; background: #1A1A1A; border-radius: 6px; overflow: hidden; }
.hud-logo img { width: auto; height: 16px; max-width: 80px; object-fit: contain; }

.dock { border-radius: 28px; border: 0; padding: 8px 10px; box-shadow: var(--shadow-lg); gap: 6px; }
/* no overflow:hidden here: it would clip the hover tooltip above */
.ctrl {
  isolation: isolate; height: 48px; min-width: 48px; padding: 0 16px;
  border-radius: var(--r-full); font-weight: 400; font-size: 14px;
  background: var(--tonal); color: var(--tonal-text);
}
.ctrl::before { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity var(--speed); border-radius: inherit; }
.ctrl:hover { background: var(--tonal); }
.ctrl:hover::before { opacity: .08; }
.ctrl:active { transform: none; }
.ctrl:active::before { opacity: .12; }
.ctrl.icon-only { width: 48px; }
.ctrl.off { background: var(--critical); color: #fff; }
.ctrl.off:hover { background: var(--critical); filter: none; }
.ctrl.active { background: var(--primary); color: var(--primary-text); }
.ctrl.leave { background: var(--critical); color: #fff; padding: 0 22px; }
.ctrl.leave:hover { filter: none; }
.ctrl.report { color: var(--critical); }
.ctrl.report:hover { background: var(--tonal); color: var(--critical); }
.ctrl .dot-badge { background: var(--accent); color: #fff; border-color: var(--panel); font-weight: 400; font-family: var(--font-num); }
.ctrl[data-tip]:hover::after { border-radius: 6px; font-weight: 400; background: #1A1A1A; color: #F1F1F1; }
.ctrl-caret { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); top: -2px; right: -2px; }
.ctrl.off + .ctrl-caret { background: var(--panel); color: var(--text); }
.dock-div { background: var(--border); }

.menu { border-radius: var(--r-lg); border: 0; box-shadow: var(--shadow-lg); padding: 6px; }
.menu-title { text-transform: none; letter-spacing: .01em; font-size: 13px; font-weight: 400; }
.menu-item { position: relative; overflow: hidden; isolation: isolate; border-radius: 8px; font-weight: 400; font-size: 15px; }
.side { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.tile { border-radius: var(--r-lg); }
.tile-name { font-weight: 400; font-size: 13px; background: rgba(26, 26, 26, .72); backdrop-filter: none; -webkit-backdrop-filter: none; }
/* initials use the regular cut: the compressed one turns "AM" into a block at small sizes */
.tile-avatar .av-circle, .preview-avatar .av-circle { font-family: var(--font-ui); font-weight: 400; font-size: clamp(18px, 2.4vw, 34px); letter-spacing: .02em; }
.tile.speaking::after { box-shadow: inset 0 0 0 3px var(--accent); }
.self-card { border-radius: var(--r-lg); }
.pc-card { border-radius: var(--r-lg); }

/* Phones: one row of five in the dock; the rest live in More (room.js). */
@media (max-width: 640px) {
  #shareBtn, #reactBtn, #handBtn, #layoutBtn, #bgBtn, #reportBtn, #peopleBtn, #micCaret { display: none !important; }
  .dock { flex-wrap: nowrap; justify-content: space-between; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); border-radius: 28px; }
  .dock-group { gap: 6px; }
  .ctrl { width: 48px; height: 48px; padding: 0; }
  .ctrl .lbl { display: none; }
  .ctrl.leave { width: auto; padding: 0 18px; }
  .ctrl.leave .lbl { display: inline; }
  .stage { padding-bottom: calc(86px + var(--safe-b)); }
  .self-card { bottom: calc(84px + var(--safe-b)); width: 112px; }
  .self-mini { bottom: calc(84px + var(--safe-b)); }
  .stage-shell[data-strip="bottom"] .filmstrip,
  .stage-shell[data-strip="right"] .filmstrip { bottom: calc(84px + var(--safe-b)); }
  .stage-shell[data-strip="bottom"] .stage { padding-bottom: calc(168px + var(--safe-b)); }
  .captions { bottom: calc(84px + var(--safe-b)); }
  .stage-shell[data-strip="bottom"] .captions { bottom: calc(168px + var(--safe-b)); }
  .ptt-chip { bottom: calc(84px + var(--safe-b)); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .stage .tile-hover, .filmstrip .tile-hover { display: none; }
  .self-card .tile-hover, .self-card .tile-foot { display: none; }
  .self-tools { top: 4px; right: 4px; gap: 3px; }
  .self-tools button { width: 28px; height: 28px; }
  /* the people/chat/info sheet stops above the dock so the chat box shows */
  .side {
    bottom: calc(80px + var(--safe-b)); left: 8px; right: 8px; width: auto;
    height: min(64dvh, 520px); max-height: calc(100dvh - 150px - var(--safe-t) - var(--safe-b));
    border-radius: var(--r-xl); padding-bottom: 0;
  }
  .lobby-wrap { padding-top: 14px; }
  .lobby-panel { padding: 18px 16px; }
}

/* ===========================================================
   PHONES: dashboard
   Top bar, content, Material bottom navigation. Modals become
   sheets that rise from the bottom, Uber style.
   =========================================================== */
@media (max-width: 900px) {
  :root { --top-h: 56px; }
  .ds-brand { width: auto; }
  .ds-brand img { height: 22px; }
  .ds-search { display: none; }
  .ds-acct .acct-name, .ds-acct .plus-badge { display: none; }
  .ds-body { display: block; }
  .ds-nav { display: none; }
  .ds-main { padding: 16px max(12px, env(safe-area-inset-right, 0px)) calc(var(--bnav-h) + 24px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 30px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .layout { grid-template-columns: 1fr; gap: 12px; }
  .stack { gap: 12px; }
  .card { border-radius: var(--r-lg); }
  .perks { grid-template-columns: repeat(3, 1fr); }
  .perk { padding: 12px 10px; }
  .perk b { font-size: 22px; }
  .perk span { font-size: 13px; }

  .ds-bnav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    background: var(--panel); box-shadow: 0 -1px 0 var(--border);
  }
  .ds-bnav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 0; background: transparent; color: var(--text-2); font: 400 12.5px var(--font-ui); padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .ds-bnav .pill {
    position: relative; overflow: hidden; isolation: isolate;
    width: 56px; height: 32px; border-radius: 16px; display: grid; place-items: center;
    transition: background-color .22s var(--ease);
  }
  .ds-bnav .pill .ic { width: 22px; height: 22px; }
  .ds-bnav button.on { color: var(--text); }
  .ds-bnav button.on .pill { background: var(--tonal); }

  .modal-back { padding: 0; place-items: end center; }
  .modal {
    max-width: none; width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheetRise .32s var(--ease-out);
  }
  .modal::before {
    content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; margin: 8px auto 0;
    background: var(--border-strong);
  }
  @keyframes sheetRise { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  .toast { bottom: calc(var(--bnav-h) + 16px + env(safe-area-inset-bottom, 0px)); }
  .chat-dock { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 330px) {
  .perks { grid-template-columns: 1fr; }
  .perk + .perk { border-left: 0; border-top: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  .view.on, .modal, .modal-back, .ripple { animation: none !important; }
}

/* ===========================================================
   SUPPORT (support.html, admin Support view)
   =========================================================== */
.th-msgs { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.th-msg { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.th-msg.mine { align-self: flex-end; align-items: flex-end; }
.th-who { font-size: 13px; color: var(--text-3); }
.th-body { padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--bg-inset); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
[data-theme="light"] .th-body { background: #F1F1F1; }
.th-msg.mine .th-body { border-radius: 16px 16px 4px 16px; background: var(--primary); color: var(--primary-text); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.ds-nav-item .dot { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font: 400 12px/20px var(--font-num); text-align: center; }
.diag-box { margin: 0; padding: 12px; border-radius: var(--r-md); background: var(--bg-inset); font: 400 12.5px/1.5 ui-monospace, Consolas, monospace; max-height: 260px; overflow: auto; white-space: pre-wrap; }
.tk-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tk-row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; color: var(--text); font: inherit; }
.tk-row:hover { background: var(--surface-hover); }
.tk-row.active { background: var(--nav-active); box-shadow: inset 3px 0 0 var(--primary); }
.tk-row .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tk-row b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row small { color: var(--text-2); font-size: 13px; }
@media (max-width: 900px) { .tk-grid { grid-template-columns: 1fr; } }

/* ===========================================================
   LIVE NOW (featured event promo, js/live-promo.js)
   =========================================================== */
.live-promo {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-lg);
  background: var(--panel); box-shadow: var(--shadow-card);
}
.live-promo .lp-art {
  flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: var(--ev, #303030); color: var(--on-ev, #fff); text-decoration: none; font: 400 26px/1 var(--font-display);
}
.live-promo .lp-art img { max-width: 80%; max-height: 80%; object-fit: contain; }
.live-promo .lp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.live-promo .lp-txt b { font-weight: 400; font-size: 16px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-promo .lp-txt small { color: var(--text-2); font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-promo .badge.live { display: inline-flex; align-items: center; gap: 6px; }
.live-promo .badge.live .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (max-width: 560px) {
  .live-promo { flex-wrap: wrap; }
  .live-promo .lp-txt { flex-basis: calc(100% - 160px); }
  .live-promo > .btn { flex: 1; }
}
