/* App interface fragments (data-ui). The app's own look: true-black flat.
   ground #0b0d10, surface #16191e, raised #22262c, white inverted pill, teal only on data. */
[data-ui] {
  --ui-ground: #0b0d10;
  --ui-surface: #16191e;
  --ui-raised: #22262c;
  --ui-ink: #f3f5f7;
  --ui-muted: #a2a9b1;
  --ui-teal: #1aa697;
  --ui-green: #3fd47e;
  --ui-red: #f0605d;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif; /* taste-skill-ignore: Android's own face, inside data-ui */
  color: var(--ui-ink);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}
[data-ui] * { box-sizing: border-box; }
[data-ui] p { max-width: none; margin: 0; }

/* A phone screen, shown as the screen itself: no device frame. */
.ui-screen {
  width: 360px;
  background: var(--ui-ground);
  border-radius: 30px;
  padding: 18px 14px 20px;
  overflow: hidden;
  position: relative;
}
.ui-status { display: flex; justify-content: space-between; font-size: 13px; color: var(--ui-muted); padding: 0 8px 14px; }
.ui-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; padding: 0 6px 4px; }
.ui-sub { font-size: 13px; color: var(--ui-muted); padding: 0 6px 14px; }
.ui-label { font-size: 13px; color: var(--ui-muted); padding: 14px 6px 8px; }
.ui-card { background: var(--ui-surface); border-radius: 20px; padding: 14px 16px; }
.ui-card + .ui-card { margin-top: 8px; }
.ui-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ui-row + .ui-row { margin-top: 10px; }
.ui-row .v { font-variant-numeric: tabular-nums; font-weight: 500; }
.ui-big { font-size: 48px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ui-big small { font-size: 16px; font-weight: 500; color: var(--ui-muted); letter-spacing: 0; margin-left: 4px; }
.ui-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.ui-stats div { background: var(--ui-raised); border-radius: 14px; padding: 8px 8px 9px; }
.ui-stats b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-stats span { font-size: 13px; color: var(--ui-muted); }
.ui-pill { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 999px; background: #fff; color: #0b0d10; font-weight: 600; font-size: 15px; width: 100%; }
.ui-pill.ghost { background: var(--ui-raised); color: var(--ui-ink); }
.ui-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ui-tile { background: var(--ui-surface); border-radius: 20px; padding: 14px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.ui-tile b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-tile span { font-size: 13px; color: var(--ui-muted); }
.ui-tile.wide { grid-column: span 2; }
.ui-check { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; }
.ui-check + .ui-check { box-shadow: 0 -1px 0 var(--ui-raised); } /* taste-skill-ignore: the app's own row divider (data-ui) */
.ui-check .ok { color: var(--ui-teal); font-weight: 500; white-space: nowrap; }
.ui-code { font-size: 26px; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.ui-field { background: var(--ui-raised); border-radius: 14px; height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: var(--ui-muted); }
.ui-field b { color: var(--ui-ink); font-weight: 600; }
.ui-tabs { display: flex; justify-content: space-around; padding: 14px 0 0; font-size: 13px; color: var(--ui-muted); }
.ui-tabs .on { color: #fff; font-weight: 600; }

/* The overlay the app draws over a game: Pill style. */
.ui-overlay {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(11, 13, 16, 0.86); color: #fff;
  border-radius: 999px; padding: 6px 14px 6px 12px;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif; font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ui-overlay .fps { color: var(--ui-green); }
.ui-overlay .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ui-red); }
.ui-overlay span { color: var(--ui-muted); font-weight: 500; }

/* Charts drawn by ui.js: one series, 2px line, recessive grid. */
.ui-chart { display: block; width: 100%; height: auto; margin-top: 10px; }
.ui-chart .grid { stroke: #2a2f36; stroke-width: 1; }
.ui-chart .axis { fill: var(--ui-muted); font-size: 11px; font-family: inherit; }
.ui-chart .line { fill: none; stroke: var(--ui-teal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ui-chart .area { fill: var(--ui-teal); opacity: 0.1; }
.ui-chart .stutter { fill: var(--ui-red); stroke: var(--ui-surface); stroke-width: 2; }

/* The 1080 × 1350 result card, at 4:5. */
.ui-result { width: 320px; aspect-ratio: 4 / 5; background: var(--ui-ground); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; }
.ui-result .game { font-size: 15px; color: var(--ui-muted); }
.ui-result .ui-big { font-size: 64px; margin-top: 6px; }
.ui-result .ui-foot { margin-top: auto; font-size: 13px; color: var(--ui-muted); display: flex; justify-content: space-between; }

/* More pieces of the app, for the store pages */
.ui-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--ui-raised); border-radius: 999px; padding: 4px; }
.ui-seg span { text-align: center; padding: 8px 0; border-radius: 999px; color: var(--ui-muted); }
.ui-seg .on { background: #fff; color: #0b0d10; font-weight: 600; }
.ui-switch { width: 44px; height: 26px; border-radius: 999px; background: var(--ui-raised); position: relative; flex: none; }
.ui-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ui-muted); }
.ui-switch.on { background: var(--ui-teal); }
.ui-switch.on::after { left: 21px; background: #fff; }
.ui-range { height: 6px; border-radius: 999px; background: var(--ui-raised); position: relative; margin: 14px 0 6px; }
.ui-range i { position: absolute; inset: 0 40% 0 0; background: var(--ui-teal); border-radius: 999px; }
.ui-range b { position: absolute; left: 60%; top: -7px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #fff; }
.ui-grid { display: grid; grid-template-columns: repeat(8, 15px); justify-content: center; gap: 3px; margin-top: 6px; }
.ui-grid i { aspect-ratio: 1; border-radius: 3px; background: var(--ui-teal); opacity: 0.85; }
.ui-grid i.miss { background: var(--ui-red); opacity: 1; }
.ui-next { background: #fff; color: #0b0d10; border-radius: 20px; padding: 14px 16px; margin-top: 8px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.ui-next span { font-weight: 400; color: #4a5058; font-size: 13px; display: block; }
.ui-verdict { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.ui-hl { box-shadow: 0 0 0 2px var(--ui-teal); } /* taste-skill-ignore: the app's focus ring (data-ui) */
.ui-note { font-size: 13px; color: var(--ui-muted); padding: 8px 6px 0; }
.ui-done { text-align: center; padding: 28px 10px 18px; }
.ui-done .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--ui-teal); margin: 0 auto 14px; position: relative; }
.ui-done .tick::after { content: ""; position: absolute; left: 20px; top: 14px; width: 12px; height: 22px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }

/* The Get Pro sheet: numbered steps, a labelled tile, two buttons side by side */
.ui-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; font-size: 13px; line-height: 1.4; color: var(--ui-muted); }
.ui-steps li { counter-increment: step; display: grid; grid-template-columns: 18px 1fr; padding: 3px 0; }
.ui-steps li::before { content: counter(step); font-weight: 600; }
.ui-tilelabel { font-size: 12px; color: var(--ui-muted); margin-bottom: 2px; }
.ui-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ui-btns .ui-pill { padding: 0 12px; }
