/* Decision 62 (owner's 21 points, 2026-09-29): popups, room admin, scenes, plans, badges. Same "Mokiz Soft" rules as
   components.css (flat, 1px borders, soft shadows); game effects (glow, fireworks) only inside game scenes. */

/* ---------- popup (core/client/modal.js) ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: var(--space-4); background: rgba(15, 23, 42, 0.62); animation: modal-fade 160ms ease; }
.modal-card { position: relative; width: min(100%, 440px); max-height: calc(100dvh - 32px); overflow: auto; padding: var(--space-5); border-radius: var(--radius-l); background: var(--surface); color: var(--text); box-shadow: var(--shadow-3); text-align: center; animation: modal-pop 200ms ease; }
.modal-card.modal-wide { width: min(100%, 880px); text-align: left; }
.modal-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; }
.modal-x:hover { background: var(--surface-2); }
.modal-icon { font-size: 3rem; line-height: 1; margin-bottom: var(--space-2); }
.modal-title { font-size: var(--fs-2); margin: 0 0 var(--space-2); }
.modal-body { color: var(--text-muted); display: grid; gap: var(--space-2); justify-items: center; }
.modal-input { width: 100%; margin-top: var(--space-3); }
.modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-4); }
.modal-actions .btn { flex: 1 1 140px; }
.modal-out { opacity: 0; transition: opacity 160ms ease; }
.modal-count { font-size: 1.35rem; font-weight: var(--w-heavy); color: var(--c-orange-700); }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-pop { from { transform: scale(0.94); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-card { animation: none; } }

/* ---------- teacher: manage a player in the waiting room (rename / remove) ---------- */
.player { position: relative; }
.player-manage { margin-left: auto; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 1.2rem; font-weight: var(--w-heavy); line-height: 1; cursor: pointer; }
.player-manage:hover { background: var(--c-orange-100); color: var(--c-orange-700); border-color: #fdba74; }

/* ---------- waiting-room places (core/client/lobby-scenes.js) ---------- */
.lobby-stage-scene { background: #2e1065; border-color: transparent; box-shadow: var(--shadow-2); }
.lobby-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lobby-stage-scene .lobby-name { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.sc-beam { transform-box: fill-box; transform-origin: 50% 0; animation: sc-sway 6s ease-in-out infinite alternate; }
.sc-beam-1 { animation-duration: 7.5s; animation-delay: -2s; }
.sc-beam-2 { animation-duration: 5s; animation-delay: -4s; }
.sc-bulb:nth-of-type(odd) { animation: sc-blink 1.4s steps(2) infinite; }
.sc-cloud { animation: sc-drift 18s ease-in-out infinite alternate; }
.sc-flag, .sc-flags { transform-box: fill-box; transform-origin: 0 50%; animation: sc-wave-flag 2.4s ease-in-out infinite alternate; }
.sc-wave { animation: sc-water 3s ease-in-out infinite alternate; }
.sc-fan { animation: sc-hop 0.9s ease-in-out infinite alternate; }
.sc-fountain { animation: sc-hop 0.7s ease-in-out infinite alternate; }
@keyframes sc-sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes sc-blink { 50% { opacity: 0.35; } }
@keyframes sc-drift { to { transform: translateX(60px); } }
@keyframes sc-wave-flag { to { transform: skewY(6deg) scaleX(0.94); } }
@keyframes sc-water { to { transform: translateX(14px); } }
@keyframes sc-hop { to { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .lobby-scene * { animation: none !important; } }
html[data-motion="reduced"] .lobby-scene * { animation: none !important; }

/* ---------- game mode pictures + plan groups on the teacher dashboard (items 3, 12) ---------- */
.mode-art .mode-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: transform 250ms ease; }
.mode-card:hover .mode-svg, .mode-card[aria-pressed="true"] .mode-svg { transform: scale(1.04); }
.tier-group { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.tier-group.tier-plus { border-color: #c7d2fe; background: color-mix(in srgb, #6366f1 4%, var(--surface)); }
.tier-group.tier-premium { border-color: #fcd34d; background: color-mix(in srgb, #f59e0b 5%, var(--surface)); }
.tier-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: var(--w-strong); font-size: var(--fs-0); color: #fff; background: #16a34a; }
.tier-chip.tier-plus { background: var(--c-purple); }
.tier-chip.tier-premium { background: #d97706; }
.tier-title { font-weight: var(--w-strong); color: var(--text); }
.tier-ok { margin-left: auto; color: var(--ok); font-size: var(--fs-0); font-weight: var(--w-strong); }
.tier-unlock-btn { margin-left: auto; --btn: var(--surface); --btn-border: currentColor; color: var(--c-purple-700); }
.tier-premium .tier-unlock-btn { color: #b45309; }
.mode-locked .mode-art { filter: grayscale(0.7); opacity: 0.55; }
.mode-unlock { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: var(--w-strong); color: #fff; background: var(--c-purple); box-shadow: var(--shadow-1); }
.mode-unlock.tier-premium { background: #d97706; }
.mode-card { position: relative; }
.modal-body .mode-svg { width: 100%; height: auto; max-height: 180px; border-radius: var(--radius-m); }
@media (max-width: 560px) { .tier-group { padding: var(--space-3); } .tier-ok, .tier-unlock-btn { margin-left: 0; } }

/* ---------- packages page (#/plans, item 11) ---------- */
.plans-page { max-width: 1100px; margin: 0 auto; }
.plans-hero h1 { font-size: var(--fs-4); margin: 0; }
.plan-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: stretch; }
.plan-col { position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.plan-col h2 { margin: 0; font-size: var(--fs-3); }
.plan-col-plus { border: 2px solid var(--c-purple); box-shadow: var(--shadow-2); }
.plan-col-premium { border: 2px solid #f59e0b; }
.plan-col-mine { outline: 3px solid color-mix(in srgb, var(--ok-bg) 45%, transparent); }
.plan-col-icon { font-size: 2.2rem; }
.plan-ribbon { position: absolute; top: -12px; right: 16px; padding: 3px 12px; border-radius: 999px; background: var(--c-purple); color: #fff; font-size: var(--fs-0); font-weight: var(--w-strong); }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price strong { font-size: 2.4rem; font-weight: var(--w-heavy); }
.plan-col-sub { margin: 0; }
.plan-points { list-style: none; padding: 0; margin: var(--space-2) 0; display: grid; gap: 8px; flex: 1; }
.plan-points li { position: relative; padding-left: 26px; }
.plan-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 0.75rem; font-weight: var(--w-heavy); }
.plan-cta { width: 100%; }
.btn-premium { --btn: #d97706; --btn-text: #fff; --btn-border: #d97706; }
.plan-table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--space-2)); }
.plan-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.plan-table th, .plan-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; }
.plan-table th[scope="row"] { text-align: left; font-weight: 400; }
.plan-table thead th { position: sticky; top: 0; background: var(--surface); font-weight: var(--w-strong); }
.pt-head.pt-plus { color: var(--c-purple-700); }
.pt-head.pt-premium { color: #b45309; }
.pt-mine { background: color-mix(in srgb, var(--ok-bg) 8%, transparent); }
.pt-section th { text-align: left !important; background: var(--surface-2); font-weight: var(--w-strong); font-size: var(--fs-0); color: var(--text-muted); }
.pt-yes { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: var(--w-heavy); }
.pt-no { color: var(--text-muted); }
.pt-lock { opacity: 0.55; }
.pt-game { display: flex; align-items: center; gap: 10px; }
.pt-thumb { flex: none; width: 56px; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.pt-thumb .mode-svg { width: 100%; height: 100%; display: block; }
.pt-soon { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 0.7rem; }
.plans-note { font-size: var(--fs-0); }
@media (max-width: 820px) { .plan-columns { grid-template-columns: 1fr; } }
.energy-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-2); }
.energy-dots span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--surface-2); filter: grayscale(1); opacity: 0.5; }
.energy-dots span.on { background: var(--warn-soft); filter: none; opacity: 1; }

/* ---------- home page (item 6): one grid, every block the same width ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); width: min(100%, 560px); margin: 0 auto; align-items: start; }
.home-grid .hero-join, .home-grid .home-account, .home-grid .ad-slot { width: 100%; max-width: none; margin: 0; }
.home-side { display: grid; gap: var(--space-3); }
.home-grid .home-tiles { grid-template-columns: 1fr; }
.home-tile { min-height: 72px; }
.home-tile-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.home-tile-text .muted { font-size: var(--fs-0); line-height: 1.35; }
.home-tile-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); font-size: 1.6rem; }
.home-tile-world .home-tile-icon { background: #e0f2fe; }
.home-tile-plans .home-tile-icon { background: #ede9fe; }
.home-tile-go { flex: none; color: var(--text-muted); font-size: 1.6rem; line-height: 1; }
.home-tile .chip { flex: none; }
.home-grid .home-quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.home-grid .home-quick-links .btn { width: 100%; }
@media (min-width: 900px) {
  .home-grid { width: min(100%, 1040px); grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .home-grid > .ad-slot { grid-column: 1 / -1; }
  .home-side { position: sticky; top: 76px; }
  .home-grid .home-quick-links { grid-template-columns: 1fr; }
}

/* ---------- login / register (item 6) ---------- */
.auth-card { width: min(100%, 460px); margin: 0 auto; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-2); }
.auth-banner { display: block; width: 100%; height: 150px; object-fit: cover; object-position: center 35%; background: var(--c-orange-100); }
.auth-banner-hello { object-fit: contain; object-position: center bottom; padding-top: var(--space-3); }
.auth-body { padding: var(--space-5); }
.auth-body h1 { margin: 0; font-size: var(--fs-3); }
.auth-switch { margin: 0; text-align: center; }
.auth-switch a { color: var(--c-orange-700); font-weight: var(--w-strong); }
.btn-block { width: 100%; min-height: 50px; }
.field-label { font-weight: var(--w-strong); }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.role-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--space-3); border: 2px solid var(--border); border-radius: var(--radius-m); background: var(--surface); cursor: pointer; transition: border-color var(--dur) ease, background-color var(--dur) ease; }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card-icon { font-size: 2.2rem; line-height: 1.1; }
.role-card-name { font-weight: var(--w-strong); }
.role-card:has(input:checked) { border-color: var(--c-orange); background: var(--c-orange-100); }
.role-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 560px) { .auth-body { padding: var(--space-4); } .auth-banner { height: 120px; } }
.guide-thumb { flex: none; width: 72px; height: 42px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.guide-thumb .mode-svg { width: 100%; height: 100%; display: block; }
.guide-card summary .guide-icon { display: none; }

/* ---------- characters that shine (item 5, core/client/paperdoll.js) ---------- */
.paperdoll:not(.pd-bust) { overflow: visible; }
.paperdoll.pd-shiny { filter: drop-shadow(0 0 5px var(--pd-glow)); animation: pd-shine 2.4s ease-in-out infinite; }
.paperdoll.pd-shine-2 { filter: drop-shadow(0 0 8px var(--pd-glow)) drop-shadow(0 0 2px #fff); animation-name: pd-shine-strong; }
@keyframes pd-shine { 50% { filter: drop-shadow(0 0 10px var(--pd-glow)); } }
@keyframes pd-shine-strong { 50% { filter: drop-shadow(0 0 16px var(--pd-glow)) drop-shadow(0 0 5px #fff); } }
.paperdoll .pd-flap, .paperdoll .pd-sway, .paperdoll .pd-aura-pulse { transform-box: fill-box; transform-origin: center; }
.paperdoll .pd-flap { animation: pd-flap 1.5s ease-in-out infinite; }
.paperdoll .pd-sway { animation: pd-sway 3s ease-in-out infinite; }
.paperdoll .pd-aura-pulse { animation: pd-aura 3.2s ease-in-out infinite; }
@keyframes pd-flap { 0%, 100% { transform: scaleX(1) translateY(0); } 50% { transform: scaleX(0.84) translateY(-4px); } }
@keyframes pd-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes pd-aura { 0%, 100% { transform: scale(0.97); opacity: 0.9; } 50% { transform: scale(1.05); opacity: 1; } }
/* small screens and slow phones: keep the look, drop the moving light */
html[data-q="low"] .paperdoll.pd-shiny { animation: none; }
html[data-q="low"] .paperdoll :is(.pd-flap, .pd-sway, .pd-aura-pulse) { animation: none; }
@media (prefers-reduced-motion: reduce) { .paperdoll.pd-shiny, .paperdoll :is(.pd-flap, .pd-sway, .pd-aura-pulse) { animation: none; } }
html[data-motion="reduced"] .paperdoll.pd-shiny, html[data-motion="reduced"] .paperdoll .pd-flap, html[data-motion="reduced"] .paperdoll .pd-sway, html[data-motion="reduced"] .paperdoll .pd-aura-pulse { animation: none; }

/* ---------- the podium party (item 9): fireworks, throws, taunt poses ---------- */
.fx-fireworks { position: fixed; inset: 0; pointer-events: none; z-index: 1100; }
.fx-burst { position: absolute; width: 0; height: 0; }
.fx-rocket { position: absolute; left: -3px; top: 0; width: 6px; height: 16px; border-radius: 3px; opacity: 0; animation: fx-rocket 0.55s ease-out both; }
.fx-burst b { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; opacity: 0; animation: fx-spark 1.3s ease-out both; box-shadow: 0 0 8px currentColor; }
@keyframes fx-rocket { 0% { opacity: 1; transform: translateY(var(--rise)); } 99% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
@keyframes fx-spark { 0% { opacity: 1; transform: translate(0, 0) scale(1.2); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 30px)) scale(0.4); } }
.fx-throw { position: fixed; left: 0; top: 0; z-index: 1100; font-size: 2rem; line-height: 1; pointer-events: none; }
.fx-splat { position: absolute; left: 50%; top: 30%; z-index: 4; font-size: 2.6rem; line-height: 1; transform: translate(-50%, -50%); animation: fx-splat 1.8s ease-out forwards; pointer-events: none; }
@keyframes fx-splat { 0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -20%) scale(1); opacity: 0; } }
.fx-hit { animation: fx-wobble 0.6s ease-in-out; }
@keyframes fx-wobble { 20% { transform: rotate(-8deg) scale(0.95); } 50% { transform: rotate(6deg); } 80% { transform: rotate(-3deg); } }
.final-party .podium-1 { position: relative; }
.final-party .podium-1::before { content: ""; position: absolute; left: 50%; bottom: 30%; width: 240px; height: 420px; transform: translateX(-50%); transform-origin: 50% 0; background: rgba(255, 230, 128, 0.28); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); pointer-events: none; animation: fb-spot 3s ease-in-out infinite alternate; }
@keyframes fb-spot { from { transform: translateX(-50%) rotate(-10deg); } to { transform: translateX(-50%) rotate(10deg); } }
.final-party .podium-1 .fb-standing .paperdoll { filter: drop-shadow(0 0 12px rgba(255, 216, 74, 0.9)); }
.pd-pose-taunt .pd-arm-l { transform: rotate(160deg); animation: pd-taunt-l 0.35s ease-in-out infinite alternate; }
.pd-pose-taunt .pd-arm-r { transform: rotate(-160deg); animation: pd-taunt-r 0.35s ease-in-out infinite alternate; }
.pd-pose-taunt .pd-head { animation: pd-tilt 0.7s ease-in-out infinite; }
.pd-pose-taunt .pd-body { animation: pd-sway 0.7s ease-in-out infinite; }
.pd-pose-flex .pd-arm-l { transform: rotate(120deg); animation: pd-flex-l 0.5s ease-in-out infinite alternate; }
.pd-pose-flex .pd-arm-r { transform: rotate(-120deg); animation: pd-flex-r 0.5s ease-in-out infinite alternate; }
.pd-pose-flex .pd-body { animation: pd-hop 1s ease-in-out infinite; }
@keyframes pd-taunt-l { from { transform: rotate(150deg); } to { transform: rotate(175deg); } }
@keyframes pd-taunt-r { from { transform: rotate(-150deg); } to { transform: rotate(-175deg); } }
@keyframes pd-flex-l { from { transform: rotate(110deg); } to { transform: rotate(135deg) scale(1.08); } }
@keyframes pd-flex-r { from { transform: rotate(-110deg); } to { transform: rotate(-135deg) scale(1.08); } }
.react-fx-targets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.reaction-btn.fx-btn { font-size: 1.6rem; }
@media (prefers-reduced-motion: reduce) {
  .final-party .podium-1::before, .fx-hit { animation: none; }
  .pd-pose-taunt .pd-arm-l, .pd-pose-taunt .pd-arm-r, .pd-pose-flex .pd-arm-l, .pd-pose-flex .pd-arm-r { animation: none; }
}

/* ---------- [badge] [flag] name (item 19, core/client/name-tag.js + flags.js) ---------- */
.name-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; vertical-align: middle; }
.name-tag-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flag { flex: none; display: inline-block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.name-badge { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; font-weight: var(--w-strong); line-height: 1.5; white-space: nowrap; color: #fff; background: #64748b; }
.name-badge.nb-compact { padding: 0 5px; font-size: 0.75rem; }
.nb-guest { background: #94a3b8; }
.nb-student { background: #0d9488; }
.nb-teacher { background: #ea580c; }
.nb-plus { background: var(--c-purple); }
.nb-premium { background: #d97706; }
.nb-vip { background: #111827; color: #fde68a; box-shadow: 0 0 0 1px #fbbf24 inset, 0 0 8px rgba(251, 191, 36, 0.55); animation: nb-shine 2.4s ease-in-out infinite; }
@keyframes nb-shine { 50% { box-shadow: 0 0 0 1px #fde68a inset, 0 0 14px rgba(251, 191, 36, 0.9); } }
@media (prefers-reduced-motion: reduce) { .nb-vip { animation: none; } }
.room-you { display: flex; justify-content: center; font-weight: var(--w-strong); font-size: var(--fs-2); }
.lobby-name .name-tag { gap: 3px; }
.podium-name .name-tag, .fb-name .name-tag { justify-content: center; }
.flag-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.flag-pick { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-size: var(--fs-0); text-align: left; }
.flag-pick[aria-pressed="true"] { border-color: var(--c-orange); background: var(--c-orange-100); }
.badge-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-pick { min-height: 44px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); cursor: pointer; }
.badge-pick[aria-pressed="true"] { border-color: var(--c-orange); background: var(--c-orange-100); }
.name-preview { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--space-2); border-radius: var(--radius-m); background: var(--surface-2); font-size: var(--fs-2); font-weight: var(--w-strong); }

/* ---------- admin: bans (item 20) ---------- */
.admin-ban-form > * { flex: 1 1 160px; }
.ban-meter { width: 90px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.ban-meter span { display: block; height: 100%; background: #ef4444; }

/* inputs outside a .field (admin tools, popups) get the same look as form fields */
.admin-page input:not([type=checkbox]):not([type=radio]), .admin-page select, .modal-input {
  min-height: 44px; padding: 0 var(--space-3); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px;
}
.admin-page input:focus, .admin-page select:focus, .modal-input:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
/* admin: question images (item 17) */
.admin-img-bar { align-items: center; gap: var(--space-2); }
.admin-img-bar .spacer { flex: 1; }
.img-picked { background: color-mix(in srgb, var(--bad-soft) 60%, transparent); }
.img-size { width: 80px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 2px; }
.img-size span { display: block; height: 100%; background: var(--c-purple); }
.admin-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--c-orange); }

/* ---------- central question bank (item 16) ---------- */
.central-row { display: flex; flex-wrap: wrap; gap: 6px; }
.central-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: var(--fs-0); cursor: pointer; }
.central-chip[aria-pressed="true"] { border-color: var(--c-orange); background: var(--c-orange-100); color: var(--c-orange-700); font-weight: var(--w-strong); }
.central-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: 0.75rem; text-align: center; }
.central-set { border: 1px solid var(--border); border-radius: var(--radius-m); padding: var(--space-3); background: var(--surface); }
.central-set-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.central-set-text { flex: 1 1 220px; min-width: 0; }
.central-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); font-size: 1.5rem; }
.central-preview { margin: var(--space-3) 0 0; padding-left: 1.4em; display: grid; gap: var(--space-2); }
.central-options { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.central-picker-filters select { min-height: 40px; }
.chip-central { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; margin-top: 4px; }
.admin-central-picks > select { flex: 1 1 160px; }

/* ---------- Mokiz Board (item 13, games/jamboard) ---------- */
.jam-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); }
.jam-mode { display: grid; gap: 4px; justify-items: start; padding: var(--space-3); border: 2px solid var(--border); border-radius: var(--radius-m); background: var(--surface); text-align: left; cursor: pointer; }
.jam-mode[aria-pressed="true"] { border-color: var(--c-orange); background: var(--c-orange-100); }
.jam-mode-icon { font-size: 1.8rem; }
.jam-mode small { color: var(--text-muted); }
.jb-board { position: relative; width: 100%; aspect-ratio: 1000 / 600; container-type: inline-size; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-l); background: #f8fafc; touch-action: none; user-select: none; }
.jb-dots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jb-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jb-topic { position: absolute; z-index: 1; left: 0; right: 0; top: 0; padding: 1.2cqw 2cqw; background: var(--c-purple); color: #fff; font-weight: var(--w-strong); font-size: 2.2cqw; text-align: center; }
.jb-board[data-mode="mindmap"] .jb-topic { left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); width: 24%; min-height: 8%; display: grid; place-items: center; padding: 1.2cqw; border-radius: 999px; font-size: 1.8cqw; box-shadow: 0 0 0 0.6cqw rgba(99, 102, 241, 0.2); cursor: pointer; }
.jb-topic.jb-picked { box-shadow: 0 0 0 0.6cqw #f97316; }
.jb-notes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.jb-note { position: absolute; width: 12%; height: 15%; padding: 0.7cqw; display: flex; flex-direction: column; background: var(--jb-c, #fde68a); color: #1f2937; box-shadow: 0 0.2cqw 0.6cqw rgba(15, 23, 42, 0.16); border-radius: 0.3cqw; font-size: 1.25cqw; line-height: 1.3; pointer-events: auto; cursor: default; transition: left 300ms ease, top 300ms ease, box-shadow 150ms ease; }
.jb-teacher .jb-note { cursor: grab; }
.jb-note.jb-drag { transition: none; cursor: grabbing; z-index: 5; box-shadow: 0 0.8cqw 2cqw rgba(15, 23, 42, 0.3); transform: rotate(-2deg); }
.jb-note.jb-new { animation: jb-in 350ms ease; }
.jb-note.jb-mine { outline: 0.25cqw solid #f97316; }
.jb-note.jb-picked { outline: 0.4cqw solid #6366f1; }
.jb-text { flex: 1; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.jb-foot { display: flex; align-items: center; gap: 0.4cqw; font-size: 0.95cqw; color: rgba(31, 41, 55, 0.7); }
.jb-by { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jb-like { display: inline-flex; align-items: center; gap: 0.3cqw; min-width: 2.6cqw; padding: 0.1cqw 0.5cqw; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.55); color: #9f1239; font-size: 1cqw; cursor: pointer; }
.jb-liked .jb-like { background: #fecdd3; }
.jb-del { position: absolute; top: -0.8cqw; right: -0.8cqw; width: 2.2cqw; height: 2.2cqw; min-width: 22px; min-height: 22px; display: none; border: 0; border-radius: 999px; background: #1f2937; color: #fff; font-size: 1cqw; cursor: pointer; }
.jb-note:hover .jb-del, .jb-note:focus-within .jb-del, .jb-phone .jb-mine .jb-del { display: grid; place-items: center; }
.jb-pen { cursor: crosshair; }
.jb-pen .jb-note { pointer-events: none; opacity: 0.85; }
@keyframes jb-in { from { transform: scale(0.4) rotate(-8deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jb-note { transition: none; } .jb-note.jb-new { animation: none; } }
.jam-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.jam-count { font-weight: var(--w-strong); margin-right: auto; }
.jam-add input { min-height: 38px; min-width: 200px; padding: 0 var(--space-2); border: 1px solid var(--border-strong); border-radius: 8px; }
.jam-pens { display: flex; gap: 4px; }
.jam-pen { width: 34px; height: 34px; border: 2px solid var(--border); border-radius: 999px; background: var(--pen, var(--surface)); cursor: pointer; }
.jam-pen[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--c-orange); }
.jam-pen-off { display: grid; place-items: center; font-size: 1rem; }
.jam-phone .jb-note { font-size: 1.6cqw; }
.jam-topic-phone { padding: var(--space-3); border-radius: var(--radius-m); background: var(--c-purple); color: #fff; font-weight: var(--w-strong); font-size: var(--fs-2); text-align: center; }
.jam-write textarea { width: 100%; padding: var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-m); font-size: var(--fs-1); resize: vertical; box-shadow: var(--shadow-1); }
.jam-colors { display: flex; gap: 8px; }
.jam-color { width: 44px; height: 44px; border: 2px solid rgba(0, 0, 0, 0.1); border-radius: 12px; cursor: pointer; }
.jam-color[aria-pressed="true"] { box-shadow: 0 0 0 3px #1f2937; }
.jam-status, .jam-parent, .jam-tip { margin: 0; font-size: var(--fs-0); }
.jam-report-topic { font-size: var(--fs-2); font-weight: var(--w-strong); margin: 0; }
.jam-report-img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-m); }

/* ---------- party games (item 8, games/party_quest) ---------- */
.party-scene { position: relative; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.party-svg { display: block; width: 100%; height: auto; }
.party-compact .party-svg { max-height: 220px; }
.party-clock { position: relative; height: 26px; background: var(--surface-2); }
.party-clock-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok-bg); transition: width 250ms linear; }
.party-clock strong { position: absolute; right: 10px; top: 2px; font-weight: var(--w-heavy); }
.party-clock-low .party-clock-bar { background: var(--bad-bg); }
.party-mine .party-label { fill: #fde047; }
.party-rower .party-oar { transform-box: fill-box; transform-origin: 50% 0; }
.party-wave { animation: sc-water 3s ease-in-out infinite alternate; }
.party-float { animation: party-float 1.4s ease-out forwards; }
@keyframes party-float { to { transform: translateY(-40px); opacity: 0; } }
.party-sway.party-wobble { animation: party-sway 0.9s ease-in-out infinite alternate; }
@keyframes party-sway { from { transform: rotate(calc(var(--sway) * -1)); } to { transform: rotate(var(--sway)); } }
.party-drop { animation: party-drop 380ms ease-out; }
@keyframes party-drop { from { transform: translateY(-60px); opacity: 0; } }
.party-fall { animation: party-fall 1.2s ease-in forwards; }
@keyframes party-fall { to { transform: translate(var(--fx), 220px) rotate(80deg); opacity: 0; } }
.party-shard { animation: party-shard 0.9s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes party-shard { to { transform: translate(var(--dx), var(--dy)) rotate(200deg); opacity: 0; } }
.party-boom { animation: party-boom 0.5s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes party-boom { from { transform: scale(0.2); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .party-shard, .party-boom { animation-duration: 0.01s; } }
.party-cloud { animation: sc-drift 20s ease-in-out infinite alternate; }
.party-market { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); padding: var(--space-3); background: #fef9c3; }
.pm-card { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon name price" "icon chart move"; align-items: center; gap: 2px 10px; padding: var(--space-3); border-radius: var(--radius-m); background: var(--surface); border: 1px solid #fde68a; }
.pm-icon { grid-area: icon; font-size: 2.2rem; }
.pm-name { grid-area: name; font-weight: var(--w-strong); }
.pm-price { grid-area: price; font-size: 1.4rem; font-weight: var(--w-heavy); }
.pm-move { grid-area: move; font-size: var(--fs-0); color: var(--text-muted); text-align: right; }
.pm-up { color: #15803d; }
.pm-down { color: #dc2626; }
.pm-chart { grid-area: chart; width: 100%; height: 30px; }
.party-compact .party-market { grid-template-columns: repeat(2, 1fr); padding: var(--space-2); gap: var(--space-2); }
.party-compact .pm-card { padding: 6px 8px; }
.party-compact .pm-icon { font-size: 1.5rem; }
.party-compact .pm-price { font-size: 1.05rem; }
.party-live { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-3); align-items: start; }
.party-side { padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.party-side h3 { margin: 0 0 var(--space-2); }
.party-top { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: top; }
.party-top li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-s); background: var(--surface-2); counter-increment: top; }
.party-top li::before { content: counter(top); font-weight: var(--w-heavy); color: var(--text-muted); width: 1.2em; }
.party-top-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-team-result { display: grid; gap: 6px; max-width: 520px; margin: 0 auto; }
.party-team-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--border); }
.party-team-row:first-child { border-color: #fbbf24; background: #fffbeb; }
.party-team-rank { font-weight: var(--w-heavy); width: 2em; }
.party-team-row span:last-child { margin-left: auto; font-weight: var(--w-strong); }
.party-me { justify-content: center; }
.party-team-chip { display: inline-flex; align-items: center; gap: 6px; }
.party-trade summary { font-weight: var(--w-strong); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.pm-trade { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--border); }
.party-vote-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.party-vote-btn { display: grid; justify-items: center; gap: 2px; min-height: 58px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); font-size: 1.5rem; cursor: pointer; }
.party-vote-btn small { font-size: 0.7rem; color: var(--text-muted); }
.party-vote-btn[aria-pressed="true"] { border-color: var(--c-orange); background: var(--c-orange-100); }
@media (max-width: 900px) { .party-live { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .party-scene * { animation: none !important; transition: none !important; } }
html[data-motion="reduced"] .party-scene * { animation: none !important; }
.pm-trade .pm-icon, .pm-trade .pm-name { grid-area: auto; }
.pm-trade .pm-icon { font-size: 1.5rem; }

/* ---------- Mokiz World (item 7, platform/world) ---------- */
.world-live { max-width: 1200px; margin: 0 auto; }
.world-head { align-items: center; gap: var(--space-2); }
.world-title { margin: 0 auto 0 0; font-size: var(--fs-3); }
.world-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-3); align-items: start; }
.world-map { height: min(66vh, 620px); border-radius: var(--radius-l); overflow: hidden; }
.world-map .mq-view { height: 100%; }
.world-fish { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); min-height: 56px; }
.world-cast, .world-reel { min-height: 52px; min-width: 200px; font-size: var(--fs-2); }
.world-bite { animation: world-bite 0.35s ease-in-out infinite alternate; }
@keyframes world-bite { to { transform: scale(1.06) rotate(-1deg); } }
.world-bobber { margin: 0; font-weight: var(--w-strong); animation: world-bob 1.2s ease-in-out infinite; }
@keyframes world-bob { 50% { transform: translateY(-4px); } }
.world-chat { display: flex; flex-direction: column; gap: var(--space-2); max-height: calc(66vh + 60px); }
.world-chat h2 { margin: 0; font-size: var(--fs-2); }
.world-chat-list { flex: 1; min-height: 160px; max-height: 360px; overflow-y: auto; margin: 0; padding: 0; list-style: none; display: grid; align-content: start; gap: 6px; }
.world-line { display: grid; gap: 2px; padding: 6px 8px; border-radius: var(--radius-s); background: var(--surface-2); font-size: var(--fs-0); overflow-wrap: anywhere; }
.world-line .name-tag { font-weight: var(--w-strong); }
.world-chat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: 10px; }
.world-phrases { display: flex; flex-wrap: wrap; gap: 4px; }
.world-phrases .btn { min-height: 34px; }
.world-chat-msg, .world-safety { margin: 0; font-size: 0.75rem; }
.world-rarity { font-weight: var(--w-strong); }
.rarity-common { --r: #64748b; } .rarity-uncommon { --r: #16a34a; } .rarity-rare { --r: #2563eb; } .rarity-epic { --r: #9333ea; } .rarity-legendary { --r: #d97706; }
.world-rarity.chip { color: #fff; background: var(--r); border-color: var(--r); }
.world-catch .modal-icon { font-size: 4.5rem; animation: modal-pop 400ms ease; }
.world-catch.rarity-legendary .modal-icon, .world-catch.rarity-epic .modal-icon { filter: drop-shadow(0 0 12px var(--r)); }
.world-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-2); }
.world-album-card { display: grid; justify-items: center; gap: 2px; padding: var(--space-2); border: 2px solid var(--r); border-radius: var(--radius-m); background: var(--surface); text-align: center; }
.world-album-card small { color: var(--r); font-weight: var(--w-strong); }
.world-album-icon { font-size: 2.2rem; }
.world-missing { opacity: 0.45; border-style: dashed; }
@media (max-width: 900px) { .world-main { grid-template-columns: 1fr; } .world-map { height: 56vh; } .world-chat-list { max-height: 220px; } }
@media (prefers-reduced-motion: reduce) { .world-bite, .world-bobber { animation: none; } }

/* ---------- Kitchen Rush (item 21, games/kitchen_rush) ---------- */
.kr-stage { height: min(58vh, 520px); border-radius: var(--radius-l); overflow: hidden; }
.kr-stage .mq-view { height: 100%; }
.kr-hud { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: var(--w-strong); }
.kr-team { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 999px; border: 1px solid var(--team); color: var(--text); background: var(--surface); }
.kr-score { font-size: var(--fs-2); font-weight: 800; }
.kr-time { font-variant-numeric: tabular-nums; }
.kr-bar { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.kr-hold { display: flex; align-items: center; gap: var(--space-2); min-width: 150px; }
.kr-hold-pic { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.kr-hold-text { font-weight: var(--w-strong); font-size: var(--fs-0); max-width: 16ch; }
.kr-use { min-height: 56px; min-width: 120px; font-size: var(--fs-2); }
.kr-orders-box { min-width: 0; }
.kr-orders { display: flex; gap: var(--space-2); margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.kr-order { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "dish name" "dish parts" "time time"; column-gap: 6px; min-width: 128px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-2); }
.kr-order-dish { grid-area: dish; font-size: 1.9rem; line-height: 1; align-self: center; }
.kr-order-name { grid-area: name; font-weight: var(--w-strong); font-size: var(--fs-0); }
.kr-order-parts { grid-area: parts; font-size: 1rem; letter-spacing: 1px; }
.kr-order-time { grid-area: time; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--border); overflow: hidden; }
.kr-order-time span { display: block; height: 100%; background: #22c55e; transition: width 0.3s linear; }
.kr-late { border-color: #ef4444; }
.kr-late .kr-order-time span { background: #ef4444; }
.kr-late .kr-order-dish { animation: kr-shake 0.5s ease-in-out infinite; }
@keyframes kr-shake { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.kr-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-2); }
.kr-level { display: grid; gap: 4px; text-align: left; min-height: 72px; padding: var(--space-3); border: 2px solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.kr-level.is-on { border-color: var(--c-orange); background: var(--c-orange-100); }
.kr-howto summary { cursor: pointer; font-weight: var(--w-strong); min-height: 44px; display: flex; align-items: center; }
.kr-live-head { justify-content: space-between; font-size: var(--fs-2); }
.kr-observer { display: flex; justify-content: center; border-radius: var(--radius-l); overflow: hidden; background: #2d3a4a; }
.kr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-2); }
.kr-card { display: grid; gap: 4px; padding: var(--space-2); border: 1px solid var(--border); border-top: 4px solid var(--team); border-radius: var(--radius-m); background: var(--surface); }
.kr-card-head { display: flex; align-items: center; gap: 6px; }
.kr-card-score { margin-left: auto; font-size: var(--fs-2); font-weight: 800; }
.kr-rank { font-weight: 800; color: var(--text-muted); }
.kr-card-sub { margin: 0; font-size: var(--fs-0); }
.kr-card .kr-order { min-width: 104px; padding: 4px 6px; }
.kr-card .kr-order-dish { font-size: 1.4rem; }
.kr-world-head { flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.kr-world-status { flex: 1; min-width: 12ch; }
.kr-world-top { margin: 0; font-size: var(--fs-0); }
.kr-pick { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
@media (max-width: 640px) {
  .kr-bar { grid-template-columns: 1fr auto; }
  .kr-orders-box { grid-column: 1 / -1; }
  .kr-stage { height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { .kr-late .kr-order-dish { animation: none; } .kr-order-time span { transition: none; } }

/* ---------- item 10: team picker shows each team's shape (never color alone), a full kitchen is greyed ---------- */
.team-choice::before { content: none; }
.team-choice .team-badge { display: inline-grid; margin-bottom: var(--space-1); }
.team-choice[aria-pressed="true"] > .team-badge { background: #fff; color: var(--team) !important; }
.team-choice:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Mokiz World rework (owner 2026-09-29): arrow buttons, an action button, focus mode, the games menu ---------- */
.mq-pad { position: absolute; right: 12px; bottom: 12px; z-index: 5; display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px);
  grid-template-areas: ". up ." "left . right" ". down ."; gap: 2px; touch-action: none; user-select: none; -webkit-user-select: none; }
.mq-pad-btn { width: 52px; height: 52px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.7); background: rgba(31, 36, 48, 0.45); color: #fff; font-size: 1.2rem;
  display: grid; place-items: center; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.mq-pad-btn.is-on, .mq-pad-btn:active { background: rgba(249, 115, 22, 0.85); border-color: #fff; }
.mq-pad-up { grid-area: up; } .mq-pad-down { grid-area: down; } .mq-pad-left { grid-area: left; } .mq-pad-right { grid-area: right; }
.world-map { position: relative; outline: none; }
.world-map:focus-visible { box-shadow: 0 0 0 3px var(--c-orange); }
.world-action { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: flex; gap: var(--space-2); pointer-events: none; }
.world-action .btn { pointer-events: auto; }
.world-act { min-height: 56px; min-width: 190px; font-size: var(--fs-2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.world-stage-wrap { position: relative; }
.world-focus-exit, .world-menu-float { display: none; }
.world-hint { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.world-hint > span:nth-child(2) { flex: 1; min-width: 16ch; }
.world-hint-icon { font-size: 1.6rem; }
/* focus: the map fills the screen, the arrows and the action stay on it */
/* owner 2026-09-30: the whole game fills the screen, its panel (fishing gear, the kitchen's hands and orders, the
   waiting match) inside it on the right (a sheet at the bottom on a phone): nothing is left outside the game */
.world-focus .world-left { position: fixed; inset: 0; z-index: 60; background: #2d3a4a; display: grid; grid-template-columns: minmax(0, 1fr) min(400px, 38vw); gap: 0; }
.world-focus .world-stage-wrap { position: relative; min-width: 0; }
.world-focus .world-map { height: 100vh; height: 100dvh; border-radius: 0; }
.world-focus .world-area { max-height: 100vh; max-height: 100dvh; overflow: auto; padding: 56px 12px 12px; background: var(--surface); border-left: 1px solid var(--border); }
.world-focus .world-area:empty { display: none; }
@media (max-width: 760px) {
  .world-focus .world-left { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .world-focus .world-map { height: 100%; min-height: 0; }
  .world-focus .world-area { max-height: 44dvh; padding: 10px; border-left: 0; border-top: 1px solid var(--border); }
}
.world-focus .world-focus-exit { display: inline-flex; position: fixed; top: 10px; right: 10px; z-index: 61; }
.world-focus .world-menu-float { display: inline-flex; position: fixed; top: 10px; left: 10px; z-index: 61; }
.world-focus .world-act { min-height: 64px; min-width: 220px; }
html.world-focus-on { overflow: hidden; }
/* the games menu */
.world-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--space-2); }
.world-place { display: grid; justify-items: center; gap: 4px; padding: var(--space-3); border: 2px solid var(--border); border-radius: var(--radius-l); background: var(--surface); color: var(--text);
  font: inherit; text-align: center; cursor: pointer; min-height: 120px; }
.world-place:hover:not(.is-soon) { border-color: var(--c-orange); transform: translateY(-1px); }
.world-place.is-here { border-color: var(--c-orange); background: var(--c-orange-100); }
.world-place.is-soon { opacity: 0.55; cursor: default; border-style: dashed; }
.world-place-icon { font-size: 2.4rem; line-height: 1; }
/* a guest's way in */
.world-guest { max-width: 520px; margin: 0 auto; }
.world-guest input { min-height: 52px; font-size: var(--fs-2); padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: 12px; }
.world-guest-chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.world-guest-chars .char-pick { min-height: 72px; }
/* the kitchen hall lobby */
.kr-party ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.kr-party li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border: 1px solid var(--team); border-radius: 999px; background: var(--surface); font-size: var(--fs-0); }
.kr-levels-sm .kr-level { min-height: 56px; padding: var(--space-2); }
@media (max-width: 640px) {
  .mq-pad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); right: 8px; bottom: 8px; }
  .mq-pad-btn { width: 46px; height: 46px; }
  .mq-has-pad .mq-joy { display: none; } /* the arrows replace the joystick in the world */
  .world-action { bottom: 160px; }
  .world-act { min-width: 160px; }
}

/* ---------- home (owner 2026-09-29): the PIN card is the page, a small menu under it ---------- */
.home-solo { display: grid; gap: var(--space-3); width: min(100%, 560px); margin: 0 auto; }
.home-solo .hero-join { width: 100%; max-width: none; margin: 0; }
.home-solo .hero-banner { max-height: 190px; }
.home-solo .ad-slot { width: 100%; margin: 0; }
.home-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: var(--space-2); }
.home-mini-item { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 72px; padding: var(--space-2) 4px; border: 1px solid var(--border); border-radius: var(--radius-m);
  background: var(--surface); color: var(--text); text-decoration: none; text-align: center; transition: border-color var(--dur) ease, transform var(--dur) ease; }
.home-mini-item:hover { border-color: var(--c-orange); transform: translateY(-1px); }
.home-mini-icon { font-size: 1.5rem; line-height: 1; }
.home-mini-label { font-size: var(--fs-0); font-weight: var(--w-strong); line-height: 1.25; overflow-wrap: anywhere; }
.home-why { margin: 0; font-size: var(--fs-0); }
@media (max-width: 420px) { .home-mini { grid-template-columns: repeat(3, 1fr); } .home-solo .hero-banner { max-height: 140px; } }

/* ---------- payments: PromptPay + slip, the gem shop, plan buttons (owner 2026-09-29) ---------- */
.pay-steps { text-align: left; margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.pay-promptpay { background: #fff; padding: var(--space-3); border-radius: var(--radius-m); border: 1px solid var(--border); display: inline-block; }
.pay-promptpay svg { width: min(260px, 70vw); height: auto; display: block; }
.pay-bank { align-items: center; text-align: center; } .pay-bank-no { font-size: 1.6rem; font-weight: 800; letter-spacing: 1px; margin: 0; user-select: all; } /* owner 2026-10-01: bank transfer instead of PromptPay */
.pay-due { font-size: var(--fs-3); }
.pay-slip, .pay-sandbox { width: 100%; max-width: 360px; margin: 0 auto; text-align: left; }
.pay-slip-file, .pay-sandbox-amount { min-height: 48px; padding: var(--space-2); border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); width: 100%; }
.pay-slip-msg { margin: 0; min-height: 1.4em; }
.pay-rules { font-size: var(--fs-0); text-align: left; }
.pay-received { font-weight: var(--w-strong); }
.gem-balance { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.gem-open { justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-m); }
.gem-pack:disabled { opacity: 0.5; cursor: not-allowed; }
.gem-pack-rate { font-size: var(--fs-0); }
.gem-promise { margin: 0; padding-left: 1.2em; font-size: var(--fs-0); display: grid; gap: 2px; }
.gem-not-ready { justify-self: center; }
.plan-cta-box { gap: var(--space-2); }
.admin-credit { align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
/* the world's columns may shrink below the map canvas's size (a grid item's min-width is its content: on a phone the
   canvas kept the column 600+ px wide and the page slid sideways) */
.world-main > *, .world-left, .world-stage-wrap { min-width: 0; }
.world-map .mq-canvas { max-width: 100%; }

/* ---------- flat 2D art everywhere (owner 2026-09-29: no AI-looking pictures): code-drawn mascot and banners ---------- */
.art-mascot svg { display: block; width: 100%; height: auto; overflow: visible; }
.art-sleep { position: relative; }
.art-sleep::after { content: "z z z"; position: absolute; top: 4%; right: 2%; font-weight: 800; color: var(--c-purple, #8b5cf6); letter-spacing: 2px; animation: art-zz 2.4s ease-in-out infinite; }
.art-thinking { position: relative; }
.art-thinking::after { content: "?"; position: absolute; top: 0; right: 8%; font-size: 1.8em; font-weight: 800; color: var(--c-orange); animation: art-zz 2s ease-in-out infinite; }
@keyframes art-zz { 50% { transform: translateY(-6px); opacity: 0.6; } }
.art-banner { position: relative; overflow: hidden; background: #cfe8ff; }
.art-banner .lobby-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-crowd { position: absolute; left: 0; right: 0; bottom: 4%; display: flex; justify-content: center; align-items: flex-end; gap: 2%; padding: 0 4%; }
.art-crowd-one { flex: 0 1 17%; max-width: 120px; }
.art-crowd-one svg { display: block; width: 100%; height: auto; overflow: visible; }
.art-crowd-1 { flex-basis: 21%; max-width: 140px; } /* Moki in front, a bit bigger */
.hero-banner.art-banner { aspect-ratio: 1408 / 640; height: auto; }
.auth-banner.art-banner { height: 150px; }
.teacher-hero-art.art-banner { aspect-ratio: 1 / 1; height: auto; }
.teacher-hero-art .art-crowd-one:nth-child(n+3) { display: none; }
.teacher-hero-art .art-crowd-one { flex-basis: 45%; }
@media (max-width: 560px) { .auth-banner.art-banner { height: 120px; } }
@media (prefers-reduced-motion: reduce) { .art-sleep::after, .art-thinking::after { animation: none; } }

/* ---------- Kitchen Rush 2D art + the recipe book (decision 64) ---------- */
.kr-icon { display: inline-block; vertical-align: middle; flex: none; }
.kr-order-dish .kr-icon { width: 36px; height: 36px; }
.kr-order-parts { display: flex; gap: 2px; flex-wrap: wrap; }
.kr-bar-btns { display: flex; flex-direction: column; gap: var(--space-1); align-items: stretch; }
.kr-level-chaos { font-size: var(--fs-0); color: #b45309; font-weight: var(--w-strong); }
.kr-book { border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); padding: var(--space-2) var(--space-3); }
.kr-book > summary { cursor: pointer; font-weight: var(--w-strong); min-height: 44px; display: flex; align-items: center; }
.kr-book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.kr-book-dish { display: grid; gap: 6px; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-2); }
.kr-book-head { display: flex; align-items: center; gap: var(--space-2); }
.kr-book-head strong { font-size: var(--fs-2); }
.kr-book-head .chip { margin-left: auto; }
.kr-book-parts { display: grid; gap: 4px; }
.kr-book-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.kr-step { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 56px; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.kr-step small { font-size: 0.7rem; line-height: 1.2; text-align: center; }
.kr-step-arrow { color: var(--text-muted); font-weight: 800; }
.kr-book-then { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: var(--fs-0); }
.kr-book-tip { font-size: var(--fs-0); margin: var(--space-2) 0 0; }
.kr-book-chaos h4 { margin: var(--space-2) 0 4px; }
.kr-book-chaos ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.kr-book-chaos li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-0); }
.auth-banner-hello.art-mascot svg { height: 100%; width: auto; margin: 0 auto; }

/* ---------- the pier (decision 64): gear bar, shop, bag, sets, ranking ---------- */
.world-gear { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.world-gear-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.world-gear-chip span { display: grid; text-align: left; line-height: 1.15; }
.world-gear-chip small { font-size: 0.7rem; color: var(--text-muted); }
.world-coins { font-weight: var(--w-strong); }
.world-shop-row { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-m); margin-bottom: 6px; background: var(--surface); }
.world-shop-row.is-on { border-color: var(--c-orange); background: var(--c-orange-100); }
.world-shop-text { display: grid; flex: 1; min-width: 0; }
.world-shop h3 { margin: var(--space-3) 0 4px; }
.world-bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--space-2); }
.world-bag-fish { display: grid; justify-items: center; gap: 2px; padding: var(--space-2); border: 2px solid var(--r, var(--border)); border-radius: var(--radius-m); background: var(--surface); text-align: center; }
.world-bag-price { font-weight: var(--w-strong); }
.world-catch-kg { font-size: var(--fs-3); font-weight: 800; margin: 4px 0; }
.world-catch .modal-icon canvas { width: 120px; height: 120px; }
.world-sets { display: grid; gap: 6px; margin-top: var(--space-3); }
.world-sets h3 { margin: 0; }
.world-set { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(60px, 1fr) auto; align-items: center; gap: var(--space-2); padding: 6px var(--space-2); border: 1px solid var(--r, var(--border)); border-radius: var(--radius-m); }
.world-set-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.world-set-bar span { display: block; height: 100%; background: var(--r, var(--c-orange)); }
.world-rank { width: 100%; border-collapse: collapse; }
.world-rank th, .world-rank td { padding: 6px; border-bottom: 1px solid var(--border); text-align: left; }
.world-rank tr.is-me td { background: var(--c-orange-100); font-weight: var(--w-strong); }
.world-rank-best { display: flex; align-items: center; gap: 4px; }
.world-album-icon canvas { display: block; }
.fish-icon { display: inline-block; vertical-align: middle; flex: none; }
@media (max-width: 560px) { .world-set { grid-template-columns: minmax(0, 1fr) auto; } .world-set-bar { grid-column: 1 / -1; } }
.modal-body .world-album, .modal-body .world-bag, .modal-body .world-sets { width: 100%; }
/* a toast never blocks a tap on what is under it (the pier's buttons sit at the bottom, decision 64) */
.toasts { pointer-events: none; }
.modal-body .world-shop-row { width: 100%; }

/* ---------- the room page (owner 2026-09-30): the PIN stays on top while playing; after the game, a countdown home ---------- */
.room-pinbar { position: sticky; top: 60px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 6px var(--space-3); border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1); font-size: var(--fs-0); }
.room-pinbar strong { font-size: var(--fs-2); font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.room-pinbar-end { background: var(--c-orange-100); border-color: var(--c-orange); }
.room-exit-count { font-weight: var(--w-strong); }
.join-rejoin { display: block; white-space: normal; text-align: center; }
.react-coins { font-weight: var(--w-strong); }

/* ---------- Classic / Challenge / Team (owner 2026-09-30): the question on the projector only, bigger, sizeable; huge answer buttons ---------- */
.stage-head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.qsize { display: inline-flex; align-items: center; gap: 4px; }
.qsize .btn { min-width: 48px; font-weight: 800; }
.qsize-pct { min-width: 3.5em; text-align: center; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.stage .stage-q { font-size: calc(clamp(2.2rem, 5.2vw, 4.4rem) * var(--q-scale, 1)); line-height: 1.25; }
.stage .stage-grid .answer { min-height: calc(120px * var(--q-scale, 1)); font-size: calc(clamp(1.3rem, 2.6vw, 2rem) * var(--q-scale, 1)); }
.quiz-look-up { margin: 0; font-weight: var(--w-strong); color: var(--text-muted); }
.answer-grid-xl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.answer-grid-xl .answer { min-height: clamp(130px, 26vh, 260px); font-size: clamp(1.25rem, 4.5vw, 2rem); flex-direction: column; justify-content: center; text-align: center; border-radius: var(--radius-l); }
.answer-grid-xl .answer svg { width: clamp(40px, 8vw, 64px); height: clamp(40px, 8vw, 64px); }
@media (orientation: landscape) and (max-height: 520px) { .answer-grid-xl .answer { min-height: 38vh; } }

/* ---------- waiting room team zones (owner 2026-09-30) ---------- */
.lobby-team-banners { position: absolute; inset: 0; display: flex; pointer-events: none; z-index: 1; }
.lobby-team-banner { flex: 1; border-left: 2px dashed rgba(255, 255, 255, 0.55); background: color-mix(in srgb, var(--team) 14%, transparent); display: flex; justify-content: center; align-items: flex-start; padding-top: 6px; }
.lobby-team-banner:first-child { border-left: 0; }
.lobby-team-banner span { padding: 3px 12px; border-radius: 999px; background: var(--team); color: #fff; font-weight: 800; font-size: 0.85rem; box-shadow: var(--shadow-1); }
.lobby-taunt { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-size: 1.4rem; animation: lobby-taunt 1.8s ease-out forwards; pointer-events: none; }
@keyframes lobby-taunt { 0% { transform: translate(-50%, 6px) scale(0.4); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -26px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lobby-taunt { animation: none; } }

/* ---------- Mokiz Board (owner 2026-09-30): branch links in a mind map; no drawing ---------- */
.jb-linkbtn { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.85); cursor: pointer; font-size: 0.8rem; line-height: 1; }
.jb-board:not([data-mode="mindmap"]) .jb-linkbtn { display: none; }
.jb-linking .jb-note, .jb-linking .jb-topic { cursor: crosshair; outline: 2px dashed #6366f1; outline-offset: 2px; }
.jb-note.jb-link-from { outline: 3px solid #f97316 !important; }
.jb-link-hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 5; padding: 6px 12px; border-radius: 999px; background: #1f2937; color: #fff; font-size: 0.85rem; box-shadow: var(--shadow-2); }

/* ---------- Snakes & Ladders moves that play out (owner 2026-09-30) ---------- */
.gb-grid { position: relative; }
.gb-anim-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.gb-walker { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.25)); }
.gb-walker svg { display: block; width: auto; height: auto; }
.gb-walker-ladder { filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.95)); }
.gb-walker-snake { animation: gb-wiggle 0.18s linear infinite; filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.9)); }
@keyframes gb-wiggle { 50% { margin-left: 3px; } }
.gb-fx { position: absolute; transform: translate(-50%, -50%); font-size: 1.8rem; animation: gb-fx 0.9s ease-out forwards; }
@keyframes gb-fx { from { transform: translate(-50%, -50%) scale(0.3); opacity: 1; } to { transform: translate(-50%, -120%) scale(1.6); opacity: 0; } }

/* ---------- raids (owner 2026-09-30): impact rings, trails, the boss heals on wrong answers ---------- */
.raid-ring { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 4px solid #fde047; pointer-events: none; animation: raid-ring 0.55s ease-out forwards; }
.raid-ring-1 { border-color: #fb923c; } .raid-ring-2 { border-color: #a78bfa; border-width: 6px; }
@keyframes raid-ring { to { transform: scale(5); opacity: 0; } }
.raid-trail { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fde047; opacity: 0.8; pointer-events: none; animation: raid-trail 0.45s ease-out forwards; }
.raid-trail-1 { background: #fb923c; } .raid-trail-2 { background: #c4b5fd; } .raid-trail-arrow { width: 8px; height: 8px; background: #e2e8f0; }
@keyframes raid-trail { to { transform: scale(0.2); opacity: 0; } }
.raid-boss-flash { animation: raid-boss-flash 0.25s ease-out; }
@keyframes raid-boss-flash { 40% { filter: brightness(2.2); } }
.raid-heal-pop { color: #22c55e !important; font-weight: 800; }
.raid-heal-spark { position: absolute; color: #22c55e; font-weight: 800; font-size: 1.4rem; pointer-events: none; opacity: 0; animation: raid-heal-up 1.1s ease-out forwards; }
@keyframes raid-heal-up { 0% { transform: translateY(10px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }
.raid-boss-heal { animation: raid-boss-heal 0.9s ease-out; }
@keyframes raid-boss-heal { 30% { filter: drop-shadow(0 0 18px rgba(34, 197, 94, 0.95)) brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .raid-ring, .raid-trail, .raid-heal-spark { animation-duration: 0.01s; } .raid-boss-flash, .raid-boss-heal { animation: none; } }

/* Longboat Race VFX (owner 2026-09-30): bobbing boats, oars in time, a wake, surges on every push, the leader's crown */
.party-boat { transition: transform 1400ms cubic-bezier(0.22, 0.8, 0.3, 1); }
.party-bob { animation: party-bob 1.8s ease-in-out infinite; }
@keyframes party-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(3px) rotate(-1deg); } }
.party-rower .party-oar { animation: party-row 1.1s cubic-bezier(0.5, 0, 0.3, 1) infinite; }
@keyframes party-row { 0% { transform: rotate(-18deg); } 55% { transform: rotate(38deg); } 100% { transform: rotate(-18deg); } }
.party-lean { transform-box: fill-box; transform-origin: 50% 100%; animation: party-lean 1.1s cubic-bezier(0.5, 0, 0.3, 1) infinite; }
@keyframes party-lean { 0%, 100% { transform: rotate(8deg); } 55% { transform: rotate(-12deg); } }
.party-drip { opacity: 0; animation: party-drip 1.1s ease-out infinite; }
@keyframes party-drip { 0%, 50% { opacity: 0; transform: translate(0, 0); } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-14px, -10px); } }
.party-wake path { animation: party-wake 0.8s linear infinite; opacity: 0.7; }
@keyframes party-wake { to { stroke-dashoffset: 22; } }
.party-speed { opacity: 0; transition: opacity 250ms; }
.party-speed line { animation: party-speed 0.35s linear infinite; }
@keyframes party-speed { from { transform: translateX(20px); } to { transform: translateX(-20px); } }
.party-crown { opacity: 0; transition: opacity 300ms; }
.party-lead .party-crown { opacity: 1; animation: party-crown 1.2s ease-in-out infinite alternate; }
@keyframes party-crown { to { transform: translateY(-4px); } }
.party-surge .party-oar, .party-surge .party-lean, .party-surge .party-drip { animation-duration: 0.45s; }
.party-surge .party-speed { opacity: 0.85; }
.party-surge .party-wake path { animation-duration: 0.3s; opacity: 1; stroke-width: 6; }
.party-splash { animation: party-shard 0.8s ease-out forwards; transform-box: fill-box; transform-origin: center; }
.party-ring { animation: party-boom 0.7s ease-out forwards; transform-box: fill-box; transform-origin: center; }
.party-drift { animation: party-drift 12s linear infinite; }
@keyframes party-drift { to { transform: translateX(-1040px); } }
@media (prefers-reduced-motion: reduce) {
  .party-bob, .party-oar, .party-lean, .party-drip, .party-wake path, .party-speed line, .party-drift, .party-crown { animation: none !important; }
  .party-boat { transition-duration: 200ms; }
}

/* Kitchen Rush (owner 2026-09-30): what the counter in front of me is; the world hall's waiting match */
.kr-target { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: var(--w-strong); }
.kr-wait { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface-2); }
.kr-wait-spinner { font-size: 2rem; animation: kr-wait 1.4s ease-in-out infinite; }
@keyframes kr-wait { 50% { transform: rotate(-14deg) translateY(-3px); } }
.kr-wait-text { display: grid; gap: 2px; }
.kr-wait-teams { list-style: none; margin: var(--space-3) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2); }
.kr-wait-team { display: grid; gap: 6px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.kr-wait-team.is-mine { border-color: var(--team, var(--c-orange)); box-shadow: 0 0 0 2px var(--team, var(--c-orange)) inset; }
.kr-wait-name { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--w-strong); }
.kr-wait-cooks { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .kr-wait-spinner { animation: none; } }
.shop-tile-alt { font-size: 0.78rem; color: var(--text-muted, #64748b); font-weight: 600; }

/* ---- decision 65: the Premium arcade games (games/arcade_quest) ---- */
.arc-td, .arc-ship, .arc-dash, .arc-field { width: 100%; min-width: 0; }
.td-board { width: 100%; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--border); background: #7cbf60; }
.td-canvas, .dash-canvas, .field-canvas, .sea-canvas, .field-over { display: block; width: 100%; height: auto; max-width: 100%; touch-action: none; }
.td-hud, .ship-hud { display: flex; flex-wrap: wrap; gap: 6px; }
.td-money { font-weight: var(--w-heavy); }
.td-next { padding: var(--space-2); }
.td-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); }
.td-buy { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 8px; align-items: center; text-align: left; min-height: 64px; padding: 6px 10px; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.td-buy .td-icon { grid-row: 1 / 4; }
.td-buy:disabled { opacity: 0.45; cursor: not-allowed; }
.td-buy:not(:disabled):hover { border-color: var(--c-orange); }
.td-icon { width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--border); background: #86c96a; }
.td-cost { font-weight: var(--w-heavy); color: #a16207; }
.td-info { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.td-actions { gap: 6px; flex-wrap: wrap; }
.td-broken { color: var(--bad); font-weight: var(--w-strong); }
.td-team-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-3); }
.td-team-board { display: grid; gap: 6px; padding: 8px; border-radius: var(--radius-m); border: 2px solid var(--team, var(--border)); background: var(--surface); }
.td-coop-board { display: grid; gap: 8px; padding: 10px; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); max-width: 1100px; margin: 0 auto; width: 100%; } /* td_team co-op: one big shared board */
.td-standings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-2); }
.td-stand { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.td-stand.is-dead { opacity: 0.45; }
.td-stand.is-won { border-color: #22c55e; box-shadow: 0 0 0 2px #22c55e inset; }
.td-lives { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.td-lives > span { display: block; height: 100%; background: #ef4444; transition: width 400ms; }
.arc-question { gap: var(--space-2); }
.arc-question-compact .quiz-qtext { font-size: 1.15rem; }
.arc-question-compact .answer-grid-xl .answer-tile { min-height: clamp(64px, 12vh, 120px); }
.arc-q-head { justify-content: space-between; align-items: center; }
.arc-q-count { font-size: 1.6rem; font-weight: var(--w-heavy); min-width: 2ch; text-align: right; }
.arc-result { text-align: center; font-size: 1.3rem; font-weight: var(--w-heavy); margin: 0; animation: arc-pop 400ms ease-out; }
.arc-good { color: #16a34a; }
.arc-bad { color: #dc2626; }
@keyframes arc-pop { from { transform: scale(0.6); opacity: 0; } }
.arc-start { flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.arc-live { grid-template-columns: minmax(0, 1fr) 260px; }
.sea-wrap { width: 100%; overflow-x: auto; }
.sea-canvas { min-width: 280px; border-radius: 8px; cursor: crosshair; }
.ship-types { flex-wrap: wrap; }
.ship-fire-hint { font-weight: var(--w-heavy); color: #b91c1c; font-size: 1.15rem; }
.ship-seas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-3); }
.ship-sea { display: grid; gap: 6px; padding: 8px; border-radius: var(--radius-m); border: 2px solid var(--team, var(--border)); background: var(--surface); }
.ship-stage-head { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; font-size: 1.2rem; }
.dash-game, .field-game { display: grid; gap: 8px; width: 100%; }
.dash-canvas, .field-canvas { border-radius: var(--radius-m); border: 1px solid var(--border); }
.dash-hud, .field-hud { font-weight: var(--w-heavy); padding: 6px 12px; border-radius: 999px; background: var(--surface-2); text-align: center; }
.dash-hud-bad { background: #fee2e2; color: #991b1b; }
.dash-pad { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); user-select: none; -webkit-user-select: none; }
.dash-pad-move { display: flex; gap: var(--space-2); }
.dash-btn { min-width: 76px; min-height: 76px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.9rem; font-weight: var(--w-heavy); touch-action: none; cursor: pointer; }
.dash-btn:active { background: var(--surface-2); transform: translateY(1px); }
.dash-jump { min-width: 140px; font-size: 1.3rem; background: var(--c-orange); color: #fff; border-color: transparent; }
.field-help { text-align: center; margin: 0; }
.field-qbox .arc-question { margin-top: 0; }
.dash-over { padding: var(--space-4) var(--space-3); border-radius: var(--radius-m); border: 1px solid var(--border); background: #bfe3ff; }
.dash-track { position: relative; height: 150px; border-bottom: 10px solid #65a30d; }
.dash-gate-mark { position: absolute; bottom: 0; width: 6px; height: 70px; background: #78716c; border-radius: 3px; }
.dash-boss-mark { position: absolute; bottom: 0; font-size: 2.2rem; transform: translateX(-50%); transition: left 400ms linear; }
.dash-runner-mark { position: absolute; bottom: 8px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.8rem; font-weight: var(--w-strong); white-space: nowrap; transition: left 400ms linear; }
.dash-runner-mark:nth-child(odd) { bottom: 40px; }
.dash-runner-mark.is-out { opacity: 0.4; text-decoration: line-through; }
.dash-runner-mark.is-done { background: #fde047; }
.field-over-wrap { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--border); }
@media (max-width: 760px) { .arc-live { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .arc-result { animation: none; } .dash-boss-mark, .dash-runner-mark { transition: none; } }
/* the Tower Defense arena (#/arena) */
.arena-page { max-width: 1280px; margin: 0 auto; }
.arena-head { align-items: stretch; }
.arena-art svg { width: 100%; max-height: 180px; border-radius: var(--radius-m); }
.arena-seg { flex-wrap: wrap; }
.arena-bar { justify-content: space-between; align-items: center; }
.arena-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.arena-board li { display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--radius-m); background: var(--surface-2); }
.arena-top-1 { background: #fef3c7 !important; }
.arena-top-2 { background: #f1f5f9 !important; }
.arena-top-3 { background: #ffedd5 !important; }
.arena-rank { font-weight: var(--w-heavy); }
.arena-result { display: grid; gap: 4px; padding: var(--space-3); border-radius: var(--radius-m); background: var(--bad-soft); text-align: center; font-size: 1.15rem; }
.arena-result.is-won { background: var(--ok-soft); }
.mq-q-gone { color: var(--c-purple-700); font-size: 1.6em !important; }
.td-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: var(--space-3); align-items: start; }
.td-side { display: grid; gap: var(--space-3); position: sticky; top: 72px; }
.td-side .td-shop { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (max-width: 900px) { .td-main { grid-template-columns: 1fr; } .td-side { position: static; } }
/* the teacher's mode picker: the next step bar (owner 2026-09-30) */
.mode-next { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-l); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-2); }
.mode-next .btn { min-height: 48px; font-size: 1.05rem; }

/* any room game can fill the screen with everything it has (owner 2026-09-30: menus and controls stay in the game) */
.game-fs-btn { margin-left: auto; }
.game-focus { position: fixed; inset: 0; z-index: 60; overflow: auto; background: var(--bg, #f6f4f1); padding: 56px max(12px, env(safe-area-inset-left)) 16px; }
.game-focus-exit { display: none; }
.game-focus .game-focus-exit { display: inline-flex; position: fixed; top: 10px; right: 10px; z-index: 61; }
html.game-focus-on { overflow: hidden; }/* the student's room page: narrow for the lobby, wide for a game on a PC (owner 2026-09-30: bigger on a PC) */
.room-page { max-width: 640px; margin: 0 auto; width: 100%; transition: max-width 250ms ease; }
.room-page.room-in-game { max-width: min(1600px, 100%); }
@media (min-width: 761px) and (max-width: 1100px) { .room-page.room-in-game { max-width: 100%; } }
/* game screens use a PC's width (owner 2026-09-30): the projector in a game, a student in a game, the world, the arena */
.container:has(.room-bar), .container:has(.room-in-game), .container:has(.world-live), .container:has(.arena-page) { max-width: 1440px; }
@media (min-width: 1500px) { .container:has(.room-bar), .container:has(.room-in-game), .container:has(.world-live), .container:has(.arena-page) { max-width: 1760px; } }
/* the world kitchen's card over the map: the queue, the 3-2-1, the round's result (owner 2026-09-30) */
.world-map { position: relative; }
.kr-overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 12px; background: rgba(15, 23, 42, 0.55); overflow: auto; }
.kr-overlay-card { width: min(560px, 100%); padding: var(--space-4); border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-3); }
.kr-overlay-card h2 { margin: 0; }
.kr-overlay-icon { font-size: 3rem; }
.kr-wait-status { font-size: 1.2rem; }
.kr-overlay-count { display: grid; gap: 6px; place-items: center; color: #fff; }
.kr-overlay-count .intro-num { color: #fff; }
.kr-final-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.kr-final-list li { display: grid; grid-template-columns: 3ch auto 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: var(--radius-m); background: var(--surface-2); border-left: 4px solid var(--team, var(--border)); }
.kr-final-list li.is-mine { box-shadow: 0 0 0 2px var(--team) inset; }
.kr-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.kr-stat { display: grid; place-items: center; gap: 2px; padding: var(--space-3); border-radius: var(--radius-m); background: var(--surface-2); }
.kr-stat strong { font-size: 1.6rem; font-weight: var(--w-heavy); }
.kr-stat-icon { font-size: 1.6rem; }
/* the page in the middle, the ads at the screen's edges (owner 2026-09-30). The rails are fixed to the left and right
   edges under the topbar (160 px, 300 px on a very wide screen) and only show on pages that may carry ads (shell.js
   railsAllowed) with a filled slot; the page then gets the whole width between them. */
.side-rail { display: none; }
@media (min-width: 1024px) {
  .home-solo { width: min(100%, 600px); gap: var(--space-4); }
  .home-solo .hero-banner { max-height: 230px; }
  .home-solo .home-mini { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
  .home-solo .home-mini-item { min-height: 84px; }
  .home-solo .home-mini-icon { font-size: 1.8rem; }
}
@media (min-width: 1500px) {
  .home-solo { width: min(100%, 760px); }
  .home-solo .hero-banner { max-height: 290px; }
  .home-solo .home-mini-item { min-height: 96px; }
}
@media (min-width: 1200px) {
  body { --rail-w: 160px; --rail-gap: 24px; }
  body.with-rails .side-rail:has(.ad-slot[data-ad-active="true"]) { display: block; position: fixed; top: 76px; bottom: 12px; width: var(--rail-w); z-index: 5; overflow: hidden; }
  body.with-rails .side-rail-left { left: 8px; }
  body.with-rails .side-rail-right { right: 8px; }
  body.with-rails .side-rail .ad-slot { width: 100%; margin: 0; }
  body.with-rails .side-rail .ad-dev, body.with-rails .side-rail .adsbygoogle { min-height: 600px; text-align: center; padding: var(--space-2); }
  body.with-rails:has(.side-rail .ad-slot[data-ad-active="true"]) .container { max-width: min(1400px, calc(100% - 2 * (var(--rail-w) + var(--rail-gap) + 8px))); }
  body.with-rails:has(.side-rail .ad-slot[data-ad-active="true"]) .seo { width: min(1100px, calc(100% - 2 * (var(--rail-w) + var(--rail-gap) + 8px))); }
}
@media (min-width: 1760px) { body { --rail-w: 300px; } }
.world-focus ~ .ad-slot, .world-focus .ad-slot, .game-focus .ad-slot { display: none !important; }
/* the footer with the plain pages (owner 2026-09-30): quiet, and gone inside a game or the world */
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; padding: var(--space-4) var(--space-4) var(--space-6); color: var(--text-muted); font-size: var(--fs-0); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--c-orange); text-decoration: underline; }
body:has(.room-in-game, .room-bar, .world-live, .arena-page, .game-focus, .world-focus) .site-footer { display: none; }
/* a thing alone on a shop tile (owner 2026-09-30), and the hi-end sparkles and orbit wherever they show */
.pd-item-only { display: block; margin: 0 auto; overflow: visible; }
.shop-tile .pd-item-only { width: 92px; height: 92px; }
.shop-tile:hover .pd-item-only, .shop-tile:focus-visible .pd-item-only { transform: scale(1.08) rotate(-3deg); transition: transform 200ms ease; }
.paperdoll .pd-vfx .pd-twinkle { transform-box: fill-box; transform-origin: center; }
.paperdoll .pd-orbit { animation-duration: 6s; }
.pd-item-only .pd-hat, .pd-item-only .pd-face, .pd-item-only .pd-neck, .pd-item-only .pd-hand { animation: pd-bob 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pd-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4%) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .pd-item-only .pd-hat, .pd-item-only .pd-face, .pd-item-only .pd-neck, .pd-item-only .pd-hand, .paperdoll .pd-orbit { animation: none; } }
html[data-motion="reduced"] .pd-item-only :is(.pd-hat, .pd-face, .pd-neck, .pd-hand), html[data-motion="reduced"] .paperdoll .pd-orbit { animation: none; }
/* raid beams (owner 2026-09-30): light between a player and the boss */
.raid-beam { position: absolute; height: 10px; margin-top: -5px; transform-origin: 0 50%; border-radius: 6px; pointer-events: none; z-index: 4; animation: raid-beam 520ms ease-out forwards; }
.raid-beam-core { position: absolute; left: 0; right: 0; top: 3px; height: 4px; border-radius: 3px; background: #ffffff; }
.raid-beam-hit { background: rgba(96, 165, 250, 0.55); box-shadow: 0 0 12px 4px rgba(96, 165, 250, 0.7); }
.raid-beam-crit { background: rgba(250, 204, 21, 0.6); box-shadow: 0 0 16px 6px rgba(250, 204, 21, 0.75); height: 14px; margin-top: -7px; }
.raid-beam-super { background: rgba(232, 121, 249, 0.65); box-shadow: 0 0 22px 9px rgba(232, 121, 249, 0.8); height: 18px; margin-top: -9px; }
.raid-beam-arrow { background: rgba(134, 239, 172, 0.55); box-shadow: 0 0 10px 3px rgba(34, 197, 94, 0.6); height: 6px; margin-top: -3px; }
.raid-beam-boss { background: rgba(239, 68, 68, 0.6); box-shadow: 0 0 16px 6px rgba(239, 68, 68, 0.7); }
.raid-beam-crit .raid-beam-core, .raid-beam-super .raid-beam-core { top: 4px; height: 6px; }
@keyframes raid-beam { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 30% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
.raid-charge { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none; z-index: 4; animation: raid-charge 520ms ease-out forwards; }
.raid-charge-hit { background: rgba(147, 197, 253, 0.6); } .raid-charge-crit { background: rgba(253, 224, 71, 0.65); } .raid-charge-super { background: rgba(240, 171, 252, 0.7); }
.raid-charge-arrow { background: rgba(134, 239, 172, 0.55); } .raid-charge-boss { background: rgba(248, 113, 113, 0.6); }
@keyframes raid-charge { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .raid-beam, .raid-charge { display: none; } }
/* the team strip on a team game's phone (owner 2026-10-01): my team, its colour, every team's score */
.team-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); padding: var(--space-2) var(--space-3); border: 2px solid var(--team, var(--border)); border-radius: var(--radius-m); background: color-mix(in srgb, var(--team, #888) 12%, var(--surface)); }
.team-strip-me { display: inline-flex; align-items: center; gap: var(--space-2); }
.team-strip-scores { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); font-weight: var(--w-strong); }
.team-strip-score { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.team-strip-score.is-mine { outline: 2px solid var(--team); }
/* uneven teams before the start (owner 2026-10-01) */
.team-warn { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--warn, #f59e0b); border-radius: var(--radius-m); background: var(--warn-soft, #fef3c7); list-style: none; }
.auth-forgot { align-self: center; color: var(--c-orange-700); font-size: var(--fs-0); font-weight: var(--w-strong); }
/* Market Day on the phone (owner 2026-10-01): trade cards 2 x 2 above a compact question, all in one screen */
.party-trade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.pm-tradecard { display: grid; gap: 6px; padding: 8px; border: 1px solid #fde68a; border-radius: var(--radius-m); background: #fffbeb; }
.pm-tradehead { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon name price" "icon name move"; align-items: center; gap: 0 6px; }
.pm-tradecard .pm-icon { font-size: 1.6rem; }
.pm-tradecard .pm-price { font-size: 1.15rem; }
.pm-tradebtns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px; align-items: center; }
.pm-tradebtns .btn { min-height: 44px; padding-inline: 6px; }
.party-play-market .answer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.party-play-market .answer { min-height: 64px; }
/* the projector: a taller price chart for every good */
.party-scene:not(.party-compact) .pm-chart { height: 90px; }
.party-scene:not(.party-compact) .pm-card { grid-template-areas: "icon name price" "chart chart chart" "move move move"; }

/* owner 2026-10-06: on a PC the student's raid field and ladder board stretched to the whole width (the raid field kept
   a phone height, so the boss was cut in half; the board became a long strip). Keep the phone shape, centred. */
.raid-compact { max-width: 820px; margin-inline: auto; }
.raid-compact .raid-field { height: auto; aspect-ratio: 16 / 9; max-height: 42vh; min-height: 200px; }
.gameboard-compact { width: 100%; max-width: 760px; margin-inline: auto; }
/* owner 2026-10-06 (2nd look): on a PC the student sees the battle as big as the teacher's, only without the score
   column (the teacher's screen keeps it): full width, the teacher's field height and boss size */
@media (min-width: 900px) {
  .raid-compact { max-width: none; }
  .raid-compact .raid-field { aspect-ratio: auto; height: clamp(280px, 46vh, 480px); max-height: none; }
  .raid-compact .raid-boss { width: clamp(170px, 30%, 320px); right: 3%; }
  .raid-compact.raid-defense .raid-boss { width: clamp(140px, 24%, 260px); }
  .raid-compact .raid-castle { width: clamp(130px, 21%, 230px); }
}
@media (min-width: 900px) {
  .party-compact .party-svg { max-height: 42vh; } /* the student's boat race / tower on a PC: as big as the screen allows */
}
/* the PIN on the teacher's screen while a game runs (owner 2026-10-06) */
.live-pin { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.live-pin[hidden] { display: none; }
.live-pin-label { color: var(--muted); font-weight: 600; }
.live-pin-num { font-size: 1.6rem; font-weight: 800; letter-spacing: 3px; }
.live-pin-url { color: var(--muted); }
.join-pass { font-size: 1.3rem; } .join-pass strong { font-size: 2rem; font-weight: 800; letter-spacing: 3px; }
.live-pin-pass { font-weight: 800; font-size: 1.2rem; }
.room-password-row { align-items: center; gap: 8px; } .room-password { width: 9em; }
/* Mokiz World (owner 2026-10-06): emotes, and in focus the chat on the right with the game's panel folding above it */
.world-emotes { display: flex; flex-wrap: wrap; gap: 4px; }
.world-emote { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.35rem; line-height: 1; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.world-emote:hover { background: var(--surface-2, #f1efe9); }
.world-emote:active { transform: scale(0.94); }
.world-side { display: none; }
.world-focus .world-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; max-height: 100vh; max-height: 100dvh; padding: 56px 10px 10px; background: var(--surface); border-left: 1px solid var(--border); overflow: hidden; }
.world-focus .world-side .world-area { flex: 0 1 auto; max-height: 48dvh; overflow: auto; padding: 0; border: 0; background: none; }
.world-focus .world-side.area-min .world-area { display: none; }
.world-focus .world-side .world-chat { flex: 1 1 auto; min-height: 0; max-height: none; padding: 0; border: 0; box-shadow: none; background: none; }
.world-focus .world-side .world-chat-list { max-height: none; min-height: 80px; }
.world-focus .world-side .world-safety { display: none; }
.world-area-toggle { align-self: flex-start; }
@media (max-width: 760px) {
  .world-focus .world-side { max-height: 46dvh; padding: 8px; border-left: 0; border-top: 1px solid var(--border); }
  .world-focus .world-side .world-chat-list { min-height: 60px; }
  .world-focus .world-side .world-chat h2 { display: none; }
}
/* admin: visits of the last 14 days (owner 2026-10-06) */
.visit-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 160px; padding-top: 18px; }
.visit-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.visit-bar-fill { width: 100%; min-height: 2px; border-radius: 6px 6px 0 0; background: var(--c-orange, #f97316); }
.visit-bar:last-child .visit-bar-fill { background: var(--c-green, #22c55e); }
.visit-bar-n { font-size: 0.7rem; color: var(--muted); }
.visit-bar-day { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }
#admin-words { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--border-strong); border-radius: 10px; }
/* the raid's ending (owner 2026-10-06): heroes on the fallen boss, or the boss gloating over the knocked-out heroes */
.raid-end { width: 100%; border-radius: var(--radius-l); overflow: hidden; border: 1px solid #2e2766; background: #1e1b4b; }
.raid-end.raid-defense { border-color: #1e3a5f; background: #14314f; }
.raid-end .raid-end-field { height: clamp(240px, 42vh, 420px); border-radius: 0; }
.raid-end-compact .raid-end-field { height: 220px; }
.raid-end-boss { position: absolute; z-index: 5; width: clamp(150px, 30%, 300px); }
.raid-end-boss svg { width: 100%; height: auto; display: block; }
.raid-end-boss-down { left: 50%; bottom: 3%; width: clamp(150px, 26%, 280px); transform: translateX(-50%) rotate(-90deg); transform-origin: 50% 50%; filter: saturate(0.55) brightness(0.9); }
.raid-end-dizzy { position: absolute; left: 10%; top: 30%; font-size: 2rem; transform: rotate(90deg); animation: raid-end-spin 1.6s linear infinite; }
.raid-end-boss-gloat { left: 50%; bottom: 10%; width: clamp(180px, 36%, 360px); transform: translateX(-50%); animation: raid-end-gloat 1.1s ease-in-out infinite; transform-origin: 50% 100%; }
.raid-end-taunt { position: absolute; left: 70%; top: -6%; white-space: nowrap; padding: 6px 12px; border-radius: 14px; background: #fff; color: #111827; font-weight: 800; font-size: clamp(0.85rem, 2vw, 1.2rem); border: 2px solid #1f2937; }
.raid-end-hero { position: absolute; z-index: 7; transform: translate(-50%, -100%); display: flex; flex-direction: column-reverse; align-items: center; }
.raid-end-onboss { bottom: 44%; top: auto; transform: translateX(-50%); animation: raid-end-hop 0.9s ease-in-out infinite; }
.raid-end-crowd { bottom: 8%; top: auto; transform: translateX(-50%); animation: raid-end-hop 1.1s ease-in-out infinite; }
.raid-end-fallen { bottom: 6%; top: auto; transform: translateX(-50%) rotate(var(--tilt, 88deg)); transform-origin: 50% 85%; opacity: 0.92; }
.raid-end-fallen::after { content: "\1F4AB"; position: absolute; top: -10px; left: 50%; font-size: 1.1rem; }
.raid-end-fallen .raid-tag { display: none; }
.raid-end-back { bottom: 17%; z-index: 6; } /* the second row of fallen heroes */
.raid-end-me .raid-tag { background: #f97316; }
.raid-end-castle { left: 3%; bottom: 8%; }
.raid-end-ruin { transform: rotate(-9deg) translateY(12%); filter: grayscale(0.7) brightness(0.75); }
@keyframes raid-end-hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes raid-end-gloat { 0%, 100% { scale: 1 1; } 50% { scale: 1.06 0.95; } }
@keyframes raid-end-spin { to { rotate: 450deg; } }
@media (prefers-reduced-motion: reduce) { .raid-end-onboss, .raid-end-crowd, .raid-end-boss-gloat, .raid-end-dizzy { animation: none; } }
/* owner 2026-10-06: on a PC the question box is part of the game's panel: the game on the left (as tall as the screen
   allows), the question beside it on the right, no scrolling (boss / castle raids, dino / sea, battleship); on the map
   games (egg heist, treasure hunt) the question card floats on the right of the map instead of covering it */
@media (min-width: 900px) {
  .raid-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--space-3); align-items: start; }
  .raid-play > .raid-scene { grid-column: 1; grid-row: 1 / span 6; }
  .raid-play > :not(.raid-scene) { grid-column: 2; }
  .raid-play .raid-compact .raid-field { height: clamp(320px, 56vh, 620px); }
  .raid-play .answer-grid, .arc-field .answer-grid, .arc-ship .answer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arc-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--space-3); align-items: start; }
  .arc-field > .field-qbox { grid-column: 2; grid-row: 1; }
  .arc-field > :not(.field-qbox) { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
  .arc-ship { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--space-3); align-items: start; }
  .arc-ship > * { grid-column: 2; }
  .arc-ship > .sea-wrap { grid-column: 1; grid-row: 1 / span 12; max-width: min(100%, 76vh); justify-self: center; width: 100%; }
  .mq-modal { inset: 10px 10px 10px auto; width: min(430px, 42%); padding: 0; background: none; align-items: center; }
  .mq-modal .mq-q-card { max-height: calc(100% - 4px); }
  .mq-modal .answer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* หมู่บ้านผีดุ (owner 2026-10-06) */
.gv-page { max-width: 1200px; margin: 0 auto; }
.gv-hero { background: var(--surface); }
.gv-tables { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gv-tables li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-m); }
.gv-custom { display: grid; gap: 8px; }
.gv-group { border: 1px solid var(--border); border-radius: var(--radius-m); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.gv-check { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.gv-item-btns { flex-wrap: wrap; gap: 8px; }
.gv-phase { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--radius-l); border: 1px solid var(--border); background: var(--surface); font-size: 1.1rem; }
.gv-phase-night { background: #1e1b4b; color: #e0e7ff; border-color: #312e81; }
.gv-phase-night .btn { color: #e0e7ff; }
.gv-phase-vote { background: #fff7ed; border-color: #fdba74; }
.gv-phase-over { background: #ecfdf5; border-color: #6ee7b7; }
.gv-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: var(--space-3); align-items: start; }
@media (max-width: 900px) { .gv-board { grid-template-columns: 1fr; } .gv-side { order: -1; } }
.gv-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.gv-seat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 104px; padding: 8px 4px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); font: inherit; cursor: pointer; }
.gv-seat:disabled { cursor: default; opacity: 1; }
.gv-seat.is-me { border-color: var(--c-orange, #f97316); }
.gv-seat.is-mate { background: #f5f3ff; }
.gv-seat.is-picked { outline: 3px solid #7c3aed; outline-offset: 1px; }
.gv-seat.is-dead { opacity: 0.45; filter: grayscale(1); }
.gv-seat-name { font-weight: 600; font-size: 0.85rem; text-align: center; overflow-wrap: anywhere; }
.gv-seat-tag { font-size: 0.7rem; }
.gv-votes { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 999px; background: #dc2626; color: #fff; font-weight: 800; font-size: 0.8rem; }
.gv-role { border-width: 2px; }
.gv-team-village { border-color: #22c55e; } .gv-team-ghost { border-color: #7c3aed; } .gv-team-neutral { border-color: #f59e0b; }
.gv-role-icon { font-size: 2.4rem; line-height: 1; }
.gv-role-name { font-size: 1.25rem; }
.gv-extra { margin: 0; }
.gv-act { padding: 8px; border: 1px dashed var(--border); border-radius: var(--radius-m); }
.gv-kill { border-color: #a78bfa; background: #f5f3ff; }
.gv-chat-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; display: grid; gap: 4px; font-size: 0.9rem; }
.gv-chat form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; }
.gv-chat-gchat { border-color: #a78bfa; background: #faf5ff; }
.gv-inbox ul, .gv-log ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.gv-inbox { border-color: #a78bfa; }
.gv-over h2 { font-size: 1.6rem; }
/* owner 2026-10-13: หมู่บ้านผีดุ - card lobby, the 4 x 4 grid (half-body characters, numbers, vote signs, tombstones,
   role badges) and an effect for every event (reduced motion: no movement) */
/* owner 2026-10-13: the home page text (index.html #seo, real HTML for search and ad reviewers) */
.seo { width: min(100% - 32px, 1100px); margin: var(--space-4, 24px) auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4, 24px); color: var(--text); line-height: 1.75; }
.seo > section { min-width: 0; padding: clamp(16px, 3vw, 28px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); }
.seo h1 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.35; }
.seo h2 { margin: 0 0 10px; font-size: 1.3rem; }
.seo h3 { margin: 10px 0 4px; font-size: 1.05rem; }
.seo p { margin: 0 0 10px; }
.seo ol, .seo-list { padding-left: 1.3em; display: grid; gap: 6px; }
.seo img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-m); }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 12px 0; }
.seo-game { display: grid; gap: 6px; align-content: start; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-m); }
.seo-game p { font-size: 0.95rem; }
.seo-world img { max-width: 720px; margin: 10px auto; }
.seo-faq details { padding: 10px 0; border-bottom: 1px solid var(--border); }
.seo-faq summary { font-weight: 600; cursor: pointer; min-height: 32px; }
.seo-links { text-align: center; color: var(--text-muted); }
.seo a { color: var(--c-orange, #ea580c); }
.seo-noscript { text-align: center; }
/* owner 2026-10-13: back to the PIN card from the home page text (bottom middle: never over a side ad) */
.to-top { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--c-orange, #f97316); color: #fff; font: inherit; font-weight: 700; box-shadow: var(--shadow-2); cursor: pointer; }
.to-top:hover { filter: brightness(1.05); }
.gv-page .btn { min-height: 48px; font-size: 1rem; }
.gv-hero { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-3); align-items: center; background: #1e1b4b; color: #e0e7ff; border-color: #312e81; }
.gv-hero h1 { margin: 0; color: #fff; }
.gv-hero .muted { color: #c7d2fe; }
.gv-hero-art { position: relative; height: 110px; border-radius: var(--radius-m); background: #312e81; overflow: hidden; }
.gv-moon { position: absolute; top: 14px; right: 18px; width: 34px; height: 34px; border-radius: 50%; background: #fef3c7; box-shadow: 0 0 0 8px rgba(254,243,199,0.12); }
.gv-hut { position: absolute; bottom: 0; left: 14px; width: 54px; height: 40px; background: #0f172a; }
.gv-hut::before { content: ''; position: absolute; left: -8px; top: -24px; border: 35px solid transparent; border-bottom: 24px solid #0f172a; border-top: 0; }
.gv-hut-2 { left: 76px; width: 40px; height: 30px; }
.gv-hut-2::before { left: -7px; top: -18px; border-width: 0 27px 18px; }
.gv-chips { flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) { .gv-hero { grid-template-columns: 1fr; } .gv-hero-art { height: 80px; } }
.gv-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-3); align-items: stretch; }
.gv-mode h2 { margin: 0; font-size: 1.2rem; }
.gv-mode-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); font-size: 1.7rem; }
.gv-mode-quick { border-color: #7c3aed; }
.gv-mode .btn-hero { margin-top: auto; }
.gv-presets { display: grid; gap: 6px; }
.gv-preset { display: grid; gap: 2px; text-align: left; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.gv-preset.is-on { border-color: #7c3aed; background: #f5f3ff; box-shadow: inset 0 0 0 1px #7c3aed; }
.gv-preset .muted { font-size: 0.8rem; }
.gv-tables { display: grid; gap: 8px; }
.gv-table-card { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-m); }
.gv-fill { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.gv-fill span { display: block; height: 100%; background: #7c3aed; }
.gv-count { font-weight: 600; font-size: 0.9rem; }
.gv-row2 { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: var(--space-3); align-items: start; }
@media (max-width: 900px) { .gv-row2 { grid-template-columns: 1fr; } }
.gv-stats h2, .gv-items h2 { margin: 0; font-size: 1.2rem; }
.gv-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gv-stat { display: grid; gap: 2px; padding: 8px 4px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-m); }
.gv-stat strong { font-size: 1.3rem; font-weight: 800; }
.gv-stat span { font-size: 0.75rem; color: var(--text-muted); }
.gv-stat.is-village { border-color: #86efac; } .gv-stat.is-ghost { border-color: #c4b5fd; } .gv-stat.is-neutral { border-color: #fcd34d; }
.gv-item-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gv-item-btns .btn { flex: 1 1 200px; }
.gv-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-cat { min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.gv-cat.is-on { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.gv-rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gv-rcard { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 12px 8px 8px; border: 2px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.gv-rcard-village { border-color: #86efac; } .gv-rcard-ghost { border-color: #c4b5fd; background: #faf5ff; } .gv-rcard-neutral { border-color: #fcd34d; background: #fffbeb; }
.gv-rcard.is-owned { box-shadow: 0 0 0 2px #f59e0b; }
.gv-rcard-icon { font-size: 2rem; line-height: 1; }
.gv-rcard-team { font-size: 0.75rem; color: var(--text-muted); }
.gv-rcard-d { margin: 0; font-size: 0.78rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gv-rcard-n { position: absolute; top: 6px; right: 6px; padding: 0 8px; border-radius: 999px; background: #f59e0b; color: #fff; font-weight: 800; font-size: 0.8rem; line-height: 20px; }
.gv-rcard-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; }
.gv-rcard-buy .btn { min-height: 44px; padding: 0 6px; font-size: 0.9rem; }
.gv-rcard-big { max-width: 240px; margin: 0 auto; padding: 18px 12px; }
.gv-rcard-big .gv-rcard-icon { font-size: 3.4rem; }
.gv-rcard-big .gv-rcard-d { -webkit-line-clamp: 6; }
.gv-wild { justify-self: start; }

/* the grid */
.gv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gv-grid .gv-seat { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding: 0 0 6px; overflow: hidden; border: 2px solid var(--border); border-radius: var(--radius-m); background: #eef2ff; color: inherit; }
.gv-board-night .gv-grid .gv-seat { background: #312e81; color: #e0e7ff; border-color: #4338ca; }
.gv-figure { position: relative; width: 100%; aspect-ratio: 1 / 0.72; overflow: hidden; }
.gv-figure svg { position: absolute; left: 50%; top: 6%; width: 74%; height: auto; transform: translateX(-50%); }
.gv-grid .gv-seat-name { padding: 2px 4px 0; font-size: 0.82rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.gv-grid .gv-seat-tag { position: absolute; top: 30px; left: 4px; font-size: 0.65rem; }
.gv-num { position: absolute; top: 4px; left: 4px; z-index: 3; min-width: 24px; height: 24px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: #1f2937; color: #fff; font-weight: 800; font-size: 0.85rem; }
.gv-grid .gv-votes { top: 4px; right: 4px; z-index: 3; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; }
.gv-grid .gv-seat.is-me { border-color: var(--c-orange, #f97316); }
.gv-grid .gv-seat.is-mate { border-color: #a78bfa; }
.gv-grid .gv-seat.is-picked { outline: 3px solid #7c3aed; outline-offset: -1px; }
.gv-grid .gv-seat.is-dead { opacity: 1; filter: none; background: #e5e7eb; }
.gv-grid .gv-seat.is-dead .gv-figure { filter: grayscale(1); opacity: 0.35; }
.gv-grid .gv-seat.is-won { border-color: #f59e0b; box-shadow: 0 0 0 2px #fcd34d; }
.gv-crown { position: absolute; top: 6px; left: 50%; width: 26px; height: 14px; transform: translateX(-50%); background: #f59e0b; clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); z-index: 3; }
/* a tombstone over the dead */
.gv-tomb { position: absolute; left: 50%; bottom: 26px; z-index: 2; width: 46%; aspect-ratio: 1 / 1.15; transform: translateX(-50%); display: grid; place-items: center; border-radius: 45% 45% 6px 6px; background: #9ca3af; border: 2px solid #6b7280; color: #374151; font-weight: 800; font-size: 0.75rem; }
.gv-tomb::after { content: ''; position: absolute; left: -12%; right: -12%; bottom: -5px; height: 6px; border-radius: 3px; background: #6b7280; }
/* the role badge, bottom-left: the dead and anyone revealed */
.gv-role-mini { position: absolute; left: 4px; bottom: 24px; z-index: 3; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #fff; border: 1px solid var(--border-strong); font-size: 1rem; line-height: 1; }
.gv-role-mini-dead { background: #f3f4f6; }
/* the vote sign held up: the number of who I vote for */
.gv-sign { position: absolute; right: 6px; bottom: 26px; z-index: 3; display: grid; justify-items: center; }
.gv-sign-board { min-width: 30px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-radius: 4px; background: #fff; border: 2px solid #dc2626; color: #dc2626; font-weight: 800; font-size: 1rem; }
.gv-sign-stick { width: 4px; height: 12px; background: #92400e; }
.gv-sign.is-skip .gv-sign-board { border-color: #6b7280; color: #6b7280; }
.gv-sys { padding: 2px 8px; border-left: 3px solid #a78bfa; background: var(--surface-2); border-radius: 4px; font-size: 0.85rem; }
.gv-sys-dawn_dead, .gv-sys-hanged_n, .gv-sys-left, .gv-sys-lover_died { border-color: #dc2626; }
.gv-sys-attack_saved, .gv-sys-shield { border-color: #22c55e; }
.gv-sys-calm_warn, .gv-sys-stalemate, .gv-sys-no_hang_tie, .gv-sys-no_hang_few, .gv-sys-no_hang_none { border-color: #f59e0b; }
.gv-chat-num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: 4px; padding: 0 4px; border-radius: 999px; background: #1f2937; color: #fff; font-size: 0.72rem; font-weight: 800; }
.gv-chat-list { max-height: 340px; }
.gv-calm { justify-self: start; }
.gv-coins-got { font-size: 1.4rem; font-weight: 800; color: #b45309; margin: 0; }
.gv-over.is-won { border-color: #f59e0b; background: #fffbeb; }
.gv-over-me { font-size: 1.15rem; font-weight: 600; margin: 0; }
@media (max-width: 560px) {
  .gv-grid { gap: 4px; }
  .gv-grid .gv-seat-name { font-size: 0.7rem; }
  .gv-num, .gv-grid .gv-votes { min-width: 20px; height: 20px; font-size: 0.72rem; }
  .gv-role-mini { width: 22px; height: 22px; font-size: 0.8rem; bottom: 20px; }
  .gv-sign-board { min-width: 24px; height: 22px; font-size: 0.85rem; }
  .gv-table-card { grid-template-columns: minmax(0, 1fr) auto; }
  .gv-table-card .gv-fill { display: none; }
}

/* effects */
.gv-seat.fx-protect { --fx: #22c55e; box-shadow: 0 0 0 3px #22c55e, 0 0 0 9px rgba(34,197,94,0.25); animation: gv-pulse 1.4s ease-in-out infinite; }
.gv-seat.fx-look { --fx: #8b5cf6; box-shadow: 0 0 0 3px #8b5cf6, 0 0 0 9px rgba(139,92,246,0.25); animation: gv-pulse 1.4s ease-in-out infinite; }
.gv-seat.fx-harm, .gv-seat.fx-kill { box-shadow: 0 0 0 3px #dc2626, 0 0 0 9px rgba(220,38,38,0.25); }
.gv-seat.fx-kill::after, .gv-seat.fx-harm::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  inset: -10% auto -10% 48%; width: 7px; border-radius: 4px; background: rgba(220,38,38,0.85); transform: rotate(35deg); transform-origin: top;
  animation: gv-slash 0.45s ease-out both; }
.gv-seat.fx-vote { box-shadow: 0 0 0 3px #f97316; }
.gv-sign.is-new { animation: gv-raise 0.5s cubic-bezier(.2,1.6,.4,1) both; }
.gv-seat.just-died { animation: gv-shake 0.5s ease-in-out; }
.gv-seat.just-died .gv-tomb { animation: gv-drop 0.6s cubic-bezier(.3,1.4,.5,1) both; }
.gv-seat.just-saved::before { content: ''; position: absolute; inset: 8% 18% 30%; z-index: 2; pointer-events: none; border-radius: 50% 50% 46% 46%; border: 4px solid #22c55e; background: rgba(34,197,94,0.18); animation: gv-shield 1.6s ease-out both; }
.gv-fx-reveal { animation: gv-flip 0.6s ease-out both; }
.gv-banner { position: fixed; left: 50%; top: 38%; z-index: 60; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; padding: 18px 34px; border-radius: 20px; background: rgba(30,27,75,0.92); color: #fff; font-size: 1.6rem; pointer-events: none; animation: gv-banner 2.2s ease both; }
.gv-banner-day { background: rgba(180,83,9,0.92); }
.gv-banner-vote { background: rgba(185,28,28,0.92); }
.gv-banner-over { background: rgba(21,128,61,0.92); }
.gv-banner-icon { width: 44px; height: 44px; border-radius: 50%; background: #fef3c7; }
.gv-banner-night .gv-banner-icon { box-shadow: inset -12px -6px 0 0 #fde68a; background: transparent; }
.gv-banner-day .gv-banner-icon { background: #facc15; box-shadow: 0 0 0 6px rgba(250,204,21,0.35); }
.gv-banner-vote .gv-banner-icon { border-radius: 6px; background: #fff; box-shadow: inset 0 -10px 0 #dc2626; }
@keyframes gv-pulse { 50% { box-shadow: 0 0 0 3px var(--fx), 0 0 0 14px transparent; } }
@keyframes gv-slash { from { transform: rotate(35deg) scaleY(0); } to { transform: rotate(35deg) scaleY(1); } }
@keyframes gv-raise { from { transform: translateY(18px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gv-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes gv-drop { from { transform: translate(-50%, -140%); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
@keyframes gv-shield { 0% { transform: scale(0.4); opacity: 0; } 30% { transform: scale(1.05); opacity: 1; } 100% { opacity: 0; } }
@keyframes gv-flip { from { transform: rotateY(90deg); } to { transform: none; } }
@keyframes gv-banner { 0% { opacity: 0; transform: translate(-50%, -40%) scale(0.85); } 15%, 75% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -60%); } }
@media (prefers-reduced-motion: reduce) {
  .gv-seat, .gv-seat::before, .gv-seat::after, .gv-sign, .gv-tomb, .gv-banner, .gv-fx-reveal { animation: none !important; }
}
/* Quiz Dash seen from behind the runner (owner 2026-10-06): the question bar over the road, a "slow" button */
.dash-stage { position: relative; }
.dash-qbar { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); width: min(96%, 720px); display: grid; gap: 6px; padding: 8px 10px; border-radius: var(--radius-m); background: rgba(255, 251, 235, 0.94); border: 1px solid #fcd34d; text-align: center; pointer-events: none; }
.dash-qbar[hidden] { display: none; }
.dash-q-text { font-size: clamp(0.95rem, 2.6vw, 1.25rem); }
.dash-q-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dash-q-opt { color: #fff; font-weight: 700; font-size: clamp(0.75rem, 2.2vw, 0.95rem); padding: 4px 6px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-q-opt.is-wrong { opacity: 0.35; text-decoration: line-through; }
.dash-q-tip { font-size: 0.75rem; color: #78350f; }
.dash-pad-tpp .dash-slow { font-size: 1rem; min-width: 96px; }
@media (max-width: 600px) { .dash-pad-tpp .dash-btn { min-width: 64px; min-height: 64px; font-size: 1.5rem; } .dash-pad-tpp .dash-slow { font-size: 0.85rem; min-width: 70px; } }
/* Mokiz Bubble Arena (owner 2026-10-06) */
.bb-page { max-width: 1100px; margin: 0 auto; }
.bb-game { display: grid; gap: 8px; justify-items: center; }
.bb-canvas { display: block; max-width: 100%; border-radius: var(--radius-m); border: 1px solid var(--border); touch-action: none; image-rendering: auto; }
.bb-hud { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; font-weight: 600; }
.bb-pad { width: 100%; max-width: 560px; display: flex; justify-content: space-between; align-items: center; gap: 12px; user-select: none; -webkit-user-select: none; }
.bb-dpad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); gap: 4px; }
.bb-dir { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-size: 1.4rem; touch-action: none; cursor: pointer; }
.bb-dir-up { grid-column: 2; grid-row: 1; } .bb-dir-left { grid-column: 1; grid-row: 2; } .bb-dir-down { grid-column: 2; grid-row: 3; } .bb-dir-right { grid-column: 3; grid-row: 2; }
.bb-dir:active, .bb-drop:active { transform: translateY(1px); background: var(--surface-2, #f1efe9); }
.bb-actions { display: flex; align-items: center; gap: 10px; }
.bb-drop { width: 92px; height: 92px; border-radius: 50%; border: 2px solid #3b82f6; background: #dbeafe; font-size: 2.4rem; touch-action: none; cursor: pointer; }
.bb-equips { display: grid; gap: 6px; }
.bb-equip { position: relative; min-width: 56px; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 1.3rem; cursor: pointer; touch-action: none; }
.bb-equip.is-gold { border-color: #f59e0b; background: #fffbeb; }
.bb-equip:disabled { opacity: 0.5; }
.bb-equip-n { position: absolute; right: 4px; bottom: 2px; font-size: 0.65rem; font-weight: 700; }
.bb-emotes { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.bb-emote { min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 1.2rem; cursor: pointer; }
@media (min-width: 900px) { .bb-pad { display: none; } } /* a PC plays with the keys */
@media (hover: none) and (min-width: 900px) { .bb-pad { display: flex; } } /* a big tablet still gets the pad */
.bb-party { flex-wrap: wrap; gap: 6px; align-items: center; }
.bb-code-in { width: 6em; min-height: 40px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; }
.bb-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.bb-shop-card { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.bb-shop-card.is-on { border-color: #22c55e; background: #f0fdf4; }
.bb-shop-icon { font-size: 1.6rem; }
.bb-shop-desc { margin: 0; font-size: 0.85rem; }
.bb-looks { flex-wrap: wrap; gap: 6px; }
.bb-look { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; cursor: pointer; }
.bb-look.is-on { border-color: #22c55e; }
.bb-swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.2); }
.bb-look-bubble-classic .bb-swatch { background: #93c5fd; } .bb-look-bubble-candy .bb-swatch { background: #f9a8d4; } .bb-look-bubble-star .bb-swatch { background: #fde68a; } .bb-look-bubble-moon .bb-swatch { background: #c4b5fd; }
.bb-look-wave-blue .bb-swatch { background: #38bdf8; } .bb-look-wave-pink .bb-swatch { background: #f472b6; } .bb-look-wave-mint .bb-swatch { background: #34d399; } .bb-look-wave-gold .bb-swatch { background: #fbbf24; }
.bb-missions, .bb-board { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.bb-missions li, .bb-board li { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.bb-monitor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: var(--space-3); align-items: start; }
@media (max-width: 900px) { .bb-monitor { grid-template-columns: 1fr; } }
.bb-dash-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.bb-dash-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
.bb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.bb-monitor { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.bb-monitor > .bb-game { width: 100%; }
.bb-dash-table td { white-space: nowrap; }
.bb-dash-table td:first-child { white-space: normal; }
.bb-game { width: 100%; }
/* Bubble Arena, owner 2026-10-07: full screen, the map popup, players online */
.bb-hudrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; width: 100%; }
.bb-fullbtn { min-height: 36px; }
.bb-game.bb-full { position: fixed; inset: 0; z-index: 70; background: #1f2937; padding: 8px 12px; overflow: auto; align-content: start; }
.bb-game.bb-full .bb-hud, .bb-game.bb-full .bb-fullbtn { color: #fff; }
.bb-game.bb-full .bb-canvas { border-color: transparent; }
.bbl-mappick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.bbl-mappick:hover { border-color: var(--c-orange); }
.bbl-mappick canvas, .bbl-mappick .bbl-chip-any { flex: none; border-radius: 10px; }
.bbl-mappick-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bbl-mapmodal { width: min(760px, 96vw); max-height: 92vh; overflow: auto; }
.modal-body .bbl-mapgrid { width: 100%; }
.bbl-mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.bbl-mapcard { display: grid; gap: 4px; justify-items: center; padding: 6px; min-height: 44px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.bbl-mapcard canvas { max-width: 100%; height: auto !important; border-radius: 8px; }
.bbl-mapcard .bbl-chip-any { font-size: 2.4rem; line-height: 72px; }
.bbl-mapcard.is-on { border-color: #22c55e; background: #f0fdf4; }
.bbl-online { display: inline-flex; align-items: center; gap: 6px; }
.bbl-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
/* Quiz Dash in Mokiz World (#/dash, owner 2026-10-06) */
.dw-head .dw-art, .dw-result .dw-art { width: min(220px, 60vw); margin: 0 auto; }
.dw-bar { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.dw-places { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; width: 100%; max-width: 560px; justify-self: center; }
.dw-place { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.dw-place.is-me { border-color: var(--c-orange); }
.dw-place .muted { margin-left: auto; }
.dw-rank { font-weight: 800; min-width: 2.2em; }
/* Quiz Dash in 3D (dash3d.js, owner 2026-10-06): the WebGL road under the 2D canvas (mirror, 3-2-1, flashes) */
.dash-stage .dash-gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; border-radius: var(--radius-m); }
.dash-stage.is-3d .dash-canvas { position: relative; z-index: 1; background: transparent; }
.dash-stage .dash-qbar { z-index: 2; }
.dash-view-btn { position: absolute; right: 8px; bottom: 8px; z-index: 3; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.7); background: rgba(15, 23, 42, 0.55); color: #fff; font-weight: 800; cursor: pointer; }
/* Bubble Arena, owner 2026-10-06: the equip bar on every screen (a PC hides the touch pad), drawn icons */
.bb-icon { display: inline-block; vertical-align: middle; }
.bb-stats { display: inline-flex; gap: 8px; align-items: center; }
.bb-stat { display: inline-flex; gap: 3px; align-items: center; }
.bb-equipbar { display: flex; gap: 10px; justify-content: center; }
.bb-equipbar .bb-equip { display: grid; place-items: center; min-width: 64px; min-height: 56px; padding: 4px 8px 12px; overflow: hidden; }
.bb-equipbar .bb-equip.is-cd::after { content: ''; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); border-radius: inherit; }
.bb-equip-key { position: absolute; left: 5px; top: 3px; font-size: 0.65rem; font-weight: 700; color: var(--muted, #6b7280); }
@media (hover: none) { .bb-equip-key { display: none; } }
.bb-drop .bb-icon { width: 46px; height: 46px; }
.bb-shop-icon { display: inline-flex; }
/* Kitchen Rush world board (owner 2026-10-07) */
.kr-board-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.kr-board-row { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.kr-board-row.is-top { border-color: #f59e0b; background: #fffbeb; }
.kr-board-rank { font-weight: 800; text-align: center; }
.kr-board-names { font-weight: 600; overflow-wrap: anywhere; }
.kr-board-score { font-weight: 800; white-space: nowrap; }
@media (max-width: 520px) { .kr-board-row { grid-template-columns: 2.2em minmax(0, 1fr) auto; } .kr-board-row .muted { display: none; } }
/* Mokiz World menu as game cards (owner 2026-10-07) */
.modal-card.world-menu-box { width: min(100%, 1040px); }
.wcard-section { display: grid; gap: 8px; margin-top: var(--space-2); width: 100%; align-self: stretch; justify-self: stretch; }
.wcard-head { margin: 4px 0 0; font-size: 1rem; }
.wcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.wcard { --wc: #f97316; --wc2: #fff7ed; position: relative; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; padding: 0; border: 3px solid var(--wc); border-radius: 18px; background: var(--wc2); color: var(--text); text-decoration: none; text-align: left; cursor: pointer; font: inherit; box-shadow: 0 6px 0 color-mix(in srgb, var(--wc) 70%, #000 30%), 0 10px 22px rgba(15, 23, 42, 0.12); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.wcard-art { aspect-ratio: 240 / 140; border-bottom: 3px solid var(--wc); background: #fff; overflow: hidden; }
.wcard-art .mode-svg { display: block; width: 100%; height: 100%; transition: transform 0.3s ease; }
.wcard-body { display: grid; gap: 2px; padding: 10px 12px 6px; }
.wcard-title { font-size: 1.08rem; font-weight: 800; line-height: 1.2; }
.wcard-desc { font-size: 0.85rem; color: var(--muted, #6b7280); line-height: 1.35; }
.wcard-tag { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--wc); color: #fff; font-size: 0.72rem; font-weight: 700; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.wcard-here { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 999px; background: #16a34a; color: #fff; font-size: 0.72rem; font-weight: 700; }
.wcard-cta { margin: 4px 10px 10px; padding: 8px 10px; border-radius: 12px; background: var(--wc); color: #fff; font-weight: 800; text-align: center; min-height: 40px; display: grid; place-items: center; }
.wcard::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: rgba(255, 255, 255, 0.35); transform: skewX(-20deg); opacity: 0; pointer-events: none; }
.wcard:hover:not(.is-soon), .wcard:focus-visible:not(.is-soon) { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 10px 0 color-mix(in srgb, var(--wc) 70%, #000 30%), 0 18px 30px rgba(15, 23, 42, 0.18); }
.wcard:hover:not(.is-soon) .wcard-art .mode-svg { transform: scale(1.06); }
.wcard:hover:not(.is-soon)::after { animation: wcard-shine 0.7s ease; }
@keyframes wcard-shine { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 0; } }
.wcard:active:not(.is-soon) { transform: translateY(2px); box-shadow: 0 3px 0 color-mix(in srgb, var(--wc) 70%, #000 30%); }
.wcard.is-here { outline: 3px solid #16a34a; outline-offset: 2px; }
.wcard.is-soon { cursor: default; filter: grayscale(0.85); opacity: 0.7; box-shadow: 0 4px 0 #9ca3af; }
.wcard-teal { --wc: #0d9488; --wc2: #f0fdfa; } .wcard-sky { --wc: #0284c7; --wc2: #f0f9ff; } .wcard-amber { --wc: #d97706; --wc2: #fffbeb; }
.wcard-orange { --wc: #ea580c; --wc2: #fff7ed; } .wcard-violet { --wc: #7c3aed; --wc2: #f5f3ff; } .wcard-night { --wc: #4338ca; --wc2: #eef2ff; } .wcard-gray { --wc: #9ca3af; --wc2: #f9fafb; }
@media (max-width: 520px) { .wcard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .wcard-desc { display: none; } .wcard-title { font-size: 0.95rem; } .wcard-tag { font-size: 0.65rem; } }
@media (prefers-reduced-motion: reduce) { .wcard, .wcard-art .mode-svg { transition: none; } .wcard:hover::after { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wcard { --wc2: #1f2937; } }
/* Bubble Arena inventory (owner 2026-10-07) */
.bb-inv-head { align-items: center; gap: 10px; flex-wrap: wrap; }
.bb-inv-worn { display: inline-flex; gap: 4px; }
.bb-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bb-slot { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 12px 8px 30px; border: 2px dashed var(--border); border-radius: var(--radius-m); background: var(--surface-2); }
.bb-slot.is-on { border-style: solid; border-color: var(--c-orange); background: var(--surface); }
.bb-slot.is-locked { opacity: 0.6; }
.bb-slot-n { position: absolute; left: 8px; top: 6px; font-weight: 800; font-size: 0.8rem; color: var(--muted, #6b7280); }
.bb-slot-text { display: grid; flex: 1; min-width: 0; }
.bb-have { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-have-item { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font: inherit; }
.bb-have-item:hover { border-color: var(--c-orange); }
.bb-have-put { font-weight: 700; color: var(--c-orange); font-size: 0.85rem; }
.bb-shop-body { border-top: 1px solid var(--border); padding-top: var(--space-2); }
@media (max-width: 520px) { .bb-slots { grid-template-columns: 1fr; } }
/* TIPs while waiting (core/client/tips.js, owner 2026-10-07) */
.tips-box { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 10px 14px; border: 1px solid #fcd34d; border-radius: var(--radius-m); background: #fffbeb; color: #78350f; text-align: left; }
.tips-label { font-weight: 800; white-space: nowrap; }
.tips-text { font-weight: 600; min-height: 1.4em; }
.tips-text.tips-in { animation: tips-fade 0.5s ease; }
.tips-dots { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: center; }
.tips-dots i { width: 6px; height: 6px; border-radius: 50%; background: #fde68a; }
.tips-dots i.is-on { background: #f59e0b; }
@keyframes tips-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tips-text.tips-in { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tips-box { background: #3a2f12; color: #fde68a; border-color: #92400e; } }
/* Bubble Arena game lobby (owner 2026-10-07: "a hi-end game lobby, full function") */
.bbl-wrap { display: grid; gap: 14px; padding: 16px; border-radius: 22px; background: #13294b; color: #f1f5f9; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25); }
.bbl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.bbl-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: 0.01em; color: #fff; }
.bbl-tagline { margin: 0; color: #bcd3f2; font-size: 0.92rem; }
.bbl-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .bbl-grid { grid-template-columns: minmax(0, 1fr); } }
.bbl-stage { position: relative; border-radius: 18px; overflow: hidden; border: 3px solid #3b82f6; background: #0b1b33; }
.bbl-scene { display: block; width: 100% !important; height: auto !important; }
.bbl-stage-tag { position: absolute; left: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(15, 23, 42, 0.75); color: #fff; font-weight: 700; font-size: 0.85rem; }
.bbl-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bbl-mode { --mc: #3b82f6; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 12px 8px; min-height: 44px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.15); background: #1c3a66; color: #fff; cursor: pointer; font: inherit; box-shadow: 0 4px 0 #0b1b33; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.bbl-mode-duo { --mc: #10b981; }
.bbl-mode-boss { --mc: #a855f7; }
.bbl-mode:hover:not(:disabled) { transform: translateY(-2px); }
.bbl-mode.is-on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 30%, #1c3a66); box-shadow: 0 4px 0 #0b1b33, 0 0 0 3px color-mix(in srgb, var(--mc) 45%, transparent), 0 0 22px color-mix(in srgb, var(--mc) 55%, transparent); }
.bbl-mode:disabled { opacity: 0.45; cursor: default; }
.bbl-mode-icon { font-size: 1.8rem; line-height: 1.1; }
.bbl-mode-hint { font-size: 0.75rem; color: #c7d7ee; line-height: 1.3; }
@media (max-width: 520px) { .bbl-mode-hint { display: none; } }
.bbl-label { font-size: 0.85rem; color: #bcd3f2; }
.bbl-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.bbl-chip { flex: none; display: grid; gap: 3px; justify-items: center; padding: 6px; min-width: 76px; border-radius: 12px; border: 2px solid transparent; background: #1c3a66; color: #fff; cursor: pointer; font: inherit; font-size: 0.75rem; font-weight: 700; }
.bbl-chip canvas { border-radius: 8px; display: block; }
.bbl-chip.is-on { border-color: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
.bbl-chip-any { display: grid; place-items: center; width: 66px; height: 42px; font-size: 1.5rem; border-radius: 8px; background: #2a4f86; }
.bbl-wrap .seg { background: #1c3a66; }
.bbl-wrap .seg-btn { color: #dbe7f8; }
.bbl-wrap .seg-btn[aria-pressed="true"] { background: #f97316; color: #fff; }
.bbl-wrap .bbl-card .seg { background: var(--surface-2); }
.bbl-wrap .bbl-card .seg-btn { color: var(--text); }
.bbl-wrap .bbl-card .seg-btn[aria-pressed="true"] { background: #13294b; color: #fff; }
.bbl-note { margin: 0; font-size: 0.8rem; color: #a9c1e3; }
.bbl-play { align-items: stretch; }
.bbl-play .bb-party { flex-wrap: wrap; gap: 8px; }
.bbl-play .btn-ghost, .bbl-queue .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.bbl-go { display: grid; justify-items: center; gap: 2px; width: 100%; min-height: 64px; padding: 10px 16px; border: 0; border-radius: 18px; background: #f97316; color: #fff; cursor: pointer; font: inherit; box-shadow: 0 6px 0 #c2410c, 0 10px 24px rgba(249, 115, 22, 0.45); animation: bbl-pulse 1.8s ease-in-out infinite; }
.bbl-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #c2410c; }
.bbl-go-big { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.04em; }
.bbl-go-small { font-size: 0.8rem; font-weight: 700; opacity: 0.9; }
@keyframes bbl-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.bbl-queue { padding: 14px; border-radius: 16px; background: #1c3a66; }
.bbl-card { padding: 14px; border-radius: 16px; background: var(--surface); color: var(--text); }
.bbl-profile { display: grid; gap: 10px; }
.bbl-lv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.bbl-lv-badge { grid-row: span 2; display: grid; place-items: center; min-width: 64px; height: 64px; border-radius: 50%; background: #f97316; color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15); }
.bbl-xp { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bbl-xp-fill { height: 100%; border-radius: 999px; background: #22c55e; }
.bbl-xp-text { font-size: 0.8rem; font-weight: 700; color: var(--muted, #6b7280); }
.bbl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bbl-stat { display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); font-size: 0.75rem; }
.bbl-stat strong { font-size: 1.25rem; font-weight: 800; }
.bbl-card .bbl-note { color: var(--muted, #6b7280); }
.bbl-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.bbl-tab { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 6px 2px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; font-size: 0.75rem; font-weight: 700; }
.bbl-tab span:first-child { font-size: 1.2rem; }
.bbl-tab.is-on { background: #13294b; color: #fff; border-color: #13294b; }
.bbl-ups { gap: 10px; }
.bbl-up { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.bbl-up.is-max { border-color: #22c55e; }
.bbl-up-text { display: grid; gap: 3px; }
.bbl-up-buy { display: grid; gap: 4px; }
.bbl-pips { display: flex; gap: 3px; }
.bbl-pips i { width: 14px; height: 7px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.bbl-pips i.is-on { background: #f97316; border-color: #f97316; }
@media (max-width: 520px) { .bbl-up { grid-template-columns: auto minmax(0, 1fr); } .bbl-up-buy { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; } }
.bbl-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.bbl-skin { display: grid; justify-items: center; gap: 4px; padding: 8px; border-radius: 12px; border: 1px solid var(--border); text-align: center; font-size: 0.8rem; }
.bbl-skin.is-on { border-color: #f97316; box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25); }
.bbl-skin .row { gap: 4px; justify-content: center; flex-wrap: wrap; }
.bbl-rank { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.bbl-rank li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.bbl-rank li.is-top-1 { background: #fef3c7; }
.bbl-rank li.is-top-2 { background: #f1f5f9; }
.bbl-rank li.is-top-3 { background: #ffedd5; }
.bbl-rank-n { font-weight: 800; text-align: center; }
.bbl-rank-st { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 520px) { .bbl-rank li { grid-template-columns: 2.2em minmax(0, 1fr) auto auto; } .bbl-rank li .muted { display: none; } }
.bbl-wrap details.bbl-card summary { cursor: pointer; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .bbl-go { animation: none; } .bbl-mode { transition: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bbl-rank li.is-top-1, :root:not([data-theme="light"]) .bbl-rank li.is-top-2, :root:not([data-theme="light"]) .bbl-rank li.is-top-3 { background: var(--surface-2); } }
.bbl-right .bb-slots { grid-template-columns: minmax(0, 1fr); }
/* Bubble Arena lobby (owner 2026-10-07): the map button sits on the dark lobby; 5 stats in one row */
.bbl .bbl-mappick { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); color: #ffffff; }
.bbl .bbl-mappick:hover { background: rgba(255,255,255,0.14); }
.bbl .bbl-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bbl-mapmodal .bbl-label { color: var(--text-muted); }
/* Bubble Arena look shop (owner 2026-10-07: a very big shop): category tabs, tier cards, hi-end tags */
.bbl-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.bbl-cat { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.bbl-cat.is-on { border-color: var(--c-orange); background: #fff7ed; color: #9a3412; }
.bbl-cat-n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-2, #f1efe9); font-size: 0.75rem; line-height: 20px; text-align: center; }
.bbl-skin { position: relative; }
.bbl-skin-pattern { background: #fdf4ff; }
.bbl-skin-picture { background: #f0f9ff; }
.bbl-skin-fx { background: #1e293b; border-color: #334155; color: #ffffff; }
.bbl-skin-fx .btn-ghost { color: #ffffff; border-color: rgba(255,255,255,0.35); }
.bbl-skin-hiend { background: #1e1b4b; border-color: #6d28d9; color: #ffffff; }
.bbl-skin-hiend .btn-ghost { color: #ffffff; border-color: rgba(255,255,255,0.35); }
.bbl-skin-legend { background: #2e1065; border-color: #f59e0b; color: #ffffff; }
.bbl-skin-legend .btn-ghost { color: #ffffff; border-color: rgba(255,255,255,0.35); }
.bbl-skin-tag-legend { background: #f59e0b; color: #ffffff; }
.bbl-skin-tag { position: absolute; top: 4px; left: 4px; padding: 0 6px; border-radius: 6px; background: #facc15; color: #422006; font-size: 0.65rem; font-weight: 800; line-height: 16px; }
/* ===== owner 2026-10-08: the Bubble Arena lobby in the home page's look (flat tiles, one flat orange button,
   soft tints instead of plain white or a dark panel); these rules come last so they win over the older lobby ones ===== */
.bbl-wrap { background: color-mix(in srgb, var(--c-blue) 7%, var(--surface)); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-1); border-radius: var(--radius-l, 18px); }
.bbl-title { color: var(--text); }
.bbl-tagline, .bbl-note, .bbl-label { color: var(--text-muted, #6b7280); }
.bbl-stage { border: 1px solid color-mix(in srgb, var(--c-blue) 30%, var(--border)); background: var(--surface); border-radius: var(--radius-m); }
.bbl-stage-tag { background: rgba(31, 36, 48, 0.72); }
.bbl-mode { --mc: var(--c-orange); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: none; padding: var(--space-2, 10px) 6px; transition: border-color 0.15s ease, transform 0.15s ease; }
.bbl-mode-duo { --mc: var(--c-teal); }
.bbl-mode-boss { --mc: #8b5cf6; }
.bbl-mode:hover:not(:disabled) { border-color: var(--mc); transform: translateY(-1px); }
.bbl-mode.is-on { border: 2px solid var(--mc); background: color-mix(in srgb, var(--mc) 10%, var(--surface)); box-shadow: none; }
.bbl-mode-hint { color: var(--text-muted, #6b7280); }
.bbl .bbl-mappick { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.bbl .bbl-mappick:hover { background: var(--surface); border-color: var(--c-orange); }
.bbl-chip-any { background: color-mix(in srgb, var(--c-blue) 12%, var(--surface)); }
.bbl-wrap .seg { background: var(--surface-2); }
.bbl-wrap .seg-btn { color: var(--text); }
.bbl-play .btn-ghost, .bbl-queue .btn-ghost { color: var(--text); border-color: var(--border); }
.bbl-go { background: var(--c-orange); border-radius: var(--radius-m); box-shadow: none; animation: none; min-height: 56px; }
.bbl-go:hover { background: var(--c-orange-700); }
.bbl-go:active { transform: translateY(1px); box-shadow: none; }
.bbl-go-big { font-size: 1.35rem; }
.bbl-queue { background: color-mix(in srgb, var(--c-orange) 8%, var(--surface)); border: 1px solid var(--border); color: var(--text); }
.bbl-card { border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.bbl-profile { background: color-mix(in srgb, #8b5cf6 7%, var(--surface)); }
.bbl-profile .bbl-stat { background: var(--surface); border: 1px solid var(--border); }
.bbl-lv-badge { box-shadow: none; }
.bb-shop.bbl-card { background: color-mix(in srgb, var(--c-teal) 6%, var(--surface)); }
.bbl-tab { background: var(--surface); }
.bbl-tab.is-on { background: color-mix(in srgb, var(--c-orange) 12%, var(--surface)); color: var(--c-orange-700); border: 2px solid var(--c-orange); }
.bbl-wrap .bbl-card .seg-btn[aria-pressed="true"] { background: var(--c-orange); color: #fff; }
details.bbl-card { background: color-mix(in srgb, var(--c-amber) 7%, var(--surface)); }

/* ===== owner 2026-10-08: the home page's Mokiz World card ===== */
.home-world { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3, 14px); width: 100%; padding: 10px 14px 10px 10px; border: 2px solid var(--c-teal); border-radius: var(--radius-l, 18px); background: color-mix(in srgb, var(--c-teal) 9%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.home-world:hover { transform: translateY(-2px); border-color: var(--c-teal-700); }
.home-world-art { border-radius: var(--radius-m); overflow: hidden; background: var(--surface); aspect-ratio: 240 / 140; }
.home-world-art svg, .home-world-art canvas { display: block; width: 100%; height: 100%; }
.home-world-text { display: grid; gap: 4px; min-width: 0; }
.home-world-title { font-size: 1.35rem; font-weight: 800; color: var(--c-teal-700); }
.home-world-desc { color: var(--text-muted, #6b7280); font-size: 0.92rem; line-height: 1.4; }
.home-world-go { pointer-events: none; white-space: nowrap; }
@media (max-width: 560px) { .home-world { grid-template-columns: 96px minmax(0, 1fr); } .home-world-go { grid-column: 1 / -1; justify-self: stretch; } }

/* ===== owner 2026-10-08: the plaza: the scam warning, the games as cards, every game's Top Ranking ===== */
.world-scam { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #f59e0b; border-left-width: 5px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--c-amber) 12%, var(--surface)); font-size: 0.88rem; line-height: 1.45; }
.world-scam strong { color: #b45309; }
.world-plaza-cards .wcard-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.world-ranks { margin-top: var(--space-2, 10px); }
.rank-boards { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-l, 18px); background: color-mix(in srgb, var(--c-amber) 6%, var(--surface)); }
.rank-boards-head h2 { margin: 0; font-size: 1.15rem; }
.rank-boards-head p { margin: 2px 0 0; font-size: 0.85rem; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rank-card { display: grid; gap: 8px; align-content: start; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.rank-card-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; }
.rank-art { border-radius: 8px; overflow: hidden; aspect-ratio: 240 / 140; background: var(--surface-2); }
.rank-art svg, .rank-art canvas { display: block; width: 100%; height: 100%; }
.rank-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.rank-row { display: grid; grid-template-columns: 1.8em minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); font-size: 0.85rem; }
.rank-n { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--border); font-weight: 800; font-size: 0.8rem; }
.rank-row-1 { background: color-mix(in srgb, #facc15 22%, var(--surface)); } .rank-row-1 .rank-n { background: #facc15; color: #422006; }
.rank-row-2 .rank-n { background: #cbd5e1; color: #1e293b; }
.rank-row-3 .rank-n { background: #f4a460; color: #431407; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-val { font-size: 0.78rem; color: var(--text-muted, #6b7280); white-space: nowrap; }
.rank-empty { margin: 0; font-size: 0.85rem; }
.world-rank-box { width: min(920px, 96vw); }
.modal-body .rank-boards { width: 100%; text-align: left; }
.home-world-box .wcard-section, .world-menu-box .wcard-section { text-align: left; }
/* ===== owner 2026-10-08 (2): home: "I have a PIN" and Mokiz World as two cards (side by side on a PC, a switch on a phone) ===== */
.home-chooser { display: flex; width: 100%; }
.home-chooser .seg-btn { flex: 1; min-height: 48px; font-size: 1rem; font-weight: 700; }
.home-duo { display: grid; gap: var(--space-3); width: 100%; }
.home-duo[data-show="pin"] .home-world-big { display: none; }
.home-duo[data-show="world"] .hero-join { display: none; }
.home-world-big { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 2px solid var(--c-teal); border-radius: var(--radius-l); background: color-mix(in srgb, var(--c-teal) 8%, var(--surface)); box-shadow: var(--shadow-2); }
.home-world-big-art { aspect-ratio: 240 / 130; background: var(--surface); border-bottom: 2px solid var(--c-teal); overflow: hidden; }
.home-world-big-art svg, .home-world-big-art canvas { display: block; width: 100%; height: 100%; }
.home-world-big-body { display: grid; gap: 10px; align-content: start; padding: var(--space-4, 16px); }
.home-world-big .home-world-title { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--c-teal-700); }
.home-world-big .home-world-desc { margin: 0; color: var(--text-muted); line-height: 1.45; }
.home-world-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-weight: 600; font-size: 0.92rem; }
.home-world-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--c-teal); vertical-align: middle; }
.home-world-enter { min-height: 52px; font-size: 1.1rem; }
@media (min-width: 900px) {
  .home-solo.home-wide { width: min(100%, 1060px); }
  .home-chooser { display: none; }
  .home-duo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
  .home-duo[data-show] .hero-join { display: block; }
  .home-duo[data-show] .home-world-big { display: grid; }
}
/* ===== owner 2026-10-08 (2): the detailed game guide, and the register page's role cards ===== */
.guide-page { max-width: 880px; margin: 0 auto; width: 100%; }
.guide-h2 { margin: var(--space-3) 0 0; }
.guide-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-3); }
.guide-start-card { display: grid; gap: 8px; align-content: start; }
.guide-start-card h2 { margin: 0; font-size: 1.1rem; }
.guide-start-student { background: color-mix(in srgb, var(--c-orange) 7%, var(--surface)); }
.guide-start-teacher { background: color-mix(in srgb, var(--c-purple) 7%, var(--surface)); }
.guide-start-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; line-height: 1.45; }
.guide-start-card .btn { justify-self: start; }
.guide-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.guide-chip.is-on { border-color: var(--c-orange); background: var(--c-orange-100); color: var(--c-orange-700); }
.guide-card summary { display: flex; align-items: center; gap: 10px; }
.guide-name { display: grid; flex: 1; min-width: 0; }
.guide-sub { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; }
.guide-tier { flex: none; font-size: 0.75rem; }
.guide-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.guide-fact { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.82rem; font-weight: 600; }
.guide-more { display: grid; gap: 4px; margin: 8px 0; padding: 10px 12px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--c-blue) 6%, var(--surface)); }
.guide-more ul { margin: 0; padding-left: 1.2em; display: grid; gap: 3px; line-height: 1.45; }
.guide-teacher { margin-top: 8px; padding: 10px 12px; border-left: 4px solid var(--c-purple); border-radius: var(--radius-m); background: color-mix(in srgb, var(--c-purple) 7%, var(--surface)); }
.guide-teacher p { margin: 4px 0 0; line-height: 1.5; }
.guide-world { background: color-mix(in srgb, var(--c-teal) 6%, var(--surface)); }
.guide-world h2, .guide-roles h2 { margin: 0; }
.guide-world-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; line-height: 1.45; }
.role-card-desc { font-size: 0.8rem; color: var(--text-muted); text-align: center; line-height: 1.35; }
.role-diff { margin-top: var(--space-2); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-2); }
.role-diff summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.role-diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); margin-top: 8px; }
.role-diff-col { padding: 10px 12px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--border); }
.role-diff-col ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 3px; font-size: 0.88rem; line-height: 1.45; }
.role-diff-student { border-top: 3px solid var(--c-orange); }
.role-diff-teacher { border-top: 3px solid var(--c-purple); }
.role-diff-note { margin: 8px 0 0; font-size: 0.85rem; }
/* ===== owner 2026-10-08 (3): the home page is ONE card with two tabs (Mokiz World first, "I have a PIN") ===== */
.home-tabcard { display: grid; width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-2); }
.home-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.home-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--text-muted); font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.home-tab:hover { color: var(--text); }
.home-tab[aria-selected="true"] { background: var(--surface); color: var(--c-orange-700); border-bottom-color: var(--c-orange); }
#home-show-world[aria-selected="true"] { color: var(--c-teal-700); border-bottom-color: var(--c-teal); }
.home-tab-icon { font-size: 1.3rem; line-height: 1; }
.home-tabcard .home-duo { display: block; }
.home-tabcard .hero-join, .home-tabcard .home-world-big { border: 0; border-radius: 0; box-shadow: none; margin: 0; max-width: none; width: 100%; }
.home-tabcard .home-duo[data-show="pin"] .home-world-big, .home-tabcard .home-duo[data-show="world"] .hero-join { display: none; }
@media (min-width: 720px) {
  .home-tabcard .home-world-big { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .home-tabcard .home-world-big-art { border-bottom: 0; border-right: 2px solid var(--c-teal); aspect-ratio: auto; min-height: 100%; }
  .home-tabcard .home-world-big-body { align-content: center; }
}
@media (min-width: 900px) {
  .home-solo.home-wide { width: min(100%, 860px); }
  .home-tabcard .home-duo { display: block; }
  .home-tabcard .home-duo[data-show="world"] .home-world-big { display: grid; }
  .home-tabcard .home-duo[data-show="pin"] .hero-join { display: block; }
  .home-tabcard .home-duo[data-show="pin"] .home-world-big, .home-tabcard .home-duo[data-show="world"] .hero-join { display: none; }
}
/* owner 2026-10-08: Bubble Arena bot level picker */
.bbl-bots { gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.bbl-bot-seg { display: flex; width: 100%; }
.bbl-bot-seg .seg-btn { flex: 1; min-height: 44px; font-weight: 700; }
.bbl-bot-seg .bbl-bot-easy[aria-pressed="true"] { background: var(--c-teal); color: #fff; }
.bbl-bot-seg .bbl-bot-medium[aria-pressed="true"] { background: var(--c-amber); color: #422006; }
.bbl-bot-seg .bbl-bot-hard[aria-pressed="true"] { background: var(--c-coral); color: #fff; }
/* ===== owner 2026-10-08 (4): home = the Mokiz World card (the owner's key art on top), then a separate PIN card ===== */
.home-solo.home-wide { width: min(100%, 760px); }
.home-world-big { grid-template-rows: auto auto; grid-template-columns: none; }
.home-world-big-art { display: block; aspect-ratio: 1672 / 941; background: #dbeafe; border-bottom: 2px solid var(--c-teal); overflow: hidden; }
.home-world-big-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-world-big-body { padding: var(--space-3) var(--space-4) var(--space-4); }
.home-world-big .home-world-desc { font-size: 0.98rem; }
.home-pin-card { text-align: center; padding-top: var(--space-4); }
.home-pin-card .home-pin-title { margin: 0 0 4px; font-size: 1.3rem; font-weight: 800; }
@media (min-width: 640px) {
  .home-world-big-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-4); align-items: start; }
  .home-world-big-body .home-world-desc, .home-world-big-body .home-world-list { grid-column: 1 / -1; }
}
@media (min-width: 900px) { .home-solo.home-wide { width: min(100%, 760px); } }
/* owner 2026-10-08 (5): the home key art is square (assets/characters/Mokiz.png): full width on a phone, beside the
   text on a wider screen */
.home-world-big-art { aspect-ratio: 1 / 1; }
@media (min-width: 640px) {
  .home-world-big { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .home-world-big-art { border-bottom: 0; border-right: 2px solid var(--c-teal); }
  .home-world-big-body { grid-template-columns: none; align-content: center; padding: var(--space-4); }
  .home-world-big-body .home-world-list { grid-template-columns: 1fr; }
}
/* owner 2026-10-13: the World's game menu button, bigger and easy to find */
#world-menu { min-height: 48px; padding: 0 22px; font-size: 1.1rem; font-weight: 800; border-radius: 999px; }
.world-focus .world-menu-float { min-height: 48px; padding: 0 20px; font-size: 1.05rem; font-weight: 800; }
.world-hint .btn { min-height: 44px; padding: 0 18px; font-size: 1rem; font-weight: 700; }

/* owner 2026-10-13: Bubble Arena's lobby as a game client (deep indigo frame, bright flat buttons, room cards, the
   waiting room's four places, chat + who is online). Flat colours only (no gradients); 44 px touch targets. */
.bbx { --bx-bg: #1e1b4b; --bx-bar: #312e81; --bx-panel: #eef2ff; --bx-ink: #1e1b4b; --bx-line: #4338ca;
  display: grid; gap: 12px; padding: 12px; border-radius: 20px; background: var(--bx-bg); color: #e0e7ff; }
.bbx-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--bx-bar); }
.bbx-title { display: flex; align-items: center; gap: 10px; margin: 0 auto 0 0; color: #fff; font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 800; }
.bbx-logo { width: 34px; height: 34px; border-radius: 50%; background: #38bdf8; box-shadow: inset -6px -6px 0 #0284c7, inset 5px 5px 0 #bae6fd; }
.bbx-online-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #065f46; color: #d1fae5; font-weight: 600; }
.bbx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px;
  background: #4338ca; color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.bbx-btn:hover:not(:disabled) { filter: brightness(1.1); }
.bbx-btn:disabled { opacity: 0.45; cursor: default; }
.bbx-btn-sm { min-height: 40px; padding: 0 12px; font-size: 0.92rem; }
.bbx-btn-yellow { background: #facc15; color: #422006; }
.bbx-btn-cyan { background: #06b6d4; color: #082f49; }
.bbx-btn-green { background: #22c55e; color: #052e16; }
.bbx-btn-red { background: #e11d48; }
.bbx-btn-start { min-height: 64px; padding: 0 34px; font-size: 1.35rem; background: #f97316; color: #fff; border-radius: 16px; }
.bbx-btn-start.is-off { background: #64748b; }
.bbx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 480px); gap: 12px; align-items: start; }
@media (min-width: 961px) { .bbx-side { max-height: min(82vh, 900px); overflow-y: auto; padding-right: 4px; scrollbar-color: #4338ca transparent; } }
@media (max-width: 960px) { .bbx-grid { grid-template-columns: 1fr; } }
.bbx-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bbx-navbtn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; min-height: 64px; padding: 8px 14px;
  border: 2px solid var(--bx-line); border-radius: 14px; background: var(--bx-bar); color: #e0e7ff; font: inherit; cursor: pointer; }
.bbx-navbtn span { grid-row: span 2; font-size: 1.7rem; }
.bbx-navbtn strong { font-size: 1.1rem; color: #fff; }
.bbx-navbtn small { color: #c7d2fe; }
.bbx-navbtn.is-on { background: #facc15; border-color: #facc15; color: #422006; }
.bbx-navbtn.is-on strong, .bbx-navbtn.is-on small { color: #422006; }
.bbx-panel { padding: 14px; border-radius: 16px; background: var(--bx-panel); color: var(--bx-ink); }
.bbx-side .bbl-card { background: #f5f3ff; border-color: #c7d2fe; color: var(--bx-ink); }
.bbx-toolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
.bbx-count { margin-left: auto; font-weight: 600; color: #4338ca; }
.bbx-roomgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bbx-room { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #fff; border: 2px solid #c7d2fe; }
.bbx-room.is-playing { background: #fff7ed; border-color: #fdba74; }
.bbx-room.is-full { background: #f1f5f9; border-color: #cbd5e1; }
.bbx-room-n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #312e81; color: #fde68a; font-weight: 800; font-size: 1.2rem; }
.bbx-room-n.big { width: 60px; height: 60px; font-size: 1.6rem; }
.bbx-room-body { gap: 2px; min-width: 0; }
.bbx-room-title { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-room-meta { font-size: 0.8rem; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-room-side { gap: 4px; justify-items: end; }
.bbx-state { padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.bbx-state-waiting { background: #dcfce7; color: #166534; }
.bbx-state-playing { background: #ffedd5; color: #9a3412; }
.bbx-state-full { background: #e2e8f0; color: #334155; }
.bbx-dots { display: inline-flex; gap: 3px; }
.bbx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.bbx-dots i.on { background: #6366f1; }
.bbx-empty { display: grid; justify-items: center; gap: 6px; padding: 30px 10px; color: #475569; text-align: center; }
.bbx-empty span { font-size: 2.6rem; }
.bbx-roomview { gap: 12px; }
.bbx-roomhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bbx-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; font-weight: 800; }
.bbx-teams .team-a { color: #dc2626; } .bbx-teams .team-b { color: #2563eb; }
.bbx-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .bbx-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bbx-slot { position: relative; display: grid; justify-items: center; gap: 4px; min-height: 190px; padding: 26px 6px 10px; border-radius: 16px; background: #fff; border: 3px solid #c7d2fe; color: var(--bx-ink); font: inherit; }
.bbx-slot.team-a { border-color: #fca5a5; } .bbx-slot.team-b { border-color: #93c5fd; }
.bbx-slot.is-ready { background: #f0fdf4; }
.bbx-slot.is-me { box-shadow: 0 0 0 3px #f97316; }
.bbx-slot.is-empty { align-content: center; background: #e0e7ff; border-style: dashed; cursor: pointer; color: #4338ca; }
.bbx-slot.is-empty:disabled { cursor: default; opacity: 0.7; }
.bbx-slot-empty { font-size: 2rem; font-weight: 800; }
.bbx-slot-n { position: absolute; top: 6px; left: 8px; font-weight: 800; color: #6366f1; }
.bbx-slot-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-crown { position: absolute; top: 8px; right: 10px; width: 24px; height: 14px; background: #f59e0b; clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); }
.bbx-ready { padding: 2px 12px; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: 0.8rem; font-weight: 700; }
.bbx-ready.on { background: #22c55e; color: #fff; }
.bbx-kick { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fee2e2; color: #b91c1c; font-weight: 800; cursor: pointer; }
.bbx-slot .bbx-crown + .avatar, .bbx-slot .bbx-kick ~ .avatar { margin-top: 2px; }
.bbx-roomact { display: grid; justify-items: center; gap: 8px; }
.bbx-roombtns { flex-wrap: wrap; justify-content: center; gap: 8px; }
.bbx-why, .bbx-wait { margin: 0; color: #9a3412; font-weight: 600; }
.bbx-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 12px; }
@media (max-width: 760px) { .bbx-bottom { grid-template-columns: 1fr; } }
.bbx-chat, .bbx-onlinebox { display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 14px; background: #0f172a; }
.bbx-chattabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bbx-chattabs button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: #1e293b; color: #c7d2fe; font: inherit; font-weight: 700; cursor: pointer; }
.bbx-chattabs button.is-on { background: #facc15; color: #422006; }
.bbx-chatlist { list-style: none; margin: 0; padding: 0; height: 170px; overflow-y: auto; display: grid; align-content: start; gap: 3px; font-size: 0.92rem; }
.bbx-chatlist li { color: #e2e8f0; overflow-wrap: anywhere; }
.bbx-chatlist li strong { color: #7dd3fc; }
.bbx-chatlist li.is-me strong { color: #fde047; }
.bbx-sys { color: #fca5a5 !important; font-style: italic; }
.bbx-chatform input { flex: 1; min-width: 0; min-height: 42px; padding: 0 10px; border: 1px solid #334155; border-radius: 10px; background: #1e293b; color: #fff; }
.bbx-phrases { display: flex; flex-wrap: wrap; gap: 6px; }
.bbx-phrase { min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: #1e293b; color: #e0e7ff; font: inherit; cursor: pointer; }
.bbx-onlinebox > strong { color: #bbf7d0; }
.bbx-online { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 210px; overflow-y: auto; }
.bbx-online li { display: flex; align-items: center; gap: 6px; min-height: 32px; color: #e2e8f0; }
.bbx-online li.is-me { color: #fde047; }
.bbx-online small { color: #94a3b8; }
.bbx-online-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.bbx-mini { margin-left: auto; min-width: 36px; min-height: 32px; border: 0; border-radius: 8px; background: #334155; color: #fff; cursor: pointer; }
.bbx-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #facc15; color: #422006; font-weight: 700; animation: bbx-pop 0.4s ease-out both; }
.bbx-invite > span { margin-right: auto; }
.bbx-modal .bbx-online li { color: inherit; }
.bbx-form { gap: 8px; }
.bbx-form input:not([type]) { min-height: 44px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; }
.bbx-pick3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bbx-pick { display: grid; justify-items: center; gap: 2px; min-height: 84px; padding: 8px 4px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; text-align: center; }
.bbx-pick span { font-size: 1.5rem; }
.bbx-pick small { font-size: 0.72rem; color: var(--text-muted); }
.bbx-pick.is-on { border-color: #f97316; background: #fff7ed; }
.bbx-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.bbx-check { gap: 8px; min-height: 44px; }
@keyframes bbx-pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bbx-invite { animation: none; } }

/* owner 2026-10-13: Bubble Arena's end podium (dark stage, spotlights, the steps rise; winners crowned, losers grey) */
.bbr-wrap { background: #1e1b4b; border-color: #312e81; color: #e0e7ff; overflow: hidden; }
.bbr-wrap .muted, .bbr-wrap p { color: #c7d2fe; }
.bbr-title { margin: 0; font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: 0.02em; color: #fde047; }
.bbr-wrap.is-lose .bbr-title { color: #fda4af; }
.bbr { display: grid; gap: 14px; width: 100%; }
.bbr-stage { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; max-width: 620px; width: 100%; margin: 0 auto; padding-top: 30px; }
.bbr-stage::before { content: ''; position: absolute; left: 50%; top: -40px; width: 70%; height: 120%; transform: translateX(-50%); background: rgba(253,224,71,0.12); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); pointer-events: none; }
.bbr-step { position: relative; display: grid; justify-items: center; align-content: end; gap: 6px; }
.bbr-who { position: relative; display: grid; justify-items: center; gap: 4px; animation: bbr-pop 0.6s cubic-bezier(.2,1.5,.4,1) both; }
.bbr-step-1 .bbr-who { animation-delay: 0.9s; } .bbr-step-2 .bbr-who { animation-delay: 0.6s; } .bbr-step-3 .bbr-who { animation-delay: 0.3s; }
.bbr-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.bbr-crown { position: absolute; top: -20px; left: 50%; width: 34px; height: 20px; transform: translateX(-50%); background: #facc15; clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); z-index: 2; }
.bbr-tag { padding: 2px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; }
.bbr-tag.win { background: #facc15; color: #422006; }
.bbr-tag.lose { background: #475569; color: #e2e8f0; }
.bbr-block { display: grid; justify-items: center; align-content: start; gap: 2px; width: 100%; padding-top: 10px; border-radius: 12px 12px 0 0; color: #fff; transform-origin: bottom; animation: bbr-rise 0.7s ease-out both; }
.bbr-step-1 .bbr-block { height: 130px; background: #eab308; } .bbr-step-2 .bbr-block { height: 96px; background: #94a3b8; } .bbr-step-3 .bbr-block { height: 70px; background: #c2410c; }
.bbr-step-1 .bbr-block { animation-delay: 0.6s; } .bbr-step-2 .bbr-block { animation-delay: 0.3s; }
.bbr-place { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.bbr-kills { font-size: 0.8rem; font-weight: 700; }
.bbr-step.is-lost .bbr-who .avatar { filter: grayscale(0.8); opacity: 0.8; }
.bbr-step.is-me .bbr-name { color: #fde047; }
.bbr-step.is-empty { visibility: hidden; }
.bbr-rest { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 6px; width: 100%; max-width: 520px; counter-reset: bbr 3; }
.bbr-rest li { counter-increment: bbr; display: grid; grid-template-columns: 28px auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; background: #312e81; }
.bbr-rest li::before { content: counter(bbr); font-weight: 800; color: #a5b4fc; }
.bbr-rest li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; text-align: left; }
.bbr-rest li.is-me { box-shadow: 0 0 0 2px #fde047; }
.bbr-wrap .bbl-go { margin-top: 6px; }
@keyframes bbr-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes bbr-pop { from { transform: translateY(24px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bbr-who, .bbr-block { animation: none; } }

/* owner 2026-10-13: หมู่บ้านผีดุ - the vote sign held up in the middle of the character (bigger), what someone says over
   their head, drawn role badges, the guide */
.gv-grid .gv-sign { left: 50%; top: 46%; right: auto; bottom: auto; transform: translate(-50%, -50%); z-index: 4; }
.gv-grid .gv-sign-board { min-width: 52px; height: 44px; padding: 0 8px; border-width: 3px; border-radius: 8px; font-size: 1.7rem; box-shadow: var(--shadow-2); }
.gv-grid .gv-sign-stick { width: 6px; height: 22px; }
.gv-grid .gv-sign.is-new { animation: gv-raise-mid 0.5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes gv-raise-mid { from { transform: translate(-50%, -10%) scale(0.5); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.gv-say { position: absolute; top: 30px; left: 50%; z-index: 5; transform: translateX(-50%); max-width: 92%; padding: 4px 8px; border-radius: 10px; background: #fff; color: #1f2937;
  border: 1px solid #c7d2fe; box-shadow: var(--shadow-1); font-size: 0.74rem; font-weight: 600; line-height: 1.25; text-align: center;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; animation: gv-say 0.3s ease-out both; }
.gv-say::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg); background: #fff; border-right: 1px solid #c7d2fe; border-bottom: 1px solid #c7d2fe; }
@keyframes gv-say { from { transform: translate(-50%, 6px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.gv-badge { flex: none; display: inline-block; vertical-align: middle; }
.gv-role-mini { background: transparent; border: 0; width: auto; height: auto; }
.gv-rcard-icon { line-height: 0; }
.gv-check .gv-badge { margin-right: 2px; }
.gv-guide-btn { justify-self: start; margin-top: 6px; }
.gv-hero .gv-guide-btn { background: #facc15; color: #422006; border-color: #facc15; }
.gv-guide-mini { min-width: 44px; padding: 0; font-weight: 800; font-size: 1.1rem; }
.gv-phase { flex-wrap: wrap; }
.gv-phase > strong { margin-right: auto; }
.gv-guide { gap: 14px; }
.gv-guide-part h3 { margin: 0; font-size: 1.1rem; }
.gv-guide-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.gv-guide-group { border: 1px solid var(--border); border-radius: var(--radius-m); padding: 6px 10px; }
.gv-guide-group summary { font-weight: 700; cursor: pointer; min-height: 36px; display: flex; align-items: center; }
.gv-guide-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; padding: 6px 0; }
.gv-guide-role { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; border-radius: var(--radius-m); background: var(--surface-2); }
.gv-guide-role p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.gv-guide-team { font-size: 0.75rem; color: var(--text-muted); }
.wcard-guides { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* owner 2026-10-13: Quiz Dash's power row: dash (energy bar), the item held, the power burst (anger bar) */
.dash-powers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; user-select: none; -webkit-user-select: none; }
.dash-power { position: relative; display: grid; align-content: center; justify-items: center; gap: 4px; min-height: 60px; min-width: 0; padding: 6px 8px 14px; font-size: 0.95rem; overflow: hidden; }
.dash-power-label { font-size: 0.9rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dash-meter { position: absolute; left: 8px; right: 8px; bottom: 6px; height: 7px; border-radius: 999px; background: rgba(15,23,42,0.15); overflow: hidden; }
.dash-meter i { display: block; height: 100%; width: var(--v, 0%); border-radius: 999px; background: #38bdf8; transition: width 0.15s linear; }
.dash-boost { background: #e0f2fe; border-color: #7dd3fc; color: #075985; }
.dash-boost:disabled { opacity: 0.6; }
.dash-rage { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.dash-rage .dash-meter i { background: #f97316; }
.dash-rage.is-full { background: #f97316; color: #fff; border-color: #ea580c; animation: dash-ready 0.9s ease-in-out infinite; }
.dash-rage.is-full .dash-meter i { background: #fde047; }
.dash-rage.is-on { background: #ea580c; color: #fff; }
.dash-item { background: #f5f3ff; border-color: #c4b5fd; color: #5b21b6; }
.dash-item.has-item { background: #7c3aed; color: #fff; border-color: #6d28d9; }
.dash-item-icon { font-size: 1.5rem; line-height: 1; min-height: 1.5rem; }
@keyframes dash-ready { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .dash-rage.is-full { animation: none; } }
.dash-power-help { margin: 0; font-size: 0.78rem; color: var(--text-muted); text-align: center; }
/* owner 2026-10-14: every game in sideways rails (scroll / swipe), each with its plan: free / Plus / Premium / World */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: thin; }
/* a rail must never widen its page (a grid item grows to its content without min-width: 0) */
.rail { width: 100%; max-width: 100%; min-width: 0; }
.seo-games, .legal > section, .legal main { min-width: 0; }
.rail-card { position: relative; display: grid; grid-template-rows: 150px auto auto; gap: 4px; scroll-snap-align: start; padding: 8px; border: 1px solid var(--line, var(--border)); border-radius: 14px; background: var(--card, var(--surface)); }
.rail-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; border: 0; }
.rail-card img.tall { object-position: center 35%; }
.rail-card h4 { margin: 4px 0 0; font-size: 1rem; }
.rail-card p { margin: 0; font-size: 0.85rem; line-height: 1.5; }
.rail-card .tier { position: absolute; top: 14px; right: 14px; }
.tier { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; line-height: 1.6; }
.tier-free { background: #dcfce7; color: #166534; }
.tier-plus { background: #e0e7ff; color: #3730a3; }
.tier-premium { background: #fef3c7; color: #92400e; }
.tier-world { background: #312e81; color: #fde68a; }
.rail-title { margin: 18px 0 2px; font-size: 1.1rem; }
.rail-note { margin: 0 0 6px; font-size: 0.85rem; }
/* owner 2026-10-14: the home slider (the Mokiz World card, then the PR pictures) */
.home-slider { position: relative; }
.home-slider-track { display: grid; }
.home-slider-track > * { grid-area: 1 / 1; transition: opacity 0.5s ease; }
.home-slider-track > .is-off { opacity: 0; visibility: hidden; pointer-events: none; }
.home-slide-pr { position: relative; overflow: hidden; min-height: 320px; border-radius: var(--radius-l); border: 2px solid var(--c-orange, #f97316); background: #1e1b4b; box-shadow: var(--shadow-2); }
.home-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.home-slide-text { position: absolute; left: 14px; right: 14px; bottom: 34px; display: grid; gap: 6px; justify-items: start; max-width: 520px; padding: 14px 16px; border-radius: var(--radius-l); background: rgba(15,23,42,0.72); color: #fff; }
.home-slide-title { font-size: clamp(1.2rem, 3vw, 1.7rem); font-weight: 800; line-height: 1.3; }
.home-slide-sub { font-size: 0.95rem; color: #e0e7ff; }
.home-slider-arrow { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; transform: translateY(-50%); border: 0; border-radius: 50%; background: rgba(15,23,42,0.55); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.home-slider-arrow.prev { left: 8px; } .home-slider-arrow.next { right: 8px; }
.home-slider-dots { position: static; margin-top: 6px; display: flex; justify-content: center; gap: 4px; }
.home-slider-dot { width: 24px; height: 24px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.home-slider-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: rgba(100,116,139,0.45); }
.home-slider-dot[aria-selected="true"]::before { width: 22px; border-radius: 6px; background: var(--c-orange, #f97316); }
@media (prefers-reduced-motion: reduce) { .home-slider-track > * { transition: none; } }
.bbr-body { display: block; line-height: 0; }
.bbr-body svg { width: 100%; height: auto; }
/* owner 2026-10-14: Quiz Dash keys on every button; the dash lights while held */
.dash-kbd { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid currentColor; border-radius: 5px; font: 700 0.62rem/1.4 ui-monospace, monospace; opacity: 0.7; vertical-align: middle; }
.dash-power .dash-kbd { position: absolute; top: 4px; right: 6px; margin: 0; }
@media (hover: none) { .dash-kbd { display: none; } }
.dash-boost.is-on { background: #0ea5e9; color: #fff; border-color: #0284c7; }
.dash-boost.is-low { opacity: 0.6; }
/* owner 2026-10-14: topping up gems stands out in the wardrobe; the gem page's plan-with-gems row and help line */
.wardrobe-topup { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-m); background: #7c3aed; color: #fff !important; font-weight: 800; text-decoration: none; }
.wardrobe-topup:hover { filter: brightness(1.08); }
.wardrobe-topup-go { font-size: 1.4rem; line-height: 1; }
.gem-plans h2 { margin: 0; font-size: 1.1rem; }
.gem-plan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gem-plan { display: grid; gap: 2px; justify-items: center; min-height: 80px; padding: 10px; border: 2px solid var(--border); border-radius: var(--radius-l); background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.gem-plan-plus { border-color: #a5b4fc; } .gem-plan-premium { border-color: #fcd34d; }
.gem-plan-price { font-weight: 800; font-size: 1.15rem; }
.gem-help { margin: 0; text-align: center; font-size: 0.9rem; }
.gem-auto-cancel { margin: 0; font-size: 0.85rem; }
/* owner 2026-10-14: Bubble Arena level frames (bbLevel.js), my character card, room cards, the team podium */
.bb-lvf { display: inline-flex; align-items: baseline; gap: 1px; margin-right: 5px; padding: 0 6px; border: 2px solid; border-radius: 7px; font-size: 0.78em; font-weight: 800; line-height: 1.45; color: #fff; vertical-align: 0.08em; white-space: nowrap; }
.bb-lvf small { font-size: 0.72em; font-weight: 700; opacity: 0.85; }
.bb-lvf-bronze { background: #9a3412; border-color: #fdba74; }
.bb-lvf-silver { background: #475569; border-color: #e2e8f0; }
.bb-lvf-gold { background: #a16207; border-color: #fde047; }
.bb-lvf-diamond { background: #0e7490; border-color: #a5f3fc; }
.bb-lvf-legend { background: #7c3aed; border-color: #f0abfc; }
.bbl-me-card { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: #1e1b4b; color: #fff; }
.bbl-me-stage { position: relative; display: grid; place-items: end center; width: 100%; min-height: 150px; }
.bbl-me-bubble { position: absolute; display: block; line-height: 0; }
.bbl-me-bubble.b1 { left: calc(50% - 120px); bottom: 18px; }
.bbl-me-bubble.b2 { right: calc(50% - 112px); bottom: 64px; }
.bbl-me-bubble.b3 { right: calc(50% - 100px); bottom: 8px; }
.bbl-me-name { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.bbl-me-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-slot-stage { position: relative; display: grid; place-items: end center; min-height: 104px; }
.bbx-slot-bubble { position: absolute; right: -8px; bottom: 4px; line-height: 0; }
.bbx-slot-name { display: flex; align-items: center; justify-content: center; min-width: 0; }
.bbx-online-name .bb-lvf { font-size: 0.7em; }
.bbr-name { display: inline-flex; align-items: center; justify-content: center; }
.bbr-team { display: grid; gap: 16px; width: 100%; }
.bbr-tstage { display: grid; justify-items: center; gap: 0; padding-top: 30px; }
.bbr-tstep { position: relative; display: grid; justify-items: center; width: min(100%, 560px); }
.bbr-tstep .bbr-crown { top: -26px; }
.bbr-tmembers { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: 6px 14px; }
.bbr-tm { display: grid; justify-items: center; gap: 2px; min-width: 0; max-width: 150px; animation: bbr-pop 0.6s cubic-bezier(.2,1.5,.4,1) both 0.5s; }
.bbr-tm.is-me .bbr-name { color: #fde047; }
.bbr-tblock { display: grid; justify-items: center; gap: 2px; width: 100%; padding: 10px 8px 14px; border-top: 6px solid; border-radius: 12px 12px 0 0; background: #eab308; color: #fff; transform-origin: bottom; animation: bbr-rise 0.7s ease-out both; }
.bbr-tname { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.bbr-tpts { font-weight: 800; }
.bbr-draw { margin: 8px 0 0; font-size: 1.3rem; font-weight: 800; color: #fde047; }
.bbr-tlost { display: grid; gap: 10px; width: min(100%, 560px); margin: 0 auto; }
.bbr-tgroup { display: grid; gap: 6px; padding: 10px; border-radius: 14px; background: #312e81; }
.bbr-tgroup.is-lost .bbr-body { filter: grayscale(0.75); opacity: 0.85; }
.bbr-tgroup-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
@media (max-width: 520px) {
  .bbr-tm { max-width: 120px; }
  .bbl-me-bubble.b1 { left: 4px; } .bbl-me-bubble.b2, .bbl-me-bubble.b3 { right: 4px; }
}
@media (prefers-reduced-motion: reduce) { .bbr-tm, .bbr-tblock { animation: none; } }
/* owner 2026-10-14: the shared joystick (core/client/joystick.js): the finger lands anywhere in the zone */
.joy { position: relative; width: 150px; height: 150px; flex: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; cursor: grab; }
.joy-base { position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; background: rgba(148, 163, 184, 0.28); border: 2px solid rgba(148, 163, 184, 0.75); display: grid; place-items: center; pointer-events: none; }
.joy-knob { width: 50px; height: 50px; border-radius: 50%; background: #f97316; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); pointer-events: none; }
.joy.is-on .joy-base { border-color: #f97316; background: rgba(249, 115, 22, 0.18); }
/* the map / world / kitchen joystick sits on the picture */
.joy.mq-joy { position: absolute; left: 6px; bottom: 6px; z-index: 4; width: 150px; height: 150px; background: none; border: 0; border-radius: 0; display: block; }
.joy.mq-joy .joy-base { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.65); }
@media (hover: hover) and (pointer: fine) { .joy.mq-joy { display: none; } }
@media (pointer: coarse) {
  .mq-has-pad .mq-pad { display: none; } /* phones and tablets walk with the joystick; the arrows stay for a mouse */
  .mq-has-pad .joy.mq-joy { display: block; }
  .world-action { left: auto; right: 14px; bottom: 22px; transform: none; flex-direction: column; align-items: flex-end; }
  .world-action .btn { min-height: 56px; }
}
/* Bubble Arena: the joystick on the left, the bubble button on the right */
.bb-joy { width: 140px; height: 140px; }
/* Quiz Dash: the joystick on phones and tablets, the arrow buttons with a mouse */
.dash-joy { display: none; width: 132px; height: 132px; }
@media (pointer: coarse) {
  .dash-pad-tpp .dash-joy { display: block; }
  .dash-pad-tpp .dash-pad-move, .dash-pad-tpp .dash-slow { display: none; }
}
/* owner 2026-10-14: tapping fast on a phone opened the copy / select menu: game buttons and canvases never select text,
   never open the long-press menu and never zoom on a double tap. Typing boxes stay normal. */
button, .btn, [role="button"], [role="tab"], canvas, .game-focus, .world-focus, .bb-game, .dash-game, .mq-view, .td-wrap, .field-wrap, .raid-scene {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
button, .btn, [role="button"], [role="tab"] { touch-action: manipulation; }
.game-focus input, .game-focus textarea, .world-focus input, .world-focus textarea, .game-focus [contenteditable], .world-focus [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
@media (pointer: coarse) { .dash-kbd { display: none; } } /* key hints are for a keyboard */
/* owner 2026-10-14: the "room closes soon" popup (core/client/idle-warn.js) */
.idle-warn-count { font-size: 1.1rem; }
.idle-warn-left { font-size: 1.6rem; font-weight: 800; color: var(--c-orange); font-variant-numeric: tabular-nums; }
/* owner 2026-10-18: tapping fast on a phone still opened the phone's own select / copy / search popups (on plain text,
   not only on buttons): on a touch screen nothing in the app selects, long-presses or zooms on a double tap;
   typing boxes and reading text (the home page text, .selectable) stay normal */
@media (pointer: coarse) {
  #app { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  #app input, #app textarea, #app select, #app [contenteditable], #app .selectable, #app .seo { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
  #app img, #app svg, #app canvas { -webkit-user-drag: none; -webkit-touch-callout: none; }
}
/* ---------- Mokiz Legends (owner 2026-10-18): the side-view levelling world ---------- */
.lg-page { max-width: 1280px; margin: 0 auto; }
.lg-game { display: grid; gap: 8px; padding: 10px; border-radius: 18px; background: #1e1b4b; color: #e0e7ff; }
.lg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lg-top .btn { color: #e0e7ff; border-color: #4338ca; }
.lg-where { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lg-mapname { font-size: 1.05rem; color: #fde047; }
.lg-chan { color: #a5b4fc; font-size: 0.8rem; }
.lg-topbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-view { position: relative; height: min(68vh, 58vw); min-height: 300px; border-radius: 14px; overflow: hidden; background: #0f172a; }
.lg-stagebox, .lg-stage { position: absolute; inset: 0; }
.lg-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.lg-feed { position: absolute; left: 10px; top: 10px; display: grid; gap: 4px; max-width: 60%; pointer-events: none; z-index: 3; }
.lg-note { padding: 3px 10px; border-radius: 999px; background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 0.85rem; font-weight: 600; transition: opacity 0.6s; width: max-content; max-width: 100%; }
.lg-note.is-out { opacity: 0; }
.lg-note-exp { color: #a7f3d0; } .lg-note-silver { color: #e2e8f0; } .lg-note-level { color: #fde047; } .lg-note-bad { color: #fca5a5; } .lg-note-win { color: #fde047; }
.lg-note-r1 { color: #7dd3fc; } .lg-note-r2 { color: #d8b4fe; } .lg-note-r3 { color: #fde047; }
.lg-win { position: absolute; right: 10px; top: 10px; bottom: 10px; width: min(440px, calc(100% - 20px)); z-index: 6; display: flex; flex-direction: column; border-radius: 14px; background: #f8fafc; color: var(--text); border: 1px solid #c7d2fe; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35); }
.lg-win-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.lg-win-body { overflow: auto; padding: 10px 12px; }
.lg-x { min-width: 40px; min-height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: 1.1rem; cursor: pointer; }
.lg-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.lg-tab { min-height: 36px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-size: 0.85rem; cursor: pointer; }
.lg-tab.is-on { background: #4338ca; color: #fff; border-color: #4338ca; }
.lg-cells { display: grid; gap: 6px; }
.lg-cell { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.lg-cell.is-locked { opacity: 0.6; }
.lg-cell-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.lg-cell-text small { color: var(--text-muted); font-size: 0.78rem; line-height: 1.35; }
.lg-cell-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lg-r1 { border-color: #38bdf8; } .lg-r2 { border-color: #a855f7; background: #faf5ff; } .lg-r3 { border-color: #eab308; background: #fefce8; }
.lg-icon { flex: none; border-radius: 8px; background: #eef2ff; }
.lg-price { color: #a16207 !important; font-weight: 700; }
.lg-small { font-size: 0.8rem; margin: 0; }
.lg-need { color: #b45309 !important; }
.lg-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.lg-totals > div { display: grid; padding: 6px 8px; border-radius: 10px; background: #eef2ff; }
.lg-totals small { color: var(--text-muted); font-size: 0.72rem; }
.lg-eq.is-empty { opacity: 0.7; }
.lg-eq-empty { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #eef2ff; color: var(--text-muted); }
.lg-picks { display: grid; gap: 4px; }
.lg-picks .row { gap: 6px; flex-wrap: wrap; }
.lg-pick { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; font-size: 0.75rem; }
.lg-pick.is-on { border: 2px solid #4338ca; }
.lg-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lg-stat { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.lg-stat.is-main { border-color: #f97316; background: #fff7ed; }
.lg-stat.is-second { border-color: #fdba74; }
.lg-stat-n { font-size: 1.4rem; font-weight: 800; }
.lg-skillart { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #fff; font-weight: 800; font-size: 0.8rem; overflow: hidden; }
.lg-line-sword { background: #dc2626; } .lg-line-bow { background: #16a34a; } .lg-line-staff { background: #7c3aed; } .lg-line-dagger { background: #334155; }
.lg-regions { display: grid; gap: 6px; }
.lg-region { display: grid; gap: 4px; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.lg-region-maps { display: flex; flex-wrap: wrap; gap: 4px; }
.lg-mapchip { padding: 2px 8px; border-radius: 999px; background: #eef2ff; font-size: 0.78rem; }
.lg-mapchip.is-good { background: #dcfce7; color: #166534; }
.lg-mapchip.is-boss { background: #fee2e2; color: #991b1b; }
.lg-mapchip.is-here { outline: 2px solid #f97316; }
.lg-keys td { padding: 4px 8px; vertical-align: top; }
.lg-qty { width: 90px; min-height: 40px; }
.lg-hud { display: grid; grid-template-columns: minmax(200px, 1fr) auto auto; grid-template-areas: "me slots menu" "exp exp exp"; gap: 6px 10px; align-items: center; }
.lg-hud-me { grid-area: me; display: grid; gap: 3px; min-width: 0; }
.lg-hud-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lg-hud-name .lg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.lg-lv { padding: 1px 8px; border-radius: 8px; background: #f97316; color: #fff; font-weight: 800; font-size: 0.85rem; }
.lg-silver { margin-left: auto; color: #e2e8f0; font-size: 0.85rem; white-space: nowrap; }
.lg-bar { position: relative; height: 16px; border-radius: 999px; background: rgba(15, 23, 42, 0.7); overflow: hidden; }
.lg-bar i { position: absolute; inset: 0 auto 0 0; display: block; border-radius: 999px; transition: width 0.15s; }
.lg-bar span { position: relative; display: block; text-align: center; font-size: 0.7rem; font-weight: 700; line-height: 16px; color: #fff; }
.lg-hp i { background: #ef4444; } .lg-mp i { background: #3b82f6; } .lg-exp i { background: #facc15; }
.lg-hud-exp { grid-area: exp; }
.lg-hud-exp .lg-bar { height: 12px; }
.lg-hud-exp .lg-bar span { line-height: 12px; font-size: 0.62rem; color: #fef9c3; }
.lg-exp i { background: #ca8a04; }
.lg-hud-slots { grid-area: slots; display: flex; gap: 4px; }
.lg-slot { position: relative; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border: 1px solid #4338ca; border-radius: 10px; background: #312e81; color: #fff; cursor: pointer; overflow: hidden; }
.lg-slot kbd { position: absolute; left: 3px; top: 1px; font-size: 0.62rem; color: #c7d2fe; background: none; border: 0; padding: 0; }
.lg-slot .lg-count { position: absolute; right: 3px; bottom: 1px; font-size: 0.66rem; font-weight: 800; }
.lg-slot .lg-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(15, 23, 42, 0.65); pointer-events: none; }
.lg-slot .lg-skillart, .lg-slot .lg-icon { width: 34px; height: 34px; }
.lg-assigning .lg-slot { outline: 2px dashed #fde047; animation: lg-blink 0.8s infinite; }
@keyframes lg-blink { 50% { outline-color: transparent; } }
.lg-hud-menu { grid-area: menu; display: flex; gap: 4px; }
.lg-menubtn { min-width: 52px; min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 0; padding: 2px 6px; border: 1px solid #4338ca; border-radius: 10px; background: #312e81; color: #fff; cursor: pointer; font: inherit; }
.lg-menubtn small { font-size: 0.62rem; color: #c7d2fe; white-space: nowrap; }
.lg-touch { display: none; }
.lg-full { position: fixed; inset: 0; z-index: 60; border-radius: 0; grid-template-rows: auto 1fr auto; }
.lg-full .lg-view { height: auto; min-height: 0; }
.lg-need-name { max-width: 520px; margin: 24px auto; }
@media (pointer: coarse) {
  .lg-touch { display: block; position: absolute; inset: auto 0 0 0; height: 0; z-index: 5; }
  .lg-joy { position: absolute; left: 6px; bottom: 6px; }
  .lg-tbtns { position: absolute; right: 8px; bottom: 8px; display: grid; grid-template-columns: repeat(3, 54px); gap: 6px; }
  .lg-tbtn { min-width: 54px; min-height: 54px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.7); background: rgba(49, 46, 129, 0.72); color: #fff; font: inherit; font-weight: 800; font-size: 0.8rem; touch-action: none; }
  .lg-tbtn.is-on { background: rgba(249, 115, 22, 0.9); }
  .lg-t-attack { grid-column: 3; grid-row: 2 / span 2; min-height: 114px; border-radius: 28px; background: rgba(220, 38, 38, 0.8); font-size: 1rem; }
  .lg-t-skill { font-size: 1rem; }
  .lg-hud-slots { display: none; }
  .lg-hud { grid-template-columns: 1fr auto; grid-template-areas: "me menu" "exp exp"; }
}
@media (max-width: 720px) {
  .lg-game { padding: 6px; border-radius: 12px; }
  .lg-view { height: 62vh; min-height: 280px; }
  .lg-menubtn small { display: none; }
  .lg-topbtns .btn { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { .lg-assigning .lg-slot { animation: none; } }
/* Mokiz Legends on a phone held sideways: the game fills the screen (the HUD stays in view), smaller buttons */
@media (pointer: coarse) {
  .lg-tbtns { grid-template-columns: repeat(4, 46px); grid-auto-rows: 46px; gap: 5px; }
  .lg-tbtn { min-width: 46px; min-height: 46px; font-size: 0.72rem; }
  .lg-t-attack { grid-column: 5; grid-row: 1 / span 2; width: 62px; min-height: 97px; }
}
@media (pointer: coarse) and (max-height: 560px) {
  .lg-game { position: fixed; inset: 0; z-index: 60; border-radius: 0; padding: 4px 6px; gap: 4px; grid-template-rows: auto minmax(0, 1fr) auto; }
  .lg-view { height: auto; min-height: 0; border-radius: 10px; }
  .lg-top .btn { min-height: 34px; padding: 2px 8px; font-size: 0.78rem; }
  #lg-open-help { display: none; }
  .lg-tbtn { background: rgba(49, 46, 129, 0.5); border-color: rgba(255, 255, 255, 0.55); } /* see the game through them */
  .lg-t-attack { background: rgba(220, 38, 38, 0.62); }
  .lg-hud { gap: 2px 8px; }
  .lg-bar { height: 12px; }
  .lg-bar span { line-height: 12px; font-size: 0.6rem; }
  .lg-menubtn { min-height: 38px; min-width: 42px; }
  .lg-hud-exp .lg-bar { height: 8px; }
  .lg-hud-exp .lg-bar span { display: none; }
}
/* Mokiz Legends on a phone held upright (owner 2026-10-19: the buttons covered the game): the game fills the screen
   like sideways, and the stick and the buttons get a panel of their own UNDER the picture (never over it). */
@media (pointer: coarse) and (orientation: portrait) and (max-width: 1100px) {
  .lg-game { position: fixed; inset: 0; z-index: 60; border-radius: 0; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); gap: 4px; grid-template-rows: auto minmax(0, 1fr) auto; }
  .lg-top { flex-wrap: nowrap; gap: 4px; }
  .lg-top .btn { min-height: 36px; padding: 2px 7px; font-size: 0.74rem; white-space: nowrap; }
  .lg-where { min-width: 0; gap: 4px; }
  .lg-mapname { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lg-topbtns { flex-wrap: nowrap; gap: 4px; }
  #lg-open-help { display: none; }
  .lg-view { height: auto; min-height: 0; display: flex; flex-direction: column; border-radius: 10px; }
  .lg-stagebox { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; border-radius: 10px; overflow: hidden; }
  .lg-touch { position: relative; inset: auto; flex: none; height: 203px; margin-top: 4px; border-radius: 12px; background: #312e81; }
  .lg-joy { left: 4px; top: 50%; bottom: auto; margin-top: -73px; width: 146px; height: 146px; }
  .lg-tbtns { right: 6px; bottom: 6px; grid-template-columns: repeat(3, 44px); grid-auto-rows: 44px; gap: 5px; }
  .lg-tbtn { min-width: 44px; min-height: 44px; font-size: 0.7rem; }
  .lg-t-attack { grid-column: 4; grid-row: 1 / span 4; width: 58px; min-height: 191px; }
  .lg-hud { gap: 2px 6px; }
  .lg-bar { height: 13px; }
  .lg-bar span { line-height: 13px; font-size: 0.6rem; }
  .lg-menubtn { min-height: 40px; min-width: 44px; }
  .lg-hud-exp .lg-bar { height: 8px; }
  .lg-hud-exp .lg-bar span { display: none; }
  .lg-win { top: 6px; bottom: 6px; right: 6px; width: calc(100% - 12px); }
}
@media (pointer: coarse) and (orientation: portrait) and (max-width: 600px) {
  .lg-topbtns .lg-lbl { display: none; } /* a phone: the icons only */
  .lg-topbtns .btn { min-width: 40px; justify-content: center; font-size: 1rem; }
}
@media (pointer: coarse) and (orientation: portrait) and (max-width: 370px) {
  .lg-joy { width: 124px; height: 124px; margin-top: -62px; }
  .lg-touch { height: 191px; }
  .lg-tbtns { grid-template-columns: repeat(3, 41px); grid-auto-rows: 41px; gap: 5px; }
  .lg-tbtn { min-width: 41px; min-height: 41px; }
  .lg-t-attack { width: 52px; min-height: 179px; }
}
/* ---------- Mokiz Legends rework (owner 2026-10-19): jobs, channels, party, market, regen ---------- */
.lg-line-rod { background: #ca8a04; }
.lg-jobs { max-width: 980px; margin: 12px auto; }
.lg-jobgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.lg-jobcard { --job: #4338ca; display: grid; justify-items: center; gap: 6px; padding: 12px 10px; border: 1px solid var(--border); border-top: 4px solid var(--job); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: center; cursor: pointer; min-height: 44px; }
.lg-jobcard:hover, .lg-jobcard:focus-visible { border-color: var(--job); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12); }
.lg-jobcard strong { font-size: 1.05rem; color: var(--job); }
.lg-jobart { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: color-mix(in srgb, var(--job) 14%, transparent); }
.lg-jobart canvas, .lg-jobart svg { max-width: 60px; max-height: 60px; }
.lg-jobdesc { font-size: 0.85rem; line-height: 1.4; }
.lg-jobpath { font-size: 0.75rem; }
.lg-jobrow { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-jobmini { --job: #4338ca; min-height: 44px; padding: 6px 12px; border: 1px solid var(--border); border-left: 4px solid var(--job); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.lg-jobdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-left: 4px; vertical-align: middle; }
.lg-title { color: #c7d2fe; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-money { margin-left: auto; display: inline-flex; gap: 8px; color: #e2e8f0; font-size: 0.85rem; white-space: nowrap; }
.lg-state { color: #fde68a; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-state:empty { display: none; }
.lg-chans { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.lg-chans .lg-chan { display: grid; gap: 4px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-align: left; }
.lg-chans .lg-chan.is-on { border: 2px solid #4338ca; }
.lg-chans .lg-chan.is-full { opacity: 0.55; }
.lg-chans .lg-chan i { display: block; height: 5px; min-width: 3px; border-radius: 3px; background: #22c55e; }
.lg-chans .lg-chan.is-full i { background: #ef4444; }
.lg-skillgroup { display: grid; gap: 6px; }
.lg-skillhead { margin: 0; padding: 4px 10px; border-radius: 8px; background: #eef2ff; color: #3730a3; font-weight: 600; font-size: 0.85rem; }
.lg-skillicon { display: block; border-radius: 8px; flex: none; }
.lg-code { text-transform: uppercase; letter-spacing: 0.15em; width: 8.5em; }
.lg-bigcode { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.18em; color: #4338ca; user-select: all; }
@media (pointer: coarse) {
  .lg-t-pick { background: rgba(22, 101, 52, 0.75); }
  .lg-t-sit { background: rgba(120, 53, 15, 0.75); }
  .lg-money { font-size: 0.78rem; gap: 6px; }
}
/* ---------- owner 2026-10-19: Mokiz Legends first in Mokiz World (a wide card on top, a top-bar button) ---------- */
.wcard-grid-top { grid-template-columns: 1fr; }
.wcard-feature { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .wcard-feature { grid-template-columns: minmax(220px, 46%) 1fr; grid-template-rows: 1fr auto; }
  .wcard-feature .wcard-art { grid-row: 1 / span 2; border-bottom: 0; border-right: 3px solid var(--wc); aspect-ratio: auto; min-height: 170px; }
  .wcard-feature .wcard-body { align-content: center; padding: 14px 16px 6px; }
  .wcard-feature .wcard-title { font-size: 1.4rem; }
  .wcard-feature .wcard-desc { display: block; font-size: 0.95rem; }
  .wcard-feature .wcard-cta { margin: 6px 16px 14px; }
}
@media (max-width: 520px) { .wcard-feature .wcard-desc { display: block; } }
.world-legends-btn { border-color: #0d9488; color: #0f766e; }
/* owner 2026-10-19: a phone held sideways in a room game: no site bar, no big title, a slim PIN bar, the game from the top */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  body:has(.room-page.room-in-game) .topbar, body:has(.room-page.room-in-game) .site-banner { display: none; }
  body:has(.room-page.room-in-game) .container { padding: 4px max(6px, env(safe-area-inset-left)) 6px; }
  .room-page.room-in-game { padding: 4px 6px; gap: 4px; border-radius: 10px; }
  .room-page.room-in-game > h1, .room-page.room-in-game > .center.muted { display: none; }
  .room-page.room-in-game .room-pinbar { position: static; padding: 2px 8px; gap: 8px; min-height: 0; font-size: 0.85rem; }
  .room-page.room-in-game .room-pinbar .btn { min-height: 34px; }
}
/* Ghost Village on a phone held sideways (owner 2026-10-19): seats and actions left, role card + chat right */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  body:has(.gv-board) .topbar { display: none; }
  body:has(.gv-board) .container { padding: 4px max(6px, env(safe-area-inset-left)) 6px; }
  .gv-board { grid-template-columns: minmax(0, 1fr) minmax(230px, 40%); gap: 8px; }
  .gv-side { order: 0; position: sticky; top: 4px; max-height: calc(100dvh - 8px); overflow: auto; }
  .gv-seats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .gv-seat { min-height: 84px; }
  .gv-phase { padding: 6px 10px; font-size: 0.95rem; }
}
/* Quiz Dash on a touch screen held sideways (owner 2026-10-19: the joystick and the power buttons fell under the
   screen): the road on the left as tall as the screen allows, the powers and the joystick in a column on the right */
@media (pointer: coarse) and (orientation: landscape) {
  .dash-game { grid-template-columns: minmax(0, 1fr) minmax(150px, 22%); align-items: start; }
  .dash-game > .dash-hud { grid-column: 1 / -1; }
  .dash-game > .dash-stage { grid-column: 1; grid-row: 2 / span 2; }
  .dash-game > .stack { grid-column: 2; grid-row: 2; gap: 4px; }
  .dash-game .dash-powers { grid-template-columns: 1fr; gap: 6px; }
  .dash-game .dash-power-help { display: none; }
  .dash-game > .dash-pad { grid-column: 2; grid-row: 3; flex-direction: column; justify-content: flex-start; gap: 8px; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  body:has(.dash-game) .topbar, body:has(.dash-game) .dw-bar { display: none; }
  body:has(.dash-game) .container { padding: 4px max(6px, env(safe-area-inset-left)) 4px; }
  .dash-game { gap: 4px 8px; }
  .dash-game > .dash-hud { grid-column: 2; grid-row: 1; font-size: 0.8rem; text-align: center; }
  .dash-game > .dash-stage { grid-row: 1 / span 3; }
  .dash-game .dash-power { min-height: 44px; padding: 4px 8px; }
  .dash-game { grid-template-columns: minmax(0, 1fr) 200px; }
  .dash-game .dash-joy { width: 118px; height: 118px; }
  .dash-game > .dash-pad { flex-direction: row; align-items: center; justify-content: space-between; gap: 4px; }
  .dash-game .dash-jump { min-width: 66px; min-height: 66px; padding: 0 6px; font-size: 0.8rem; }
  .dash-game .dash-power { min-height: 40px; }
}
/* Map games (Quiz Run / Egg Heist / Treasure Hunt) on a phone held sideways (owner 2026-10-19): the map on the left,
   the question, the answer colours and the action button on the right */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  .mq-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 36%); grid-template-rows: auto auto 1fr; gap: 6px 8px; align-items: start; }
  .mq-play > .mq-stage { grid-column: 1; grid-row: 1 / span 3; }
  .mq-play > .mq-hud, .mq-play > .mq-actions, .mq-play > :not(.mq-stage):not(.mq-hud):not(.mq-actions) { grid-column: 2; }
  .mq-play .mq-follow { height: calc(100dvh - 58px); }
  .mq-play .mq-run-q { font-size: 1rem; }
  .mq-play .mq-legend { grid-template-columns: 1fr 1fr; gap: 4px; }
  .mq-play .mq-legend .answer { min-height: 40px; padding: 4px 8px; }
  .mq-play .mq-actions { min-height: 48px; justify-content: stretch; }
  .mq-play .mq-actions .btn { width: 100%; }
  /* the arcade boards (Battleship sea, Tower Defense): as tall as the screen, not as wide */
  .room-in-game .sea-canvas, .room-in-game .td-canvas { width: auto; max-width: 100%; max-height: calc(100dvh - 56px); margin-inline: auto; }
}
/* Party Quest (boat race / quiz tower / market) on a phone held sideways (owner 2026-10-19): the scene (or the
   market cards) and my line on the left, the question and the answers on the right */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  .party-play { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 6px 8px; align-items: start; }
  .party-play > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .party-play > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .party-play > :nth-child(n+3) { grid-column: 2; grid-row: 1 / span 2; }
  .party-play .answer-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .party-play .answer { min-height: 52px; padding: 6px 10px; }
  .party-play .big-count { width: 44px; height: 44px; font-size: 1.1rem; }
  .party-play .quiz-qtext { font-size: 1rem; margin: 2px 0; }
  .party-play > .card { padding: 8px; gap: 6px; }
}
/* Battleship on a phone held sideways (owner 2026-10-19): the chips, the notes and the buttons on the left, the sea
   on the right as tall as the screen (my own sea stays in its fold-out card on the left) */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  .arc-ship { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 10px; }
  .arc-ship > * { grid-column: 1; }
  .arc-ship > .sea-wrap { grid-column: 2; grid-row: 1 / span 8; }
  .room-in-game .arc-ship > .sea-wrap .sea-canvas { height: calc(100dvh - 60px); width: auto; max-width: none; max-height: none; }
  .arc-ship > .card { padding: 8px; }
  .arc-ship h3 { font-size: 1rem; margin: 0; }
}
