/* Game hub — minimal, phone-case friendly */
#page-game-hub.game-hub-page {
    --gh-bg: #f6f4f1;
    --gh-card: #fff;
    --gh-text: #2c241c;
    --gh-muted: #6b5f54;
    --gh-accent: #5c7c6e;
    --gh-border: rgba(44, 36, 28, 0.12);
    background: var(--gh-bg);
    font-family: "Nunito", system-ui, sans-serif;
    color: var(--gh-text);
}

#page-game-hub .game-hub-screen {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#page-game-hub .game-hub-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,244,241,.85));
    border-bottom: 1px solid var(--gh-border);
    flex-shrink: 0;
}

#page-game-hub .game-hub-back {
    border: none;
    background: rgba(92, 124, 110, 0.12);
    color: var(--gh-accent);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

#page-game-hub .game-hub-title-wrap { flex: 1; min-width: 0; }
#page-game-hub .game-hub-title { font-size: 17px; font-weight: 800; letter-spacing: 0.02em; }
#page-game-hub .game-hub-sub { font-size: 12px; color: var(--gh-muted); margin-top: 2px; }

#page-game-hub .game-hub-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
    -webkit-overflow-scrolling: touch;
}

#page-game-hub .gh-section {
    margin-bottom: 18px;
}
#page-game-hub .gh-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--gh-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#page-game-hub .gh-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#page-game-hub .gh-menu-card {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: 16px;
    padding: 16px 14px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 6px 20px rgba(44,36,28,.06);
    transition: transform .15s ease, box-shadow .15s ease;
}
#page-game-hub .gh-menu-card:active { transform: scale(0.98); }

#page-game-hub .gh-menu-card .emoji { font-size: 28px; margin-bottom: 8px; }
#page-game-hub .gh-menu-card .name { font-size: 15px; font-weight: 800; }
#page-game-hub .gh-menu-card .desc { font-size: 12px; color: var(--gh-muted); margin-top: 4px; line-height: 1.4; }

#page-game-hub .gh-card {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

#page-game-hub .gh-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

#page-game-hub .gh-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
#page-game-hub .gh-btn-primary {
    background: var(--gh-accent);
    color: #fff;
}
#page-game-hub .gh-btn-ghost {
    background: rgba(92,124,110,.12);
    color: var(--gh-accent);
}

#page-game-hub .gh-select, #page-game-hub .gh-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--gh-border);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}

#page-game-hub .gh-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--gh-border);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
#page-game-hub .gh-pill.on {
    border-color: var(--gh-accent);
    background: rgba(92,124,110,.12);
    color: var(--gh-accent);
    font-weight: 700;
}

#page-game-hub .gh-npc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (min-width: 400px) {
    #page-game-hub .gh-npc-grid { grid-template-columns: 1fr 1fr 1fr; }
}

#page-game-hub .gh-npc-card {
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.35;
    transition: border-color .15s, background .15s;
}
#page-game-hub .gh-npc-card.selected {
    border-color: var(--gh-accent);
    background: rgba(92,124,110,.08);
}
#page-game-hub .gh-npc-card .n { font-weight: 800; font-size: 13px; }
#page-game-hub .gh-npc-card .p { color: var(--gh-muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

#page-game-hub .gh-hint {
    font-size: 13px;
    color: var(--gh-muted);
    line-height: 1.45;
    margin: 8px 0;
}

#page-game-hub .gh-log {
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0,0,0,.03);
    border-radius: 10px;
}

#page-game-hub .gh-placeholder-frame {
    width: 100%;
    min-height: 280px;
    border: none;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--gh-border);
}

#page-game-hub .gh-danger { color: #b44; font-size: 12px; margin-top: 8px; }
