html,body {
    font-family: 'Noto Sans Thai', sans-serif;
    margin:0;
    width:100%;
    padding:0;
    height:100dvh;
	overflow:hidden;
    background: #000;
    display: flex;
    justify-content: center;
}

body{
    overscroll-behavior:none;
    -webkit-overflow-scrolling:touch;
}

img{
    user-select:none;
    -webkit-user-drag:none;
    pointer-events:auto;
}

input {
    font-family: 'Noto Sans Thai', sans-serif;
}

.game {
    position:relative;
    width:100%;
    height:100dvh;
    overflow:hidden;
    aspect-ratio:9/16;
}

.page {
    position: absolute;
    width: 100%;
    height: 100dvh;
    display: none;
}

.page.active {
    display: block;
}

.bg {
    position:absolute;
    width:100%;
    height:100%;
    object-fit:cover;
}

/* START PAGE */
.title {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
}

.desc {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
}

.startBtn {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
}

/* INTRO */
.introText {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
}

/* QUESTION */
.questionImg {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
}

.choices {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 80%;
}

.choices img {
    width: 100%;
}

/* NAV BUTTON */
.btnBack {
    position: absolute;
    bottom: 60px;
    left: 40px;
    width: 110px;
}

.btnNext {
    position: absolute;
    bottom: 60px;
    right: 40px;
    width: 110px;
}

.choice {
    border-radius: 20px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}

.choice.selected {
    border: 3px solid #2596be;
}

img {
    user-select: none;
    -webkit-user-drag: none;
}

.loadingCenter {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
}

.loadingText {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
}

.resultBlur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    transform: scale(1.2);
}

.resultImg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.resultDetailPage {
    cursor: pointer;
}

.resultTopBar {
    position: absolute;
    top: 20px;
    transform: translateX(-50%);
    left: 50%;
    display: flex;
    justify-content: center;
}

.resultSaveBtn,
.resultShareBtn {
    width: 40%;
}

.detailResultImg {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
}

.formPage{
    position:absolute;
    width:100%;
    height:100dvh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
	padding-bottom:80px;
}

.formCard {
    position: relative;
    margin:80px auto;
    width: 80%;
    max-width: 480px;
    background: #fffffff0;
    border-radius: 25px;
    padding: 25px;
}

.formPage .bg{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100dvh;
}

.formTitle {
    text-align: center;
    font-size: 23px;
    font-weight: 600;
    color: #2b2f6a;
}

.formSubtitle {
    font-size: 18px;
    text-align: center;
    margin: 10px 0 20px;
    color: #555;
}

.formFields label {
    display: block;
    margin-top: 15px;
    font-size: 16px;
}

.formFields input {
    width: 92%;
    padding: 10px;
    border-radius: 30px;
    border: 1px solid #ccc;
    margin-top: 6px;
}

.formFields input.error{
    border:2px solid red;
}

.policyText {
    font-size: 12px;
    margin-top: 20px;
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-character;
}

.consentRow {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 15px;
}

.consentText {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-character;
}

.checkboxWrap input {
    display: none;
}

.checkmark {
    width: 30px;
    height: 30px;
    border: 2px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: bold;
}

.checkboxWrap input:checked+.checkmark::after {
    content: "✓";
}

.submitBtn {
    width: 130px;
    display: block;
    margin: 25px auto 15px;
    cursor: pointer;
}

.submitBtn.disabled {
    opacity: 0.5;
}

.btnNext.disabled {
    opacity: 0.5;
    pointer-events: none;
}


.toast{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%) scale(0.9);
    width:130px;
    height:130px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:20px;
    border-radius:20px;
    background:rgba(0,0,0,0.45);
    backdrop-filter:blur(8px);
    color:#fff;
    font-size:18px;
    font-weight:600;
    box-shadow:0 10px 30px rgba(0,0,0,0.3);
    opacity:0;
    transition:all .25s ease;
    z-index:9999;
}

.toast.show{
    opacity:1;
    transform:translate(-50%, -50%) scale(1);
}

.toast.success{
    background:rgba(34,197,94,0.45);
}

.toast.error{
    background:rgba(239,68,68,0.45);
}