/* CSS Reset and Variables */
:root {
    --primary: #3fda0b;
    --background-light: #f6f8f5;
    --background-dark: #142210;
    --white: #ffffff;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Be Vietnam Pro', sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* Utilities mapping */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.h-screen {
    height: 100vh;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.bg-black {
    background-color: var(--black);
}

.overflow-hidden {
    overflow: hidden;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.left-0 {
    left: 0;
}

.w-1\/2 {
    width: 50%;
}

.z-10 {
    z-index: 10;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

.p-10 {
    padding: 2.5rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

/* Colors & Opacity */
.text-primary {
    color: var(--primary);
}

.text-white {
    color: white;
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.8);
}

.text-white-60 {
    color: rgba(255, 255, 255, 0.6);
}

.text-white-40 {
    color: rgba(255, 255, 255, 0.4);
}

.bg-white-10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.bg-white-50 {
    background-color: rgba(255, 255, 255, 0.5);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-red-500 {
    background-color: #ef4444;
}

.border-white-10 {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.opacity-0 {
    opacity: 0;
}

.opacity-10 {
    opacity: 0.1;
}

.opacity-15 {
    opacity: 0.15;
}

.opacity-20 {
    opacity: 0.2;
}

.opacity-75 {
    opacity: 0.75;
}

/* Hover States */
.hover-bg-primary-20:hover {
    background-color: rgba(63, 218, 11, 0.2);
}

.hover-text-primary:hover {
    color: var(--primary);
}

.hover-text-white:hover {
    color: white;
}

.hover-text-red-500:hover {
    color: #ef4444;
}

.group:hover .group-hover-opacity-100 {
    opacity: 1;
}

.hover-translate-x-4:hover {
    transform: translateX(1rem);
}

/* Typography */
.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.font-medium {
    font-weight: 500;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-7xl {
    font-size: 4.5rem;
    line-height: 1;
}

.text-10px {
    font-size: 10px;
}

.text-20px {
    font-size: 20px;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.tracking-wide {
    letter-spacing: 0.025em;
}

.uppercase {
    text-transform: uppercase;
}

.leading-none {
    line-height: 1;
}

.text-right {
    text-align: right;
}

/* Sizing */
.size-10 {
    width: 2.5rem;
    height: 2.5rem;
}

.h-1-5 {
    height: 0.375rem;
}

.w-32 {
    width: 8rem;
}

.w-1-5 {
    width: 0.375rem;
}

.h-10 {
    height: 2.5rem;
}

.h-2 {
    height: 0.5rem;
}

.w-2 {
    width: 0.5rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Transforms */
.scale-105 {
    transform: scale(1.05);
}

.scale-75 {
    transform: scale(0.75);
}

.scale-50 {
    transform: scale(0.5);
}

.-rotate-12 {
    transform: rotate(-12deg);
}

.rotate-6 {
    transform: rotate(6deg);
}

.-rotate-45 {
    transform: rotate(-45deg);
}

.pointer-events-none {
    pointer-events: none;
}

/* Transitions */
.transition-all {
    transition-property: transform, opacity, color, background-color, border-color, box-shadow, filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Background Specifics */
.bg-cover {
    background-size: cover;
}

.bg-center {
    background-position: center;
}

/* Custom Overlays from Design */
.bg-gradient-to-t {
    background-image: linear-gradient(to top, var(--background-dark), transparent, rgba(20, 34, 16, 0.5));
}

.fog-overlay {
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(20, 34, 16, 0.4) 100%);
    backdrop-filter: blur(1px);
}

.menu-gradient {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

/* Custom Text Effects */
.stone-text {
    letter-spacing: 0.15em;
    color: #d1d5db;
    text-shadow:
        2px 2px 0px #2c3928,
        4px 4px 0px #1a2418,
        6px 6px 12px rgba(0, 0, 0, 0.8);
    filter: contrast(1.2) brightness(0.9);
}

.drop-shadow-2xl {
    filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15));
}

.drop-shadow-md {
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07));
}

/* Animations */
@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes studioGlow {

    0%,
    100% {
        text-shadow: 0 0 5px rgba(63, 218, 11, 0.3), 0 0 10px rgba(63, 218, 11, 0.2);
        opacity: 0.8;
    }

    50% {
        text-shadow: 0 0 10px rgba(63, 218, 11, 0.6), 0 0 20px rgba(63, 218, 11, 0.4), 0 0 30px rgba(63, 218, 11, 0.2);
        opacity: 1;
    }
}

.studio-name-animated {
    animation: studioGlow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.studio-name-animated:hover {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(63, 218, 11, 0.8), 0 0 30px rgba(63, 218, 11, 0.5);
}

/* Landing Page Specifics */
.landing-page {
    font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
}

.vignette {
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.6);
}

.cinematic-overlay {
    background: linear-gradient(to bottom, rgba(24, 33, 17, 0.4) 0%, rgba(24, 33, 17, 0) 20%, rgba(24, 33, 17, 0) 80%, rgba(24, 33, 17, 0.9) 100%);
}

/* Additional Utilities for Landing Page */
.bg-no-repeat {
    background-repeat: no-repeat;
}

.z-0 {
    z-index: 0;
}

.z-20 {
    z-index: 20;
}

.flex-1 {
    flex: 1 1 0%;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.px-12 {
    padding-left: 3rem;
    padding-right: 3rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-1-5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mt-0 {
    margin-top: 0;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Colors */
.bg-primary-5 {
    background-color: rgba(63, 218, 11, 0.05);
}

.bg-primary-10 {
    background-color: rgba(63, 218, 11, 0.1);
}

.bg-primary-20 {
    background-color: rgba(63, 218, 11, 0.2);
}

.bg-primary-30 {
    background-color: rgba(63, 218, 11, 0.3);
}

.border-primary-20 {
    border-color: rgba(63, 218, 11, 0.2);
}

.border-primary-30 {
    border-color: rgba(63, 218, 11, 0.3);
}

.text-primary-60 {
    color: rgba(63, 218, 11, 0.6);
}

.bg-background-dark-60 {
    background-color: rgba(20, 34, 16, 0.6);
}

/* Colors - Additional */
.bg-red-500-10 {
    background-color: rgba(239, 68, 68, 0.1);
}

.border-red-500-20 {
    border-color: rgba(239, 68, 68, 0.2);
}

.text-white-60 {
    color: rgba(255, 255, 255, 0.6);
}

/* Typography - Additional */
.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.px-16 {
    padding-left: 4rem;
    padding-right: 4rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.pt-12 {
    padding-top: 3rem;
}

.space-y-8> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(2rem * var(--tw-space-y-reverse));
}

@media (min-width: 768px) {
    .md-text-9xl {
        font-size: 8rem;
        line-height: 1;
    }

    .md-text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}


.bg-background-dark-80 {
    background-color: rgba(20, 34, 16, 0.8);
}

.bg-black-40 {
    background-color: rgba(0, 0, 0, 0.4);
}

.bg-white-5 {
    background-color: rgba(255, 255, 255, 0.05);
}

.border-white-5 {
    border-color: rgba(255, 255, 255, 0.05);
}

.text-red-500-80 {
    color: rgba(239, 68, 68, 0.8);
}

/* Typography */
.font-sans {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-tighter {
    letter-spacing: -0.05em;
}

.leading-relaxed {
    line-height: 1.625;
}

.leading-tight {
    line-height: 1.25;
}

/* Effects */
.backdrop-blur-1px {
    backdrop-filter: blur(1px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.shadow-primary-glow {
    box-shadow: 0 0 20px rgba(63, 218, 11, 0.4);
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md-text-8xl {
        font-size: 6rem;
        line-height: 1;
    }
}

/* Sizing */
.max-w-sm {
    max-width: 24rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-280px {
    max-width: 280px;
}

.w-12pct {
    width: 12%;
}

.px-1-5 {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

.py-0-5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.border-white-20 {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Transitions */
.hover-scale-105:hover {
    transform: scale(1.05);
}

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

.group-hover-translate-x-1 {
    transform: translateX(0.25rem);
}

.hidden {
    display: none;
}

.inline-block {
    display: inline-block;
}



/* Media Queries */
@media (min-width: 768px) {
    .md-text-9xl {
        font-size: 8rem;
        line-height: 1;
    }

    .md-flex-row {
        flex-direction: row;
    }

    .md-items-center {
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .lg-p-20 {
        padding: 5rem;
    }
}

/* Button Reset */
button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

a {
    text-decoration: none;
    cursor: pointer;
}

/* Main-menu shop */
.shop-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(7px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.shop-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.shop-panel {
    position: relative;
    width: min(640px, 100%);
    padding: 36px;
    border: 1px solid rgba(63, 218, 11, 0.45);
    border-radius: 20px;
    color: white;
    background: linear-gradient(145deg, rgba(20, 34, 16, 0.98), rgba(7, 13, 6, 0.98));
    box-shadow: 0 0 60px rgba(63, 218, 11, 0.18), 0 24px 80px rgba(0, 0, 0, 0.65);
    transform: translateY(12px) scale(0.98);
    transition: transform 180ms ease;
}

.shop-modal.is-open .shop-panel {
    transform: translateY(0) scale(1);
}

.shop-close-button {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.06);
}

.shop-close-button:hover {
    color: white;
    border-color: rgba(63, 218, 11, 0.65);
}

.shop-heading-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 14px;
    color: var(--primary);
    background: rgba(63, 218, 11, 0.12);
    box-shadow: 0 0 24px rgba(63, 218, 11, 0.18);
}

.shop-heading-icon .material-symbols-outlined {
    font-size: 34px;
}

.shop-panel h2 {
    font-size: 30px;
    letter-spacing: 0.12em;
}

.shop-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(103, 232, 249, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(103, 232, 249, 0.08);
}

.shop-balance .material-symbols-outlined,
.shop-balance strong {
    color: #67e8f9;
}

.shop-item-card {
    display: grid;
    grid-template-columns: 78px 1fr auto;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
}

.shop-item-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(234, 179, 8, 0.42);
    border-radius: 50%;
    color: #fde68a;
    background: repeating-linear-gradient(45deg, rgba(234, 179, 8, 0.12) 0 3px, transparent 3px 10px);
}

.shop-item-icon .material-symbols-outlined {
    font-size: 42px;
}

.shop-item-info h3 {
    font-size: 22px;
    letter-spacing: 0.08em;
}

.shop-item-info p {
    margin: 7px 0 10px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
}

.shop-item-info > span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.shop-item-info strong {
    color: #fde68a;
}

.shop-buy-button {
    min-width: 116px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 16px;
    border-radius: 11px;
    color: #10200c;
    font-weight: 900;
    background: var(--primary);
    box-shadow: 0 0 20px rgba(63, 218, 11, 0.25);
    transition: transform 150ms ease, opacity 150ms ease;
}

.shop-buy-button:hover:not(:disabled) {
    transform: scale(1.04);
}

.shop-buy-button:disabled {
    cursor: not-allowed;
    opacity: 0.38;
    box-shadow: none;
}

.shop-buy-button .material-symbols-outlined {
    font-size: 19px;
    color: #075985;
}

.shop-status {
    min-height: 22px;
    margin-top: 14px;
    color: #a7f3d0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.shop-status.is-error {
    color: #fca5a5;
}

.enclosure-confirm-panel {
    max-width: 520px;
    text-align: center;
}

.enclosure-heading-icon {
    margin-right: auto;
    margin-left: auto;
    color: #fde68a;
    background: rgba(253, 230, 138, 0.1);
    box-shadow: 0 0 26px rgba(253, 230, 138, 0.15);
}

.enclosure-confirm-copy {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    line-height: 1.7;
}

.enclosure-captured-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 9px 14px;
    border: 1px solid rgba(253, 230, 138, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(253, 230, 138, 0.06);
}

.enclosure-captured-summary .material-symbols-outlined,
.enclosure-captured-summary strong {
    color: #fde68a;
}

.enclosure-confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.enclosure-cancel-button,
.enclosure-enter-button {
    flex: 1;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.enclosure-cancel-button {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
}

.enclosure-cancel-button:hover {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.enclosure-enter-button {
    color: #10200c;
    background: var(--primary);
    box-shadow: 0 0 22px rgba(63, 218, 11, 0.25);
}

.enclosure-enter-button:hover {
    transform: scale(1.035);
}

@media (max-width: 640px) {
    .shop-panel {
        padding: 28px 20px;
    }

    .shop-item-card {
        grid-template-columns: 64px 1fr;
    }

    .shop-item-icon {
        width: 60px;
        height: 60px;
    }

    .shop-buy-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .enclosure-confirm-actions {
        flex-direction: column-reverse;
    }
}

/* Specific Positions */
.top-1-4 {
    top: 25%;
}

.right-1-4 {
    right: 25%;
}

.top-20pct {
    top: 20%;
}

.right-22pct {
    right: 22%;
}

.top-28pct {
    top: 28%;
}

.right-28pct {
    right: 28%;
}

/* Mobile viewport foundation */
.home-screen,
.landing-screen {
    height: 100vh;
    height: 100dvh;
}

@media (max-width: 767px), (pointer: coarse), (hover: none), (max-aspect-ratio: 3/4), (max-height: 500px) and (orientation: landscape) {
    html,
    body {
        width: 100%;
        min-height: 100%;
        overflow-x: hidden;
    }

    button,
    a {
        -webkit-tap-highlight-color: transparent;
    }

    .home-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 8px;
        height: 100%;
        justify-content: stretch !important;
        padding:
            max(12px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left)) !important;
    }

    .home-header {
        align-items: center !important;
        min-height: 44px;
    }

    .home-header > div:first-child {
        gap: 6px !important;
    }

    .home-header > div:first-child .studio-name-animated {
        display: none;
    }

    .home-header > div:last-child {
        gap: 6px !important;
    }

    .home-header > div:last-child > button:not(.mobile-display-button):not(:last-child) {
        display: none;
    }

    .home-header button,
    .home-header > div:last-child > div {
        min-width: 44px;
        min-height: 44px;
    }

    .home-main {
        align-self: stretch;
        min-height: 0;
        max-width: none !important;
        gap: clamp(10px, 2.2vh, 22px) !important;
        justify-content: center;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 6px 0;
        scrollbar-width: none;
    }

    .home-main::-webkit-scrollbar {
        display: none;
    }

    .home-main h1 {
        font-size: clamp(2.8rem, 16vw, 4.6rem) !important;
    }

    .home-main .h-1-5 {
        width: 82px !important;
        margin-top: 10px !important;
    }

    .home-nav {
        gap: clamp(2px, 0.8vh, 8px) !important;
    }

    .home-nav button {
        min-height: 44px;
        gap: 10px !important;
    }

    .home-nav button > div {
        height: 28px !important;
    }

    .home-nav button > span:not(.material-symbols-outlined) {
        font-size: clamp(1.15rem, 5.4vw, 1.55rem) !important;
    }

    #home-footer {
        min-height: 44px;
        flex-direction: row !important;
        align-items: center !important;
        padding-top: 8px !important;
        gap: 8px !important;
    }

    #home-footer > div:first-child {
        display: none;
    }

    #home-footer > div:last-child {
        width: 100%;
        justify-content: space-between;
        gap: 12px !important;
    }

    #intro-overlay h1 {
        font-size: clamp(3.2rem, 18vw, 5.5rem) !important;
    }

    #intro-text {
        font-size: clamp(18px, 7vw, 26px) !important;
    }

    #autoplay-overlay > div {
        width: 100%;
        padding: 20px;
        text-align: center;
    }

    #autoplay-overlay p {
        max-width: 320px;
        margin: 0 auto;
        font-size: clamp(15px, 4.5vw, 19px) !important;
        line-height: 1.55;
        letter-spacing: .08em !important;
    }

    #autoplay-overlay .material-symbols-outlined {
        font-size: 44px !important;
    }

    .shop-modal {
        padding:
            max(12px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    .shop-panel {
        width: min(100%, 480px);
        max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .shop-close-button,
    .shop-buy-button,
    .enclosure-cancel-button,
    .enclosure-enter-button {
        min-height: 44px;
    }

    .landing-screen {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-content: stretch;
        justify-content: stretch !important;
    }

    .landing-header {
        min-width: 0;
        gap: 10px;
        padding:
            max(10px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            8px
            max(12px, env(safe-area-inset-left)) !important;
    }

    .landing-header > div:first-child {
        min-width: 0;
        gap: 8px !important;
    }

    .landing-header > div:first-child > div:first-child {
        flex: 0 0 auto;
        padding: 6px !important;
    }

    .landing-header h1 {
        font-size: clamp(12px, 3.7vw, 16px) !important;
        line-height: 1.25;
    }

    .landing-header > div:last-child {
        flex: 0 0 auto;
    }

    .landing-header > div:last-child > div {
        height: 44px !important;
        padding: 0 9px !important;
    }

    .landing-header > div:last-child > div > span:nth-child(2) {
        display: none;
    }

    .landing-header button {
        width: 44px;
        height: 44px;
        padding: 0 !important;
        display: grid;
        place-items: center;
    }

    .landing-main {
        min-height: 0;
        justify-content: center;
        padding: 6px max(14px, env(safe-area-inset-left)) !important;
        overflow: hidden;
    }

    .landing-content {
        width: min(100%, 640px);
        max-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(8px, 1.5vh, 16px);
    }

    .landing-content > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .landing-content h2 {
        font-size: clamp(2.35rem, 12vw, 4.25rem) !important;
        line-height: 1;
    }

    #landing-story-card {
        width: 100%;
        min-height: 0 !important;
        max-height: min(28dvh, 190px);
        padding: clamp(12px, 4vw, 20px) !important;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    #landing-story-card p {
        font-size: clamp(14px, 4vw, 17px) !important;
        line-height: 1.65;
    }

    .landing-action {
        width: 100%;
        padding-top: 0 !important;
    }

    #start-journey-btn {
        width: min(100%, 320px);
        min-height: 52px;
        padding: 12px 24px !important;
        font-size: 18px !important;
    }

    .landing-footer {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center !important;
        gap: 8px;
        padding:
            8px
            max(12px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left)) !important;
    }

    .landing-footer > div {
        min-width: 0;
        padding: 8px 10px !important;
        gap: 8px !important;
    }

    .landing-footer > div:first-child > div:first-child,
    .landing-footer > div:first-child span:first-child {
        flex: 0 0 auto;
    }

    .landing-footer > div:first-child span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .landing-footer > div:last-child span:last-child {
        display: none;
    }

    .landing-location {
        display: none;
    }
}

@media (max-width: 767px) and (max-height: 700px) {
    .home-layout {
        gap: 4px;
        padding-top: max(8px, env(safe-area-inset-top)) !important;
        padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
    }

    .home-main {
        justify-content: flex-start;
    }

    .home-main h1 {
        font-size: clamp(2.35rem, 13vw, 3.5rem) !important;
    }

    .home-nav button {
        min-height: 44px;
    }

    .landing-content {
        gap: 7px;
    }

    .landing-content h2 {
        font-size: clamp(2rem, 10vw, 3rem) !important;
    }

    #landing-story-card {
        max-height: 148px;
    }
}

@media (max-height: 500px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
    .home-layout {
        grid-template-columns: minmax(110px, 0.7fr) minmax(260px, 1.3fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .home-header {
        grid-column: 1 / -1;
    }

    .home-main {
        display: grid !important;
        grid-template-columns: minmax(150px, 0.75fr) minmax(250px, 1.25fr);
        align-items: center;
    }

    #home-footer {
        display: none !important;
    }

    .landing-screen {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .landing-main {
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    }

    .landing-content {
        display: grid;
        grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.2fr);
        grid-template-rows: auto auto 1fr;
        gap: 8px 16px;
    }

    .landing-content > div:first-child,
    .landing-content h2 {
        grid-column: 1;
    }

    #landing-story-card {
        grid-column: 2;
        grid-row: 1 / span 2;
        max-height: 42dvh;
    }

    .landing-action {
        grid-column: 2;
        grid-row: 3;
    }

    .landing-footer {
        display: none !important;
    }
}
