:root {
    --bg0: #0e2a20;
    --bg1: #12624a;
    --bg2: #1b7a5b;
    --ink: #e8ddc2;
    --ink2: rgba(232, 221, 194, .75);
    --line: rgba(230, 215, 177, .28);
    --shadow: rgba(0, 0, 0, .55);
}
html, body {
    height: 100%;
}
body {
    margin: 0;
    background: radial-gradient(1200px 800px at 26% 10%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 58%),
        radial-gradient(900px 700px at 82% 30%, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 62%),
        linear-gradient(135deg, var(--bg2), var(--bg1) 52%, var(--bg0));
    overflow: hidden;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#game {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    touch-action: none;
}
#hud {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 8px 10px;
    border: 1px solid rgba(230, 215, 177, .28);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(230, 215, 177, .14), rgba(0, 0, 0, .18));
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
    user-select: none;
    pointer-events: none;
    backdrop-filter: blur(8px);
}
#hud .mono {
    font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
#hud .tag {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(230, 215, 177, .22);
    border: 1px solid rgba(230, 215, 177, .22);
}
#hud .sep {
    opacity: .6;
    margin: 0 6px;
}
#overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
    z-index: 20;
}
#overlay[hidden] {
    display: none;
}
#overlay .card {
    width: min(520px, calc(100vw - 48px));
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(26, 92, 70, .92), rgba(14, 52, 39, .92));
    border: 1px solid var(--line);
    box-shadow: 0 30px 90px var(--shadow);
    padding: 18px;
    color: var(--ink);
}
#overlay .title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .2px;
}
#overlay .desc {
    margin-top: 6px;
    color: var(--ink2);
    font-size: 13px;
}
#overlay .buttons {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.btn {
    appearance: none;
    border-radius: 12px;
    border: 1px solid rgba(230, 215, 177, .35);
    background: linear-gradient(180deg, rgba(230, 215, 177, .18), rgba(0, 0, 0, .12));
    color: var(--ink);
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: .1px;
    min-width: 150px;
}
.btn:hover {
    border-color: rgba(230, 215, 177, .55);
    background: linear-gradient(180deg, rgba(230, 215, 177, .22), rgba(0, 0, 0, .08));
}
.btn:focus-visible {
    outline: 2px solid rgba(230, 215, 177, .55);
    outline-offset: 2px;
}
.btn:active {
    transform: translateY(1px);
}
@media (max-width: 520px) {
    #hud {
        top: 10px;
        left: 10px;
    }
    #overlay .buttons {
        gap: 8px;
    }
    .btn {
        width: 100%;
        min-width: 0;
    }
}
#overlay .hint {
    margin-top: 14px;
    color: rgba(232, 221, 194, .7);
    font-size: 12px;
    line-height: 1.45;
}