
/* Typefall — scoped so it doesn't touch the rest of the site */
.tf-scope { 
  --ink: #f4f0df; --muted:#8b93a7; --cyan:#56f2dc; --coral:#ff6b68; --gold:#ffd166;
  --panel: rgba(13,17,28,.86); --line: rgba(255,255,255,.1);
  color-scheme: dark;
  position:relative; width:100%; height:min(88vh, 820px); max-height:820px;
  background:#080b12; color:var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  overscroll-behavior:none; -webkit-tap-highlight-color:transparent; user-select:none;
  border-radius:14px; overflow:hidden;
  margin: 12px auto;
}
.tf-scope, .tf-scope *, .tf-scope *::before, .tf-scope *::after { box-sizing: border-box; }

/* mobile pause button */
.tf-scope .tf-pause-btn { position:absolute; top:56px; right:12px; z-index:6; background:rgba(0,0,0,.4); color:#fff; border:1px solid var(--line); border-radius:10px; padding:6px 12px; font-size:14px; font-weight:600; cursor:pointer; }
.tf-scope .tf-pause-btn:hover { background:rgba(0,0,0,.6); }

.tf-scope button{ font: inherit; }.tf-scope .app{
      position: relative;
      width: 100%;
      height: 100%;
      min-height: 420px;
      isolation: isolate;
      background:
        radial-gradient(circle at 50% 110%, rgba(86, 242, 220, .08), transparent 42%),
        #080b12;
    }.tf-scope canvas{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; }.tf-scope .topbar{
      position: absolute;
      z-index: 4;
      top: max(14px, env(safe-area-inset-top));
      left: max(16px, env(safe-area-inset-left));
      right: max(16px, env(safe-area-inset-right));
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      pointer-events: none;
    }.tf-scope .brand{ font-weight: 900; font-size: 15px; letter-spacing: .15em; text-transform: uppercase; }.tf-scope .brand span{ color: var(--cyan); }.tf-scope .stats{ display: flex; gap: 18px; text-align: right; }.tf-scope .stat b{ display: block; font-size: clamp(17px, 4vw, 24px); line-height: 1; font-variant-numeric: tabular-nums; }.tf-scope .stat small{ display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }.tf-scope .lives{ color: var(--coral); letter-spacing: .08em; }.tf-scope .input-strip{
      position: absolute;
      z-index: 4;
      left: 50%;
      bottom: max(18px, env(safe-area-inset-bottom));
      width: min(560px, calc(100% - 32px));
      transform: translateX(-50%);
      text-align: center;
      pointer-events: none;
    }.tf-scope .target{
      min-height: 30px;
      font: 800 clamp(19px, 5vw, 28px)/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      letter-spacing: .08em;
      text-shadow: 0 0 24px rgba(86, 242, 220, .25);
    }.tf-scope .target .done{ color: var(--cyan); }.tf-scope .target .todo{ color: rgba(244, 240, 223, .36); }.tf-scope .hint{ margin-top: 8px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }.tf-scope .combo{
      position: absolute;
      z-index: 4;
      top: 82px;
      left: 50%;
      transform: translateX(-50%) scale(.9);
      opacity: 0;
      color: var(--cyan);
      font-weight: 950;
      font-size: clamp(18px, 5vw, 28px);
      letter-spacing: -.04em;
      transition: opacity .18s, transform .18s;
      pointer-events: none;
    }.tf-scope .combo.show{ opacity: 1; transform: translateX(-50%) scale(1); }.tf-scope .toast{
      position: absolute;
      z-index: 6;
      left: 50%; top: 16%;
      transform: translate(-50%, -8px);
      opacity: 0;
      padding: 8px 13px;
      border: 1px solid rgba(255, 209, 102, .35);
      border-radius: 999px;
      background: rgba(21, 18, 11, .85);
      color: var(--gold);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .1em;
      text-transform: uppercase;
      pointer-events: none;
      transition: .18s ease;
    }.tf-scope .toast.show{ opacity: 1; transform: translate(-50%, 0); }.tf-scope .overlay{
      position: absolute;
      z-index: 10;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(5, 7, 12, .52);
      backdrop-filter: blur(8px);
      transition: opacity .2s;
    }.tf-scope .overlay.hidden{ visibility: hidden; opacity: 0; pointer-events: none; }.tf-scope .card{
      width: min(430px, 100%);
      padding: clamp(24px, 6vw, 38px);
      border: 1px solid var(--line);
      border-radius: 26px;
      background: linear-gradient(145deg, rgba(22, 27, 41, .96), rgba(10, 13, 22, .96));
      box-shadow: 0 28px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04);
      text-align: center;
    }.tf-scope .eyebrow{ color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }.tf-scope h1{ margin: 10px 0 8px; font-size: clamp(48px, 14vw, 72px); line-height: .9; letter-spacing: -.075em; }.tf-scope .subtitle{ max-width: 330px; margin: 0 auto 24px; color: var(--muted); font-size: 14px; line-height: 1.55; }.tf-scope .button-row{ display: grid; grid-template-columns: 1fr; gap: 10px; }.tf-scope .btn{
      min-height: 54px;
      border: 0;
      border-radius: 15px;
      cursor: pointer;
      font-weight: 850;
      letter-spacing: .015em;
    }.tf-scope .btn.primary{ background: var(--cyan); color: #06100f; box-shadow: 0 8px 30px rgba(86, 242, 220, .18); }.tf-scope .btn.secondary{ border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); }.tf-scope .btn:active{ transform: translateY(1px); }.tf-scope .how{ display: flex; justify-content: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 10px; }.tf-scope .key{ color: var(--ink); }.tf-scope .bestline{ margin: -10px 0 19px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }.tf-scope .bestline b{ color: var(--gold); font-size: 12px; }.tf-scope .result-score{ margin: 12px 0 2px; font-size: clamp(48px, 15vw, 68px); font-weight: 950; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }.tf-scope .new-best{ display: none; margin-bottom: 15px; color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }.tf-scope .new-best.show{ display: block; }.tf-scope .result-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }.tf-scope .result-grid div{ padding: 14px 6px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }.tf-scope .result-grid b{ display: block; font-size: 21px; }.tf-scope .result-grid small{ color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }.tf-scope #typeCapture{
      position: fixed;
      left: 50%; bottom: 0;
      width: 2px; height: 2px;
      padding: 0; border: 0; opacity: .01;
      transform: translateX(-50%);
      font-size: 16px;
    }
    @media (min-width: 560px) {.tf-scope .button-row.two{ grid-template-columns: 1fr 1fr; }
    }
    @media (prefers-reduced-motion: reduce) {.tf-scope *, .tf-scope *::before, .tf-scope *::after{ transition-duration: .01ms !important; animation-duration: .01ms !important; }
    }