/* 国盗り大喜利：夜の地図。専用シェル(body.kt)の画面と、お題ページ・管理画面で使う共通部品 */

/* ================================================================ 共通部品(お題ページ・管理画面でも使う) */

.type-chip-kunitori {
    background: #07122b;
    color: #4dffb0;
    border-color: rgba(77, 255, 176, 0.55);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(77, 255, 176, 0.25);
}

/* ---- 旗(赤いポール＋正方形の画像。画像がなければ白旗に名前) ---- */
.kt-flag {
    --kt-flag-size: 2.4rem;
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    width: calc(var(--kt-flag-size) + 0.2rem);
    height: calc(var(--kt-flag-size) * 1.35);
    text-decoration: none;
    color: inherit;
    flex: none;
    vertical-align: middle;
}

.kt-flag-pole {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.2rem;
    border-radius: 0.1rem;
    background: #4dffb0;
    box-shadow: 0 0 8px rgba(77, 255, 176, 0.85);
}

.kt-flag-pole::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -0.18rem;
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    background: #5fe3ff;
    box-shadow: 0 0 8px #5fe3ff;
    transform: translateX(-50%);
}

.kt-flag-face {
    position: absolute;
    left: 0.2rem;
    top: 0;
    width: var(--kt-flag-size);
    height: var(--kt-flag-size);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(77, 255, 176, 0.75);
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.kt-flag-face img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kt-flag-plain .kt-flag-face {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem;
}

.kt-flag-name {
    font-size: calc(var(--kt-flag-size) * 0.26);
    line-height: 1.1;
    color: #000;
    font-weight: 700;
    text-align: center;
    word-break: break-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.kt-flag-sm {
    --kt-flag-size: 1.8rem;
}

.kt-flag-lg {
    --kt-flag-size: 4.5rem;
}

/* ---- お題ページのバナー ---- */
.kt-topic-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0;
    background: #07122b;
    border: 2px solid rgba(77, 255, 176, 0.55);
    color: #e9edff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(77, 255, 176, 0.2);
}

.kt-topic-banner:hover {
    background: #0c1d42;
    border-color: #5fe3ff;
}

.kt-topic-banner-logo {
    display: block;
    height: 2.4rem;
    width: auto;
    max-width: 11rem;
    object-fit: contain;
    object-position: left center;
    mix-blend-mode: screen;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    flex: 0 0 auto;
}

.kt-topic-banner-arrow {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 400;
    white-space: nowrap;
    color: #4dffb0;
    text-shadow: 0 0 8px rgba(77, 255, 176, 0.8);
}

/* ---- 管理画面 ---- */
.kt-admin-entrants {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.kt-admin-entrants li {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
}

.kt-admin-entrant-name {
    flex: 1;
    min-width: 8rem;
}

.kt-admin-image-form {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.kt-admin-image-form input[type="file"] {
    max-width: 14rem;
    font-size: 0.8rem;
}

.kt-admin-owner {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
}

/* ================================================================ 専用シェル(夜の地図) */

body.kt {
    --kt-bar-h: 3.25rem;
    --kt-ink: #e9edff;
    --kt-ink-dim: rgba(233, 237, 255, 0.72);
    --kt-ink-faint: rgba(233, 237, 255, 0.46);
    --kt-card: rgba(15, 24, 52, 0.72);
    --kt-card-line: rgba(160, 185, 255, 0.18);
    --kt-blue: #3ea6ff;
    --kt-green: #4dffb0;
    --kt-cyan: #5fe3ff;
    --kt-navy: #07122b;
    --kt-font: "DotGothic16", "Noto Sans JP", "Hiragino Sans", Meiryo, sans-serif;
    --kt-mono: "Share Tech Mono", ui-monospace, monospace;
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% -10%, #10244f 0%, rgba(16, 36, 79, 0) 60%),
        radial-gradient(ellipse at 85% 30%, rgba(20, 70, 110, 0.28) 0%, rgba(20, 70, 110, 0) 55%),
        #03060f;
    background-attachment: fixed;
    color: var(--kt-ink);
    font-family: var(--kt-font);
    line-height: 1.7;
    -webkit-font-smoothing: none;
}

body.kt * {
    box-sizing: border-box;
}

body.kt a {
    color: inherit;
}

/* 星（ドット）と走査線 */
body.kt::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Crect x='18' y='28' width='2' height='2' fill='%23ffffff'/%3E%3Crect x='86' y='46' width='2' height='2' fill='%235fe3ff'/%3E%3Crect x='140' y='22' width='2' height='2' fill='%23ffffff'/%3E%3Crect x='204' y='70' width='2' height='2' fill='%234dffb0'/%3E%3Crect x='42' y='120' width='2' height='2' fill='%23ffffff'/%3E%3Crect x='168' y='150' width='2' height='2' fill='%235fe3ff'/%3E%3Crect x='110' y='188' width='2' height='2' fill='%23ffffff'/%3E%3Crect x='210' y='200' width='2' height='2' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 240px 240px;
    image-rendering: pixelated;
}

body.kt::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0 1px, transparent 1px 3px);
}

body.kt [id] {
    scroll-margin-top: calc(var(--kt-bar-h) + 0.8rem);
}

/* ---- 上部バー ---- */
.kt-bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--kt-bar-h);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.9rem;
    background: rgba(5, 7, 15, 0.74);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.86rem;
}

.kt-bar a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0;
    color: var(--kt-ink-dim);
    white-space: nowrap;
}

.kt-bar a:hover,
.kt-bar a.is-current,
.kt-bar a.is-active {
    color: var(--kt-ink);
    background: rgba(255, 255, 255, 0.1);
}

.kt-bar a.is-active {
    color: var(--kt-green);
}

.kt-bar-title {
    padding: 0.1rem 0.15rem;
}

.kt-bar-title:hover {
    background: transparent;
}

.kt-bar-title img {
    display: block;
    height: 2.35rem;
    width: auto;
    max-width: min(46vw, 13rem);
    object-fit: contain;
    object-position: left center;
    mix-blend-mode: screen;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.kt-bar-nav {
    display: flex;
    gap: 0.1rem;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.kt-bar-nav::-webkit-scrollbar {
    display: none;
}

.kt-bar-user a span {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 40rem) {
    .kt-bar {
        gap: 0.35rem;
        padding: 0 0.5rem;
    }

    .kt-bar-back span,
    .kt-bar-user a span {
        display: none;
    }

    .kt-bar-title img {
        height: 1.85rem;
        max-width: 34vw;
    }

    .kt-bar-back {
        order: 0;
    }
}

.kt-flashes {
    position: fixed;
    top: calc(var(--kt-bar-h) + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: grid;
    gap: 0.4rem;
    width: min(32rem, 100% - 1.5rem);
}

.kt-flash {
    margin: 0;
    padding: 0.55rem 1rem;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    color: #1b2340;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.kt-flash-error {
    background: #ffe3e3;
    color: #7a1f1f;
}

/* ---- ページ枠 ---- */
.kt-page {
    position: relative;
    z-index: 1;
    width: min(1180px, 100% - 1.5rem);
    margin: 0 auto;
    padding: calc(var(--kt-bar-h) + 1.4rem) 0 3rem;
}

.kt-muted {
    color: var(--kt-ink-faint);
}

.kt-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--kt-ink-faint);
}

.kt-sep {
    margin: 0 0.3rem;
    color: var(--kt-ink-faint);
}

body.kt .user-name {
    color: inherit;
    text-decoration: none;
}

body.kt a.user-name:hover {
    text-decoration: underline;
}

body.kt .user-name.is-unregistered {
    color: var(--kt-ink-dim);
}

/* ---- ボタン・ピル ---- */
.kt-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 0;
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
    background: rgba(255, 255, 255, 0.08);
    color: var(--kt-ink);
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
}

.kt-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.kt-btn-primary {
    background: #4dffb0;
    border-color: #d8fff2;
    color: #04140e;
    box-shadow: 3px 3px 0 #04140e, 0 0 16px rgba(77, 255, 176, 0.4);
}

.kt-btn-primary:hover {
    background: #b6ffe9;
}

.kt-btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.kt-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.6rem;
    border-radius: 0;
    border: 1px solid var(--kt-card-line);
    font-size: 0.74rem;
    color: var(--kt-ink-dim);
}

.kt-pill-open {
    background: rgba(62, 166, 255, 0.2);
    border-color: var(--kt-blue);
    color: var(--kt-cyan);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(62, 166, 255, 0.45);
}

/* ---- お題の状態バッジ(サイト共通の badge クラスを夜用に) ---- */
body.kt .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.12rem 0.55rem;
    border-radius: 0;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

body.kt .badge-posting {
    background: rgba(62, 166, 255, 0.18);
    color: var(--kt-blue);
    border-color: rgba(62, 166, 255, 0.7);
    box-shadow: 0 0 8px rgba(62, 166, 255, 0.35);
}

body.kt .badge-voting {
    background: rgba(95, 227, 255, 0.14);
    color: var(--kt-cyan);
    border-color: rgba(95, 227, 255, 0.7);
    box-shadow: 0 0 8px rgba(95, 227, 255, 0.35);
}

body.kt .badge-result {
    background: rgba(77, 255, 176, 0.14);
    color: var(--kt-green);
    border-color: rgba(77, 255, 176, 0.65);
    box-shadow: 0 0 8px rgba(77, 255, 176, 0.3);
}

body.kt .badge-scheduled {
    background: transparent;
    color: var(--kt-ink-faint);
    border-color: var(--kt-card-line);
}

body.kt .badge-entry {
    background: rgba(62, 166, 255, 0.18);
    color: var(--kt-cyan);
    border-color: var(--kt-blue);
}

body.kt .badge-abandoned {
    background: transparent;
    color: var(--kt-ink-faint);
    border-color: rgba(95, 227, 255, 0.35);
}

/* ---- カード ---- */
.kt-card {
    position: relative;
    margin: 1.1rem 0;
    padding: 1.1rem 1.25rem;
    border: 2px solid var(--kt-card-line);
    border-radius: 0;
    background:
        linear-gradient(var(--kt-cyan), var(--kt-cyan)) left 10px top 10px / 16px 1px no-repeat,
        linear-gradient(var(--kt-cyan), var(--kt-cyan)) left 10px top 10px / 1px 16px no-repeat,
        linear-gradient(var(--kt-cyan), var(--kt-cyan)) right 10px top 10px / 16px 1px no-repeat,
        linear-gradient(var(--kt-cyan), var(--kt-cyan)) right 10px top 10px / 1px 16px no-repeat,
        linear-gradient(var(--kt-green), var(--kt-green)) left 10px bottom 10px / 16px 1px no-repeat,
        linear-gradient(var(--kt-green), var(--kt-green)) left 10px bottom 10px / 1px 16px no-repeat,
        linear-gradient(var(--kt-green), var(--kt-green)) right 10px bottom 10px / 16px 1px no-repeat,
        linear-gradient(var(--kt-green), var(--kt-green)) right 10px bottom 10px / 1px 16px no-repeat,
        var(--kt-card);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45), 0 0 24px rgba(95, 227, 255, 0.08);
}

.kt-en {
    display: block;
    margin-bottom: 0.15rem;
    font-family: var(--kt-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    color: var(--kt-cyan);
}

.kt-card-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
}

.kt-card-title,
.kt-section-title {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.kt-card-title .fa-solid,
.kt-section-title .fa-solid {
    color: var(--kt-green);
    width: 1.15em;
    text-align: center;
}

.kt-card-title small {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--kt-ink-faint);
}

.kt-card-aside {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--kt-ink-dim);
}

.kt-card-aside b {
    color: var(--kt-green);
}

.kt-section-title {
    margin-top: 2rem;
    font-size: 1.15rem;
}

/* ---- ヒーロー ---- */
.kt-hero {
    position: relative;
    text-align: center;
    padding: 0.4rem 0 0.4rem;
}

.kt-hero-logo {
    display: block;
    width: min(36rem, 94%);
    height: auto;
    margin: 0.2rem auto 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 16px rgba(95, 227, 255, 0.35));
}

.kt-kicker {
    margin: 0 0 0.4rem;
    font-family: var(--kt-mono);
    letter-spacing: 0.4em;
    font-size: 0.78rem;
    color: var(--kt-green);
}

.kt-hero-title {
    margin: 0;
}

.kt-hero-lead {
    margin: 0.5rem 0 1.2rem;
    color: var(--kt-ink-dim);
}

.kt-progress {
    width: min(28rem, 100%);
    margin: 1.1rem auto 0;
}

.kt-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.kt-progress-num b {
    font-family: var(--kt-mono);
    font-size: 2rem;
    color: var(--kt-green);
}

.kt-progress-num small {
    margin-left: 0.2rem;
    color: var(--kt-ink-dim);
}

.kt-progress-label {
    font-size: 0.8rem;
    color: var(--kt-ink-faint);
    letter-spacing: 0.15em;
}

.kt-progress-bar {
    height: 0.7rem;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.kt-progress-bar span {
    display: block;
    height: 100%;
    border-radius: 0;
    background: repeating-linear-gradient(90deg, var(--kt-green) 0 6px, var(--kt-cyan) 6px 8px);
    box-shadow: 0 0 14px rgba(77, 255, 176, 0.75);
}

.kt-hero-champion {
    margin: 1.1rem 0 0;
    font-family: var(--kt-font);
    font-size: 1.3rem;
    color: var(--kt-green);
}

.kt-hero-champion span {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-right: 0.3rem;
}

.kt-hero-champion b {
    font-weight: 900;
    color: #fff;
}

.kt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.2rem 0 0;
}

.kt-hero-count {
    color: var(--kt-ink-dim);
    font-size: 0.9rem;
}

/* ---- 地図と戦況 ---- */
.kt-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 1fr);
    gap: 1.2rem;
    align-items: start;
    margin-top: 1.4rem;
}

@media (max-width: 62rem) {
    .kt-stage {
        grid-template-columns: minmax(0, 1fr);
    }
}

.kt-map-section {
    min-width: 0;
}

.kt-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    container-type: inline-size;
    border: 2px solid var(--kt-card-line);
    border-radius: 0;
    overflow: hidden;
    background:
        repeating-linear-gradient(0deg, rgba(120, 160, 255, 0.07) 0 1px, transparent 1px 10%),
        repeating-linear-gradient(90deg, rgba(120, 160, 255, 0.07) 0 1px, transparent 1px 10%),
        radial-gradient(ellipse at 50% 45%, #10244f 0%, #081230 55%, #040816 100%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(30, 60, 140, 0.35);
}

.kt-map svg {
    display: block;
    width: 100%;
    height: 100%;
}

.kt-map .kt-pref {
    fill: #0f1d40;
    stroke: #3f5f9f;
    stroke-width: 1.1;
    stroke-linejoin: round;
    transition: fill 0.2s ease, filter 0.2s ease;
}

.kt-map .kt-pref[data-href] {
    cursor: pointer;
}

.kt-map .kt-pref[data-href]:hover,
.kt-map .kt-pref[data-href]:focus {
    stroke: #fff;
    stroke-width: 2;
    filter: drop-shadow(0 0 6px var(--kt-cyan));
    outline: none;
}

.kt-map .kt-pref.is-scheduled {
    fill: #16305f;
    stroke: #5d86c4;
}

.kt-map .kt-pref.is-posting {
    fill: #1456b0;
    stroke: var(--kt-blue);
    filter: drop-shadow(0 0 6px rgba(62, 166, 255, 0.9));
}

.kt-map .kt-pref.is-voting {
    fill: #0e6e86;
    stroke: var(--kt-cyan);
    filter: drop-shadow(0 0 6px rgba(95, 227, 255, 0.85));
    animation: kt-pulse 2.6s ease-in-out infinite;
}

.kt-map .kt-pref.is-result {
    fill: #1a2744;
    stroke: #4d6a96;
}

.kt-map .kt-pref.is-owned {
    fill: #0e8f62;
    stroke: var(--kt-green);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 5px rgba(77, 255, 176, 0.75));
}

.kt-map .kt-pref.is-owned[data-href]:hover,
.kt-map .kt-pref.is-owned[data-href]:focus {
    stroke: #fff;
    filter: brightness(1.25) drop-shadow(0 0 8px var(--kt-cyan));
}

@keyframes kt-pulse {
    0%, 100% {
        fill: #0e6e86;
    }

    50% {
        fill: #14a3c4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kt-map .kt-pref.is-voting,
    .kt-radar,
    .kt-flag-map::after {
        animation: none;
    }
}

.kt-map .boundary-line {
    fill: none;
    stroke: rgba(95, 227, 255, 0.55);
    stroke-width: 1.2;
    stroke-dasharray: 5 4;
}

.kt-flags {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.kt-flag-map {
    --kt-flag-size: 3.7cqw;
    position: absolute;
    transform: translate(-0.1rem, -100%);
    transform-origin: left bottom;
    pointer-events: auto;
    transition: transform 0.15s ease;
    z-index: 1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.kt-flag-map:hover,
.kt-flag-map:focus {
    transform: translate(-0.1rem, -100%) scale(2.2);
    z-index: 3;
}

.kt-flag-map .kt-flag-pole {
    width: 0.3cqw;
    min-width: 2px;
}

.kt-flag-map .kt-flag-face {
    left: 0.3cqw;
}

.kt-flag-map::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 1.15rem;
    height: 0.38rem;
    margin-left: -0.4rem;
    border-radius: 50%;
    border: 1px solid var(--kt-green);
    box-shadow: 0 0 8px var(--kt-green), inset 0 0 6px rgba(77, 255, 176, 0.45);
    animation: kt-ping 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes kt-ping {
    0% {
        transform: scale(0.75);
        opacity: 0.95;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.kt-radar {
    position: absolute;
    inset: -20%;
    z-index: 2;
    pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 72%, rgba(95, 227, 255, 0.16) 88%, rgba(77, 255, 176, 0.28) 96%, transparent 100%);
    animation: kt-radar 9s linear infinite;
    mix-blend-mode: screen;
}

.kt-map::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(95, 227, 255, 0.05) 0 1px, transparent 1px 4px);
}

@keyframes kt-radar {
    to {
        transform: rotate(360deg);
    }
}

@supports not (width: 1cqw) {
    .kt-flag-map {
        --kt-flag-size: 2rem;
    }
}

.kt-legend {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0.7rem 0 0;
    padding: 0;
    font-size: 0.8rem;
    color: var(--kt-ink-dim);
}

.kt-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.kt-legend-swatch {
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 3px;
    border: 1px solid #3f5f9f;
    background: #0f1d40;
}

.kt-legend-swatch.is-scheduled {
    background: #1b2c58;
    border-color: #6382c4;
}

.kt-legend-swatch.is-posting {
    background: #1456b0;
    border-color: var(--kt-blue);
    box-shadow: 0 0 6px rgba(62, 166, 255, 0.8);
}

.kt-legend-swatch.is-voting {
    background: #0e6e86;
    border-color: var(--kt-cyan);
    box-shadow: 0 0 6px rgba(95, 227, 255, 0.7);
}

.kt-legend-swatch.is-owned {
    background: #0e8f62;
    border-color: var(--kt-green);
    box-shadow: 0 0 6px rgba(77, 255, 176, 0.7);
}

/* ---- 戦況 ---- */
.kt-standings {
    margin: 0;
    max-height: min(46rem, calc(100vh - var(--kt-bar-h) - 2rem));
    overflow-y: auto;
    position: sticky;
    top: calc(var(--kt-bar-h) + 0.8rem);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

@media (max-width: 62rem) {
    .kt-standings {
        position: static;
        max-height: none;
    }
}

.kt-standing-groups {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kt-standing-groups li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.7rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.75;
}

.kt-standing-groups li:last-child {
    border-bottom: 0;
}

.kt-standing-count {
    flex: none;
    font-family: var(--kt-mono);
    font-size: 0.95rem;
    color: var(--kt-green);
}

.kt-standing-people {
    min-width: 0;
}

.kt-standing-people a {
    color: inherit;
    text-decoration: none;
}

.kt-standing-people a:hover {
    color: var(--kt-cyan);
    text-decoration: underline;
}

/* ---- 決勝 ---- */
.kt-final {
    border-color: rgba(95, 227, 255, 0.45);
    background:
        radial-gradient(ellipse at 50% -40%, rgba(95, 227, 255, 0.16) 0%, rgba(77, 255, 176, 0) 65%),
        var(--kt-card);
}

.kt-final.is-decided {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4), 0 0 36px rgba(77, 255, 176, 0.28), 0 0 18px rgba(95, 227, 255, 0.2);
}

.kt-final-prompt {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}

.kt-champion {
    margin: 0.8rem 0 0.4rem;
    font-family: var(--kt-font);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--kt-green);
    text-shadow: 0 0 18px rgba(77, 255, 176, 0.55);
}

.kt-champion span {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-right: 0.3rem;
}

.kt-champion b {
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 16px rgba(95, 227, 255, 0.85);
}

.kt-podium {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kt-podium li {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.2rem 0;
}

.kt-podium-place {
    width: 2.4rem;
    font-family: var(--kt-mono);
    font-size: 0.85rem;
    color: var(--kt-ink-faint);
}

.kt-podium .is-place-1 {
    color: var(--kt-green);
    font-weight: 700;
}

.kt-podium .is-place-2 {
    color: var(--kt-cyan);
}

.kt-podium .is-place-3 {
    color: var(--kt-blue);
}

/* ---- 地方別お題 ---- */
.kt-region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
    gap: 1rem;
    align-items: start;
}

.kt-region {
    margin: 0;
}

.kt-region-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(77, 255, 176, 0.28);
    font-family: var(--kt-font);
    font-size: 1.1rem;
    font-weight: 700;
}

.kt-region-title small {
    font-family: var(--kt-font);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--kt-ink-faint);
}

.kt-pref-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kt-pref-row {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr);
    gap: 0.2rem 0.6rem;
    align-items: center;
    padding: 0.55rem 0 0.55rem 0.6rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    border-left: 3px solid transparent;
}

.kt-pref-row:last-child {
    border-bottom: 0;
}

.kt-pref-row.is-owned {
    border-left-color: var(--kt-green);
    box-shadow: inset 3px 0 10px rgba(77, 255, 176, 0.15);
}

.kt-pref-row.is-posting {
    border-left-color: #5a9bff;
}

.kt-pref-row.is-voting {
    border-left-color: #4fd68b;
}

.kt-pref-row:target {
    background: rgba(95, 227, 255, 0.12);
}

.kt-pref-row-free {
    grid-template-columns: minmax(0, 1fr) auto;
}

.kt-pref-name {
    font-weight: 700;
}

.kt-pref-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.5rem;
    min-width: 0;
    font-size: 0.92rem;
}

.kt-topic-link {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.kt-topic-link:hover {
    text-decoration: underline;
    color: #fff;
}

.kt-pref-deadline {
    font-size: 0.78rem;
}

.kt-pref-owner {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.3rem;
    font-size: 0.88rem;
    color: var(--kt-ink-dim);
}

.kt-pref-row-free .kt-pref-owner {
    grid-column: auto;
}

/* ---- エントリー ---- */
.kt-entry-mine {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.kt-entry-mine-body {
    flex: 1;
    min-width: 0;
}

.kt-entry-mine-body > p {
    margin: 0 0 0.6rem;
}

.kt-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.kt-form label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
}

.kt-form input[type="file"] {
    display: block;
    max-width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.04);
    color: var(--kt-ink-dim);
    font: inherit;
    font-size: 0.85rem;
}

.kt-form p {
    margin: 0;
    font-size: 0.82rem;
}

.kt-image-form .kt-image-preview {
    display: inline-block;
    width: 7rem;
    height: 7rem;
    border: 2px solid var(--kt-card-line);
    border-radius: 0;
    background: #fff;
    overflow: hidden;
}

.kt-image-form .kt-image-preview[hidden] {
    display: none;
}

.kt-image-form .kt-image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kt-entrants {
    margin-top: 1rem;
    min-width: 0;
    max-width: 100%;
    font-size: 0.9rem;
}

.kt-entrants summary {
    cursor: pointer;
    color: var(--kt-ink-dim);
}

.kt-entrant-names {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    min-width: 0;
    max-width: 100%;
    margin: 0.7rem 0 0;
    line-height: 1.85;
}

/* ---- フッター ---- */
.kt-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    justify-content: center;
    margin-top: 2rem;
    font-size: 0.78rem;
    color: var(--kt-ink-faint);
}

.kt-foot a {
    color: var(--kt-ink-dim);
}

/* ---- ルールページ ---- */
.kt-rules-head {
    text-align: center;
    padding: 1rem 0 0.4rem;
}

.kt-rules-head h1 {
    margin: 0;
    font-family: var(--kt-font);
    font-weight: 900;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    letter-spacing: 0.1em;
}

.kt-rules-lead {
    margin: 0.4rem 0 0;
    color: var(--kt-ink-dim);
}

.kt-rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
    align-items: start;
    margin-top: 1.2rem;
}

.kt-rule {
    margin: 0;
}

.kt-rule h2 {
    margin: 0 0 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(77, 255, 176, 0.28);
    font-family: var(--kt-font);
    font-size: 1.05rem;
    color: var(--kt-green);
}

.kt-rule ul {
    margin: 0;
    padding-left: 1.1rem;
}

.kt-rule li {
    margin: 0.35rem 0;
    font-size: 0.92rem;
}

.kt-attribution {
    margin: 0;
    font-size: 0.85rem;
    color: var(--kt-ink-dim);
}

.kt-attribution a {
    color: var(--kt-green);
}

.kt-rules-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.4rem;
}

@media (max-width: 40rem) {
    .kt-card {
        padding: 1rem;
    }

    .kt-entry-mine {
        flex-direction: column;
    }

    .kt-pref-row {
        grid-template-columns: 3rem minmax(0, 1fr);
    }
}
