:root {
  --sky: #1e9bf0;
  --sky-2: #5cc0f8;
  --sky-deep: #0a73c9;
  --sky-wash: #e6f4fe;
  --ink: #0c2a43;
  --ink-2: #4f6e88;
  --mist: #f2f9ff;
  --cloud: #ffffff;
  --line: #d5e8f7;
  --sun: #ffb21e;
  --sun-deep: #e08e00;
  --leaf: #14b27a;
  --rose: #ee4b6a;
  --violet: #8b5cf6;

  --r-pill: 999px;
  --r-panel: 22px;
  --r-tile: 16px;
  --r-input: 12px;

  --font-d: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-b: "Hind", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --top-h: 58px;
  --tabs-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--mist);
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sky-deep); }
:focus-visible { outline: 3px solid var(--sky-2); outline-offset: 2px; }
.num { font-family: var(--font-d); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.hidden { display: none !important; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--cloud);
  box-shadow: 0 0 0 1px var(--line);
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 0;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo svg { width: 34px; height: 34px; }
.logo b { font-family: var(--font-d); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.balance {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 10px; border-radius: var(--r-pill);
  background: var(--sky-wash); color: var(--ink); text-decoration: none;
  font-family: var(--font-d); font-weight: 700; font-size: 16px;
}
.balance i { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }

/* ---------- buttons ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: var(--sky); color: #fff; font-family: var(--font-d); font-weight: 700; font-size: 16px;
  text-decoration: none; transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--sky-wash); color: var(--sky-deep); }
.btn.line { background: transparent; color: var(--sky-deep); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sun { background: var(--sun); color: var(--ink); }
.btn.leaf { background: var(--leaf); }
.btn.rose { background: var(--rose); }
.btn.big { white-space: normal; text-align: center; line-height: 1.15; width: 100%; min-height: 54px; font-size: 19px; border-radius: 16px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn .sub { font-family: var(--font-b); font-weight: 500; font-size: 13px; opacity: .85; }
.btn.stack { flex-direction: column; gap: 0; line-height: 1.1; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--sky-wash); color: var(--sky-deep);
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- bottom tabs ---------- */
.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 20;
  width: min(480px, 100%);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 6px env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: #fff; border-top: 1px solid var(--line);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink-2); font-size: 12px; font-weight: 500;
}
.tabs a svg { width: 23px; height: 23px; }
.tabs a.on { color: var(--sky); font-weight: 600; }
.tabs a.wallet-tab span.disc {
  width: 54px; height: 54px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--sky); color: #fff;
  box-shadow: 0 0 0 5px #fff, 0 6px 16px rgba(30, 155, 240, .35);
}
.tabs a.wallet-tab svg { width: 26px; height: 26px; }

/* ---------- layout ---------- */
.page { padding: 14px 14px 8px; }
.page h1 { font-family: var(--font-d); font-weight: 800; font-size: 28px; line-height: 1.1; margin: 4px 0 14px; letter-spacing: -0.01em; }
.page h2 { font-family: var(--font-d); font-weight: 700; font-size: 21px; margin: 22px 0 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack-sm > * + * { margin-top: 8px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.panel.wash { background: var(--mist); border-color: transparent; }

/* ---------- home: live hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-panel);
  color: #fff; text-decoration: none; display: block;
  background: linear-gradient(170deg, #8fd6ff 0%, #45b1f5 45%, var(--sky) 100%);
  min-height: 236px; padding: 16px 18px 18px;
}
.clouds::before, .clouds::after {
  content: ""; position: absolute; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.75), rgba(255,255,255,0));
}
.clouds::before { width: 220px; height: 90px; left: -60px; top: 36px; }
.clouds::after { width: 260px; height: 110px; right: -80px; top: 110px; opacity: .6; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .live { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(12, 42, 67, .18); }
.hero .live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.hero .mult { position: relative; font-family: var(--font-d); font-weight: 800; font-size: 64px; line-height: 1; margin: 18px 0 2px; letter-spacing: -0.02em; text-shadow: 0 2px 18px rgba(10, 115, 201, .35); }
.hero .mult.crashed { color: #fff; }
.hero .state { position: relative; font-size: 15px; font-weight: 500; min-height: 22px; }
.hero .foot { position: relative; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero .title { font-family: var(--font-d); font-weight: 700; font-size: 20px; line-height: 1.1; }
.hero .title small { display: block; font-family: var(--font-b); font-weight: 500; font-size: 13px; opacity: .9; }
.hero .btn { background: #fff; color: var(--sky-deep); }
@keyframes pulse { 50% { opacity: .35; } }

.hist { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.hist::-webkit-scrollbar { display: none; }
.hist span {
  flex: none; font-family: var(--font-d); font-weight: 700; font-size: 13px;
  padding: 2px 9px; border-radius: var(--r-pill); background: var(--sky-wash); color: var(--sky-deep);
}
.hist span.hi { background: #fff3d6; color: var(--sun-deep); }
.hist span.lo { background: #fde8ec; color: var(--rose); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 12px 0 0; padding: 11px 13px; border-radius: 14px;
  background: #fff6e0; color: #6b4a00; font-size: 14px;
}
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }

.filters { display: flex; gap: 8px; margin: 0 0 12px; }
.filters button {
  border: 0; padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--mist); color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.filters button.on { background: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { text-decoration: none; color: var(--ink); display: block; }
.tile .art {
  position: relative; aspect-ratio: 1 / .82; border-radius: var(--r-tile); overflow: hidden;
  display: grid; place-items: center;
}
.tile .art svg { width: 58%; height: 58%; }
.tile.wide { grid-column: span 2; }
.tile.wide .art { aspect-ratio: 2.3 / 1; }
.tile.wide .art svg { width: 44%; height: 70%; }
.tile .name { font-family: var(--font-d); font-weight: 700; font-size: 17px; margin-top: 7px; line-height: 1.1; }
.tile .cap { font-size: 13px; color: var(--ink-2); }
.tile .tag {
  position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 600;
  padding: 1px 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.9); color: var(--sky-deep);
  display: inline-flex; align-items: center; gap: 5px;
}
.tile .tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); animation: pulse 1.4s infinite; }
.a-skyjet { background: linear-gradient(160deg, #9fdcff, var(--sky)); }
.a-colorwin { background: linear-gradient(120deg, #eaf6ff, #cfeafd); }
.a-mines { background: linear-gradient(160deg, var(--sky-deep), #0b5a9e); }
.a-dice { background: linear-gradient(160deg, #c9ebff, #8fd0fa); }
.a-limbo { background: linear-gradient(160deg, #173f63, var(--ink)); }
.a-coinflip { background: linear-gradient(160deg, #fff1cc, #ffd77a); }
.a-plinko { background: linear-gradient(160deg, #dff2ff, #a9dcfb); }

.invite-card {
  margin-top: 22px; padding: 18px; border-radius: var(--r-panel);
  background: var(--ink); color: #fff; display: grid; gap: 10px;
}
.invite-card h3 { margin: 0; font-family: var(--font-d); font-size: 22px; line-height: 1.15; }
.invite-card p { margin: 0; color: #bcd6ea; }
.invite-card .btn { justify-self: start; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .lbl { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input {
  min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 50px; padding: 0 14px; border-radius: var(--r-input);
  background: var(--mist); border: 1.5px solid transparent;
}
.input:focus-within { border-color: var(--sky); background: #fff; }
.input input, .input select { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 500; }
.input .pre { font-family: var(--font-d); font-weight: 700; color: var(--ink-2); font-size: 17px; }
.input .suf { color: var(--ink-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  border: 0; padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--sky-wash); color: var(--sky-deep); font-family: var(--font-d); font-weight: 700; font-size: 15px;
}
.chips button.on { background: var(--sky); color: #fff; }
.err { color: var(--rose); font-size: 14px; min-height: 20px; margin: -4px 0 8px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--mist); }
.seg button { border: 0; background: transparent; padding: 9px 6px; border-radius: var(--r-pill); font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(12, 42, 67, .12); }

.amount-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 8px; }
.amount-row > button {
  border: 0; border-radius: var(--r-input); background: var(--sky-wash); color: var(--sky-deep);
  font-family: var(--font-d); font-weight: 800; font-size: 17px;
}
.amount-row .input input { text-align: center; font-family: var(--font-d); font-weight: 700; font-size: 20px; }

/* ---------- sheet + toast ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(12, 42, 67, .45);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .18s;
}
.sheet {
  width: min(480px, 100%); max-height: 92dvh; overflow: auto;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: rise .22s cubic-bezier(.2, .8, .3, 1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { font-family: var(--font-d); font-size: 24px; margin: 0 0 12px; line-height: 1.15; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

#toast {
  position: fixed; left: 50%; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 10px); z-index: 60;
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  width: max-content; max-width: min(440px, calc(100% - 28px));
  padding: 11px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 500;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.win { background: var(--leaf); }
#toast.bad { background: var(--rose); }

.done { text-align: center; padding: 8px 0 4px; }
.done .check {
  width: 76px; height: 76px; margin: 6px auto 10px; border-radius: 50%;
  display: grid; place-items: center; background: #e2f7ee; color: var(--leaf);
  animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.done .check svg { width: 40px; height: 40px; }
.done .amt { font-family: var(--font-d); font-weight: 800; font-size: 40px; line-height: 1; }
.done dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; margin: 18px 0; padding: 14px; border-radius: 14px; background: var(--mist); font-size: 14px; }
.done dt { color: var(--ink-2); }
.done dd { margin: 0; text-align: right; font-weight: 600; word-break: break-all; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ---------- lists ---------- */
.list { display: grid; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--sky-wash); color: var(--sky-deep); }
.list .ico svg { width: 22px; height: 22px; }
.list .ico.out { background: #fff3d6; color: var(--sun-deep); }
.list .main { flex: 1; min-width: 0; }
.list .main b { display: block; font-weight: 600; }
.list .main small { color: var(--ink-2); font-size: 13px; }
.list .amt { text-align: right; font-family: var(--font-d); font-weight: 700; font-size: 17px; }
.list .amt small { display: block; font-family: var(--font-b); font-weight: 500; font-size: 12px; color: var(--ink-2); }
.plus { color: var(--leaf); }
.minus { color: var(--rose); }
.empty { text-align: center; padding: 36px 12px; color: var(--ink-2); }
.empty .btn { margin-top: 12px; }

.balance-card { border-radius: var(--r-panel); padding: 16px 18px; background: linear-gradient(150deg, var(--sky), var(--sky-deep)); color: #fff; margin-bottom: 14px; }
.balance-card small { opacity: .85; }
.balance-card .num { font-size: 36px; font-weight: 800; line-height: 1.1; }

.method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--sky); background: var(--sky-wash); }
.method .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--sky-deep); font-family: var(--font-d); font-weight: 800; font-size: 13px; }

/* ---------- game shell ---------- */
.gbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.gbar h1 { font-family: var(--font-d); font-weight: 800; font-size: 22px; margin: 0; margin-right: auto; }
.pill { padding: 3px 10px; border-radius: var(--r-pill); background: var(--sky-wash); color: var(--sky-deep); font-size: 13px; font-weight: 600; }
.stage { margin: 0 14px; border-radius: var(--r-panel); position: relative; overflow: hidden; }
.controls { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: var(--mist); border-radius: 12px; padding: 8px 10px; }
.stats small { display: block; color: var(--ink-2); font-size: 12px; }
.stats b { font-family: var(--font-d); font-size: 18px; }

/* sky jet */
.jet-stage { aspect-ratio: 16 / 11; background: linear-gradient(175deg, #a7e0ff 0%, #52b8f6 55%, var(--sky) 100%); color: #fff; }
.jet-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.jet-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.jet-center .mult { font-family: var(--font-d); font-weight: 800; font-size: 60px; line-height: 1; text-shadow: 0 2px 18px rgba(10, 115, 201, .35); }
.jet-center .mult.crashed { color: #fff; }
.jet-center .msg { font-weight: 600; font-size: 15px; margin-top: 4px; }
.jet-bar { width: 160px; height: 6px; margin: 10px auto 0; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.jet-bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.jet-stage.crashed { background: linear-gradient(175deg, #b6d9ef 0%, #7fb3d6 60%, #5f9dc7 100%); }
.hist-wrap { padding: 0 14px 8px; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.toggle input { width: 20px; height: 20px; accent-color: var(--sky); }
.players .item { padding: 8px 2px; }
.players .amt { font-size: 15px; }

/* color win */
.cw-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 16px; background: linear-gradient(150deg, var(--sky), var(--sky-deep)); color: #fff; }
.cw-top small { opacity: .85; }
.cw-top .period { font-family: var(--font-d); font-weight: 700; font-size: 18px; }
.cw-clock { font-family: var(--font-d); font-weight: 800; font-size: 40px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.balls { display: flex; gap: 6px; margin-top: 8px; }
.ball {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-d); font-weight: 800; color: #fff; font-size: 15px;
}
.ball.green { background: var(--leaf); }
.ball.red { background: var(--rose); }
.ball.green.violet { background: linear-gradient(135deg, var(--leaf) 50%, var(--violet) 50%); }
.ball.red.violet { background: linear-gradient(135deg, var(--rose) 50%, var(--violet) 50%); }
.cw-board { position: relative; padding: 14px; display: grid; gap: 12px; }
.cw-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cw-colors button, .cw-size button { border: 0; border-radius: 14px; min-height: 52px; color: #fff; font-family: var(--font-d); font-weight: 700; font-size: 17px; line-height: 1.05; }
.cw-colors button small, .cw-size button small { display: block; font-family: var(--font-b); font-size: 12px; font-weight: 500; opacity: .9; }
.bg-green { background: var(--leaf); }
.bg-red { background: var(--rose); }
.bg-violet { background: var(--violet); }
.cw-nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px; border-radius: 18px; background: var(--mist); }
.cw-nums .ball { width: 100%; height: auto; aspect-ratio: 1; font-size: 22px; border: 0; }
.cw-size { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cw-size .big { background: var(--sun); color: var(--ink); }
.cw-size .small { background: var(--sky); }
.cw-lock {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(2px); border-radius: 18px;
}
.cw-lock .num { font-size: 96px; font-weight: 800; color: var(--sky-deep); line-height: 1; }
table.hist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist-table th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.hist-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; }
.dot.green { background: var(--leaf); } .dot.red { background: var(--rose); } .dot.violet { background: var(--violet); }

/* mines */
.mines-stage { padding: 14px; background: linear-gradient(160deg, var(--sky-deep), #0b5a9e); }
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mines-grid button {
  aspect-ratio: 1; border: 0; border-radius: 12px; padding: 0;
  background: linear-gradient(160deg, #5cc0f8, #2aa4f2); box-shadow: inset 0 -4px 0 rgba(10, 60, 110, .25);
  display: grid; place-items: center; transition: transform .1s;
}
.mines-grid button:not(:disabled):active { transform: scale(.94); }
.mines-grid button:disabled { cursor: default; }
.mines-grid button.gem { background: #eaf6ff; box-shadow: none; animation: pop .25s; }
.mines-grid button.bomb { background: #ffe1e7; box-shadow: none; animation: pop .25s; }
.mines-grid button.ghost { opacity: .55; }
.mines-grid svg { width: 62%; height: 62%; }
.mines-info { display: flex; justify-content: space-between; color: #d5ecff; font-size: 14px; margin-top: 12px; }
.mines-info b { color: #fff; font-family: var(--font-d); font-size: 17px; }

/* dice */
.dice-stage { padding: 22px 18px 26px; background: var(--mist); text-align: center; }
.big-num { font-family: var(--font-d); font-weight: 800; font-size: 72px; line-height: 1; font-variant-numeric: tabular-nums; }
.big-num.win { color: var(--leaf); }
.big-num.lose { color: var(--rose); }
.track { position: relative; height: 14px; border-radius: 7px; margin: 26px 4px 8px; background: var(--rose); overflow: visible; }
.track .zone { position: absolute; top: 0; bottom: 0; background: var(--leaf); border-radius: 7px; }
.track .marker {
  position: absolute; top: -26px; transform: translateX(-50%);
  font-family: var(--font-d); font-weight: 700; font-size: 13px; background: var(--ink); color: #fff; padding: 1px 7px; border-radius: 8px;
  transition: left .45s cubic-bezier(.2, .8, .3, 1);
}
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); padding: 0 2px; }
input[type=range] { width: 100%; accent-color: var(--sky); height: 28px; }

/* limbo */
.limbo-stage { padding: 34px 18px; text-align: center; background: linear-gradient(160deg, #173f63, var(--ink)); color: #fff; }
.limbo-stage .big-num { font-size: 76px; }
.limbo-stage .big-num.win { color: #5ff0b6; }
.limbo-stage .big-num.lose { color: #ff8aa0; }
.limbo-stage p { margin: 8px 0 0; color: #bcd6ea; }

/* coin */
.coin-stage { padding: 30px 18px; background: linear-gradient(160deg, #fff6df, #ffe3a3); display: grid; place-items: center; perspective: 800px; }
.coin { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.coin .face {
  position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: grid; place-items: center;
  font-family: var(--font-d); font-weight: 800; font-size: 56px; color: #7a4d00;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--sun) 60%, var(--sun-deep));
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .35), 0 12px 24px rgba(160, 100, 0, .25);
}
.coin .face.tails { transform: rotateY(180deg); color: #fff; background: radial-gradient(circle at 35% 30%, #8fd6ff, var(--sky) 60%, var(--sky-deep)); box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .3), 0 12px 24px rgba(10, 115, 201, .25); }
.coin-result { margin-top: 16px; font-family: var(--font-d); font-weight: 700; font-size: 20px; min-height: 28px; }

/* plinko */
.plinko-stage { background: linear-gradient(170deg, #eff9ff, #cfeafd); }
.plinko-stage canvas { display: block; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.h2 { font-family: var(--font-d); font-weight: 700; font-size: 19px; margin: 4px 0 6px; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.steps li::marker { font-family: var(--font-d); font-weight: 800; color: var(--sky); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.code-box .num { font-size: 32px; font-weight: 800; letter-spacing: .12em; color: var(--sky-deep); }
.prof-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--sky); color: #fff; font-family: var(--font-d); font-weight: 800; font-size: 24px; }
.kv { display: grid; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--ink-2); }
.kv b { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.kv button { border: 0; background: none; color: var(--sky-deep); padding: 4px; display: grid; }
.kv button svg { width: 18px; height: 18px; }
.phone-pre { font-family: var(--font-d); font-weight: 700; color: var(--ink-2); padding-right: 8px; border-right: 1.5px solid var(--line); }

/* ---------- referral ---------- */
.refer-hero { border-radius: var(--r-panel); padding: 18px; background: linear-gradient(150deg, var(--sky), var(--sky-deep)); color: #fff; text-align: center; margin: 6px 0 14px; }
.refer-hero small { opacity: .85; }
.refer-hero .code { font-family: var(--font-d); font-weight: 800; font-size: 38px; letter-spacing: .1em; line-height: 1.1; }
.refer-hero .btn.ghost { background: rgba(255,255,255,.18); color: #fff; }
.stat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat2 .panel { padding: 14px 16px; }
.stat2 .num { font-family: var(--font-d); font-weight: 800; font-size: 26px; line-height: 1.1; margin-top: 2px; }

/* ---------- payment iframe sheet ---------- */
.pay-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--mist); height: 62dvh; max-height: 560px; }
.pay-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.pay-status { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 12px 0; padding: 12px; border-radius: 12px; background: var(--sky-wash); color: var(--sky-deep); font-weight: 600; }
.pay-status.ok { background: #e2f7ee; color: var(--leaf); }
.pay-status.bad { background: #fde8ec; color: var(--rose); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--sky-2); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#pay-open, #pay-close { display: block; width: 100%; text-align: center; margin-top: 10px; }

/* ---------- landing page ---------- */
.landing { min-height: 100dvh; padding: env(safe-area-inset-top, 0px) 18px 40px; background: linear-gradient(180deg, var(--sky-wash), #fff 40%); }
.lnav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.lhero { text-align: center; padding: 24px 0 28px; }
.lbadge { display: inline-block; background: #e2f7ee; color: var(--leaf); font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: var(--r-pill); margin-bottom: 18px; }
.lhero h1 { font-family: var(--font-d); font-weight: 800; font-size: 40px; line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em; color: var(--ink); }
.lhero p { color: var(--ink-2); font-size: 17px; max-width: 340px; margin: 0 auto 22px; }
.lhero .btn { margin-bottom: 10px; }
.lgames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 28px; }
.lgame { text-align: center; }
.lgame .art { aspect-ratio: 1; border-radius: var(--r-tile); display: grid; place-items: center; margin-bottom: 6px; }
.lgame .art svg { width: 56%; height: 56%; }
.lgame span { font-family: var(--font-d); font-weight: 700; font-size: 14px; }
.lfeat { display: grid; gap: 10px; margin-bottom: 20px; }
.lfeat div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.lfeat b { font-family: var(--font-d); font-size: 16px; }
.lfeat small { display: block; color: var(--ink-2); margin-top: 2px; }
