:root {
    color-scheme: dark;
    --surface: #0d1117;
    --surface-raised: #151b23;
    --surface-sunken: #0a0e14;
    --surface-hover: #1c2532;
    --border: #263041;
    --border-strong: #35435a;
    --ink: #e6edf3;
    --ink-muted: #93a1b3;
    --ink-faint: #6b7a8d;
    --accent: #d92f2f;
    --accent-soft: #f0564f;
    --accent-dim: rgba(217, 47, 47, 0.16);
    --good: #2f9e57;
    --warn: #d9a02f;
    --board-dark: #16181c;
    --board-light: #efe3c4;
    --board-red: #c8342c;
    --board-green: #1e8449;
    --board-wire: #8a7c5c;
    --radius: 14px;
    --radius-small: 9px;
    --gap: 1rem;
    --gap-large: 1.5rem;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--surface);
    color: var(--ink);
    -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

h1 {
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem);
}

h2 {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
}

h3 {
    font-size: 0.78rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

p {
    margin: 0;
    line-height: 1.6;
}

a {
    color: var(--accent-soft);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.85em;
    background: var(--surface-sunken);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.muted {
    color: var(--ink-muted);
}

.small {
    font-size: 0.85rem;
}

.strong {
    font-weight: 650;
    color: var(--ink);
}

.error,
.success,
.warning {
    border-radius: var(--radius-small);
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.error {
    background: rgba(217, 47, 47, 0.14);
    color: #ffb4ae;
}

.success {
    background: rgba(47, 158, 87, 0.14);
    color: #9be0b4;
}

.warning {
    background: rgba(217, 160, 47, 0.14);
    color: #f0d08a;
}

.banner {
    margin-bottom: var(--gap);
}

.notice {
    padding: 4rem 1rem;
    text-align: center;
    color: var(--ink-muted);
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem var(--gap);
    padding: 0.7rem clamp(0.85rem, 3vw, 1.5rem);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-size: 1.02rem;
    white-space: nowrap;
}

.topbar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    flex: 1 1 auto;
    order: 3;
    width: 100%;
}

.topbar-links a {
    color: var(--ink-muted);
    font-size: 0.9rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.topbar-links a:hover,
.topbar-links a[aria-current="page"] {
    color: var(--ink);
    text-decoration: none;
    border-bottom-color: var(--accent);
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.who {
    font-size: 0.88rem;
    color: var(--ink-muted);
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(0.85rem, 2.5vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(0.9rem, 2.5vw, 1.35rem);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--gap);
}

.tile {
    gap: 0.35rem;
}

.tile-figure {
    margin: 0;
    font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.1rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

button,
.primary,
.ghost,
.danger {
    font: inherit;
    border-radius: var(--radius-small);
    border: 1px solid transparent;
    padding: 0.6rem 1rem;
    cursor: pointer;
    min-height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition:
        background 120ms ease,
        border-color 120ms ease,
        opacity 120ms ease;
}

.primary {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.primary:hover:not(:disabled) {
    background: var(--accent-soft);
    text-decoration: none;
}

.ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--ink);
}

.ghost:hover:not(:disabled) {
    background: var(--surface-hover);
    text-decoration: none;
}

.danger {
    background: transparent;
    border-color: rgba(217, 47, 47, 0.55);
    color: #ff9d95;
}

.danger:hover:not(:disabled) {
    background: var(--accent-dim);
}

button:disabled,
.primary:disabled,
.ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tiny {
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    min-height: 2.1rem;
}

.big {
    padding: 0.85rem 1.5rem;
    font-size: 1.02rem;
    min-height: 3rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem var(--gap);
}

label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
    font-weight: 500;
}

.field-value {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
    background: var(--surface-sunken);
    color: var(--ink);
    font: inherit;
    min-height: 2.75rem;
}

input:focus,
select:focus {
    border-color: var(--border-strong);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    min-height: 1.75rem;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
.wedge:focus-visible,
.hint:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
}

.switch {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink);
    justify-content: flex-start;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    cursor: pointer;
}

.switch input {
    accent-color: var(--accent);
    width: 1.15rem;
    height: 1.15rem;
    flex: none;
    cursor: pointer;
}

.switch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.2rem var(--gap);
}

.inline-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.inline-label select {
    width: auto;
    min-width: 11rem;
}

.inline-field {
    display: flex;
    gap: 0.5rem;
}

.inline-field input {
    flex: 1;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem var(--gap-large);
    padding: 0.75rem 0.9rem;
    background: var(--surface-sunken);
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
}

.hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    position: relative;
    flex: none;
}

.hint-bubble {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: min(19rem, 70vw);
    background: #05070a;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ink);
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease;
    z-index: 30;
    box-shadow: var(--shadow);
    pointer-events: none;
}

.hint:hover .hint-bubble,
.hint:focus .hint-bubble,
.hint:focus-visible .hint-bubble {
    opacity: 1;
    visibility: visible;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.76rem;
    font-weight: 600;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    white-space: nowrap;
}

.badge-admin {
    color: #f0d08a;
    border-color: rgba(217, 160, 47, 0.45);
    background: rgba(217, 160, 47, 0.12);
}

.badge-you {
    color: var(--accent-soft);
    border-color: rgba(217, 47, 47, 0.45);
    background: var(--accent-dim);
}

.badge-open {
    color: #9be0b4;
    border-color: rgba(47, 158, 87, 0.45);
    background: rgba(47, 158, 87, 0.12);
}

.badge-used {
    color: var(--ink-faint);
}

.gate {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(0.85rem, 4vw, 2rem);
}

.gate-card {
    width: min(430px, 100%);
    gap: 0.35rem;
}

.gate-card h1 {
    margin-bottom: 0.15rem;
}

.gate-card button {
    margin-top: 1rem;
}

.listing {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.listing li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    flex-wrap: wrap;
}

.invite {
    gap: 0.5rem;
}

.invite-code {
    flex: 1 1 16rem;
    overflow-wrap: anywhere;
}

.roster {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: seat;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.roster li {
    counter-increment: seat;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    flex-wrap: wrap;
}

.roster li::before {
    content: counter(seat);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 700;
    flex: none;
}

.roster-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.roster-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.game {
    max-width: 1400px;
}

.game-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 24rem);
    gap: var(--gap);
    align-items: start;
}

.board-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    position: sticky;
    top: 4.5rem;
}

.dartboard {
    width: 100%;
    max-width: min(100%, 68dvh);
    aspect-ratio: 1;
    touch-action: manipulation;
    display: block;
}

.board-rim {
    fill: #101216;
    stroke: #05070a;
    stroke-width: 3;
}

.wedge {
    stroke: var(--board-wire);
    stroke-width: 0.7;
    cursor: pointer;
    transition: filter 90ms ease;
}

.wedge:hover {
    filter: brightness(1.5);
}

.wedge:active {
    filter: brightness(0.8);
}

.touch-layer {
    pointer-events: none;
}

.touch-target {
    fill: transparent;
    stroke: none;
    cursor: pointer;
    pointer-events: none;
}

.sector-dark {
    fill: var(--board-dark);
}

.sector-light {
    fill: var(--board-light);
}

.sector-scoring {
    fill: var(--board-red);
}

.sector-bonus {
    fill: var(--board-green);
}

.numeral {
    fill: var(--board-light);
    font-size: 21px;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
}

.dartboard-locked .wedge,
.dartboard-locked .touch-target {
    cursor: not-allowed;
    pointer-events: none;
}

.dartboard-locked .wedge {
    filter: grayscale(0.65) brightness(0.7);
}

.board-controls {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.board-controls button {
    flex: 1 1 7rem;
    max-width: 12rem;
}

.miss-button {
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    color: var(--ink);
    font-weight: 600;
}

.checkout-chips {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.chip {
    background: var(--accent-dim);
    color: #ffb4ae;
    border: 1px solid rgba(217, 47, 47, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 650;
    font-size: 0.92rem;
    white-space: nowrap;
}

.chip-added {
    background: rgba(47, 158, 87, 0.12);
    border-color: rgba(47, 158, 87, 0.4);
    color: #9be0b4;
}

.scoreboard {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-right: 0.15rem;
}

.seat {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 4px solid transparent;
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.seat-active {
    border-left-color: var(--accent);
    background: var(--surface-hover);
}

.seat-departed {
    opacity: 0.45;
}

.seat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.seat-name {
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seat-tally {
    display: flex;
    gap: 0.3rem;
    font-variant-numeric: tabular-nums;
    flex: none;
}

.tally-sets,
.tally-legs {
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.tally-sets {
    color: var(--warn);
}

.seat-remaining {
    margin: 0;
    font-size: clamp(2.4rem, 1.4rem + 4vw, 3.6rem);
    font-weight: 750;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.seat-active .seat-remaining {
    color: #fff;
}

.seat-darts {
    list-style: none;
    display: flex;
    gap: 0.35rem;
    margin: 0.15rem 0;
    padding: 0;
}

.dart-slot {
    flex: 1;
    text-align: center;
    padding: 0.3rem 0.2rem;
    border-radius: 7px;
    background: var(--surface-sunken);
    border: 1px dashed var(--border);
    font-size: 0.8rem;
    min-height: 2rem;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dart-filled {
    border-style: solid;
    border-color: var(--accent);
    color: var(--ink);
    font-weight: 600;
}

.seat-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    flex-wrap: wrap;
}

.prompt {
    text-align: center;
    align-items: center;
}

.prompt-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, 0.72);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 40;
}

.dialog {
    width: min(28rem, 100%);
    text-align: center;
    align-items: center;
    box-shadow: var(--shadow);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.grid th,
.grid td {
    text-align: left;
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.grid thead th {
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom-color: var(--border-strong);
    white-space: nowrap;
}

.grid tbody tr:last-child td {
    border-bottom: none;
}

.grid tbody tr:hover {
    background: var(--surface-sunken);
}

.grid .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.grid .player {
    font-weight: 550;
}

.cell-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    vertical-align: middle;
}

.actions-column {
    text-align: right;
    width: 1%;
}

.row-actions > * {
    margin-left: 0.4rem;
}

.row-actions {
    text-align: right;
    white-space: nowrap;
}

.gate-back {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
}

.dense th,
.dense td {
    padding: 0.35rem 0.55rem;
}

.row-bust td {
    color: #ffb4ae;
}

.rank {
    font-weight: 700;
    color: var(--ink-muted);
}

.rank-first .rank {
    color: #f5d76e;
}

.rank-second .rank {
    color: #d5dbe3;
}

.rank-third .rank {
    color: #d9a06b;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.chart {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.chart figcaption {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.chart-canvas {
    width: 100%;
    height: auto;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.axis {
    stroke: var(--border-strong);
    stroke-width: 1;
}

.axis-label {
    fill: var(--ink-faint);
    font-size: 11px;
}

.trend-line {
    stroke: var(--accent-soft);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.trend-dot {
    fill: var(--accent);
}

.bar {
    fill: var(--accent);
    opacity: 0.82;
}

.bar:hover {
    opacity: 1;
}

.landing {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 3rem) clamp(0.9rem, 4vw, 1.5rem) 3rem;
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 6vw, 3.5rem);
}

.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.9rem;
    padding-top: clamp(1rem, 5vw, 3rem);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent-soft);
}

.landing-hero h1 {
    font-size: clamp(2.1rem, 1.3rem + 4.5vw, 4rem);
    letter-spacing: -0.03em;
    max-width: 16ch;
}

.lede {
    font-size: clamp(1rem, 0.95rem + 0.5vw, 1.2rem);
    color: var(--ink-muted);
    max-width: 56ch;
}

.landing-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.4rem;
}

.landing-board {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(1.2rem, 4vw, 2.5rem);
}

.landing-board-art svg {
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
}

.landing-board-copy {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.landing-board-copy p {
    color: var(--ink-muted);
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: var(--gap);
}

.landing-feature {
    gap: 0.5rem;
}

.landing-feature h3 {
    color: var(--ink);
    text-transform: none;
    letter-spacing: -0.01em;
    font-size: 1.05rem;
}

.landing-feature p {
    color: var(--ink-muted);
    font-size: 0.94rem;
}

.landing-steps {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--gap);
}

.steps li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid rgba(217, 47, 47, 0.4);
    color: var(--accent-soft);
    font-weight: 700;
    flex: none;
}

.steps h3 {
    color: var(--ink);
    text-transform: none;
    letter-spacing: -0.01em;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.steps p {
    color: var(--ink-muted);
    font-size: 0.92rem;
}

.landing-close {
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: clamp(1.5rem, 5vw, 2.5rem);
}

.landing-foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.86rem;
    color: var(--ink-faint);
}

@media (pointer: coarse) {
    .wedge,
    .bull-outer,
    .bull-inner {
        pointer-events: none;
    }

    .touch-layer,
    .touch-target {
        pointer-events: auto;
    }
}

@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: 1fr;
    }

    .board-column {
        position: static;
    }

    .dartboard {
        max-width: min(100%, 60dvh);
    }

    .scoreboard {
        max-height: none;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .seat {
        flex: 1 1 min(100%, 17rem);
    }
}

@media (max-width: 720px) {
    .topbar {
        padding: 0.6rem 0.85rem;
        gap: 0.5rem;
    }

    .topbar-links {
        gap: 0.25rem 0.85rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .topbar-links::-webkit-scrollbar {
        display: none;
    }

    .topbar-links a {
        white-space: nowrap;
    }

    .dartboard {
        max-width: 100%;
    }

    .seat-remaining {
        font-size: clamp(2.6rem, 12vw, 3.4rem);
    }

    .grid .optional,
    .grid thead .optional {
        display: none;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .inline-label {
        justify-content: space-between;
        width: 100%;
    }

    .inline-label select {
        min-width: 0;
        flex: 1 1 9rem;
    }

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

    .landing-actions .primary,
    .landing-actions .ghost {
        flex: 1 1 12rem;
    }

    .hint-bubble {
        left: auto;
        right: 0;
        transform: none;
    }
}

@media (max-width: 420px) {
    .board-controls button {
        flex: 1 1 100%;
        max-width: none;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .tiles {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (orientation: landscape) and (max-height: 560px) {
    .game-grid {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 20rem);
    }

    .dartboard {
        max-width: min(100%, 82dvh);
    }

    .scoreboard {
        flex-direction: column;
        max-height: calc(100dvh - 6rem);
        overflow-y: auto;
    }

    .seat-remaining {
        font-size: clamp(1.8rem, 7vh, 2.6rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
