:root {
    --paper: #fffafc;
    --paper-deep: #f4ecef;
    --ink: #3b3035;
    --muted: #776a70;
    --rose: #c56f91;
    --rose-light: #efc8d7;
    --mint: #b9d7ca;
    --mint-dark: #557568;
    --yellow: #edd58b;
    --line: #d9cbd1;
    --display: "Bodoni 72", Didot, "Times New Roman", serif;
    --serif: "Songti SC", "STSong", Georgia, serif;
    --sans: "Avenir Next", Avenir, "Gill Sans", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--paper);
    color: var(--ink);
}

body {
    margin: 0;
    background-color: var(--paper);
    background-image: radial-gradient(circle at 1px 1px, rgba(197, 111, 145, 0.17) 1px, transparent 1.5px);
    background-size: 18px 18px;
    font-family: var(--serif);
    letter-spacing: 0;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.lang-en,
.lang-cn {
    display: inline;
}

html[data-lang="cn"] .lang-en,
html[data-lang="en"] .lang-cn {
    display: none !important;
}

.play-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 68px;
    padding: 10px 34px;
    border-bottom: 1px solid var(--ink);
    background: rgba(255, 250, 252, 0.94);
    backdrop-filter: blur(12px);
}

.home-link {
    justify-self: start;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.home-link:hover {
    color: var(--rose);
}

.site-label {
    margin: 0;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
}

.language-switch {
    justify-self: end;
    display: flex;
    border: 1px solid var(--ink);
    background: var(--paper);
}

.language-switch button {
    min-width: 48px;
    height: 32px;
    border: 0;
    border-right: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.language-switch button:last-child {
    border-right: 0;
}

.language-switch button.active {
    background: var(--ink);
    color: white;
}

main,
.play-footer {
    width: min(1120px, calc(100% - 64px));
    margin: 0 auto;
}

.play-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 64px;
    align-items: end;
    padding: 88px 0 68px;
    border-bottom: 1px solid var(--ink);
}

.eyebrow {
    margin: 0 0 20px;
    color: var(--rose);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
}

.play-intro h1 {
    margin: 0;
    font-family: var(--display);
    font-size: 86px;
    font-weight: 400;
    line-height: 0.95;
}

.intro-deck {
    max-width: 640px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
}

.intro-stamp {
    justify-self: end;
    width: 150px;
    margin: 0;
    padding: 22px 16px 14px;
    border: 1px solid var(--ink);
    background: rgba(255, 255, 255, 0.76);
    text-align: center;
    transform: rotate(2deg);
}

.intro-stamp img {
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    image-rendering: pixelated;
}

.intro-stamp figcaption {
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 800;
}

.game-slot {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(0, 1fr);
    min-height: 600px;
    border-bottom: 1px solid var(--ink);
}

.slot-preview {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 600px;
    overflow: hidden;
    border-right: 1px solid var(--ink);
    background: #26343a;
}

.preview-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(185, 215, 202, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 215, 202, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
}

.slot-preview > p {
    position: absolute;
    bottom: 22px;
    left: 24px;
    margin: 0;
    color: var(--mint);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 800;
}

.preview-object {
    position: relative;
    width: 260px;
    height: 260px;
}

.preview-object span {
    position: absolute;
    display: block;
    border: 1px solid var(--mint);
    border-radius: 50%;
}

.preview-object span:nth-child(1) {
    inset: 0;
}

.preview-object span:nth-child(2) {
    inset: 38px;
    border-color: var(--yellow);
}

.preview-object span:nth-child(3) {
    inset: 98px;
    background: var(--rose-light);
    border-color: var(--paper);
    box-shadow: 0 0 34px rgba(239, 200, 215, 0.28);
}

.preview-object::before,
.preview-object::after {
    position: absolute;
    z-index: 2;
    content: "";
    background: var(--mint);
}

.preview-object::before {
    top: 50%;
    left: -44px;
    width: 348px;
    height: 1px;
}

.preview-object::after {
    top: -44px;
    left: 50%;
    width: 1px;
    height: 348px;
}

.slot-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 0 54px 54px;
    background: rgba(255, 250, 252, 0.82);
}

.slot-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 54px;
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 800;
}

.slot-kicker {
    margin: 0 0 12px;
    color: var(--mint-dark);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
}

.slot-details h2 {
    max-width: 520px;
    margin: 0;
    font-family: var(--display);
    font-size: 54px;
    font-weight: 400;
    line-height: 1.05;
}

.slot-note {
    max-width: 440px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.slot-rule {
    display: grid;
    gap: 10px;
    width: min(100%, 440px);
    margin-top: 38px;
}

.slot-rule span {
    display: block;
    height: 1px;
    background: var(--line);
}

.slot-rule span:nth-child(2) { width: 84%; }
.slot-rule span:nth-child(3) { width: 58%; }

.disabled-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 230px;
    height: 47px;
    margin-top: 40px;
    padding: 0 16px;
    border: 1px solid var(--line);
    color: var(--muted);
}

.disabled-action i {
    width: 88px;
    height: 1px;
    background: var(--line);
}

.notebook {
    padding: 76px 0 84px;
}

.notebook header {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: end;
    gap: 28px;
    margin-bottom: 30px;
}

.notebook header p {
    margin: 0 0 8px;
    color: var(--rose);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
}

.notebook h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 52px;
    font-weight: 400;
}

.notebook-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) 90px;
    gap: 28px;
    align-items: center;
    min-height: 74px;
    border-top: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
}

.notebook-row:last-child {
    border-bottom: 1px solid var(--line);
}

.notebook-row i {
    width: 66%;
    height: 1px;
    background: var(--ink);
}

.notebook-row b {
    color: var(--mint-dark);
    font-size: 9px;
    text-align: right;
}

.play-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 32px;
    border-top: 1px solid var(--ink);
    color: var(--muted);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 800;
}

.play-footer p {
    margin: 0;
}

@media (max-width: 820px) {
    .play-header {
        grid-template-columns: 1fr auto;
        min-height: 64px;
        padding: 10px 18px;
    }

    .site-label {
        display: none;
    }

    main,
    .play-footer {
        width: min(100% - 34px, 660px);
    }

    .play-intro {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 54px 0 46px;
    }

    .play-intro h1 {
        font-size: 56px;
    }

    .intro-deck {
        font-size: 16px;
    }

    .intro-stamp {
        justify-self: start;
        width: 128px;
        padding: 16px 12px 12px;
    }

    .game-slot {
        grid-template-columns: 1fr;
    }

    .slot-preview {
        min-height: 430px;
        border-right: 0;
        border-bottom: 1px solid var(--ink);
    }

    .preview-object {
        transform: scale(0.78);
    }

    .slot-details {
        min-height: 450px;
        padding: 44px 0 52px;
    }

    .slot-details h2 {
        font-size: 48px;
    }

    .notebook {
        padding: 54px 0 64px;
    }

    .notebook header {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .notebook h2 {
        font-size: 42px;
    }
}

@media (max-width: 460px) {
    .play-intro h1 {
        font-size: 46px;
    }

    .slot-preview {
        min-height: 370px;
    }

    .preview-object {
        transform: scale(0.64);
    }

    .slot-details h2 {
        font-size: 41px;
    }

    .notebook-row {
        grid-template-columns: 42px minmax(0, 1fr) 44px;
        gap: 14px;
    }

    .play-footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
