/* =====================================================================
   Ruylopez — shared design system
   ===================================================================== */

:root {
    color-scheme: dark;

    --bg: #0b0e13;
    --bg-glow: #17233b;
    --surface: #141922;
    --surface-2: #1a212c;
    --surface-3: #212a37;

    --border: #27303d;
    --border-strong: #364152;

    --text: #e9eef6;
    --text-dim: #aab5c4;
    --muted: #7e8a9c;

    --primary: #6d8cff;
    --primary-strong: #587aff;
    --primary-soft: rgba(109, 140, 255, 0.14);

    --success: #46cd8b;
    --success-soft: rgba(70, 205, 139, 0.14);
    --danger: #ff6b6b;
    --danger-soft: rgba(255, 107, 107, 0.13);
    --warning: #f0b849;
    --warning-soft: rgba(240, 184, 73, 0.14);

    --radius: 14px;
    --radius-sm: 9px;
    --radius-xs: 6px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.5);

    --maxw: 1080px;

    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        monospace;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            1100px 620px at 50% -220px,
            var(--bg-glow) 0,
            transparent 70%
        ),
        var(--bg);

    color: var(--text);
    font-family: var(--font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin: 0 0 0.4em;
    font-weight: 650;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem);
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.08rem;
}

p {
    margin: 0 0 1rem;
    color: var(--text-dim);
}

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

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--mono);
    font-size: 0.88em;
    padding: 0.15em 0.42em;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
}

/* ---------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------- */

.container {
    width: min(var(--maxw), calc(100% - 40px));
    margin: 0 auto;
}

.page {
    flex: 1 0 auto;
    padding: 40px 0 72px;
}

.page--narrow {
    width: min(560px, calc(100% - 40px));
    margin: 0 auto;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.row--between {
    justify-content: space-between;
}

.spacer {
    flex: 1 1 auto;
}

.center {
    text-align: center;
}

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

.dim {
    color: var(--text-dim);
}

/* ---------------------------------------------------------------------
   Top navigation
   --------------------------------------------------------------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;

    backdrop-filter: saturate(160%) blur(14px);
    background: rgba(11, 14, 19, 0.78);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    width: min(var(--maxw), calc(100% - 40px));
    margin: 0 auto;
    min-height: 62px;

    display: flex;
    align-items: center;
    gap: 10px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand__mark {
    display: grid;
    place-items: center;

    width: 32px;
    height: 32px;

    font-size: 1.15rem;
    line-height: 1;

    color: #fff;
    background: linear-gradient(150deg, var(--primary), #9a7bff);
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(109, 140, 255, 0.4);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 14px;
}

.nav__link {
    padding: 8px 13px;
    border-radius: var(--radius-sm);

    color: var(--text-dim);
    font-size: 0.93rem;
    font-weight: 550;
    white-space: nowrap;
}

.nav__link:hover {
    color: var(--text);
    background: var(--surface-2);
    text-decoration: none;
}

.nav__link.is-active {
    color: var(--text);
    background: var(--surface-3);
}

.nav__auth {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav__user {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 12px 6px 6px;
    border-radius: 999px;

    color: var(--text-dim);
    font-size: 0.88rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.nav__user:hover {
    color: var(--text);
    text-decoration: none;
    border-color: var(--border-strong);
}

.nav__avatar {
    display: grid;
    place-items: center;

    width: 26px;
    height: 26px;

    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;

    color: var(--bg);
    background: var(--primary);
    border-radius: 999px;
}

.nav__toggle {
    display: none;

    margin-left: auto;
    padding: 8px 12px;

    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 17px;

    font: inherit;
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.2;

    color: var(--text);
    background: var(--surface-2);

    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);

    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.08s ease,
        opacity 0.15s ease;
}

.btn:hover {
    background: var(--surface-3);
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    color: #fff;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong));
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(88, 122, 255, 0.34);
}

.btn--primary:hover {
    background: linear-gradient(180deg, #7d99ff, #6684ff);
}

.btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-dim);
}

.btn--ghost:hover {
    color: var(--text);
    background: var(--surface-2);
}

.btn--danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(255, 107, 107, 0.35);
}

.btn--danger:hover {
    background: rgba(255, 107, 107, 0.2);
}

.btn--sm {
    padding: 7px 12px;
    font-size: 0.85rem;
}

.btn--block {
    width: 100%;
}

.btn--lg {
    padding: 13px 22px;
    font-size: 1rem;
}

/* ---------------------------------------------------------------------
   Cards & surfaces
   --------------------------------------------------------------------- */

.card {
    padding: 24px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card--pad-lg {
    padding: 32px;
}

.card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.card__title h2,
.card__title h3 {
    margin: 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head p {
    margin: 4px 0 0;
}

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */

.field {
    display: block;
    margin-bottom: 16px;
}

.field__label {
    display: block;
    margin-bottom: 7px;

    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 550;
}

.field__hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

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

.badge[title] {
    cursor: help;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    padding: 11px 13px;

    font: inherit;
    font-size: 0.95rem;

    color: var(--text);
    background: #0d1118;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;

    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
    color: #5c6675;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% + 1px),
        calc(100% - 13px) calc(50% + 1px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.form-grid .field {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------
   Tabs (auth)
   --------------------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    margin-bottom: 22px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.tab {
    flex: 1;
    padding: 9px 10px;

    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;

    color: var(--muted);
    background: transparent;

    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
}

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

.tab.is-active {
    color: var(--text);
    background: var(--surface-3);
    box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------------
   Badges & pills
   --------------------------------------------------------------------- */

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 11px;

    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.01em;

    border-radius: 999px;
    border: 1px solid transparent;
}

.badge--success {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(70, 205, 139, 0.3);
}

.badge--primary {
    color: #a9bcff;
    background: var(--primary-soft);
    border-color: rgba(109, 140, 255, 0.32);
}

.badge--warning {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(240, 184, 73, 0.3);
}

.badge--muted {
    color: var(--text-dim);
    background: var(--surface-2);
    border-color: var(--border);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 3px 10px;
    font-size: 0.78rem;
    color: var(--text-dim);

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* ---------------------------------------------------------------------
   Alerts & messages
   --------------------------------------------------------------------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 13px 15px;
    margin-bottom: 16px;

    font-size: 0.9rem;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.alert--error {
    color: #ffc2c2;
    background: var(--danger-soft);
    border-color: rgba(255, 107, 107, 0.35);
}

.alert--success {
    color: #b6f2d4;
    background: var(--success-soft);
    border-color: rgba(70, 205, 139, 0.35);
}

.alert--info {
    color: #c3d0ff;
    background: var(--primary-soft);
    border-color: rgba(109, 140, 255, 0.35);
}

.alert--warning {
    color: #f7dca6;
    background: var(--warning-soft);
    border-color: rgba(240, 184, 73, 0.35);
}

.alert code {
    background: rgba(0, 0, 0, 0.25);
}

.message {
    min-height: 20px;
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.message--error {
    color: var(--danger);
}

.message--success {
    color: var(--success);
}

/* ---------------------------------------------------------------------
   Progress
   --------------------------------------------------------------------- */

.progress {
    height: 10px;
    overflow: hidden;

    background: #0a0d12;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.progress__fill {
    width: 0;
    height: 100%;

    background: linear-gradient(90deg, var(--primary), #9a7bff);
    border-radius: inherit;
    transition: width 0.4s ease;
}

.progress__fill--success {
    background: linear-gradient(90deg, #35b878, var(--success));
}

.progress__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;

    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------
   Hero (homepage)
   --------------------------------------------------------------------- */

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
    padding: 34px 0 54px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 5px 12px;
    margin-bottom: 20px;

    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;

    color: #a9bcff;
    background: var(--primary-soft);
    border: 1px solid rgba(109, 140, 255, 0.3);
    border-radius: 999px;
}

.hero h1 {
    margin-bottom: 18px;
}

.hero h1 .accent {
    background: linear-gradient(120deg, #8ba4ff, #b79cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lead {
    font-size: 1.08rem;
    max-width: 46ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero__board {
    position: relative;
}

.hero__board::before {
    content: "";
    position: absolute;
    inset: -18% -12% auto auto;
    width: 60%;
    height: 60%;

    background: radial-gradient(
        circle,
        rgba(109, 140, 255, 0.35),
        transparent 70%
    );
    filter: blur(40px);
    pointer-events: none;
}

.mini-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    aspect-ratio: 1;

    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-strong);
}

.mini-board__square {
    display: grid;
    place-items: center;
}

.mini-board__piece {
    display: block;
    width: 90%;
    height: 90%;
}

.mini-board__square.light {
    background: #e7d3b1;
}

.mini-board__square.dark {
    background: #b9895f;
}

/* ---------------------------------------------------------------------
   Feature grid
   --------------------------------------------------------------------- */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.feature {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feature__icon {
    display: grid;
    place-items: center;

    width: 40px;
    height: 40px;
    margin-bottom: 14px;

    font-size: 1.2rem;

    color: #b7c6ff;
    background: var(--primary-soft);
    border: 1px solid rgba(109, 140, 255, 0.3);
    border-radius: 11px;
}

.feature h3 {
    margin-bottom: 6px;
}

.feature p {
    margin: 0;
    font-size: 0.92rem;
}

/* ---------------------------------------------------------------------
   Puzzle set list
   --------------------------------------------------------------------- */

.set-list {
    display: grid;
    gap: 14px;
}

.set-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;

    padding: 18px 20px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.set-card:hover {
    border-color: var(--border-strong);
}

.set-card__main {
    min-width: 0;
}

.set-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.set-card__title h3 {
    margin: 0;
    font-size: 1.02rem;
}

.set-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.set-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.set-card__progress {
    max-width: 320px;
}

/* ---------------------------------------------------------------------
   Play page
   --------------------------------------------------------------------- */

.play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.board-column {
    min-width: 0;
}

.board-card {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.board-frame {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.board-frame .cm-chessboard {
    border-radius: 10px;
    overflow: hidden;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 84px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat {
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.stat__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.stat__value {
    margin-top: 3px;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.turn-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-weight: 600;
}

.turn-indicator__dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-strong);
    flex: none;
}

.turn-indicator__dot--w {
    background: #f2f4f7;
}

.turn-indicator__dot--b {
    background: #2a2f38;
}

.play-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.play-controls .btn {
    width: 100%;
}

/* Toggle switch (e.g. auto-advance) */

.switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
}

.switch__control {
    position: relative;
    flex: none;
    width: 42px;
    height: 24px;

    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    border-radius: 999px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.switch__control::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;

    background: var(--text-dim);
    border-radius: 50%;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.switch input:checked + .switch__control {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.switch input:checked + .switch__control::after {
    transform: translateX(18px);
    background: var(--primary);
}

.switch input:focus-visible + .switch__control {
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.switch__text {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.switch__hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--muted);
}

.board-status {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 550;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
}

.board-status.is-correct {
    color: #b6f2d4;
    background: var(--success-soft);
    border-color: rgba(70, 205, 139, 0.4);
}

.board-status.is-wrong {
    color: #ffc2c2;
    background: var(--danger-soft);
    border-color: rgba(255, 107, 107, 0.4);
}

.board-status.is-info {
    color: #c3d0ff;
    background: var(--primary-soft);
    border-color: rgba(109, 140, 255, 0.4);
}

/* ---------------------------------------------------------------------
   Cycle statistics
   --------------------------------------------------------------------- */

.card--complete {
    border-color: rgba(70, 205, 139, 0.4);
    background:
        linear-gradient(180deg, var(--success-soft), transparent 60%),
        var(--surface);
}

.history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;

    padding: 12px 14px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.history__label {
    font-weight: 650;
}

.history__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Empty states
   --------------------------------------------------------------------- */

.empty {
    padding: 44px 24px;
    text-align: center;
    color: var(--muted);

    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}

.empty__icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    opacity: 0.7;
}

.empty h3 {
    color: var(--text);
}

/* ---------------------------------------------------------------------
   Skeleton / spinner
   --------------------------------------------------------------------- */

.spinner {
    width: 18px;
    height: 18px;

    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;

    animation: spin 0.7s linear infinite;
}

.spinner--lg {
    width: 30px;
    height: 30px;
    border-width: 3px;
    border-top-color: var(--primary);
}

.loading-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 0;
    color: var(--muted);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------------------------------------------------------------------
   Toasts
   --------------------------------------------------------------------- */

.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;

    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 40px));
}

.toast {
    padding: 12px 16px;

    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);

    font-size: 0.9rem;
    animation: toast-in 0.2s ease;
}

.toast--success {
    border-left-color: var(--success);
}

.toast--error {
    border-left-color: var(--danger);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */

.footer {
    flex: none;
    padding: 26px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Utilities
   --------------------------------------------------------------------- */

.hidden {
    display: none !important;
}

.text-right {
    text-align: right;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
    border: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 14px;
    }

    .hero__board {
        order: -1;
        max-width: 420px;
    }

    .play-layout {
        grid-template-columns: 1fr;
    }

    .side-column {
        position: static;
    }
}

@media (max-width: 680px) {
    .nav__inner {
        flex-wrap: wrap;
        padding: 10px 0;
        row-gap: 8px;
    }

    .nav__toggle {
        display: inline-flex;
    }

    .nav__links {
        order: 3;
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .nav__links.is-open {
        display: flex;
    }

    .nav__links:not(.is-open) {
        display: none;
    }

    .nav__link {
        padding: 11px 12px;
    }

    .nav__auth {
        margin-left: auto;
    }

    .set-card {
        grid-template-columns: 1fr;
    }

    .set-card__actions {
        justify-content: flex-start;
    }
}
