:root {
    --bg: #f6f1ea;
    --paper: #fffcf8;
    --ink: #241c18;
    --muted: #6f645c;
    --line: #e4d9cc;
    --accent: #8d3d45;
    --accent-dark: #6f2d34;
    --accent-soft: #f8ebe8;
    --shadow: 0 10px 30px rgba(60, 36, 24, 0.06);
    --radius: 18px;
    --wrap: 1120px;
    --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; font-weight: 650; letter-spacing: -0.02em; }
h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 52px); }
h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
p { margin: 0 0 12px; }

.skip {
    position: absolute;
    left: 12px;
    top: 12px;
    transform: translateY(-150%);
    background: var(--ink);
    color: #fff;
    padding: 8px 12px;
    z-index: 20;
}
.skip:focus { transform: none; }

.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 17px; max-width: 42em; }

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 241, 234, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}
.top__bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.04em;
}
.nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav a, .nav__mp {
    color: var(--ink);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.nav a[aria-current="page"], .nav a:hover, .nav__mp:hover { background: #fff; }
.nav-btn {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
}

.hero { padding: 48px 0 12px; }
.band { padding: 28px 0 48px; }
.band--paper { background: linear-gradient(#f6f1ea, #fff 40px); }
.page { padding: 28px 0 64px; }
.section-head, .actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head { margin-bottom: 18px; }
.page h2 { margin-top: 28px; }
.kicker { margin: 0 0 8px; color: var(--accent); font-size: 14px; letter-spacing: 0.08em; }

.faces, .picks, .cards, .periods { list-style: none; margin: 0; padding: 0; }
.faces, .picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}
.face, .pick {
    position: relative;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    color: inherit;
}
.square {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #efe8e0;
}
.square img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}
.face.is-on, .pick.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.face--upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    aspect-ratio: 1;
    border-style: dashed;
    background: transparent;
}
.face--upload span { font-weight: 650; }
.face--upload small, .pick span { color: var(--muted); }
.pick span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 10px;
    font-size: 14px;
    color: var(--ink);
}
.pick span i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.pick em {
    position: absolute;
    top: 8px;
    left: 8px;
    font-style: normal;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.tabs, .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 12px; }
.tab, .chip, .btn {
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
}
.tab.is-on, .chip.is-on, .btn {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.btn { padding: 12px 22px; }
.btn:hover, .tab.is-on:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.chips--sub { margin-top: 0; }
.actions { justify-content: flex-start; margin-top: 18px; }
.status { margin: 0; color: var(--muted); min-height: 1.7em; }
.is-hidden { display: none !important; }

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.cards a, .periods a, .show-lead {
    display: block;
    background: var(--paper);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.cards img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.cards span, .cards strong { display: block; padding: 0 12px; }
.cards span { padding-top: 10px; color: var(--accent); font-size: 13px; }
.cards strong { padding-bottom: 12px; font-weight: 650; }

.detail { display: grid; gap: 14px; margin-top: 22px; }
.detail figure { margin: 0; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.detail img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail figcaption, .note { padding: 10px 14px 14px; color: var(--muted); font-size: 14px; }
.note { background: var(--paper); border-radius: var(--radius); }
.more { margin-top: 22px; }
.prose { max-width: 46em; }
.rules { padding-left: 1.2em; color: var(--muted); }

.show-lead, .periods a { display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 16px; }
.show-lead img, .periods img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; flex: none; }
.show-lead strong, .periods strong { display: block; }
.show-lead em, .periods em, .show-lead small, .periods small { display: block; color: var(--muted); font-style: normal; font-size: 14px; }
.periods { display: grid; gap: 12px; }
.periods a { margin: 0; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; color: var(--muted); font-size: 14px; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }

.pager { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.pager span { color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: 36px 0 24px; background: #f3ece4; }
.foot__grid { display: grid; gap: 24px; }
.foot__name { font-weight: 700; font-size: 18px; }
.foot__links { display: flex; gap: 14px; }
.foot__qr img { width: 120px; height: 120px; border-radius: 12px; background: #fff; }
.foot__qr p { font-size: 14px; color: var(--muted); }
.foot__legal { margin-top: 22px; color: var(--muted); font-size: 13px; text-align: center; }
.foot__legal p { margin: 0; }
.foot__legal p + p { margin-top: 6px; }
.foot__legal a { color: inherit; text-decoration: none; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; }
.modal__back { position: absolute; inset: 0; background: rgba(36, 28, 24, 0.46); }
.modal__box {
    position: relative;
    width: min(420px, 100%);
    background: var(--paper);
    border-radius: 22px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.modal__box img { width: 220px; height: 220px; margin: 8px auto 16px; border-radius: 12px; }
.modal__box h2 { margin-bottom: 8px; font-size: 26px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (min-width: 720px) {
    .faces, .picks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .detail { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
    .foot__grid { grid-template-columns: 1.4fr 0.6fr; }
    .foot__qr { justify-self: end; text-align: center; }
}

@media (max-width: 719px) {
    .nav-btn { display: inline-flex; }
    .nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 64px;
        margin: 0;
        padding: 10px;
        background: var(--paper);
        border-radius: 16px;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }
    .nav.is-open { display: flex; }
    .hero { padding-top: 28px; }
}
