

@font-face {
    font-family: "ABCSolar";
    src: url("./font/ABCSolar-NormalRegular.woff") format("woff"),
         url("./font/ABCSolar-NormalRegular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ABCSolar";
    src: url("./font/ABCSolar-NormalRegularItalic.woff") format("woff"),
         url("./font/ABCSolar-NormalRegularItalic.otf") format("opentype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
}

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

*, *::before, *::after {
    box-sizing: border-box;
}

#app {
    position: relative;
    width: 100vw;
    /* Use dynamic viewport units to avoid mobile Safari top/bottom gaps */
    height: 100vh;      /* fallback */
    height: 100dvh;     /* modern dynamic viewport */
    min-height: 100svh; /* Safari small viewport units */
    overflow: hidden;
}

#background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

canvas {
    display: block;
    margin: 0;
    padding: 0;
}

/* Ensure Phaser canvas receives touch input on iOS */
#game-container canvas {
    pointer-events: auto;
    touch-action: none;
}

/* Prevent Phaser DOM overlay from intercepting touches */
.phaser-dom {
    pointer-events: none;
}

.text {
    pointer-events: none !important;
    color: #FFE500;
    font-family: "ABCSolar", "Arial Narrow", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.1;
    text-align: center;
    -webkit-text-stroke: 0.15em #000;
    paint-order: stroke fill;
    /* text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); */
    max-width: 90vw;
    margin: 0;
    padding: 0.2em 0.4em;
    box-sizing: border-box;
    white-space: normal;
    touch-action: none;
    user-select: none;
    letter-spacing: 0.05em;
}

.reponse {
    color: #ffffff;
    cursor: pointer;
}

.response {
    color: #ffffff;
    /* -webkit-text-stroke: 0.15em #000; */
}

.tarte-counter {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 300px;
    pointer-events: none;
    user-select: none;
}

.tarte-sprite {
    width: clamp(32px, 5vw, 48px);
    height: clamp(32px, 5vw, 48px);
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.choices-row {
    display: flex;
    gap: clamp(12px, 3vw, 64px);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 90vw;
    pointer-events: auto;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8vh;
    z-index: 9999;
}

.choices-row .choice {
    pointer-events: auto;
    touch-action: manipulation;
    white-space: nowrap;
    text-align: center;
}

.button {
    border: solid 0.075em #000;
    border-radius: 1em;
    background: #ffffff51;
    backdrop-filter: blur(10px);
    cursor: pointer;
    pointer-events: auto !important;
}

.buttonHeuu {
    border: solid 0.075em #000;
    border-radius: 1em;
    background: #ffffff51;
    backdrop-filter: blur(10px);
    cursor: pointer;
    /* pointer-events: all !important; */
}

/* ============= POEME ================ */

.poeme-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* overflow: hidden; */
    pointer-events: none;
}

.poeme-strophe {
    text-align: center;
    font-size: clamp(24px, 3vw, 40px);
    position: relative;
    left: 0vw;
    /* transition: 1s; */
    white-space: normal;
    overflow: visible;
    will-change: transform;
    transform-origin: center;
}





/* ============= MEDIA QUERIES ================ */

@media (max-width: 640px) {
    .choices-row {
        flex-direction: column;
        gap: 10px;
    }
}