/* ============================================================
   style.css — Am I Fizzed? v2
   ============================================================ */

:root {
  --bg0:#0e0c0a; --bg1:#14110e; --bg2:#1f1a15; --line:#352c22;
  --amber:#e8a33d; --amber2:#c9821e; --ember:#ff5a1f; --gold:#f4c430;
  --blue:#2f9bff; --blue2:#1e6fff;
  --ink:#f3ece1; --muted:#a4937c; --dim:#6f6253;
  --green:#4caf50; --yellow:#e8c33d; --orange:#ff8c1a; --red:#ff3b30; --deepred:#b71c1c;
  --card:#191512; --cardb:#2c241c;
  --font-scale: 1.08;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Barlow', sans-serif;
  font-size: calc(16px * var(--font-scale));
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% -5%, #2a2016 0%, transparent 50%),
    radial-gradient(90% 55% at 112% 102%, rgba(47,155,255,.07) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  background-attachment: fixed;
  min-height: 100dvh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(108px + env(safe-area-inset-bottom));
  position: relative; z-index: 1;
}

/* ---- brand ---- */
.brand { text-align: center; margin: 4px 0 2px; }
.logo {
  font-family: 'Lilita One', 'Arial Rounded MT Bold', 'Baloo 2', 'Trebuchet MS', sans-serif;
  font-size: 44px; line-height: .9; letter-spacing: .5px;
  color: var(--amber); -webkit-text-stroke: 2px #1a120a; paint-order: stroke fill;
  text-shadow: 0 3px 0 #1a120a, 0 0 26px rgba(47,155,255,.3);
  display: inline-block; transform: rotate(-1.5deg);
}
.logo .q { color: var(--ember); }
.tag {
  text-align: center; color: var(--muted);
  font-family: 'Oswald'; font-weight: 500; font-size: calc(12px * var(--font-scale));
  letter-spacing: 3px; text-transform: uppercase; margin: 0 0 14px;
}

/* ---- type ---- */
h2 {
  font-family: 'Oswald'; font-weight: 700; font-size: calc(20px * var(--font-scale));
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px; border-left: 3px solid var(--blue);
}
label {
  display: block; font-family: 'Oswald'; font-weight: 600; font-size: calc(13.5px * var(--font-scale));
  color: var(--muted); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: 1.5px;
}

/* ---- card ---- */
.card {
  background: var(--card); border: 1px solid var(--cardb); border-radius: 14px;
  padding: 18px; margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4), inset 0 2px 0 rgba(47,155,255,.28);
}

/* ---- inputs ---- */
input, select {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--cardb);
  background: #0f0d0b; color: #fff; font-family: 'Barlow'; font-size: calc(16px * var(--font-scale));
  font-weight: 600; outline: none;
}
input:focus { border-color: var(--amber); }
input::placeholder { color: #5e5346; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23a4937c'%3E%3Cpath d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.invalid { border-color: var(--red) !important; box-shadow: 0 0 0 2px rgba(255,59,48,.4) !important; animation: shake .3s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.gate-card { scroll-margin-bottom: 46vh; }
.gate-card .mini { font-size: calc(16px * var(--font-scale)); }
.gate-select {
  width: 100%; margin-bottom: 12px;
  border-color: var(--amber); background-color: #15100a; color: #fff;
  box-shadow: inset 0 2px 0 rgba(232,163,61,.22), 0 0 0 2px rgba(232,163,61,.16);
}
.gate-input {
  border-color: var(--amber);
  background: #15100a;
  box-shadow: inset 0 2px 0 rgba(232,163,61,.22), 0 0 0 2px rgba(232,163,61,.16);
  scroll-margin-bottom: 46vh;
}
.gate-input:focus {
  border-color: #ffd27a;
  box-shadow: 0 0 0 3px rgba(232,163,61,.34), 0 0 22px rgba(232,163,61,.18);
}

/* ---- buttons ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; cursor: pointer;
  font-family: 'Oswald'; font-weight: 700; font-size: calc(15px * var(--font-scale));
  text-transform: uppercase; letter-spacing: 1px; color: #1a130a;
  padding: 13px; border-radius: 11px;
  background: linear-gradient(180deg, var(--amber), var(--amber2));
  box-shadow: 0 4px 0 #7a4f12, 0 6px 14px rgba(0,0,0,.45);
  transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #7a4f12, 0 4px 10px rgba(0,0,0,.4); }
.btn.ember { background: linear-gradient(180deg,#e0673a,#c8430f); color: #160803; box-shadow: 0 4px 0 #8f2709, 0 6px 14px rgba(0,0,0,.45); }
.btn.ember:active { box-shadow: 0 2px 0 #8f2709, 0 4px 10px rgba(0,0,0,.4); }
.btn.ghost { background: #0f0d0b; color: var(--muted); border: 1px solid var(--cardb); box-shadow: none; font-size: calc(14px * var(--font-scale)); }
.btn.ghost:active { transform: scale(.97); }
.btn.big { font-size: calc(18px * var(--font-scale)); padding: 15px; }
.btn.fizzd { background: linear-gradient(180deg,#3aa869,#2c8a4d); color: #04210f; box-shadow: 0 4px 0 #1c6038, 0 6px 14px rgba(0,0,0,.45); }
.btn.fizzd:active { box-shadow: 0 2px 0 #1c6038, 0 4px 10px rgba(0,0,0,.4); }
.btn.end-night {
  background: linear-gradient(180deg,#ff7653,#d84324);
  color: #210803;
  border: 1px solid rgba(255,175,145,.55);
  box-shadow: 0 4px 0 #8f2715, 0 7px 18px rgba(216,67,36,.34);
}
.btn.end-night:active { box-shadow: 0 2px 0 #8f2715, 0 4px 10px rgba(0,0,0,.4); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.bars-btn {
  background: linear-gradient(180deg,#39a9ff,#1f6fd1);
  color: #041422;
  border: none;
  box-shadow: 0 4px 0 #164a8d, 0 6px 14px rgba(0,0,0,.45);
}
.btn.bars-btn:active { box-shadow: 0 2px 0 #164a8d, 0 4px 10px rgba(0,0,0,.4); }
.btn.half { font-size: calc(14px * var(--font-scale)); padding: 11px; box-shadow: 0 4px 0 #5a4a36, 0 6px 14px rgba(0,0,0,.35); }
.btn.half:active { box-shadow: 0 2px 0 #5a4a36; }
.cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.cta-row .btn {
  min-height: 52px;
  padding-left: 8px;
  padding-right: 8px;
  font-size: calc(17px * var(--font-scale));
}
@media (max-width: 340px) {
  .cta-row { grid-template-columns: 1fr; }
}
.endbtn { font-size: calc(13px * var(--font-scale)); padding: 9px; opacity: .8; max-width: 170px; margin: 0 auto; }
.btn .bars-icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: calc(24px * var(--font-scale));
  line-height: 1;
  transform: translateY(-1px);
}
.btn.big .bars-icons { font-size: calc(28px * var(--font-scale)); }

/* ---- mascot / BAC ---- */
.mascot {
  font-size: 78px; text-align: center; line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.5));
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%   { transform: translateY(0) rotate(-3deg); }
  25%  { transform: translateY(-6px) rotate(2deg); }
  50%  { transform: translateY(-10px) rotate(-2deg); }
  75%  { transform: translateY(-6px) rotate(3deg); }
  100% { transform: translateY(0) rotate(-3deg); }
}
.amilbl { text-align: center; font-family: 'Oswald'; font-weight: 600; font-size: calc(12px * var(--font-scale)); letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.status { text-align: center; font-family: 'Anton'; font-weight: 400; font-size: calc(30px * var(--font-scale)); line-height: 1.05; letter-spacing: .5px; color: #fff; margin-top: 2px; }
.bacline { text-align: center; font-family: 'Oswald'; font-weight: 600; font-size: calc(14px * var(--font-scale)); letter-spacing: .5px; color: var(--muted); margin-top: 8px; cursor: pointer; }
.bacline b { color: var(--amber); font-family: 'Anton'; font-size: calc(21px * var(--font-scale)); letter-spacing: 1px; vertical-align: -1px; }

/* ---- meter ---- */
.meter { height: 16px; border-radius: 30px; background: #0c0a08; border: 1px solid var(--cardb); overflow: hidden; margin: 14px 0 4px; position: relative; }
.meter .fill { height: 100%; width: 0%; transition: width .5s, background .5s; }
.meter .limit { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 2px; background: var(--blue); opacity: .85; box-shadow: 0 0 7px var(--blue); }
.meterlbl { display: flex; justify-content: space-between; font-family: 'Oswald'; font-size: calc(10px * var(--font-scale)); font-weight: 600; color: var(--dim); letter-spacing: 1px; }

/* ---- stats ---- */
.stats { display: flex; gap: 10px; margin-top: 14px; }
.stat { flex: 1; background: #0f0d0b; border: 1px solid var(--cardb); border-radius: 11px; padding: 11px 6px; text-align: center; }
.stat.session-time { color: inherit; cursor: pointer; font: inherit; }
.stat.session-time:active { transform: scale(.97); border-color: var(--blue); }
.stat b { font-family: 'Anton'; font-size: calc(24px * var(--font-scale)); display: block; color: #fff; }
.stat span { font-family: 'Oswald'; font-size: calc(10px * var(--font-scale)); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
#st-time { color: var(--blue); }

/* ---- banners ---- */
.banner { border-radius: 11px; padding: 12px 14px; margin-top: 12px; font-weight: 700; font-size: calc(14px * var(--font-scale)); display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.banner .ic { font-size: calc(21px * var(--font-scale)); flex-shrink: 0; }
.banner.swap { background: rgba(232,163,61,.1); border: 1px solid rgba(232,163,61,.4); }
.banner.warn { background: rgba(255,59,48,.14); border: 1px solid rgba(255,59,48,.5); animation: pulse 1.7s infinite; }
.banner.info { background: rgba(255,90,31,.12); border: 1px solid rgba(255,90,31,.4); font-size: calc(14.5px * var(--font-scale)); }
.banner.fizzed { background: rgba(255,59,48,.18); border: 1px solid rgba(255,90,31,.65); animation: pulse 1.3s infinite; font-size: calc(15px * var(--font-scale)); }
.hot-tip {
  touch-action: pan-y;
  user-select: none;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.hot-tip.dragging { transition: box-shadow .18s ease; }
.hot-tip.dismissing { pointer-events: none; }
.install-inline {
  margin-left: 8px;
  border: 1px solid rgba(232,163,61,.55);
  border-radius: 8px;
  background: rgba(232,163,61,.2);
  color: var(--ink);
  font-family: 'Oswald';
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,59,48,.4); } 50% { box-shadow: 0 0 0 7px rgba(255,59,48,0); } }

/* ---- chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0f0d0b; border: 1px solid var(--cardb);
  border-radius: 30px; padding: 9px 13px;
  font-family: 'Oswald'; font-weight: 600; font-size: calc(13px * var(--font-scale));
  margin: 6px 6px 0 0; cursor: pointer;
}
.chip:active { transform: scale(.95); }
.chip b { color: var(--amber); }
.chip.on { background: var(--gold); color: #1a130a; border-color: var(--gold); }

/* ---- log list ---- */
.list { list-style: none; }
.li { display: flex; align-items: center; gap: 10px; background: #0f0d0b; border: 1px solid var(--cardb); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; }
.li .em { font-size: 23px; }
.li .gr { flex: 1; min-width: 0; }
.li .gr b { font-family: 'Oswald'; font-weight: 600; font-size: calc(15px * var(--font-scale)); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .gr small { color: var(--muted); font-size: calc(14px * var(--font-scale)); font-weight: 600; }
.step { display: flex; align-items: center; gap: 8px; }
.step button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--cardb); background: #1a1612; color: #fff; font-size: calc(18px * var(--font-scale)); font-weight: 700; cursor: pointer; line-height: 1; }
.iconbtn { background: none; border: none; color: var(--muted); font-size: calc(18px * var(--font-scale)); cursor: pointer; padding: 4px; }
.star { font-size: calc(20px * var(--font-scale)); cursor: pointer; color: var(--dim); }
.star.on { color: var(--gold); }

/* ---- reminders ---- */
.reminder {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #0f0d0b; border: 1px solid var(--cardb); border-radius: 11px;
  padding: 12px; margin-top: 10px;
}
.reminder b {
  display: block; font-family: 'Oswald'; font-size: calc(15px * var(--font-scale));
  text-transform: uppercase; letter-spacing: .5px; color: var(--ink);
}
.reminder .mini { margin-top: 2px; }
.reminder > div:first-child { flex: 1; min-width: 0; }
.reminder .btn { width: auto; min-width: 86px; flex-shrink: 0; }
.reminder-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 380px) {
  .reminder { align-items: stretch; flex-direction: column; }
  .reminder-actions, .reminder .btn { width: 100%; }
}

/* ---- tabs ---- */
.tabs {
  position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 0; right: 0;
  z-index: 20; display: flex; justify-content: center;
  background: #100d0a; border-top: 1px solid var(--line); padding: 8px 4px 8px;
}
.tab {
  flex: 1; max-width: 100px; background: none; border: none; color: var(--dim);
  font-family: 'Oswald'; font-weight: 600; font-size: calc(10px * var(--font-scale)); text-transform: uppercase;
  letter-spacing: .5px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 5px;
}
.tab .ti { font-size: calc(21px * var(--font-scale)); transition: transform .15s; }
.tab.on { color: var(--amber); box-shadow: inset 0 2px 0 var(--amber); }
.tab.on .ti { filter: drop-shadow(0 0 8px var(--amber)); transform: translateY(-2px) scale(1.12); }

/* ---- screens ---- */
.screen { display: none; animation: fade .3s ease; }
.screen.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- modals ---- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.72); display: none; align-items: flex-end; justify-content: center; }
.modal.on { display: flex; animation: fade .2s ease; }
.sheet {
  width: 100%; max-width: 480px;
  background: linear-gradient(180deg, #221c16, #14110e);
  border-radius: 20px 20px 0 0; border-top: 1px solid var(--line);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 90dvh; overflow-y: auto;
  animation: up .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.grab { width: 42px; height: 5px; border-radius: 5px; background: var(--cardb); margin: 0 auto 14px; }
.inline-save { align-items: flex-end; gap: 10px; margin: 8px 0; }
.inline-save > div { flex: 1; }
.inline-save .btn { width: auto; min-width: 108px; margin-bottom: 1px; }
.custom-time-status { margin: -2px 0 8px; color: var(--amber); }
.custom-time-status.saved { color: #72d59a; }

/* ---- wheel picker ---- */
.wheelwrap { position: relative; margin-top: 8px; }
.wheel {
  position: relative; height: 228px; overflow-y: auto; scroll-snap-type: y proximity;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  scrollbar-width: none;
}
.wheel::-webkit-scrollbar { display: none; }
.wheelwrap.section-mode .wheel {
  height: 280px; mask-image: none; -webkit-mask-image: none;
  scroll-snap-type: none;
}
.wheelwrap.section-mode .wband { display: none; }
.wsection {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; margin: 7px 4px; padding: 0 14px;
  border: 1px solid var(--cardb); border-radius: 10px;
  background: #15110d; color: var(--amber); cursor: pointer;
  font-family: 'Oswald'; font-weight: 700; font-size: calc(16px * var(--font-scale));
  text-transform: uppercase; letter-spacing: .7px;
}
.wsection.open { border-color: var(--amber); background: rgba(232,163,61,.12); }
.wsection b { font-size: calc(22px * var(--font-scale)); }
.picker-section {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; margin: 7px 2px; padding: 0 14px;
  border: 1px solid var(--cardb); border-radius: 10px;
  background: #15110d; color: var(--amber); cursor: pointer;
  font-family: 'Oswald'; font-weight: 700; font-size: calc(16px * var(--font-scale));
  text-transform: uppercase; letter-spacing: .7px;
}
.picker-section.open { border-color: var(--amber); background: rgba(232,163,61,.12); }
.picker-section b { font-size: calc(22px * var(--font-scale)); }
.wheelpad { height: 94px; }
.wband {
  position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%);
  height: 42px; border-radius: 9px;
  border-top: 1px solid rgba(232,163,61,.5); border-bottom: 1px solid rgba(232,163,61,.5);
  background: rgba(232,163,61,.06); pointer-events: none; z-index: 1;
}
.witem {
  scroll-snap-align: center; display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 8px; cursor: pointer;
  font-family: 'Oswald'; font-weight: 600; color: var(--muted);
  transition: font-size .12s, color .12s, opacity .12s; white-space: nowrap;
}
.witem .wstar { font-size: calc(16px * var(--font-scale)); color: var(--dim); width: 20px; flex-shrink: 0; }
.witem .wstar.on { color: var(--gold); }
.witem .we { font-size: calc(20px * var(--font-scale)); flex-shrink: 0; }
.witem .wn { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.witem .wstd { font-family: 'Anton'; color: var(--muted); font-size: calc(13px * var(--font-scale)); }
.witem.w0 { font-size: calc(18px * var(--font-scale)); color: var(--ink); opacity: 1; }
.witem.w0 .we { font-size: calc(24px * var(--font-scale)); }
.witem.w0 .wstd { color: var(--muted); }
.witem.w1 { font-size: calc(15.5px * var(--font-scale)); color: var(--ink); opacity: .92; }
.witem.w2 { font-size: calc(14px * var(--font-scale)); opacity: .6; }
.witem.w3 { font-size: calc(12.5px * var(--font-scale)); opacity: .4; }
.witem.selected,
.witem.selected.w0,
.witem.selected.w1,
.witem.selected.w2,
.witem.selected.w3 {
  color: #d8ffe7; background: rgba(58,168,105,.2); opacity: 1;
  border: 1px solid rgba(88,214,142,.75); border-radius: 9px;
}
.witem.selected .wstd { color: #72d59a; }
.witem.selected::after {
  content: '✓'; color: #72d59a; font-weight: 900; margin-left: 2px;
}

/* ---- dropdown row (setup) ---- */
.pickrow { display: flex; gap: 8px; align-items: center; }
.pickbtn {
  flex: 1; padding: 13px 14px; border-radius: 10px;
  border: 1px solid var(--cardb); background: #0f0d0b;
  color: #fff; font-family: 'Barlow'; font-size: calc(16px * var(--font-scale)); font-weight: 600;
  text-align: left; cursor: pointer; outline: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative;
}
.pickbtn::after {
  content: '▾'; position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); color: var(--muted); font-size: calc(14px * var(--font-scale));
}
.pickbtn:focus, .pickbtn:active { border-color: var(--amber); }
.pickbtn.unpicked { color: var(--muted); border-color: var(--amber); box-shadow: inset 0 0 0 1px rgba(232,163,61,.18); }
.addmini {
  flex-shrink: 0; width: 42px; height: 46px; border-radius: 10px;
  border: 1px solid var(--cardb); background: #0f0d0b; color: var(--amber);
  font-size: calc(20px * var(--font-scale)); cursor: pointer;
}

/* ---- onboarding dots ---- */
.obdots { display: flex; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.obdot { width: 8px; height: 8px; border-radius: 50%; background: var(--cardb); transition: background .2s; }
.obdot.on { background: var(--amber); }
.obstepn { text-align: center; font-family: 'Oswald'; font-weight: 600; font-size: calc(12px * var(--font-scale)); color: var(--dim); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.ostep { display: none; }
.ostep.on { display: block; }
.obemoji { font-size: 52px; text-align: center; margin: 10px 0 6px; }
.obnav { display: flex; gap: 10px; margin-top: 18px; }
.obnav .btn { flex: 1; }

/* ---- scroll-filter bar (in add modal) ---- */
.filterbar { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.toggle {
  flex-shrink: 0; font-family: 'Oswald'; font-weight: 600; font-size: calc(12px * var(--font-scale));
  text-transform: uppercase; letter-spacing: 1px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--cardb); background: #0f0d0b; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.toggle.on { background: var(--gold); color: #1a130a; border-color: var(--gold); }
.scrolllist { max-height: 46dvh; overflow-y: auto; margin-top: 4px; }

/* ---- drink list row (board / founders modals) ---- */
.drow { display: flex; align-items: center; gap: 10px; padding: 11px 8px; border-bottom: 1px solid #221c16; cursor: pointer; }
.drow:active { background: #0f0d0b; }
.drow .em { font-size: 22px; }
.drow .nm { flex: 1; font-weight: 700; font-size: calc(15px * var(--font-scale)); }
.drow .std { font-family: 'Oswald'; color: var(--muted); font-size: calc(13px * var(--font-scale)); font-weight: 600; }
.grouphdr { font-family: 'Oswald'; font-weight: 700; font-size: calc(12px * var(--font-scale)); text-transform: uppercase; letter-spacing: 2px; color: var(--amber); margin: 14px 0 4px; }

/* ---- tests ---- */
.testgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tcard { background: #0f0d0b; border: 1px solid var(--cardb); border-radius: 13px; padding: 16px 12px; text-align: center; cursor: pointer; }
.tcard:active { transform: scale(.97); }
.tcard .te { font-size: 34px; }
.tcard .tn { font-family: 'Oswald'; font-weight: 700; font-size: calc(14px * var(--font-scale)); margin-top: 6px; text-transform: uppercase; letter-spacing: .5px; }
.tcard .td { font-size: calc(13px * var(--font-scale)); color: var(--muted); margin-top: 2px; font-weight: 600; }
.tcard-feature { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.tcard-feature .te { font-size: 36px; }
.tcard-feature .tn { font-size: calc(17px * var(--font-scale)); margin-top: 0; }
.tcard-feature .td { font-size: calc(14px * var(--font-scale)); margin-top: 2px; }
#testStage { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.bigtap { width: 100%; height: 170px; border-radius: 14px; border: none; font-family: 'Anton'; font-size: calc(30px * var(--font-scale)); color: #fff; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.numgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; }
.numbtn { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--cardb); background: #1a1612; color: #fff; font-family: 'Anton'; font-size: calc(30px * var(--font-scale)); cursor: pointer; }
.numbtn:disabled { opacity: .25; }
.padgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 280px; }
.pad { aspect-ratio: 1.4; border-radius: 14px; border: none; cursor: pointer; opacity: .55; transition: opacity .15s, transform .1s; }
.pad.lit { opacity: 1; transform: scale(1.04); }
.colbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.colbtn { padding: 16px; border-radius: 12px; border: 1px solid var(--cardb); background: #1a1612; color: #fff; font-family: 'Oswald'; font-weight: 700; font-size: calc(16px * var(--font-scale)); text-transform: uppercase; cursor: pointer; }
.verdict { font-family: 'Oswald'; font-weight: 700; font-size: calc(22px * var(--font-scale)); text-transform: uppercase; letter-spacing: 1px; }
.verdict.good { color: var(--green); }
.verdict.mid  { color: var(--yellow); }
.verdict.bad  { color: var(--red); }
.stroopword { font-family: 'Anton'; font-size: calc(54px * var(--font-scale)); letter-spacing: 1px; }

/* ---- home button ---- */
.homebtn {
  position: fixed; top: 10px; right: 10px; z-index: 30;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--cardb); background: rgba(20,16,12,.9);
  color: #fff; font-size: calc(20px * var(--font-scale)); cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.homebtn:active { transform: scale(.92); }

/* ---- app footer ---- */
.appfoot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  height: calc(22px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: #0c0a08; border-top: 1px solid var(--line);
  text-align: center; font-family: 'Oswald'; font-weight: 500;
  font-size: calc(11px * var(--font-scale)); letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim);
}

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; top: 16px;
  transform: translateX(-50%) translateY(-200%);
  z-index: 80;
  background: linear-gradient(180deg, #ff7a45, var(--ember));
  color: #1a0a04; font-family: 'Oswald'; font-weight: 700;
  font-size: calc(14.5px * var(--font-scale)); padding: 13px 18px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  max-width: 88%; text-align: center;
  transition: transform .4s cubic-bezier(.2,.9,.3,1);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---- misc ---- */
.disclaimer { font-size: calc(13px * var(--font-scale)); color: var(--dim); text-align: center; line-height: 1.55; font-weight: 600; margin-top: 8px; }
.mini { font-size: calc(15px * var(--font-scale)); color: var(--muted); font-weight: 600; margin-top: 4px; line-height: 1.55; }
a { color: var(--amber); }
.bac { text-align: center; }
.bac b { font-family: 'Anton'; font-size: calc(46px * var(--font-scale)); display: block; line-height: 1; color: var(--amber); letter-spacing: 1px; }
.bac small { color: var(--muted); font-family: 'Oswald'; font-weight: 600; letter-spacing: 2px; font-size: calc(11px * var(--font-scale)); }
.patternline { text-align: center; font-family: 'Oswald'; font-weight: 600; font-size: calc(12.5px * var(--font-scale)); color: var(--muted); margin-top: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--cardb); border-radius: 10px; padding: 8px; }
.patternline b { color: var(--amber); }
.gate-em { font-size: 60px; text-align: center; }
.swaprow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.swaprow span { font-family: 'Oswald'; font-weight: 600; font-size: calc(13px * var(--font-scale)); color: var(--muted); width: 88px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .5px; }
.swaprow input { flex: 1; }

/* ---- splash ---- */
#splash {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #0f1f38 0%, #1a2c46 16%, #5d3f20 38%, #8a5e2c 70%, #6e4a22 100%);
  transition: opacity .55s ease, visibility .55s ease;
}
#splash::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(90deg, rgba(255,220,150,.06) 0 14px, transparent 14px 28px);
}
#splash::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 40%, transparent 40%, rgba(0,0,0,.45));
}
#splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.sp-inner { position: relative; z-index: 1; text-align: center; padding: 0 24px; }
.sp-logo {
  font-family: 'Lilita One', 'Arial Rounded MT Bold', 'Baloo 2', 'Trebuchet MS', sans-serif;
  font-size: 72px; line-height: .9; color: var(--gold);
  -webkit-text-stroke: 3px #2a1709; paint-order: stroke fill; transform: rotate(-2deg);
  text-shadow: 0 5px 0 #2a1709, 0 0 40px rgba(47,155,255,.4);
  animation: pop .6s cubic-bezier(.2,1.4,.4,1) both;
}
.sp-logo span { color: var(--ember); }
.sp-tag {
  font-family: 'Oswald'; font-weight: 600; font-size: calc(14px * var(--font-scale)); letter-spacing: 5px; text-transform: uppercase;
  color: #f0d9b0; margin-top: 8px; animation: fade .6s .2s both;
}
.sp-bar { width: 200px; height: 14px; margin: 26px auto 0; border-radius: 30px; background: rgba(0,0,0,.4); border: 1.5px solid rgba(255,220,150,.35); overflow: hidden; }
.sp-fill {
  height: 100%; width: 0; border-radius: 30px;
  background: linear-gradient(90deg, var(--amber), var(--gold)); box-shadow: 0 0 12px var(--gold);
  animation: pour 1.7s ease-out forwards;
}
.sp-msg { font-family: 'Oswald'; font-weight: 500; font-size: calc(13px * var(--font-scale)); color: #e6cfa6; margin-top: 12px; min-height: 18px; }
@keyframes pop  { from { transform: rotate(-2deg) scale(.5); opacity: 0; } to { transform: rotate(-2deg) scale(1); opacity: 1; } }
@keyframes pour { from { width: 0; } to { width: 100%; } }

/* ---- install tip ---- */
.install-tip {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: linear-gradient(135deg, rgba(232,163,61,.15), rgba(47,155,255,.1));
  border-bottom: 1px solid rgba(232,163,61,.35);
  padding: 10px 44px 10px 14px;
  font-family: 'Barlow'; font-size: calc(13px * var(--font-scale)); font-weight: 600; line-height: 1.45;
  color: var(--ink); backdrop-filter: blur(8px);
}
.install-tip.on { display: block; }
.install-tip strong { color: var(--amber); }
.install-tip-close {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); font-size: calc(18px * var(--font-scale));
  cursor: pointer; padding: 4px; line-height: 1;
}
