:root {
    --bg: #f5efe5;
    --bg-strong: #102a43;
    --surface: rgba(255, 252, 247, 0.82);
    --surface-strong: #fff9f1;
    --line: rgba(16, 42, 67, 0.1);
    --ink: #162235;
    --muted: #566579;
    --primary: #14746f;
    --primary-strong: #0f5f5b;
    --accent: #e28743;
    --accent-soft: rgba(226, 135, 67, 0.14);
    --gold: #f3c76b;
    --shadow: 0 18px 45px rgba(22, 34, 53, 0.12);
    --radius: 24px;
    --radius-small: 16px;
    --max-width: 1100px;
    --font-sans: "Avenir Next", "Segoe UI Variable", "Trebuchet MS", sans-serif;
}

* {
    box-sizing: border-box;
}

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

html {
    background:
        radial-gradient(circle at top left, rgba(20, 116, 111, 0.16), transparent 24rem),
        radial-gradient(circle at top right, rgba(243, 199, 107, 0.22), transparent 22rem),
        linear-gradient(180deg, #fffaf3 0%, var(--bg) 100%);
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-glow {
    position: fixed;
    inset: auto;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    filter: blur(36px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.page-glow-left {
    top: 6rem;
    left: -5rem;
    background: rgba(20, 116, 111, 0.24);
}

.page-glow-right {
    top: 18rem;
    right: -5rem;
    background: rgba(226, 135, 67, 0.24);
}

.shell {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.layout-stack {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem 0 3rem;
    flex: 1 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(255, 249, 241, 0.78);
    border-bottom: 1px solid rgba(16, 42, 67, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.brand-logo-home {
    width: clamp(6.75rem, 10vw, 7.5rem);
    height: clamp(6.75rem, 10vw, 7.5rem);
    border-radius: 30px;
}

.brand-copy-home strong {
    font-size: 1.6rem;
}

.brand-copy-home small {
    font-size: 1.03rem;
}

.brand strong {
    display: block;
    font-size: 1rem;
}

.brand small {
    display: block;
    color: var(--muted);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--bg-strong));
    color: white;
    font-size: 1.4rem;
    box-shadow: var(--shadow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.preference-switcher {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--line);
}

.switch-pill {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--muted);
}

.switch-pill.active {
    background: var(--bg-strong);
    color: white;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 1.4rem;
    backdrop-filter: blur(14px);
}

.hero,
.detail-hero {
    display: grid;
    gap: 1.5rem;
}

.hero {
    grid-template-columns: 1.6fr 1fr;
    align-items: center;
}

.hero-copy h1,
.detail-copy h1,
.detail-panel h1 {
    margin: 0.3rem 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.03;
}

.hero-stats,
.scoreboard-grid,
.channel-grid,
.two-column,
.detail-grid {
    display: grid;
    gap: 1rem;
}

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

.stat-tile,
.score-card,
.detail-item {
    border-radius: var(--radius-small);
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(249, 243, 234, 0.88));
    border: 1px solid var(--line);
}

.stat-value,
.score-number {
    display: block;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    line-height: 1;
}

.stat-label,
.detail-item span {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
}

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

.section-block,
.form-stack,
.action-stack,
.record-list {
    display: grid;
    gap: 1rem;
}

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

.championship-form-section {
    max-width: 52rem;
    scroll-margin-top: 7rem;
}

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

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

.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.feature-list li {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid var(--line);
}

.feature-list-compact {
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.feature-list-compact li {
    padding: 0.7rem 0.8rem;
    font-size: 0.94rem;
}

.notice-banner {
    padding: 0.95rem 1.05rem;
    border-radius: var(--radius-small);
    background: rgba(20, 116, 111, 0.12);
    border: 1px solid rgba(20, 116, 111, 0.18);
    color: var(--primary-strong);
    font-weight: 700;
}

.btn {
    appearance: none;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--bg-strong));
    color: white;
    padding: 0.85rem 1.25rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 12px 28px rgba(15, 95, 91, 0.25);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.65rem 0.95rem;
    font-size: 0.92rem;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent), #c46d2f);
    box-shadow: 0 12px 28px rgba(196, 109, 47, 0.24);
}

.btn-danger {
    background: linear-gradient(135deg, #d64545, #922f39);
    box-shadow: 0 12px 28px rgba(146, 47, 57, 0.26);
}

.btn-ghost {
    background: rgba(22, 34, 53, 0.06);
    color: var(--ink);
    box-shadow: none;
    border: 1px solid var(--line);
}

.field {
    display: grid;
    gap: 0.45rem;
}

.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;
}

.conditional-field {
    display: block;
}

.field span,
.emoji-picker legend {
    font-weight: 700;
}

.field-note,
.field-help {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.field-current-media {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.field-current-media img {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(16, 42, 67, 0.16);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.9rem 1rem;
    color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid rgba(20, 116, 111, 0.2);
    border-color: var(--primary);
}

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

.channel-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.channel-card {
    display: grid;
    gap: 1rem;
}

.home-action-grid,
.home-access-grid,
.access-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-access-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.compact-card {
    gap: 0.8rem;
    padding: 1rem;
}

.channel-media {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-image-editor {
    display: grid;
    gap: 0.55rem;
    justify-items: start;
    min-width: 5.5rem;
}

.channel-image-editor-hero {
    min-width: 7rem;
}

.channel-image-trigger {
    appearance: none;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.channel-image-trigger:hover,
.channel-image-trigger:focus-visible {
    transform: translateY(-1px);
}

.channel-image-trigger:focus-visible {
    outline: 2px solid rgba(20, 116, 111, 0.28);
    outline-offset: 4px;
}

.channel-image-trigger-hero {
    position: relative;
}

.channel-image-badge {
    position: absolute;
    right: 0.55rem;
    bottom: 0.55rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(16, 42, 67, 0.86);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 24px rgba(16, 42, 67, 0.28);
}

.channel-thumb,
.channel-hero-image,
.channel-image-large {
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
}

.channel-thumb,
.channel-thumb-fallback {
    width: 4rem;
    height: 4rem;
}

.channel-hero-image,
.channel-image-large {
    width: 7rem;
    height: 7rem;
}

.channel-thumb-fallback {
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(20, 116, 111, 0.95), rgba(16, 42, 67, 0.95));
    color: white;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.channel-image-panel {
    display: grid;
    gap: 0.85rem;
}

.channel-image-file {
    font-size: 0.88rem;
    color: var(--muted);
}

.channel-image-actions {
    display: grid;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line);
}

.channel-image-action-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.compact-card .channel-thumb,
.compact-card .channel-thumb-fallback {
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 16px;
}

.compact-card h3 {
    font-size: 1.05rem;
}

.mini-scoreboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.mini-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(20, 116, 111, 0.08), rgba(243, 199, 107, 0.15));
    border: 1px solid var(--line);
}

.mini-score strong {
    font-size: 0.92rem;
}

.mini-score span {
    font-size: 1.15rem;
    font-weight: 800;
}

.channel-note {
    margin: 0;
    min-height: 2.4em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-actions {
    gap: 0.6rem;
}

.compact-actions form,
.compact-actions a {
    flex: 1 1 auto;
}

.compact-actions-single a {
    width: 100%;
}

.channel-card-top,
.score-strip,
.action-row,
.championship-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.score-strip {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-small);
    background: linear-gradient(135deg, rgba(20, 116, 111, 0.1), rgba(243, 199, 107, 0.18));
}

.score-strip div {
    display: grid;
    gap: 0.2rem;
}

.score-strip span {
    font-size: 1.4rem;
    font-weight: 800;
}

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

.score-card-link {
    display: grid;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.score-card-link:hover,
.score-card-link:focus-visible {
    transform: translateY(-2px);
}

.score-card-tone-1 {
    background:
        radial-gradient(circle at top left, rgba(20, 116, 111, 0.2), transparent 11rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 248, 246, 0.92));
}

.score-card-tone-2 {
    background:
        radial-gradient(circle at top right, rgba(226, 135, 67, 0.2), transparent 11rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(252, 243, 235, 0.92));
}

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

.score-card-link h2 {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(16, 42, 67, 0.08);
    color: var(--bg-strong);
    font-size: 1rem;
    font-weight: 800;
}

.score-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.score-copy {
    margin: 0.35rem 0 0;
}

.score-orbit {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.96) 47%, transparent 48%),
        conic-gradient(var(--primary) 0 var(--score-share, 0%), rgba(20, 116, 111, 0.16) 0 100%);
    border: 1px solid rgba(16, 42, 67, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.score-card-tone-2 .score-orbit {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.96) 47%, transparent 48%),
        conic-gradient(var(--accent) 0 var(--score-share, 0%), rgba(226, 135, 67, 0.16) 0 100%);
}

.score-orbit span {
    font-size: 0.95rem;
    font-weight: 800;
}

.score-progress {
    width: 100%;
    height: 0.55rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(16, 42, 67, 0.08);
}

.score-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--bg-strong));
}

.score-card-tone-2 .score-progress span {
    background: linear-gradient(135deg, var(--accent), #c46d2f);
}

.score-link-copy {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--bg-strong);
}

.pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: var(--accent-soft);
    color: #9f551d;
    font-weight: 800;
}

.wide-pill {
    width: fit-content;
}

.tabs {
    position: sticky;
    top: 5rem;
    z-index: 5;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    scroll-margin-top: 5.75rem;
}

.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 3rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--line);
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    text-align: center;
}

.tab.active {
    background: var(--bg-strong);
    color: white;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(16, 42, 67, 0.12);
}

.record-list {
    display: grid;
}

.record-list-compact {
    gap: 0.75rem;
}

.record-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line);
}

.record-row:hover {
    background: rgba(255, 255, 255, 0.9);
}

.record-row-compact {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
}

.record-row-compact .record-copy {
    gap: 0.12rem;
}

.record-row-compact .record-copy strong {
    font-size: 0.98rem;
}

.record-row-compact .record-copy span {
    font-size: 0.92rem;
    line-height: 1.35;
}

.record-media,
.championship-image {
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
}

.record-media {
    width: 3rem;
    height: 3rem;
}

.record-emoji,
.championship-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(243, 199, 107, 0.35), rgba(20, 116, 111, 0.14));
    font-size: 1.5rem;
}

.championship-icon {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 2rem;
}

.championship-image {
    width: 4.8rem;
    height: 4.8rem;
}

.record-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.record-copy span,
.record-owner,
.back-link {
    color: var(--muted);
}

.record-owner {
    font-weight: 800;
}

.detail-actions {
    justify-self: end;
}

.channel-hero-card {
    gap: 1.4rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 241, 231, 0.92)),
        rgba(255, 252, 247, 0.82);
}

.channel-back-link {
    margin-bottom: 0.35rem;
}

.channel-hero-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.channel-hero-copy {
    display: grid;
    gap: 0.65rem;
    align-content: center;
}

.channel-hero-copy h1 {
    margin: 0;
}

.channel-hero-description {
    margin: 0;
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.55;
}

.channel-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.35rem;
}

.channel-hero-button {
    min-width: 13rem;
}

.channel-settings-link {
    min-width: 0;
}

.channel-hero-pill {
    padding: 0.7rem 0.95rem;
    background: rgba(16, 42, 67, 0.07);
    color: var(--bg-strong);
}

.channel-hero-pill-active {
    background: rgba(20, 116, 111, 0.12);
    color: var(--primary-strong);
}

.detail-tools {
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.inline-upload {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
}

.inline-upload-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.inline-upload .field {
    gap: 0.3rem;
}

.inline-upload input[type="file"] {
    padding: 0.65rem 0.8rem;
    font-size: 0.92rem;
}

.action-stack-inline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
}

.copy-row input {
    width: 100%;
}

.join-shell {
    width: min(100%, 42rem);
    margin: 0 auto;
}

.join-card {
    display: grid;
    gap: 1rem;
}

.access-card {
    gap: 1rem;
}

.access-share,
.access-controls {
    display: grid;
    gap: 1rem;
}

.invite-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.section-copy {
    margin: 0.45rem 0 0;
}

.access-export-heading {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(16, 42, 67, 0.08);
}

.settings-intro-card {
    display: grid;
    gap: 0.65rem;
}

.settings-shell {
    display: grid;
    gap: 1rem;
}

.settings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.settings-toolbar strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.05rem;
}

.settings-back-button {
    flex: 0 0 auto;
}

.compact-info {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.5);
}

.compact-info summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--ink);
}

.compact-info summary::-webkit-details-marker {
    display: none;
}

.compact-info summary::after {
    content: "+";
    float: right;
    color: var(--primary);
}

.compact-info[open] summary::after {
    content: "-";
}

.ideas-mobile-card {
    display: none;
}

.create-mobile-card {
    display: none;
}

.ideas-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.ideas-summary::after {
    content: "+";
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(20, 116, 111, 0.1);
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.ideas-mobile-card[open] .ideas-summary::after {
    content: "-";
}

.ideas-summary h2 {
    margin: 0.25rem 0 0;
}

.create-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.create-summary::after {
    content: "+";
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(20, 116, 111, 0.1);
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.create-mobile-card[open] .create-summary::after,
.join-responsive-card[open] .create-summary::after {
    content: "-";
}

.create-summary h2 {
    margin: 0.25rem 0 0;
}

.create-mobile-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.join-responsive-card:not([open]) > .create-mobile-content {
    display: grid;
}

.join-responsive-card > .create-summary::after {
    display: none;
}

.ideas-mobile-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

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

.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(16, 42, 67, 0.08);
    background: rgba(255, 249, 241, 0.72);
    backdrop-filter: blur(16px);
}

.footer-line {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0 1.2rem;
}

.footer-line small {
    color: var(--muted);
}

.idea-tile {
    display: grid;
    gap: 0.55rem;
    justify-items: start;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line);
}

.idea-emoji {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(243, 199, 107, 0.34), rgba(20, 116, 111, 0.14));
    font-size: 1.45rem;
}

.emoji-picker {
    margin: 0;
    padding: 0;
    border: none;
    display: grid;
    gap: 0.85rem;
}

.emoji-groups {
    display: grid;
    gap: 0.75rem;
}

.emoji-group {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.emoji-group summary {
    cursor: pointer;
    list-style: none;
    padding: 0.9rem 1rem;
    font-weight: 800;
}

.emoji-group summary::-webkit-details-marker {
    display: none;
}

.emoji-group .emoji-grid {
    padding: 0 1rem 1rem;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
}

.emoji-option {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    min-height: 3rem;
    font-size: 1.4rem;
    cursor: pointer;
}

.emoji-option.is-selected {
    background: rgba(20, 116, 111, 0.14);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.detail-panel {
    display: grid;
    gap: 1.5rem;
}

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

.detail-item strong {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.1rem;
}

.detail-item-full {
    grid-column: 1 / -1;
}

.danger-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 10px 24px rgba(22, 34, 53, 0.06);
}

.danger-card[open] {
    background: rgba(255, 250, 250, 0.76);
    border-color: rgba(146, 47, 57, 0.14);
}

.danger-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.danger-summary::after {
    content: "+";
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(16, 42, 67, 0.06);
    color: var(--muted);
    font-size: 1.25rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.danger-card[open] .danger-summary::after {
    content: "-";
}

.danger-summary h2 {
    margin: 0.25rem 0 0;
    font-size: 1.05rem;
}

.danger-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 42, 67, 0.08);
}

.eyebrow-danger {
    color: #7d6770;
}

.alert {
    border-radius: 18px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(180, 68, 35, 0.24);
    background: rgba(255, 235, 226, 0.88);
    color: #8b3618;
}

.empty-state {
    text-align: center;
    padding: 2rem;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #09111c;
    --bg-strong: #0f2339;
    --surface: rgba(10, 18, 31, 0.86);
    --surface-strong: #122238;
    --line: rgba(207, 224, 248, 0.12);
    --ink: #ecf3ff;
    --muted: #9fb1c8;
    --primary: #53d0c7;
    --primary-strong: #98f0e8;
    --accent: #f4a45c;
    --accent-soft: rgba(244, 164, 92, 0.18);
    --gold: #f2d27f;
    --shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
    background:
        radial-gradient(circle at top left, rgba(83, 208, 199, 0.12), transparent 24rem),
        radial-gradient(circle at top right, rgba(244, 164, 92, 0.12), transparent 22rem),
        linear-gradient(180deg, #09111c 0%, #040a12 100%);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer {
    background: rgba(7, 13, 24, 0.78);
    border-color: rgba(207, 224, 248, 0.08);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .channel-hero-card {
    background: rgba(10, 18, 31, 0.84);
    border-color: rgba(207, 224, 248, 0.08);
}

html[data-theme="dark"] .stat-tile,
html[data-theme="dark"] .score-card,
html[data-theme="dark"] .detail-item,
html[data-theme="dark"] .record-row,
html[data-theme="dark"] .feature-list li,
html[data-theme="dark"] .compact-info,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .mini-score,
html[data-theme="dark"] .idea-tile,
html[data-theme="dark"] .emoji-group,
html[data-theme="dark"] .channel-image-actions,
html[data-theme="dark"] .inline-upload,
html[data-theme="dark"] .danger-card,
html[data-theme="dark"] .switch-pill,
html[data-theme="dark"] .preference-switcher {
    background: rgba(16, 28, 45, 0.88);
    border-color: rgba(207, 224, 248, 0.1);
    color: var(--ink);
}

html[data-theme="dark"] .switch-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #061018;
}

html[data-theme="dark"] .score-card-tone-1 {
    background:
        radial-gradient(circle at top left, rgba(83, 208, 199, 0.2), transparent 11rem),
        linear-gradient(180deg, rgba(18, 32, 52, 0.96), rgba(11, 20, 34, 0.96));
}

html[data-theme="dark"] .score-card-tone-2 {
    background:
        radial-gradient(circle at top right, rgba(244, 164, 92, 0.18), transparent 11rem),
        linear-gradient(180deg, rgba(20, 30, 47, 0.96), rgba(12, 20, 33, 0.96));
}

html[data-theme="dark"] .record-row:hover,
html[data-theme="dark"] .danger-card[open] {
    background: rgba(19, 34, 53, 0.96);
}

html[data-theme="dark"] .tab {
    background: rgba(17, 31, 50, 0.94);
    border-color: rgba(207, 224, 248, 0.13);
    color: #dbe8fa;
}

html[data-theme="dark"] .tab.active {
    background: linear-gradient(135deg, rgba(83, 208, 199, 0.22), rgba(16, 35, 57, 0.96));
    color: #ffffff;
    border-color: rgba(83, 208, 199, 0.28);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    border-color: rgba(207, 224, 248, 0.12);
}

html[data-theme="dark"] .score-chip,
html[data-theme="dark"] .score-progress,
html[data-theme="dark"] .danger-summary::after {
    background: rgba(255, 255, 255, 0.07);
    color: var(--ink);
}

html[data-theme="dark"] .score-orbit {
    background:
        radial-gradient(circle, rgba(9, 17, 28, 0.96) 47%, transparent 48%),
        conic-gradient(var(--primary) 0 var(--score-share, 0%), rgba(83, 208, 199, 0.15) 0 100%);
    border-color: rgba(207, 224, 248, 0.08);
}

html[data-theme="dark"] .score-card-tone-2 .score-orbit {
    background:
        radial-gradient(circle, rgba(9, 17, 28, 0.96) 47%, transparent 48%),
        conic-gradient(var(--accent) 0 var(--score-share, 0%), rgba(244, 164, 92, 0.16) 0 100%);
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .channel-hero-pill,
html[data-theme="dark"] .channel-hero-pill-active {
    color: var(--ink);
}

html[data-theme="dark"] .score-link-copy {
    color: var(--primary-strong);
}

html[data-theme="dark"] .notice-banner {
    background: rgba(83, 208, 199, 0.12);
    border-color: rgba(83, 208, 199, 0.16);
    color: var(--primary-strong);
}

html[data-theme="dark"] .alert {
    background: rgba(79, 32, 24, 0.9);
    border-color: rgba(255, 144, 109, 0.24);
    color: #ffd6c7;
}

html[data-theme="dark"] .footer-line small,
html[data-theme="dark"] .record-copy span,
html[data-theme="dark"] .record-owner,
html[data-theme="dark"] .back-link {
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero,
    .two-column,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .channel-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }

    .channel-hero-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

}

@media (min-width: 1024px) {
    .channel-grid-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .layout-stack {
        padding-bottom: 2rem;
    }

    .site-header {
        position: static;
    }

    .tabs {
        position: static;
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        flex-wrap: nowrap;
        scroll-margin-top: 1rem;
    }

    .tab {
        width: auto;
        flex: 0 0 auto;
        min-width: max-content;
    }

    .header-content,
    .header-actions,
    .section-heading,
    .action-row,
    .channel-card-top,
    .championship-hero,
    .channel-media {
        flex-direction: column;
        align-items: stretch;
    }

    .brand-logo {
        width: 3.25rem;
        height: 3.25rem;
    }

    .brand-logo-home {
        width: 7rem;
        height: 7rem;
    }

    .brand-copy-home strong {
        font-size: 1.45rem;
    }

    .brand-copy-home small {
        font-size: 1rem;
    }

    .hero-stats,
    .scoreboard-grid {
        grid-template-columns: 1fr;
    }

    .player-scoreboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .mini-scoreboard {
        grid-template-columns: 1fr;
    }

    .record-row {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.72rem;
        border-radius: 18px;
    }

    .record-owner {
        grid-column: 2;
        font-size: 0.86rem;
    }

    .record-media,
    .record-emoji {
        width: 2.45rem;
        height: 2.45rem;
        border-radius: 14px;
        font-size: 1.22rem;
    }

    .record-copy {
        gap: 0.05rem;
        min-width: 0;
    }

    .record-copy strong {
        font-size: 0.95rem;
    }

    .record-copy span {
        font-size: 0.84rem;
        line-height: 1.25;
    }

    .record-row-compact {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 0.68rem;
    }

    .channel-hero-layout {
        gap: 1rem;
    }

    .channel-image-editor-hero {
        min-width: 0;
        justify-items: center;
    }

    .channel-image-editor {
        justify-items: center;
    }

    .channel-image-trigger-hero {
        justify-self: center;
    }

    .channel-image-badge {
        display: none;
    }

    .channel-hero-image {
        width: 100%;
        max-width: 8.5rem;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .championship-image {
        width: 100%;
        max-width: 6rem;
        aspect-ratio: 1 / 1;
        height: auto;
    }

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

    .action-stack-inline {
        flex-direction: column;
    }

    .ideas-desktop-card {
        display: none;
    }

    .ideas-mobile-card {
        display: block;
    }

    .create-desktop-card {
        display: none;
    }

    .create-mobile-card {
        display: block;
    }

    .join-responsive-card > .create-summary::after {
        display: grid;
    }

    .join-responsive-card:not([open]) > .create-mobile-content {
        display: none;
    }

    .home-action-grid,
    .home-access-grid,
    .access-grid {
        grid-template-columns: 1fr;
    }

    .copy-row {
        grid-template-columns: 1fr;
    }

    .score-card-link {
        gap: 0.85rem;
        padding: 1rem;
    }

    .score-card-body {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .score-orbit {
        width: 3.4rem;
        height: 3.4rem;
    }

    .score-link-copy {
        font-size: 0.85rem;
    }

    .compact-actions {
        flex-direction: row;
        align-items: stretch;
    }

    .compact-actions form,
    .compact-actions a {
        flex: 1 1 0;
        min-width: 0;
    }

    .compact-actions .btn {
        width: 100%;
    }

    .channel-image-action-row {
        flex-direction: column;
    }

    .settings-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .compact-card {
        padding: 0.9rem;
    }

    .channel-hero-actions {
        display: grid;
        align-items: stretch;
    }

    .channel-hero-button {
        width: 100%;
        min-width: 0;
    }
}
