/* ===== 华容道 ===== */
.hr-hero {
    background: linear-gradient(160deg, #fef2f2 0%, #fff7ed 100%);
    border: 1px solid #fecaca;
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 26px;
    box-shadow: 0 12px 36px rgba(220, 38, 38, .08);
}

.hr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.hr-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hr-logo {
    font-size: 28px;
    background: #fecaca;
    border-radius: 14px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hr-title {
    font-size: 20px;
    font-weight: 800;
    color: #7f1d1d;
}

.hr-sub {
    font-size: 13px;
    color: #f87171;
}

.hr-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hr-steps {
    background: #fff;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 16px;
}

.hr-steps b {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.hr-reset {
    border: 0;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 16px;
    cursor: pointer;
    transition: background .2s;
}

.hr-reset:hover {
    background: #dc2626;
}

.hr-main {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
}

.hr-board-wrap {
    position: relative;
    display: inline-block;
}

.hr-board {
    position: relative;
    width: 360px;
    height: 450px;
    background: #7c2d12;
    border: 4px solid #92400e;
    border-radius: 14px;
    box-shadow: inset 0 0 0 2px #fcd34d, 0 8px 24px rgba(120, 53, 15, .25);
    overflow: hidden;
    user-select: none;
}

.hr-bg {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent calc(20% - 1px), rgba(252, 211, 77, .14) calc(20% - 1px), rgba(252, 211, 77, .14) 20%),
        repeating-linear-gradient(90deg, transparent, transparent calc(25% - 1px), rgba(252, 211, 77, .14) calc(25% - 1px), rgba(252, 211, 77, .14) 25%);
    pointer-events: none;
}

.hr-piece {
    position: absolute;
    box-sizing: border-box;
    border: 3px solid rgba(255, 255, 255, .35);
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    transition: left .15s ease, top .15s ease, transform .1s, box-shadow .1s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    z-index: 2;
}

.hr-piece:hover {
    filter: brightness(1.08);
}

.hr-piece.selected {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px #fde047, 0 6px 16px rgba(0, 0, 0, .35);
    z-index: 3;
}

.hr-piece.caocao {
    border-width: 4px;
    letter-spacing: 4px;
    background-image: linear-gradient(135deg, rgba(255,255,255,.12), transparent 60%);
}

.hr-exit {
    position: absolute;
    bottom: -30px;
    left: 25%;
    width: 50%;
    text-align: center;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hr-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 320px;
}

.hr-status {
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.6;
    min-height: 44px;
}

.hr-dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 14px;
    width: fit-content;
}

.hr-dpad-row {
    display: flex;
    gap: 6px;
}

.hr-dpad-btn {
    width: 52px;
    height: 44px;
    border: 1px solid #fecaca;
    background: #fff7ed;
    color: #b91c1c;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
}

.hr-dpad-btn:hover {
    background: #fee2e2;
}

.hr-hint {
    background: #fff;
    border: 1px dashed #fecaca;
    border-radius: 12px;
    padding: 14px;
}

.hr-hint p {
    font-size: 13px;
    color: #991b1b;
    line-height: 1.7;
    margin: 0;
}

.hr-hint p + p {
    margin-top: 8px;
}

@media (max-width: 800px) {
    .hr-hero { padding: 20px 12px; }
    .hr-main { grid-template-columns: 1fr; }
    .hr-board { width: 100%; height: auto; aspect-ratio: 4/5; }
}

/* ===== 深色模式 ===== */
[data-theme="dark"] .hr-hero {
    background: linear-gradient(160deg, #450a0a 0%, #431407 100%);
    border-color: rgba(254, 202, 202, 0.16);
}
[data-theme="dark"] .hr-title { color: #fef2f2; }
[data-theme="dark"] .hr-sub,
[data-theme="dark"] .hr-tip { color: #fca5a5; }
[data-theme="dark"] .hr-steps,
[data-theme="dark"] .hr-status,
[data-theme="dark"] .hr-dpad,
[data-theme="dark"] .hr-hint {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(254, 202, 202, 0.16);
}
[data-theme="dark"] .hr-steps,
[data-theme="dark"] .hr-status,
[data-theme="dark"] .hr-hint p,
[data-theme="dark"] .hr-exit { color: #fca5a5; }
[data-theme="dark"] .hr-logo { background: rgba(239, 68, 68, 0.18); }
[data-theme="dark"] .hr-dpad-btn {
    background: rgba(255, 255, 255, 0.07);
    color: #fca5a5;
    border-color: rgba(254, 202, 202, 0.20);
}
[data-theme="dark"] .hr-dpad-btn:hover { background: rgba(239, 68, 68, 0.20); }
[data-theme="dark"] .hr-reset { background: #ef4444; color: #fff; }
