html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#app-root {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: url("../assets/images/store-bg.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

@media (max-aspect-ratio: 1/1) {
    
    body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    #app-root {
        position: absolute;
        top: 100%;
        width: 100vh;
        height: 100vw;
        transform: rotate(-90deg);
        transform-origin: top left;
        padding-top: env(safe-area-inset-top);
    }

    .bubble-text,
    .bubble-me-text {
        font-size: clamp(14.5px, 2.8vw, 18px) !important;
    }

    .receipt p,
    .price {
        font-size: clamp(14.5px, 2.8vw, 18px) !important;
    }

    .credit-section {
        font-size: clamp(13px, 2.8vw, 18px) !important;
    }

    #sound {
        position: fixed;
        left: 88%;
    }

    #primary-b {
        font-size: 3vw !important;
    }

    .remove-btn {
        font-size: 3.5vw !important;
    }
}

.popup {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credit {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#credit img {
    position: absolute;
    bottom: 0;
    width: 52%;
    display: flex;
    left: 24%;
    z-index: 1;
}

.credit-section {
    position: absolute;
    z-index: 2;
    bottom: 0;
    width: 42%;
    left: 29.5%;
    top: 25%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 3vh;
    font-family: "Jersey 15", sans-serif;
    font-size: 1.8vw;
    line-height: 1.4;
    color: #110f0e;
}

a {
  color: #2d2d2d;
}

#wrapper {
    position: relative;
    width: 100%;
}

#popup-content {
    position: relative;
    width: 65%;
}

#big-table {
    position: absolute;
    top: 15%;
    left: 6.2%;
    width: 90%;
    display: flex;
    flex-wrap: nowrap;
    gap: 2%;
    z-index: 2;
    height: 68%;
}

#popup-content img {
    width: 100%;
    display: block;
}

#cal-container {
    position: relative;
    text-align: right;
    font-family: "Jersey 15", sans-serif;
    line-height: 1.4;
    color: #110f0e;
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    height: 100%
}

.receipt {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding-left: 0.2rem;
}

.receipt p {
    margin: 0.3em;
    overflow-wrap: anywhere;
    color: #3a410b;
    font-size: 2.2vw;
    line-height: 0.8;
}

.price {
    margin: 0px;
    text-align: right; 
    color: #3a410b;
    font-size: 2.3vw;  
}

.menuname {
    text-align: left;    
}

.totaltitle {
    text-align: left;
}

#submit-container {
    border-top: 3px solid #878b6a;
    display: grid;
    gap: 0.2rem;
    margin-left: 0.3em;
    flex-shrink: 0;
}

#list-container {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    min-height: 0;
}

#tablet-grid {
    width: 94%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2%;
}

.grid-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c5c7b1;
}

.grid-cell img {
    cursor: pointer;
}

.grid-cell img:hover {
    transform: scale(1.08);
}

.grid-cell img:active {
    transform: scale(1.15);
}

.hidden {
    display: none;
}

.scene {
    position: absolute;
    bottom: 0;
    width: 100%;
}

#desk {
    position: relative;
    width: 100%;
    height: auto;
    display: block;
    z-index: 2;
}

#cmachine {
    position: absolute;
    bottom: 62%;
    left: 10%;
    z-index: 3;
    width: 30%;
    cursor: pointer;
}

#tab {
    position: absolute;
    bottom: 62%;
    left: 45%;
    z-index: 3;
    width: 25%;
    cursor: pointer;
}

#info {
    position: absolute;
    bottom: 5%;
    left: 1%;
    z-index: 3;
    width: 4%;
    cursor: pointer;
}

#sound {
    position: absolute;
    bottom: 5%;
    right: 1%;
    z-index: 3;
    width: 4%;
    cursor: pointer;
}

#action-alert {
    position: absolute;
    bottom: 150%;
    left: 57%;
    z-index: 3;
    width: 4%;
    animation: float 1s ease-in-out infinite;
}

#info-panel {
    position: absolute;
    bottom: 0%;
    left: 25%;
    z-index: 0;
    width: 50%;
}

#penguin {
    position: absolute;
    bottom: 70%;
    left: 60%;
    width: 30%;
    z-index: 1;
    cursor: pointer;
}

#bubble {
    position: absolute;
    bottom: 60%;
    left: 17%;
    width: 45%;
    z-index: 3;
    cursor: pointer;
}

#bip {
    position: absolute;
    bottom: 15%;
    right: 19%;
    width: 4%;
    animation: float 1.5s ease-in-out infinite ;
}

.bubble-img {
    width: 100%;
}

.bubble-text {
    position: absolute;
    top: 8%;
    left: 7%;
    width: 62%;
    text-align: left;
    font-family: "Jersey 15", sans-serif;
    font-size: 2.1vw;
    line-height: 1.3;
    color: #110f0e;
    word-wrap: break-word;
    user-select: none;
}

#bubble-me {
    position: absolute;
    z-index: 3;
    width: 20%;
    bottom: 5%;
    right: 10%;
}

.bubble-me-text {
    position: absolute;
    bottom: 48%;
    left: 20%;
    width: 80%;
    text-align: left;
    font-family: "Jersey 15", sans-serif;
    font-size: 2.1vw;
    line-height: 1;
    color: #110f0e;
    word-wrap: break-word;
    user-select: none;
}

.bubble-me-img {
    width: 100%;
}

#bip-2 {
    position: absolute;
    bottom: 52%;
    right: 8%;
    width: 7%;
    animation: float 1.5s ease-in-out infinite ;
}

#open {
    position: absolute;
    top: 12%;
    right: 14%;
    z-index: 3;
    cursor: pointer;
    width: 12%;
    filter: drop-shadow(0 0 10px rgba(133, 255, 114, 0.7));
}

#open.float {
    animation: float 2s ease-in-out infinite;
}

#order-coffee {
    position: absolute;
    bottom: 55%;
    right: 0%;
    width: 20%;
    z-index: 3;
}

#order-cheese {
    position: absolute;
    bottom: 50%;
    right: 12%;
    width: 16%;
    z-index: 3;
}

#start {
    position: fixed;
    inset: 0;
    background: #00000080;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    pointer-events: auto;
}

#start p {
    color: white;
    font-size: 5vw;
    font-family: "Jersey 15", sans-serif;
    animation: pulse 3s infinite;
}

#bip {
    position: absolute;
    bottom: 15%;
    right: 19%;
    width: 4%;
    animation: float 1.5s ease-in-out infinite ;
}

#primary-b {
    padding: 0.4rem 1rem;
    background-color: #3a410b;
    color: #fff;
    font-family: "Jersey 15", sans-serif;
    font-size: 2vw;
    border: none;
    cursor: pointer;
    width: fit-content;
    justify-self: end;
}

#primary-b:hover {
    background-color: #515a0e;
    transform: scale(1.05);
}

#primary-b:active {
    transform: scale(0.95);
}

#primary-b:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.remove-btn {
    background-color: transparent;
    color: #3a410b;
    font-family: "Jersey 15", sans-serif;
    font-size: 2vw;
    border: none;
    cursor: pointer;
    padding-left: 0.8em;
    padding-right: 0.8em;
    padding-bottom: 0.3em;
    padding-top: 0.3em;
}

.remove-btn:hover {
    background-color: #9a9e7c;
    transform: scale(1.05);
}

.remove-btn:active {
    transform: scale(0.95);
}

.shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

@keyframes float {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-3px); }
  40%  { transform: translateX(3px); }
  60%  { transform: translateX(-2px); }
  80%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}