/* ============ base ============ */
:root {
  --hue: 230;
  --tw: 64px;                 /* tube width (JS-driven) */
  --th: 200px;                /* cap-4 tube height */
  --gap: 12px;
  --rowgap: 24px;
  --lift: 18px;
  --ink: #eef1ff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: #0b0e1a;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}

button { font-family: inherit; cursor: pointer; touch-action: manipulation; }

/* ============ background ============ */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(130% 90% at 50% -20%, hsl(var(--hue) 55% 24% / .85), transparent 62%),
    radial-gradient(130% 100% at 50% 125%, hsl(calc(var(--hue) + 50) 60% 15% / .8), transparent 58%),
    linear-gradient(180deg, #0d1122, #090b16);
  transition: background 1.2s ease;
}

.blob {
  position: absolute;
  width: 46vmin;
  height: 46vmin;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .17;
  will-change: transform;
}
.b1 { background: hsl(var(--hue) 90% 62%); top: -10%; left: -12%; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { background: hsl(calc(var(--hue) + 70) 85% 60%); bottom: -14%; right: -10%; animation: drift2 31s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(16vmin, 12vmin) scale(1.18); } }
@keyframes drift2 { to { transform: translate(-15vmin, -10vmin) scale(1.12); } }

.doodles {
  position: absolute;
  inset: -60px;
  opacity: .045;
  background-size: 220px 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M40 34 v52 a13 13 0 0 0 26 0 V34 M34 34 h38'/%3E%3Ccircle cx='152' cy='58' r='15'/%3E%3Cpath d='M232 26 l6.6 13.4 14.8 2.1-10.7 10.5 2.5 14.7-13.2-7-13.2 7 2.5-14.7-10.7-10.5 14.8-2.1z'/%3E%3Cpath d='M64 196 a13 13 0 0 1 26 0 a13 13 0 0 1 26 0 q0 19-26 32 q-26-13-26-32z'/%3E%3Cpath d='M206 182 q-16 26 0 40 q16-14 0-40z'/%3E%3Cpath d='M148 252 h36 m-18-18 v36'/%3E%3Ccircle cx='262' cy='140' r='9'/%3E%3Cpath d='M26 136 q11-14 22 0 q11 14 22 0'/%3E%3Cpath d='M256 254 v-26 m0 26 a9 9 0 1 0 9 9'/%3E%3C/svg%3E");
  animation: doodleFloat 70s linear infinite;
}
@keyframes doodleFloat { to { background-position: 300px 620px; } }

/* ============ app frame ============ */
#app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ============ HUD ============ */
#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 4px;
}

.hud-side { display: flex; gap: 7px; }

.hbtn {
  position: relative;
  width: 43px;
  height: 41px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffd257, #f09c0c);
  box-shadow: 0 3px 0 #a86f07, 0 7px 16px rgba(0, 0, 0, .38);
  color: #5b3606;
  display: grid;
  place-items: center;
  transition: transform .12s, box-shadow .12s, filter .2s, opacity .2s;
}
.hbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a86f07, 0 4px 10px rgba(0, 0, 0, .38); }
.hbtn[disabled] { filter: saturate(.15) brightness(.8); opacity: .55; pointer-events: none; }
.hbtn svg { width: 22px; height: 22px; }

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4d6d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.hud-center { flex: 1; min-width: 0; text-align: center; }

#levelTitle {
  font-size: clamp(17px, 4.8vw, 23px);
  font-weight: 900;
  letter-spacing: .1em;
  text-shadow: 0 2px 16px hsl(var(--hue) 80% 65% / .45);
  white-space: nowrap;
}
#levelTitle.pop { animation: titlePop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes titlePop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

#subline {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .62);
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.hud-stars { display: inline-flex; gap: 2px; }
.hud-stars .star { width: 15px; height: 15px; }
.hud-stars .star svg { width: 100%; height: 100%; display: block; }
.hud-stars .star.on svg path { fill: url(#starGold); stroke: rgba(255, 220, 120, .5); stroke-width: .8; }
.hud-stars .star.off svg path { fill: rgba(255, 255, 255, .12); stroke: rgba(255, 255, 255, .22); stroke-width: .8; }
.hud-stars.dip { animation: hudDip .45s ease; }
@keyframes hudDip { 30% { transform: translateY(3px) scale(.9); } }

/* ============ board & tubes ============ */
#board {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--rowgap);
  padding: 14px 10px calc(env(safe-area-inset-bottom, 0px) + 16px);
}

.row {
  display: flex;
  gap: var(--gap);
  align-items: flex-end;
  justify-content: center;
}

.slot {
  position: relative;
  width: var(--tw);
  height: var(--th);
}
.slot.enter { animation: slotIn .45s cubic-bezier(.3, 1.5, .5, 1) backwards; }
@keyframes slotIn { from { transform: translateY(14px) scale(.6); opacity: 0; } }

.tube {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--th);
  transition: transform .22s cubic-bezier(.34, 1.56, .5, 1);
  will-change: transform;
}
.tube.selected { transform: translateY(calc(var(--lift) * -1)); }

.rim {
  position: absolute;
  top: -2px;
  left: -5%;
  right: -5%;
  height: calc(var(--tw) * .15);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .14));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35), inset 0 -2px 3px rgba(0, 0, 0, .28);
}

.glass {
  position: absolute;
  inset: 0;
  border-radius: 10px 10px calc(var(--tw) / 2) calc(var(--tw) / 2);
  overflow: hidden;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, .14),
    rgba(255, 255, 255, .04) 35%,
    rgba(255, 255, 255, .02) 55%,
    rgba(255, 255, 255, .15));
  border: 2.5px solid rgba(255, 255, 255, .4);
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, .07),
    inset 0 -10px 18px rgba(0, 0, 0, .22),
    0 12px 24px rgba(0, 0, 0, .38);
}

.tube.done .glass {
  border-color: rgba(255, 222, 140, .8);
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, .1),
    0 0 22px rgba(255, 190, 80, .3),
    0 12px 24px rgba(0, 0, 0, .38);
}

.stack {
  position: absolute;
  left: calc(var(--tw) * .07);
  right: calc(var(--tw) * .07);
  bottom: calc(var(--tw) * .1);
  top: calc(var(--tw) * .16);
  display: flex;
  flex-direction: column-reverse;
  border-radius: 0 0 calc(var(--tw) / 2.5) calc(var(--tw) / 2.5);
  overflow: hidden;
}

.seg {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  background: var(--c);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c) 78%, #fff) 0%,
    var(--c) 30%,
    color-mix(in srgb, var(--c) 74%, #000) 100%);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .16), inset 0 -2px 3px rgba(0, 0, 0, .13);
}

.seg.top::after {
  content: '';
  position: absolute;
  left: 5%;
  right: 5%;
  top: 2px;
  height: 20%;
  max-height: 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0));
}

body.cb .seg::before {
  content: attr(data-sym);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .88);
  font-size: calc(var(--tw) * .3);
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

.gloss {
  position: absolute;
  top: 6%;
  bottom: 10%;
  left: 13%;
  width: 9%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .02));
  pointer-events: none;
}

.tube.hintg .glass {
  border-color: #ffd257;
  box-shadow:
    0 0 0 3px rgba(255, 210, 87, .28),
    0 0 26px rgba(255, 200, 80, .55),
    inset 0 0 14px rgba(255, 255, 255, .1);
  animation: hintPulse .85s ease-in-out 3;
}
@keyframes hintPulse {
  50% {
    box-shadow:
      0 0 0 7px rgba(255, 210, 87, .12),
      0 0 38px rgba(255, 200, 80, .75),
      inset 0 0 14px rgba(255, 255, 255, .1);
  }
}
body.noanim .tube.hintg .glass { animation: none; }

.tube.shake { animation: shake .32s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  44% { transform: translateX(6px); }
  66% { transform: translateX(-4px); }
  88% { transform: translateX(4px); }
}

.tube.pulse { animation: pulse .55s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pulse { 0% { transform: scale(1); } 42% { transform: scale(1.08); } 100% { transform: scale(1); } }

.spark {
  position: absolute;
  z-index: 45;
  color: #ffe9a8;
  text-shadow: 0 0 8px #ffce54;
  pointer-events: none;
  animation: sparkFloat .9s ease-out forwards;
}
@keyframes sparkFloat {
  from { transform: translateY(0) scale(.6); opacity: 1; }
  to { transform: translateY(-30px) scale(1.25); opacity: 0; }
}

.stream {
  position: absolute;
  z-index: 55;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  background: var(--c);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c) 40%);
  box-shadow: 0 0 9px rgba(0, 0, 0, .25);
}

/* ============ hint ============ */
#hint {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  width: max-content;
  max-width: 86vw;
  padding: 12px 20px;
  border-radius: 18px;
  background: rgba(24, 29, 56, .92);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  animation: hintBob 2.2s ease-in-out infinite;
}
@keyframes hintBob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }

/* ============ fx canvas ============ */
#fx {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

/* ============ overlays ============ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 16, .58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .25s;
}
.overlay.show { opacity: 1; }
.overlay[hidden] { display: none; }

.card {
  width: min(88vw, 380px);
  max-height: 84dvh;
  overflow: auto;
  border-radius: 26px;
  padding: 24px 22px calc(20px + env(safe-area-inset-bottom, 0px) / 2);
  background: linear-gradient(165deg, rgba(48, 56, 100, .95), rgba(20, 24, 47, .97));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  text-align: center;
  transform: translateY(16px) scale(.95);
  transition: transform .3s cubic-bezier(.3, 1.4, .4, 1);
}
.overlay.show .card { transform: none; }

.card-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .55);
}

.praise {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: .01em;
  margin: 2px 0 6px;
  background: linear-gradient(180deg, #ffe9a3, #ffb830);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 12px rgba(255, 185, 60, .35));
}

.trophy-wrap { position: relative; display: inline-block; margin: 4px 0 2px; }
.trophy { width: 110px; height: 110px; filter: drop-shadow(0 10px 22px rgba(255, 170, 40, .35)); animation: trophyIn .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes trophyIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.t-spark { position: absolute; color: #fff3c4; text-shadow: 0 0 10px #ffd257; animation: tspark 1.6s ease-in-out infinite; }
.t-spark.s1 { top: 4px; left: -12px; font-size: 15px; }
.t-spark.s2 { top: 40px; right: -16px; font-size: 12px; animation-delay: .4s; }
.t-spark.s3 { top: -8px; right: 6px; font-size: 10px; animation-delay: .9s; }
@keyframes tspark { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }

.win-stars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  height: 92px;
  margin: 10px 0 4px;
}
.wstar { width: 58px; height: 58px; }
.wstar svg { width: 100%; height: 100%; display: block; }
.wstar svg path { fill: rgba(255, 255, 255, .08); stroke: rgba(255, 255, 255, .18); stroke-width: .8; }
.wstar.ws1 { transform: rotate(-10deg); }
.wstar.ws2 { width: 74px; height: 74px; margin-bottom: 10px; }
.wstar.ws3 { transform: rotate(10deg); }
.wstar.earn svg path { fill: url(#starGold); stroke: #b8791a; stroke-width: .6; }
.wstar.earn {
  filter: drop-shadow(0 6px 18px rgba(255, 180, 50, .45));
  animation: starPop .55s cubic-bezier(.3, 1.6, .5, 1) backwards;
}
@keyframes starPop {
  0% { transform: scale(0) rotate(-40deg); opacity: 0; }
  60% { transform: scale(1.3); }
}
body.noanim .wstar.earn { animation: none; }

.win-goal { font-size: 15.5px; font-weight: 700; color: rgba(255, 255, 255, .78); margin: 2px 0 4px; }
.tagline { font-size: 13px; font-weight: 700; margin: 2px 0; }
.tagline.good { color: #9fe6b3; }
.tagline.warn { color: #ffc9a0; }
.win-card .btn.primary { margin-top: 14px; }

.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 800;
  transition: transform .12s, box-shadow .12s;
}
.btn.primary {
  background: linear-gradient(180deg, #ffd257, #f0a013);
  color: #5b3606;
  box-shadow: 0 4px 0 #a86f07, 0 12px 26px rgba(0, 0, 0, .35);
}
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #a86f07, 0 6px 14px rgba(0, 0, 0, .35); }
.btn.ghost {
  background: rgba(255, 255, 255, .08);
  color: #dfe6ff;
  border: 1px solid rgba(255, 255, 255, .16);
  margin-top: 10px;
}
.btn.ghost:active { background: rgba(255, 255, 255, .14); }
.btn.danger {
  background: rgba(255, 77, 109, .14);
  color: #ff9eb1;
  border: 1px solid rgba(255, 77, 109, .35);
  margin-top: 14px;
}
.btn.danger-armed { background: #ff4d6d; color: #fff; }
.btn.danger-solid {
  background: linear-gradient(180deg, #ff6b85, #e63a5c);
  color: #fff;
  box-shadow: 0 4px 0 #a02039, 0 10px 22px rgba(0, 0, 0, .35);
}
.btn.danger-solid:active { transform: translateY(2px); box-shadow: 0 1px 0 #a02039; }

.confirm-card { width: min(84vw, 330px); }
.confirm-text {
  margin: 6px 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .7);
}
.confirm-row { display: flex; gap: 10px; }
.confirm-row .btn { margin: 0; flex: 1; }

/* settings */
.card-title { font-size: 22px; font-weight: 900; margin-bottom: 14px; }
.card-sub {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin: 18px 0 8px;
  text-align: left;
}

.row-set {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 2px;
  font-size: 15.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.switch { position: relative; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.track {
  display: block;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  transition: background .2s;
}
.knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
.switch input:checked + .track { background: #f0a013; }
.switch input:checked + .track .knob { transform: translateX(20px); }

.lv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  max-height: 170px;
  overflow: auto;
  padding: 2px;
}
.lv {
  padding: 8px 0 6px;
  border-radius: 11px;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, .07);
  color: #cfd6f6;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}
.lv-st { font-size: 9.5px; letter-spacing: 1px; color: #ffd257; }
.lv-st i { font-style: normal; color: rgba(255, 255, 255, .18); }
.lv.done { background: rgba(255, 190, 80, .16); color: #ffd88a; }
.lv.cur { border-color: #ffd257; color: #fff; }

.credit {
  margin: 16px 0 2px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .45);
}

/* ============ account / friends ============ */
.friends-entry { margin: 0 0 16px; }

.seg-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, .07);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.seg-tabs .tab {
  flex: 1;
  border: none;
  border-radius: 9px;
  padding: 10px 0;
  background: transparent;
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
  font-weight: 800;
}
.seg-tabs .tab.on { background: rgba(255, 255, 255, .14); color: #fff; }

.inp {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .16);
  background: rgba(10, 13, 28, .6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}
.inp:focus { border-color: #f0a013; }
.inp.pin { letter-spacing: .5em; text-align: center; font-size: 20px; }
.inp::placeholder { color: rgba(255, 255, 255, .35); letter-spacing: normal; font-size: 14.5px; }

.showpin {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  margin: 2px 2px 10px;
}

.form-err {
  margin: 4px 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ff9eb1;
}

.auth-note {
  margin: 12px 0 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .45);
}

.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  margin-bottom: 12px;
}

.mini-btn {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #dfe6ff;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}
.mini-btn.gold { background: linear-gradient(180deg, #ffd257, #f0a013); color: #5b3606; border: none; }
.mini-btn:active { transform: translateY(1px); }
.mini-btn[disabled] { opacity: .5; }

.add-friend { display: flex; gap: 8px; align-items: center; }
.add-friend .inp { flex: 1; margin: 0; }

#lbWrap { margin: 14px 0 6px; max-height: 260px; overflow: auto; border-radius: 12px; }
.lb { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lb td, .lb th { padding: 10px 8px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lb th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  position: sticky;
  top: 0;
  background: rgba(28, 33, 62, .97);
}
.lb td.num, .lb th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lb tr.me td { background: rgba(255, 190, 80, .1); color: #ffe4ad; font-weight: 800; }
.lb .rank { color: rgba(255, 255, 255, .45); width: 26px; }
.lb .rm { color: rgba(255, 255, 255, .3); background: none; border: none; font-size: 15px; padding: 2px 6px; }

/* ============ toast ============ */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  transform: translateX(-50%) translateY(16px);
  z-index: 65;
  background: rgba(22, 27, 50, .94);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ start screen ============ */
.start-card { padding-top: 30px; }
.start-logo {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 10px 26px rgba(90, 120, 255, .35));
  animation: trophyIn .6s cubic-bezier(.3, 1.6, .5, 1);
}
.start-title {
  font-size: 33px;
  font-weight: 900;
  letter-spacing: .12em;
  margin: 8px 0 2px;
  background: linear-gradient(180deg, #ffffff, #a9b7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.start-sub {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 20px;
}
.start-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .42);
}
body.native-app .start-tip { display: none; }

/* ============ animations off (settings toggle, default on) ============ */
body.noanim .blob, body.noanim .doodles, body.noanim #hint,
body.noanim .slot.enter, body.noanim #levelTitle.pop,
body.noanim .tube.pulse, body.noanim .spark, body.noanim .t-spark,
body.noanim .trophy, body.noanim .start-logo { animation: none; }
body.noanim .tube { transition-duration: .06s; }
body.noanim .overlay, body.noanim .card { transition-duration: .08s; }
