/* Radio Live — radio-live.me
   The app icon is white line-art on near-black, so the site is monochrome too:
   one ink, one paper, and hierarchy carried by size and space rather than hue.

   StarGoApps: the system's appearance picks the palette (WEB-671). Dark is the default and is
   the palette the site always had; light swaps paper and ink and keeps everything else. */

:root {
  color-scheme: light dark;

  --bg: #0a0a0b;
  --surface: #151518;
  --surface-hi: #1c1c20;
  --border: #26262b;
  --border-hi: #3d3d45;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --shadow: rgba(0, 0, 0, 0.7);

  --radius: 14px;
  --wrap: 860px;
}

/* Light: white paper, near-black ink. Muted text stays above WCAG AA (4.5:1) on both the page and
   the card surface; borders are hairlines, the hover border is one step darker. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f5f5f7;
    --surface-hi: #ececf0;
    --border: #e2e2e7;
    --border-hi: #b4b4bd;
    --text: #111114;
    --muted: #5c5c66;
    --shadow: rgba(17, 17, 20, 0.10);
  }
  /* The QR code is white paper on white paper here: a hairline keeps its edge. */
  .qr-code svg { box-shadow: 0 0 0 1px var(--border); }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 20px 96px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
}

.wrap { max-width: var(--wrap); margin: 0 auto; }

a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--border-hi); }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3 { font-weight: 650; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 72px;
  text-align: center;
}

/* Concentric arcs echoing the antenna in the app icon. Decoration only. */
.hero-bg {
  position: absolute;
  inset: -60px 0 auto;
  height: 560px;
  z-index: 0;
  pointer-events: none;
  color: #ffffff;
  opacity: 0.09;
  -webkit-mask-image: radial-gradient(52% 58% at 50% 26%, #000 0%, transparent 78%);
  mask-image: radial-gradient(52% 58% at 50% 26%, #000 0%, transparent 78%);
}
.hero-bg svg { width: 100%; height: 100%; display: block; }

.hero > *:not(.hero-bg) { position: relative; z-index: 1; }

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 60px var(--shadow);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}

.hero .tagline {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
  margin: 0 auto 34px;
  max-width: 22em;
  text-wrap: balance;
}

/* Official store artwork, used unmodified apart from trimming the transparent
   clear space off the Play badge — the clear space is honoured with margin
   instead, so the two badges line up on their ink rather than their bounding
   boxes. Both are drawn at the same 44px height. */
.stores { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }

.store-badge {
  display: inline-flex;
  border-radius: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); opacity: 0.88; }
.store-badge:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.store-badge img { display: block; height: 44px; width: auto; }

.platforms {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- features ---------- */

.features { padding: 8px 0 24px; }

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 14px;
}

.feature {
  padding: 24px 22px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature-icon { width: 26px; height: 26px; display: block; color: var(--text); opacity: 0.85; margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin: 0 0 6px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.feature-note { margin: 20px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- documents ---------- */

.doc { padding: 48px 0 0; }
.doc h2 { font-size: 30px; margin: 0 0 6px; letter-spacing: -0.02em; }
.doc h3 { font-size: 19px; margin: 38px 0 10px; letter-spacing: -0.01em; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc a { text-decoration: underline; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

.table-scroll { overflow-x: auto; margin: 20px 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-weight: 600; }

/* ---------- support channels ---------- */

.channels {
  list-style: none;
  margin: 24px 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
}

.channel {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.channel, .doc .channel { text-decoration: none; }
.channel:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.channel-icon { grid-row: 1 / 3; width: 26px; height: 26px; opacity: 0.85; }
.channel-name { font-weight: 600; letter-spacing: -0.01em; }
.channel-detail { color: var(--muted); font-size: 14px; word-break: break-word; }

.reply-time { color: var(--muted); font-size: 15px; }

/* ---------- chrome ---------- */

.topbar { padding: 22px 0; border-bottom: 1px solid var(--border); }
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.topbar a:hover { color: var(--text); }
.topbar img { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); }

footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}
footer a { color: var(--muted); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
footer .brand { margin: 10px 0 0; font-size: 14px; letter-spacing: 0.02em; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 64px 0 52px; }
  .hero .tagline { font-size: 18px; }
  .app-icon { width: 84px; height: 84px; border-radius: 19px; }
    .features { padding-bottom: 16px; }
  .doc h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- StarGoApps additions ---------- */

.hero-plain { padding: 72px 0 36px; }

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* auto-fill keeps a lone tile on the last row the same width as the others;
     1fr rows make every tile as tall as the tallest one. */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
}
.app-card { display: flex; }
.app-card-link {
  box-sizing: border-box;
  width: 100%;
  align-content: center;
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.app-card-link:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.app-card-link > * { min-width: 0; }
.app-card img { grid-row: 1 / 3; width: 64px; height: 64px; border-radius: 15px; border: 1px solid var(--border); }
.app-card-name { font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-card-tag { color: var(--muted); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

.app-nav { display: flex; gap: 20px; flex-wrap: wrap; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--border); }
.app-nav a { color: var(--muted); }

.doc h4 { font-size: 17px; margin: 28px 0 8px; letter-spacing: -0.01em; }
.doc h4 .meta { font-weight: 400; font-size: 14px; }
.doc li > ul { margin-top: 6px; }
.stores p, p.stores { margin: 16px 0; }

/* Share page: QR code for visitors on a computer or an Android phone */
.qr { text-align: center; margin: 2rem auto 0; }
.qr-code svg { width: 200px; height: 200px; border-radius: 12px; display: block; margin: 0 auto 0.75rem; }
/* An app on both stores: one code per store, side by side, stacked on a narrow screen */
.qr-set { display: flex; gap: 32px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.qr-item { max-width: 240px; }
.qr p { color: var(--muted, #9a9aa3); font-size: 0.95rem; margin: 0; }
.doc .applies { border-left: 3px solid currentColor; padding-left: 0.75rem; }

/* Shared wallpaper page (/<app>/w/<name>): the wallpaper above the app */
.hero-wallpaper { padding: 28px 0 40px; }
.wallpaper { margin: 0 auto 24px; }
.wallpaper img {
  display: block;
  margin: 0 auto;
  width: min(100%, 240px);
  height: auto;
  max-height: 46vh;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 60px var(--shadow);
  background: var(--surface);
}
.hero-wallpaper .app-icon { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 14px; }
.hero-wallpaper h1 { font-size: clamp(30px, 6vw, 40px); }

/* ---------- Randomizer's web tools (/randomizer/<tool>, hub epic 1110, direction «Mix») ----------
   The app's look: each tool in its own colour field with a large result, the App Store strip under
   the field. Light: the tool's field with white text (ink on the amber coin). Dark: the tool's deep
   tint with its bright accent, as the app does. Press states follow the hub's IF-1/IF-2: the fill
   shifts 15 % toward the label colour and scales to 0.97, 0.1 s in, 0.2 s back; chips darken;
   nothing fades; no glass. Focus: a 2 px ring 3 px out, ink on the page, the field's text colour on
   the field. Text case comes from CSS, never typed in capitals. */

.rz-c-number { --f: #4A3AE8; --f-on: #FFFFFF; --f-bright: #A9A0FF; --f-deep: #15113F; }
.rz-c-dice   { --f: #D4361B; --f-on: #FFFFFF; --f-bright: #FF8266; --f-deep: #3A0F07; }
.rz-c-coin   { --f: #FFB81C; --f-on: #1D1500; --f-bright: #FFC53D; --f-deep: #332400; }
.rz-c-wheel  { --f: #0A7D57; --f-on: #FFFFFF; --f-bright: #3FDCA6; --f-deep: #05281C; }
.rz-c-teams  { --f: #C81E66; --f-on: #FFFFFF; --f-bright: #FF86B6; --f-deep: #3B0A20; }

/* Colour roles, worked out where the tool's colours are known (dark is the site's default). */
.rzc {
  --fld: var(--f-deep);
  --on: #FFFFFF;
  --acc: var(--f-bright);
  --accfg: var(--f-deep);
  --soft: rgba(255, 255, 255, 0.12);
  --on2: rgba(255, 255, 255, 0.80);
  --ring: var(--f-bright);
  --press: rgba(255, 255, 255, 0.22);
  --card: rgba(255, 255, 255, 0.08);
  --card-ink: #FFFFFF;
  --card-head: var(--f-bright);
}
@media (prefers-color-scheme: light) {
  .rzc {
    --fld: var(--f);
    --on: var(--f-on);
    --acc: var(--f-on);
    --accfg: var(--f);
    --soft: rgba(0, 0, 0, 0.16);
    --on2: var(--f-on);
    --ring: var(--f-on);
    --press: rgba(0, 0, 0, 0.28);
    --card: #FFFFFF;
    --card-ink: #111114;
    --card-head: var(--f);
  }
  /* The coin's field is amber with ink text: its inner boxes darken a little less. */
  .rzc.rz-c-coin, .rz-c-coin .rzc {
    --soft: rgba(29, 21, 0, 0.10);
    --on2: rgba(29, 21, 0, 0.78);
    --press: rgba(29, 21, 0, 0.20);
  }
}

body.rz { padding: 0; }
.rz [hidden] { display: none !important; }
.rz .rz-paper { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.rz footer { padding-bottom: 64px; }
/* Footer links are touch targets here: at least 44 px tall. */
.rz footer nav { gap: 4px 20px; }
.rz footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

.rz-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.rz :focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.rz-field :focus-visible { outline-color: var(--ring); }
.rz-field:focus { outline: none; }

.rz-skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
}
.rz-skip:focus { top: 8px; }

/* Top bar: the app, then the five tool tabs. */
.rz-bar { border-bottom: 1px solid var(--border); }
.rz-bar-in { max-width: 1040px; margin: 0 auto; padding: 8px 16px 4px; display: flex; flex-direction: column; gap: 2px; }
.rz-brand {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.rz-brand img { width: 28px; height: 28px; border-radius: 7px; }
/* One row; on a narrow phone at large text sizes it scrolls sideways instead of wrapping. The
   padding keeps the focus ring inside the scroller. */
.rz-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 6px 16px 8px;
  scrollbar-width: none;
}
.rz-tabs::-webkit-scrollbar { display: none; }
.rz-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s, transform 0.2s;
}
.rz-tab i { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.rz-tab[aria-current="page"] { background: var(--fld); color: var(--on); box-shadow: inset 0 0 0 2px var(--text); }
.rz-tab[aria-current="page"] i { background: var(--on); }
.rz-tab:active, .rz-tab.is-pressed { background: var(--surface-hi); transform: scale(0.97); transition-duration: 0.1s; }
.rz-tab[aria-current="page"]:active, .rz-tab[aria-current="page"].is-pressed { background: color-mix(in srgb, var(--fld) 85%, var(--on)); }
@media (prefers-color-scheme: light) { .rz-tab i { background: var(--f); } }
@media (max-width: 600px) { .rz-tab i { display: none; } .rz-tab { padding: 0 10px; } .rz-tabs { gap: 6px; } }

/* The colour field */
.rz-field { background: var(--fld); color: var(--on); scroll-margin-top: 0; }
.rz-field-in { max-width: 1040px; margin: 0 auto; padding: 22px 20px 26px; display: flex; flex-direction: column; gap: 14px; }
.rz-field h1 { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 6px; }
.rz-lead { color: var(--on2); font-size: 16px; line-height: 1.45; margin: 0; }
.rz-ctl { display: flex; flex-direction: column; gap: 12px; }
.rz-round { font-family: ui-rounded, 'SF Pro Rounded', 'SF Compact Rounded', -apple-system, BlinkMacSystemFont, sans-serif; }

/* The main button: 19 px bold, so the pressed fill keeps at least 3 : 1. */
.rz-main {
  display: block;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 28px;
  background: var(--acc);
  color: var(--accfg);
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s, transform 0.2s;
}
@media (hover: hover) { .rz-main:hover { background: color-mix(in srgb, var(--acc) 92%, var(--accfg)); } }
.rz-main:active, .rz-main.is-pressed { background: color-mix(in srgb, var(--acc) 85%, var(--accfg)); transform: scale(0.97); transition-duration: 0.1s; }
.rz-main[aria-disabled="true"] { background: var(--soft); color: var(--on2); cursor: not-allowed; transform: none; }

/* Chips, steppers, toggles: darker than the field, darker still while pressed. */
.rz-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.rz-chip, .rz-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 24px;
  background: var(--soft);
  color: var(--on);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s;
}
.rz-chip:active, .rz-chip.is-pressed { background: var(--press); transition-duration: 0.1s; }
.rz-stepper { padding: 0 2px 0 16px; gap: 4px; cursor: default; }
.rz-stepper-label { margin-right: 4px; }
.rz-step {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: var(--soft);
  color: var(--on);
  font: inherit;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s;
}
.rz-step:active, .rz-step.is-pressed { background: var(--press); transition-duration: 0.1s; }
.rz-step[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.rz-val { min-width: 28px; text-align: center; font-weight: 700; border-radius: 6px; }

/* Text boxes: a real field with a visible label, darker than the field. */
.rz-box { background: var(--soft); border-radius: 16px; padding: 10px 14px 12px; }
.rz-box:focus-within { outline: 2px solid var(--ring); outline-offset: 3px; }
.rz-box textarea:focus-visible { outline: none; }
.rz-label { display: block; font-size: 13px; font-weight: 700; color: var(--on2); text-transform: uppercase; letter-spacing: 0.03em; }
.rz-box textarea {
  display: block;
  width: 100%;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on);
  font: inherit;
  font-size: 17px;
  line-height: 1.55;
  resize: none;
  overflow-y: auto;
}
.rz-box textarea::placeholder { color: var(--on); opacity: 0.6; }
.rz-disclose {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  color: var(--on);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s;
}
.rz-disclose:active, .rz-disclose.is-pressed { background: var(--press); transition-duration: 0.1s; }
.rz-need { margin: -4px 0 0; font-size: 15px; font-weight: 700; color: var(--on); text-align: center; }

/* The stage: the result. Its height is reserved from the first load, so nothing moves. */
.rz-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.rz-idle { margin: 0; color: var(--on2); font-size: 17px; font-weight: 650; }
.rz-cap { margin: 0; color: var(--on2); font-size: 14px; font-weight: 600; }
.rz-after { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 48px; }
.rz-hint { margin: 2px 0 0; text-align: center; color: var(--on2); font-size: 13px; }
.rz-hint kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; border: 1px solid var(--on2); border-radius: 5px; padding: 1px 6px; }
@media (max-width: 600px) { .rz-hint { display: none; } }

@keyframes rz-pop { from { transform: scale(0.94); } to { transform: none; } }
.rz-pop { animation: rz-pop 0.22s ease-out; }

/* Teams */
.rz-stage-teams { justify-content: flex-start; min-height: 48px; }
.rz-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; text-align: left; }
.rz-team { background: var(--card); color: var(--card-ink); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.rz-team h2 { margin: 0 0 4px; font-size: 14px; font-weight: 800; color: var(--card-head); text-transform: uppercase; letter-spacing: 0.04em; }
.rz-team ul { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }

/* A large result in the field's accent; the case comes from CSS. */
.rz-big { margin: 0; color: var(--acc); font-size: 76px; font-weight: 900; line-height: 0.95; letter-spacing: -0.02em; }
.rz-up { text-transform: uppercase; }
.rz-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; }
.rz-ctl .rz-after-in { min-height: 0; }

/* Fields in a row, a toggle chip, an error line under the fields. */
.rz-inrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rz-field-box { padding: 6px 14px 8px; }
.rz-field-box input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.rz-field-box input:focus-visible { outline: none; }
.rz-box.is-err { box-shadow: inset 0 0 0 2px var(--on); }
.rz-err { display: flex; gap: 8px; align-items: center; margin: -2px 0 0; color: var(--on); font-size: 15px; font-weight: 700; }
.rz-err-i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--on); color: var(--fld); font-size: 13px; }
.rz-toggle { gap: 10px; }
.rz-knob { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; }
.rz-toggle[aria-pressed="true"] { background: var(--on); color: var(--fld); }
.rz-toggle[aria-pressed="true"] .rz-knob { background: currentColor; }
.rz-toggle[aria-pressed="true"]:active, .rz-toggle[aria-pressed="true"].is-pressed { background: color-mix(in srgb, var(--on) 85%, var(--fld)); }

/* Random Number Generator: the slot keeps its height whatever the row of numbers. */
.rz-slot-number { height: 132px; overflow: hidden; }
.rz-slot-number .rz-idle { font-size: 22px; font-weight: 700; }
.rz-nums { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.1em 0.45em; max-width: 100%; line-height: 1; }
.rz-nums span { white-space: nowrap; }
.rz-nums.n1 { font-size: 120px; }
.rz-nums.n2 { font-size: 88px; }
.rz-nums.n3 { font-size: 60px; }
.rz-nums.n4 { font-size: 40px; }
.rz-nums.n5 { font-size: 28px; }
.rz-nums.n6 { font-size: 20px; }

/* Dice Roller: the total over one row of dice; the slot keeps its height for any die and count. */
.rz-stage-dice { gap: 0; }
.rz-slot-dice { gap: 12px; }
.rz-total { display: flex; align-items: center; justify-content: center; height: 88px; margin: 0; }
.rz-total .rz-idle { font-size: 22px; font-weight: 700; }
.rz-total .rz-big { font-size: 88px; }
.rz-dice { --n: 2; --g: 10px; display: flex; justify-content: center; align-items: center; gap: var(--g); width: 100%; height: 96px; }
.rz-dice .die { flex: none; width: min(96px, (100% - (var(--n) - 1) * var(--g)) / var(--n)); height: auto; overflow: visible; }
.rz-dice .face { fill: var(--acc); stroke: var(--acc); stroke-width: 8; stroke-linejoin: round; }
.rz-dice .lip { fill: rgba(0, 0, 0, 0.18); stroke: rgba(0, 0, 0, 0.18); stroke-width: 8; stroke-linejoin: round; }
.rz-dice rect.face, .rz-dice rect.lip { stroke: none; }
.rz-dice .pip, .rz-dice .num { fill: var(--fld); }
.rz-dice .num { font-family: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 900; }
.rz-dice .is-blank { opacity: 0.45; }
@keyframes rz-tumble { 0% { transform: rotate(-9deg) translateY(-3px); } 50% { transform: rotate(8deg) translateY(2px); } 100% { transform: rotate(-9deg) translateY(-3px); } }
.rz-dice.is-rolling .die { animation: rz-tumble 0.15s linear infinite; }
.rz-dice.is-rolling .die:nth-child(even) { animation-direction: reverse; }
.rz-select { gap: 4px; padding-right: 14px; }
.rz-select:has(select:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; }
.rz-select select {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0 4px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.rz-select select:focus-visible { outline: none; }
.rz-select option { color: #111114; background: #FFFFFF; }

/* Coin Flip: a full-colour coin from the first load; heads is the star, tails the 1. */
.rz-stage-coin { gap: 8px; }
.rz-coin { width: 168px; height: 168px; }
.rz-coin svg { display: block; width: 100%; height: 100%; }
.rz-coin .disc { fill: var(--acc); }
.rz-coin .mark { fill: var(--fld); stroke: var(--fld); }
.rz-coin .tails { fill: var(--fld); font-family: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 50px; font-weight: 900; }
.rz-coin[data-face="heads"] .tails, .rz-coin[data-face="tails"] .mark { display: none; }
@keyframes rz-flip { 0% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-28px) rotateX(900deg); } 100% { transform: translateY(0) rotateX(1800deg); } }
.rz-coin.is-flipping { animation: rz-flip 0.6s cubic-bezier(0.3, 0.6, 0.4, 1); }
.rz-slot-coin { height: 80px; }
.rz-slot-coin .rz-idle { font-size: 24px; font-weight: 750; }
.rz-slot-coin .rz-big { font-size: 76px; }
.rz-after-coin { gap: 8px; }
.rz-count { margin: 0; color: var(--on2); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Spin the Wheel: one fixed size, the slices turn under a fixed pointer. */
.rz-stage-wheel { gap: 4px; }
.rz-slot-wheel { height: 78px; }
.rz-slot-wheel .rz-idle { font-size: 22px; font-weight: 700; }
.rz-slot-wheel .rz-big { font-size: 46px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-slot-wheel .rz-big.rz-long { font-size: 32px; }
.rz-wheel { width: 230px; height: 244px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rz-wheel svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rz-wheel { --w0: var(--f-bright); --w1: #1F8E6A; --w2: #2FB386; --wl: #05281C; }
@media (prefers-color-scheme: light) { .rz-wheel { --w0: #FFFFFF; --w1: #BDE8D7; --w2: #DDF2E9; --wl: #0A3D2B; } }
.rz-wheel .s0 { fill: var(--w0); }
.rz-wheel .s1 { fill: var(--w1); }
.rz-wheel .s2 { fill: var(--w2); }
.rz-wheel text { fill: var(--wl); font-weight: 650; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.rz-wheel .hub { fill: var(--fld); }
.rz-wheel .pointer { fill: var(--acc); stroke: var(--fld); stroke-width: 2; stroke-linejoin: round; }
.rz-remove { max-width: 100%; }
.rz-remove { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 48px; }

/* Under the field: the app strip, the text, the other tools */
.rz-strip {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px 14px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.rz-strip-icon { width: 56px; height: 56px; border-radius: 13px; border: 1px solid var(--border); }
.rz-strip-t { margin: 0; font-weight: 700; line-height: 1.3; }
.rz-strip-s { margin: 2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.rz-strip .store-badge { grid-column: 1 / -1; justify-self: start; }
.rz-strip .store-badge:hover { transform: none; opacity: 1; }
.rz-strip .store-badge:focus-visible { outline-offset: 3px; }
@media (min-width: 700px) { .rz-strip { grid-template-columns: 56px 1fr auto; } .rz-strip .store-badge { grid-column: auto; } }
.rz-text { padding: 28px 0 0; max-width: 40em; }
.rz-text h2, .rz-more h2 { font-size: 22px; letter-spacing: -0.015em; margin: 0 0 10px; }
.rz-text p { margin: 0 0 14px; }
.rz-more { margin-top: 30px; }

.rz-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rz-tiles .wide { grid-column: 1 / -1; }
.rz-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 112px;
  padding: 14px 16px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--fld);
  color: var(--acc);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rz-tile b { position: relative; z-index: 1; max-width: 8em; font-size: 17px; line-height: 1.2; }
.rz-tile:active, .rz-tile.is-pressed { transform: scale(0.97); box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.16); transition-duration: 0.1s; }
.rz-tile:focus-visible { outline-color: var(--text); }
.tile-art { position: absolute; right: 12px; top: 12px; line-height: 1; }
.tile-art svg { display: block; }
.tile-num { font-size: 40px; font-weight: 900; font-family: ui-rounded, 'SF Pro Rounded', -apple-system, sans-serif; top: 8px; }
.tile-dots { display: grid; grid-template-columns: repeat(4, 14px); gap: 2px; top: 14px; }
.tile-dots i { width: 14px; height: 14px; border-radius: 50%; background: currentColor; }
.rz-tile .die .face, .rz-tile .coin .disc { fill: var(--acc); }
.rz-tile .die .lip { fill: rgba(0, 0, 0, 0.18); }
.rz-tile .die .pip, .rz-tile .coin .mark { fill: var(--fld); stroke: var(--fld); }
.rz-tile .wheel-mini .s0 { fill: var(--acc); }
.rz-tile .wheel-mini .s1 { fill: color-mix(in srgb, var(--acc) 70%, var(--fld)); }
.rz-tile .wheel-mini .hub { fill: var(--fld); }
@media (min-width: 700px) { .rz-tiles { grid-template-columns: repeat(4, 1fr); } .rz-tiles .wide { grid-column: auto; } }

/* /randomizer: «Try it in your browser», one wide tile, then two by two at every width (M20–M22). */
.rz-try { margin: 8px 0 0; }
.rz-try h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.rz-try p { margin: 0 0 16px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.rz-try .rz-tiles { grid-template-columns: 1fr 1fr; }
.rz-try .rz-tiles .wide { grid-column: 1 / -1; }
@media (min-width: 700px) { .rz-try h2 { font-size: 24px; } .rz-try p { font-size: 16px; } }

/* Desktop: text and controls left, the result right, the app strip under the field. */
@media (min-width: 900px) {
  .rz-bar-in { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 24px; }
  .rz-tabs { margin: 0; padding: 6px 4px; overflow: visible; }
  .rz-field-in {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "side stage" "ctl stage" ". after";
    align-items: center;
    gap: 20px 56px;
    padding: 56px 24px 60px;
  }
  .rz-side { grid-area: side; align-self: end; }
  .rz-ctl { grid-area: ctl; align-self: start; max-width: 420px; }
  .rz-stage { grid-area: stage; }
  .rz-after { grid-area: after; }
  .rz-field h1 { font-size: 46px; }
  .rz-lead { font-size: 19px; }
  .rz-chips { justify-content: flex-start; }
  .rz-hint, .rz-need { text-align: left; }
  .rz-stage-teams { align-self: start; justify-content: center; min-height: 260px; }
  .rz-ctl .rz-after { justify-content: flex-start; }
  .rz-slot-wheel { height: 110px; }
  .rz-slot-number { height: 300px; }
  .rz-total { height: 128px; }
  .rz-slot-coin { height: 110px; }
  .rz-slot-coin .rz-big { font-size: 100px; }
  .rz-stage-coin { align-self: end; }
  .rz-after-coin { align-self: start; }
  .rz-total .rz-big { font-size: 128px; }
  .rz-dice { --g: 14px; height: 120px; }
  .rz-dice .die { width: min(120px, (100% - (var(--n) - 1) * var(--g)) / var(--n)); }
  .rz-nums.n1 { font-size: 160px; }
  .rz-nums.n2 { font-size: 112px; }
  .rz-nums.n3 { font-size: 76px; }
  .rz-nums.n4 { font-size: 52px; }
  .rz-nums.n5 { font-size: 36px; }
  .rz-nums.n6 { font-size: 26px; }
  .rz-slot-wheel .rz-big { font-size: 64px; }
  .rz-slot-wheel .rz-big.rz-long { font-size: 44px; }
  .rz-wheel { width: 300px; height: 318px; }
}

@media (prefers-reduced-motion: reduce) {
  .rz *, .rz *::before, .rz *::after { animation: none !important; transition: none !important; }
  .rz-main:active, .rz-main.is-pressed, .rz-tab:active, .rz-tab.is-pressed, .rz-tile:active, .rz-tile.is-pressed { transform: none; }
}
