:root {
    --ink: #183f36;
    --muted: #69786e;
    --paper: #f8f6f0;
    --white: #fffefa;
    --line: #dde2d8;
    --sage: #dfe8d5;
    --lilac: #ddd5ed;
    --peach: #f1cfb8;
    --red: #a34237;
    --radius: 22px;
    font-family: Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-size: 16px;
    line-height: 1.55;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: inherit;
    text-underline-offset: 4px;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

button,
summary {
    cursor: pointer;
}

input,
select {
    width: 100%;
    border: 1px solid #cbd4c8;
    border-radius: 12px;
    padding: 13px 15px;
    background: #fffefa;
    color: var(--ink);
    min-height: 49px;
    max-width: 100%;
}

input:focus,
select:focus {
    outline: 2px solid #7b9979;
    outline-offset: 3px;
}

input:disabled {
    background: #eeeee7;
    color: #526357;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid #ad8ac8;
    outline-offset: 5px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 19px;
    min-height: 19px;
    accent-color: var(--ink);
}

input[type="datetime-local"] {
    min-width: 0;
}

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

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

h1 {
    font-size: clamp(2.6rem, 5.2vw, 4.7rem);
    margin-bottom: 25px;
}

h1 em {
    font-weight: 400;
    color: #5d7b60;
}

h2 {
    font-size: 2rem;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.12rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

p {
    margin-bottom: 18px;
}

small,
.muted {
    color: var(--muted);
    font-size: 0.875rem;
}

.lead {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #617166;
    max-width: 620px;
}

.small-lead {
    font-size: 1rem;
}

.eyebrow {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 750;
    margin-bottom: 15px;
}

.site-header {
    max-width: 1320px;
    margin: auto;
    padding: 27px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 750;
    letter-spacing: -0.07em;
}

.brand-dot {
    color: #92a287;
}

.brand-mark {
    width: 37px;
    height: 40px;
    background: var(--ink);
    color: var(--paper);
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 11px;
    position: relative;
    font-size: 1.8rem;
    line-height: 1;
}

.brand-mark span {
    font-size: 0.8rem;
    position: absolute;
    right: 5px;
    top: 3px;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 0.87rem;
    font-weight: 600;
}

.site-header nav a {
    text-decoration: none;
}

.site-header nav form {
    margin: 0;
}

main {
    max-width: 1224px;
    margin: auto;
    padding: 0 36px 55px;
    min-height: 70vh;
}

.site-footer {
    max-width: 1224px;
    border-top: 1px solid var(--line);
    margin: auto;
    padding: 28px 36px 35px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.78rem;
    gap: 20px;
}

.hero {
    padding: 80px 0 62px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 35px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.8rem, 4.8vw, 4.4rem);
}

.hero .eyebrow {
    margin-bottom: 25px;
}

.hero .spark {
    color: #8f9c73;
    font-size: 1.15rem;
    margin-right: 8px;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 27px;
}

.hero-chips span {
    font-size: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 50px;
    padding: 5px 11px;
}

.hero-art {
    position: relative;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.baby-card {
    width: 270px;
    min-height: 320px;
    background: var(--sage);
    border: 1px solid #c7d4be;
    border-radius: 105px 105px 25px 25px;
    transform: rotate(7deg);
    text-align: center;
    padding: 35px 20px 24px;
    box-shadow: 14px 20px 0 #eae6d9;
}

.baby-card .eyebrow {
    font-size: 0.6rem;
    margin-bottom: 12px;
}

.baby-card h2 {
    font-size: 1.85rem;
    margin: 14px 0 23px;
}

.baby-face {
    width: 90px;
    height: 90px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    margin: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.baby-face:before {
    content: "";
    position: absolute;
    top: -8px;
    left: 40px;
    width: 18px;
    height: 20px;
    border: 2px solid var(--ink);
    border-left: none;
    border-radius: 50%;
    transform: rotate(-30deg);
}

.baby-face i {
    width: 5px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink);
}

.baby-face b {
    font-size: 22px;
    margin-top: 25px;
    font-weight: 400;
}

.team-pills {
    display: flex;
    justify-content: center;
    gap: 7px;
}

.team-pills span {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    background: #fff9;
}

.team-pills span:last-child {
    background: var(--lilac);
}

.art-label {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 14px;
    font-size: 0.74rem;
    box-shadow: 0 5px 12px #183f3609;
}

.label-one {
    left: -3px;
    top: 74px;
    transform: rotate(-9deg);
}

.label-two {
    right: -5px;
    bottom: 60px;
    transform: rotate(6deg);
    background: var(--peach);
}

.art-footnote {
    position: absolute;
    bottom: 4px;
    font-size: 0.67rem;
    color: var(--muted);
}

.art-star {
    position: absolute;
    font-size: 3.3rem;
}

.star-one {
    right: 12px;
    top: 8px;
    color: #b29cc7;
}

.star-two {
    left: 16px;
    bottom: 40px;
    color: #8f9b72;
}

.orbit {
    position: absolute;
    width: 340px;
    height: 340px;
    border: 1px solid #dfe3d5;
    border-radius: 50%;
    z-index: -1;
}

.orbit-two {
    width: 400px;
    height: 260px;
    transform: rotate(-30deg);
}

.entry-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 22px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 29px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.8rem;
}

.card p {
    color: #637368;
    font-size: 0.94rem;
}

.join-card {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.join-card .eyebrow {
    color: #bacdb2;
}

.join-card p {
    color: #c8d3c7;
}

.join-card .button {
    background: #dfebcd;
    color: var(--ink);
}

.join-card .button:hover {
    background: #f0f7df;
}

.join-card input {
    border-color: transparent;
}

.inline-form {
    display: flex;
    gap: 10px;
}

.inline-form input {
    flex: 1;
    min-width: 0;
}

.code-input {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ink);
    color: white;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 13px 20px;
    min-height: 48px;
    text-decoration: none;
    font-weight: 650;
    font-size: 0.87rem;
    line-height: 1.4;
    transition: background 0.15s,
    transform 0.15s;
    white-space: normal;
    text-align: center;
}

.button:hover {
    background: #285b4c;
    transform: translateY(-1px);
}

.button.secondary {
    color: var(--ink);
    background: transparent;
    border-color: #cdd7c9;
}

.button.secondary:hover {
    background: #edf1e8;
}

.button.small {
    font-size: 0.78rem;
    padding: 9px 13px;
    min-height: 39px;
}

.button.danger {
    background: var(--red);
}

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

.text-button {
    background: none;
    border: 0;
    padding: 7px 0;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 650;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.danger-text {
    color: var(--red);
}

.resume-link {
    display: block;
    margin-top: 15px;
    font-size: 0.85rem;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 45px 10px 15px;
}

.how-it-works p {
    font-size: 0.87rem;
    color: var(--muted);
}

.step-icon {
    display: inline-flex;
    font-size: 1.5rem;
    color: #708367;
    margin-bottom: 15px;
}

.how-it-works h3 {
    margin-bottom: 7px;
}

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

.stack p {
    margin-bottom: 0;
}

.stack > label,
.stack > div > label,
label {
    font-size: 0.86rem;
    font-weight: 600;
}

label {
    display: block;
    margin-bottom: 4px;
}

.stack.compact {
    gap: 8px;
    margin-top: 14px;
}

.narrow {
    max-width: 540px;
    margin: auto;
}

.page-intro {
    padding-top: 70px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 55px 0 25px;
    gap: 20px;
}

.page-heading h1 {
    font-size: clamp(2.4rem, 4.4vw, 3.8rem);
    overflow-wrap: anywhere;
}

.page-heading .lead {
    margin-bottom: 0;
}

.status-pill {
    display: inline-block;
    background: var(--sage);
    color: #3a5a42;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 650;
    padding: 6px 11px;
    white-space: nowrap;
    align-self: start;
}

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

.section-heading h2,
.section-heading h3 {
    margin: 0;
}

.section-heading > span {
    font-size: 0.85rem;
    color: var(--muted);
}

.section-heading h2 {
    font-size: 1.85rem;
}

.notice {
    padding: 20px 25px;
    border: 1px solid #d6dac7;
    background: #f0f0df;
    border-radius: 15px;
    margin: 25px 0;
}

.notice p:last-child {
    margin-bottom: 0;
}

.notice.success {
    background: #e8efe0;
    border-color: #cedcc5;
}

.notice.error {
    background: #fae8e1;
    border-color: #e4bfb1;
}

.notice ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.notice h3 {
    margin-bottom: 8px;
}

.copy-field {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.copy-field input {
    flex: 1;
    min-width: 150px;
}

.copy-field code {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
}

.play-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    align-items: start;
}

.question-card {
    padding: 25px;
}

.question-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.question-heading h3 {
    margin: 0 0 3px;
}

.question-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sage);
    width: 43px;
    height: 43px;
    border-radius: 14px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sex-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sex-options label {
    position: relative;
    margin: 0;
}

.sex-options input {
    position: absolute;
    left: 15px;
    top: 18px;
    opacity: 0;
    width: 1px;
}

.sex-options span {
    display: block;
    border: 1px solid #ced6c9;
    border-radius: 12px;
    padding: 17px 12px;
    text-align: center;
    background: #f7f6f0;
    font-weight: 600;
}

.sex-options input:checked + span {
    background: var(--lilac);
    border-color: #9c85b7;
    color: #3b3150;
}

.sex-options input:focus-visible + span {
    outline: 3px solid #a48ac0;
    outline-offset: 3px;
}

.sex-options label:last-child input:checked + span {
    background: var(--sage);
    border-color: #829979;
    color: var(--ink);
}

.clear-choice {
    font-size: 0.75rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    color: var(--muted);
}

.clear-choice input {
    width: 15px;
    min-height: 15px;
}

.rule {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--muted);
}

summary {
    font-size: 0.87rem;
    font-weight: 600;
    padding: 7px 0;
}

details p {
    margin-top: 12px;
}

details[open] > summary {
    margin-bottom: 10px;
}

.rule summary {
    font-weight: 400;
    font-size: 0.8rem;
}

.rule p {
    font-size: 0.8rem;
}

.saved-guess {
    margin: 14px 0 0;
    font-size: 0.85rem;
}

.published-answer {
    padding: 12px;
    background: #e6eedf;
    border-radius: 10px;
    margin: 12px 0 0;
    font-size: 0.88rem;
}

.is-locked {
    background: #f2f3eb;
}

.save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #fffefaeb;
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 8px 25px #183f3612;
    margin-bottom: 22px;
}

.save-bar span {
    font-size: 0.76rem;
    color: var(--muted);
}

.play-live {
    position: sticky;
    top: 20px;
}

.live-board {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    border: 1px solid var(--ink);
    margin-bottom: 18px;
}

.live-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #ffffff20;
    padding: 17px 22px;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

.live-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d9e3c9;
}

.connection {
    color: #baccb7;
    font-size: 0.67rem;
    text-align: right;
}

.offline .connection {
    color: #f3d09d;
}

.live-stage {
    text-align: center;
    padding: 36px 28px;
}

.live-group {
    color: #bac9af;
    font-size: 0.65rem;
}

.live-title {
    font-size: 2.2rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.live-subtitle {
    color: #c3d0be;
    font-size: 0.84rem;
    margin-bottom: 20px;
}

.live-count {
    font-size: 0.75rem;
    color: #becbb4;
    margin: 20px 0 0;
}

.lobby-join {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 14px;
}

.live-qr {
    background: white;
    border-radius: 12px;
    padding: 9px;
    width: 150px;
    height: 150px;
}

.live-code {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.countdown {
    font-family: Georgia, serif;
    font-size: 7rem;
    line-height: 1.2;
    color: #e5eecf;
}

.reveal-answer {
    font-family: Georgia, serif;
    font-size: 3.3rem;
    line-height: 1.2;
    color: #e3eecf;
    overflow-wrap: anywhere;
    padding: 10px 0;
}

.trends {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    text-align: left;
}

.trends span {
    font-size: 0.83rem;
}

.trends strong {
    display: block;
    font-size: 2.5rem;
}

.bar {
    height: 8px;
    background: #ffffff20;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.bar i {
    display: block;
    height: 100%;
    background: var(--lilac);
    transition: width 0.5s;
}

.trend-boy .bar i {
    background: var(--peach);
}

.live-ranking {
    background: #fffefa;
    color: var(--ink);
    padding: 25px;
}

.live-ranking h3 {
    font-size: 1.2rem;
}

.ranking-max {
    font-size: 0.72rem;
    color: var(--muted);
}

.ranking-row {
    border-top: 1px solid var(--line);
}

.ranking-row summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 0;
}

.ranking-row summary::-webkit-details-marker {
    display: none;
}

.rank {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    color: #819775;
    min-width: 26px;
}

.rank-identity {
    flex: 1;
    min-width: 0;
}

.rank-identity strong {
    display: block;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.rank-identity small {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
}

.rank-points {
    font-size: 0.82rem;
    white-space: nowrap;
}

.score-detail {
    font-size: 0.8rem;
    margin: 0 0 9px 40px;
    color: var(--muted);
}

.correction-note {
    margin-top: 18px;
    margin-bottom: 0;
    font-size: 0.7rem;
}

.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti i {
    position: absolute;
    width: 9px;
    height: 17px;
    top: -25px;
    animation: confetti-fall 3s ease-in forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(850px) rotate(650deg);
        opacity: 0;
    }
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 35px;
}

.game-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.game-card {
    display: block;
    text-decoration: none;
    margin: 0;
    transition: transform 0.15s,
    border-color 0.15s;
}

.game-card:hover {
    transform: translateY(-3px);
    border-color: #91aa88;
}

.game-card h2 {
    margin-top: 25px;
}

.game-card p {
    font-size: 0.8rem;
}

.card-link {
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 45px;
}

.empty-state > span,
.decorative-spark {
    font-size: 4rem;
    color: #a9b69a;
}

.empty-state h3 {
    margin-top: 20px;
}

.section-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 22px;
    padding: 16px 0;
    background: #f8f6f0f5;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    margin-bottom: 30px;
}

.section-nav a {
    font-size: 0.82rem;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 650;
}

.admin-section {
    padding: 30px 0;
    scroll-margin-top: 70px;
}

.admin-section > h2 {
    font-size: 2.4rem;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.group-card {
    margin: 0;
    min-width: 0;
}

.group-card h3 {
    font-size: 1.35rem;
}

.invitation-block {
    display: flex;
    gap: 23px;
    align-items: center;
    margin: 25px 0;
}

.invitation-block img {
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.invitation-block .eyebrow {
    font-size: 0.63rem;
    margin-bottom: 4px;
}

.invite-code {
    display: block;
    letter-spacing: 0.12em;
    font-size: 1.25rem;
}

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

.control-panel {
    border-top: 1px solid var(--line);
    margin-top: 23px;
    padding-top: 12px;
}

.reveal-controls {
    background: #eee9f5;
    padding: 20px;
    border-radius: 15px;
    margin: 22px 0;
}

.reveal-controls label {
    font-size: 0.82rem;
}

.reveal-button {
    background: #615079;
}

.reveal-button:hover {
    background: #76608f;
}

.group-card .live-stage {
    padding: 24px 18px;
}

.group-card .live-title {
    font-size: 1.6rem;
}

.group-card .live-top {
    padding: 12px;
    font-size: 0.6rem;
}

.group-card .live-board {
    margin-top: 24px;
}

.group-card .live-ranking {
    padding: 16px;
}

.group-card .live-label {
    font-size: 0.56rem;
}

.deadline-row {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.deadline-row > span {
    display: block;
}

.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.two-columns > div > label {
    margin-bottom: 8px;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px;
}

legend {
    font-size: 0.8rem;
    padding: 0 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    padding: 4px 0;
}

.private-card {
    background: #eef1e6;
}

.private-card h3 {
    font-size: 1.45rem;
}

.private-card label {
    margin-bottom: 8px;
}

.prep-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.prep-notice p {
    margin: 0;
    font-size: 0.87rem;
    max-width: 650px;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    font-size: 0.8rem;
}

.back-link + .page-heading {
    padding-top: 22px;
}

.rules-list {
    padding-left: 20px;
    font-size: 0.85rem;
}

.rules-list li {
    margin: 12px 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.result-card {
    padding: 23px;
    margin: 0;
}

.result-card h3 {
    margin-top: 15px;
}

.result-card .result-value {
    font-size: 1.2rem;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.result-card .status-pill {
    margin-bottom: 17px;
}

.result-card details {
    margin-top: 17px;
    border-top: 1px solid var(--line);
}

.final-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.final-actions p {
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
    padding: 12px 22px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

th,
td {
    padding: 17px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 650;
    white-space: nowrap;
}

td {
    min-width: 120px;
}

tr:last-child td {
    border-bottom: 0;
}

.audit-list {
    padding-left: 0;
    list-style: none;
    font-size: 0.85rem;
}

.audit-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.audit-list time {
    color: var(--muted);
    margin-right: 15px;
}

.danger-zone {
    margin-top: 25px;
    border-color: #e2c9bd;
}

.danger-zone summary {
    color: var(--red);
}

.danger-zone input {
    max-width: 450px;
}

.danger-zone .button {
    align-self: start;
}

.television {
    background: #183f36;
}

.television .site-header {
    border-color: #ffffff20;
    color: var(--paper);
}

.television .brand-mark {
    background: var(--sage);
    color: var(--ink);
}

.television main {
    max-width: 1500px;
    padding-top: 20px;
}

.television .site-footer {
    color: #becbb4;
    border-color: #ffffff20;
}

.tv-toolbar {
    color: #c6d3bc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin: 0 0 15px;
}

.television .button.secondary {
    color: var(--paper);
    border-color: #ffffff40;
}

.television .button.secondary:hover {
    background: #ffffff10;
}

.tv-board {
    border-color: #ffffff20;
}

.tv-board .live-top {
    padding: 18px 30px;
}

.tv-board .live-stage {
    padding: 45px 35px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tv-board .live-title {
    font-size: clamp(2.5rem, 5vw, 5.5rem);
    max-width: 1100px;
}

.tv-board .live-subtitle {
    font-size: 1.2rem;
}

.tv-board .live-qr {
    width: 210px;
    height: 210px;
}

.tv-board .countdown {
    font-size: clamp(8rem, 16vw, 14rem);
}

.tv-board .reveal-answer {
    font-size: clamp(4rem, 9vw, 9rem);
}

.tv-board .trends {
    width: 70%;
    gap: 60px;
}

.tv-board .trends strong {
    font-size: 5rem;
}

.tv-board .trends span {
    font-size: 1.3rem;
}

.tv-board .live-ranking {
    padding: 30px 60px;
}

.tv-board .rank-identity strong {
    font-size: 1.25rem;
}

.tv-board .rank-points {
    font-size: 1.3rem;
}

.tv-board .rank {
    font-size: 2rem;
}

.tv-board .ranking-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 45px;
}

.tv-board .rank-identity small {
    font-size: 0.8rem;
}

.tv-board .live-code {
    font-size: 1.6rem;
}

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

.skip {
    position: absolute;
    top: -100px;
    left: 20px;
    z-index: 99;
    background: white;
    padding: 10px;
}

.skip:focus {
    top: 10px;
}

[hidden] {
    display: none !important;
}

dialog {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 30px;
    max-width: 480px;
    width: calc(100% - 32px);
    color: var(--ink);
    background: var(--paper);
}

dialog::backdrop {
    background: #102b2477;
    backdrop-filter: blur(3px);
}

dialog p {
    font-size: 0.95rem;
}

dialog .button-row {
    justify-content: flex-end;
    margin-top: 25px;
}

@media (min-width: 1500px) {
    .hero {
        padding-top: 100px;
        padding-bottom: 80px;
    }
}

@media (max-width: 1000px) {
    .hero {
        gap: 10px;
    }

    .hero-art {
        transform: scale(0.88);
    }

    .hero h1 {
        font-size: 3.25rem;
    }

    .groups-grid {
        gap: 15px;
    }

    .group-card {
        padding: 21px;
    }

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

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

    .admin-dashboard {
        grid-template-columns: 1.2fr 1fr;
    }

    .play-layout {
        gap: 20px;
    }

    .live-title {
        font-size: 1.8rem;
    }

    .site-header {
        padding: 23px 30px;
    }
}

@media (max-width: 760px) {
    main {
        padding: 0 20px 35px;
    }

    .site-header {
        padding: 19px 20px;
    }

    .brand {
        font-size: 1.4rem;
    }

    .site-header nav {
        gap: 16px;
        font-size: 0.8rem;
    }

    .site-header nav form {
        display: none;
    }

    .site-footer {
        padding: 23px 20px;
        flex-direction: column;
        gap: 5px;
    }

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

    .hero h1 {
        font-size: clamp(2.7rem, 8vw, 3.6rem);
    }

    .hero .lead {
        font-size: 1rem;
    }

    .hero-art {
        height: 340px;
        transform: scale(0.9);
        max-width: 410px;
        width: 100%;
        margin: auto;
    }

    .entry-grid,
    .play-layout,
    .admin-dashboard,
    .two-columns,
    .groups-grid {
        grid-template-columns: 1fr;
    }

    .entry-grid {
        gap: 0;
    }

    .how-it-works {
        gap: 20px;
        padding: 25px 0;
    }

    .how-it-works h3 {
        font-size: 0.95rem;
    }

    .how-it-works p {
        font-size: 0.8rem;
    }

    .card {
        padding: 24px;
    }

    .entry-grid .card {
        padding: 26px;
    }

    .page-heading {
        padding-top: 36px;
        align-items: start;
    }

    .page-heading > .status-pill {
        display: none;
    }

    .page-heading h1 {
        font-size: 2.8rem;
    }

    .play-live {
        position: static;
    }

    .play-layout {
        display: flex;
        flex-direction: column;
    }

    .play-layout > div,
    .play-layout > aside {
        width: 100%;
    }

    .play-live {
        order: -1;
    }

    .play-live .live-stage {
        padding: 25px 20px;
    }

    .play-live .live-qr {
        display: none !important;
    }

    .play-live .live-subtitle {
        margin-bottom: 10px;
    }

    .play-live .live-title {
        font-size: 1.8rem;
    }

    .play-live .live-count {
        margin-top: 10px;
    }

    .play-live .live-code {
        font-size: 0.85rem;
    }

    .live-top {
        padding: 14px 18px;
    }

    .save-bar {
        flex-direction: column;
        gap: 10px;
    }

    .save-bar .button {
        width: 100%;
    }

    .save-bar span {
        text-align: center;
    }

    .question-card {
        padding: 23px;
    }

    .prep-notice,
    .final-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .prep-notice form .button,
    .final-actions .button {
        width: 100%;
    }

    .section-nav {
        gap: 20px;
        margin-bottom: 15px;
    }

    .admin-section {
        padding: 23px 0;
    }

    .admin-section > h2 {
        font-size: 2rem;
    }

    .group-card {
        padding: 24px;
    }

    .results-grid {
        gap: 12px;
    }

    .result-card {
        padding: 20px;
    }

    .result-card h3 {
        font-size: 1rem;
    }

    .result-card .result-value {
        font-size: 1.05rem;
    }

    .result-card .status-pill {
        white-space: normal;
        font-size: 0.65rem;
    }

    .decorative-spark {
        font-size: 3rem;
    }

    .tv-board .live-stage {
        padding: 35px 18px;
    }

    .tv-board .live-title {
        font-size: 2.4rem;
    }

    .tv-board .live-subtitle {
        font-size: 1rem;
    }

    .tv-board .live-ranking {
        padding: 25px;
    }

    .tv-board .ranking-rows {
        grid-template-columns: 1fr;
    }

    .tv-board .trends {
        width: 90%;
        gap: 25px;
    }

    .tv-board .trends strong {
        font-size: 3rem;
    }

    .television main {
        padding: 20px 12px;
    }

    .tv-toolbar {
        font-size: 0.7rem;
    }

    .narrow.page-intro {
        padding-top: 40px;
    }

    .page-intro h1 {
        font-size: 2.8rem;
    }

    .section-heading h2 {
        font-size: 1.65rem;
    }
}

@media (max-width: 420px) {
    .hero h1 {
        font-size: 2.6rem;
    }

    .hero-art {
        transform: scale(0.83);
        margin-top: -15px;
        margin-bottom: -20px;
    }

    .hero-chips {
        gap: 5px;
    }

    .hero-chips span {
        font-size: 0.66rem;
    }

    .inline-form {
        flex-direction: column;
    }

    .how-it-works {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .how-it-works > div {
        display: grid;
        grid-template-columns: 35px 1fr;
        gap: 0 12px;
    }

    .how-it-works .step-icon {
        grid-row: 1/3;
    }

    .how-it-works p {
        margin: 0;
    }

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

    .copy-field {
        align-items: stretch;
    }

    .copy-field code {
        font-size: 0.9rem;
    }

    .invitation-block {
        gap: 14px;
    }

    .invite-code {
        font-size: 1rem;
    }

    .group-card {
        padding: 20px;
    }

    .live-top {
        gap: 6px;
    }

    .live-label {
        font-size: 0.6rem;
    }

    .site-header nav {
        gap: 12px;
    }

    .page-heading h1 {
        font-size: 2.5rem;
    }

    .sex-options span {
        padding: 16px 8px;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Le classement TV doit rester visible sans faire défiler un écran d’attente. */
.tv-board[data-phase="leaderboard"] .live-stage {
    min-height: 0;
    padding: 28px 25px 10px;
}

.tv-board[data-phase="leaderboard"] .live-title {
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.tv-board[data-phase="leaderboard"] .live-count {
    display: none;
}
