/**
 * Pixel RPG display mode — village game frame + crisp in-viewport HUD.
 *
 * World canvas = low-res pixel art (pixelated, integer scale).
 * Label canvas = engine-drawn house names at screen/DPR resolution (sharp text).
 * HUD overlays live inside .pixel-rpg-viewport (never outside the game frame).
 * Header/admin chrome switch to a matching pixel skin.
 */

@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&family=Press+Start+2P&family=VT323&display=swap');

/* -------------------------------------------------------------------------- */
/* Classic shell / admin list                                                 */
/* -------------------------------------------------------------------------- */

body[data-display-mode="pixel_rpg"] #classic-main {
    display: none;
}

body[data-display-mode="pixel_rpg"].admin-mode #classic-main {
    display: block;
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

body[data-display-mode="pixel_rpg"].admin-mode #classic-main .hero-section,
body[data-display-mode="pixel_rpg"].admin-mode #classic-main .manifesto-section,
body[data-display-mode="pixel_rpg"].admin-mode #classic-main footer {
    display: none !important;
}

body[data-display-mode="pixel_rpg"].admin-mode #classic-main .projects-section {
    display: block;
    padding-top: 1rem;
    border-top: 2px solid #3d2a6b;
    background: #0a0614;
}

body[data-display-mode="pixel_rpg"].admin-mode #classic-main .section-label::after {
    content: " (admin lista — falu alatt)";
    opacity: 0.7;
    font-weight: 400;
}

body[data-display-mode="pixel_rpg"].admin-mode #classic-main .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

body[data-display-mode="pixel_rpg"].admin-mode #classic-main .project-card {
    transform: none !important;
}

/* -------------------------------------------------------------------------- */
/* Pixel header chrome — in-game title bar                                    */
/* -------------------------------------------------------------------------- */

body[data-display-mode="pixel_rpg"] {
    background: #0a0614;
    font-family: 'VT323', 'Courier New', monospace;
}

body[data-display-mode="pixel_rpg"]::before {
    opacity: 0.12;
}

/* When header is reparented into the game frame, drop page-level header offset */
body[data-display-mode="pixel_rpg"].pixel-header-in-game {
    padding-top: 0;
}

body[data-display-mode="pixel_rpg"].pixel-header-in-game.admin-mode {
    padding-top: 48px;
}

body[data-display-mode="pixel_rpg"].pixel-header-in-game .pixel-rpg-root {
    margin-top: 0;
    /* Prefer dynamic viewport units for mobile browser chrome */
    height: 100vh;
    height: 100dvh;
    min-height: 280px;
}

body[data-display-mode="pixel_rpg"].pixel-header-in-game.admin-mode .pixel-rpg-root {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    margin-top: 0;
}

/* In-game chrome header (inside .pixel-rpg-viewport) */
.pixel-rpg-viewport > header.pixel-game-chrome,
.pixel-rpg-root > header.pixel-game-chrome,
header.pixel-game-chrome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    z-index: 9;
    background: #0c081c;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-bottom: 2px solid #6b4fd8;
    box-shadow: 0 2px 0 #1a1030;
    pointer-events: auto;
}

header.pixel-game-chrome .container {
    max-width: none;
    width: 100%;
    padding: 0 0.4rem;
    margin: 0;
    box-sizing: border-box;
}

header.pixel-game-chrome .nav-wrapper {
    height: 2.15rem;
    min-height: 2.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

header.pixel-game-chrome .logo-wrapper {
    gap: 0.35rem;
    text-decoration: none;
    min-width: 0;
}

header.pixel-game-chrome .logo-icon {
    width: 18px;
    height: 18px;
    color: #f5c542;
    image-rendering: pixelated;
    flex: 0 0 auto;
    /* Flatten stroke look for pixel HUD */
    filter: none;
}

header.pixel-game-chrome .logo-text {
    font-family: var(--font-heading), 'Outfit', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    text-shadow: 1px 1px 0 #1a1030;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

header.pixel-game-chrome .logo-badge {
    border-radius: 0;
    border: 2px solid #f5c542;
    background: #3d2a1f;
    color: #fde68a;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.36rem;
    letter-spacing: 0.06em;
    padding: 0.22rem 0.28rem;
    line-height: 1;
    box-shadow: 1px 1px 0 #1a1030;
    flex: 0 0 auto;
}

header.pixel-game-chrome .nav-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

header.pixel-game-chrome .btn-glow,
header.pixel-game-chrome .btn.btn-glow {
    border-radius: 0;
    border: 2px solid #67e8f9;
    background: #0e7490;
    color: #ecfeff;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.38rem;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.45rem;
    box-shadow: 2px 2px 0 #083344;
    text-shadow: none;
    backdrop-filter: none;
    gap: 0.25rem;
    line-height: 1.2;
}

header.pixel-game-chrome .btn-glow:hover,
header.pixel-game-chrome .btn.btn-glow:hover {
    background: #0891b2;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #083344;
    filter: none;
}

header.pixel-game-chrome .btn-glow svg,
header.pixel-game-chrome .btn-glow i {
    width: 12px;
    height: 12px;
}

header.pixel-game-chrome .nav-actions .logo-badge {
    border-color: #67e8f9;
    color: #a5f3fc;
    background: #083344;
    font-size: 0.34rem;
}

/* Admin bar stays page-level; pixel language */
body[data-display-mode="pixel_rpg"].admin-mode .admin-bar {
    background: #083344;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 3px solid #06b6d4;
    box-shadow: 0 3px 0 #0e7490;
    height: 48px;
}

body[data-display-mode="pixel_rpg"].admin-mode .admin-title-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.06em;
}

body[data-display-mode="pixel_rpg"].admin-mode .admin-title-pulse {
    border-radius: 0;
    width: 8px;
    height: 8px;
}

body[data-display-mode="pixel_rpg"].admin-mode .btn-admin {
    border-radius: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.42rem;
    letter-spacing: 0.04em;
    border-width: 2px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

/* Fallback if header not yet mounted */
body[data-display-mode="pixel_rpg"]:not(.pixel-header-in-game) header {
    background: #140e28;
    backdrop-filter: none;
    border-bottom: 4px solid #3d2a6b;
}

body[data-display-mode="pixel_rpg"]:not(.pixel-header-in-game) .nav-wrapper {
    height: 64px;
}

/* -------------------------------------------------------------------------- */
/* Game host + viewport (HUD clamped inside)                                  */
/* -------------------------------------------------------------------------- */

.pixel-rpg-root {
    display: none;
    position: relative;
    width: 100%;
    /* Fill remaining viewport under header (and admin bar when present) */
    height: calc(100vh - 64px);
    min-height: 320px;
    margin-top: 64px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.12) 3px,
            rgba(0, 0, 0, 0.12) 4px
        ),
        radial-gradient(ellipse at 50% 20%, rgba(76, 29, 149, 0.28), transparent 55%),
        #0a0614;
    overflow: hidden;
    box-sizing: border-box;
}

body[data-display-mode="pixel_rpg"] .pixel-rpg-root {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

body[data-display-mode="pixel_rpg"].admin-mode:not(.pixel-header-in-game) .pixel-rpg-root {
    /* admin bar 48 + page header 64 (only before header mounts into game) */
    height: calc(100vh - 48px - 64px);
    margin-top: 64px;
    min-height: 280px;
}

.pixel-rpg-stage {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    height: 100%;
    /* Minimal inset — JS scales to nearly the full stage */
    padding: 0.25rem;
    box-sizing: border-box;
}

/* Exact size of the scaled canvas; all HUD is clipped to this box */
.pixel-rpg-viewport {
    position: relative;
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 100%;
    border: 3px solid #6b4fd8;
    box-shadow:
        0 0 0 2px #1a1030,
        3px 3px 0 #1a1030,
        0 12px 32px rgba(0, 0, 0, 0.5);
    background: #0a0614;
    overflow: hidden;
    image-rendering: pixelated;
}

.pixel-rpg-root canvas.pixel-rpg-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
    background: #0a0614;
    border: 0;
    box-shadow: none;
    cursor: pointer;
    touch-action: none;
    vertical-align: top;
}

/* Engine-drawn house names — hi-res overlay (not pixelated; text must stay sharp) */
.pixel-rpg-root canvas.pixel-rpg-label-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    border: 0;
    background: transparent;
    image-rendering: auto;
    z-index: 1;
    touch-action: none;
}

/* DPR-sized character layer: denser sprite pixels, unchanged world footprint. */
.pixel-rpg-root canvas.pixel-rpg-player-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    border: 0;
    background: transparent;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    z-index: 1;
    touch-action: none;
}

.pixel-rpg-root canvas.pixel-rpg-label-canvas {
    z-index: 2;
}

/* -------------------------------------------------------------------------- */
/* In-viewport HUD                                                            */
/* -------------------------------------------------------------------------- */

.pixel-rpg-hud {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.45rem;
    box-sizing: border-box;
    gap: 0.35rem;
    overflow: hidden;
}

/* Right-aligned credits stay readable over every world-tile variation. */
.pixel-rpg-credits-panel {
    position: absolute;
    right: 0.3rem;
    bottom: 0.3rem;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
    max-width: min(58%, 26rem);
    padding: 0.24rem 0.32rem;
    background: rgba(8, 6, 22, 0.72);
    border: 1px solid rgba(103, 232, 249, 0.48);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* Pixel RPG shell version — placed inside the bottom-right credit panel. */
.pixel-rpg-version {
    pointer-events: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.42rem;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #c4b5fd;
    text-shadow:
        1px 0 0 #1a1030,
        -1px 0 0 #1a1030,
        0 1px 0 #1a1030,
        0 -1px 0 #1a1030;
    opacity: 0.9;
    user-select: none;
    -webkit-user-select: none;
}

/* Terra CC0 attribution — persistent but deliberately quieter than game HUD. */
.pixel-rpg-asset-credit {
    pointer-events: auto;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: clamp(0.58rem, 1.1vw, 0.78rem);
    font-weight: 600;
    line-height: 1.05;
    text-align: right;
    color: #c4b5fd;
    text-decoration: none;
    text-shadow: 1px 1px 0 #1a1030;
    opacity: 0.9;
}

.pixel-rpg-music-credit {
    pointer-events: none;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: clamp(0.58rem, 1.1vw, 0.78rem);
    font-weight: 600;
    line-height: 1.05;
    text-align: right;
    color: #fde68a;
    text-shadow: 1px 1px 0 #1a1030;
    opacity: 0.9;
    user-select: none;
    -webkit-user-select: none;
}

.pixel-rpg-asset-credit:hover,
.pixel-rpg-asset-credit:focus-visible {
    color: #fde68a;
    text-decoration: underline;
    outline: none;
}

/* Close button: same shell as Megnyitás, danger palette */
.pixel-rpg-btn-close {
    flex: 0 0 auto;
    border-color: #f87171;
    background: #991b1b;
    color: #fee2e2;
    box-shadow: 2px 2px 0 #450a0a;
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.pixel-rpg-btn-close .pixel-rpg-btn-keys {
    color: #fecaca;
}

.pixel-rpg-btn-close .pixel-rpg-kbd {
    border-color: #fca5a5;
    background: #7f1d1d;
    color: #fef3c7;
    box-shadow: 1px 1px 0 #450a0a;
}

.pixel-rpg-btn-close:hover {
    background: #dc2626;
    border-color: #fca5a5;
}

.pixel-rpg-btn-close:hover .pixel-rpg-kbd {
    background: #991b1b;
    border-color: #fecaca;
}

/* Usage guide placard — grows with text, capped to the game frame */
.pixel-rpg-help {
    pointer-events: auto;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Prefer content width; never wider than the playfield */
    width: max-content;
    min-width: min(200px, calc(100% - 12px));
    max-width: calc(100% - 12px);
    height: auto;
    max-height: calc(100% - 12px);
    transform: none;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.4;
    color: #1a1208;
    -webkit-text-fill-color: #1a1208;
    text-align: left;
    letter-spacing: 0.02em;
    padding: 0.45rem 0.55rem 0.55rem;
    background: #e8d5a8 !important;
    background-image: none !important;
    border: 3px solid #5c4033;
    box-shadow: 2px 2px 0 #2a1a12;
    text-shadow: none;
    overflow: hidden;
}

.pixel-rpg-help,
.pixel-rpg-help * {
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    box-sizing: border-box;
}

.pixel-rpg-help-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    flex: 0 0 auto;
    margin-bottom: 0.35rem;
    min-width: 0;
}

.pixel-rpg-help .pixel-rpg-btn-close {
    /* Slightly denser in the wooden help card */
    padding: 0.4rem 0.5rem;
    font-size: 0.4rem;
    gap: 0.3rem 0.4rem;
}

.pixel-rpg-help .pixel-rpg-btn-close .pixel-rpg-kbd {
    font-size: 0.34rem;
    padding: 0.15rem 0.22rem;
}

.pixel-rpg-help-body {
    flex: 0 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent !important;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #5c4033 #d4bc8a;
}

.pixel-rpg-help[hidden] {
    display: none !important;
}

.pixel-rpg-help-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #3d2a1f !important;
    -webkit-text-fill-color: #3d2a1f !important;
    background: none !important;
    background-image: none !important;
    margin: 0;
    letter-spacing: 0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
}

.pixel-rpg-help-line {
    display: block;
    color: #2a1a12 !important;
    -webkit-text-fill-color: #2a1a12 !important;
    background: transparent !important;
    margin: 0.15rem 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pixel-rpg-help-keys {
    display: inline;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #7c2d12 !important;
    -webkit-text-fill-color: #7c2d12 !important;
    background: transparent !important;
    vertical-align: baseline;
    margin-right: 0.15rem;
}

.pixel-rpg-toast {
    pointer-events: none;
    position: absolute;
    top: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 1rem);
    font-family: 'VT323', monospace;
    font-size: clamp(1rem, 3vw, 1.25rem);
    text-align: center;
    color: #f3e8ff;
    background: rgba(30, 20, 60, 0.9);
    border: 2px solid #6b4fd8;
    padding: 0.35rem 0.65rem;
    box-shadow: 2px 2px 0 #1a1030;
}

.pixel-rpg-toast[hidden] {
    display: none !important;
}

/* Info card — grows with content, never taller/wider than the game frame */
.pixel-rpg-panel {
    pointer-events: auto;
    position: relative;
    /* Project information must sit above the persistent bottom-right credits. */
    z-index: 7;
    align-self: stretch;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    /* Cap to playfield; content fits until this limit, then scroll */
    max-height: calc(100% - 0.9rem);
    max-width: 100%;
    /* Terra's detailed 16-bit art reads better with a softer pixel face than
       the intentionally blocky 8-bit chrome font used by the header buttons. */
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    background: rgba(8, 6, 22, 0.94);
    border: 3px solid #06b6d4;
    box-shadow: 0 -2px 0 #083344, 3px 3px 0 rgba(0, 0, 0, 0.45);
    padding: 0.55rem 0.7rem 0.65rem;
    color: #f3e8ff;
    box-sizing: border-box;
    overflow: hidden;
}

.pixel-rpg-panel-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex: 0 0 auto;
    margin-bottom: 0.3rem;
    min-width: 0;
}

.pixel-rpg-panel[hidden] {
    display: none !important;
}

.pixel-rpg-panel-kicker {
    flex: 1 1 auto;
    min-width: 0;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: #67e8f9;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.pixel-rpg-panel-title {
    flex: 0 0 auto;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    line-height: 1.15;
    color: #fff;
    margin: 0 0 0.25rem;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding-right: 0;
}

.pixel-rpg-panel-sub {
    flex: 0 0 auto;
    margin: 0 0 0.35rem;
    font-size: clamp(0.95rem, 2.4vw, 1.2rem);
    color: #a5b4fc;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pixel-rpg-panel-scroll {
    /* Grow with content; only scroll when the panel hits max-height */
    flex: 0 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    margin-bottom: 0.4rem;
    padding-right: 0.15rem;
    scrollbar-width: thin;
    scrollbar-color: #6b4fd8 #1a1030;
}

.pixel-rpg-panel-body {
    margin: 0 0 0.4rem;
    font-size: clamp(1.05rem, 2.7vw, 1.25rem);
    line-height: 1.35;
    color: #ede9fe;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    /* No artificial max-height — parent panel caps to screen */
    max-height: none;
}

.pixel-rpg-panel-tags {
    margin: 0;
    font-size: clamp(0.95rem, 2.3vw, 1.1rem);
    white-space: normal;
    overflow-wrap: anywhere;
    color: #c4b5fd;
    word-break: break-word;
}

.pixel-rpg-panel-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pixel-rpg-btn {
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.15;
    padding: 0.55rem 0.7rem;
    border: 2px solid #67e8f9;
    border-radius: 0;
    background: #0e7490;
    color: #ecfeff;
    cursor: pointer;
    image-rendering: pixelated;
    box-shadow: 2px 2px 0 #083344;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
}

.pixel-rpg-btn-label {
    white-space: nowrap;
}

.pixel-rpg-btn-keys {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1;
    color: #a5f3fc;
    letter-spacing: 0.02em;
}

.pixel-rpg-btn-keys-sep {
    opacity: 0.7;
    font-size: 0.9rem;
}

.pixel-rpg-kbd {
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.38rem;
    line-height: 1.2;
    padding: 0.2rem 0.28rem;
    border: 2px solid #67e8f9;
    background: #083344;
    color: #fde68a;
    box-shadow: 1px 1px 0 #022c34;
}

.pixel-rpg-btn:hover {
    background: #0891b2;
}

.pixel-rpg-btn:hover .pixel-rpg-kbd {
    background: #0e7490;
}

.pixel-rpg-btn:focus-visible {
    outline: 2px solid #f5c542;
    outline-offset: 2px;
}

.pixel-rpg-btn[hidden] {
    display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    body[data-display-mode="pixel_rpg"] .nav-wrapper {
        height: 56px;
    }

    body[data-display-mode="pixel_rpg"] .logo-text {
        font-size: 1.05rem;
    }

    body[data-display-mode="pixel_rpg"] .btn-text-optional {
        display: none;
    }

    body[data-display-mode="pixel_rpg"]:not(.pixel-header-in-game) .pixel-rpg-root {
        height: calc(100vh - 56px);
        margin-top: 56px;
    }

    body[data-display-mode="pixel_rpg"].pixel-header-in-game .pixel-rpg-root {
        height: 100vh;
        margin-top: 0;
    }

    body[data-display-mode="pixel_rpg"].admin-mode:not(.pixel-header-in-game) .pixel-rpg-root {
        height: calc(100vh - 48px - 56px);
        margin-top: 56px;
    }

    body[data-display-mode="pixel_rpg"].pixel-header-in-game.admin-mode .pixel-rpg-root {
        height: calc(100vh - 48px);
        margin-top: 0;
    }

    header.pixel-game-chrome .nav-wrapper {
        height: 2rem;
        min-height: 2rem;
    }

    header.pixel-game-chrome .logo-text {
        font-size: 0.85rem;
    }

    header.pixel-game-chrome .btn-text-optional {
        display: none;
    }

    .pixel-rpg-panel {
        padding: 0.45rem 0.5rem 0.5rem;
    }

    .pixel-rpg-help {
        font-size: 1rem;
    }
}

@media (max-height: 560px) {
    .pixel-rpg-toast {
        top: 2rem;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-display-mode="pixel_rpg"] .btn-glow:hover,
    body[data-display-mode="pixel_rpg"] .btn.btn-glow:hover {
        transform: none;
    }

    .pixel-rpg-btn {
        transition: none;
    }
}
