@font-face {
    font-family: "Garet";
    src: url("/assets/fonts/Garet-Book.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Garet";
    src: url("/assets/fonts/Garet-Heavy.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #08090d;
    --raise: #12141b;
    --ink: #f4f0e6;
    --muted: #a39b8e;
    --line: rgba(244, 240, 230, 0.14);
    --gold: #e4b15a;
    --gold-ink: #1a1408;
    --display: "Garet", "Exo", sans-serif;
    --ui: "Exo", sans-serif;
    --text: "Barlow", sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--text);
    font-size: 1.05rem;
    line-height: 1.5;
}

body > main { flex: 1 0 auto; }

a { color: inherit; }

button, input { font: inherit; }

.top {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 5;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.85rem 1.5rem;
    align-items: center;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: #08090d;
}

a.mark {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
    text-decoration: none;
}

a.mark img {
    display: block;
    width: min(26rem, 70vw);
    height: auto;
}

.top-tools {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    gap: 0.7rem 1.15rem;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.account {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.lang-pick { position: relative; }

.lang-pick summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
    cursor: pointer;
    color: var(--ink);
    font-family: var(--ui);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lang-pick summary::-webkit-details-marker { display: none; }

.lang-pick summary::after {
    content: "";
    width: 0.38rem;
    height: 0.38rem;
    margin-left: 0.15rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-0.12rem);
}

.flag {
    display: block;
    width: 1.35rem;
    height: 0.9rem;
    flex: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.lang-menu {
    position: absolute;
    right: 0;
    z-index: 6;
    min-width: 12rem;
    margin-top: 0.5rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    background: #12141b;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.lang-menu a.is-on,
.lang-menu a:hover,
.lang-menu a:focus-visible {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.05);
}

.account a, .account button, .switch a {
    white-space: nowrap;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.langs a.is-on { color: var(--ink); }

.account button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.account a.who {
    color: var(--gold);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

.button, button.button, a.button, label.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    padding: 0.55rem 1rem;
    border: 0;
    background: var(--gold);
    color: var(--gold-ink);
    cursor: pointer;
    font-family: var(--ui);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

.button:hover, a.button:hover, label.button:hover { background: #f0c57a; }

.button.quiet, button.button.quiet {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.button.quiet:hover, button.button.quiet:hover {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.sheet {
    width: min(76rem, calc(100% - 3rem));
    margin: 0 auto;
}

.band {
    width: 100%;
    background-color: #08090d;
    background-repeat: no-repeat;
    background-size: cover;
}

.band-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40rem;
    overflow: hidden;
    background: #145628;
}

.band-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(6, 16, 8, 0.28), rgba(6, 16, 8, 0.05) 30%, rgba(6, 16, 8, 0.2));
}

.fm-pitch {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.fm-pitch svg {
    display: block;
    width: 100%;
    height: 100%;
}

.fm-lines, .fm-goals {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2.5;
    stroke-linejoin: miter;
}

.fm-spot { fill: rgba(255, 255, 255, 0.92); stroke: none; }

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 22rem);
    gap: 2rem 2.4rem;
    align-items: center;
}

.census {
    justify-self: end;
    width: min(22rem, 100%);
    padding: 0.95rem 1rem 0.55rem;
    border: 1px solid rgba(228, 177, 90, 0.45);
    background: rgba(12, 16, 12, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.census-kicker {
    display: flex;
    align-items: center;
    margin: 0;
    color: var(--gold);
    font-family: var(--ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.live {
    width: 0.48rem;
    height: 0.48rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: #8dffb0;
    box-shadow: 0 0 0 0 rgba(141, 255, 176, 0.7);
    animation: live 1.8s ease-out infinite;
}

.census-total {
    margin: 0.35rem 0 0;
    font-family: var(--display);
    font-size: 4.2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
}

.census-label {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.census ul {
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
}

.census li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: baseline;
    padding: 0.42rem 0;
    border-top: 1px solid rgba(244, 240, 230, 0.12);
    font-size: 0.98rem;
}

.census li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.census b {
    font-family: var(--ui);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.census .is-live b { color: var(--gold); }

.census .is-quiet { color: #b7ad9e; }

@keyframes live {
    70% { box-shadow: 0 0 0 0.45rem rgba(141, 255, 176, 0); }
}

.band-shelf {
    background-image:
        linear-gradient(180deg, rgba(8, 9, 13, 0.86), rgba(8, 9, 13, 0.9)),
        url("/assets/photos/hero.jpg");
    background-position: center 40%;
}

.band-ground {
    background-image:
        linear-gradient(180deg, rgba(8, 9, 13, 0.84), rgba(8, 9, 13, 0.92)),
        url("/assets/photos/ground.jpg");
    background-position: center 80%;
}

.wrap {
    width: min(76rem, calc(100% - 3rem));
    margin: 0 auto;
}

.band-hero .wrap { padding: 3.2rem 0 3.4rem; }

.band-shelf .wrap, .band-ground .wrap { padding: 2.8rem 0 3rem; }

.hero-copy {
    padding: 1.25rem 1.4rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 14, 9, 0.94);
}

.hero-copy h1 {
    font-size: clamp(2rem, 3.4vw, 3.25rem);
    line-height: 1.02;
}

.about {
    margin: 0.95rem 0 0;
    max-width: 38rem;
    color: var(--ink);
    font-size: 1.12rem;
}

.ask-line {
    margin: 1.15rem 0 0.75rem;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.sheet { padding: 3.2rem 0 4rem; }

.narrow { max-width: 36rem; }

.kicker, .game-action {
    margin: 0 0 0.8rem;
    color: var(--gold);
    font-family: var(--ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1, h2, h3, .game-name, .answer {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.035em;
}

h1 {
    margin: 0;
    font-size: clamp(3.1rem, 8vw, 6rem);
    line-height: 0.92;
}

h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

h3 { margin: 0.35rem 0; font-size: 1.45rem; }

.lede, .games-note, .empty, .next, .ask-note, .switch, .marks p {
    max-width: 40rem;
    color: var(--muted);
}

.lede { margin: 1.15rem 0 1.6rem; font-size: 1.25rem; }

.hero-copy .lede { margin: 0.45rem 0 0; font-size: 1.05rem; }

.answer {
    margin: 0 0 1.2rem;
    color: var(--gold);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.ask, .account-form {
    display: grid;
    gap: 0.85rem;
    max-width: 36rem;
}

.ask {
    grid-template-columns: 1fr auto;
    align-items: end;
}

label { display: grid; gap: 0.35rem; }

.check {
    grid-template-columns: 1.15rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
}

.check input {
    width: 1.15rem;
    min-height: 1.15rem;
    margin-top: 0.25rem;
    padding: 0;
    accent-color: var(--gold);
}

.check span {
    color: var(--ink);
    font-family: var(--text);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.check a { color: var(--gold); }

label span {
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

input, select, textarea {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line);
    background: var(--raise);
    color: var(--ink);
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.saved { margin: 0 0 1rem; color: var(--gold); }

.ask-note, .switch { margin: 0.85rem 0 0; font-size: 0.95rem; }

.switch a { color: var(--gold); letter-spacing: 0.04em; }
.switch a.button { color: var(--gold-ink); letter-spacing: 0.12em; }
.switch a.button.quiet { color: var(--ink); }

.leagues {
    display: grid;
    gap: 0;
    margin: 1.2rem 0 0;
    padding: 0;
    list-style: none;
}

.league {
    display: grid;
    grid-template-columns: 8.2rem minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.cover {
    display: block;
    color: inherit;
    text-decoration: none;
}

.cover img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
    background: #101218;
}

.league-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    align-items: baseline;
}

.league-head time {
    font-family: var(--ui);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.league-head h3 { margin: 0; font-size: 1.35rem; }

.league-head .game-action { margin: 0; }

.ranks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 1.6rem;
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
}

.ranks li {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.28rem 0;
}

.rank-who {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.rank-who span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranks a:hover, .ranks a:focus-visible, .rank-who:hover, .rank-who:focus-visible { color: var(--gold); }

.face-sm {
    flex: 0 0 auto;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--raise);
    object-fit: cover;
}

span.face-sm {
    display: grid;
    place-items: center;
    color: var(--gold);
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.pos, .pts {
    font-family: var(--ui);
    font-variant-numeric: tabular-nums;
}

.pos { color: var(--gold); font-weight: 700; }

.pts { color: var(--muted); font-size: 0.92rem; }

.empty-rank { margin: 0.7rem 0 0; color: var(--muted); }

.games-note a { color: var(--gold); }

.rank-page .ranks { grid-template-columns: minmax(16rem, 36rem); }

.rank-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin: 0.2rem 0 0.4rem;
    padding: 0;
    list-style: none;
}

.rank-switch a {
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.rank-switch a.is-on, .rank-switch a:hover, .rank-switch a:focus-visible { color: var(--gold); }

.pager {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.3rem;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pager a { color: var(--gold); text-decoration: none; }

.profile-games small {
    display: block;
    margin-top: 0.25rem;
    color: var(--gold);
    font-family: var(--ui);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.add-diary { margin-top: 2.4rem; }

.game-pick {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 28rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.game-pick li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid rgba(244, 240, 230, 0.16);
}

.game-pick a {
    color: inherit;
    font-family: var(--display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.game-pick a:hover, .game-pick a:focus-visible { color: var(--gold); }

.game-pick .is-soon span { color: #6f685e; }

.game-pick small {
    color: #6f685e;
    font-family: var(--ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.era {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
    position: relative;
    margin: 1.4rem 0 0;
    padding: 0 0 2.2rem;
    list-style: none;
}

.era::before {
    content: "";
    position: absolute;
    top: 1.85rem;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(244, 240, 230, 0.38);
}

.stop {
    display: flex;
    position: relative;
    min-height: 100%;
    flex-direction: column;
    padding-top: 2.7rem;
    color: inherit;
    text-decoration: none;
}

.stop time {
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--ui);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.stop::before {
    content: "";
    position: absolute;
    top: 1.62rem;
    left: 0;
    z-index: 1;
    width: 0.5rem;
    height: 0.5rem;
    border: 1px solid rgba(244, 240, 230, 0.75);
    border-radius: 50%;
    background: var(--bg);
}

.stop img {
    width: 100%;
    height: 7.2rem;
    margin-top: 0.85rem;
    object-fit: cover;
    object-position: center top;
    background: #101218;
}

.game-name {
    margin-top: 0.75rem;
    font-size: 1.02rem;
    line-height: 1.15;
}

.game-action { margin: 0.55rem 0 0; }

.is-open time, .is-open .game-action { color: var(--gold); }

.is-open .stop::before {
    border-color: var(--gold);
    background: var(--gold);
}

a.stop:hover .game-name, a.stop:focus-visible .game-name { color: var(--gold); }

.is-soon img {
    filter: grayscale(1);
    opacity: 0.55;
}

.is-soon .game-name, .is-soon .game-action, .is-soon time { color: #6f685e; }

.board { margin-top: 0.4rem; }

.pitch {
    display: block;
    width: 100%;
    height: auto;
    color: rgba(244, 240, 230, 0.72);
}

.pitch rect, .pitch line, .pitch circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.pitch .spot { fill: currentColor; stroke: none; }

.pitch .run {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2.4;
    stroke-linecap: round;
}

.pitch .mark { fill: var(--gold); stroke: none; }

.marks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 0.3rem 0 0;
    padding: 0;
    list-style: none;
}

.marks p { margin: 0; font-size: 0.98rem; }

.back {
    display: inline-block;
    margin-bottom: 1.4rem;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

.sheet-logo {
    display: block;
    width: min(100%, 22rem);
    height: 6.5rem;
    margin-bottom: 1rem;
    object-fit: contain;
    object-position: left center;
}

.empty { margin: 1.2rem 0 0.35rem; color: var(--ink); }

.next { margin: 0; }

.save-form { margin-top: 1.6rem; }

.save-progress { display: grid; gap: 0.45rem; }

.save-progress p { margin: 0; color: var(--gold); }

.save-progress.is-bad p { color: #ffb4a8; }

.save-wait { color: var(--muted); }

.save-progress.is-bad .save-wait { display: none; }

.save-progress.is-bad .track { display: none; }

.save-progress .track {
    height: 0.55rem;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #1c2018;
}

.save-progress .track span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--gold);
}

.save-progress.is-read .track span {
    width: 38%;
    animation: save-slide 1.15s ease-in-out infinite;
}

@keyframes save-slide {
    from { transform: translateX(-130%); }
    to { transform: translateX(280%); }
}

@media (prefers-reduced-motion: reduce) {
    .save-progress.is-read .track span {
        width: 100%;
        animation: none;
        opacity: 0.75;
    }
}

input[type="file"]::file-selector-button {
    margin-right: 0.8rem;
    border: 0;
    background: var(--gold);
    color: var(--gold-ink);
    padding: 0.45rem 0.75rem;
    font-family: var(--ui);
    font-weight: 700;
    cursor: pointer;
}

.career-list {
    list-style: none;
    margin: 1.2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.career-list > li {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    background: var(--raise);
}

.career-list h2 { margin: 0 0 0.45rem; font-size: 1.6rem; }

.identity {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1.2rem 1.6rem;
    align-items: center;
    margin: 0.6rem 0 1.4rem;
}

.identity h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }

.identity .face {
    width: 7.5rem;
    height: 7.5rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--raise);
    object-fit: cover;
}

.identity div.face {
    display: grid;
    place-items: center;
    color: var(--gold);
    font-family: var(--display);
    font-size: 2.6rem;
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.7rem;
    margin: 1rem 0 0;
}

.facts div {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    background: var(--raise);
}

.facts dt {
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.facts dd { margin: 0.25rem 0 0; }

.switch form { display: flex; flex: 0 0 auto; width: auto; margin: 0; }
.links { align-items: center; }

.rank-board {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.4rem 0 0;
}

.rank-card {
    min-width: 16rem;
    padding: 0.85rem 1rem 1rem;
    border: 1px solid var(--line);
    background: var(--raise);
}

.rank-card .kicker { margin-bottom: 0.55rem; }

.rank-card dl {
    display: flex;
    gap: 1.4rem;
    margin: 0;
}

.rank-card dt {
    color: var(--muted);
    font-family: var(--ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rank-card dd {
    margin: 0.15rem 0 0;
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.watch-list, .inbox, .thread {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
}

.watch-list a, .inbox a, .thread h1 a {
    color: inherit;
    text-decoration: none;
}

.watch-list a:hover, .inbox a:hover, .thread h1 a:hover { color: var(--gold); }

.inbox li { border-top: 1px solid var(--line); }

.inbox a {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0;
}

.inbox span {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox .is-unread strong { color: var(--gold); }

.thread li {
    max-width: 36rem;
    margin: 0 0 0.7rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
}

.thread .is-mine { margin-left: auto; border-color: var(--gold); }

.thread p { margin: 0; white-space: pre-wrap; }

.thread time {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
}

textarea { min-height: 7rem; resize: vertical; }

.profile-games {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 1.8rem 0 0;
    padding: 0;
    list-style: none;
}

.profile-games a {
    display: block;
    width: 11rem;
    color: inherit;
    text-decoration: none;
}

.profile-games img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--line);
    background: #101218;
}

.profile-games span {
    display: block;
    margin-top: 0.6rem;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.profile-games a:hover span, .profile-games a:focus-visible span { color: var(--gold); }

.game-record { margin-top: 0.4rem; }

.game-record h2 { margin: 0 0 0.35rem; font-size: 1.8rem; }

.record-points {
    margin: 0 0 0.9rem;
    color: var(--gold);
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.record-facts {
    grid-template-columns: repeat(auto-fit, minmax(8.6rem, 1fr));
    margin-bottom: 0.9rem;
}

.record-facts dd {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.record-saves {
    list-style: none;
    margin: 0;
    padding: 0;
}

.record-saves a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}

.record-saves a:hover, .record-saves a:focus-visible { color: var(--gold); }

.record-saves strong, .record-saves .meta { display: block; }

.record-saves .meta { margin: 0.1rem 0 0; }

.links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.photo-field { display: grid; gap: 0.7rem; }

.photo-now {
    width: 5.5rem;
    height: 5.5rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 640px) {
    .identity { grid-template-columns: 1fr; }
}

.meta { margin: 0.15rem 0; color: var(--muted); }

.pages {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
}

.pages li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0;
    border-top: 1px solid var(--line);
}

.pages a { flex: 1; min-width: 0; }

.page-name { display: inline-flex; align-items: center; gap: 0.45rem; }

.page-update {
    flex: none;
    color: var(--gold);
    cursor: pointer;
}

.pages a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    color: inherit;
    text-decoration: none;
}

.pages a:hover { color: var(--gold); }

.save-tools { margin: 0.2rem 0 1.5rem; }

.save-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.save-actions .save-form { margin: 0; }

.file-clip {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.9rem;
    margin: 0.8rem 0 1rem;
}

.history-tile {
    padding: 1rem 1.1rem 1.15rem;
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    background: var(--raise);
}

.history-tile span { color: var(--muted, var(--paper)); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; }

.history-tile strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 2rem;
    line-height: 1;
}

.history-tile strong.is-plus { color: var(--gold); }

.history-tile strong.is-minus { color: #ffb4a8; }

.honour-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.honour-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--line);
    background: var(--raise);
    border-left: 3px solid var(--gold);
}

.honour-chip.is-league { border-left-color: #8eb4ff; }

.honour-chip small { color: var(--gold); }

.season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.save-hero, .club-line, .with-crest, .tile-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.save-hero { margin: 0.35rem 0 1.5rem; }

.save-hero h1, .save-hero .kicker, .save-hero .meta { margin-top: 0; margin-bottom: 0.15rem; }

.club-line, .with-crest { gap: 0.4rem; }

.with-crest { display: inline-flex; vertical-align: middle; }

.crest { display: block; flex: none; line-height: 0; }

.crest svg, .crest img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35)); }

.crest-lg { width: 5.5rem; height: 5.5rem; }

.crest-md { width: 3.6rem; height: 3.6rem; }

.crest-sm { width: 2.7rem; height: 2.7rem; }

.crest-xs { width: 1.35rem; height: 1.35rem; }

.crest-xs svg, .crest-xs img { filter: none; }

.tile-head { align-items: center; }

.tile-head .year, .tile-head .club { display: block; }

.season-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.15rem 1.2rem;
    border: 1px solid var(--line);
    border-top: 3px solid var(--mark, var(--gold));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--mark, var(--gold)) 16%, transparent), transparent 2.8rem),
        var(--raise);
    color: inherit;
    text-decoration: none;
}

.season-tile:hover { border-color: var(--gold); }

.season-tile .year {
    font-family: var(--display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 0.95;
}

.season-tile .club { color: var(--gold); }

.season-tile ul {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    color: var(--muted);
}

.season-tile li { margin: 0.15rem 0; }

.money { margin-top: 1.2rem; }

.money dd.is-plus { color: var(--gold); }

.money dd.is-minus { color: #ffb4a8; }

.moves li.is-top { color: var(--gold); }

.moves a, .honours a { color: inherit; }

.moves a:hover, .honours a:hover { color: var(--gold); }

.season { margin: 1.4rem 0 0; }

.honours, .moves ul {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
}

.honours li, .moves li {
    padding: 0.35rem 0;
    border-top: 1px solid var(--line);
}

.moves {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem 1.6rem;
    margin-top: 0.8rem;
}

.moves h3 { color: var(--gold); font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; }

.error {
    margin: 0 0 1rem;
    color: #ffb4a8;
}

.db {
    width: min(72rem, calc(100% - 3rem));
    margin: 0 auto;
    padding: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-foot {
    border-top: 1px solid var(--line);
    background: #08090d;
}

.foot {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto minmax(16rem, 22rem);
    gap: 1.4rem 2rem;
    align-items: start;
    padding: 2rem 0 1.3rem;
}

.foot:not(:has(.cookie-box)) { grid-template-columns: minmax(0, 1.4fr) auto; }

a.foot-brand {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

a.foot-brand img {
    display: block;
    width: min(18rem, 100%);
    height: auto;
}

.foot-note {
    max-width: 28rem;
    margin: 0.45rem 0 0;
    color: var(--muted);
}

.foot nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.foot nav a {
    color: var(--ink);
    font-family: var(--ui);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.foot nav a:hover, .foot nav a:focus-visible { color: var(--gold); }

.cookie-box {
    padding: 0.85rem 0.95rem 0.95rem;
    border: 1px solid rgba(228, 177, 90, 0.45);
    background: #12141b;
}

.cookie-box p {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.foot-copy,
.foot-credit {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.foot-credit { margin-top: 0.35rem; }

.foot-credit a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.foot-credit a:hover,
.foot-credit a:focus-visible { color: var(--gold); }

.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

.legal section { margin-top: 1.45rem; }

.legal h2 {
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
}

.legal p { max-width: 42rem; }

@media (max-width: 980px) {
    .marks, .ranks, .hero-grid { grid-template-columns: 1fr; }
    .band-hero { min-height: 0; }
    .band-hero::before {
        background: linear-gradient(180deg, rgba(6, 16, 8, 0.45), rgba(6, 16, 8, 0.2));
    }
    .census { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
    .live { animation: none; }
}

@media (max-width: 720px) {
    .top, .top-tools { align-items: flex-start; }
    .top { flex-direction: column; }
    .ask, .foot, .foot:not(:has(.cookie-box)) { grid-template-columns: 1fr; }
    .league { grid-template-columns: 6.2rem minmax(0, 1fr); }
    .era {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }
    .era::before {
        top: 0;
        bottom: 0;
        left: 0.22rem;
        width: 1px;
        height: auto;
    }
    .stop { padding: 0 0 0 1.35rem; }
    .stop time { position: static; }
    .stop::before { top: 0.28rem; left: 0; }
    .stop img { height: 3.2rem; }
}
