@font-face {
    font-family: Fredoka;
    src: url("Fredoka-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-display: swap;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #0b1514; }
[hidden] { display: none !important; }

#minigolf-frame { position: fixed; inset: 0; isolation: isolate; }
#minigolf-frame:fullscreen { width: 100%; height: 100%; }
#minigolf-frame:-webkit-full-screen { width: 100%; height: 100%; }
#unity-canvas { display: block; width: 100%; height: 100%; border: 0; outline: 0; touch-action: none; }

#unity-loading-bar {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(ellipse at 48% 32%, #829f49, #4e6d35 80%);
    color: #fff2d5;
    font-family: Fredoka, "Trebuchet MS", sans-serif;
    text-align: center;
}
.loading-card { width: min(100%, 34rem); padding: 18px 20px; }
.loading-card h1 {
    font-size: clamp(4rem, 12vmin, 7rem);
    font-weight: 600;
    line-height: 1;
    margin: 0 0 24px;
    letter-spacing: .005em;
    text-shadow: 0 .065em #344f30, 0 .09em .08em #24382480;
}
#load-status { font-size: clamp(1rem, 3vmin, 1.35rem); margin: 12px auto 0; }
#load-hint { font-size: clamp(.85rem, 2.8vmin, 1.15rem); margin: 12px auto 0; }
#load-progress {
    appearance: none;
    display: block;
    margin: 0 auto;
    width: min(100%, 19rem);
    height: 14px;
    padding: 2px;
    overflow: hidden;
    border: 1px solid #fff2d590;
    border-radius: 20px;
    background: #2b482b;
    color: #ffd16f;
}
#load-progress::-webkit-progress-bar { border-radius: 20px; background: transparent; }
#load-progress::-webkit-progress-value { border-radius: 20px; background: #ffd16f; }
#load-progress::-moz-progress-bar { border-radius: 20px; background: #ffd16f; }
#load-progress:indeterminate { opacity: .8; }
@media (max-height: 450px) {
    .loading-card h1 { margin-bottom: 12px; font-size: clamp(3rem, 11vmin, 5rem); }
}
#load-retry {
    margin-top: 16px;
    padding: 9px 24px;
    border: 0;
    border-radius: 11px;
    font: inherit;
    color: #244230;
    background: #fff5dc;
    cursor: pointer;
}

#game-fullscreen {
    position: absolute;
    padding: 0;
    border: 0;
    border-radius: 24%;
    background: #fff6df;
    color: #1a3024;
    box-shadow: 0 0.075em 0 #24382350;
    display: grid;
    place-items: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 100ms ease, background-color 100ms ease;
}
#game-fullscreen::before { content: ""; position: absolute; inset: calc(-1 * var(--hit-pad-y, 5px)) -2px; }
#game-fullscreen img { display: block; width: 54%; height: 54%; pointer-events: none; }
#game-fullscreen .exit, #game-fullscreen[aria-pressed="true"] .enter { display: none; }
#game-fullscreen[aria-pressed="true"] .exit { display: block; }
@media (hover: hover) {
    #game-fullscreen:hover { transform: translateY(-2px) scale(1.05); background: #ffebc9; }
}
#game-fullscreen:active { transform: translateY(1px) scale(.94); background: #eedfbb; }
#game-fullscreen:focus-visible, #load-retry:focus-visible { outline: 2px solid #ffd16f; outline-offset: 2px; }
#game-warning {
    position: absolute;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 8px 15px;
    border-radius: 11px;
    color: #fff6df;
    background: #274233;
    font: 600 16px/1.4 Fredoka, sans-serif;
    text-align: center;
    pointer-events: none;
}
