.sng-game { font-family: var(--sans); color: var(--ink); max-width: 1440px; min-width: 0; margin: auto; container-type: inline-size; }
.sng-unavailable { padding: 16px; }
.sng-unavailable > .sng-panel { margin-top: 0; }
.sng-unavailable h1 { font-size: clamp(23px, 3vw, 38px); margin: 0 0 16px; overflow-wrap: anywhere; }
/* Native dashboard slot owns scrolling and survives game snapshot repaints. */
.frame-wrap > div:has(> .sng-game) {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  min-width: 0;
}
.sng-game * { box-sizing: border-box; }
.sng-game button, .sng-game input, .sng-game select { font: inherit; }
.sng-game button { cursor: pointer; }
.sng-game button:disabled { cursor: wait; opacity: .55; }
.sng-game :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sng-hero { display: flex; align-items: center; gap: 32px; padding: 28px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; }
.sng-logo { width: 235px; max-width: 35%; height: auto; }
.sng-title h1 { font-size: clamp(23px, 3vw, 38px); letter-spacing: -.035em; margin: 7px 0; }
.sng-title p { margin: 0; color: var(--ink-2); }
.sng-eyebrow { font-size: 11px; letter-spacing: .15em; font-weight: 700; }
.sng-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.sng-stat { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 16px 22px; }
.sng-stat small { display: block; color: var(--ink-2); margin-bottom: 5px; }
.sng-stat strong { font-size: clamp(18px, 2vw, 27px); font-variant-numeric: tabular-nums; }
.sng-save-status { color: var(--ink-2); font-size: 13px; min-height: 20px; }
.sng-backup-status { color: var(--ink-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.sng-locations { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.sng-location { padding: 14px 8px; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); border-radius: 16px; min-width: 0; }
.sng-location strong, .sng-location small { display: block; overflow-wrap: anywhere; }
.sng-location strong { font-size: 13px; margin: 4px 0; }
.sng-location-art { display: block; width: 42px; height: 42px; margin: auto; background-size: 400% 400%; background-repeat: no-repeat; }
.sng-location.sng-selected { background: var(--blue-wash); border-color: var(--blue); color: var(--blue-deep); box-shadow: var(--shadow); }
.sng-location-heading { display: flex; gap: 16px; justify-content: space-between; align-items: baseline; padding: 20px 4px 10px; }
.sng-location-heading h2 { margin: 0; font-size: 22px; }
.sng-location-heading p { color: var(--ink-2); font-size: 13px; }
.sng-field { position: relative; overflow: hidden; overflow: clip; isolation: isolate; border-radius: 26px; border: 1px solid var(--border-2); background: var(--blue-wash); }
.sng-landscape { position: absolute; width: 100%; height: 100%; object-fit: cover; z-index: -3; filter: saturate(.9); }
.sng-field::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--surface)); opacity: .33; z-index: -2; pointer-events: none; }
.sng-stations { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(145px, auto)); gap: 22px 28px; padding: 35px; position: relative; }
.sng-station { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; padding: 34px 8px 11px; border: 1px solid var(--border-2); border-radius: 20px; background: color-mix(in srgb, var(--surface) 91%, transparent); color: var(--ink); box-shadow: 0 8px 22px color-mix(in srgb, var(--blue-deep) 14%, transparent); transition: transform .18s, box-shadow .18s; }
.sng-station:hover { transform: translateY(-5px); box-shadow: 0 14px 28px color-mix(in srgb, var(--blue-deep) 24%, transparent); }
.sng-station-number { position: absolute; top: -11px; left: 10px; display: grid; place-items: center; height: 28px; min-width: 30px; border-radius: 10px; padding: 0 5px; background: var(--blue-deep); color: var(--surface); font-weight: 800; font-size: 13px; }
.sng-station-art { width: 70px; height: 64px; background-size: 400% 400%; background-repeat: no-repeat; margin-top: -22px; flex-shrink: 0; }
.sng-station-name { font-size: 11px; line-height: 1.25; margin: 3px 0; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sng-station-foot { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 53px; max-width: 100%; flex-shrink: 0; }
.sng-sealed { font-size: 10px; color: var(--ink-2); margin-top: 4px; }
.sng-recipient { font-size: 12px; line-height: 1.2; overflow-wrap: break-word; max-width: 100%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sng-reward, .sng-hidden-reward { font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ok); margin-top: 3px; }
.sng-hidden-reward { color: var(--ink-2); }
.sng-open { border-color: var(--ok); }
.sng-final-station { border: 2px solid var(--warn); }
.sng-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.sng-trail-line { fill: none; stroke: var(--surface); stroke-width: 1; stroke-dasharray: 1 1.2; opacity: .85; }
.sng-snow { position: absolute; inset: -80px 0 0; background-image: radial-gradient(var(--surface) 1px, transparent 2px); background-size: 43px 43px; pointer-events: none; animation: sng-snow 12s linear infinite; opacity: .5; will-change: transform; }
.sng-legend { font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.sng-cell-details, .sng-last-opening { min-width: 0; overflow-wrap: anywhere; }
.sng-prediction { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.sng-cell-details .sng-button, .sng-history .sng-button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.sng-panel, .sng-host { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; margin-top: 22px; min-width: 0; }
.sng-panel h2, .sng-host h2 { font-size: 21px; margin: 0 0 20px; }
.sng-table-scroll { overflow-x: auto; max-width: 100%; }
.sng-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.sng-table caption { text-align: left; color: var(--ink-2); margin-bottom: 12px; }
.sng-table th, .sng-table td { text-align: right; padding: 13px 12px; border-bottom: 1px solid var(--divider); font-variant-numeric: tabular-nums; }
.sng-table th:first-child, .sng-table td:first-child { text-align: left; min-width: 140px; overflow-wrap: anywhere; }
.sng-table th { color: var(--ink-2); font-size: 11px; }
.sng-table tbody tr:nth-child(even) { background: var(--surface-3); }
.sng-lower { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.sng-rules { padding-left: 22px; margin: 0; }
.sng-rules li { padding: 0 0 14px 8px; line-height: 1.6; font-size: 13px; }
.sng-history { list-style: none; padding: 0; margin: 0; max-height: 500px; overflow-y: auto; }
.sng-history li { border-bottom: 1px solid var(--divider); padding: 13px 0; overflow-wrap: anywhere; }
.sng-history strong, .sng-history small { display: block; }
.sng-history small { font-size: 11px; color: var(--ink-2); margin-top: 5px; }
.sng-host-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.sng-form { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sng-form h3 { font-size: 16px; margin: 16px 0 4px; }
.sng-form p, .sng-form small { font-size: 12px; line-height: 1.5; margin: 3px 0; }
.sng-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.sng-label:has(input[type=checkbox]) { flex-direction: row-reverse; justify-content: flex-end; align-items: center; }
.sng-input { padding: 10px 12px; width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--border-2); border-radius: 9px; }
.sng-input[type=checkbox] { width: auto; }
.sng-button { background: var(--blue); border: 1px solid var(--blue); border-radius: 10px; color: var(--surface); padding: 11px 15px; font-weight: 600; }
.sng-secondary { background: var(--surface); color: var(--blue); }
.sng-roster-details { margin-top: 12px; font-size: 13px; }
.sng-roster-details summary { cursor: pointer; }
.sng-roster .sng-form { padding: 12px 0; border-bottom: 1px solid var(--divider); }
.sng-error { color: var(--err); }
.sng-view-switch { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0; }
.sng-view-switch-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sng-view-switch-label { font-weight: 600; color: var(--ink-2); }
.sng-view-option { background: var(--surface); color: var(--blue); border: 1px solid var(--blue); border-radius: 10px; padding: 9px 15px; font-weight: 600; cursor: pointer; }
.sng-view-option.sng-view-active { background: var(--blue); color: var(--surface); }
.sng-view-caption { flex-basis: 100%; margin: 0; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.sng-steps { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.sng-registry-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.sng-registry-nav [aria-pressed=true] { background: var(--blue); color: var(--surface); }
.sng-registry-status, .sng-test-game { padding: 12px; border: 1px solid var(--border); border-radius: 9px; overflow-wrap: anywhere; }
.sng-registry p, .sng-auto-final p { line-height: 1.6; }
.sng-registry .sng-table td:first-child .sng-button { text-align: left; overflow-wrap: anywhere; }
.sng-auto-final { margin-top: 24px; border-top: 1px solid var(--divider); padding-top: 12px; }
.sng-auto-candidates { padding-left: 20px; overflow-wrap: anywhere; }
@keyframes sng-snow { to { transform: translateY(80px); } }
/* The series plays on the map: a layer over the stations, never a block above the board. */
.sng-field-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sng-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: color-mix(in srgb, var(--blue-deep) 42%, transparent); will-change: opacity; }
.sng-stage[hidden], .sng-token[hidden], .sng-stage-result[hidden], .sng-stage [hidden] { display: none; }
.sng-stage-card { position: sticky; top: 12px; bottom: 12px; width: min(420px, 100%); padding: 18px 20px 16px; border-radius: 22px; background: var(--surface); box-shadow: 0 18px 48px color-mix(in srgb, var(--blue-deep) 35%, transparent); text-align: center; pointer-events: auto; }
.sng-stage-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sng-stage-wheel-box { position: relative; width: 132px; height: 132px; margin: 12px auto 6px; }
.sng-stage-pointer { position: absolute; z-index: 1; top: -12px; left: 50%; transform: translateX(-50%); font-size: 24px; line-height: 1; color: var(--blue-deep); }
.sng-stage-wheel { width: 100%; height: 100%; border-radius: 50%; border: 6px solid var(--border); background: repeating-conic-gradient(var(--blue) 0deg 45deg, var(--blue-wash) 45deg 90deg); box-shadow: var(--shadow); will-change: transform; }
.sng-stage-caption { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); min-height: 20px; }
.sng-stage-name { margin: 2px 0 0; height: 2.4em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: clamp(22px, 4.2vw, 32px); font-weight: 800; line-height: 1.15; color: var(--blue-deep); overflow-wrap: anywhere; }
.sng-stage-detail { margin: 4px 0 0; min-height: 20px; font-size: 14px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.sng-stage-queue { margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--divider); max-height: calc(4.5em + 9px); overflow-y: auto; list-style-position: inside; text-align: left; font-size: 12px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.sng-stage-skip { margin-top: 10px; background: none; border: 0; padding: 4px 8px; color: var(--blue); font-size: 13px; text-decoration: underline; }
.sng-token { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--surface), var(--warn) 60%); border: 3px solid var(--surface); box-shadow: 0 6px 14px color-mix(in srgb, var(--blue-deep) 45%, transparent); will-change: transform; }
.sng-stage-result { position: absolute; left: 0; top: 0; width: min(360px, calc(100% - 24px)); padding: 12px 14px; border-radius: 16px; border: 2px solid var(--ok); background: var(--surface); box-shadow: 0 14px 34px color-mix(in srgb, var(--blue-deep) 30%, transparent); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.sng-stage-result p { margin: 0; }
.sng-stage-result .sng-stage-result-head { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.sng-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@container (max-width: 760px) {
  .sng-host-columns { grid-template-columns: 1fr; }
  .sng-lower { grid-template-columns: 1fr; gap: 0; }
  .sng-stations { padding: 25px 13px; gap: 18px 8px; grid-template-rows: repeat(4, minmax(130px, auto)); }
  .sng-station { border-radius: 12px; padding: 28px 3px 8px; }
  .sng-station-art { width: 48px; height: 48px; }
  .sng-station-name { font-size: 10px; }
  .sng-location-heading { display: block; }
}
@media (max-width: 480px) {
  .sng-hero { padding: 20px 16px; display: block; border-radius: 16px; }
  .sng-logo { max-width: 70%; width: 190px; margin-bottom: 20px; }
  .sng-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sng-stat { padding: 12px; }
  .sng-locations { gap: 3px; }
  .sng-location { padding: 10px 2px; border-radius: 9px; }
  .sng-location strong { font-size: 9px; }
  .sng-location small { font-size: 10px; }
  .sng-location-art { width: 30px; height: 30px; }
  .sng-field { border-radius: 14px; }
  .sng-stations { padding: 24px 12px 16px; gap: 23px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(135px, auto); }
  .sng-station { grid-column: auto !important; grid-row: auto !important; padding: 28px 7px 12px; }
  .sng-station-number { left: 2px; font-size: 11px; min-width: 22px; height: 24px; }
  .sng-station-art { width: 58px; height: 58px; }
  .sng-station-name { font-size: 11px; }
  .sng-sealed { font-size: 10px; }
  .sng-reward, .sng-hidden-reward { font-size: 15px; }
  .sng-station-foot { height: 50px; }
  .sng-recipient { font-size: 12px; }
  .sng-trail { display: none; }
  .sng-panel, .sng-host { padding: 17px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .sng-game *, .sng-game *::before, .sng-game *::after { animation: none !important; transition: none !important; }
}
.sng-trial-banner { margin: 12px 0; padding: 12px 16px; border: 2px solid var(--warn); border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); font-weight: 700; overflow-wrap: anywhere; }
.sng-trial-panel .sng-form { margin-bottom: 12px; }
.sng-launch-dialog { border: 2px solid var(--blue); }
.sng-launch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sng-grant-form, .sng-superprize { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--divider); }
.sng-reason { resize: vertical; min-height: 64px; max-height: 200px; }
.sng-notice { min-height: 20px; margin: 0; overflow-wrap: anywhere; }
.sng-superprize-note { margin: 8px 0; padding: 10px 14px; border: 2px solid var(--warn); border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); font-weight: 700; overflow-wrap: anywhere; }
.sng-superprize .sng-launch-dialog { margin-top: 12px; }
.sng-grants { margin-bottom: 16px; }
.sng-grants h3 { font-size: 15px; margin: 0 0 6px; }
.sng-grant-list { list-style: none; padding: 0; margin: 0; max-height: 260px; overflow-y: auto; }
.sng-grant-list li { border-bottom: 1px solid var(--divider); padding: 11px 0; overflow-wrap: anywhere; }
.sng-grant-list strong, .sng-grant-list small { display: block; }
.sng-grant-list small { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.sng-grant-list .sng-grant-reason { font-size: 12px; color: var(--ink); }
.sng-superprize > p { margin: 8px 0; line-height: 1.5; }
.sng-superprize-dialog p { margin: 0 0 12px; }
.sng-superprize-dialog .sng-label { margin: 0 0 8px; }
.sng-grant-form .sng-error { margin: 0; min-height: 18px; }
