<style>
  :root {
    --bg: #0b0b0c;
    --card: #121214;
    --line: #27272a;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --accent: #10b981;
  }

  * {
    box-sizing: border-box;
  }

  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  }

  body {
    padding: 14px;
    max-width: 520px;   /* 👈 stops over-wide layouts */
    margin: 0 auto;
  }

  h1 {
    font-size: 24px;
    margin: 6px 0 4px;
    text-align: center;
  }

  #subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 12px 0;
  }

  .tile {
    aspect-ratio: 1 / 1;      /* 👈 square tiles */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
  }

  .tile.selected {
    background: var(--accent);
    color: #000;
  }

  .tile.disabled {
    background: #1f2937;
    color: #6b7280;
    cursor: not-allowed;
  }

  input, button {
    width: 100%;
    font-size: 16px;          /* 👈 critical for iOS */
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
  }

  button {
    background: #fff;
    color: #000;
    font-weight:
