/* 华容道选关页 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --wood-light: #d8a96a;
    --wood-mid: #b07a3a;
    --wood-dark: #6e3d14;
    --ink: #2b1a08;
    --paper: #f3e3c2;
    --accent: #b3201c;
}

body {
    font-family: "STKaiti", "KaiTi", "楷体", "Songti SC", "STSong", serif;
    color: var(--ink);
    background:
        repeating-linear-gradient(
            0deg,
            rgba(110, 61, 20, 0.05) 0,
            rgba(110, 61, 20, 0.05) 2px,
            transparent 2px,
            transparent 14px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.03) 0,
            rgba(0, 0, 0, 0.03) 1px,
            transparent 1px,
            transparent 32px
        ),
        radial-gradient(circle at 30% 20%, #f5e6c4 0%, #d8b783 70%, #a8743a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 1rem;
}

.app {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.topbar {
    text-align: center;
    margin-top: 1rem;
    position: relative;
}
.topbar h1 {
    font-size: 2.4rem;
    letter-spacing: 0.6rem;
    color: var(--wood-dark);
    text-shadow: 1px 1px 0 rgba(255, 240, 200, 0.6);
}
.topbar .subtitle {
    margin-top: 0.3rem;
    color: #6e3d14;
    font-size: 1rem;
    opacity: 0.85;
}

.home-link {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.3rem 0.8rem;
    color: var(--wood-dark);
    text-decoration: none;
    background: rgba(243, 227, 194, 0.7);
    border: 1px solid var(--wood-dark);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.home-link:hover {
    background: var(--paper);
}

/* 变体卡片网格 */
.variants {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #f5e6c4 0%, #d8a96a 100%);
    border: 2px solid var(--wood-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    filter: brightness(1.04);
}
.card:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.card-thumb {
    background: var(--paper);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(110, 61, 20, 0.3);
}
.card-thumb svg.thumb {
    width: 100%;
    height: auto;
    max-width: 180px;
    display: block;
}

.card-body {
    padding: 0.8rem 1rem 1rem;
    text-align: center;
    position: relative;
}
.card-name {
    font-size: 1.2rem;
    color: var(--wood-dark);
    letter-spacing: 0.15rem;
    margin-bottom: 0.2rem;
}
.card-sub {
    font-size: 0.85rem;
    color: #6e3d14;
    opacity: 0.75;
}
.card-tag {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.1rem 0.6rem;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
}

/* 占位卡 */
.card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.4);
}
.card-thumb-locked {
    background: #e8d8b8;
}

.footer {
    text-align: center;
    color: var(--wood-dark);
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 1rem;
}
