/* perk-theme.css - black / white / yellow + Inter - 2026-10-12
   For perk-center.html and perk-center-control.html ONLY.
   Linked LAST in <head>. Follows PERK-THEME-PROTOCOL.txt.
   Colors go through the pages' own CSS variables; status green/red and the
   figure-card art are left alone; monospace readouts stay monospace.
   Undo: remove the one <link> line from each page. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;650;700&display=swap');

:root {
  --bg-void: #000000;
  --bg-void-rgb: 0, 0, 0;
  --bg-panel: #0b0b0b;
  --bg-panel-rgb: 11, 11, 11;
  --bg-panel-raised: #141414;
  --teal-accent: #ffd60a;
  --teal-accent-rgb: 255, 214, 10;
  --teal-mid: #e0b800;
  --text-body: #ffffff;
  --text-dim: #a8a8a8;
  --radius-lg: 16px;
  --pf-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html,
html body {
  background: #000 !important;
  background-image: none !important;
  color: #fff;
}

/* one family everywhere (inline Orbitron / Rajdhani styles need !important) */
html body,
html body *,
html body *::before,
html body *::after,
html body input,
html body textarea,
html body select,
html body button {
  font-family: var(--pf-font) !important;
}
html body {
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ticking / numeric readouts stay monospace so digits never shift width */
html body .clock,
html body .dock-tally,
html body [style*="Courier"] {
  font-family: 'Courier New', Consolas, monospace !important;
}

/* titles: same family, bold */
html body h1,
html body h2,
html body h3,
html body .tile-title,
html body .dock-title,
html body .dock-student,
html body .bb-title,
html body .day-name,
html body .daysum-day,
html body .rail-title,
html body .gate-title,
html body .vs-btn,
html body .tile-kicker {
  font-weight: 650 !important;
  letter-spacing: -.01em;
}
html body .tile-title {
  font-size: 1.3em;
  line-height: 1.2;
  text-transform: none;
}

/* tiles: curved black card, yellow left edge and ring */
html body .glass {
  border-radius: 16px !important;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 214, 10, .14), transparent 55%),
    linear-gradient(165deg, #141414, #050505) !important;
  box-shadow:
    inset 6px 0 0 #ffd60a,
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 22px 40px -18px rgba(0, 0, 0, .95),
    0 0 0 1px rgba(255, 214, 10, .28) !important;
}
html body .karaoke-tile:hover .glass {
  box-shadow:
    inset 6px 0 0 #ffd60a,
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 30px 52px -18px rgba(0, 0, 0, 1),
    0 0 46px -4px rgba(255, 214, 10, .55) !important;
}
html body .tile-kicker {
  color: #000 !important;
  background: #ffd60a;
  display: inline-block;
  padding: .22em .65em .2em;
  border-radius: 999px !important;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* buttons and inputs */
html body .vs-btn:not(:disabled) {
  background: #ffd60a !important;
  color: #000 !important;
  border-radius: 10px !important;
}
html body .vs-btn:hover:not(:disabled) {
  box-shadow: 0 0 14px rgba(255, 214, 10, .6);
}
html body .reg-input {
  background: #0b0b0b !important;
  color: #fff !important;
  border-radius: 10px !important;
}
html body .reg-input:focus {
  border-color: #ffd60a !important;
  box-shadow: 0 0 8px rgba(255, 214, 10, .55) !important;
}
html body .auth-gate-tile {
  border-radius: 12px !important;
}

@media (prefers-reduced-motion: reduce) {
  html body .glass,
  html body .karaoke-tile { transition: none !important; animation: none !important; }
}

/* ---------- member field title: swirling professional glow ---------- */
html body .reg-field { position: relative; }
/* the real placeholder stays for screen readers but is drawn by .reg-glow */
html body .reg-input::placeholder { color: transparent !important; }
html body .reg-input {
  box-shadow: inset 0 0 14px rgba(255, 214, 10, .10);
  animation: regFieldPulse 7s ease-in-out infinite;
}
html body .reg-input:focus { animation: none; }
html body .reg-glow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 .6em;
  font-size: .65em;
  font-weight: 650;
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  background: linear-gradient(100deg, #b08a00 0%, #ffd60a 14%, #ffe97a 26%, #ffffff 36%, #fff3a8 44%, #ffd60a 56%, #ffb400 68%, #ffe45c 80%, #ffffff 88%, #ffd60a 94%, #b08a00 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 214, 10, .7)) drop-shadow(0 0 14px rgba(255, 214, 10, .35));
  animation: regGlowSwirl 11s linear infinite, regGlowBreathe 7s ease-in-out infinite;
  transition: opacity .2s ease;
}
html body .reg-input:not(:placeholder-shown) + .reg-glow { opacity: 0; }
@keyframes regGlowSwirl {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes regGlowBreathe {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 214, 10, .55)) drop-shadow(0 0 10px rgba(255, 214, 10, .25)); }
  50%      { filter: drop-shadow(0 0 8px rgba(255, 244, 168, .95)) drop-shadow(0 0 20px rgba(255, 214, 10, .6)); }
}
@keyframes regFieldPulse {
  0%, 100% { box-shadow: inset 0 0 12px rgba(255, 214, 10, .12), 0 0 0 rgba(255, 214, 10, 0); }
  50%      { box-shadow: inset 0 0 26px rgba(255, 214, 10, .28), 0 0 16px rgba(255, 214, 10, .22); }
}
@media (prefers-reduced-motion: reduce) {
  html body .reg-glow,
  html body .reg-input { animation: none !important; }
  html body .reg-glow { background-position: 40% 50%; }
}

/* ---------- zoom control now lives in the tile's upper left (where the title tag was) ---------- */
html body .glass .zoom-ctrl {
  position: static !important;
  display: inline-flex !important;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 0 .7em 0 !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  background: #0b0b0b !important;
  border: 1px solid rgba(255, 214, 10, .55) !important;
  box-shadow: 0 0 12px -2px rgba(255, 214, 10, .35) !important;
  color: #ffd60a !important;
}
html body .glass .zoom-ctrl::before {
  content: "Text size";
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  margin-right: 2px;
}
html body .glass .zoom-slider::-webkit-slider-runnable-track { background: rgba(255, 214, 10, .35); }
html body .glass .zoom-slider::-webkit-slider-thumb { background: #ffd60a; box-shadow: 0 0 8px rgba(255, 214, 10, .9); }
html body .glass .zoom-slider::-moz-range-track { background: rgba(255, 214, 10, .35); }
html body .glass .zoom-slider::-moz-range-thumb { background: #ffd60a; box-shadow: 0 0 8px rgba(255, 214, 10, .9); }

/* ---------- Award Points and Leaderboard: one glowing row, Award left, Leaderboard right ---------- */
html body #ctrlNav {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  margin-bottom: .9em !important;
}
html body #ctrlNav .lb-slider-btn {
  flex: 1 1 0 !important;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  padding: .55em .6em !important;
  font-size: .78em !important;
  font-weight: 650 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  color: #ffffff !important;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 214, 10, .16), transparent 62%),
    linear-gradient(165deg, #151515, #050505) !important;
  border: 1px solid rgba(255, 214, 10, .5) !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 14px -2px rgba(255, 214, 10, .45),
    0 0 34px -8px rgba(255, 214, 10, .35),
    inset 0 1px 0 rgba(255, 255, 255, .14) !important;
  transition: transform .35s cubic-bezier(.2, .9, .25, 1), box-shadow .35s ease, background .35s ease, color .35s ease !important;
  animation: tabGlowBreathe 7s ease-in-out infinite;
}
html body #ctrlNav .lb-slider-btn:hover {
  transform: translateY(-2px);
  color: #ffd60a !important;
  box-shadow:
    0 0 20px -2px rgba(255, 214, 10, .7),
    0 0 44px -6px rgba(255, 214, 10, .5),
    inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}
html body #ctrlNav .lb-slider-btn.active {
  color: #000000 !important;
  background: linear-gradient(135deg, #fff3a8 0%, #ffd60a 45%, #e0b800 100%) !important;
  border-color: #fff3a8 !important;
  box-shadow:
    0 0 22px rgba(255, 214, 10, .75),
    0 0 52px -4px rgba(255, 214, 10, .55),
    inset 0 1px 0 rgba(255, 255, 255, .55) !important;
}
@keyframes tabGlowBreathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  html body #ctrlNav .lb-slider-btn { animation: none !important; transition: none !important; }
}

/* ---------- the 3-stack under the tabs: Signed in as / Staged points / Award Tally ---------- */
html body .nav-meta {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  margin-top: 0;
}
html body .nav-meta .meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: .6em .95em;
  /* same size as the Back to dashboard button */
  font-size: .62rem !important;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffffff;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 214, 10, .12), transparent 60%),
    linear-gradient(165deg, #141414, #050505);
  border-radius: 14px;
  box-shadow:
    inset 5px 0 0 #ffd60a,
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 1px rgba(255, 214, 10, .3),
    0 0 18px -6px rgba(255, 214, 10, .35);
}
html body .nav-meta .meta-label { color: #a8a8a8; flex: 0 0 auto; }
html body .nav-meta .meta-value {
  flex: 1 1 auto;
  min-width: 0;
  color: #ffd60a;
  text-transform: none;
  letter-spacing: .02em;
  font-size: .62rem !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
html body .nav-meta .role-badge {
  font-size: .62rem !important;
  border-radius: 999px !important;
  padding: .2em .7em !important;
  background: #ffd60a !important;
  color: #000 !important;
  letter-spacing: .1em;
}
html body .nav-meta .pill {
  font-size: .8rem !important;
  border-radius: 999px !important;
  padding: .15em .8em !important;
  background: #ffd60a !important;
  color: #000 !important;
  border: 0 !important;
}

/* row 3: the green card, now a part of the stack instead of hanging from the top */
html body .nav-meta .hanging-green-dock {
  display: flex !important;
  position: static !important;
  transform: none !important;
  animation: none !important;
  width: 100% !important;
  max-width: none !important;
  top: auto !important;
  left: auto !important;
  z-index: auto !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: .75em .95em !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #12b886, #0b7a56) !important;
  border: 1px solid #34d399 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    0 0 22px -4px rgba(52, 211, 153, .6) !important;
  opacity: .6;
  transition: opacity .3s ease;
}
html body .nav-meta .hanging-green-dock.active { opacity: 1; }
html body .nav-meta .dock-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html body .nav-meta .dock-title,
html body .nav-meta .dock-student,
html body .nav-meta .dock-btn { font-size: .62rem !important; letter-spacing: .1em; }
html body .nav-meta .dock-tally { font-size: .8rem !important; }
html body .nav-meta .dock-note {
  flex: 0 0 auto !important;
  height: 38px !important;
  min-height: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  border-radius: 10px !important;
  font-size: .75rem;
}
html body .nav-meta .dock-actions { display: flex; gap: 8px; width: 100%; }
html body .nav-meta .dock-btn { flex: 1 1 0; border-radius: 10px !important; min-height: 38px; }
@media (prefers-reduced-motion: reduce) {
  html body .nav-meta .hanging-green-dock { transition: none; }
}

/* ---------- Instructor Passcode: label and field on ONE row ---------- */
html body #authGateTile {
  display: grid;                      /* inline display:none still hides it until a member is picked */
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  padding: .7em .95em !important;
  border-radius: 14px !important;
  border: 0 !important;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 214, 10, .12), transparent 60%),
    linear-gradient(165deg, #141414, #050505) !important;
  box-shadow:
    inset 5px 0 0 #ffd60a,
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 1px rgba(255, 214, 10, .3) !important;
}
/* label + lock sit in column one */
html body #authGateTile > div:first-child {
  margin: 0 !important;
  justify-content: flex-start !important;
  gap: 8px;
  font-size: .62rem !important;
  font-weight: 650;
  letter-spacing: .12em;
  color: #ffffff !important;
  white-space: nowrap;
}
/* the old input row dissolves so the field and button become grid cells beside the label */
html body #authGateTile > div:nth-child(2) { display: contents !important; }
html body #authGateTile #passcodeInput {
  height: 34px !important;
  font-size: .8rem !important;
  min-width: 0;
  border-radius: 10px !important;
}
html body #authGateTile #passcodeBtn {
  height: 34px !important;
  font-size: .62rem !important;
  padding: 0 1em !important;
  border-radius: 10px !important;
}
html body #authGateTile #passcodeStatus {
  grid-column: 1 / -1;
  margin: 0 !important;
  font-size: .62rem !important;
}

/* ================= ONE stacked tile: appears only after a member is picked ================= */
html body #stackTile { display: none !important; }
html body #stackTile.has-member { display: flex !important; }

/* the single tile (replaces the separate cards and the green hanging card) */
html body #stackTile {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  padding: .35em .95em .95em 1.15em !important;
  margin-top: .2em;
  border-radius: 16px !important;
  border: 0 !important;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 214, 10, .14), transparent 55%),
    linear-gradient(165deg, #141414, #050505) !important;
  box-shadow:
    inset 6px 0 0 #ffd60a,
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 22px 40px -18px rgba(0, 0, 0, .95),
    0 0 0 1px rgba(255, 214, 10, .3),
    0 0 26px -6px rgba(255, 214, 10, .35) !important;
}
/* every row inside is flat: hairline dividers only, no cards in cards */
html body #stackTile .meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: .55em 0 !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 214, 10, .18) !important;
  font-size: .62rem !important;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
html body #stackTile .meta-label { color: #a8a8a8; flex: 0 0 auto; }
html body #stackTile .meta-value {
  flex: 1 1 auto; min-width: 0; text-align: right;
  color: #ffd60a; text-transform: none; letter-spacing: .02em;
  font-size: .62rem !important;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* the former green card: no green, no card, just a container for the lower rows */
html body #stackTile .hanging-green-dock {
  display: flex !important;
  position: static !important;
  transform: none !important;
  animation: none !important;
  width: 100% !important;
  max-width: none !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html body #stackTile .dock-tally {
  background: #ffd60a !important;
  color: #000 !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: .75rem !important;
  padding: .15em .8em !important;
  white-space: nowrap;
}
html body #stackTile .pill {
  font-size: .8rem !important;
  border-radius: 999px !important;
  padding: .15em .8em !important;
  background: #ffd60a !important;
  color: #000 !important;
  border: 0 !important;
}
html body #stackTile .role-badge {
  font-size: .62rem !important;
  border-radius: 999px !important;
  padding: .2em .7em !important;
  background: #ffd60a !important;
  color: #000 !important;
}

/* passcode row inside the tile */
html body #stackTile #authGateTile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  margin: 0 !important;
  padding: .55em 0 !important;
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 214, 10, .18) !important;
  border-radius: 0 !important;
}

/* note row */
html body #stackTile .meta-note .dock-note {
  flex: 1 1 auto !important;
  min-width: 0;
  width: auto !important;
  height: 34px !important;
  min-height: 0 !important;
  border-radius: 10px !important;
  background: #0b0b0b !important;
  border: 1px solid rgba(255, 214, 10, .4) !important;
  color: #fff !important;
  font-size: .8rem !important;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 .7em;
}
html body #stackTile .meta-note .dock-note::placeholder { color: #8a8a8a; }
html body #stackTile .meta-note { border-bottom: 0 !important; }

/* one primary Confirm button, Clear stays as a quiet text link */
html body #stackTile .dock-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-top: .5em;
}
html body #stackTile .dock-btn-clear {
  flex: 0 0 auto;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #a8a8a8 !important;
  text-decoration: underline;
  font-size: .7rem !important;
  min-height: 0;
  padding: .4em .2em !important;
}
html body #stackTile .dock-btn-finalize {
  flex: 1 1 auto;
  min-height: 46px;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #fff3a8 0%, #ffd60a 45%, #e0b800 100%) !important;
  color: #000 !important;
  font-size: .85rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(255, 214, 10, .6), inset 0 1px 0 rgba(255, 255, 255, .55) !important;
}
html body #stackTile .dock-btn-finalize:disabled { opacity: .45; box-shadow: none !important; }

/* only ONE confirm: hide the second finalize strip inside the award panel */
html body #finalizeStrip { display: none !important; }

/* ---------- member dropdown, polished (v2): absolute inside the field, smooth, touch friendly ---------- */
html body .reg-field .mem-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 300;
  box-sizing: border-box;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 214, 10, .55) transparent;
  padding: 6px;
  background: linear-gradient(170deg, #121212, #060606);
  border: 1px solid rgba(255, 214, 10, .5);
  border-radius: 16px;
  box-shadow:
    0 28px 54px -14px rgba(0, 0, 0, .95),
    0 0 0 1px rgba(255, 214, 10, .12),
    0 0 30px -8px rgba(255, 214, 10, .35);
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  transition: opacity .16s ease, transform .18s cubic-bezier(.2, .9, .25, 1);
  -webkit-tap-highlight-color: transparent;
}
html body .reg-field .mem-list.open { opacity: 1; transform: none; }
html body .reg-field .mem-list[hidden] { display: none; }
html body .mem-list::-webkit-scrollbar { width: 8px; }
html body .mem-list::-webkit-scrollbar-thumb { background: rgba(255, 214, 10, .5); border-radius: 8px; }
html body .mem-list::-webkit-scrollbar-track { background: transparent; }

html body .mem-row {
  box-sizing: border-box;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: .55em .85em;
  border-radius: 12px;
  color: #fff;
  font-size: .95rem;
  line-height: 1.25;
  cursor: pointer;
  transition: background .12s ease;
  -webkit-tap-highlight-color: transparent;
}
html body .mem-row + .mem-row { margin-top: 2px; }
html body .mem-row.active,
html body .mem-row:hover {
  background: linear-gradient(90deg, rgba(255, 214, 10, .22), rgba(255, 214, 10, .08));
  box-shadow: inset 3px 0 0 #ffd60a;
}
html body .mem-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body .mem-id {
  flex: 0 0 auto;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: #ffd60a;
  background: rgba(255, 214, 10, .1);
  border: 1px solid rgba(255, 214, 10, .28);
  border-radius: 999px;
  padding: .2em .7em;
  white-space: nowrap;
}
html body .mem-row mark { background: transparent; color: #fff3a8; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 214, 10, .8); text-underline-offset: 3px; }
html body .mem-id mark { color: #fff; }
html body .mem-empty { padding: 1em; color: #a8a8a8; font-size: .9rem; text-align: center; }
html body .mem-loading { animation: memLoadingPulse 1.4s ease-in-out infinite; }
@keyframes memLoadingPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* phones: keep the keyboard from zooming the page (inputs must be 16px or larger) and give rows room */
@media (pointer: coarse), (max-width: 560px) {
  html body #regInput,
  html body #regInput ~ .reg-glow,
  html body #passcodeInput,
  html body #dockNoteInput { font-size: max(16px, .65em) !important; }
  html body #stackTile #authGateTile #passcodeInput,
  html body #stackTile .meta-note .dock-note { font-size: 16px !important; }
  html body .mem-row { min-height: 52px; font-size: 1rem; }
  html body .reg-field .mem-list { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .reg-field .mem-list { transition: none; transform: none; }
  html body .mem-loading { animation: none; }
}

/* ---------- the passcode reveal lives in the label row ---------- */
html body #stackTile #authGateTile .pass-title {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.15;
}
html body #stackTile #authGateTile .pass-hint {
  color: #ffd60a;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: none;
  text-shadow: 0 0 10px rgba(255, 214, 10, .55);
}

/* ================= ONE ROW: Signed in as | Awarding to | Staged points (proportional) ================= */
html body #stackTile.has-member {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.45fr) minmax(0, .75fr);
  column-gap: 0;
  align-items: stretch;
}
/* the old dock wrapper dissolves so its rows become cells of the same grid */
html body #stackTile .hanging-green-dock { display: contents !important; }

/* the three summary cells share one row, label on top, value under it */
html body #stackTile .meta-signed,
html body #stackTile .meta-member,
html body #stackTile .meta-staged {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label label" "value extra";
  align-content: center;
  align-items: center;
  row-gap: 5px;
  column-gap: 8px;
  min-height: 64px;
  padding: .7em .8em !important;
  border-bottom: 1px solid rgba(255, 214, 10, .22) !important;
  border-right: 1px solid rgba(255, 214, 10, .14) !important;
}
html body #stackTile .meta-staged { border-right: 0 !important; justify-items: start; }
html body #stackTile .meta-signed { padding-left: 0 !important; }
html body #stackTile .meta-label { grid-area: label; font-size: .62rem !important; }
html body #stackTile .meta-signed .meta-value,
html body #stackTile .meta-member .meta-value {
  grid-area: value;
  text-align: left;
  font-size: .85rem !important;
  font-weight: 650;
  color: #fff;
  letter-spacing: 0;
}
html body #stackTile .meta-signed .meta-value { color: #ffd60a; }
html body #stackTile .meta-signed .role-badge { grid-area: extra; }
html body #stackTile .meta-member .dock-tally {
  grid-area: extra;
  justify-self: end;
  font-size: .68rem !important;
  padding: .12em .6em !important;
}
html body #stackTile .meta-staged .pill {
  grid-area: value;
  font-size: 1.05rem !important;
  padding: .1em .75em !important;
}
/* everything under the summary row spans the full width */
html body #stackTile #authGateTile,
html body #stackTile .meta-note,
html body #stackTile .dock-actions { grid-column: 1 / -1; }

/* phones: tighten the proportions, let names ellipsize, tally drops under the name */
@media (max-width: 560px) {
  html body #stackTile.has-member { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .7fr); }
  html body #stackTile .meta-signed,
  html body #stackTile .meta-member,
  html body #stackTile .meta-staged { padding: .6em .55em !important; column-gap: 6px; }
  html body #stackTile .meta-member { grid-template-areas: "label label" "value value" "extra extra"; }
  html body #stackTile .meta-member .dock-tally { justify-self: start; }
  html body #stackTile .meta-signed { grid-template-areas: "label label" "value value" "extra extra"; }
  html body #stackTile .meta-signed .role-badge { justify-self: start; }
  html body #stackTile .meta-signed .meta-value,
  html body #stackTile .meta-member .meta-value { font-size: .8rem !important; }
}

/* ================= passcode FIRST; the summary row and Confirm appear only after it is verified ================= */
html body #stackTile #authGateTile { order: -1; }
html body #stackTile.has-member:not(.unlocked) .meta-signed,
html body #stackTile.has-member:not(.unlocked) .meta-member,
html body #stackTile.has-member:not(.unlocked) .meta-staged,
html body #stackTile.has-member:not(.unlocked) .dock-actions { display: none !important; }
html body #stackTile.has-member:not(.unlocked) #authGateTile { border-bottom: 0 !important; }
html body #stackTile.unlocked .meta-signed,
html body #stackTile.unlocked .meta-member,
html body #stackTile.unlocked .meta-staged,
html body #stackTile.unlocked .dock-actions { animation: stackReveal .35s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes stackReveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html body #stackTile.unlocked .meta-signed,
  html body #stackTile.unlocked .meta-member,
  html body #stackTile.unlocked .meta-staged,
  html body #stackTile.unlocked .dock-actions { animation: none; }
}

/* ================= layout nudge: tile down 15px overall, the animated title 40px higher (net) ================= */
html body .card-stack { margin-top: 15px !important; }
/* label was top:5px inside the stack; the stack itself moved down 15px, so -50px puts it 40px higher on the page */
html body .card-stack .menu-rect-label { top: -50px !important; }

/* ================= the member card IS the tile: name + Week + Lifetime on top, the stack rows live under it ================= */
html body #studentPill {
  display: block;
  position: relative;
  margin: .6em 0 .9em;
  padding: .9em 1.1em 1em 1.3em;
  border-radius: 16px !important;
  border: 0 !important;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 214, 10, .16), transparent 55%),
    linear-gradient(165deg, #141414, #050505) !important;
  box-shadow:
    inset 6px 0 0 #ffd60a,
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 22px 40px -18px rgba(0, 0, 0, .95),
    0 0 0 1px rgba(255, 214, 10, .3),
    0 0 26px -6px rgba(255, 214, 10, .35) !important;
}
html body #studentPill[style*="display: none"] { display: none !important; }
html body #studentPill .student-name-sm {
  color: #ffffff !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 0 0 .5em;
}
html body #studentPill .student-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
html body #studentPill .student-stats .pill {
  background: #ffd60a !important;
  color: #000 !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: .8rem !important;
  padding: .12em .75em !important;
}
html body #studentPill .stat-label {
  font-size: .62rem !important;
  font-weight: 650;
  letter-spacing: .12em;
  color: #a8a8a8 !important;
  text-transform: uppercase;
}
html body #studentPill .tier-badge {
  margin-left: auto;
  font-size: .62rem !important;
  font-weight: 700;
  letter-spacing: .12em;
  color: #ffd60a !important;
  border: 1px solid rgba(255, 214, 10, .5) !important;
  border-radius: 999px !important;
  padding: .15em .8em !important;
  background: rgba(255, 214, 10, .08) !important;
}
/* the stack stops being its own card: it is just the rows under the header */
html body #studentPill #stackTile {
  margin: .75em 0 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border-top: 1px solid rgba(255, 214, 10, .28) !important;
}
html body #studentPill #stackTile #authGateTile { border-top: 0 !important; }
html body #studentPill #stackTile .meta-signed { padding-left: 0 !important; }

/* the card grows in stages: it rises in when a member is found, the passcode row eases in, the summary row and Confirm follow after Verify */
html body #studentPill { animation: cardRise .38s cubic-bezier(.2, .9, .25, 1) both; }
html body #studentPill #authGateTile { animation: stackReveal .35s cubic-bezier(.2, .9, .25, 1) .08s both; }
@keyframes cardRise { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html body #studentPill,
  html body #studentPill #authGateTile { animation: none; }
}

/* ================= the member tile HANGS at the top while you scroll the awardable points list ================= */
/* 1) body was overflow-x:hidden / overflow-y:auto, which makes it a scroll container that never scrolls and blocks sticky.
      clip hides sideways overflow the same way WITHOUT creating a scroll container. */
html body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}
/* 2) a sticky element only sticks inside its parent, so the left column dissolves and the card's parent becomes the whole screen */
html body .nav-col { display: contents !important; }
/* 3) hang the card */
html body #studentPill {
  position: sticky !important;
  top: 10px;
  z-index: 60;
}
/* tidy the hairline the left column used to draw under the tabs */
html body #ctrlNav { padding-bottom: .5em !important; }
@media (max-width: 560px) { html body #studentPill { top: 6px; } }

/* once verified, the passcode row has done its job: fold it away so the hanging card stays compact and Confirm stays in reach */
html body #studentPill #stackTile.unlocked #authGateTile { display: none !important; }

/* ================= animated title: 15 percent larger overall (text, stones, diamonds, glow, all of it) ================= */
html body .card-stack .menu-rect-label {
  scale: 1.15;
  transform-origin: 50% 50%;
}
