body {
    background-color: white;
    font-family: Arial, sans-serif;
    color: #26343b;
    margin: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #dddddd;
}

.app-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4fb5ae;
    font-size: 28px;
    font-weight: bold;
}

.app-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-buttons button {
    padding: 10px 15px;
    border: 1px solid #4fb5ae;
    border-radius: 8px;
    background-color: white;
    color: #4fb5ae;
    font-size: 15px;
    cursor: pointer;
}

main {
    text-align: center;
    padding: 40px 20px;
}

main h1 {
    color: #26343b;
    font-size: 32px;
}

.add-essa-button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    background-color: #4fb5ae;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.essa-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.essa-form label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: bold;
    color: #26343b;
}

.essa-form input,
.essa-form select,
.essa-form textarea {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #cbd9dc;
    border-radius: 10px;
    font-size: 16px;
    background-color: white;
}

.essa-form input:focus,
.essa-form select:focus,
.essa-form textarea:focus {
    outline: none;
    border-color: #4fb5ae;
}

.essa-form p {
    font-size: 16px;
    color: #68777b;
}

.essa-form button {
    margin-top: 25px;
    margin-right: 10px;
    padding: 12px 24px;
    border: 1px solid #4fb5ae;
    border-radius: 10px;
    background-color: white;
    color: #3b9f99;
    font-size: 16px;
    cursor: pointer;
}

.essa-form button:last-child {
    background-color: #4fb5ae;
    color: white;
}

.essa-form button:hover {
    opacity: 0.85;
}
.essa-form textarea {
    min-height: 100px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

/* =========================================================
   PLAY MODE ACTION BUTTONS
========================================================= */

.play-action-button {
    padding: 11px 16px;
    border: 1px solid #dbe5e7;
    border-radius: 12px;
    background: white;
    color: #26343b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
}

.play-action-button:hover {
    border-color: var(--user-theme-color, #4fb5ae);

    background: color-mix(
        in srgb,
        var(--user-theme-color, #4fb5ae) 10%,
        white
    );
}

.play-action-button.primary {
    background: var(--user-theme-color, #4fb5ae);
    border-color: var(--user-theme-color, #4fb5ae);
    color: white;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .header-buttons {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-buttons button {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 6px;
    }

    #play-house-room > div:first-child {
    left: 10px !important;
    right: 10px !important;

    justify-content: center !important;
    flex-wrap: nowrap !important;

    gap: 6px !important;
}

#play-house-room > div:first-child .play-action-button {
    flex: 1;

    padding: 8px 6px;

    font-size: 11px;

    white-space: nowrap;
}

    .play-room-actions {
        left: 10px !important;
        right: 10px !important;

        justify-content: center !important;
        flex-wrap: nowrap !important;

        gap: 6px !important;
    }

    .play-room-actions .play-action-button {
        flex: 1;

        padding: 8px 6px;

        font-size: 11px;

        white-space: nowrap;
    }

    main {
    padding: 20px 0;
}

.play-room-navigation {
    gap: 8px !important;
    padding: 0 10px;
}

.play-room-navigation button:first-child,
.play-room-navigation button:last-child {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    font-size: 16px !important;
}

.play-room-navigation button:nth-child(2) {
    min-width: 0 !important;
    flex: 1;
    max-width: 190px;
    padding: 9px 12px !important;
    font-size: 13px !important;
}

@media (max-width: 700px) {
    .play-room-navigation {
        background: red !important;
    }
}
}

/* =========================================================
   PLAY MODE - PHONE LANDSCAPE
========================================================= */

@media (max-height: 500px) and (orientation: landscape) {

    body:not(.play-mobile-fullscreen)
.play-focus-essa-scale {
    transform:
        translateY(-55px)
        scale(0.72) !important;
}
     body.play-mobile-fullscreen
.play-focus-essa {
    top: 20px !important;
}

  body:not(.play-mobile-fullscreen)
    #play-voidy-door {
        width: 275px !important;
        height: 260px !important;
        right: -2% !important;
        bottom: 14% !important;
    }



    .trainer-level-bar {
        padding: 5px 10px !important;
        border-radius: 10px !important;
    }

    .trainer-level-bar > div:first-child {
        margin-bottom: 3px !important;
        font-size: 11px !important;
    }

    .trainer-level-bar > div:last-child {
        height: 6px !important;
    }

    header {
    padding: 5px 12px !important;
}

.app-icon {
    width: 34px !important;
    height: 34px !important;
}

.app-name {
    gap: 6px !important;
    font-size: 20px !important;
}

.header-buttons {
    gap: 5px !important;
}

.header-buttons button {
    padding: 6px 10px !important;
    font-size: 12px !important;
}

main {
    padding-top: 8px !important;
    padding-bottom: 0 !important;
}

.play-room-navigation {
    margin-bottom: 6px !important;
}

.play-room-navigation button:first-child,
.play-room-navigation button:last-child {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 14px !important;
}

.play-room-navigation button:nth-child(2) {
    padding: 6px 14px !important;
    font-size: 13px !important;
    min-height: 34px !important;
}

#play-house-room {
    min-height: 0 !important;
height: calc(100vh - 95px) !important;

    background-size: 100% 100% !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
}

.play-room-navigation {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(-50%) !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block !important;

    z-index: 300 !important;

    pointer-events: none;
}

.play-room-navigation button:first-child {
    position: fixed !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;

    pointer-events: auto;
}

.play-room-navigation button:last-child {
    position: fixed !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;

    pointer-events: auto;
}

.play-room-navigation button:nth-child(2) {
    display: none !important;
}

.trainer-level-wrapper {
    position: absolute !important;
    top: 9px !important;
    left: 300px !important;
    width: 360px !important;

    margin: 0 !important;
    z-index: 500 !important;
}

.trainer-level-bar {
    width: 100% !important;
    margin: 0 !important;
}

.play-fullscreen-button {
    padding: 8px 10px !important;
    font-size: 11px !important;
}

body.play-mobile-fullscreen header {
    display: none !important;
}

body.play-mobile-fullscreen .trainer-level-wrapper {
    display: none !important;
}

.play-room-wander-message {
    display: none !important;
}

body.play-mobile-fullscreen {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.play-mobile-fullscreen main {
    margin: 0 !important;
    padding: 0 !important;
}

body.play-mobile-fullscreen .play-room-container {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.play-mobile-fullscreen #play-house-room {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;

    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    background-size: 100% 100% !important;
}

.play-focus-actions {
    left: auto !important;
    right: 16px !important;
    top: 50% !important;
    bottom: auto !important;

    transform: translateY(-50%) !important;

    width: 105px !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;

    z-index: 100 !important;
}

.play-focus-actions .play-action-button {
    width: 100% !important;
    padding: 8px 6px !important;
    font-size: 12px !important;
}

.play-focus-actions .play-action-button > div {
    font-size: 22px !important;
    margin-bottom: 3px !important;
}

.play-focus-room {
    min-height: 0 !important;
    height: calc(100vh - 95px) !important;
    background-size: 100% 100% !important;
    background-position: center !important;
}

body.play-mobile-fullscreen .play-focus-wrapper {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.play-mobile-fullscreen .play-focus-room {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.play-mobile-fullscreen main {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.play-arcade-machines {

    bottom: 95px !important; 

}

/* =========================================================
   MEMORY SETUP — MOBILE LANDSCAPE
========================================================= */

.memory-setup-wrapper {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
}

.memory-back-button {
    position:absolute !important;
    top:8px !important;
    left:8px !important;
    z-index:100 !important;

    padding:7px 10px !important;
    font-size:12px !important;
}

.memory-setup-panel {
    width:100% !important;
    height:calc(100vh - 10px) !important;
    min-height:0 !important;
    margin:0 !important;
    padding:8px 50px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
}

.memory-setup-title {
    margin:0 !important;
    font-size:18px !important;
}

.memory-setup-description {
    margin:2px 0 5px !important;
    font-size:11px !important;
}

.memory-card-back-grid {
    display:grid !important;
    grid-template-columns:repeat(7, 1fr) !important;
    grid-template-rows:repeat(2, 1fr) !important;
    gap:5px !important;
    margin-top:4px !important;
}

.memory-card-back-option {
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    padding:3px !important;
    border-radius:9px !important;
}

.memory-card-back-option img {
    width:auto !important;
    height:85px !important;
    max-width:100% !important;
    margin:auto !important;
    object-fit:contain !important;
}

.memory-card-back-name {
    margin-top:1px !important;
    font-size:9px !important;
    line-height:1 !important;
}

/* =========================================================
   ESSA MEMORY GAME — MOBILE LANDSCAPE
========================================================= */

.essa-memory-screen {
    width:100% !important;
    height:calc(100vh - 55px) !important;
    min-height:0 !important;

    padding:4px 8px !important;

    box-sizing:border-box !important;
    overflow:hidden !important;
}


.essa-memory-wrapper {
    width:100% !important;
    max-width:none !important;
    height:100% !important;
}


.essa-memory-top-buttons {
    position:relative !important;

    height:32px !important;

    margin:0 0 3px 0 !important;
}


.essa-memory-top-buttons .play-action-button {
    padding:5px 9px !important;
    font-size:11px !important;
    border-radius:9px !important;
}


.essa-memory-game-panel {
    width:100% !important;

    height:calc(100% - 35px) !important;

    margin:0 !important;
    padding:5px 8px !important;

    border-radius:14px !important;

    overflow:hidden !important;
}


.essa-memory-game-header {
    height:27px !important;

    margin:0 0 4px 0 !important;

    flex-wrap:nowrap !important;
}


.essa-memory-title {
    font-size:17px !important;
    white-space:nowrap !important;
}


.essa-memory-score {
    gap:4px !important;
    flex-wrap:nowrap !important;
}


.essa-memory-score-pill {
    padding:4px 8px !important;
    font-size:10px !important;
    white-space:nowrap !important;
}


/* 4 ACROSS × 4 DOWN */

.essa-memory-grid {
    height:calc(100% - 31px) !important;

    display:grid !important;

    grid-template-columns:
        repeat(4, 1fr) !important;

    grid-template-rows:
        repeat(4, 1fr) !important;

    gap:4px !important;
}


.essa-memory-card {
    width:100% !important;
    height:100% !important;

    min-height:0 !important;

    aspect-ratio:auto !important;

    border-width:1px !important;
    border-radius:7px !important;
}


.essa-memory-card-face {
    padding:2px !important;
}


.essa-memory-card-face img {
    width:90% !important;
    height:78% !important;
}


.essa-memory-card-name {
    font-size:8px !important;
    line-height:1 !important;
}

/* =========================================================
   ESSA TILES — MOBILE LANDSCAPE
========================================================= */

.essa-tiles-screen {
    width:100% !important;
    height:calc(100vh - 105px) !important;
    min-height:0 !important;

    padding:4px 8px !important;

    box-sizing:border-box !important;
    overflow:hidden !important;

    background-attachment:scroll !important;
}


.essa-tiles-wrapper {
    width:100% !important;
    max-width:none !important;

    height:100% !important;

    display:grid !important;

    grid-template-rows:
        34px
        22px
        minmax(0, 1fr)
        58px !important;

    gap:3px !important;
}


/* TOP BAR */

.essa-tiles-topbar {
    height:34px !important;

    margin:0 !important;
    padding:2px 8px !important;

    box-sizing:border-box !important;

    flex-wrap:nowrap !important;

    border-radius:10px !important;
}


.essa-tiles-back {
    padding:5px 8px !important;
    font-size:10px !important;
}


.essa-tiles-heading {
    line-height:1 !important;
    font-size:12px !important;
}


.essa-tiles-subtitle {
    display:none !important;
}


.essa-tiles-count {
    font-size:11px !important;
    white-space:nowrap !important;
}


/* INSTRUCTIONS */

.essa-tiles-instructions {
    height:22px !important;

    margin:0 !important;
    padding:4px 8px !important;

    box-sizing:border-box !important;

    font-size:9px !important;
    line-height:14px !important;

    border-radius:8px !important;

    overflow:hidden !important;
}


/* BOARD */

.essa-tiles-board {
    width:100% !important;
    height:100% !important;

    min-height:0 !important;

    border-width:2px !important;
    border-radius:12px !important;
}


/* TILES */

.essa-tiles-tile {
    width:clamp(
        34px,
        7vh,
        48px
    ) !important;

    padding:2px !important;

    border-width:2px !important;
    border-radius:7px !important;
}


/* TRAY */

.essa-tiles-tray {
    height:58px !important;

    margin:0 !important;
    padding:3px 8px !important;

    box-sizing:border-box !important;

    border-radius:10px !important;

    overflow:hidden !important;
}


.essa-tiles-tray-title {
    height:13px !important;

    margin:0 0 2px 0 !important;

    font-size:9px !important;
    line-height:13px !important;
}


.essa-tiles-tray-slots {
    height:36px !important;
    gap:4px !important;
}


.essa-tiles-tray-slot {
    flex:0 0 36px !important;

    width:36px !important;
    height:36px !important;

    min-width:36px !important;
    max-width:36px !important;

    aspect-ratio:auto !important;

    border-width:1px !important;
    border-radius:6px !important;
}

body.play-mobile-fullscreen .essa-tiles-screen {
    height:100vh !important;
}
}

@media (max-height: 500px) and (orientation: landscape) {

    #essa-tiles-board .essa-tiles-tile {
        width:42px !important;
        height:42px !important;
        min-width:0 !important;
        min-height:0 !important;
        aspect-ratio:auto !important;
        padding:2px !important;
    }

}

@media (max-height: 500px) and (orientation: landscape) {

    #essa-tiles-board {
        border:10px solid red !important;
    }

}

/* =========================================================
   ESSATWIST — PHONE LANDSCAPE
========================================================= */

@media (max-height:500px) and (orientation:landscape) {

    .essatwist-screen {
        width:100% !important;

        height:calc(100vh - 55px) !important;
        min-height:0 !important;

        padding:4px 8px !important;

        box-sizing:border-box !important;
        overflow:hidden !important;
    }


    .essatwist-panel {
        width:100% !important;
        max-width:none !important;

        height:100% !important;

        margin:0 !important;
        padding:5px 10px !important;

        box-sizing:border-box !important;

        border-radius:14px !important;

        overflow:hidden !important;
    }


    .essatwist-topbar {
        height:32px !important;

        display:grid !important;

        grid-template-columns:
            1fr
            auto
            1fr !important;

        align-items:center !important;

        margin:0 0 3px 0 !important;
    }


    .essatwist-back {
        justify-self:start !important;

        padding:5px 9px !important;

        font-size:10px !important;
    }


    .essatwist-title {
        font-size:17px !important;

        white-space:nowrap !important;
    }


    .essatwist-restart {
        justify-self:end !important;

        padding:5px 9px !important;

        font-size:10px !important;
    }


    .essatwist-description {
        display:none !important;
    }


    .essatwist-stats {
        height:25px !important;

        margin:2px 0 3px 0 !important;

        gap:5px !important;

        flex-wrap:nowrap !important;
    }


    .essatwist-stat {
        padding:3px 9px !important;

        font-size:10px !important;

        white-space:nowrap !important;
    }


    .essatwist-board {
        width:auto !important;

        height:calc(100% - 65px) !important;

        max-width:100% !important;

        aspect-ratio:1 / 1 !important;

        margin:0 auto !important;

        gap:3px !important;

        padding:5px !important;

        border-radius:12px !important;
    }


    .essatwist-gem {
        width:100% !important;
        height:100% !important;

        min-width:0 !important;
        min-height:0 !important;

        aspect-ratio:auto !important;

        padding:2px !important;

        border-radius:7px !important;
    }


    body.play-mobile-fullscreen .essatwist-screen {
        height:100vh !important;
    }

}

/* =========================================================
   ESSA TIC-TAC-TOE — PHONE LANDSCAPE
========================================================= */

@media (max-height:500px) and (orientation:landscape) {

    .essa-tictactoe-screen {
        width:100% !important;

        height:calc(100vh - 55px) !important;
        min-height:0 !important;

        padding:4px 8px !important;

        box-sizing:border-box !important;
        overflow:hidden !important;
    }


    .essa-tictactoe-wrapper {
        width:100% !important;
        max-width:none !important;

        height:100% !important;

        margin:0 !important;
    }


    .essa-tictactoe-panel {
        width:100% !important;
        height:100% !important;

        padding:5px 10px !important;

        box-sizing:border-box !important;

        border-radius:14px !important;

        overflow:hidden !important;
    }


    /* TOP BAR */

    .essa-tictactoe-topbar {
        height:32px !important;

        display:grid !important;

        grid-template-columns:
            1fr
            auto
            1fr !important;

        align-items:center !important;

        margin-bottom:3px !important;
    }


    .essa-tictactoe-back {
        justify-self:start !important;

        padding:5px 9px !important;

        font-size:10px !important;
    }


    .essa-tictactoe-title {
        font-size:17px !important;

        white-space:nowrap !important;
    }


    .essa-tictactoe-change {
        justify-self:end !important;

        padding:5px 9px !important;

        font-size:10px !important;
    }


    /* OPPONENT */

    .essa-tictactoe-opponent {
        height:36px !important;

        margin:2px 0 !important;

        gap:5px !important;
    }


    .essa-tictactoe-opponent-image {
        width:34px !important;
        height:34px !important;
    }


    .essa-tictactoe-opponent-text {
        font-size:10px !important;
    }


    /* TURN MESSAGE */

    .essa-tictactoe-turn {
        height:18px !important;

        margin:1px 0 3px 0 !important;

        font-size:11px !important;
        line-height:18px !important;
    }


    /* BOARD */

    .essa-tictactoe-board {
        height:calc(100% - 96px) !important;

        width:auto !important;

        aspect-ratio:1 / 1 !important;

        margin:0 auto !important;

        grid-template-columns:
            repeat(
                3,
                1fr
            ) !important;

        grid-template-rows:
            repeat(
                3,
                1fr
            ) !important;

        gap:5px !important;
    }


    .essa-tictactoe-square {
        width:100% !important;
        height:100% !important;

        min-width:0 !important;
        min-height:0 !important;

        font-size:36px !important;

        border-width:2px !important;
        border-radius:9px !important;
    }


    /* FULLSCREEN */

    body.play-mobile-fullscreen
    .essa-tictactoe-screen {
        height:100vh !important;
    }

}

/* =========================================================
   TIC-TAC-TOE SETUP — PHONE LANDSCAPE
========================================================= */

@media (max-height:500px) and (orientation:landscape) {

    .essa-tictactoe-setup-screen {
        width:100% !important;

        height:calc(100vh - 55px) !important;
        min-height:0 !important;

        padding:4px 8px !important;

        box-sizing:border-box !important;
        overflow:hidden !important;
    }


    .essa-tictactoe-setup-wrapper {
        width:100% !important;
        max-width:none !important;

        height:100% !important;

        margin:0 !important;
    }


    .essa-tictactoe-setup-panel {
        width:100% !important;
        height:100% !important;

        padding:5px 10px !important;

        box-sizing:border-box !important;

        border-radius:14px !important;

        overflow:hidden !important;
    }


    .essa-tictactoe-setup-topbar {
        height:32px !important;

        display:grid !important;

        grid-template-columns:
            1fr
            auto
            1fr !important;

        align-items:center !important;
    }


    .essa-tictactoe-setup-back {
        justify-self:start !important;

        padding:5px 9px !important;

        font-size:10px !important;
    }


    .essa-tictactoe-setup-title {
        font-size:17px !important;

        white-space:nowrap !important;
    }


    .essa-tictactoe-setup-description {
        margin:3px 0 4px 0 !important;

        font-size:10px !important;
    }


    .essa-tictactoe-opponent-grid {
        display:grid !important;

        grid-template-columns:
            repeat(4, 1fr) !important;

        grid-template-rows:
            repeat(2, 1fr) !important;

        gap:5px !important;

        width:min(100%, 580px) !important;

        height:calc(100% - 52px) !important;

        margin:0 auto !important;
    }


    .essa-tictactoe-opponent-option {
        width:100% !important;
        height:100% !important;

        min-width:0 !important;
        min-height:0 !important;

        padding:3px !important;

        border-radius:9px !important;

        overflow:hidden !important;
    }


    .essa-tictactoe-opponent-option img {
        width:auto !important;
        height:70% !important;

        max-width:100% !important;

        object-fit:contain !important;
    }


    .essa-tictactoe-opponent-name {
        margin-top:1px !important;

        font-size:9px !important;
        line-height:1 !important;
    }


    body.play-mobile-fullscreen
    .essa-tictactoe-setup-screen {
        height:100vh !important;
    }

}

/* =========================================================
   FIND MY ESSA — PHONE LANDSCAPE
========================================================= */

@media (max-height:500px) and (orientation:landscape) {

    .find-my-essa-screen {
        width:100% !important;

        height:calc(100vh - 55px) !important;
        min-height:0 !important;

        padding:4px 8px !important;

        box-sizing:border-box !important;
        overflow:hidden !important;
    }


    .find-my-essa-wrapper {
        width:100% !important;
        max-width:none !important;

        height:100% !important;

        margin:0 !important;

        display:grid !important;

        grid-template-rows:
            62px
            minmax(0, 1fr) !important;

        gap:4px !important;
    }


    /* TOP PANEL */

    .find-my-essa-top-panel {
        height:62px !important;

        margin:0 !important;
        padding:4px 8px !important;

        box-sizing:border-box !important;

        border-radius:12px !important;
    }


    .find-my-essa-topbar {
        height:26px !important;

        display:grid !important;

        grid-template-columns:
            1fr
            auto
            1fr !important;

        align-items:center !important;

        gap:5px !important;

        flex-wrap:nowrap !important;
    }


    .find-my-essa-back {
        justify-self:start !important;

        padding:4px 8px !important;

        font-size:10px !important;
    }


    .find-my-essa-title {
        font-size:13px !important;

        white-space:nowrap !important;
    }


    .find-my-essa-score {
        justify-self:end !important;

        font-size:10px !important;

        white-space:nowrap !important;
    }


    /* TARGET */

    .find-my-essa-target {
        height:28px !important;

        display:flex !important;

        align-items:center !important;
        justify-content:center !important;

        gap:6px !important;
    }


    .find-my-essa-target-text {
        margin:0 !important;

        font-size:12px !important;

        white-space:nowrap !important;
    }


    .find-my-essa-target-image {
        width:28px !important;
        height:28px !important;

        margin:0 !important;
    }


    /* CROWD */

    .find-my-essa-crowd {
        width:100% !important;
        height:100% !important;

        min-height:0 !important;

        border-width:2px !important;
        border-radius:12px !important;
    }


    /* CROWD ESSAS */

    .find-my-essa-member {
        max-width:62px !important;
        max-height:62px !important;
    }


    /* FULLSCREEN */

    body.play-mobile-fullscreen
    .find-my-essa-screen {
        height:100vh !important;
    }

}

/* =========================================================
   DESKTOP PLAY ROOM FULLSCREEN
========================================================= */

.play-room-container:fullscreen {
    width:100vw !important;
    max-width:none !important;

    height:100vh !important;

    margin:0 !important;
    padding:0 !important;

    background:#eaf6f4;

    overflow:hidden !important;
}


/* Hide trainer bar */

.play-room-container:fullscreen
.trainer-level-wrapper {
    display:none !important;
}


/* Navigation stays across the top */

.play-room-container:fullscreen
.play-room-navigation {
    position:absolute !important;

    top:0 !important;
    left:0 !important;

    width:100% !important;
    height:62px !important;

    margin:0 !important;

    z-index:500 !important;

    background:rgba(
        230,
        234,
        235,
        .92
    );

    box-sizing:border-box !important;
}


/* Actual room fills everything below navigation */

.play-room-container:fullscreen
#play-house-room {
    position:absolute !important;

    top:62px !important;
    left:0 !important;

    width:100vw !important;

    height:calc(100vh - 62px) !important;
    min-height:0 !important;

    margin:0 !important;

    border:none !important;
    border-radius:0 !important;

    box-shadow:none !important;

    background-size:100% 100% !important;
    background-position:center !important;
    background-repeat:no-repeat !important;
}


/* Don't show the little wander message */

.play-room-container:fullscreen
.play-room-wander-message {
    display:none !important;
}

/* =========================================================
   DESKTOP FULLSCREEN — PLAY ROOM CONTROLS
========================================================= */

@media (min-height:501px) {

    /* FULLSCREEN MAIN */

    main:fullscreen {
        width:100vw !important;
        height:100vh !important;

        padding:0 !important;
        margin:0 !important;

        overflow:hidden !important;

        background:#000 !important;
    }


    /* ROOM CONTAINER */

    main:fullscreen .play-room-container {
        position:relative !important;

        width:100vw !important;
        max-width:none !important;

        height:100vh !important;

        margin:0 !important;
        padding:0 !important;
    }


    /* =========================================
       TRAINER BAR
    ========================================= */

    main:fullscreen .trainer-level-wrapper {
        display:flex !important;

        position:absolute !important;

        top:14px !important;
        left:50% !important;

        transform:translateX(-50%) !important;

        width:420px !important;
        max-width:36vw !important;

        margin:0 !important;

        z-index:600 !important;
    }


    main:fullscreen .trainer-level-wrapper > * {
        width:100% !important;
        box-sizing:border-box !important;
    }


    /* =========================================
       ROOM NAVIGATION
    ========================================= */

    main:fullscreen .play-room-navigation {
        position:absolute !important;

        top:0 !important;
        left:0 !important;

        width:100% !important;
        height:0 !important;

        margin:0 !important;

        z-index:650 !important;
    }


    /* LEFT ARROW */

    main:fullscreen
    .play-room-navigation
    button:first-child {
        position:fixed !important;

        top:18px !important;
        left:18px !important;

        width:44px !important;
        height:44px !important;

        margin:0 !important;

        z-index:700 !important;
    }


    /* HIDE WHITE ROOM LABEL */

    main:fullscreen
    .play-room-navigation
    button:nth-child(2) {
        display:none !important;
    }


    /* RIGHT ARROW */

    main:fullscreen
    .play-room-navigation
    button:last-child {
        position:fixed !important;

        top:18px !important;
        right:18px !important;

        width:44px !important;
        height:44px !important;

        margin:0 !important;

        z-index:700 !important;
    }


    /* =========================================
       ACTUAL ROOM
    ========================================= */

    main:fullscreen #play-house-room {
        position:absolute !important;

        top:0 !important;
        left:0 !important;

        width:100vw !important;
        height:100vh !important;
        min-height:0 !important;

        margin:0 !important;

        border:none !important;
        border-radius:0 !important;

        box-shadow:none !important;

        background-size:100% 100% !important;
        background-position:center !important;
        background-repeat:no-repeat !important;
    }


    /* =========================================
       ROOM ACTION BUTTONS
    ========================================= */

    main:fullscreen .play-room-actions {
        top:16px !important;
        right:80px !important;

        z-index:650 !important;
    }


    /* =========================================
       HIDE WANDER TEXT
    ========================================= */

    main:fullscreen .play-room-wander-message {
        display:none !important;
    }

}

/* =========================================================
   DESKTOP FULLSCREEN — FIXES
========================================================= */

@media (min-height:501px) {

    /* Allow non-room screens to actually scroll in fullscreen */
    main:fullscreen {
        overflow-y:auto !important;
        overflow-x:hidden !important;
    }


    /* -----------------------------------------
       ROOM ONLY
    ----------------------------------------- */

    main:fullscreen .play-room-container {
        overflow:hidden !important;
    }


    /* Move trainer bar farther left */
    main:fullscreen .trainer-level-wrapper {
        top:14px !important;

        left:36% !important;

        transform:translateX(-50%) !important;

        width:420px !important;
        max-width:34vw !important;
    }


    /* Move room arrows DOWN */
    main:fullscreen
    .play-room-navigation
    button:first-child {
        top:90px !important;
        left:18px !important;
    }


    main:fullscreen
    .play-room-navigation
    button:last-child {
        top:90px !important;
        right:18px !important;
    }


    /* Keep room label hidden */
    main:fullscreen
    .play-room-navigation
    button:nth-child(2) {
        display:none !important;
    }


    /* -----------------------------------------
       POPUPS
       Fullscreen creates its own display layer.
       Keep popup overlays inside that layer.
    ----------------------------------------- */

    main:fullscreen .play-modal-overlay,
    main:fullscreen .modal-overlay,
    main:fullscreen .popup-overlay {
        position:fixed !important;

        inset:0 !important;

        width:100vw !important;
        height:100vh !important;

        z-index:99999 !important;
    }


    /* -----------------------------------------
       ESSA FOCUS
       Remove the normal desktop width restriction
       while main is fullscreen.
    ----------------------------------------- */

    main:fullscreen .play-focus-wrapper {
        width:100% !important;
        max-width:none !important;

        min-height:100vh !important;

        margin:0 !important;

        box-sizing:border-box !important;
    }


    main:fullscreen .play-focus-room {
        width:100% !important;
        max-width:none !important;

        min-height:100vh !important;

        margin:0 !important;

        box-sizing:border-box !important;
    }


    /* -----------------------------------------
       ARCADE
       Put machines back farther up.
    ----------------------------------------- */

    main:fullscreen .play-arcade-machines {
        bottom:175px !important;
    }

}

/* =========================================================
   DESKTOP FULLSCREEN — CENTER ROOM ARROWS
========================================================= */

@media (min-height:501px) {

    main:fullscreen
    .play-room-navigation
    button:first-child {
        position:fixed !important;

        top:50% !important;
        left:18px !important;

        transform:translateY(-50%) !important;
    }


    main:fullscreen
    .play-room-navigation
    button:last-child {
        position:fixed !important;

        top:50% !important;
        right:18px !important;

        transform:translateY(-50%) !important;
    }

}

/* =========================================================
   PLAY ITEM MENUS
   Food / Drinks / Bath
========================================================= */

.play-item-menu-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.play-item-menu-room {
    position: relative;

    width: 100%;
    min-height: 680px;

    overflow: hidden;

    border: 1px solid #dbe5e7;
    border-radius: 28px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

.play-item-menu-back {
    position: absolute;
    top: 18px;
    left: 18px;

    z-index: 30;

    padding: 10px 15px;

    border: none;
    border-radius: 12px;

    background: #061512;
    color: white;

    font-weight: bold;
    cursor: pointer;
}

.play-item-menu-essa {
    position: absolute;

    top: 55px;
    left: 50%;

    transform: translateX(-50%);

    width: min(42%, 330px);

    z-index: 10;
}

.play-item-menu-panel {
    position: absolute;

    left: 20px;
    right: 20px;
    bottom: 20px;

    padding: 22px;

    background: rgba(255,255,255,.97);

    border-radius: 24px;

    box-shadow:
        0 5px 22px
        rgba(0,0,0,.16);

    z-index: 30;
}

.play-item-menu-title {
    margin-top: 0;
}

.play-item-menu-subtitle {
    color: #68777b;
}

.play-item-menu-items {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(115px, 1fr)
        );

    gap: 12px;
    margin-top: 18px;
}

/* =========================================================
   DESKTOP FULLSCREEN — FOCUSED ESSA FLOOR POSITION
========================================================= */

@media (min-height:501px) {

    main:fullscreen .play-focus-essa {
        top:auto !important;
        bottom:105px !important;

        left:50% !important;

        transform:
            translateX(-50%) !important;
    }

}

#play-room-nav.play-room-nav-closed
    > *:not(#play-room-nav-toggle) {
    display: none !important;
}


#play-room-nav.play-room-nav-closed
    #play-room-nav-toggle {
    font-size: 0 !important;
}


#play-room-nav.play-room-nav-closed
    #play-room-nav-toggle::after {
    content: "<";
    font-size: 28px;
    font-weight: bold;
}

#play-room-nav.play-room-nav-closed {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}


#play-room-nav.play-room-nav-closed
    #play-room-nav-toggle {
    display: block !important;
    width: 42px;
    height: 42px;
    padding: 0 !important;

    background: rgba(0, 0, 0, .82) !important;
    border-radius: 12px !important;

    text-align: center;
    line-height: 42px !important;
}



/* =========================================================
   KITCHEN FRIDGE — REGULAR DESKTOP ONLY
========================================================= */

@media (min-height:501px) {

    main:not(:fullscreen)
    .play-kitchen-fridge {
       right:24% !important;
    }

}

/* =========================================================
   KITCHEN FRIDGE — DESKTOP SIZE
========================================================= */

@media (min-height:501px) {

    /* Regular desktop */
    main:not(:fullscreen)
    .play-kitchen-fridge {
        width:275px !important;
        height:455px !important;
    }

    /* Fullscreen desktop */
    main:fullscreen
.play-kitchen-fridge {
    width:451px !important;
    height:660px !important;
    right:24% !important;
    bottom:27% !important;
}
}

/* =========================================================
   OPEN FRIDGE — DESKTOP SIZE
========================================================= */

@media (min-height:501px) {

    #play-fridge-overlay > div {
        width:600px !important;
        height:700px !important;
    }

    #play-fridge-overlay > div > img:first-child {
        width:100% !important;
        height:100% !important;
        max-width:none !important;
        object-fit:fill !important;
    }

}

/* =========================================================
   FRISBEE — MOBILE FULLSCREEN
========================================================= */

@media (max-height: 500px) and (orientation: landscape) {

    body.play-mobile-fullscreen
    #backyard-frisbee-game {

        width: 100vw !important;
        max-width: none !important;

        height: 100vh !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    body.play-mobile-fullscreen
    #backyard-frisbee-field {

        width: 100vw !important;
        height: 100vh !important;

        margin: 0 !important;

        border: none !important;
        border-radius: 0 !important;

        box-shadow: none !important;
    }

}

/* =========================================================
   VOIDY DOOR — MOBILE FULLSCREEN
========================================================= */
@media (max-height: 500px) and (orientation: landscape) {  
  
    body.play-mobile-fullscreen  
    #play-voidy-door {  
  
      width: 300px !important;
height: 260px !important;
  
        right: 1% !important;
    }  
}

/* =========================================================
   VOIDY DOOR — DESKTOP FULLSCREEN
========================================================= */

@media (min-height: 501px) {

    main:fullscreen
    #play-voidy-door {

        width: 775px !important;
        height: 825px !important;

        right: -7% !important;
        bottom: 16% !important;
    }
}

@media (max-height: 500px) and (orientation: landscape) {

    body.play-mobile-fullscreen
    .trainer-level-bar {

        display: none !important;
    }
}

/* =========================================
   SWITCH ESSAZLIFE APP POPUP
========================================= */

.switch-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 99999;
}

.switch-overlay.hidden {
    display: none;
}

.switch-popup {
    width: min(90%, 420px);
    background: white;
    border: 2px solid var(
        --user-theme-color,
        #4fb5ae
    );
    border-radius: 20px;
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.25);
}

.switch-popup h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(
        --user-theme-color,
        #4fb5ae
    );
}

.switch-popup p {
    margin-bottom: 20px;
    color: #58686e;
}

.switch-popup button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

#switch-handler-button,
#switch-chorez-button {
    background: var(
        --user-theme-color,
        #4fb5ae
    );
    color: white;
}

#close-switch-button {
    background: #e8e8e8;
    color: #222;
}

.switch-popup button:active {
    transform: scale(0.98);
}

/* =========================================
   PLAYMODE UPDATES
========================================= */

.play-updates-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.65);
}

.play-updates-overlay.hidden {
    display: none !important;
}

.play-updates-popup {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 22px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.play-updates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.play-updates-header h2 {
    margin: 0;
    color: #26343b;
}

#close-updates {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #eeeeee;
    cursor: pointer;
    font-size: 20px;
}

.play-update-post {
    margin-top: 20px;
    padding: 16px;
    background: #f0faf9;
    border-left: 4px solid #4fb5ae;
    border-radius: 12px;
}

.play-update-post h3 {
    margin: 10px 0;
}

.header-buttons {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-buttons button {
    min-width: 38px;
    min-height: 38px;
    padding: 8px;
    font-size: 19px;
}

@media (max-width: 700px) {
    header {
        padding: 10px;
        gap: 8px;
    }

    .app-name {
        font-size: 17px;
        gap: 5px;
    }

    .app-icon {
        width: 35px;
        height: 35px;
    }

    .header-buttons {
        gap: 4px;
    }

    .header-buttons button {
        min-width: 34px;
        min-height: 36px;
        padding: 5px;
        font-size: 17px;
    }
}

.header-buttons #updates-button {
    order: -1 !important;
}