:root {
    color-scheme: light;
    --bg: #f5f2ec;
    --surface: #ffffff;
    --surface-muted: #eef2ef;
    --ink: #15191d;
    --muted: #65707a;
    --line: #dde2dc;
    --green: #176b4d;
    --green-soft: #e5f1eb;
    --blue: #285bb8;
    --red: #c5423a;
    --gold: #cf9b32;
    --charcoal: #20272e;
    --shadow: 0 18px 50px rgba(25, 31, 36, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
    touch-action: manipulation;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    letter-spacing: 0;
}

p {
    color: var(--muted);
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 850;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.button--primary {
    padding: 0 18px;
    color: #fff;
    background: var(--green);
    box-shadow: 0 12px 26px rgba(23, 107, 77, 0.2);
}

.button--quiet {
    padding: 0 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(21, 25, 29, 0.1);
}

.button--secondary {
    padding: 0 18px;
    color: #fff;
    background: var(--charcoal);
}

.button--danger {
    padding: 0 18px;
    color: #fff;
    background: var(--red);
}

.button--full {
    width: 100%;
}

.landing-page {
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(180deg, #fbfaf6 0, #f5f2ec 56%, #ecefe8 100%);
}

.landing-hero {
    position: relative;
    display: grid;
    min-height: 86vh;
    padding: 22px max(24px, calc((100vw - 1180px) / 2)) 42px;
    overflow: hidden;
    isolation: isolate;
}

.landing-hero::before {
    position: absolute;
    inset: 0;
    z-index: -3;
    content: "";
    background:
        linear-gradient(rgba(20, 26, 29, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 26, 29, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, #000 0 58%, transparent 96%);
}

.landing-hero::after {
    position: absolute;
    right: max(-180px, calc((100vw - 1180px) / 2 - 240px));
    bottom: -210px;
    z-index: -2;
    width: min(720px, 72vw);
    aspect-ratio: 1;
    content: "";
    border: 1px solid rgba(21, 25, 29, 0.08);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.56) 0 33%, transparent 34%),
        conic-gradient(from 20deg, rgba(23, 107, 77, 0.16), rgba(197, 66, 58, 0.14), rgba(207, 155, 50, 0.14), rgba(23, 107, 77, 0.16));
}

.landing-nav,
.landing-hero__content,
.landing-status,
.mode-section {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding-right: 104px;
}

.landing-nav__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 900;
    text-decoration: none;
}

.brand-mark__icon {
    position: relative;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    overflow: hidden;
    border: 7px solid var(--charcoal);
    border-radius: 50%;
    background: conic-gradient(from 18deg, var(--green) 0 10%, #faf6ec 10% 20%, var(--red) 20% 30%, #faf6ec 30% 40%, var(--green) 40% 50%, #faf6ec 50% 60%, var(--red) 60% 70%, #faf6ec 70% 80%, var(--green) 80% 90%, #faf6ec 90% 100%);
    box-shadow: inset 0 0 0 3px var(--gold);
}

.brand-mark__icon::after {
    position: absolute;
    inset: 8px;
    content: "";
    background: var(--red);
    border-radius: 50%;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(21, 25, 29, 0.09);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}

.language-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 50;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(21, 25, 29, 0.12);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(25, 31, 36, 0.12);
    backdrop-filter: blur(10px);
}

.language-switcher__option {
    display: inline-flex;
    min-width: 40px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
}

.language-switcher__option.is-active {
    color: #fff;
    background: var(--green);
}

.landing-hero__board {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2 - 300px));
    top: 50%;
    z-index: -1;
    width: min(600px, 48vw);
    opacity: 0.96;
    filter: drop-shadow(0 38px 52px rgba(25, 31, 36, 0.24));
    transform: translateY(-42%) rotate(-7deg);
}

.landing-hero__content {
    align-self: center;
    max-width: 760px;
    padding: 74px 0 72px;
}

.landing-hero h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(3.2rem, 8vw, 7.7rem);
    line-height: 0.88;
}

.landing-hero__text {
    max-width: 560px;
    margin-bottom: 0;
    color: #4d5964;
    font-size: clamp(1.02rem, 1.4vw, 1.18rem);
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.landing-status {
    align-self: end;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 700px;
    margin-left: 0;
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(21, 25, 29, 0.09);
    border-radius: 8px;
    background: rgba(21, 25, 29, 0.09);
    box-shadow: var(--shadow);
}

.landing-status span {
    display: grid;
    gap: 4px;
    min-height: 82px;
    align-content: center;
    padding: 14px 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 800;
}

.landing-status strong {
    color: var(--ink);
    font-size: 1.24rem;
    line-height: 1;
}

.mode-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
    gap: 38px;
    padding: 58px 24px 76px;
}

.section-heading {
    position: sticky;
    top: 24px;
    align-self: start;
}

.section-heading h2 {
    max-width: 360px;
    margin-bottom: 0;
    font-size: clamp(2rem, 3.6vw, 3.4rem);
    line-height: 0.98;
}

.mode-grid {
    display: grid;
    gap: 12px;
}

.mode-tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 20px;
    align-items: start;
    min-height: 164px;
    padding: 22px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(21, 25, 29, 0.1);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(25, 31, 36, 0.07);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.mode-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 107, 77, 0.34);
    box-shadow: 0 18px 42px rgba(25, 31, 36, 0.11);
}

.mode-tile__meta {
    grid-column: 1 / -1;
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.mode-tile__title {
    min-width: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.15rem);
    font-weight: 950;
    line-height: 1;
}

.mode-tile__description {
    grid-column: 1 / -1;
    max-width: 640px;
    color: var(--muted);
    line-height: 1.45;
}

.mode-tile__footer {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mode-tile__footer span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    color: #4f5b65;
    background: rgba(21, 25, 29, 0.06);
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 850;
}

.mode-tile--ready {
    background:
        linear-gradient(90deg, rgba(229, 241, 235, 0.82), rgba(255, 255, 255, 0.86) 42%),
        #fff;
}

.mode-tile--ready .mode-tile__footer span:last-child {
    color: #fff;
    background: var(--green);
}

.mode-tile--muted {
    opacity: 0.74;
}

.rules-page {
    min-height: 100vh;
    padding: 22px max(24px, calc((100vw - 1180px) / 2)) 76px;
    background:
        linear-gradient(rgba(20, 26, 29, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 26, 29, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #fbfaf6 0, #f5f2ec 58%, #ecefe8 100%);
    background-size: 56px 56px, 56px 56px, auto;
}

.rules-nav,
.rules-hero,
.rules-section {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.rules-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
    gap: 32px;
    align-items: end;
    padding: 86px 0 58px;
}

.rules-hero h1 {
    max-width: 800px;
    margin-bottom: 18px;
    font-size: clamp(3rem, 6.5vw, 6.2rem);
    line-height: 0.9;
}

.rules-hero p {
    max-width: 650px;
    margin-bottom: 0;
    color: #4d5964;
    font-size: 1.08rem;
}

.rules-hero__summary {
    display: grid;
    gap: 1px;
    overflow: hidden;
    background: rgba(21, 25, 29, 0.09);
    border: 1px solid rgba(21, 25, 29, 0.09);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.rules-hero__summary span {
    display: grid;
    gap: 4px;
    min-height: 76px;
    align-content: center;
    padding: 14px 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.rules-hero__summary strong {
    color: var(--ink);
    font-size: 1.28rem;
}

.rules-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
    gap: 38px;
    padding: 34px 0;
}

.rules-grid,
.rules-stack {
    display: grid;
    gap: 12px;
}

.rules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rules-card {
    min-width: 0;
    padding: 22px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(21, 25, 29, 0.1);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(25, 31, 36, 0.07);
}

.rules-card h3,
.rules-card__header span {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 1.28rem;
    font-weight: 950;
    line-height: 1.05;
}

.rules-card p {
    margin-bottom: 14px;
}

.rules-card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: #4d5964;
    line-height: 1.45;
}

.rules-card li::marker {
    color: var(--green);
}

.rules-card--wide {
    display: grid;
    gap: 12px;
}

.rules-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rules-card__header span {
    margin: 0;
}

.settings-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.settings-list span {
    min-width: 0;
    padding: 12px;
    color: #4d5964;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    line-height: 1.4;
}

.settings-list strong {
    color: var(--ink);
}

.game-layout {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: minmax(390px, 0.42fr) minmax(420px, 0.58fr);
}

.score-panel {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
    background: var(--surface);
    border-right: 1px solid var(--line);
}

.score-panel__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.score-panel h1 {
    margin-bottom: 0;
    font-size: 2.15rem;
    line-height: 1.08;
}

.mode-summary {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(21, 25, 29, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
}

.mode-summary p {
    margin: 0;
    font-size: 0.95rem;
}

.back-link {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    background: var(--surface-muted);
    border-radius: 50%;
    font-size: 1.4rem;
    text-decoration: none;
}

.player-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.player-form input,
.dialog-form input {
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

.player-form input:focus,
.dialog-form input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.16);
}

.score-table {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.score-table__row {
    display: grid;
    grid-template-columns: minmax(92px, 1.2fr) repeat(6, minmax(66px, 0.8fr));
    align-items: center;
    min-width: 590px;
}

.score-table__row > span {
    min-width: 0;
    padding: 13px 10px;
    overflow-wrap: anywhere;
    text-align: center;
}

.score-table__row > span:first-child {
    text-align: left;
}

.score-table__row--head {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #fff;
    background: #17202a;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.score-table__body .score-table__row:nth-child(even) {
    background: var(--surface-muted);
}

.score-table__row.is-active {
    background: rgba(23, 107, 77, 0.14);
    box-shadow: inset 4px 0 0 var(--green);
}

.score-actions {
    display: grid;
    grid-template-columns: 52px 52px 1fr;
    gap: 10px;
    margin-top: auto;
}

.is-hidden {
    display: none !important;
}

.score-panel--x01 {
    overflow: auto;
}

.x01-setup,
.x01-game,
.cricket-setup,
.cricket-game,
.around-setup,
.around-game {
    display: grid;
    gap: 18px;
}

.x01-settings {
    display: grid;
    gap: 12px;
}

.x01-settings fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.x01-settings legend,
.field-control span {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.x01-settings label {
    display: grid;
    min-width: 0;
}

.x01-settings input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.x01-settings label span,
.field-control select {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--ink);
    background: var(--surface-muted);
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 850;
    text-align: center;
}

.x01-settings input:checked + span {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}

.field-control {
    display: grid;
    gap: 8px;
}

.field-control select {
    width: 100%;
    justify-content: flex-start;
    outline: none;
}

.field-control select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.16);
}

.player-chips {
    display: flex;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 8px;
}

.player-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--surface-muted);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 850;
}

.player-chip--empty {
    color: var(--muted);
    font-weight: 750;
}

.x01-setup__actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.x01-current {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: end;
    padding: 16px;
    background: #17202a;
    border-radius: 8px;
}

.x01-current span {
    grid-column: 1 / -1;
    color: #b8c2cc;
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.x01-current strong,
.x01-current b {
    min-width: 0;
    color: #fff;
    line-height: 1;
}

.x01-current strong {
    overflow: hidden;
    font-size: 1.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.x01-current b {
    font-size: 3.2rem;
}

.x01-turn {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.x01-turn div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    background: var(--surface-muted);
}

.x01-turn span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.x01-turn strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 1.18rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-table--x01 .score-table__row {
    grid-template-columns: minmax(110px, 1.35fr) repeat(5, minmax(62px, 0.8fr));
}

.score-panel--cricket {
    overflow: auto;
}

.score-panel--around {
    overflow: auto;
}

.cricket-targets {
    display: grid;
    grid-template-columns: repeat(7, minmax(54px, 1fr));
    gap: 8px;
}

.cricket-target {
    display: grid;
    min-width: 0;
    min-height: 62px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cricket-target span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.cricket-target strong {
    min-width: 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1;
}

.cricket-target.is-closed {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}

.cricket-target.is-closed span,
.cricket-target.is-closed strong {
    color: #fff;
}

.score-table--cricket .score-table__row {
    grid-template-columns: minmax(104px, 1.25fr) minmax(58px, 0.7fr) repeat(7, minmax(54px, 0.62fr)) minmax(120px, 1.35fr);
    min-width: 810px;
}

.around-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
    gap: 8px;
}

.around-track__target {
    display: grid;
    min-width: 0;
    min-height: 42px;
    place-items: center;
    color: var(--muted);
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 900;
}

.around-track__target.is-complete {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}

.around-track__target.is-current {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 10px 20px rgba(197, 66, 58, 0.22);
}

.score-table--around .score-table__row {
    grid-template-columns: minmax(104px, 1.25fr) minmax(58px, 0.7fr) minmax(88px, 0.78fr) repeat(3, minmax(58px, 0.65fr)) minmax(120px, 1.35fr);
    min-width: 760px;
}

.score-actions--x01 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dialog-message {
    margin: 0;
    white-space: pre-line;
}

.icon-button {
    width: 52px;
    background: #36404d;
}

.icon-button--blue {
    background: var(--blue);
}

.icon-button img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

.board-stage {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    background: radial-gradient(circle at center, #ffffff 0, #edf1f4 52%, #dde5ea 100%);
}

.dartboard {
    width: min(88vh, 100%);
    max-width: 860px;
    aspect-ratio: 1;
    filter: drop-shadow(0 22px 35px rgba(23, 32, 42, 0.22));
    user-select: none;
    touch-action: manipulation;
}

.app-dialog {
    width: min(520px, calc(100vw - 28px));
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: 0;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.app-dialog::backdrop {
    background: rgba(23, 32, 42, 0.48);
    backdrop-filter: blur(5px);
}

.dialog-form,
.app-dialog--scoreboard form {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.dialog-form header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialog-close {
    width: 38px;
    height: 38px;
    color: var(--ink);
    background: var(--surface-muted);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
}

.scoreboard-header {
    text-align: center;
}

.podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    min-height: 250px;
    gap: 10px;
}

.podium__item {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 7px;
}

.podium__rank {
    display: grid;
    width: 100%;
    place-items: center;
    color: #fff;
    background: var(--blue);
    border-radius: 8px 8px 0 0;
    font-size: 1.8rem;
    font-weight: 900;
}

.podium__item:first-child .podium__rank {
    height: 118px;
    background: #9aa6b2;
}

.podium__item:nth-child(2) .podium__rank {
    height: 168px;
    color: #33270b;
    background: var(--gold);
}

.podium__item:nth-child(3) .podium__rank {
    height: 88px;
    background: #b46f3c;
}

.podium__name,
.scoreboard-list__name {
    max-width: 100%;
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium__meta,
.scoreboard-list__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.scoreboard-list {
    display: grid;
    gap: 8px;
}

.scoreboard-list__row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: var(--surface-muted);
    border-radius: 8px;
}

.confetti-piece {
    position: fixed;
    top: -14px;
    z-index: 1000;
    width: 8px;
    height: 14px;
    pointer-events: none;
    animation: confetti-fall 900ms ease-in forwards;
}

@keyframes confetti-fall {
    to {
        transform: translate3d(var(--x), 105vh, 0) rotate(680deg);
        opacity: 0;
    }
}

@media (max-width: 980px) {
    .landing-hero {
        min-height: 82vh;
        padding-right: 20px;
        padding-left: 20px;
    }

    .landing-hero__board {
        right: -80px;
        width: min(560px, 64vw);
        opacity: 0.44;
        transform: translateY(-36%) rotate(-7deg);
    }

    .landing-hero__content {
        padding: 64px 0 58px;
    }

    .landing-status {
        max-width: none;
    }

    .mode-section,
    .rules-section {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 48px 20px 64px;
    }

    .section-heading {
        position: static;
    }

    .section-heading h2 {
        max-width: 620px;
    }

    .rules-page {
        padding-right: 20px;
        padding-left: 20px;
    }

    .rules-hero {
        grid-template-columns: 1fr;
        padding: 64px 0 28px;
    }

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

    .game-layout {
        min-height: 100dvh;
        grid-template-columns: 1fr;
    }

    .score-panel {
        min-height: auto;
        border-top: 1px solid var(--line);
        border-right: 0;
        order: 1;
    }

    .board-stage {
        order: 2;
        min-height: auto;
        padding: 16px;
    }

    .game-layout.is-playing .board-stage {
        position: sticky;
        top: 0;
        z-index: 4;
        order: 1;
        min-height: 62dvh;
        border-bottom: 1px solid var(--line);
    }

    .game-layout.is-playing .score-panel {
        order: 2;
    }

    .game-layout.is-playing .mode-summary {
        display: none;
    }

    .dartboard {
        width: min(92vw, 68dvh, 620px);
    }
}

@media (max-width: 680px) {
    .landing-hero {
        min-height: auto;
        padding: 16px 14px 30px;
    }

    .landing-nav {
        min-height: 48px;
        padding-right: 88px;
    }

    .landing-nav__links {
        gap: 6px;
    }

    .brand-mark {
        font-size: 0.95rem;
    }

    .brand-mark__icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-width: 7px;
    }

    .nav-link {
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.86rem;
    }

    .landing-hero__board {
        top: 170px;
        right: -116px;
        width: 340px;
        opacity: 0.22;
    }

    .landing-hero__content {
        padding: 56px 0 42px;
    }

    .landing-hero h1 {
        font-size: clamp(3.1rem, 16vw, 4.6rem);
    }

    .landing-actions,
    .landing-actions .button {
        width: 100%;
    }

    .landing-status {
        grid-template-columns: 1fr;
    }

    .landing-status span {
        min-height: 66px;
    }

    .mode-section {
        padding: 42px 14px 52px;
    }

    .rules-page {
        padding: 16px 14px 46px;
    }

    .rules-hero {
        padding: 48px 0 20px;
    }

    .rules-hero h1 {
        font-size: clamp(3rem, 15vw, 4.3rem);
    }

    .rules-section {
        padding: 34px 0;
    }

    .rules-card {
        padding: 18px;
    }

    .rules-card__header {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-list {
        grid-template-columns: 1fr;
    }

    .mode-tile {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 18px;
    }

    .score-panel {
        gap: 14px;
        padding: 14px;
    }

    .score-panel h1 {
        font-size: 1.55rem;
    }

    .button,
    .icon-button,
    .player-form input,
    .dialog-form input,
    .field-control select,
    .x01-settings label span {
        min-height: 48px;
    }

    .player-form input,
    .dialog-form input,
    .field-control select {
        font-size: 1rem;
    }

    .player-form,
    .x01-setup__actions {
        grid-template-columns: 1fr;
    }

    .score-actions {
        grid-template-columns: 52px 52px minmax(0, 1fr);
    }

    .score-actions--x01 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .score-actions--x01 .button {
        padding: 0 8px;
        font-size: 0.9rem;
    }

    .x01-settings fieldset,
    .x01-turn {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .x01-turn {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .x01-turn div {
        padding: 10px 8px;
    }

    .cricket-targets {
        grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
        gap: 6px;
    }

    .cricket-target {
        min-height: 54px;
        padding: 7px;
    }

    .around-track {
        grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
        gap: 6px;
    }

    .around-track__target {
        min-height: 38px;
        font-size: 0.78rem;
    }

    .x01-current {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .x01-current b {
        font-size: 2.6rem;
    }

    .score-table__row {
        min-width: 520px;
        font-size: 0.86rem;
    }

    .score-table__row > span {
        padding: 10px 8px;
    }

    .score-table--x01 .score-table__row {
        min-width: 520px;
    }

    .score-table--cricket .score-table__row {
        min-width: 720px;
    }

    .score-table--around .score-table__row {
        min-width: 660px;
    }

    .game-layout.is-playing .board-stage {
        min-height: 58dvh;
        padding: 10px;
    }

    .dartboard {
        width: min(96vw, 54dvh, 520px);
    }

    .icon-button {
        width: 52px;
    }

    .podium {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .podium__rank,
    .podium__item:first-child .podium__rank,
    .podium__item:nth-child(2) .podium__rank,
    .podium__item:nth-child(3) .podium__rank {
        height: 70px;
        border-radius: 8px;
    }
}
