:root {
  --bg-1: #2a1f73;
  --bg-2: #160f40;
  --bg-3: #0d0928;
  --ink: #ffffff;
  --muted: #b6addf;
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.14);
  --line: rgba(255,255,255,.14);
  --gold: #ffc93c;
  --gold-2: #ff9f1c;
  --gold-edge: #c96a00;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-3);
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 60% at 50% 0%, #4a36b8 0%, transparent 60%),
    radial-gradient(80% 50% at 100% 100%, #3b1a6e 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
}
.backdrop::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
}

[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; }

.screen {
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) 14px calc(var(--safe-bottom) + 16px);
  display: flex; flex-direction: column;
  animation: screen-in .35s ease-out both;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.topbar h1 { flex: 1; margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .2px; text-align: center; }
.topbar-right { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  color: #fff; transition: transform .12s, background .2s;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { transform: scale(.92); background: var(--glass-2); }
.icon-btn.ghost { visibility: hidden; }
.home .topbar h1 { visibility: hidden; }

/* ---------- buttons ---------- */
.btn {
  --top: #6aa3ff; --bottom: #2f6bf0; --edge: #1b45b0;
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 62px; padding: 0 22px; border-radius: 20px;
  font-size: 19px; font-weight: 800; letter-spacing: .2px;
  color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18);
  background: linear-gradient(180deg, var(--top), var(--bottom));
  box-shadow: 0 6px 0 var(--edge), 0 14px 24px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .1s, box-shadow .1s, filter .2s;
}
.btn::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: 5px; height: 40%;
  border-radius: 14px 14px 30px 30px; background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,0));
  pointer-events: none;
}
.btn svg { width: 26px; height: 26px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge), 0 5px 10px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.35); }
.btn:disabled { filter: grayscale(.8) brightness(.7); }
.btn-gold { --top: #ffd85a; --bottom: #ff9f1c; --edge: #c25e00; color: #4a2300; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn-blue { --top: #6aa3ff; --bottom: #2f6bf0; --edge: #1b45b0; }
.btn-green { --top: #4fe08e; --bottom: #15a854; --edge: #0b7038; }
.btn-ghost { --top: rgba(255,255,255,.16); --bottom: rgba(255,255,255,.08); --edge: rgba(0,0,0,.35); }
.btn.wide { width: 100%; }

/* ---------- home ---------- */
.home { justify-content: flex-start; }
.logo { text-align: center; margin-top: 4px; }
.logo-word { display: flex; justify-content: center; gap: 4px; }
.logo-word span {
  font-size: clamp(58px, 19vw, 92px); font-weight: 900; line-height: 1;
  color: var(--c);
  text-shadow: 0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff,
    0 7px 0 var(--d), 0 14px 20px rgba(0,0,0,.45);
  display: inline-block;
  animation: letter 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * .15s);
}
@keyframes letter { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 80% { transform: translateY(-10px) rotate(-4deg); } 90% { transform: translateY(0) rotate(2deg); } }
/* legacy */
.logo-sub {
  margin-top: 10px; font-weight: 900; font-size: 18px; letter-spacing: 12px; padding-left: 12px;
  color: var(--gold);
}
.hero { position: relative; flex: 1; min-height: 150px; max-height: 330px; margin: 6px 0 22px; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-dice { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%) scale(1.05); }
.menu { display: grid; gap: 18px; }
.home .logo { margin-top: auto; }
.foot { margin-bottom: auto !important; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; }

/* ---------- cards / setup ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
  border: 1px solid var(--line);
  border-radius: 24px; padding: 20px 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  margin-top: 8px;
}
.card h2 { margin: 0 0 6px; font-size: 22px; }
.muted { color: var(--muted); margin: 0 0 16px; line-height: 1.45; font-size: 15px; }
.seat-list { display: grid; gap: 10px; }
.seat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 18px;
  background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.08);
  transition: opacity .2s;
}
.seat-row b { flex: 1; font-size: 16px; }
.seat-row b.muted { margin: 0; }
.seat-row.off .seat-chip, .seat-row.off b { opacity: .35; }
.seat-chip {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--cl) 22%, var(--c) 55%, var(--cd));
  box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.35);
}
.seg { display: flex; background: rgba(0,0,0,.28); border-radius: 13px; padding: 3px; gap: 2px; }
.seg button {
  padding: 8px 11px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted);
  transition: background .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--c); color: #fff; box-shadow: 0 3px 0 var(--cd); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.seg button[data-kind="off"][aria-pressed="true"] { background: #4b4570; box-shadow: 0 3px 0 #2c2850; }
.setup-note { text-align: center; color: var(--muted); margin: 16px 0 18px; font-weight: 600; }
.setup-note.warn { color: #ff8a98; }

/* ---------- game ---------- */
.game { padding-bottom: calc(var(--safe-bottom) + 8px); }
.table { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; }
.game .hint { margin-bottom: auto; }
.seats { width: var(--board); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game { --board: min(calc(100vw - 20px), calc(100dvh - 300px - var(--safe-top) - var(--safe-bottom)), 540px); }

.pcard {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  height: 70px; padding: 0 8px 0 9px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 2px solid rgba(255,255,255,.08);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1), background .3s, border-color .3s, box-shadow .3s;
  min-width: 0;
}
.pcard.right { flex-direction: row-reverse; padding: 0 9px 0 8px; text-align: right; }
.pcard.empty { visibility: hidden; }
.pcard.active {
  transform: scale(1.03);
  border-color: var(--c);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 40%, transparent), color-mix(in srgb, var(--cdd) 55%, transparent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent), 0 10px 30px color-mix(in srgb, var(--c) 45%, transparent);
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-weight: 900; font-size: 20px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: radial-gradient(circle at 35% 28%, var(--cl), var(--c) 55%, var(--cd));
  box-shadow: 0 0 0 2.5px #fff, 0 4px 10px rgba(0,0,0,.35);
}
.avatar svg { width: 26px; height: 26px; }
.avatar svg circle[fill="#1b1442"] { fill: var(--cd); }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pinfo b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; gap: 4px; }
.right .dots { justify-content: flex-end; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); transition: background .3s, transform .3s; }
.dots i.home { background: var(--c); box-shadow: 0 0 0 1.5px #fff; transform: scale(1.15); }
.dice-slot {
  width: 54px; height: 54px; flex: none; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.22);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35);
  position: relative;
}
.dice-slot:empty::after {
  content: ""; width: 18px; height: 18px; border-radius: 6px; border: 2px dashed rgba(255,255,255,.18);
}
.dice-slot.ready { cursor: pointer; animation: ready 1s ease-in-out infinite; }
.dice-slot.ready::before {
  content: ""; position: absolute; inset: -5px; border-radius: 20px;
  border: 3px solid #fff; opacity: .9;
  animation: ring 1s ease-out infinite;
}
@keyframes ready { 50% { transform: scale(1.08); } }
@keyframes ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

.board-wrap {
  position: relative; width: var(--board); aspect-ratio: 1;
  border-radius: 22px; padding: 7px;
  background: linear-gradient(145deg, #fff3d6, #d9b77a 45%, #a87a3d);
  box-shadow: 0 0 0 2px rgba(255,255,255,.25), 0 24px 50px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.7);
}
#board { display: block; width: 100%; height: 100%; border-radius: 16px; touch-action: manipulation; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.flash { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.flash-item {
  --c: #fff;
  grid-area: 1 / 1;
  padding: 10px 22px; border-radius: 999px;
  font-weight: 900; font-size: clamp(18px, 5vw, 24px); letter-spacing: .3px;
  color: #fff; background: var(--c);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  box-shadow: 0 0 0 3px #fff, 0 14px 30px rgba(0,0,0,.4);
  animation: flash 1.4s cubic-bezier(.2,1.4,.4,1) both;
  white-space: nowrap;
}
.flash-item.gold { background: linear-gradient(180deg, #ffd85a, #ff9f1c); color: #4a2300; text-shadow: none; }
.flash-item.bad { background: #e2364b; font-size: clamp(16px, 4.6vw, 21px); }
.flash-item.muted { background: #4b4570; }
.flash-item.hit { animation-name: flash-hit; }
@keyframes flash {
  0% { opacity: 0; transform: scale(.4) translateY(10px); }
  18% { opacity: 1; transform: scale(1.06); }
  30% { transform: scale(1); }
  78% { opacity: 1; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(-30px) scale(.96); }
}
@keyframes flash-hit {
  0% { opacity: 0; transform: scale(2) rotate(-8deg); }
  15% { opacity: 1; transform: scale(.95) rotate(-3deg); }
  25% { transform: scale(1.05) rotate(-4deg); }
  78% { opacity: 1; transform: rotate(-4deg); }
  100% { opacity: 0; transform: translateY(-26px) rotate(-4deg); }
}
.hint { text-align: center; min-height: 24px; margin: 14px 0 0; color: #e7e2ff; font-weight: 600; font-size: 16px; }

/* ---------- 3D dice ---------- */
.dice { --s: 40px; position: relative; width: var(--s); height: var(--s); perspective: 300px; }
.dice-shadow {
  position: absolute; left: 8%; right: 8%; bottom: -9px; height: 10px; border-radius: 50%;
  background: rgba(0,0,0,.55); filter: blur(3px);
}
.cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.face {
  position: absolute; inset: 0; border-radius: 22%;
  background: radial-gradient(circle at 30% 25%, #ffffff, #f3f0fa 60%, #dcd6ec);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), inset 0 -3px 6px rgba(80,60,140,.18);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  padding: 15%;
  backface-visibility: hidden;
}
.face span { display: grid; place-items: center; }
.face span.pip::after {
  content: ""; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a3f7a, #1b1442);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.8);
}
.f1 span.pip::after { width: 100%; background: radial-gradient(circle at 35% 30%, #ff6b7d, #c8102e); }
.f1 { transform: translateZ(calc(var(--s) / 2)); }
.f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.f5 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.f3 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.f4 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.hero .dice { --s: clamp(64px, 20vw, 88px); }
.dice.landed .cube { animation: dice-pop .35s ease-out; }
@keyframes dice-pop { 40% { scale: 1.18; } }

/* ---------- win ---------- */
.win {
  position: fixed; inset: 0; z-index: 5;
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 40%, transparent), rgba(8,5,30,.82) 70%);
  animation: fade .4s ease-out both;
}
.win[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.win-card {
  width: min(100%, 380px); text-align: center;
  background: linear-gradient(180deg, #34298a, #1d1652);
  border: 2px solid rgba(255,255,255,.18); border-radius: 30px;
  padding: 26px 22px 24px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 6px color-mix(in srgb, var(--c) 35%, transparent);
  animation: pop .6s cubic-bezier(.2,1.5,.4,1) .1s both;
}
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(30px); } }
.crown { width: 96px; margin: -70px auto 6px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); animation: crown 2s ease-in-out infinite; }
@keyframes crown { 50% { transform: translateY(-6px) rotate(-3deg); } }
.win-card h2 { margin: 0; font-size: 34px; font-weight: 900; color: var(--gold); text-shadow: 0 3px 0 #7a3c00; }
.win-name { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin: 12px 0 6px; }
.win-actions { display: grid; gap: 16px; margin-top: 18px; }

/* ---------- dialog ---------- */
dialog {
  width: min(calc(100vw - 28px), 440px); max-height: 86dvh;
  border: 1px solid rgba(255,255,255,.16); border-radius: 26px; padding: 22px 20px 20px;
  color: #fff; background: linear-gradient(180deg, #33288a, #1c1550);
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
}
dialog[open] { animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
dialog::backdrop { background: rgba(8,5,30,.7); }
dialog h2 { margin: 0 0 12px; font-size: 24px; }
.rules { padding-left: 22px; margin: 0 0 20px; display: grid; gap: 10px; line-height: 1.45; color: #e6e1ff; }
.rules b { color: #fff; }
.star { color: var(--gold); }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }

@media (max-height: 700px) {
  .pcard { height: 60px; }
  .dice-slot { width: 48px; height: 48px; }
  .game { --board: min(calc(100vw - 20px), calc(100dvh - 260px), 540px); }
  .hero { height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ================= online ================= */
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.menu-row .btn { padding: 0 12px; font-size: 17px; gap: 8px; }
.center { text-align: center; }
.small { font-size: 13px; }
.conn {
  margin: 4px 0 0; padding: 8px 12px; border-radius: 12px; text-align: center;
  background: rgba(255, 180, 60, .14); color: #ffd58a; font-size: 14px; font-weight: 600;
}
.online .card, .lobby .card { margin-top: 14px; }
.online .card .btn.wide, .lobby .card .btn.wide { margin-top: 14px; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.profile-card .pinfo b { font-size: 18px; }
.seg-wide { display: grid; grid-template-columns: 1fr 1fr; }
.seg-wide button { padding: 11px; font-size: 15px; }
.seg button[aria-pressed="true"] { --c: #2f86ff; --cd: #1450c8; }
.online .seg button[aria-pressed="true"], .lobby .seg button[aria-pressed="true"] { background: #2f86ff; box-shadow: 0 3px 0 #1450c8; color: #fff; }
.join-row { display: flex; gap: 10px; margin-top: 14px; }
.join-row input, .field {
  flex: 1; min-width: 0; height: 58px; padding: 0 16px; border-radius: 16px;
  border: 2px solid rgba(255,255,255,.16); background: rgba(0,0,0,.28); color: #fff;
  font: inherit; font-size: 20px; font-weight: 800; letter-spacing: 3px; outline: none;
  user-select: text; -webkit-user-select: text;
}
.field { width: 100%; letter-spacing: .3px; margin: 4px 0 18px; }
.join-row input::placeholder, .field::placeholder { color: rgba(255,255,255,.35); letter-spacing: .5px; font-weight: 600; }
.join-row input:focus, .field:focus { border-color: #2f86ff; }
.join-row .btn { min-height: 58px; padding: 0 20px; }

/* search */
.search { align-items: stretch; }
.radar { position: relative; width: 190px; height: 190px; margin: 34px auto 26px; display: grid; place-items: center; }
.radar span {
  position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(47,134,255,.7);
  animation: radar 2.4s ease-out infinite; opacity: 0;
}
.radar span:nth-child(2) { animation-delay: .8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { from { transform: scale(.35); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.radar-core {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #8db8ff, #2f6bf0 60%, #1b45b0);
  box-shadow: 0 0 0 5px rgba(255,255,255,.9), 0 12px 30px rgba(0,0,0,.45);
  animation: ready 1.6s ease-in-out infinite;
}
.radar-core svg { width: 42px; height: 42px; color: #fff; }
.search h2 { margin: 0; font-size: 24px; }
.found { display: flex; justify-content: center; gap: 12px; margin: 18px 0 26px; }
.found i { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.14); transition: background .3s, transform .3s; }
.found i.me, .found i.on { background: var(--c); box-shadow: 0 0 0 2.5px #fff; transform: scale(1.1); }
.offer { display: grid; gap: 16px; margin-bottom: 18px; animation: pop .4s cubic-bezier(.2,1.4,.4,1); }
.offer p { margin: 0 0 4px; font-weight: 700; font-size: 17px; }
.search > .btn-ghost { margin-top: auto; }

/* lobby */
.center-card { text-align: center; }
.center-card .muted { margin: 0 0 10px; }
.code-tiles { display: flex; justify-content: center; gap: 7px; }
.code-tiles span {
  width: 44px; height: 56px; display: grid; place-items: center; border-radius: 12px;
  background: #fff; color: #1b1442; font-size: 30px; font-weight: 900;
  box-shadow: 0 4px 0 #b9b0dc, 0 8px 16px rgba(0,0,0,.3);
}
.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 20px; }
.row2 .btn { min-height: 54px; font-size: 17px; padding: 0 12px; gap: 8px; }
.row2 .btn svg { width: 22px; height: 22px; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lobby-head h2 { margin: 0; }
.seat-row .avatar { width: 34px; height: 34px; font-size: 16px; box-shadow: 0 0 0 2px #fff; }
.seat-row .avatar svg { width: 20px; height: 20px; }
.seat-row.waiting { border-style: dashed; border-color: rgba(255,255,255,.18); }
.seat-row.waiting .seat-chip { opacity: .45; width: 34px; height: 34px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tags em { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 8px; background: rgba(255,255,255,.12); color: #e7e2ff; }
.mini-btn {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,.12); font-weight: 800; font-size: 14px;
}
.mini-btn svg { width: 16px; height: 16px; }
.mini-btn.icon { padding: 8px; }
.mini-btn:active { transform: scale(.94); }
.dots-anim::after { content: ''; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.dialog-actions { display: grid; gap: 14px; margin-top: 6px; }
.update-notes { margin: 4px 0 18px; padding-left: 20px; color: #e7e2ff; line-height: 1.5; }
.update-notes li + li { margin-top: 4px; }

/* online cards in game */
.pcard { overflow: hidden; }
.avatar { position: relative; }
.me-badge {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  padding: 1px 6px; border-radius: 7px; background: #fff; color: #1b1442;
  font-size: 10px; font-weight: 900; letter-spacing: .5px; text-shadow: none; line-height: 1.4;
}
.pinfo b small { font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.2); vertical-align: 2px; }
.away-tag { display: none; font-size: 11px; font-weight: 700; color: #ffb3bd; }
.pcard.away .avatar { filter: grayscale(.8); opacity: .7; }
.pcard.away .away-tag { display: block; }
.pcard.away .dots { display: none; }
.ptimer { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); opacity: 0; transition: opacity .3s; }
.ptimer i { display: block; height: 100%; border-radius: 4px; background: #fff; transform-origin: left; }
.right .ptimer i { transform-origin: right; }
.pcard.timed .ptimer { opacity: 1; }
.pcard.timed.low .ptimer i { background: #ff4d5e; }

/* toast */
#toast {
  display: block; position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 26px); z-index: 20;
  max-width: calc(100vw - 40px); padding: 12px 20px; border-radius: 16px;
  background: #fff; color: #1b1442; font-weight: 700; text-align: center;
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
  transform: translate(-50%, 40px); opacity: 0; pointer-events: none;
  transition: transform .3s cubic-bezier(.2,1.4,.4,1), opacity .25s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

.get-app { color: var(--gold); font-weight: 800; text-decoration: none; border-bottom: 2px solid rgba(255,201,60,.4); padding-bottom: 2px; }
