:root {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-solid: #ffffff;
  --panel-field: #f8fafc;
  --line: #dfe7f1;
  --line-strong: #d8e0ea;
  --text: #172033;
  --muted: #66758a;
  --soft: #94a3b8;
  --blue: #2e6ef6;
  --green: #077a56;
  --gold: #f4ad2a;
  --danger: #ff6b6b;
  --shadow: 0 18px 42px rgba(11, 19, 36, 0.1);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Coin flip PC prototype */
.coin-app { min-height: 100dvh; background: #f6f8fb; color: #111827; font-family: "Noto Sans SC", Inter, system-ui, sans-serif; }
.coin-header { position: relative; z-index: 20; height: 64px; padding: 0 28px; border-bottom: 1px solid #dfe5ed; background: #fff; display: flex; align-items: center; }
.coin-brand { width: 90px; color: #111827; font-size: 22px; font-weight: 700; text-decoration: none; }
.coin-header nav { height: 64px; display: flex; align-items: stretch; margin-left: 18px; }
.coin-header nav a { position: relative; width: 72px; display: grid; place-items: center; color: #63748b; font-size: 14px; text-decoration: none; }
.coin-header nav a.active { color: #ff477e; font-weight: 700; }
.coin-header nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 2px; background: #ff477e; }
.coin-header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.coin-header-actions > i { width: 1px; height: 20px; background: #d8e0ea; }
.coin-header-actions button { padding: 0; border: 0; background: transparent; color: #475467; }
.coin-header-results { width: 96px; height: 30px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #475467; font-size: 13px; text-decoration: none; }
.coin-header-results .icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.coin-theme-switch { width: 56px; height: 26px; padding: 2px !important; border: 1px solid #d8e0ea !important; border-radius: 6px; background: #f8fafc !important; display: flex; }
.coin-theme-switch span { width: 26px; height: 22px; border-radius: 5px; display: grid; place-items: center; }
.coin-theme-switch span.active { background: #e8eef5; }
.coin-theme-switch .icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
body.is-dark .coin-app, body.is-dark .random-prototype { background: #070b12; color: #f1f7ff; }
body.is-dark .coin-header, body.is-dark .random-header { border-color: #263247; background: #0d1420; }
body.is-dark .coin-brand, body.is-dark .wheel-header-brand { color: #f1f7ff; }
body.is-dark .coin-header nav a, body.is-dark .wheel-header-nav > a { color: #8fa1b5; }
body.is-dark .coin-header nav a.active, body.is-dark .wheel-header-nav > a.active { color: #ff477e; }
body.is-dark .coin-theme-switch, body.is-dark .wheel-header-actions .theme-switch { border-color: #334155 !important; background: #111b2a !important; }
body.is-dark .coin-theme-switch span.active, body.is-dark .wheel-header-actions .theme-switch span.active { background: #263445; color: #f1f7ff; }
body.is-dark .coin-count, body.is-dark .coin-workspace-settings, body.is-dark .workspace-quantity, body.is-dark .random-result-surface { border-color: #334155; background: #0d1420; color: #f1f7ff; }
body.is-dark .coin-intro p, body.is-dark .coin-count > span, body.is-dark .random-meta > span, body.is-dark .random-meta > small { color: #8fa1b5; }
body.is-dark .coin-drawer { border-color: #334155; background: #0d1420; color: #f1f7ff; }
.coin-workspace { position: relative; min-height: calc(100dvh - 64px); overflow: hidden; }
.coin-workspace-settings { position: absolute; z-index: 4; right: 64px; top: 28px; width: 40px; height: 40px; padding: 0; border: 1px solid #d8e0ea; border-radius: 7px; background: #fff; color: #63748b; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.coin-workspace-settings .icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.workspace-tools { position: absolute; z-index: 4; right: 64px; top: 28px; display: flex; align-items: center; gap: 10px; }
.workspace-tools .coin-workspace-settings { position: static; }
.workspace-quantity { height: 40px; min-width: 116px; padding: 0 16px; border: 1px solid #d8e0ea; border-radius: 7px; background: #fff; color: #334155; font-size: 13px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.random-settings-control { display: flex; align-items: center; }
.random-settings-control .workspace-quantity { border-radius: 7px 0 0 7px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.random-settings-control .coin-workspace-settings { margin-left: -1px; border-radius: 0 7px 7px 0; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.coin-intro { position: absolute; left: 64px; top: 27px; }
.coin-intro h1 { margin: 0; font-size: 28px; line-height: 42px; }
.coin-intro p { margin: 2px 0 0; color: #63748b; font-size: 14px; line-height: 30px; }
.coin-counts { position: absolute; left: 50%; top: 133px; display: flex; gap: 24px; transform: translateX(-50%); }
.coin-count { width: 176px; height: 48px; padding: 0 14px 0 12px; border: 1px solid #dfe5ed; border-radius: 8px; background: #fff; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; }
.coin-count > span { color: #63748b; font-size: 12px; }
.coin-count > strong { font-size: 16px; }
.coin-object { position: absolute; left: 50%; top: 298.25px; width: 319px; height: 275.5px; padding: 0; border: 0; background: transparent; perspective: 900px; transform: translateX(-50%); transform-origin: center top; }
.coin-flipper { width: 319px; height: 275.5px; display: block; position: relative; transform-origin: center; will-change: transform; filter: drop-shadow(0 17.4px 13.05px rgba(64,71,87,.14)); }
.coin-visual { position: relative; display: inline-block; }
.coin-visual--large { width: 319px; height: 275.5px; }
.coin-layer { position: absolute; display: block; pointer-events: none; }
.coin-visual--large .coin-layer--side { left: 0; top: 26.1px; }
.coin-visual--large .coin-layer.coin-style-side { width: 319px; height: 249.4px; filter: none; }
.coin-visual--large .coin-layer--rim { left: 0; top: 11.6px; }
.coin-visual--large .coin-layer--face { left: 7.25px; top: 0; }
.coin-visual--large .coin-layer.coin-style-face { width: 304.5px; height: 240.7px; filter: none; }
.coin-visual--large .coin-layer--emboss { left: 41.47px; top: 31.29px; }
.coin-visual--large .coin-layer--gloss { left: 51.04px; top: 21.66px; }
.coin-visual--large .coin-layer { filter: var(--coin-surface-filter, none); }
.coin-visual--large .coin-mark { position: absolute; left: 0; top: 67.393px; width: 319px; height: 101.094px; display: grid; place-items: center; color: #7b4b0b; font-size: 79.75px; font-weight: 400; line-height: 1; }
.coin-preview { position: relative; display: inline-block; width: 62px; height: 58px; flex: 0 0 auto; }
.coin-preview img { position: absolute; display: block; }
.coin-preview .preview-side { left: 6px; top: 2px; }
.coin-preview .preview-face { left: 0; top: 0; }
.coin-preview .preview-emboss { left: 6px; top: 6px; }
.coin-preview .preview-gloss { left: 7px; top: 5px; }
.coin-preview b { position: absolute; left: 0; top: 0; width: 56px; height: 56px; display: grid; place-items: center; font-family: Inter, sans-serif; font-weight: 600; }
.coin-count .coin-preview { width: 33px; height: 30px; transform: scale(.5283); transform-origin: left top; margin-right: -15px; }
.coin-backdrop { position: fixed; z-index: 30; inset: 64px 0 0; background: rgba(17,24,39,.28); }
.coin-drawer { position: fixed; z-index: 31; right: 16px; top: 80px; width: 488px; height: calc(100dvh - 96px); min-height: 620px; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(15,23,36,.14); }
.coin-drawer-title { height: 74px; padding: 0 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
.coin-drawer-title h2 { margin: 0; font: 600 20px/28px Inter, sans-serif; }
.coin-drawer-title > button:last-child { width: 32px; height: 32px; padding: 6px; border: 0; background: transparent; color: #63748b; }
.coin-drawer-title .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.coin-style-grid { padding: 0 14px; display: grid; grid-template-columns: repeat(2, 222px); gap: 14px 12px; }
.coin-style-option { height: 158px; padding: 18px 0 12px; border: 1px solid #d8e0ea; border-radius: 6px; background: #fbfcfe; color: #1f2937; display: grid; justify-items: center; align-content: start; gap: 24px; }
.coin-style-option > span { display: flex; gap: 16px; }
.coin-style-option strong { font: 500 14px/20px Inter, sans-serif; }
.coin-style-option.selected { border: 2px solid #ff477e; background: #fff8fa; }
.coin-style-option.selected strong { font-weight: 600; }
.coin-drawer-footer { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; padding: 17px 19px 25px; border-top: 1px solid #e2e8f0; background: #fff; }
.coin-toss-primary { width: 100%; height: 54px; border: 0; border-radius: 6px; background: #ff477e; color: #fff; font: 600 15px/21px Inter, sans-serif; }
.coin-results-title { grid-template-columns: 1fr 92px 32px; gap: 12px; }
.coin-results-title h2 { text-align: center; padding-left: 106px; }
.coin-results-title .coin-clear { width: auto; height: 36px; padding: 0 6px; border: 0; background: transparent; color: #64748b; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.coin-results-title .coin-clear .icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.coin-results-list { width: 100%; min-width: 0; height: calc(100% - 164px); padding: 10px 19px; overflow: auto; display: grid; align-content: start; gap: 10px; }
.coin-result-row { width: 100%; min-width: 0; height: 60px; padding: 0 14px 0 10px; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 6px; background: #f8fafc; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; }
.coin-result-row .coin-preview { transform: scale(.5283); transform-origin: left center; margin-right: -29px; }
.coin-result-row strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.coin-result-row time { color: #63748b; font-size: 12px; }
.coin-results-empty { height: 200px; display: grid; place-items: center; color: #63748b; font-size: 13px; }
.coin-results-actions { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; padding: 18px 19px; border-top: 1px solid #e2e8f0; background: #fff; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.coin-results-actions button { height: 54px; border: 1px solid #d8e0ea; border-radius: 6px; background: #fff; color: #63748b; font-size: 13px; }
.coin-results-actions .coin-export { border-color: #ff477e; background: #ff477e; color: #fff; font-size: 16px; font-weight: 700; }
.feedback-toast { position: fixed; z-index: 50; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 12px 20px; border-radius: 6px; background: #111827; color: #fff; font-size: 14px; box-shadow: 0 12px 28px rgba(15,23,36,.2); }

@media (max-width: 900px) {
  .coin-header nav { display: none; }
  .coin-intro { left: 24px; }
  .coin-counts { left: 50%; right: auto; }
  .coin-count { width: min(176px, calc((100vw - 60px)/2)); }
  .coin-object { left: 50%; top: 310px; transform: translateX(-50%) scale(.86); }
  .coin-drawer { right: 8px; width: min(488px, calc(100vw - 16px)); }
  .coin-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

/* Keep crawlable supporting content below the fold until the wheel mounts. */
#app:empty {
  min-height: 100dvh;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

.site-footer { border-top: 1px solid #e2e8f0; background: #fff; color: #667085; font-family: var(--font); }
.site-footer-inner { width: min(1312px, calc(100% - 128px)); min-height: 210px; margin: 0 auto; padding: 44px 0 32px; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 34px 64px; }
.site-footer-brand a { color: #111827; font-size: 22px; font-weight: 800; text-decoration: none; }
.site-footer-brand p { margin: 10px 0 0; color: #667085; font-size: 13px; line-height: 22px; }
.site-footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 28px; padding-top: 5px; }
.site-footer-nav a { color: #475467; font-size: 13px; font-weight: 500; text-decoration: none; }
.site-footer-nav a:hover { color: #ff477e; }
.site-footer-meta { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid #e8edf3; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #98a2b3; font-size: 12px; line-height: 20px; }
body.is-dark .site-footer { border-color: #263247; background: #0d1420; }
body.is-dark .site-footer-brand a { color: #f1f7ff; }
body.is-dark .site-footer-brand p, body.is-dark .site-footer-nav a { color: #8fa1b5; }
body.is-dark .site-footer-meta { border-color: #263247; color: #637388; }

@media (max-width: 760px) {
  .site-footer-inner { width: calc(100% - 48px); padding: 36px 0 28px; grid-template-columns: 1fr; gap: 28px; }
  .site-footer-nav { justify-content: flex-start; padding-top: 0; gap: 12px 22px; }
  .site-footer-meta { grid-column: 1; align-items: flex-start; flex-direction: column; gap: 6px; }
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  background: var(--bg);
}

.app.is-dark,
body.is-dark {
  --bg: #070b12;
  --surface: rgba(13, 20, 32, 0.94);
  --surface-solid: #0d1420;
  --panel-field: #090f19;
  --line: #263247;
  --line-strong: #334155;
  --text: #f1f7ff;
  --muted: #8fa1b5;
  --soft: #637388;
  --shadow: 0 18px 42px rgba(11, 19, 36, 0.35);
}

.page-info { background: #fff; color: #111827; }

.is-results-view .page-info {
  display: none;
}

.seo-section { min-height: 1040px; padding: 64px; font-family: Inter, "Noto Sans SC", system-ui, sans-serif; }
.seo-inner { width: min(1312px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.seo-intro { height: 300px; display: grid; grid-template-columns: 600px 648px; gap: 64px; overflow: hidden; }
.seo-copy { width: 600px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.seo-eyebrow { color: #ff477e; font-size: 12px; font-weight: 600; line-height: 24px; }
.seo-copy h1 { margin: 0; color: #111827; font-size: 32px; font-weight: 700; line-height: 39px; letter-spacing: 0; }
.seo-section p { margin: 0; color: #667085; }
.seo-copy .seo-primary { color: #475467; font-size: 16px; line-height: 22px; }
.seo-copy .seo-secondary { font-size: 14px; line-height: 28px; }
.seo-visual { position: relative; width: 648px; height: 300px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; }
.seo-visual-label { position: absolute; z-index: 5; left: 19px; top: 15px; color: #667085; font-size: 12px; line-height: 18px; }
.seo-cases h2, .seo-faq h2 { margin: 0; color: #111827; font-size: 26px; font-weight: 700; line-height: 34px; letter-spacing: 0; }
.seo-faq h2 a { color: inherit; text-decoration: none; }
.seo-cases { display: flex; flex-direction: column; gap: 18px; }
.seo-case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.seo-case { min-height: 80px; display: grid; grid-template-columns: 4px 1fr; gap: 16px; }
.seo-case::before { content: ""; width: 4px; height: 80px; border-radius: 2px; background: #ff477e; }
.seo-case:nth-child(2)::before { background: #14b8a6; }
.seo-case:nth-child(3)::before { background: #f59e0b; }
.seo-case h3 { margin: 0 0 8px; color: #111827; font-size: 16px; line-height: 22px; }
.seo-case p { font-size: 14px; line-height: 24px; }
.seo-faq { display: flex; flex-direction: column; }
.seo-faq h2 { margin-bottom: 10px; line-height: 42px; }
.seo-faq-row { min-height: 84px; padding: 12px 0 11px; border-bottom: 1px solid #e8edf3; }
.seo-faq-row h3 { margin: 0; color: #111827; font-size: 15px; font-weight: 700; line-height: 24px; }
.seo-faq-row p { font-size: 13px; line-height: 30px; }
.seo-wheel-disc { position: absolute; left: 178px; top: 47px; width: 213px; height: 213px; }
.seo-wheel-pointer { position: absolute; z-index: 2; left: 276px; top: 39px; width: 18px; height: 34px; }
.seo-wheel-spin { position: absolute; z-index: 3; left: 249px; top: 118px; width: 72px; height: 72px; border: 4px solid #fff; border-radius: 50%; background: #ff477e; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(17,24,39,.18); }
.seo-wheel-winner { position: absolute; z-index: 4; left: 346px; top: 158px; width: 184px; height: 70px; padding: 12px 16px; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.16); text-align: center; }
.seo-wheel-winner small { display: block; color: #ff477e; font-size: 8px; font-weight: 700; line-height: 12px; }
.seo-wheel-winner strong { color: #111827; font-size: 14px; line-height: 22px; }
.seo-number-grid { position: absolute; left: 58px; top: 54px; width: 530px; height: 215px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seo-number-cell { position: relative; border: 1px solid #e8edf3; border-radius: 4px; background: #f8fafc; display: grid; place-items: center; color: #ff477e; font-size: 24px; font-weight: 700; }
.seo-number-cell small { position: absolute; left: 8px; top: 6px; color: #98a2b3; font-size: 9px; font-weight: 500; }
.seo-coin-mini { position: absolute; left: 200px; top: 55px; width: 319px; height: 275.5px; transform: scale(.78); transform-origin: left top; filter: drop-shadow(0 12px 10px rgba(64,71,87,.14)); }
.seo-coin-mini img { position: absolute; display: block; }
.seo-coin-mini .side { left: 0; top: 26.1px; }
.seo-coin-mini .rim { left: 0; top: 11.6px; }
.seo-coin-mini .face { left: 7.25px; top: 0; }
.seo-coin-mini .emboss { left: 41.47px; top: 31.29px; }
.seo-coin-mini .gloss { left: 51.04px; top: 21.66px; }
.seo-coin-mini b { position: absolute; left: 0; top: 67px; width: 319px; height: 101px; display: grid; place-items: center; color: #7b4b0b; font-size: 80px; font-weight: 400; }

.coin-shell {
  min-height: calc(100dvh - 75px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 36px;
  padding: 32px 48px;
}

.coin-stage {
  min-width: 0;
  min-height: calc(100dvh - 139px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  align-items: center;
  padding: 16px 24px 36px;
}

.coin-counts {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 18px;
}

.coin-count {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.coin-count div {
  display: grid;
  gap: 2px;
}

.coin-count div span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.coin-count strong {
  font-size: 22px;
  line-height: 1;
}

.coin-count i {
  position: absolute;
  right: 10px;
  top: 4px;
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  opacity: 0;
}

.coin-count i.show {
  animation: coin-plus 800ms ease-out;
}

.coin-object {
  width: min(440px, 80%);
  height: min(420px, calc(100dvh - 340px));
  min-height: 280px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.coin-object:focus-visible,
.coin-flip-button:focus-visible,
.coin-style-option:focus-visible,
.coin-clear:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.coin-flipper {
  width: 319px;
  height: 275.5px;
  display: block;
  position: relative;
  transform-origin: center;
  will-change: transform, filter;
  filter: drop-shadow(0 17.4px 13.05px rgba(64, 71, 87, 0.14));
}

.coin-visual {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.coin-visual--large {
  width: 319px;
  height: 275.5px;
}

.coin-visual--small {
  width: 42px;
  height: 42px;
}

.coin-layer {
  position: absolute;
  display: block;
  pointer-events: none;
}

.coin-visual--large .coin-layer--side {
  left: 0;
  top: 26.1px;
}

.coin-visual--large .coin-layer--rim {
  left: 0;
  top: 11.6px;
}

.coin-visual--large .coin-layer--face {
  left: 7.25px;
  top: 0;
}

.coin-visual--large .coin-layer--emboss {
  left: 41.47px;
  top: 31.29px;
}

.coin-visual--large .coin-layer--gloss {
  left: 51.04px;
  top: 21.66px;
}

.coin-visual--small .coin-layer {
  inset: 0;
  width: 42px;
  height: 42px;
}

.coin-visual--small .coin-layer--face {
  left: 1px;
  width: 41px;
}

.coin-visual--small .coin-layer--emboss,
.coin-visual--small .coin-layer--gloss {
  inset: 6px;
  width: 30px;
  height: 30px;
}

.coin-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #76520a;
  font-style: normal;
  font-weight: 900;
  text-shadow: 0 1px rgba(255, 255, 255, 0.55);
}

.coin-visual--large .coin-mark {
  inset: auto;
  left: 0;
  top: 67.393px;
  width: 319px;
  height: 101.094px;
  font-family: "Noto Sans SC", var(--font);
  font-size: 79.75px;
  font-weight: 400;
  line-height: 101.094px;
  color: #7b4b0b;
}
.coin-visual--small .coin-mark { font-size: 14px; }
.coin-theme-blue .coin-layer { filter: hue-rotate(165deg) saturate(.8); }
.coin-theme-blue .coin-mark { color: #174e93; }
.coin-theme-sunmoon .coin-mark { color: #845b00; }
.coin-theme-mono .coin-layer { filter: grayscale(1) contrast(.9); }
.coin-theme-mono .coin-mark { color: #303746; }

.coin-outcome {
  min-height: 28px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.coin-flip-button {
  width: min(280px, 100%);
  height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(7, 122, 86, 0.2);
}

.coin-flip-button:hover { filter: brightness(1.06); }

.coin-panel {
  min-height: calc(100dvh - 139px);
  max-height: calc(100dvh - 107px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.coin-panel-section {
  display: grid;
  gap: 14px;
}

.coin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coin-panel-heading span {
  display: block;
  margin-bottom: 3px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.coin-panel-heading h2 {
  margin: 0;
  font-size: 16px;
}

.coin-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.coin-style-option {
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-field);
  color: var(--text);
  display: grid;
  justify-items: center;
  gap: 7px;
}

.coin-style-option > span {
  display: flex;
  gap: 2px;
}

.coin-style-option strong { font-size: 11px; }
.coin-style-option.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

.coin-history {
  min-height: 0;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr);
}

.coin-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.coin-clear .icon { width: 14px; height: 14px; }
.coin-clear:disabled { opacity: .4; cursor: default; }

.coin-history-list {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-field);
  overflow: auto;
}

.coin-history-row {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.coin-history-row:last-child { border-bottom: 0; }
.coin-history-row .coin-visual--small { width: 32px; height: 32px; }
.coin-history-row .coin-visual--small .coin-layer { width: 32px; height: 32px; }
.coin-history-row .coin-visual--small .coin-layer--emboss,
.coin-history-row .coin-visual--small .coin-layer--gloss { inset: 5px; width: 22px; height: 22px; }
.coin-history-row .coin-mark { font-size: 11px; }
.coin-history-row strong { color: var(--text); font-size: 12px; }
.coin-empty { min-height: 180px; display: grid; place-items: center; color: var(--soft); font-size: 13px; }

@keyframes coin-plus {
  0% { opacity: 0; transform: translateY(5px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-16px); }
}

@media (max-width: 760px) {
  .seo-section { min-height: 0; padding: 40px 24px 56px; }
  .seo-inner { gap: 32px; }
  .seo-intro { height: auto; grid-template-columns: 1fr; gap: 28px; overflow: visible; }
  .seo-copy { width: 100%; }
  .seo-copy h1 { font-size: 28px; line-height: 36px; }
  .seo-visual { width: 100%; max-width: 648px; height: auto; aspect-ratio: 648 / 300; justify-self: center; }
  .seo-wheel-disc { left: 27.47%; top: 15.67%; width: 32.87%; height: auto; }
  .seo-wheel-pointer { left: 42.59%; top: 13%; width: 2.78%; height: auto; }
  .seo-wheel-spin { left: 38.43%; top: 39.33%; width: 11.11%; height: auto; aspect-ratio: 1; font-size: clamp(8px, 2vw, 12px); }
  .seo-wheel-winner { left: 53.4%; top: 52.67%; width: 28.4%; height: 23.33%; padding: 2% 2.5%; }
  .seo-wheel-winner strong { font-size: clamp(9px, 2.2vw, 14px); }
  .seo-number-grid { left: 8.95%; top: 18%; width: 81.8%; height: 71.67%; padding: 2.78%; gap: 1.54%; }
  .seo-number-cell { font-size: clamp(14px, 4vw, 24px); }
  .seo-coin-mini { left: 30.86%; top: 18.33%; }
  .seo-case-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 600px) {
  .seo-coin-mini { transform: scale(.68); }
}

@media (max-width: 400px) {
  .seo-coin-mini { transform: scale(.58); }
}

.coin-header nav > .tool-menu > summary {
  width: 72px;
  height: 64px;
  padding: 0;
  border-radius: 0;
  color: #63748b;
  font-size: 14px;
}
.coin-header nav .tool-menu-content { left: 0; right: auto; text-align: left; }
.random-pc { min-height: 100dvh; background: var(--bg); }
.random-pc-body { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 80px; }
.random-pc-heading h1 { margin: 0; font-size: 28px; }
.random-pc-heading p { color: var(--muted); }
.random-range { margin-top: 44px; color: var(--muted); font-size: 14px; }
.random-range strong { margin-left: 12px; color: var(--text); }
.random-output { min-height: 260px; margin-top: 14px; padding: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; }
.random-output span { font-size: clamp(36px, 7vw, 72px); font-weight: 700; }
.random-controls { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; }
.random-controls label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.random-controls input[type="number"] { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-solid); color: var(--text); }
.random-controls .random-check { height: 42px; display: flex; flex-direction: row; align-items: center; color: var(--text); }
.random-generate { width: 100%; height: 52px; margin-top: 20px; border: 0; border-radius: 6px; background: #ff477e; color: #fff; font-size: 15px; font-weight: 700; }
@media (max-width: 700px) { .random-controls { grid-template-columns: 1fr 1fr; } }

.random-prototype { min-height: 1164px; background: #f6f8fb; color: #111827; }
.random-prototype .random-header .theme-switch { width: 56px; height: 26px; padding: 2px; }
.random-prototype .random-header .theme-switch span { width: 22px; height: 22px; font-size: 12px; }
.random-canvas { position: relative; height: 1100px; }
.random-meta { position: absolute; left: 50%; top: 32px; width: 860px; height: 80px; transform: translateX(-50%); font-family: Inter, sans-serif; display: flex; align-items: flex-start; justify-content: center; gap: 12px; }
.random-meta > span { padding-top: 8px; color: #64748b; font-size: 14px; font-weight: 500; }
.random-meta > strong { font-size: 24px; line-height: 34px; }
.random-meta > small { position: absolute; left: 50%; top: 48px; color: #94a3b8; font-size: 12px; transform: translateX(-50%); }
.random-stage { position: absolute; left: 50%; top: 112px; width: min(1416px, calc(100% - 48px)); height: 800px; transform: translateX(-50%); transform-origin: top center; }
.random-result-surface { position: absolute; left: 0; top: 42px; width: 100%; height: clamp(420px, calc(100dvh - 300px), 800px); overflow: hidden; border: 1px solid #d8e0ea; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,41,.08); font-family: Inter, sans-serif; }
.random-result-surface > div { position: absolute; inset: 24px; display: grid; place-items: center; }
.random-result-surface > div span { position: relative; color: #ff477e; font-size: 104px; line-height: 1; font-weight: 600; }
.random-result-surface > div i { display: none; }
.random-result-surface.multiple > div { inset: 0; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.random-result-surface.multiple > div span { width: 100%; height: 100%; border-right: 1px solid #edf1f6; border-bottom: 1px solid #edf1f6; display: grid; place-items: center; font-size: 40px; }
.random-result-surface.multiple > div i { position: absolute; left: 12px; top: 10px; display: block; color: #98a2b3; font-size: 10px; font-style: normal; font-weight: 500; }
.random-generate-prototype { position: absolute; left: 50%; top: calc(82px + clamp(420px, calc(100dvh - 300px), 800px)); width: 320px; height: 56px; border: 0; border-radius: 6px; background: #ff477e; color: #fff; font-family: Inter, sans-serif; font-size: 15px; font-weight: 600; transform: translateX(-50%); }
.random-generate-prototype:disabled { cursor: wait; opacity: .78; }
.random-result-surface > div.is-shuffling { filter: blur(.35px); transform: scale(.985); }
.random-result-surface > div.number-settled { animation: random-settle .32s cubic-bezier(.2,.8,.2,1); }
@keyframes random-settle { 0% { transform: scale(.94); opacity: .65; } 65% { transform: scale(1.025); } 100% { transform: scale(1); opacity: 1; } }
.random-drawer-form { padding: 12px 20px; display: grid; gap: 12px; }
.random-drawer-form label { min-height: 62px; padding: 14px 0; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.random-drawer-form label > span { color: #334155; font-size: 14px; }
.random-drawer-form label div { display: flex; align-items: center; gap: 8px; }
.random-drawer-form input[type="number"] { width: 112px; height: 38px; padding: 0 10px; border: 1px solid #d8e0ea; border-radius: 6px; }
.random-drawer-form em { color: #94a3b8; font-style: normal; }
.random-stepper { height: 38px; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 6px; gap: 0 !important; }
.random-stepper button { width: 38px; height: 100%; border: 0; background: #fff; color: #ff477e; font-size: 18px; }
.random-stepper input[type="number"] { width: 62px; height: 100%; border-width: 0 1px; border-radius: 0; text-align: center; }
.random-repeat { position: relative; }
.random-repeat input { position: absolute; opacity: 0; pointer-events: none; }
.random-repeat i { width: 42px; height: 24px; padding: 2px; border-radius: 12px; background: #cbd5e1; transition: background .2s ease; }
.random-repeat i::after { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.2); transition: transform .2s ease; }
.random-repeat input:checked + i { background: #ff477e; }
.random-repeat input:checked + i::after { transform: translateX(18px); }
.random-settings-error { min-height: 18px; margin: 0; color: #dc2626; font-size: 12px; }
.random-history-row { width: 100%; min-width: 0; max-width: 100%; height: 60px; padding: 0 14px; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 6px; background: #f8fafc; display: flex; align-items: center; gap: 14px; }
.random-history-row strong { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.random-history-row time { flex: 0 0 auto; color: #64748b; font-size: 12px; }
.random-results-title { grid-template-columns: 1fr auto 1fr; }
.random-results-title h2 { grid-column: 2; text-align: center; }
.random-results-title > button:first-child { grid-column: 1; grid-row: 1; width: max-content; border: 0; background: transparent; display: flex; align-items: center; gap: 5px; color: #64748b; font-size: 12px; }
.random-results-title > button:last-child { grid-column: 3; grid-row: 1; justify-self: end; }
.random-results-footer { position: absolute; left: 20px; right: 20px; bottom: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.random-results-footer button { height: 48px; border: 1px solid #d8e0ea; border-radius: 6px; background: #fff; color: #334155; display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; }
.random-results-footer button:last-child { border-color: #ff477e; background: #ff477e; color: #fff; }
.random-results-footer .icon, .random-results-title .icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.random-results-title .clear-icon, .coin-results-title .coin-clear .clear-icon { width: 16px; height: 16px; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.random-results-drawer .coin-results-list { padding-bottom: 84px; }
.random-copy-toast { position: fixed; left: 50%; top: 50%; z-index: 80; padding: 12px 22px; border-radius: 6px; background: rgba(15,23,42,.9); color: #fff; opacity: 0; pointer-events: none; transform: translate(-50%,-42%); transition: opacity .18s ease, transform .18s ease; }
.random-copy-toast.show { opacity: 1; transform: translate(-50%,-50%); }
@media (max-width: 980px) {
  .random-meta { left: 50%; width: calc(100% - 48px); }
  .workspace-tools { right: 24px; }
  .random-stage { transform: translateX(-50%); }
}

.header {
  height: 75px;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
  margin: 0;
}

.brand-subtitle {
  display: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.app.is-dark.has-multiple .brand-subtitle {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-menu {
  position: relative;
}

.tool-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.tool-menu summary::-webkit-details-marker {
  display: none;
}

.tool-menu summary .icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.tool-menu[open] summary .icon {
  transform: rotate(180deg);
}

.tool-menu summary:hover,
.header-results:hover,
.header-faq:hover {
  background: var(--panel-field);
}

.tool-menu summary:focus-visible,
.header-results:focus-visible,
.header-faq:focus-visible,
.theme-switch:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.tool-menu-content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 14px;
  width: min(310px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.tool-menu-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.tool-menu-column > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tool-menu-column a {
  padding: 7px 8px;
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.tool-menu-column a:hover,
.tool-menu-column a[aria-current="page"] {
  background: var(--panel-field);
}

.header-results,
.header-faq,
.theme-switch,
.small-square,
.panel-collapse,
.icon-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.header-results {
  height: 30px;
  width: 96px;
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.header-faq {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.header-faq[aria-current="page"] {
  color: var(--blue);
  font-weight: 700;
}

.faq-content {
  width: min(100% - 48px, 1060px);
  margin: 0 auto;
  padding: 48px 0 96px;
}

.faq-intro {
  max-width: 760px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.faq-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.faq-intro p,
.faq-answer p {
  color: var(--muted);
  line-height: 1.7;
}

.faq-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding-top: 36px;
}

.faq-toc {
  align-self: start;
  position: sticky;
  top: 24px;
  display: grid;
  gap: 6px;
}

.faq-toc strong {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--soft);
  text-transform: uppercase;
}

.faq-toc a {
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.faq-toc a:hover,
.faq-answer a {
  color: var(--blue);
}

.faq-section {
  scroll-margin-top: 24px;
  margin-bottom: 48px;
}

.faq-section h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.faq-answer {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.faq-answer h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.45;
}

.faq-answer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 760px) {
  .faq-content { width: min(100% - 32px, 640px); padding-top: 28px; }
  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .faq-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .faq-toc strong { flex-basis: 100%; }
  .header-faq { padding: 0 5px; }
}


.theme-switch {
  width: 64px;
  height: 30px;
  border-radius: 999px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--panel-field);
}

.theme-switch span {
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.theme-switch .icon {
  width: 14px;
  height: 14px;
}

.theme-switch .active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(11, 19, 36, 0.12);
}

.app.is-dark .theme-switch .active {
  background: #263445;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 170px;
  height: 30px;
  padding: 0 8px 0 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.account-trigger:hover {
  background: var(--panel-field);
}

.account-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.account-avatar {
  display: inline-grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-field);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.account-avatar .icon {
  width: 15px;
  height: 15px;
}

.account-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 10, 20, 0.56);
}

.auth-scrim.is-dark {
  --surface-solid: #0d1420;
  --panel-field: #090f19;
  --line: #263247;
  --line-strong: #334155;
  --text: #f1f7ff;
  --muted: #8fa1b5;
}

.auth-dialog {
  width: min(100%, 390px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(3, 8, 19, 0.24);
}

.auth-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-dialog-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
}

.auth-dialog-head button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.auth-dialog-head button:hover {
  background: var(--panel-field);
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  background: var(--panel-field);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

.auth-form input:focus {
  border-color: var(--blue);
}

.auth-submit,
.auth-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 40px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.auth-submit {
  margin-top: 4px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-google {
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  color: var(--text);
}

.google-mark {
  color: #4285f4;
  font-size: 18px;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.auth-switch button,
.auth-text-action {
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
}

.auth-text-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding: 0;
  font-size: 13px;
}

.auth-text-action .icon {
  width: 14px;
  height: 14px;
}

.auth-signout {
  display: flex;
  color: var(--muted);
}

.auth-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
}

.auth-identity .account-avatar {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.auth-identity div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.auth-identity strong,
.auth-identity div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-identity div span {
  color: var(--muted);
  font-size: 12px;
}

.auth-feedback {
  min-height: 18px;
  margin: 14px 0 0;
  color: #b23838;
  font-size: 12px;
  line-height: 18px;
}

.auth-feedback.is-success {
  color: var(--green);
}

.auth-scrim.is-dark .auth-feedback:not(.is-success) {
  color: #ff9c9c;
}

.shell {
  position: relative;
  min-height: calc(100vh - 75px);
  padding: 32px 48px;
}

.wheel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 36px;
  align-items: start;
  min-height: calc(100dvh - 139px);
  margin: 0 auto;
}

.wheel-zone {
  min-width: 0;
  min-height: calc(100dvh - 139px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wheel-zone.is-centered {
  grid-column: 1 / -1;
}

.spin-all-top {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-solid);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  margin: 0 auto 28px;
}

.wheels-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--wheel-columns), minmax(0, 1fr));
  gap: 12px 20px;
  justify-content: center;
}

.wheel-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.has-multiple .wheel-card {
  min-height: 0;
  padding: 22px 4px 48px;
  border-color: var(--line);
  background: rgba(13, 20, 32, 0.02);
}

.app.is-dark .has-multiple .wheel-card {
  background: rgba(13, 20, 32, 0.42);
}

.wheel-wrap {
  position: relative;
  width: min(100%, calc(100dvh - 180px));
  aspect-ratio: 1;
  container-type: inline-size;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(11, 19, 36, 0.08);
}

.has-multiple .wheel-wrap {
  width: min(100%, max(72px, var(--wheel-fit-height)));
}

.has-multiple .center-button {
  font-size: clamp(8px, 10cqw, 17px);
  border-width: clamp(1px, 1.2cqw, 3px);
}

.wheel-viewport {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: clip;
  contain: paint;
}

.wheel-svg,
.wheel-spin-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wheel-svg {
  display: block;
}

.wheel-spin-layer {
  transform: rotate(var(--rotation));
  backface-visibility: hidden;
  border-radius: 50%;
  pointer-events: none;
  contain: paint;
  will-change: transform;
}

.wheel-pointers,
.pointer-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel-pointers {
  z-index: 3;
}

.pointer {
  position: absolute;
  top: calc(var(--pointer-offset) * -1);
  left: 50%;
  width: var(--pointer-width);
  height: var(--pointer-height);
  transform: translateX(-50%);
  z-index: 3;
  filter: drop-shadow(0 2px 2px rgba(128, 77, 14, 0.28));
}

.pointer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f4ad2a;
  clip-path: polygon(50% 100%, 8% 0, 50% 28%, 92% 0);
}

.center-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: var(--button-size);
  height: var(--button-size);
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 249, 239, 0.85);
  border-radius: 50%;
  background: var(--gold);
  color: #111827;
  font-size: var(--button-font);
  font-weight: 800;
  box-shadow: 0 0 0 var(--glow-size) rgba(244, 173, 42, 0.35), 0 14px 28px rgba(128, 77, 14, 0.18);
}

.winner-toast {
  position: absolute;
  z-index: 10;
  left: min(44%, 420px);
  top: 296px;
  width: min(480px, calc(100vw - 72px));
  min-height: 180px;
  border: 2px solid #e5b94e;
  border-radius: 8px;
  background: #fff9ef;
  box-shadow: 0 0 16px rgba(245, 173, 41, 0.16), 0 14px 32px rgba(18, 26, 38, 0.18);
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 28px;
  align-items: center;
  padding: 34px 40px;
  animation: toast-in 360ms ease both;
}

.winner-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #66758a;
}

.winner-close:hover {
  background: rgba(23, 32, 51, 0.08);
}

.winner-close .icon {
  width: 18px;
  height: 18px;
}

.feedback-toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  animation: feedback-toast-in 240ms ease both;
}

.winner-toast strong {
  display: block;
  color: #b93846;
  font-size: 15px;
  line-height: 22px;
  margin-bottom: 6px;
}

.winner-toast h2 {
  margin: 0;
  color: #172033;
  font-size: 34px;
  line-height: 44px;
}

.winner-toast.is-multi {
  width: min(420px, calc(100vw - 72px));
  min-height: 0;
  max-height: none;
  padding: 22px 28px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 18px;
}

.winner-toast > div:last-child {
  min-width: 0;
}

.winner-names {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  color: #172033;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}

.winner-names span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-names b {
  margin-right: 10px;
  color: #b93846;
  font-size: 14px;
}

.winner-toast p {
  margin: 4px 0 0;
  color: #2f7d6d;
  font-size: 13px;
  font-weight: 700;
}

.trophy {
  color: var(--gold);
}

.confetti {
  position: absolute;
  width: var(--piece-width);
  height: var(--piece-height);
  border-radius: var(--piece-radius);
  pointer-events: none;
  animation: confetti-pop 1500ms cubic-bezier(0.18, 0.75, 0.25, 1) var(--delay) both;
}

.winner-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.has-multiple .wheel-card.has-winner {
  min-height: var(--winner-height);
}

.has-multiple .winner-toast {
  position: relative;
  left: auto;
  top: auto;
  width: min(230px, calc(100% - 12px));
  min-height: 0;
  max-height: none;
  padding: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  overflow: visible;
  pointer-events: auto;
}

.has-multiple .winner-toast .trophy .icon {
  width: 22px;
  height: 22px;
}

.has-multiple .winner-toast strong {
  font-size: 10px;
  line-height: 14px;
}

.has-multiple .winner-toast h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 25px;
}

.has-multiple .winner-names {
  gap: 1px;
  font-size: 12px;
  line-height: 18px;
}

.has-multiple .winner-names b {
  margin-right: 5px;
  font-size: 10px;
}

.has-multiple .winner-toast p {
  font-size: 10px;
}

.panel {
  position: sticky;
  top: 32px;
  width: 368px;
  height: max(540px, calc(100dvh - 139px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px 16px 20px;
}

.panel-top {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-spin-all,
.add-wheel {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.panel-spin-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--green);
}

.panel-spin-all .icon {
  width: 13px;
  height: 13px;
}

.add-wheel {
  min-width: 88px;
}

.add-wheel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.collapse-link {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.tabs {
  height: 46px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  min-width: 0;
  margin: 0 0 20px;
}

.wheel-tabs {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
  cursor: grab;
}

.wheel-tabs.is-dragging,
.wheel-tabs.is-dragging .tab {
  cursor: grabbing;
}

.wheel-tabs .tab {
  cursor: grab;
}

.wheel-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  flex: none;
  height: 40px;
  min-width: 80px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tab.active {
  color: var(--text);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 1px;
  background: var(--blue);
}

.tab-count {
  color: var(--blue);
  font-size: 10px;
  margin-left: 4px;
}

.tab-close {
  color: var(--muted);
  margin-left: 4px;
  font-size: 14px;
}

.results-tab {
  margin-left: 12px;
  width: 88px;
}

.results-tab::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 1px;
  height: 18px;
  border-radius: 1px;
  background: var(--line-strong);
  transform: translateY(-50%);
}

.tools {
  height: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 27px;
}

.tools .icon-button:last-child {
  margin-left: auto;
}

.icon-button {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  display: grid;
  place-items: center;
}

.icon-button.primary {
  color: var(--green);
}

.app.is-dark .icon-button.primary {
  color: var(--gold);
}

.names-input {
  width: 100%;
  flex: 1;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-field);
  color: var(--text);
  resize: none;
  outline: none;
  padding: 15px 20px;
  font-size: 13px;
  line-height: 30px;
}

.app.is-dark .names-input {
  font-size: 14px;
}

.panel-results {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.panel-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.panel-results-head button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.panel-results-head button .icon {
  width: 14px;
  height: 14px;
}

.panel-results-pagination {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.panel-results-pagination button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
}

.panel-results-pagination button:hover:not(:disabled) {
  background: var(--line);
}

.panel-results-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mini-results {
  flex: 1;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-field);
  overflow: auto;
}

.mini-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 62px 24px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.mini-row strong {
  color: var(--text);
}

.result-remove,
.result-add,
.add-result-form button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.result-remove:hover,
.add-result-form button:hover {
  background: var(--line);
  color: var(--text);
}

.result-add {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.result-add:hover {
  background: var(--line);
}

.result-add-row .add-result-form {
  grid-column: 1 / -1;
}

.add-result-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.add-result-form input,
.add-result-form select {
  min-width: 0;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 12px;
}

.add-result-form input { flex: 1; }
.add-result-form select { max-width: 95px; }

.result-action-cell {
  width: 64px;
}

.panel-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.panel-result-actions button {
  height: 38px;
  border: 1px solid #41546a;
  border-radius: 6px;
  background: #182331;
  color: #d7e6e0;
  font-size: 13px;
  font-weight: 500;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.36);
  z-index: 30;
  display: grid;
  place-items: center;
}

.delete-modal {
  width: 272px;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
  padding: 22px;
}

.delete-modal h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 24px;
}

.delete-modal p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.modal-actions button {
  height: 34px;
  border-radius: 6px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.modal-actions .danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.settings-modal {
  width: min(320px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.settings-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
}

.settings-close {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.settings-close:hover {
  background: var(--panel-field);
}

.settings-fields {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.settings-modal label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.settings-modal label:not(:first-child) {
  margin-top: 10px;
}

.settings-modal input,
.settings-modal select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-field);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}

.settings-modal input:focus-visible,
.settings-modal select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.settings-modal .modal-actions {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.settings-modal .save {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.collapsed-controls {
  position: fixed;
  right: 48px;
  top: 92px;
  display: flex;
  gap: 8px;
  z-index: 20;
}

.small-square {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--surface-solid);
  box-shadow: 0 2px 6px rgba(13, 20, 31, 0.12);
  color: var(--green);
}

.results-page {
  min-height: calc(100vh - 75px);
  padding: 40px 48px 64px;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.back-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  margin-bottom: 8px;
}

.results-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.results-title h1 {
  margin: 0;
  font-size: 44px;
  line-height: 56px;
  font-weight: 500;
  letter-spacing: 0;
}

.results-title span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.result-actions {
  display: flex;
  gap: 12px;
}

.result-actions button {
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  min-height: 153px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: 0 4px 6px rgba(11, 19, 36, 0.05);
  padding: 24px;
}

.stat-card.best {
  border-color: #57e3be;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-value {
  margin: 16px 0 2px;
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
}

.stat-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 19, 36, 0.05);
}

.filter-bar {
  padding: 24px;
  border-bottom: 1px solid #e4ebf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.segments {
  display: flex;
  gap: 4px;
  border-radius: 8px;
  background: #f6f8fb;
  padding: 4px;
}

.segments button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
}

.segments .active {
  background: #fff;
  color: #172033;
  box-shadow: 0 1px 1px rgba(11, 19, 36, 0.05);
}

.search {
  width: 260px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
  padding: 0 14px;
  color: var(--text);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 16px 24px;
  border-bottom: 1px solid #e4ebf3;
  text-align: left;
}

.results-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.results-table td {
  color: var(--muted);
  font-size: 14px;
}

.results-table strong {
  color: #172033;
}

.wheel-pill {
  display: inline-block;
  border-radius: 6px;
  padding: 4px 10px;
  background: #e8f0fe;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.wheel-pill.alt {
  background: #fef6e9;
  color: var(--gold);
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
}

.table-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.page-size-select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
}

.page-size-select:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.pager {
  display: flex;
  gap: 6px;
}

.pager button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: #172033;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager .active {
  background: #172033;
  color: #fff;
}

.sr-file {
  display: none;
}

.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button .icon,
.small-square .icon {
  width: 100%;
  height: 100%;
}

.trophy .icon {
  width: 42px;
  height: 42px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes feedback-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 14px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.4) rotate(0);
  }
  12% {
    opacity: 1;
  }
  48% {
    opacity: 1;
    transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--rot));
    animation-timing-function: ease-in;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--end-x), var(--end-y), 0) rotate(calc(var(--rot) + 240deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti {
    animation-duration: 1ms;
  }
}

@media (max-width: 1120px) {
  .coin-shell { grid-template-columns: 1fr; padding-inline: 24px; }
  .coin-stage { min-height: 650px; }
  .coin-panel { width: min(100%, 560px); max-height: none; justify-self: center; }

  .shell {
    padding: 32px 24px 64px;
  }

  .wheel-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .panel {
    position: relative;
    top: 0;
    width: min(100%, 520px);
    justify-self: center;
  }

  .wheel-zone {
    min-height: min(700px, calc(100dvh - 139px));
  }

  .winner-toast {
    left: 50%;
    top: 260px;
    transform: translateX(-50%);
  }
}

@media (max-width: 760px) {
  .coin-shell { padding: 24px 16px 48px; gap: 24px; }
  .coin-stage { min-height: 560px; padding-inline: 0; }
  .coin-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .coin-object { width: 100%; height: 340px; }
  .coin-flipper { transform: scale(.82); }
  .coin-panel { width: 100%; padding: 16px; }

  .header {
    padding: 0 12px;
  }

  .brand-title {
    font-size: 17px;
  }

  .header-actions {
    gap: 6px;
  }

  .tool-menu summary {
    padding: 0 6px;
  }

  .theme-switch {
    width: 60px;
  }

  .account-trigger {
    width: 30px;
    padding: 2px;
  }

  .account-label {
    display: none;
  }

  .header-results {
    width: 36px;
  }

  .header-results span {
    display: none;
  }

  .wheels-grid {
    grid-template-columns: 1fr;
  }

  .wheel-card {
    min-height: 380px;
  }

  .has-multiple .wheel-card {
    min-height: 0;
  }

  .has-multiple .wheel-wrap {
    width: min(100%, 360px, calc(100dvh - 260px));
  }

  .results-head,
  .filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-actions,
  .stats {
    grid-template-columns: 1fr;
    flex-wrap: wrap;
  }

  .stats {
    display: grid;
  }

  .results-table {
    min-width: 780px;
  }

  .table-card {
    overflow-x: auto;
  }

  .table-foot,
  .pager {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .header { padding-inline: 8px; }
  .brand-title { font-size: 14px; }
  .header-actions { gap: 2px; }
  .tool-menu summary { padding-inline: 3px; }
  .header-results { width: 30px; }
  .header-faq { padding-inline: 3px; }
  .theme-switch { width: 52px; }
}

/* Coin rules are scoped to outrank legacy wheel-page selectors. */
.coin-app .coin-count {
  width: 176px;
  height: 48px;
  padding: 0 14px 0 12px;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
}
.coin-app .coin-count > strong { font-size: 16px; line-height: normal; }
.coin-app .coin-object {
  left: 50%;
  top: 298.25px;
  width: 319px;
  height: 275.5px;
  min-height: 0;
  display: block;
  transform: translateX(-50%);
  transform-origin: center top;
}
.coin-app .coin-style-option.selected {
  border-color: #ff477e;
  box-shadow: none;
}
.coin-app.panel-results .coin-intro p { display: none; }
.coin-app.panel-results .coin-object {
  left: 50%;
  top: 328.7px;
  transform: translateX(-50%) scale(.772727);
  transform-origin: center top;
}
@media (max-width: 900px) {
  .coin-app .coin-object { left: 50%; top: 310px; transform: translateX(-50%) scale(.86); }
}

/* Wheel header follows the PC navigation prototype. */
.wheel-header {
  height: 64px;
  padding: 0 28px;
  justify-content: flex-start;
  border-color: #dfe5ed;
  background: var(--surface-solid);
}
.wheel-header-brand {
  width: 90px;
  flex: 0 0 90px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}
.wheel-header-nav {
  height: 64px;
  margin-left: 18px;
  display: flex;
  align-items: stretch;
}
.wheel-header-nav > a,
.wheel-header-nav > .tool-menu > summary {
  position: relative;
  width: 72px;
  height: 64px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.wheel-header-nav > a.active { color: #ff477e; font-weight: 700; }
.wheel-header-nav > .tool-menu.active > summary { width: auto; min-width: 72px; padding: 0 12px; color: #ff477e; font-weight: 700; white-space: nowrap; }
.wheel-header-nav > .tool-menu.active > summary::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: #ff477e;
}
.wheel-header-nav > a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: #ff477e;
}
.wheel-header-nav .tool-menu-content { left: 0; right: auto; }
.wheel-header-actions { margin-left: auto; gap: 8px; }
.wheel-header-actions .header-results {
  width: 96px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #475569;
}
.wheel-header-actions .header-results.active { color: #ff477e; font-weight: 700; }
.wheel-header-actions .header-results .icon { width: 16px; height: 16px; }
.wheel-header-actions::before {
  content: "";
  order: 1;
  width: 1px;
  height: 20px;
  margin: 0 0 0 0;
  background: #d8e0ea;
}
.wheel-header-actions .theme-switch {
  order: 2;
  width: 68px;
  height: 30px;
  padding: 2px 4px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #f8fafc;
}
.wheel-header-actions .theme-switch span { width: 28px; height: 26px; border-radius: 5px; }
.wheel-header-actions .theme-switch .icon { width: 16px; height: 16px; }
.wheel-header-actions .theme-switch span.active { background: #e8eef5; }

/* Coin prototype statistics share the coin's center line. */
.coin-app .coin-counts {
  width: max-content;
  grid-template-columns: repeat(2, 176px);
  gap: 24px;
}

@media (max-width: 760px) {
  .wheel-header { padding-inline: 12px; }
  .wheel-header-nav > a:nth-child(2),
  .wheel-header-nav > a:nth-child(3) { display: none; }
  .wheel-header-actions .header-results { width: 36px; }
  .wheel-header-actions .header-results span { display: none; }
}
