:root {
    color-scheme: light;
    --bg: #f3f3f3;
    --card: #ffffff;
    --text: #1c1c1c;
    --muted: #6a6a6a;
    --line: #dcdcdc;
    --line-strong: #bdbdbd;
    --accent: #1c1c1c;
    --accent-text: #ffffff;
    --danger: #8a2b2b;
    --ok: #1f5a38;
    --focus: #5a5a5a;
    --input: #ffffff;
    --flash-error-border: #e3c1c1;
    --flash-ok-border: #c5ddd0;
    --score-4: #6d28d9;
    --score-3: #1d4ed8;
    --score-2: #0f766e;
    --result-val: #2563eb;
    --radius: 8px;
    --max: 44rem;
    --font: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
    --font-display: "Noto Sans JP", "Hiragino Sans", Meiryo, sans-serif;
    --font-mono: "Share Tech Mono", ui-monospace, monospace;
    --card-shadow: none;
    --border-w: 1px;
    --corner-mark-size: max(2.6rem, calc(var(--radius, 8px) + 1.7rem));
    --corner-mark-top: max(0.2rem, calc(var(--radius, 8px) * 0.42));
    --corner-mark-right: max(0.28rem, calc(var(--radius, 8px) * 0.48));
    --header-bg: #00053a;
    --header-text: #ffffff;
    --header-border: #00053a;
    --nav-color: #ffffff;
    --nav-hover-color: #ffffff;
    --nav-hover-bg: rgba(255, 255, 255, 0.14);
    --site-header-height: 3.5rem;
    --night-accent: #2b3f8e;
    --night-deep: #0d1646;
    --day-accent: #3b8fd9;
    --day-deep: #1d5fa8;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 10px;
}

@media (min-width: 641px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    color: var(--text);
    background: var(--page-bg, var(--bg));
    background-attachment: fixed;
    font-family: var(--font-display);
    line-height: 1.65;
}

body.font-sans {
    font-family: var(--font-display);
}

.nav a.nav-sans {
    font-family: var(--font-display);
}

a {
    color: inherit;
}

a.user-name {
    color: inherit;
    text-decoration: none;
}

a.user-name:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.user-name.is-unregistered {
    color: #767676;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.wrap {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #00053a;
    color: #ffffff;
    border-bottom: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--site-header-height);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.logo-mark {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-name {
    display: block;
    height: 2.4rem;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.15rem;
    font-size: 0.92rem;
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--nav-color, var(--muted));
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius);
}

.nav a:hover {
    color: var(--nav-hover-color, var(--text));
    background: var(--nav-hover-bg, var(--bg));
}

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--nav-color, var(--muted));
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
}

main.wrap {
    padding: 1.75rem 0 2.5rem;
}

h1 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
}

h1 .fa-solid,
.lead .fa-solid {
    color: var(--muted);
}

h2,
.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
}

.panel-title .fa-solid {
    color: var(--muted);
    width: 1.15em;
    text-align: center;
}

.panel-title .title-aside {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0;
}

.label-note {
    font-weight: 400;
    color: var(--muted);
}

.lead,
.muted,
.hint,
.crumb {
    color: var(--muted);
}

.lead {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hint,
.crumb {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
}

.crumb {
    margin: 0 0 0.75rem;
}

.flash {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius);
    border: var(--border-w) solid var(--line);
    background: var(--card);
    box-shadow: var(--card-shadow);
}

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

.flash-success {
    border-color: var(--flash-ok-border);
    color: var(--ok);
}

.flash-toast {
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    padding: 0.7rem 1.15rem;
    background: rgba(255, 255, 255, 0.42);
    color: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 2rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.flash-toast .fa-solid {
    color: #1c1c1c;
}

.panel {
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem;
    margin: 1.1rem 0;
    box-shadow: var(--card-shadow);
}

.empty {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    padding: 1.75rem 1.5rem;
    text-align: center;
    color: var(--muted);
    background: var(--card);
    border: var(--border-w) dashed var(--line);
    border-radius: var(--radius);
}

.empty-icon {
    font-size: 1.6rem;
}

.topic-list,
.admin-list,
.work-list,
.result-list,
.name-list,
.breakdown {
    list-style: none;
    margin: 0;
    padding: 0;
}

.topic-list {
    display: grid;
    gap: 0.75rem;
}

.topic-card {
    display: grid;
    gap: 0.4rem;
    padding: 1rem 1.1rem;
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: var(--card-shadow);
}

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

.topic-card-top,
.topic-flags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.topic-flags {
    margin-bottom: 0;
}

.topic-card-body {
    font-size: 1.05rem;
    white-space: pre-wrap;
}

.topic-card-body,
.prompt-body,
.prompt-image-caption,
.work-body {
    color: #0066cc;
    font-family: var(--font);
    font-weight: 700;
}

.topic-card-image img,
.admin-thumb img {
    display: block;
    width: auto;
    max-width: 50%;
    max-height: 8rem;
    height: auto;
    object-fit: contain;
    object-position: left top;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.admin-thumb {
    margin: 0.35rem 0;
}

.admin-topic-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.admin-topic-link:hover {
    color: inherit;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 0.65rem 0.45rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table th {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.85rem;
}

.admin-table-action {
    width: 1%;
    white-space: nowrap;
}

.admin-table td.season-actions {
    white-space: normal;
    width: auto;
}

.admin-table-action .inline {
    margin: 0;
}

.admin-table-action .button {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
}

.admin-table .work-body {
    margin: 0;
}

.admin-post-edit {
    min-width: 16rem;
}

.admin-post-edit textarea {
    min-height: 4.5rem;
}

.admin-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.admin-vote-score {
    color: var(--muted);
}

.admin-vote-groups {
    display: grid;
    gap: 0.75rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.admin-vote-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.admin-vote-name {
    margin: 0;
    font-weight: 500;
}

.admin-vote-head .muted {
    margin: 0.15rem 0 0;
}

.admin-table-nested {
    margin-top: 0;
}

.topic-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.badge,
.type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    width: fit-content;
}

.badge {
    border: 1px solid var(--text);
}

.type-chip {
    color: var(--muted);
    background: var(--bg);
}

.person-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    background: var(--bg);
    border-radius: 999px;
    font-size: 0.92rem;
}

.badge-posting {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.badge-voting {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.badge-result {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}

.badge-scheduled {
    background: transparent;
    color: var(--muted);
    border-color: var(--line);
}

.badge-entry {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.badge-abandoned {
    background: transparent;
    color: #b91c1c;
    border-color: #b91c1c;
}

.name-unposted {
    color: var(--muted);
    opacity: 0.7;
}

.name-unposted-label {
    font-size: 0.85em;
}

.entry-schedule,
.entry-free {
    margin: 0 0 0.6rem;
    text-align: center;
}

.entry-note {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    line-height: 1.6;
    text-align: center;
}

.form-entry {
    align-items: center;
}

.prompt {
    text-align: center;
    padding: 1.15rem 0.9rem;
    margin: 0.25rem 0 1.25rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--card-shadow);
}

.prompt-pin {
    position: sticky;
    top: var(--site-header-height);
    z-index: 30;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
}

.prompt-pin::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: var(--page-bg, var(--bg));
}

.prompt-pin.is-fade::before {
    background: linear-gradient(
        to bottom,
        var(--page-bg, var(--bg)) 0,
        var(--page-bg, var(--bg)) calc(100% - 0.65rem),
        color-mix(in srgb, var(--page-bg, var(--bg)) 0%, transparent) 100%
    );
}

.prompt-pin .prompt {
    position: relative;
    z-index: 1;
    margin-top: 0;
    margin-bottom: 0;
}

.prompt-title {
    font-size: 1.05rem;
    font-weight: 400;
    margin: 0 0 0.5rem;
}

.prompt-body,
.work-body {
    white-space: pre-wrap;
    margin: 0.35rem 0;
}

.blank-fill {
    color: #ea580c;
    overflow-wrap: anywhere;
}

.result-card,
.work-item,
.work-card,
.favorite-list li {
    min-width: 0;
}

.work-body:has(.blank-fill) {
    white-space: pre-wrap;
    max-width: 100%;
}

.prompt-body {
    font-size: 1.08rem;
    line-height: 1.55;
    text-align: center;
}

.prompt-image {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    text-align: center;
}

.prompt-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(36vh, 18rem);
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    object-fit: contain;
}

.prompt-image-caption {
    margin: 0.55rem 0 0;
    font-size: 1.08rem;
    line-height: 1.55;
    text-align: center;
    white-space: pre-wrap;
}

@media (min-width: 641px) {
    .prompt-image {
        max-width: 70%;
    }
}

@media (max-width: 640px) {
    .prompt-image img {
        max-height: min(40vh, 24rem);
    }
}

.meta-list {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 0.35rem 0.75rem;
    margin: 1rem 0;
}

.meta-list dt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.meta-list dd {
    margin: 0;
}

.meta-list.compact {
    font-size: 0.92rem;
}

.name-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
}

.name-slash {
    margin: 0;
    line-height: 1.7;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.name-count {
    margin: 0.35rem 0 0;
    text-align: center;
    color: var(--muted);
}

.form {
    display: grid;
    gap: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: start;
}

.form label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.92rem;
    min-width: 0;
    max-width: 100%;
}

.form label[hidden] {
    display: none;
}

.form .score-zone {
    display: flex;
    gap: 0;
    min-width: 0;
    max-width: none;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 2.6rem;
}

.password-toggle {
    position: absolute;
    right: 0.1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--muted);
    border: 0;
    padding: 0.35rem 0.55rem;
    width: auto;
    gap: 0;
}

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

.password-toggle:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.stat-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
}

.stat-line span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    background: var(--input);
    color: inherit;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

.pair-user-select {
    min-height: 12rem;
}

.pair-user-select option.is-paired,
.pair-user-select option.is-paired:disabled {
    color: #b8b8b8;
}

.pair-hero {
    margin: 0 0 1.35rem;
    overflow: hidden;
    border: var(--border-w) solid color-mix(in srgb, var(--header-bg) 35%, var(--line));
    border-radius: var(--radius);
    background: var(--header-bg);
}

.pair-hero-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1672 / 941;
    object-fit: cover;
    object-position: center;
}

.pair-hero-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.9rem 1.05rem 1rem;
    color: #fff;
    background: var(--header-bg);
}

.pair-hero-copy {
    min-width: 0;
    flex: 1 1 12rem;
}

.pair-hero-kicker {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    line-height: 1;
    opacity: 0.82;
}

.pair-hero h1 {
    margin: 0.35rem 0 0;
    color: #fff;
    font-size: 2rem;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.pair-hero-status {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pair-page .pair-actions {
    margin-bottom: 2.75rem;
}

.pair-page .pair-actions h2 {
    padding-left: 0;
}

.pair-page .pair-actions h2::before {
    content: none;
}

.pair-page .pair-offer-form > button {
    justify-self: center;
}

.pair-page .pair-actions .doc-lead {
    margin: 0 0 1rem;
}

.pair-note {
    margin: 0 0 1.25rem;
}

.pair-period {
    display: inline-flex;
    align-items: center;
    margin: 0.15rem 0 1.15rem;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    background: var(--header-bg);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.pair-hero .pair-period {
    flex-shrink: 0;
    margin: 0 0 0.15rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: transparent;
    color: #fff;
}

.pair-invite {
    margin-top: 1rem;
    padding: 0.85rem 0.95rem 0.95rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.pair-invite p {
    margin: 0;
    line-height: 1.7;
}

.pair-invite-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.pair-invite-actions .form {
    width: auto;
    margin: 0;
}

.pair-lock {
    color: #c62828;
    font-weight: 700;
}

.pair-formed > h2 {
    margin: 0 0 0.9rem;
}

.pair-division {
    margin-bottom: 1.15rem;
}

.pair-division:last-child {
    margin-bottom: 0;
}

.doc-block ul.pair-formed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
}

.doc-block ul.pair-formed-list li,
.doc-block ul.pair-formed-list li + li {
    margin: 0;
    padding: 0.65rem 0.15rem;
    border-bottom: 1px solid var(--line);
}

.doc-block ul.pair-formed-list li.is-mine {
    margin: 0.35rem 0;
    padding: 0.5rem 0.7rem 0.6rem;
    border: 1px solid var(--header-bg);
    border-radius: calc(var(--radius) - 2px);
}

.pair-formed-list .pair-mine-label {
    margin: 0 0 0.28rem;
    color: var(--header-bg);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

.pair-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.7rem;
}

.pair-line .pair-name:first-child {
    text-align: right;
}

.pair-name {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.pair-join {
    position: relative;
    width: 2.75rem;
    height: 0.7rem;
}

.pair-join::before,
.pair-join::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0.95rem;
    height: 2px;
    margin-top: -1px;
    border-radius: 1px;
    background: var(--div-accent, var(--header-bg));
}

.pair-join::before {
    left: 0;
}

.pair-join::after {
    right: 0;
}

@media (max-width: 640px) {
    .pair-hero-kicker,
    .pair-formed-list .pair-mine-label {
        font-size: 12px;
    }

    .pair-hero h1 {
        font-size: 22px;
    }

    .pair-hero-status,
    .pair-hero .pair-period {
        font-size: 13px;
    }
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--button-bg, var(--header-bg));
    color: var(--button-color, #ffffff);
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    width: fit-content;
}

.button-link,
.linkish {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    color: var(--muted);
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    width: auto;
}

.admin-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.admin-actions > a.button,
.admin-actions > .inline {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    display: flex;
    gap: 0;
}

.admin-actions .button {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    padding: 0.45rem 0.15rem 0.35rem;
    font-size: 1rem;
    white-space: nowrap;
}

.admin-action-label {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
}

.admin-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.35rem;
}

.admin-head-actions .button {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    padding: 0.45rem 0.55rem 0.35rem;
    font-size: 1rem;
    white-space: nowrap;
    min-width: 4.4rem;
}

.own-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.75rem;
}

.own-actions .inline {
    margin: 0;
}

.own-actions .button {
    padding: 0.4rem 0.8rem;
    font-size: 0.88rem;
    white-space: nowrap;
}

.form-post {
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: min(100%, 28rem);
}

.form-post label {
    width: 100%;
}

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

.button:disabled {
    opacity: 0.45;
    cursor: default;
}

.row-actions,
.page-head,
.inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.admin-pair-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.admin-pair-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.admin-pair-list .inline {
    margin: 0;
}

.random-pair-actions {
    margin-top: 0.95rem;
}

.page-head {
    justify-content: space-between;
}

.page-head h1 {
    margin: 0;
}

.page-head p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
}

.admin-page-setting {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1.1rem;
    font-size: 0.92rem;
}

.admin-page-setting label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-page-setting input[type="number"] {
    width: 4.5rem;
}

.admin-page-setting select {
    width: auto;
    min-width: 6.5rem;
}

.admin-page-setting button {
    padding: 0.4rem 0.8rem;
    font-size: 0.88rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin: 1.25rem 0 0;
}

.pagination-scroll {
    flex-wrap: nowrap;
    justify-content: safe center;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.pagination-scroll > a,
.pagination-scroll > span,
.pagination-scroll > .page-jump {
    flex: 0 0 auto;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.35rem 0.6rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--header-bg);
    text-decoration: none;
    font-size: 0.88rem;
}

.pagination a:hover {
    border-color: var(--line-strong);
    background: var(--bg);
}

.pagination .is-current {
    background: var(--header-bg);
    color: #ffffff;
    border-color: var(--header-bg);
}

.pagination .is-disabled {
    color: var(--muted);
    background: transparent;
}

.pagination .is-gap {
    min-width: 0;
    padding: 0.35rem 0.15rem;
    border: 0;
    background: transparent;
}

.pagination .page-jump {
    position: relative;
    display: inline-flex;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.pagination .page-jump-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.35rem 0.55rem;
    border: var(--border-w) solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    list-style: none;
}

.pagination .page-jump-toggle::-webkit-details-marker {
    display: none;
}

.pagination .page-jump-toggle::marker {
    content: "";
}

.pagination .page-jump-toggle:hover,
.pagination .page-jump[open] > .page-jump-toggle {
    border-color: var(--line);
    background: var(--card);
}

.pagination .page-jump-list {
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 0.4rem);
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    gap: 0.25rem;
    max-height: 16rem;
    overflow: auto;
    padding: 0.35rem;
    min-width: 6.5rem;
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.admin-season {
    margin: 0.2rem 0 0.85rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.status-control {
    display: inline-flex;
    margin: 0;
    width: auto;
}

.status-control select {
    width: auto;
    min-width: 7.5rem;
    padding: 0.28rem 0.5rem;
    font-size: 0.85rem;
}

.own-post + .own-post {
    margin-top: 1.15rem;
}

.work-item {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0.95rem 0.9rem;
    min-height: 3.15rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--input);
}

.work-item .work-body {
    margin: 0;
}

.work-list {
    display: grid;
    gap: 0.45rem;
}

.work-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0.95rem 2.1rem 0.95rem 0.9rem;
    min-height: 3.15rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--input);
}

.work-item.work-mine {
    padding: 0.95rem 2.1rem 0.95rem 0.9rem;
}

.work-item.work-vote {
    display: flex;
    flex-direction: column;
    padding: 0.7rem 0.75rem 0;
}

.work-card .work-body,
.work-mine .work-body {
    margin: 0;
}

.work-mine::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    border-top: var(--corner-mark-size, 2.6rem) solid var(--line);
    border-left: var(--corner-mark-size, 2.6rem) solid transparent;
    pointer-events: none;
}

.work-mine.has-vote-bonus::before {
    content: attr(data-bonus);
    position: absolute;
    top: var(--corner-mark-top);
    right: var(--corner-mark-right);
    z-index: 3;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.vote-bonus-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.score-zones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0.4rem -0.75rem 0;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--line);
    min-inline-size: 0;
}

.score-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.05rem;
    margin: 0;
    padding: 0.12rem 0.2rem;
    background: transparent;
    color: #9a9a9a;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.score-zone + .score-zone {
    box-shadow: inset 1px 0 0 var(--line);
}

.score-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.score-zone:focus-within {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.score-zone:has(input:checked) {
    color: rgba(255, 255, 255, 0.82);
}

.score-zone.is-4:has(input:checked) {
    background: var(--score-4);
}

.score-zone.is-3:has(input:checked) {
    background: var(--score-3);
}

.score-zone.is-2:has(input:checked) {
    background: var(--score-2);
}

.work-vote .work-body {
    margin: 0;
}

.work-vote:has(input[value="4"]:checked) {
    border-color: var(--score-4);
}

.work-vote:has(input[value="3"]:checked) {
    border-color: var(--score-3);
}

.work-vote:has(input[value="2"]:checked) {
    border-color: var(--score-2);
}

.button-center,
.form-actions {
    justify-self: center;
}

.form-actions {
    display: flex;
    justify-content: center;
}

.vote-confirm-actions {
    flex-direction: row-reverse;
    gap: 0.75rem;
    align-items: center;
}

.result-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.result-cards {
    display: grid;
    gap: 0.75rem;
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
}

.result-card {
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--card-shadow);
}

.result-card-unposted .result-head {
    margin-bottom: 0.35rem;
}

.result-unposted-meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.85em;
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.result-author {
    font-weight: 400;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.85em;
    row-gap: 0.15em;
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
    cursor: pointer;
    list-style: none;
}

.result-meta::-webkit-details-marker,
.result-meta::marker {
    display: none;
}

.result-breakdown {
    margin: 0.7rem 0 0;
}

.result-voters {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.55rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.result-voters-row {
    display: grid;
    grid-template-columns: 2.4em 1fr;
    gap: 0.55rem;
    margin: 0;
    line-height: 1.6;
}

.result-voters-row span:last-child {
    color: var(--text);
}

.result-lead {
    white-space: nowrap;
}

.result-val {
    color: var(--result-val);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    width: fit-content;
}

.rank-1 {
    background: #8a7a3d;
    color: #fff;
}

.rank-2 {
    background: #6e6e6e;
    color: #fff;
}

.rank-3 {
    background: #7a5c4a;
    color: #fff;
}

.rank-other {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
}

.ok-icon {
    color: var(--ok);
}

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

.crumb a,
.icon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.crumb a {
    text-decoration: none;
}

.breakdown {
    margin-top: 0.5rem;
    font-size: 0.92rem;
}

.standings {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.95rem;
}

.standings th,
.standings td {
    padding: 0.65rem 0.35rem;
    text-align: center;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.standings th {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.85rem;
}

.standings-rank,
.standings-score,
.standings-vote {
    white-space: nowrap;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.standings-rank {
    width: 4.6rem;
}

.standings-score {
    width: 3.6rem;
}

.standings-vote {
    width: 2.8rem;
}

.standings-name {
    width: auto;
    text-align: left;
    padding-left: 0.7rem;
    padding-right: 0.4rem;
}

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

.char-count {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: right;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

@media (max-width: 640px) {
    .nav-user {
        min-width: 0;
        max-width: 6.5rem;
        overflow: hidden;
    }

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

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

    .form {
        max-width: 100%;
    }

    input[type="datetime-local"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    input[type="datetime-local"]::-webkit-datetime-edit {
        min-width: 0;
        max-width: 100%;
        padding: 0;
    }

    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        margin-left: 0.15rem;
        flex-shrink: 0;
    }
}


.nav a.is-current {
    color: var(--nav-hover-color, var(--text));
    background: var(--nav-hover-bg, var(--bg));
}

.division-tabs {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 1.75rem;
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.division-tabs a {
    position: relative;
    z-index: 1;
    flex: none;
    text-decoration: none;
    padding: 0.15rem 0 0.55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(28, 28, 28, 0.42);
    box-shadow: none;
    transition: color 0.32s ease;
}

.division-tabs a:hover,
.division-tabs a.is-current {
    color: var(--text);
}

.division-tabs a.is-current {
    box-shadow: inset 0 -2px 0 currentColor;
}

.js .division-tabs a.is-current {
    box-shadow: none;
}

.division-tabs-line {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--text);
    pointer-events: none;
    transform: translateX(0);
    transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1), width 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.site-header .division-tabs {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    margin: 0;
    transform: translate(-50%, -50%);
}

.site-header .division-tabs a {
    color: rgba(255, 255, 255, 0.62);
}

.site-header .division-tabs a:hover,
.site-header .division-tabs a.is-current {
    color: #ffffff;
}

.site-header .division-tabs-line {
    background: #ffffff;
}

body.has-home-hero > main.wrap:first-of-type:not(:has(.flash)) {
    display: none;
}

body.has-home-hero > main.wrap:first-of-type:has(.flash) {
    position: absolute;
    z-index: 30;
    top: var(--site-header-height);
    left: 0;
    right: 0;
    width: min(76rem, calc(100% - 2rem));
    margin-inline: auto;
    padding-top: 0.75rem;
    padding-bottom: 0;
    background: transparent;
    pointer-events: none;
}

body.has-home-hero > main.wrap:first-of-type:has(.flash) .flash {
    pointer-events: auto;
}

body.has-home-hero > main.wrap:last-of-type {
    padding-top: 0.75rem;
}

@media (min-width: 641px) {
    .division-tabs {
        font-size: 1.05rem;
    }

    .site-header .header-inner {
        width: calc(100% - 4rem);
        max-width: none;
    }

    body.has-home-hero main.wrap,
    body.is-event main.wrap {
        width: min(76rem, calc(100% - 4rem));
    }

    .topic-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 0.85rem;
    }

    .topic-list > li {
        display: flex;
        min-width: 0;
    }

    .topic-list > li > .topic-card {
        flex: 1;
        width: 100%;
        min-width: 0;
        grid-template-rows: auto 1fr auto;
    }

    body.has-home-hero > main.wrap:last-of-type {
        padding-top: 0.85rem;
    }
}

.division-hero {
    display: grid;
    width: 100%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.division-hero-media,
.division-hero-copy {
    grid-area: 1 / 1;
}

.division-hero-media {
    position: relative;
    min-height: 100%;
}

.division-hero-media::before {
    content: "";
    display: block;
    padding-top: 30.02%;
}

.division-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.division-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
}

.division-hero-copy {
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    min-height: 100%;
    padding: 0.85rem 1.25rem 0.7rem;
    color: #ffffff;
}

.division-hero-lead {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.35rem;
    min-width: 0;
}

.division-hero .season-heading {
    margin: 0;
    text-align: left;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 7vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .division-hero-media::before {
        padding-top: 108%;
    }

    .division-hero-media img {
        object-position: center bottom;
    }

    .js body.has-home-hero {
        --hero-top-clearance: calc(var(--site-header-height) + 0.45rem);
    }

    .js body.has-home-hero .site-header {
        position: fixed;
        left: 0;
        right: 0;
        background: rgba(0, 5, 58, var(--header-fade, 0));
    }

    .js body.has-home-hero .logo-name {
        opacity: var(--header-fade, 0);
    }

    .js body.has-home-hero .division-tabs {
        opacity: calc(1 - var(--header-fade, 0));
    }

    .js body.has-home-hero.header-swapped .division-tabs {
        pointer-events: none;
    }

    .js body.has-home-hero .division-hero-copy {
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-rows: minmax(0, 1fr) auto;
        align-items: end;
        padding-top: var(--hero-top-clearance);
    }

    .js body.has-home-hero .division-hero-lead {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        width: 100%;
        gap: 0.7rem;
    }

    .js body.has-home-hero .division-hero .season-heading {
        order: 1;
        flex-shrink: 0;
        margin-bottom: 1rem;
    }
}

.season-block {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.season-pills {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.45rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    max-width: calc(100vw - 2.5rem);
}

.members-open,
.special-rules-open {
    position: static;
    width: auto;
    margin: 0;
    padding: 4px 8px;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    white-space: nowrap;
}

.members-open {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.special-rules-open {
    background: rgba(255, 126, 126, 0.5);
    color: #ffffff;
}

.members-open:hover {
    background: rgba(255, 255, 255, 0.42);
    color: #ffffff;
}

.special-rules-open:hover {
    background: rgba(255, 126, 126, 0.68);
    color: #ffffff;
}

.members-open:focus-visible,
.special-rules-open:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.special-rules-open:focus-visible {
    outline-color: rgba(255, 186, 186, 0.95);
}

.members-dialog {
    width: min(32rem, calc(100% - 2rem));
    max-width: calc(100% - 2rem);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
}

.members-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.52s cubic-bezier(0.33, 1, 0.68, 1);
}

.members-dialog.is-open::backdrop {
    opacity: 1;
}

.members-dialog.is-closing::backdrop {
    opacity: 0;
    transition-duration: 0.36s;
    transition-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
}

.members-dialog-card {
    position: relative;
    padding: 1rem 0.95rem 1.05rem;
    background: rgba(0, 0, 0, 0.72);
    border-radius: var(--radius);
    color: #ffffff;
    opacity: 0;
    transform: scale(0.94);
    transform-origin: left top;
    transition:
        opacity 0.52s cubic-bezier(0.33, 1, 0.68, 1),
        transform 0.52s cubic-bezier(0.33, 1, 0.68, 1);
}

.members-dialog.is-open .members-dialog-card {
    opacity: 1;
    transform: scale(1);
}

.members-dialog.is-closing .members-dialog-card {
    opacity: 0;
    transform: scale(0.94);
    transition-duration: 0.36s;
    transition-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
}

.members-dialog.is-prep .members-dialog-card,
.members-dialog.is-prep::backdrop {
    transition: none;
}

@starting-style {
    .members-dialog.is-open .members-dialog-card {
        opacity: 0;
        transform: scale(0.94);
    }

    .members-dialog.is-open::backdrop {
        opacity: 0;
    }
}

.members-dialog-title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: center;
    color: #ffffff;
}

.members-dialog-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.members-dialog-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.members-dialog .member-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    gap: 0.45rem 0.75rem;
    margin: 0;
    text-align: center;
}

.members-dialog .member-list span {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    color: #ffffff;
}

.members-dialog .guide-copy {
    text-align: left;
    line-height: 1.65;
}

.members-dialog .guide-copy p,
.members-dialog .guide-copy ul {
    margin: 0;
}

.members-dialog .guide-copy ul {
    margin-top: 0.75rem;
    padding-left: 1.15rem;
}

.members-dialog .guide-copy li + li {
    margin-top: 0.4rem;
}

.members-dialog .guide-links {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 1rem;
}

.members-dialog .guide-links a {
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
}

@media (min-width: 641px) {
    .members-dialog .member-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .members-dialog-title {
        font-size: 0.75rem;
    }

    .members-dialog .member-list span {
        font-size: 0.72rem;
    }

    .members-dialog .guide-copy {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .members-dialog .guide-copy {
        font-size: 1.2rem;
    }
}

html:has(dialog.members-dialog--roster[open]) {
    overflow: hidden;
}

.members-dialog.members-dialog--roster {
    width: min(64rem, calc(100% - 1.25rem));
    max-width: calc(100% - 1.25rem);
    max-height: calc(100dvh - 1.25rem);
    padding: 2.7rem 0 0;
    overflow: visible;
    background: transparent;
}

.members-dialog.members-dialog--roster::backdrop {
    background: rgba(0, 5, 24, 0.72);
}

.members-dialog--roster .members-dialog-close {
    top: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.52s cubic-bezier(0.33, 1, 0.68, 1);
}

.members-dialog--roster.is-open .members-dialog-close {
    opacity: 1;
}

.members-dialog--roster.is-closing .members-dialog-close {
    opacity: 0;
    transition-duration: 0.36s;
    transition-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
}

.members-dialog--roster.is-prep .members-dialog-close {
    transition: none;
}

@starting-style {
    .members-dialog--roster.is-open .members-dialog-close {
        opacity: 0;
    }
}

.members-dialog--roster .roster-card {
    padding: 5px;
    border: 1px solid rgba(168, 196, 240, 0.46);
    border-radius: 2px;
    background: #00053a;
    box-shadow: 0 18px 50px rgba(0, 4, 24, 0.55);
    max-height: calc(100dvh - 5.2rem);
    overflow: hidden;
}

.roster-card-inner {
    max-height: calc(100dvh - 5.2rem - 12px);
    padding: 0 0 1.1rem;
    overflow: auto;
    border: 1px solid rgba(148, 176, 224, 0.28);
    border-radius: 1px;
    background: #00053a;
    scrollbar-color: rgba(168, 196, 240, 0.4) transparent;
}

.roster-hero {
    position: relative;
}

.roster-sky {
    position: relative;
    height: 18rem;
    overflow: hidden;
}

.roster-sky picture,
.roster-sky img {
    display: block;
    width: 100%;
    height: 100%;
}

.roster-sky img {
    object-fit: cover;
    object-position: center 72%;
}

.roster-sky::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 5, 58, 0.42) 0%, rgba(0, 5, 58, 0.05) 28%, rgba(0, 5, 58, 0.2) 58%, #00053a 100%);
}

.roster-brand {
    position: absolute;
    top: 0.85rem;
    left: 0.7rem;
    right: 0.7rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0;
}

.roster-brand .logo-mark {
    width: 3.2rem;
    height: 3.2rem;
    filter: drop-shadow(0 2px 8px rgba(0, 5, 58, 0.8));
}

.roster-brand .logo-name {
    height: 2.35rem;
    filter: drop-shadow(0 2px 8px rgba(0, 5, 58, 0.9));
}

.js body.has-home-hero .roster-brand .logo-name {
    opacity: 1;
}

.roster-head {
    margin-top: -1.6rem;
    padding: 0 1.05rem;
    text-align: center;
}

.roster-kicker {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    line-height: 1;
    color: rgba(255, 255, 255, 0.72);
}

.roster-season {
    margin: 0.45rem 0 0;
    font-family: var(--font-display);
    font-size: 2.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    color: #ffffff;
}

.special-rules-label {
    margin: 0.7rem 0 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    line-height: 1;
    color: #f3d48a;
}

.special-rules-copy {
    margin: 0.85rem auto 0.15rem;
    padding: 0 1.05rem;
    max-width: 42rem;
    text-align: left;
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.8;
    letter-spacing: 0.01em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.members-dialog--day .roster-sky::after {
    background: linear-gradient(180deg, rgba(29, 95, 168, 0.16) 0%, rgba(29, 95, 168, 0.02) 32%, rgba(0, 5, 58, 0.38) 66%, #00053a 100%);
}

.members-dialog--day .roster-brand .logo-mark,
.members-dialog--day .roster-brand .logo-name {
    filter: drop-shadow(0 1px 2px rgba(0, 18, 48, 0.9)) drop-shadow(0 0 10px rgba(0, 18, 48, 0.75));
}

.roster-names {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 1rem 0 0;
    padding: 0 1.05rem;
    list-style: none;
}

.roster-names li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    margin: 0;
    padding: 0.35rem 0.4rem;
    border: 1px solid rgba(150, 178, 230, 0.24);
    background: rgba(120, 156, 230, 0.08);
    text-align: center;
}

.roster-names li.is-self {
    border-color: rgba(159, 211, 255, 0.95);
    background: rgba(159, 211, 255, 0.16);
    box-shadow: 0 0 0 1px rgba(159, 211, 255, 0.45), 0 0 14px rgba(159, 211, 255, 0.28);
}

.roster-name {
    font-family: var(--font);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.35;
    text-wrap: balance;
    overflow-wrap: break-word;
}

@media (max-width: 640px) {
    .members-dialog.members-dialog--roster {
        width: calc(100% - 0.8rem);
        max-width: calc(100% - 0.8rem);
        padding-top: 2.15rem;
    }

    .members-dialog--roster .roster-card {
        max-height: calc(100dvh - 3.1rem);
    }

    .roster-card-inner {
        max-height: calc(100dvh - 3.1rem - 8px);
        padding: 0 0 0.5rem;
    }

    .roster-sky {
        height: 22rem;
    }

    .roster-brand {
        top: 0.65rem;
        left: 0.4rem;
        right: 0.4rem;
        gap: 0.4rem;
    }

    .roster-head {
        margin-top: -1.1rem;
        padding: 0 0.55rem;
    }

    .roster-kicker {
        font-size: 1rem;
        letter-spacing: 0.22em;
    }

    .roster-season {
        margin-top: 0.18rem;
        font-size: 1.85rem;
    }

    .special-rules-label {
        margin-top: 0.45rem;
        font-size: 0.82rem;
        letter-spacing: 0.18em;
    }

    .special-rules-copy {
        margin-top: 0.55rem;
        padding: 0 0.7rem;
        font-size: 1.12rem;
        line-height: 1.7;
    }

    .roster-names {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.22rem;
        margin-top: 0.45rem;
        padding: 0 0.45rem;
    }

    .roster-names li {
        min-height: 0;
        padding: 0.16rem 0.1rem;
    }

    .roster-name {
        font-size: 1.12rem;
        letter-spacing: 0;
        line-height: 1.2;
    }
}

@media (min-width: 641px) {
    .roster-sky {
        height: 13rem;
    }

    .roster-sky img {
        object-position: center 58%;
    }

    .roster-brand .logo-mark {
        width: 2.55rem;
        height: 2.55rem;
    }

    .roster-brand .logo-name {
        height: 1.85rem;
    }

    .roster-head {
        margin-top: -1.35rem;
        padding: 0 1.15rem;
    }

    .roster-kicker {
        font-size: 0.78rem;
    }

    .roster-season {
        font-size: 2.15rem;
    }

    .special-rules-label {
        font-size: 0.78rem;
    }

    .special-rules-copy {
        padding: 0 1.15rem;
        font-size: 1.02rem;
    }

    .roster-names {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 0 1.15rem;
    }

    .roster-names li {
        min-height: 2.35rem;
    }

    .roster-name {
        font-size: 0.98rem;
    }
}

@media (min-width: 1100px) {
    .roster-names {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .nav,
    .members-dialog-card,
    .members-dialog::backdrop,
    .members-dialog--roster .members-dialog-close {
        transition: none;
    }
}

.season-heading,
.member-list {
    text-align: center;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.7rem;
}

.member-list span {
    font-size: 0.92rem;
}

.like-form {
    margin-left: auto;
}

.like-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    font-size: 1.05rem;
    line-height: 1;
}

.like-count {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}

.like-btn.is-liked {
    color: #c62828;
}

.like-btn:disabled {
    cursor: default;
    opacity: 0.65;
}

.result-hearts.is-empty {
    display: none;
}

/* ---- Profile: radar panel (1部 = night sky / 2部 = day sky) ---- */

.radar-panel {
    /* 既定は夜空(1部) */
    --radar-text: #ffffff;
    --radar-text-soft: rgba(255, 255, 255, 0.78);
    --radar-text-dim: rgba(255, 255, 255, 0.55);
    --radar-line: rgba(255, 255, 255, 0.22);
    --radar-line-strong: rgba(255, 255, 255, 0.7);
    --radar-row-line: rgba(255, 255, 255, 0.14);
    --radar-bar-track: rgba(255, 255, 255, 0.16);
    --radar-bar-fill: linear-gradient(90deg, #9fd3ff, #ffffff);
    --radar-bar-glow: rgba(159, 211, 255, 0.7);
    --radar-emphasis: #9fd3ff;
    --radar-dot-stroke: var(--night-deep);
    --radar-outline: rgba(13, 22, 70, 0.75);
    position: relative;
    padding: 1.25rem 1.3rem 1.2rem;
    border-radius: var(--radius);
    background:
        radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--day-accent) 28%, transparent) 0%, transparent 55%),
        linear-gradient(150deg, var(--night-deep) 0%, #101d5c 55%, var(--night-accent) 100%);
    color: var(--radar-text);
    overflow: hidden;
}

.radar-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 28%, rgba(255, 255, 255, 0.5) 0, transparent 1.3px),
        radial-gradient(circle at 26% 76%, rgba(255, 255, 255, 0.35) 0, transparent 1.2px),
        radial-gradient(circle at 44% 12%, rgba(255, 255, 255, 0.45) 0, transparent 1.4px),
        radial-gradient(circle at 63% 86%, rgba(255, 255, 255, 0.3) 0, transparent 1.1px),
        radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.5) 0, transparent 1.5px),
        radial-gradient(circle at 90% 62%, rgba(255, 255, 255, 0.35) 0, transparent 1.2px),
        radial-gradient(circle at 54% 48%, rgba(255, 255, 255, 0.2) 0, transparent 1px),
        radial-gradient(circle at 35% 40%, rgba(255, 255, 255, 0.25) 0, transparent 1px),
        radial-gradient(circle at 84% 88%, rgba(255, 255, 255, 0.4) 0, transparent 1.3px);
    pointer-events: none;
}

.radar-panel::after {
    content: "";
    position: absolute;
    top: 8%;
    right: 12%;
    width: 38%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55) 60%, transparent);
    transform: rotate(-24deg);
    transform-origin: right center;
    opacity: 0.7;
    pointer-events: none;
}

/* 2部: 明るい昼空 */
.radar-panel--day {
    --radar-text: var(--night-deep);
    --radar-text-soft: rgba(13, 22, 70, 0.72);
    --radar-text-dim: rgba(13, 22, 70, 0.55);
    --radar-line: rgba(13, 22, 70, 0.2);
    --radar-line-strong: rgba(13, 22, 70, 0.6);
    --radar-row-line: rgba(13, 22, 70, 0.14);
    --radar-bar-track: rgba(13, 22, 70, 0.12);
    --radar-bar-fill: linear-gradient(90deg, var(--day-deep), var(--day-accent));
    --radar-bar-glow: rgba(29, 95, 168, 0.45);
    --radar-emphasis: var(--day-deep);
    --radar-dot-stroke: #ffffff;
    --radar-outline: rgba(255, 255, 255, 0.85);
    background:
        radial-gradient(circle at 14% 8%, rgba(255, 250, 220, 0.95) 0%, rgba(255, 244, 190, 0.55) 9%, transparent 24%),
        radial-gradient(ellipse at 10% 0%, rgba(255, 255, 255, 0.6) 0%, transparent 45%),
        linear-gradient(160deg, #eaf6ff 0%, #bfe1ff 45%, color-mix(in srgb, var(--day-accent) 70%, #ffffff) 100%);
}

.radar-panel--day::before {
    background:
        radial-gradient(ellipse 14% 7% at 68% 18%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 55%, transparent 100%),
        radial-gradient(ellipse 9% 5% at 60% 22%, rgba(255, 255, 255, 0.85) 0%, transparent 100%),
        radial-gradient(ellipse 10% 5% at 76% 15%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
        radial-gradient(ellipse 12% 6% at 22% 80%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 60%, transparent 100%),
        radial-gradient(ellipse 7% 4% at 30% 84%, rgba(255, 255, 255, 0.65) 0%, transparent 100%),
        radial-gradient(ellipse 8% 4% at 88% 70%, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
}

.radar-panel--day::after {
    top: 14%;
    right: auto;
    left: 6%;
    width: 42%;
    background: linear-gradient(90deg, rgba(255, 236, 170, 0.85), rgba(255, 255, 255, 0.5) 60%, transparent);
    transform: rotate(18deg);
    transform-origin: left center;
    opacity: 0.8;
}

.radar-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 2rem;
}

.radar-chart {
    width: min(100%, 23rem);
    height: auto;
    overflow: visible;
}

.radar-ring,
.radar-spoke {
    fill: none;
    stroke: var(--radar-line);
    stroke-width: 1;
}

.radar-ring {
    stroke-dasharray: 3 4;
}

.radar-ring-mean {
    stroke: var(--radar-line-strong);
    stroke-dasharray: none;
    stroke-width: 1.2;
}

.radar-mean-label {
    fill: var(--radar-line-strong);
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 0.08em;
}

.radar-shape {
    stroke-width: 2;
    stroke-linejoin: round;
    transform-origin: var(--radar-cx, 180px) var(--radar-cy, 150px);
    transform-box: view-box;
    animation: radar-open 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.radar-dot {
    fill: var(--radar-text);
    stroke: var(--radar-dot-stroke);
    stroke-width: 1.5;
    animation: radar-fade 0.5s ease 0.55s both;
}

@keyframes radar-open {
    from {
        transform: scale(0.08);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes radar-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .radar-shape,
    .radar-dot {
        animation: none;
    }
}

.radar-label {
    fill: var(--radar-text);
    font-size: 13px;
    font-family: var(--font-display);
}

.radar-label-name {
    fill: var(--radar-text-soft);
    font-weight: 500;
}

.radar-label-value {
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.radar-center-value {
    fill: var(--radar-text);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    paint-order: stroke;
    stroke: var(--radar-outline);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.radar-center-caption {
    fill: var(--radar-text-soft);
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 0.3em;
    paint-order: stroke;
    stroke: var(--radar-outline);
    stroke-width: 2px;
}

.radar-summary {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    min-width: 12rem;
    flex: 1 1 12rem;
    max-width: 18rem;
}

.radar-summary-row {
    display: grid;
    gap: 0.2rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--radar-row-line);
}

.radar-summary-row:last-child {
    border-bottom: 0;
}

.radar-summary dt {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0;
    color: var(--radar-text-soft);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
}

.radar-summary dt small {
    font-size: 0.72rem;
    color: var(--radar-text-dim);
}

.radar-summary dd {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.15rem 0.65rem;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.radar-summary dd small {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--radar-text-dim);
}

.radar-summary-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: var(--radar-text);
}

.radar-summary-bar {
    position: relative;
    display: block;
    height: 5px;
    border-radius: 999px;
    background: var(--radar-bar-track);
    overflow: hidden;
}

.radar-summary-bar > span {
    position: absolute;
    inset: 0 auto 0 0;
    width: calc(var(--ratio, 0) * 100%);
    border-radius: inherit;
    background: var(--radar-bar-fill);
    box-shadow: 0 0 8px var(--radar-bar-glow);
}

.radar-summary-overall dt {
    color: var(--radar-text);
    font-weight: 700;
}

.radar-summary-overall .radar-summary-value {
    font-size: 1.45rem;
    color: var(--radar-emphasis);
}

.radar-summary-like dd {
    grid-template-columns: 1fr;
}

.doc-page h1 {
    margin-bottom: 0.35rem;
}

.doc-lead {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.8;
}

.doc-block {
    position: relative;
    margin: 0 0 1rem;
    padding: 1.2rem 1.3rem 1.25rem;
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
}

.doc-block h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    padding: 0 0 0.6rem 0.8rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    position: relative;
}

.doc-block h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: calc(0.6rem + 0.2em);
    width: 3px;
    border-radius: 2px;
    background: var(--header-bg, #00053a);
}

body.is-mypage .doc-block > h2.panel-title:not(.tab-panel-title) {
    padding-left: 0;
}

body.is-mypage .doc-block > h2.panel-title:not(.tab-panel-title)::before {
    content: none;
}

.preserve-breaks {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.doc-block p,
.doc-block ul {
    margin: 0;
    line-height: 1.85;
}

.doc-block p + ul {
    margin-top: 0.5rem;
}

.doc-block ul {
    padding-left: 1.35rem;
}

.doc-block li {
    padding-left: 0.15rem;
}

.doc-block li + li {
    margin-top: 0.45rem;
}

.doc-block li::marker {
    color: var(--muted);
}

.doc-block img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.4rem 0;
}

.rule-phase img {
    width: 100%;
    margin: 0.55rem 0 0.15rem;
    border-radius: var(--radius);
}

.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.doc-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
}

.doc-links a:hover {
    background: var(--bg);
}

.doc-links a .fa-solid {
    color: var(--muted);
}

.doc-block .deviation-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 0.4rem;
}

.deviation-board h3 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.deviation-board h3 small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.deviation-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.deviation-table th,
.deviation-table td {
    padding: 0.38rem 0.35rem;
    border-bottom: 1px solid var(--line);
    text-align: right;
    font-size: 0.92rem;
}

.deviation-table th {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.deviation-table .col-rank {
    width: 3rem;
    text-align: center;
}

.deviation-table .col-name {
    text-align: left;
    overflow-wrap: anywhere;
}

.deviation-table .col-t,
.deviation-table .col-works {
    width: 4.2rem;
}

.deviation-table tbody tr:last-child td {
    border-bottom: 0;
}

.deviation-table .user-name {
    font-weight: 600;
}

@media (min-width: 900px) {
    .doc-block .deviation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.1rem 1.6rem;
    }
}

@media (max-width: 640px) {
    .deviation-board h3 {
        font-size: 1.35rem;
    }

    .deviation-board h3 small {
        font-size: 1.05rem;
    }

    .deviation-table th,
    .deviation-table td {
        padding: 0.55rem 0.3rem;
        font-size: 1.2rem;
    }

    .deviation-table th {
        font-size: 1.05rem;
    }
}

@media (max-width: 640px) {
    .doc-lead {
        font-size: 1.25rem;
    }

    .doc-block {
        padding: 1.4rem 1.4rem 1.5rem;
    }

    .doc-block h2 {
        font-size: 1.4rem;
    }

    .doc-block p,
    .doc-block ul {
        font-size: 1.3rem;
    }

    .doc-block ul {
        padding-left: 1.6rem;
    }

    .doc-links a {
        padding: 0.8rem 1.3rem;
        font-size: 1.3rem;
    }
}

.doc-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    margin: 0 0 0.35rem;
}

.doc-head h1 {
    margin: 0;
}

.doc-block .muted {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.doc-block > .muted:last-child {
    margin-bottom: 0;
}

.doc-block .panel-title .fa-solid {
    width: auto;
}

.season-switch {
    margin: 0;
}

.season-switch label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.88rem;
}

.season-switch select {
    width: auto;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--night-accent) 40%, var(--line-strong));
    background: var(--card);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.season-switch select:hover {
    border-color: var(--night-accent);
}

.season-switch select:focus,
.season-switch select:focus-visible {
    outline: none;
    border-color: var(--night-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--night-accent) 22%, transparent);
}

.playoff-honor {
    position: relative;
    margin: 0 0 1rem;
    padding: 1.15rem 1.3rem 1.2rem;
    background: linear-gradient(135deg, var(--night-deep) 0%, var(--night-accent) 100%);
    border: 0;
    border-radius: var(--radius);
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

.playoff-honor::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.16) 0, transparent 2px),
        radial-gradient(circle at 72% 65%, rgba(255, 255, 255, 0.14) 0, transparent 2px),
        radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.18) 0, transparent 1.5px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.12) 0, transparent 1.5px),
        radial-gradient(circle at 55% 15%, rgba(255, 255, 255, 0.1) 0, transparent 1.5px);
    pointer-events: none;
}

.playoff-honor > * {
    position: relative;
}

.playoff-honor-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    opacity: 0.85;
}

.playoff-honor-label .fa-solid {
    color: #f5d36b;
}

.playoff-honor-names {
    margin: 0.4rem 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.playoff-honor p:last-child {
    margin: 0;
    font-size: 0.88rem;
}

.playoff-honor a {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.55);
    text-underline-offset: 0.2em;
}

.playoff-honor .user-name.is-unregistered {
    color: rgba(255, 255, 255, 0.62);
}

/* ---- Standings: division accents ---- */

.standings-block--night {
    --div-accent: var(--night-accent);
    --div-deep: var(--night-deep);
}

.standings-block--day {
    --div-accent: var(--day-accent);
    --div-deep: var(--day-deep);
}

.standings-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 1100px) {
    body.is-mypage {
        --max: 82rem;
    }

    .profile-stats-group .tab-list--stats {
        display: none;
    }

    .profile-stats-group [role="tabpanel"][hidden] {
        display: block;
    }

    .profile-stats-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .profile-stats-columns:not(:has(> :nth-child(2))) {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-stats-columns:has(> :nth-child(2)) .radar-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-stats-columns:has(> :nth-child(2)) .radar-summary {
        max-width: none;
        width: 100%;
    }
}

@media (min-width: 641px) {
    body.is-standings {
        --max: 76rem;
    }

    body.is-standings .standings-columns {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    body.is-standings .standings-table td.standings-name {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.standings-block.doc-block {
    padding: 0;
    overflow: hidden;
    overflow: clip; /* keeps sticky <th> working; falls back to hidden */
    border-color: color-mix(in srgb, var(--div-accent) 35%, var(--line));
}

.standings-banner {
    border-radius: calc(var(--radius) - var(--border-w)) calc(var(--radius) - var(--border-w)) 0 0;
}

/* Banner */

.standings-banner {
    position: relative;
    display: grid;
    aspect-ratio: 4 / 1;
    min-height: 6.5rem;
    overflow: hidden;
    background: var(--div-deep);
    color: #ffffff;
}

.standings-banner picture,
.standings-banner-copy {
    grid-area: 1 / 1;
}

.standings-banner picture {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
}

.standings-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.standings-banner picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--div-deep) 88%, transparent) 0%, color-mix(in srgb, var(--div-deep) 55%, transparent) 55%, color-mix(in srgb, var(--div-deep) 20%, transparent) 100%),
        linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--div-deep) 55%, transparent) 100%);
}

.standings-banner-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.9rem 1.2rem 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.standings-banner-en {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    line-height: 1;
    opacity: 0.85;
}

.standings-block .standings-banner h2 {
    display: block;
    margin: 0.2rem 0 0;
    padding: 0;
    border: 0;
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.standings-block .standings-banner h2::before {
    display: none;
}

.pair-division-count {
    margin-left: 0.55em;
    font-size: 0.58em;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: 0.08em;
}

.standings-banner-note {
    margin: 0.3rem 0 0;
    font-family: var(--font-display);
    font-size: 0.68rem;
    line-height: 1.5;
    opacity: 0.88;
}

.standings-flip {
    margin: 0 0 1rem;
}

.standings-flip-inner {
    position: relative;
}

.standings-flip .standings-block {
    margin: 0;
}

.standings-flip-face.is-back {
    display: none;
}

.js .standings-flip.is-showing-back .standings-flip-face.is-back {
    display: block;
}

.js .standings-flip.is-showing-back .standings-flip-face.is-front {
    display: none;
}

.js .standings-flip .standings-body {
    transition: opacity 160ms ease;
}

.js .standings-flip.is-dim,
.js .standings-flip.is-busy {
    pointer-events: none;
}

.js .standings-flip.is-dim .standings-body {
    opacity: 0;
}

.standings-banner .standings-flip-toggle {
    position: absolute;
    top: 0.65rem;
    right: 0.7rem;
    z-index: 2;
    margin: 0;
    padding: 0.28rem 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.38);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-shadow: none;
}

.standings-banner .standings-flip-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    .js .standings-flip .standings-body {
        transition: none;
    }
}

.standings-body {
    padding: 0.4rem 1rem 0.9rem;
}

.standings-body > .muted {
    margin: 0.6rem 0 0.2rem;
    font-size: 0.9rem;
}

/* Table */

.standings-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--card);
    font-variant-numeric: tabular-nums;
}

.standings-table .col-rank {
    width: 3.4rem;
}

.standings-table .col-works {
    width: 4.2rem;
}

.standings-table .col-rate,
.standings-table .col-avg {
    width: calc(5.6rem + var(--rate-extra, 0) * 0.65rem);
}

.standings-table th,
.standings-table td {
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.standings-table th {
    position: sticky;
    top: var(--site-header-height);
    z-index: 2;
    padding: 0.6rem 0.4rem 0.55rem;
    background: var(--card);
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--div-accent) 55%, var(--line));
    border-bottom: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.standings-table td {
    padding: 0.6rem 0.4rem;
    line-height: 1.4;
    transition: background-color 0.15s ease;
}

.standings-table tbody tr:hover td:not([rowspan]) {
    background: color-mix(in srgb, var(--div-accent) 5%, var(--card));
}

.standings-table tbody tr:last-child td {
    border-bottom: 0;
}

.standings-table th.standings-name,
.standings-table td.standings-name {
    text-align: left;
}

.standings-table td.standings-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.standings-table td.standings-name a {
    text-decoration: none;
}

.standings-table td.standings-name a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.standings-table td.standings-works {
    color: var(--muted);
}

.standings-table td.standings-rank {
    position: relative;
    font-family: var(--font-display);
    font-weight: 700;
    color: color-mix(in srgb, var(--div-accent) 80%, var(--text));
}

.standings-table td.standings-rank span {
    position: relative;
}

.standings-rank.is-playoff span::before {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(100% + 0.28rem);
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: #c62828;
    transform: translateY(-50%);
}

.standings-table tr.is-cutoff td {
    border-top: 2px solid #c62828;
}

.standings-table tr.is-self td {
    background: color-mix(in srgb, var(--div-accent) 10%, var(--card));
}

.standings-table tr.is-self td.standings-name {
    color: color-mix(in srgb, var(--div-accent) 70%, var(--text));
}

.standings-table tbody tr.is-self:hover td:not([rowspan]) {
    background: color-mix(in srgb, var(--div-accent) 14%, var(--card));
}

/* Rate bar */

.standings-table td.standings-rate {
    position: relative;
    padding-right: 0.55rem;
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
}

.standings-table td.standings-rate::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0.25rem;
    width: calc((100% - 0.8rem) * var(--rate, 0));
    border-radius: 3px;
    background: color-mix(in srgb, var(--div-accent) 18%, transparent);
    pointer-events: none;
}

.standings-table td.standings-rate.is-empty::before,
.standings-table td.standings-rate.is-individual::before {
    display: none;
}

.standings-table td.standings-rate.is-individual {
    padding-right: 0.4rem;
    padding-left: 0.4rem;
    color: var(--muted);
    font-weight: 500;
    text-align: center;
}

.standings-table tr.is-pair-top td:not([rowspan]) {
    border-bottom-color: transparent;
}

.standings-table td.standings-rank[rowspan],
.standings-table td.standings-pair-rate {
    vertical-align: middle;
}

.standings-table td.standings-pair-rate::before {
    top: 50%;
    bottom: auto;
    height: 1.5rem;
    transform: translateY(-50%);
}

.standings-table td.standings-rate.is-empty {
    color: var(--muted);
    font-weight: 500;
}

.standings-table td.standings-rate > span {
    position: relative;
    white-space: nowrap;
}

/* Legend */

.standings-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 0.85rem 0 1rem;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.8rem;
    line-height: 1.5;
}

.standings-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.standings-legend li::before {
    content: "";
    flex-shrink: 0;
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
}

.standings-legend .legend-playoff::before {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #c62828;
}

.standings-legend .legend-cutoff::before {
    height: 2px;
    width: 1rem;
    background: #c62828;
}

.standings-legend .legend-below::before {
    content: "—";
    width: auto;
    height: auto;
    line-height: 1;
    font-weight: 600;
}

.standings-legend .legend-self::before {
    border-radius: 2px;
    background: color-mix(in srgb, var(--night-accent) 18%, var(--card));
    border: 1px solid color-mix(in srgb, var(--night-accent) 45%, var(--line));
}

/* ---- Profile hero ---- */

.profile-hero--night {
    --div-accent: var(--night-accent);
    --div-deep: var(--night-deep);
}

.profile-hero--day {
    --div-accent: var(--day-accent);
    --div-deep: var(--day-deep);
}

.profile-hero.doc-block {
    padding: 0;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--div-accent) 35%, var(--line));
}

.profile-hero-band {
    position: relative;
    height: 5.5rem;
    background: var(--div-deep);
    overflow: hidden;
}

.profile-hero-band img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.profile-hero-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--div-deep) 15%, transparent) 0%, color-mix(in srgb, var(--div-deep) 65%, transparent) 100%);
}

.profile-hero-division {
    position: absolute;
    right: 1.1rem;
    top: 0.85rem;
    z-index: 1;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.profile-hero-body {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "identity";
    padding: 0.95rem 1.3rem 1.15rem;
}

.profile-identity {
    grid-area: identity;
    display: grid;
    gap: 0.25rem;
    justify-items: start;
    min-width: 0;
}

.profile-identity .member-no {
    margin: 0;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: var(--div-deep);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.profile-identity .profile-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-identity .muted {
    margin: 0;
    font-size: 0.85rem;
}

.profile-x {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.1rem;
    color: inherit;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.profile-x:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.profile-x .fa-brands,
.profile-x-label .fa-brands {
    font-size: 0.92em;
}

.profile-identity .profile-x-edit {
    width: 100%;
    justify-self: stretch;
    margin-top: 0.15rem;
}

.profile-x-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

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

.profile-x-summary::marker {
    content: "";
}

.profile-x-summary:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.profile-x-edit:not([open]) > .profile-x-form {
    display: none;
}

.profile-identity .profile-x-form {
    width: 100%;
    justify-self: stretch;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid color-mix(in srgb, var(--div-accent) 28%, var(--line));
    gap: 0.7rem;
}

.profile-x-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
}

.profile-x-form .flash {
    margin: 0;
}

.profile-x-form input[type="text"] {
    max-width: 24rem;
}

.profile-x-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
}

.doc-block .profile-chips,
.doc-block .season-chips {
    padding: 0;
    line-height: 1.2;
}

.doc-block .profile-chips li,
.doc-block .season-chips li {
    margin: 0;
}

.profile-chips {
    grid-area: chips;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-chips li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--div-accent) 30%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--div-accent) 7%, var(--card));
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
}

.profile-chips .fa-solid {
    color: var(--div-accent);
    font-size: 0.8em;
}

.profile-chips .profile-chip-like .fa-solid {
    color: #c62828;
}

.season-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.season-chips li {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem 0.35rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--night-deep), var(--night-accent));
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.season-chips li span {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    opacity: 0.75;
}

.profile-stats > .muted {
    margin-bottom: 0.9rem;
}

.profile-stats-group {
    margin: 0 0 1rem;
}

.profile-stats-columns {
    display: grid;
    gap: 1rem;
}

.profile-stats-columns > .doc-block {
    margin: 0;
    min-width: 0;
}

/* ---- Tabs (progressive enhancement: JS無しでは全パネル表示) ---- */

.tab-list {
    display: flex;
    gap: 1.4rem;
    margin: 0 0 1rem;
    padding: 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
    display: none;
}

html:not(.js) .tab-list {
    display: none;
}

.tab-list .tab {
    appearance: none;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 -1px;
    padding: 0.35rem 0.15rem 0.6rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

.tab-list .tab[aria-selected="true"] {
    color: var(--text);
    border-bottom-color: var(--header-bg, #00053a);
}

.tab-list .tab:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
    border-radius: 4px;
}

.tab-list .tab-count {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tab-list .tab[aria-selected="true"] .tab-count {
    background: var(--header-bg, #00053a);
    color: #ffffff;
}

.tab-list .tab .profile-stats-division {
    opacity: 0.55;
}

.tab-list .tab[aria-selected="true"] .profile-stats-division {
    opacity: 1;
}

.tab-list .tab--night .profile-stats-division {
    background: var(--night-deep);
}

.tab-list .tab--day .profile-stats-division {
    background: var(--day-deep);
}

.js .tab-panel-title {
    display: none;
}

.js .tab-panel > .muted {
    margin-top: 0;
}

/* 成績タブ: スマホのみ。PCでは横並びにするのでタブを隠し全パネルを表示 */
.profile-stats-group .tab-list--stats {
    margin-bottom: 0.9rem;
}

@media (max-width: 1099px) {
    .js .profile-stats-group:has(.tab-list--stats) .profile-stats-title {
        display: none;
    }
}

.favorite-received-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.35rem 0 0;
    color: #c62828;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.favorite-received-count .fa-solid {
    font-size: 0.85em;
}

.profile-stats--night {
    --div-accent: var(--night-accent);
    --div-deep: var(--night-deep);
}

.profile-stats--day {
    --div-accent: var(--day-accent);
    --div-deep: var(--day-deep);
}

.profile-stats-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.profile-stats-division {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: var(--div-deep, var(--night-deep));
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
    line-height: 1.2;
}

.doc-block .favorite-list {
    padding-left: 0;
}

.doc-block .favorite-list li {
    padding: 0.9rem 0;
}

.doc-block .favorite-list li:first-child {
    padding-top: 0.2rem;
}

.doc-block .favorite-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0.2rem;
}

.doc-block .favorite-list .favorite-topic {
    display: block;
    color: var(--muted);
    font-family: var(--font);
    font-size: inherit;
    font-weight: 700;
    line-height: 1.55;
    text-decoration: none;
    white-space: pre-wrap;
}

.doc-block .favorite-list .favorite-topic:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.doc-block .favorite-list .favorite-image {
    margin: 0 0 0.45rem;
}

.doc-block .favorite-list .work-body {
    margin: 0.35rem 0 0.2rem;
}

.doc-block .favorite-list .muted {
    margin: 0;
    font-size: 0.85rem;
}

.auth-page {
    width: min(100%, 26rem);
    margin: 0 auto;
}

.auth-page h1 {
    justify-content: center;
}

.auth-page .doc-lead {
    text-align: center;
}

.auth-card {
    padding: 1.5rem 1.5rem 1.4rem;
}

.auth-card .flash {
    margin: 0 0 1.1rem;
}

.auth-card .form {
    gap: 1.1rem;
}

.auth-card .form label {
    gap: 0.45rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-card .form .hint {
    font-weight: 400;
    line-height: 1.6;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    padding: 0.7rem 0.8rem;
    border-color: var(--line-strong);
}

.auth-card .form > button {
    width: 100%;
    justify-content: center;
    margin-top: 0.3rem;
    padding: 0.8rem 1rem;
    background: var(--header-bg, #00053a);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-card .form > button:hover {
    background: color-mix(in srgb, var(--header-bg, #00053a) 85%, #ffffff);
}

.auth-alt {
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.auth-alt a {
    color: var(--text);
    font-weight: 600;
    text-underline-offset: 0.2em;
}

@media (max-width: 640px) {
    .doc-block .muted,
    .standings-body > .muted,
    .profile-identity .muted,
    .doc-block .favorite-list .muted,
    .auth-alt {
        font-size: 1.2rem;
    }

    .season-switch label {
        font-size: 1.2rem;
    }

    .season-switch select {
        font-size: 1.3rem;
        padding: 0.6rem 1rem;
    }

    .playoff-honor-label {
        font-size: 1.05rem;
    }

    .playoff-honor-names {
        font-size: 1.7rem;
    }

    .playoff-honor p:last-child {
        font-size: 1.2rem;
    }

    .standings-banner {
        aspect-ratio: 3 / 1;
        min-height: 11rem;
    }

    .standings-banner-copy {
        padding: 1.2rem 1.5rem 1.1rem;
    }

    .standings-banner-en {
        font-size: 1.05rem;
    }

    .standings-block .standings-banner h2 {
        font-size: 2.4rem;
    }

    .standings-banner-note {
        font-size: 1rem;
    }

    .standings-banner .standings-flip-toggle {
        top: 0.9rem;
        right: 1rem;
        padding: 0.4rem 0.95rem;
        font-size: 0.95rem;
    }

    .standings-body {
        padding: 0.6rem 1.2rem 1.2rem;
    }

    .standings-table .col-rank {
        width: 4.4rem;
    }

    .standings-table .col-works {
        width: 5.4rem;
    }

    .standings-table .col-rate,
    .standings-table .col-avg {
        width: calc(7.2rem + var(--rate-extra, 0) * 0.85rem);
    }

    .standings-table th {
        padding: 0.8rem 0.5rem 0.7rem;
        font-size: 1.1rem;
    }

    .standings-table td {
        font-size: 1.3rem;
        padding: 0.8rem 0.5rem;
    }

    .standings-table td.standings-rate {
        padding-right: 0.7rem;
    }

    .standings-table td.standings-rate::before {
        top: 0.55rem;
        bottom: 0.55rem;
    }

    .standings-table td.standings-pair-rate::before {
        top: 50%;
        bottom: auto;
        height: 1.8rem;
        transform: translateY(-50%);
    }

    .standings-rank.is-playoff span::before {
        width: 0.55rem;
        height: 0.55rem;
        right: calc(100% + 0.32rem);
    }

    .standings-legend {
        gap: 0.5rem 1.2rem;
        margin: 0.7rem 0 1.2rem;
        font-size: 1.15rem;
    }

    .standings-legend li::before {
        width: 1rem;
        height: 1rem;
    }

    .standings-legend .legend-playoff::before {
        width: 0.62rem;
        height: 0.62rem;
    }

    .profile-hero-band {
        height: 8rem;
    }

    .profile-hero-division {
        font-size: 1.05rem;
    }

    .profile-identity .member-no {
        font-size: 1rem;
    }

    .profile-identity .profile-name {
        font-size: 2.1rem;
    }

    .profile-x,
    .profile-x-summary {
        font-size: 1.25rem;
    }

    .profile-x-form label,
    .profile-x-form .button-link {
        font-size: 1.15rem;
    }

    .profile-x-form .hint {
        font-size: 1.05rem;
    }

    .profile-x-form input[type="text"] {
        padding: 0.75rem 0.85rem;
        font-size: 1.2rem;
    }

    .profile-x-form button[type="submit"]:not(.button-link) {
        padding: 0.75rem 1.15rem;
        font-size: 1.15rem;
    }

    .profile-chips li {
        padding: 0.45rem 1.1rem;
        font-size: 1.15rem;
    }

    .season-chips li {
        padding: 0.5rem 1.2rem 0.5rem 1.1rem;
        font-size: 1.5rem;
    }

    .season-chips li span {
        font-size: 0.85rem;
    }

    .radar-panel {
        padding: 1.4rem 1.2rem 1.3rem;
    }

    .radar-chart {
        width: 100%;
    }

    .radar-summary {
        max-width: none;
    }

    .radar-summary dt {
        font-size: 1.2rem;
    }

    .radar-summary dt small,
    .radar-summary dd small {
        font-size: 1rem;
    }

    .radar-summary-value {
        font-size: 1.8rem;
    }

    .doc-block .favorite-list .favorite-topic,
    .doc-block .favorite-list .work-body {
        font-size: 1.3rem;
    }

    .auth-page {
        width: 100%;
    }

    .auth-card .flash {
        font-size: 1.2rem;
    }

    .auth-card .form label {
        font-size: 1.25rem;
    }

    .auth-card .form .hint {
        font-size: 1.15rem;
    }

    .auth-card input[type="text"],
    .auth-card input[type="password"] {
        padding: 1rem 1.1rem;
        font-size: 1.6rem;
    }

    .auth-card .form > button {
        padding: 1.1rem 1rem;
        font-size: 1.4rem;
    }
}

.favorite-list,
.event-grid {
    list-style: none;
    margin: 0;
    padding: 0;
}

.favorite-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.favorite-list,
.favorite-more {
    overflow-anchor: none;
}

.favorite-more {
    display: flex;
    justify-content: center;
    min-height: 1px;
}

.favorite-more.is-active {
    min-height: 2.75rem;
    margin-top: 0.75rem;
}

.favorite-more-status {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 640px) {
    .favorite-more-status {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .favorite-more-status .fa-spin {
        animation: none;
    }
}

.favorite-image {
    display: block;
    width: fit-content;
    margin: 0.45rem 0;
}

.favorite-image img {
    display: block;
    width: auto;
    max-width: min(100%, 18rem);
    max-height: 10rem;
    height: auto;
    object-fit: contain;
    object-position: left top;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.event-grid a {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    text-decoration: none;
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
}

.event-admin-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.event-admin-card > a {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.event-admin-card > a span {
    padding-bottom: 0.45rem;
}

.event-card-delete {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0.55rem 0.75rem 0.75rem;
    border-top: 1px solid var(--line);
}

.event-card-delete .button {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.event-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.event-grid span {
    padding: 0 0.9rem 0.9rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.type-chip-playoff,
.type-chip-exhibition {
    font-weight: 700;
}

.type-chip-event {
    color: #ffffff;
    background: var(--header-bg);
    font-weight: 700;
    text-decoration: none;
}

.event-grid .event-card-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    background: #e4e4e4;
}

.event-grid span small {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.event-image-preview {
    display: block;
    width: min(100%, 16rem);
    margin-top: 0.85rem;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
}

.event-create,
.season-create {
    margin-bottom: 1.25rem;
}

.season-create input[type="text"] {
    max-width: 12rem;
}

.event-settings {
    margin-top: 1.5rem;
}

.event-settings summary {
    cursor: pointer;
    font-weight: 700;
}

.event-settings .form {
    margin: 0.85rem 0;
}

.js .header-inner {
    position: relative;
}

@media (min-width: 641px) {
    .site-header .division-tabs {
        display: none;
    }

    .nav {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        margin-left: auto;
        gap: 0.05rem;
        min-width: 0;
    }

    .nav a {
        white-space: nowrap;
        gap: 0;
        padding: 0.32rem 0.5rem;
    }

    .nav a .fa-solid {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 980px) {
    .site-header .header-inner {
        width: calc(100% - 1.5rem);
        gap: 0.45rem;
    }

    .logo-mark {
        width: 2rem;
        height: 2rem;
    }

    .logo-name {
        height: 1.9rem;
    }

    .nav {
        font-size: 0.78rem;
    }

    .nav a {
        padding: 0.22rem 0.32rem;
    }
}

@media (max-width: 640px) {
    .js .nav {
        display: flex;
        position: fixed;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 45;
        flex-direction: row;
        align-items: stretch;
        justify-content: space-around;
        width: 100%;
        min-width: 0;
        min-height: calc(5.6rem + env(safe-area-inset-bottom, 0px));
        margin: 0;
        padding: 0.45rem 0.2rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.92);
        color: var(--header-bg);
        border: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.12);
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: saturate(180%) blur(18px);
        -webkit-backdrop-filter: saturate(180%) blur(18px);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.42s;
    }

    .js .nav.is-revealed {
        transform: none;
        visibility: visible;
        transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
    }

    .js .nav .nav-division {
        display: none;
    }

    .js .nav a,
    .js .nav a:hover,
    .js .nav a.is-current {
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        min-width: 0;
        margin: 0;
        padding: 0.15rem 0.1rem;
        border-radius: 1.2rem;
        background: transparent;
        color: var(--header-bg);
        font-family: var(--font-display);
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.15;
        letter-spacing: 0.01em;
        white-space: nowrap;
    }

    .js .nav a.is-current {
        background: color-mix(in srgb, var(--header-bg) 12%, transparent);
        font-weight: 700;
    }

    .js .nav a .fa-solid {
        width: auto;
        color: var(--header-bg);
        font-size: 2rem;
        line-height: 1;
    }

    main.wrap {
        padding-bottom: calc(6.6rem + env(safe-area-inset-bottom, 0px));
    }

    .js body.is-topic .nav {
        display: none;
    }

    .js body.is-topic main.wrap {
        padding-bottom: 2.5rem;
    }
}

/* ---------------------------------------------------------- 大喜利発射台（共通ヘッダー側） */

.type-chip-launchpad {
    background: #ffd166;
    color: #2a1d00;
    border-color: transparent;
    font-weight: 700;
}

.event-kind {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 0.9rem;
    padding: 0;
    border: 0;
}

.event-kind legend {
    width: 100%;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.event-kind-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1 1 14rem;
    padding: 0.7rem 0.85rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--input);
}

.event-kind-option:has(input:checked) {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.event-kind-option input {
    margin-top: 0.3rem;
}

.event-kind-option b {
    display: block;
}

.event-kind-option small {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.launchpad-settings {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border: var(--border-w) dashed var(--line-strong);
    border-radius: var(--radius);
}

.launchpad-settings[hidden] {
    display: none;
}

.launchpad-layer-table input[type="number"] {
    width: 5.2rem;
}

.launchpad-layer-table th:first-child,
.launchpad-layer-table td:first-child {
    white-space: nowrap;
}

.lp-admin-entry,
.lp-admin-layer {
    margin-top: 1.1rem;
}

.lp-admin-layer .panel-title,
.lp-admin-entry .panel-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
}

.lp-admin-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.3rem 0 0.8rem;
}

.lp-admin-head-actions form {
    display: inline;
    margin: 0;
}

.lp-admin-details {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
}

.lp-admin-details summary {
    cursor: pointer;
    color: var(--muted);
}

.lp-admin-names {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.8rem;
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
}

.lp-admin-names form {
    display: inline;
    margin: 0;
}

.lp-admin-names button {
    margin-left: 0.2rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
}

.lp-admin-topics li {
    display: grid;
    gap: 0.25rem;
}

.lp-admin-topic-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
}

.lp-admin-topic-head .lp-admin-group {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    font-weight: 700;
}

.lp-admin-dates {
    font-size: 0.82rem;
}

.lp-admin-roster {
    width: 100%;
    min-height: 4.5rem;
    font: inherit;
    font-size: 0.9rem;
}

.lp-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.lp-admin-actions form {
    display: inline;
    margin: 0;
}

.lp-admin-status {
    font: inherit;
    font-size: 0.86rem;
    padding: 0.15rem 0.3rem;
}

.lp-admin-note {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.lp-admin-warn {
    color: var(--danger);
}

/* 投稿フォームの名簿 */
.lp-roster-panel {
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.lp-roster-panel p {
    margin: 0 0 0.3rem;
}

.lp-roster-panel ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lp-roster-panel li.is-out {
    color: var(--muted);
    text-decoration: line-through;
}

.lp-denied {
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border: var(--border-w) solid var(--flash-error-border);
    border-radius: var(--radius);
    color: var(--danger);
}

/* 結果の突破ライン */
.result-cutline {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    color: #c2410c;
}

.result-cutline::before,
.result-cutline::after {
    content: "";
    flex: 1;
    height: 0;
    border-top: 2px dashed #c2410c;
}

.result-card.is-out .rank-badge {
    background: #3a3a3a;
    color: #fff;
    border-color: transparent;
}

/* 年表お題 */
.prompt-image-plain {
    margin-bottom: 0.6rem;
}

.prompt-timeline-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.6rem;
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.prompt-timeline-note b {
    color: var(--text);
}

.prompt-timeline-arrow {
    letter-spacing: 0.2em;
}

.timeline {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    font-family: var(--font);
}

.timeline-row {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.18rem 0;
    border-bottom: 1px dotted var(--line);
}

.timeline-row:last-child {
    border-bottom: 0;
}

.timeline-row.is-anchor {
    color: var(--muted);
}

.timeline-row.is-anchor .timeline-text {
    font-weight: 500;
}

.timeline-age {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.92em;
    white-space: nowrap;
}

.timeline-text {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.timeline-input {
    display: grid;
    gap: 0.35rem;
    margin: 0.3rem 0 0.6rem;
}

.timeline-input-row {
    display: grid;
    grid-template-columns: 6.2rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.timeline-input-row.is-anchor {
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--line) 45%, transparent);
    color: var(--muted);
    font-size: 0.92rem;
}

.timeline-input-row.is-anchor .timeline-input-age span {
    display: inline-block;
    min-width: 2.4rem;
    text-align: right;
    font-family: var(--font-mono);
}

.timeline-input-age {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.timeline-input-age input {
    width: 4rem;
    text-align: right;
}

.timeline-input-text input {
    width: 100%;
}

.timeline-input input {
    padding: 0.4rem 0.5rem;
    border: var(--border-w) solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    background: var(--input);
}

@media (max-width: 640px) {
    .timeline-row {
        grid-template-columns: 3rem minmax(0, 1fr);
    }

    .timeline-input-row {
        grid-template-columns: 5.4rem minmax(0, 1fr);
    }
}

/* 書き込みお題 */
.overlay {
    --overlay-max-h: 26rem;
    --fs: 4.6;
    display: block;
    position: relative;
    width: calc(var(--overlay-max-h) * var(--ar, 1));
    max-width: 100%;
    aspect-ratio: var(--ar, 1);
    margin: 0.2rem auto;
    container-type: inline-size;
    white-space: normal;
}

.prompt-image.prompt-overlay {
    display: block;
    max-width: 100%;
}

.prompt-overlay .overlay {
    --overlay-max-h: min(40vh, 22rem);
    margin: 0 auto;
}

.overlay img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    object-fit: fill;
}

.overlay-text {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0.15em;
    overflow: hidden;
    color: #000;
    font-family: var(--font);
    font-size: calc(var(--fs) * var(--fs-scale, 1) * 1cqw);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-break: strict;
}

.overlay-body {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.overlay-bubble_v .overlay-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-align: start;
}

.overlay-bubble_v .tcy {
    text-combine-upright: all;
}

.overlay-telop {
    --fs: 5.2;
}

.overlay-telop .overlay-text {
    font-weight: 900;
    text-shadow:
        0.06em 0.06em 0 #fff, -0.06em 0.06em 0 #fff,
        0.06em -0.06em 0 #fff, -0.06em -0.06em 0 #fff,
        0 0.08em 0 #fff, 0 -0.08em 0 #fff,
        0.08em 0 0 #fff, -0.08em 0 0 #fff;
}

.overlay-size-xs {
    --fs-scale: 0.6;
}

.overlay-size-s {
    --fs-scale: 0.8;
}

.overlay-size-m {
    --fs-scale: 1;
}

.overlay-size-l {
    --fs-scale: 1.3;
}

.overlay-sign {
    --fs: 5.2;
}

.overlay.is-placeholder .overlay-text {
    color: var(--muted);
    text-shadow: none;
    outline: 2px dashed rgba(234, 88, 12, 0.85);
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.35);
}

.overlay-preview {
    width: 100%;
    min-width: 0;
    margin: 0.4rem 0 0.8rem;
    text-align: center;
}

.overlay-size-field {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: center;
}

.overlay-size-field legend {
    margin: 0 auto 0.35rem;
    padding: 0;
    font-size: 0.92rem;
}

.overlay-size-options {
    display: inline-flex;
    overflow: hidden;
    border: var(--border-w) solid var(--line-strong);
    border-radius: var(--radius);
}

.form .overlay-size-option {
    display: block;
    position: relative;
    font-size: 0.9rem;
}

.overlay-size-option + .overlay-size-option {
    border-left: var(--border-w) solid var(--line-strong);
}

.overlay-size-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.overlay-size-option span {
    display: block;
    min-width: 3.2rem;
    padding: 0.4rem 0.7rem;
    background: var(--input);
    cursor: pointer;
}

.overlay-size-option input:checked + span {
    background: var(--accent);
    color: var(--accent-text);
}

.overlay-size-option input:focus-visible + span {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.overlay-preview-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.overlay-editor {
    display: grid;
    gap: 0.6rem;
}

.overlay-editor-stage {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.form [data-type-field][hidden],
.overlay-editor-stage[hidden] {
    display: none;
}

.overlay-editor-stage img {
    display: block;
    max-width: 100%;
    max-height: 32rem;
    pointer-events: none;
}

.overlay-editor-box {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed #ea580c;
    background: rgba(234, 88, 12, 0.12);
    color: #000;
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}

.overlay-editor-box[hidden] {
    display: none;
}

.overlay-editor-box.is-vertical {
    writing-mode: vertical-rl;
}

.overlay-editor-box.is-telop {
    text-shadow: 0.06em 0.06em 0 #fff, -0.06em 0.06em 0 #fff, 0.06em -0.06em 0 #fff, -0.06em -0.06em 0 #fff;
}

/* ---------------------------------------------------------- ルール */

body.is-rules {
    --max: 52rem;
}

.rules-page [id] {
    scroll-margin-top: calc(var(--site-header-height) + 0.75rem);
}

.rules-page .rule-format {
    margin-bottom: 1rem;
}

.rules-page .rule-format .tab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.rules-page .rule-format .tab-list .tab {
    justify-content: center;
    width: 100%;
    margin: 0 0 -1px;
    padding: 0.7rem 0.4rem;
}

.rules-page .rule-format .tab-list .tab + .tab {
    box-shadow: inset 1px 0 0 var(--line);
}

@media (max-width: 640px) {
    .rules-page .tab-list .tab {
        font-size: 1.5rem;
    }
}

.rules-page .doc-block h2 {
    padding-left: 0;
}

.rules-page .doc-block h2::before {
    content: none;
}

.rules-page .rule-lead {
    margin: 0 0 0.95rem;
    color: var(--muted);
    line-height: 1.75;
}

.rules-page .rule-formula,
.rules-page .rule-steps,
.rules-page .rule-stats {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rules-page .rule-formula li,
.rules-page .rule-steps li,
.rules-page .rule-stats li {
    padding-left: 0;
}

.rules-page .rule-formula li + li,
.rules-page .rule-steps li + li,
.rules-page .rule-stats li + li {
    margin-top: 0;
}

.rule-panel {
    padding: 0.9rem 0.85rem 1rem;
    border-radius: 14px;
    background: #f6f7fb;
}

.rule-panel-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.rule-panel-label .fa-solid {
    color: #00053a;
}

.rule-score .rule-panel-label {
    margin-bottom: 0.35rem;
}

#rule-standings .rule-num,
#rule-tag .rule-num {
    font-size: 1.45em;
    font-weight: 700;
    line-height: 1;
}

.rules-page .rule-quiet {
    margin: 0;
    color: #8a8a8a;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.7;
}

.rule-formula {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.rule-formula-plain {
    margin-top: 0.15rem;
}

.rule-formula li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    text-align: center;
}

.rule-formula li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.05rem;
    right: -0.78rem;
    width: 0.42rem;
    height: 0.42rem;
    border-top: 2px solid #00053a;
    border-right: 2px solid #00053a;
    transform: rotate(45deg);
}

.rule-formula strong {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.rule-formula-text {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.rule-node {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: var(--node, 2.45rem);
    height: var(--node, 2.45rem);
    border: 1.5px solid #d5d8e4;
    border-radius: 50%;
    background: #fff;
    color: #00053a;
    font-size: 0.95rem;
}

.rule-exchange {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    margin-top: 0.95rem;
}

.rule-exchange-mark {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: #00053a;
    color: #fff;
    font-size: 0.85rem;
}

.rule-league {
    --league: #2b3f8e;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.rule-league.is-day {
    --league: #1d5fa8;
}

.rule-league header {
    padding: 0.55rem 0.85rem;
    background: var(--league);
    color: #fff;
}

.rule-league h3,
.rule-board h3,
.rule-card h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.rule-league h3 small,
.rule-board h3 small {
    margin-left: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    opacity: 0.85;
}

.rule-stat-note {
    margin: 0.75rem 0.75rem 0;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #f4f6fb;
    color: var(--league);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.rule-stat-steps {
    margin: 0.75rem 0.75rem 0;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #f4f6fb;
}

.rule-stat-steps .rule-stat-note {
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.rule-stat-plus {
    margin: 0.2rem 0;
    color: var(--league);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.rule-ladder:last-child {
    margin-bottom: 0.85rem;
}

.rule-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin: 0.75rem 0.75rem 0;
}

.rule-stats li {
    padding: 0.45rem 0.35rem 0.5rem;
    border-radius: 10px;
    background: #f4f6fb;
    text-align: center;
}

.rule-stats b {
    display: block;
    color: var(--league);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
}

.rule-stats span {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.rule-ladder {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.7rem 0.75rem 0.15rem;
}

.rule-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: #eef0f4;
    color: #4a4a4a;
    font-size: 0.88rem;
    font-weight: 700;
}

.rule-band.is-stay {
    min-height: 3.1rem;
    font-weight: 600;
}

.rule-band.is-down {
    background: #f8ecec;
    color: #8a2b2b;
}

.rule-band.is-up {
    background: #e7f3ec;
    color: #1f5a38;
}

.rule-aside,
.rule-footnote {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0;
    line-height: 1.55;
}

.rule-aside {
    padding: 0.45rem 0.85rem 0;
    color: var(--muted);
    font-size: 0.8rem;
    text-wrap: pretty;
}

.rule-league .rule-aside:last-child {
    padding-bottom: 0.85rem;
}

.rule-aside .fa-solid,
.rule-footnote .fa-solid {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.rule-aside .fa-arrow-trend-down {
    color: #8a2b2b;
}

.rule-aside .fa-arrow-trend-up {
    color: #1f5a38;
}

.rule-footnote {
    margin-top: 1.5rem;
    font-size: 0.78rem;
}

.rule-footnote + .rule-footnote {
    margin-top: 0.4rem;
}

.rule-footnote .fa-solid {
    color: var(--muted);
}

.rule-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: #f6f7fb;
}

.rule-callout p {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    line-height: 1.6;
}

.rule-callout strong {
    font-size: 0.95rem;
}

.rule-callout span {
    color: var(--muted);
    font-size: 0.85rem;
}

.rule-entry {
    margin-top: 0.9rem;
}

.rule-entry .rule-entry-text + .rule-entry-text {
    margin-top: 0.7rem;
}

.rule-entry .rule-entry-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.65;
}

.rule-boards {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

.rule-board {
    --board: #2b3f8e;
    min-width: 0;
    padding: 0.95rem 0.95rem 0.85rem;
    border-radius: 14px;
    background: #f6f7fb;
    border-top: 3px solid var(--board);
}

.rule-board.is-day {
    --board: #1d5fa8;
    background: #f4f8fc;
}

.rule-board header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.rule-board-pick {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--board);
    font-size: 0.82rem;
    font-weight: 700;
}

.rule-steps {
    --node: 2.5rem;
    display: grid;
    grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
}

.rule-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    padding: 0 0.15rem;
    text-align: center;
}

.rule-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: calc(var(--node) / 2);
    left: calc(50% + var(--node) / 2);
    width: calc(100% - var(--node));
    height: 2px;
    background: color-mix(in srgb, var(--board) 42%, #fff);
}

.rule-steps .rule-node {
    border-color: var(--board);
    color: var(--board);
}

.rule-step-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    min-width: 0;
    max-width: 100%;
}

.rule-steps strong {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.rule-steps em {
    color: var(--board);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35;
}

.rule-steps .rule-day-num {
    font-size: 1.65em;
    line-height: 1;
}

.rule-step-when {
    display: block;
}

.rule-step-note {
    color: #8a8a8a;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.45;
}

.rule-schedule {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    margin: 0.85rem 0 0;
}

.rule-board img,
.rule-schedule img {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 640px;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.rule-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.rule-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    grid-column: span 3;
    min-width: 0;
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
    background: #f6f7fb;
}

.rule-card:nth-child(5) {
    grid-column: 2 / span 3;
}

.rule-card-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid #e1e4ee;
    border-radius: 50%;
    background: #fff;
    color: #00053a;
    font-size: 0.95rem;
}

.rule-card h3 {
    font-size: 0.92rem;
}

.rule-card p {
    margin: 0.2rem 0 0;
    color: #3a3a3a;
    font-size: 0.8rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.rule-chip {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.05rem 0.42rem;
    border-radius: 999px;
    background: #1d5fa8;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    vertical-align: 0.08em;
}

@media (max-width: 800px) {
    .rule-cards {
        grid-template-columns: 1fr;
    }

    .rule-card,
    .rule-card:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .rule-lead,
    .rule-panel-label,
    .rule-callout strong {
        font-size: 1.3rem;
    }

    .rule-callout span,
    .rule-entry .rule-entry-text,
    .rule-aside {
        font-size: 1.2rem;
    }

    .rules-page .rule-footnote {
        font-size: 1.05rem;
    }

    .rule-exchange + .rule-footnote {
        margin-top: 2.4rem;
    }

    .rules-page .rule-quiet {
        font-size: 0.95rem;
    }

    .rule-formula {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .rule-formula li:not(:last-child)::after {
        top: auto;
        right: auto;
        bottom: -0.85rem;
        left: 50%;
        transform: translateX(-50%) rotate(135deg);
    }

    .rule-formula strong,
    .rule-league h3,
    .rule-board h3,
    .rule-card h3,
    .rule-steps strong {
        font-size: 1.35rem;
    }

    .rule-formula-text,
    .rule-card p,
    .rule-steps em,
    .rule-board-pick,
    .rule-stat-note,
    .rule-stats span {
        font-size: 1.15rem;
    }

    .rule-stat-plus {
        font-size: 1.35rem;
    }

    .rule-stats b {
        font-size: 2.1rem;
    }

    .rule-node {
        --node: 2.8rem;
        font-size: 1.25rem;
    }

    .rule-exchange {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .rule-league {
        width: 100%;
    }

    .rule-exchange-mark {
        transform: rotate(90deg);
    }

    .rule-band {
        min-height: 3.2rem;
        font-size: 1.25rem;
    }

    .rule-steps {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .rule-steps li {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.55rem;
        padding: 0.45rem 0.15rem;
        text-align: left;
    }

    .rule-step-copy {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: 0.35rem;
        flex: 1;
        padding-top: 0.55rem;
    }

    .rule-step-note {
        flex-basis: 100%;
    }

    .rule-steps li:not(:last-child)::after {
        top: calc(var(--node) / 2 + 0.4rem);
        left: calc(0.15rem + var(--node) / 2);
        width: 2px;
        height: calc(100% - var(--node) / 2);
    }

    .rule-steps em {
        min-width: 0;
        font-size: 1.3rem;
    }

    .rule-step-when {
        display: inline;
    }

    .rules-page .rule-step-note {
        font-size: 0.95rem;
    }

    .rule-chip {
        font-size: 1.05rem;
    }

    .rule-card-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.35rem;
    }
}

