:root { --bg: #05050b; --fg: #f4f4fa; --muted: #a3a3b8; --panel: #161622; --line: rgba(255, 255, 255, 0.12); --accent: #00e5ff; --accent-fg: #001318; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; } [data-theme="pastel"] { --bg: #1c1a26; --accent: #cdb4ff; --accent-fg: #1c1a26; --panel: #262334; } [data-theme="contrast"] { --bg: #000; --accent: #ffd500; --accent-fg: #000; --panel: #000; --line: #fff; --muted: #e6e6e6; } *, *::before, *::after { box-sizing: border-box; } html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--fg); font-family: var(--font); /* no scrolling, zooming, pull-to-refresh, selection or callouts */ touch-action: none; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; } #stage { z-index: 0; position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; } /* ---- overlay text ---- */ #overlay { z-index: 1; position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: calc(var(--safe-t) + 5rem) calc(var(--safe-r) + 2rem) calc(var(--safe-b) + 3rem) calc(var(--safe-l) + 2rem); pointer-events: none; text-align: center; transition: opacity 200ms; } .sheet-open #overlay { opacity: 0; } .msg { margin: 0; max-width: 22ch; font-size: clamp(1.4rem, 6.5vw, 2.2rem); font-weight: 700; line-height: 1.2; text-wrap: balance; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.9); } .msg.hint { color: var(--muted); font-weight: 600; font-size: clamp(1.2rem, 5.5vw, 1.8rem); } .msg.soft { color: var(--muted); font-weight: 600; font-size: clamp(1rem, 4.5vw, 1.4rem); } .msg.count { font-size: clamp(3rem, 18vw, 6rem); font-weight: 800; opacity: 0.35; } .msg.alert { font-size: clamp(1.5rem, 7vw, 2.4rem); } .msg.result { font-size: clamp(1.8rem, 9vw, 3.2rem); font-weight: 800; } .msg.in { animation: msg-in 380ms cubic-bezier(0.2, 1.4, 0.4, 1); } .msg-sub { margin: 0; min-height: 1.4em; max-width: 32ch; color: var(--fg); opacity: 0.75; font-size: clamp(0.95rem, 4vw, 1.1rem); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); } @keyframes msg-in { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } } /* ---- toolbar: top centre, away from the side-edge back gesture ---- */ #toolbar { z-index: 2; position: fixed; top: calc(var(--safe-t) + 14px); left: 50%; transform: translateX(-50%); display: flex; gap: 10px; transition: opacity 200ms, transform 200ms; } #toolbar.hidden { opacity: 0; transform: translate(-50%, -8px); pointer-events: none; } .tool { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--fg); display: grid; place-items: center; padding: 0; cursor: pointer; touch-action: manipulation; } .tool:active { background: rgba(255, 255, 255, 0.16); } .tool:focus-visible, .sheet-body button:focus-visible, .sheet-close:focus-visible, #stake-input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; } .tool svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .tool .off { display: none; } #btn-sound.is-muted .on, #btn-fullscreen.is-full .on { display: none; } #btn-sound.is-muted .off, #btn-fullscreen.is-full .off { display: inline; } /* ---- settings sheet ---- */ #sheet-backdrop { z-index: 3; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 220ms; } .sheet-open #sheet-backdrop { opacity: 1; } #sheet { z-index: 4; position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px; max-height: calc(100% - var(--safe-t) - 24px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5); transform: translateY(100%); transition: transform 240ms cubic-bezier(0.2, 0.9, 0.3, 1); user-select: none; outline: none; } .sheet-open #sheet { transform: none; } .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px 8px; } .sheet-head h2 { margin: 0; font-size: 1.15rem; } .sheet-close { font: inherit; font-weight: 700; color: var(--accent-fg); background: var(--accent); border: 0; border-radius: 999px; min-height: 40px; padding: 0 18px; cursor: pointer; } .sheet-body { overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; padding: 4px 24px calc(var(--safe-b) + 20px); } .field { padding: 12px 0; border-top: 1px solid var(--line); } .field:first-child { border-top: 0; } .field h3 { margin: 0 0 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); } .field.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .field.row h3 { margin: 0; } .field[hidden] { display: none; } .desc { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; } .seg { display: flex; gap: 6px; flex-wrap: wrap; } .seg button, .chip, .stepper button { font: inherit; font-size: 0.95rem; color: var(--fg); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 999px; min-height: 44px; padding: 0 16px; cursor: pointer; touch-action: manipulation; } .seg button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 700; } .stepper { display: flex; align-items: center; gap: 6px; } .stepper button { width: 44px; padding: 0; font-size: 1.3rem; } .stepper output { min-width: 2ch; text-align: center; font-size: 1.2rem; font-weight: 700; } .stake-row { display: flex; gap: 8px; } #stake-input { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: 1rem; /* ≥16px stops iOS zooming on focus */ color: var(--fg); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; user-select: text; -webkit-user-select: text; touch-action: manipulation; } #stake-input::placeholder { color: var(--muted); opacity: 0.7; } .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .chip { min-height: 38px; font-size: 0.9rem; } [data-theme="contrast"] .seg button, [data-theme="contrast"] .chip, [data-theme="contrast"] .stepper button, [data-theme="contrast"] #stake-input { border-width: 2px; background: #000; } /* ---- debug ---- */ #debug-hud { z-index: 5; position: fixed; bottom: calc(var(--safe-b) + 8px); left: 50%; transform: translateX(-50%); font: 12px/1.4 ui-monospace, monospace; color: #8f8; background: rgba(0, 0, 0, 0.6); padding: 4px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; } @media (prefers-reduced-motion: reduce) { .msg.in { animation-duration: 1ms; } #sheet, #toolbar, #sheet-backdrop { transition-duration: 1ms; } }