:root {
    --bg: #0f1217;
    --panel: #151a22;
    --panel2: #11161d;
    --text: #e6e9ef;
    --muted: #a8b0bf;
    --line: rgba(255, 255, 255, .08);
    --focus: rgba(255, 255, 255, .15);

    --accent-open: #ff9f1a;
    --accent-open-bg: rgba(255, 159, 26, 0.18);
    --accent-open-border: rgba(255, 159, 26, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto,
        "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic",
        Arial, sans-serif;
    line-height: 1.5;
}

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

a:hover {
    text-decoration: underline;
}

/* ===============================
   Layout
=============================== */

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 44px;
}


/* ===============================
   Section
=============================== */

.section {
    padding-top: 18px;
}

.index-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text);
}

/* ===============================
   Grid
=============================== */

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

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

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .header {
        align-items: flex-start;
    }
}

/* ===============================
   Card
=============================== */

.card {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--panel), var(--panel2));
}

.card[data-status="ended"] {
    opacity: .55;
}

/* 画像エリア（B判縦比率） */
.card__media {
    position: relative;
    height: 0;
    padding-top: 141.4%;
    display: block;
    background-size: cover;
    background-position: center top;
}

/* 背景なし（COMING SOON） */
.card__media[data-has-bg="0"] {
    background: linear-gradient(
        180deg,
        var(--panel),
        var(--panel2)
    );
}

.card__media[data-has-bg="0"]::after {
    content: "COMING SOON";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 13px;
    letter-spacing: .18em;
    color: var(--muted);
    background: none;   /* ← モヤ消す */
}

.card:hover .card__media[data-has-bg="0"]::after {
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: .18em;
    transition: all .2s ease;
}

.card__media[aria-disabled="true"] {
    pointer-events: none;
}

/* ===============================
   Card Info
=============================== */

.card__info {
    padding: 10px 12px 12px;
}

.card__title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px;
}

.card__subtitle {
    font-size: 0.82rem;
    margin: 0 0 6px;
    opacity: 0.85;
}

.card__title {
    display: flex;
    align-items: center;
}

.card__status {
    margin-left: auto;
}

/* ===============================
   Badge
=============================== */

.badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--panel2);
    color: var(--muted);
    border: 1px solid var(--line);
    box-shadow: none;
    text-shadow: none;
    backdrop-filter: none;
    font-weight: 600;
}

.badge.is-open {
    background: var(--accent-open-bg);
    color: var(--accent-open);
    border-color: var(--accent-open-border);
}


.badge.is-planned,
.badge.is-ended,
.badge.is-archived {
    color: var(--muted);
}

.badge.is-closed {
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
}

/* ===============================
   Meta
=============================== */

.meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    line-height: 1.2;
    flex-wrap: wrap;     /* ← 追加 */
    white-space: normal; /* ← 修正 */
}

.meta__row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.meta__key {
    opacity: 0.55;
    width: 50px;          /* ラベル固定幅 */
    flex-shrink: 0;
    font-weight: 500;
}

.meta__key::after {
  content: "：";        /* コロン自動追加 */
}

.meta__val {
    opacity: 0.9;
    flex: 1;
}


/* ==================================================
   Header (event.cssと統一)
================================================== */

.header {
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
    padding: 0;
}

.header__brand-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    padding-bottom: 6px;
}

.header__text-group {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.brand__title {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
}

.brand__sub {
    margin: 2px 0 0 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.2;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-switch-header {
    line-height: 1;
}

.font-size-controls {
    display: flex;
    align-items: center;
    background: var(--line);
    border-radius: 6px;
    padding: 2px;
    margin-left: 10px;
}

.size-btn {
    background: none;
    border: none;
    color: var(--text);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.5;
    transition: 0.2s;
}

.size-btn:hover {
    opacity: 1;
}

.size-btn.is-active {
    background: var(--panel);
    opacity: 1;
}


/* ==================================================
   Footer (event.cssと統一)
================================================== */

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--line);
    padding: 24px 0;
    font-size: 13px;
    color: var(--muted);
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--accent-open);
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer__nav {
    display: flex;
    gap: 15px;
}

.site-footer__nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.site-footer__nav a:hover {
    opacity: 0.7;
}

:root[data-theme="light"] .badge {
    background: #f1f3f5;
    color: #333;
    border: 1px solid rgba(0,0,0,.15);
}

:root[data-theme="light"] .badge.is-open {
    background: #fff4e5;
    color: #cc7a00;
    border-color: #ffb84d;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.site-footer__brand {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
}

.site-footer__copy {
    line-height: 1.6;
}

@media (max-width: 768px) {

    .site-footer__inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        align-items: center;
    }

    .site-footer__nav {
        flex-direction: column;
        gap: 12px;
    }

    .site-footer__nav a {
        font-size: 1rem;
    }
}
