:root{--auth-paper:url("camp_auth_clean_paper.webp") center/100% 100% no-repeat;}
* {box-sizing:border-box}
body{margin:0;background:#b5d876;color:#58320d;font-family:"Microsoft JhengHei",system-ui,sans-serif}
.game-scene{position:relative;width:min(100%,760px);margin:0 auto;background-position:center;background-size:100% 100%;background-repeat:no-repeat}
.game-signin{aspect-ratio:1122/1402;background-image:url("camp_login_original.webp")}
.game-signup{aspect-ratio:1024/1536;background-image:url("camp_signup_original.webp")}
.hotspot,.login-input{position:absolute;border:0;background:transparent;color:#57300c;text-decoration:none}
.hotspot{cursor:pointer}
.hotspot:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7949ba;outline-offset:2px;border-radius:8px}
.hotspot:hover{box-shadow:inset 0 0 0 2px #fff4b7;border-radius:18px}
input,select,button{font:inherit}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.login-email-label{position:absolute;left:13.4%;top:31.65%;width:46%;height:3%;background:#fff0ce var(--auth-paper);font-size:clamp(16px,3.05vw,29px);font-weight:800}
.login-input{left:20.5%;width:65%;height:4.75%;font-size:clamp(16px,2.75vw,26px);padding:0 4px}
.login-email{top:36.05%}.login-password{top:47.65%}
.login-eye{left:15.2%;top:47.9%;width:4.6%;height:4.3%}
.remember-check,.agree-check{position:absolute;cursor:pointer}
.remember-check{left:13.5%;top:55.25%;width:20%;height:3.1%}
.agree-check{left:12.8%;top:71.1%;width:14%;height:2.6%}
.remember-check input,.agree-check input{position:absolute;left:0;top:0;width:18%;height:95%;opacity:0;margin:0;cursor:pointer}
.agree-check input{width:25%}
.checked-mark{display:none;position:absolute;left:1%;top:-6%;font-size:clamp(18px,3.5vw,32px);font-weight:900;pointer-events:none}
input:checked+.checked-mark{display:block}
.remember-check:has(:focus-visible),.agree-check:has(:focus-visible){outline:3px solid #7949ba}
.forgot-link{left:70.5%;top:55.1%;width:17%;height:3.7%}
.signup-link{left:55.7%;top:84.7%;width:9%;height:3.8%}
.game-signin .submit-button{left:12%;top:60%;width:76%;height:7.7%}
.game-signin .google-button{left:12%;top:74.2%;width:37%;height:7.9%}
.game-signin .facebook-button{left:50.5%;top:74.2%;width:37.5%;height:7.9%}
.signup-fields{position:absolute;left:12.2%;top:24.25%;width:75.6%;height:45.9%;background:#fff0cd var(--auth-paper);color:#4a260a}
.signup-fields label{position:absolute;font-weight:800;font-size:clamp(16px,3vw,27px);line-height:1.2}
.name-label{left:0;top:0}.gender-label{left:66%;top:0}.email-label{left:0;top:17.2%}.code-label{left:0;top:34.2%}.password-label{left:0;top:51.4%}
.game-field{position:absolute;left:0;width:100%;height:9%;background:#ffefce url("camp_original_field.webp") center/100% 100% no-repeat;border-radius:17px;display:flex;align-items:center;padding:4px 13px;gap:6px}
.name-field{top:6.7%}.email-field{top:23.7%}.code-field{top:40.7%}.password-field{top:57.7%}
.game-field input,.game-field select{min-width:0;border:0;background:transparent;color:#56330f;padding:2px 4px;font-size:clamp(16px,2.5vw,23px);height:100%;width:100%}
.name-field input{flex:1}.name-field select{width:32%;border-left:1px solid #b98e50;border-radius:0}
.field-symbol{color:#805723;font-size:clamp(20px,3vw,29px)}
.wood-button{border:1px solid #b27531;background:#ac692c url("camp_original_wood.webp") center/100% 100%;color:#fff7d9;font-weight:800;padding:8px 12px;border-radius:12px;box-shadow:inset 0 1px 2px #ffe7ac,0 2px 3px #77430b55;cursor:pointer;white-space:nowrap;font-size:clamp(12px,1.95vw,17px)}
.password-eye{border:0;background:transparent;cursor:pointer;color:#805723;font-size:clamp(12px,2vw,17px);padding:3px}
.register-help{position:absolute;left:2%;top:71%;margin:0;font-size:clamp(13px,2.5vw,21px);line-height:1.8;color:#79552f}
.game-signup .terms-link{left:28.5%;top:71%;width:12.7%;height:2.8%}
.game-signup .privacy-link{left:44.7%;top:71%;width:16%;height:2.8%}
.game-signup .submit-button{left:11.9%;top:75.1%;width:76.2%;height:5.8%}
.game-signup .google-button{left:11.9%;top:85.3%;width:37%;height:5.9%}
.game-signup .facebook-button{left:50.8%;top:85.3%;width:37%;height:5.9%}
.feedback{position:absolute;left:13%;width:74%;margin:0;padding:5px 10px;border-radius:9px;background:#fff0cd;white-space:normal;line-height:1.5;font-size:clamp(13px,2.2vw,18px);z-index:2;color:#2d6418}
.feedback:empty{display:none}.feedback.error{color:#a22d1d}.game-signin .feedback{top:68.1%;max-height:6%;overflow:auto}.game-signup .feedback{top:65%;max-height:5.4%;overflow:auto}
button:disabled{cursor:wait;opacity:.7}
.back-login{width:min(100%,760px);margin:0 auto;padding:10px 15px;background:#fff0cd;text-align:center}
.back-login a{color:#7426bd}
dialog{width:min(92vw,430px);border:3px solid #b57c38;border-radius:20px;background:#fff0cd;color:#57320f;padding:22px;box-shadow:0 8px 24px #37260955}
dialog::backdrop{background:#273f1c88}
dialog h2{margin:0 0 10px;font-size:23px}dialog p{line-height:1.7}
@media(max-width:400px){.game-field{padding-inline:7px;gap:2px}.wood-button{padding:7px 5px}.field-symbol{display:none}.signup-fields label{font-size:16px}}

.name-field input{padding-left:29px}.email-field{background-image:url("camp_original_email_field.webp")}.email-field input,.code-field input{padding-left:30px}.code-field{background-image:url("camp_original_email_field.webp")}.password-field{background-image:url("camp_original_password_field.webp")}.password-eye{width:30px;flex-shrink:0;font-size:0}.password-eye[aria-pressed="true"]{box-shadow:inset 0 0 0 1px #9a7c49;background:#ffedc8}.password-eye[aria-pressed="true"]::after{content:"隱藏";font-size:12px}

/* Keep labels on the opaque parchment layer, above the image artwork. */
.signup-fields { isolation:isolate; }
.signup-fields label { z-index:2; margin:0; padding:0; background:transparent; white-space:nowrap; }
.signup-fields .game-field { z-index:1; }
.game-signup .register-help { font-weight:500; }
.game-signup .wood-button[data-send-code] { min-width:88px; flex-shrink:0; padding:8px; font-size:clamp(12px,1.9vw,16px); }
.game-signup .email-field input { flex:1; width:0; }
.game-signup .code-field input { padding-left:35px; }
@media(max-width:400px) {
 .game-signup .wood-button[data-send-code] { min-width:78px; padding:6px 4px; font-size:12px; }
 .signup-fields label { line-height:1.25; font-size:16px; }
}

/* Readable verification action with no lettering baked into its background. */
.game-scene .email-field .wood-button[data-send-code] {
    background: #704215;
    background-image: none;
    color: #ffffff;
    text-shadow: none;
    font-family: "Microsoft JhengHei", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    width: clamp(120px, 27vw, 142px);
    min-width: 120px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #59300c;
    border-radius: 9px;
    box-shadow: inset 0 1px 1px #e8ba7770, 0 2px 2px #71481740;
    opacity: 1;
}
.game-scene .email-field .wood-button[data-send-code]:hover {
    background: #59320f;
}
.game-scene .email-field .wood-button[data-send-code]:disabled {
    background: #735739;
    color: #ffffff;
    opacity: 1;
}
.game-signup .email-field {
    padding-right: 5px;
    gap: 5px;
}
.game-signup .email-field input {
    min-width: 0;
    padding-right: 0;
}

/* Email-only authentication, preserving the camping artwork. */
.referrer-field{background-image:url("camp_original_email_field.webp")}
.referrer-field input{padding-left:30px}
.login-otp-fields{position:absolute;left:13%;top:31.4%;width:74%;height:27%;background:#fff0cd var(--auth-paper);isolation:isolate}
.login-otp-fields label{position:absolute;left:0;top:0;font-size:clamp(16px,3vw,27px);font-weight:800}
.login-otp-fields .game-field{height:23%;min-height:40px}
.login-otp-fields .email-field{top:13%;padding-right:5px;gap:5px}
.login-otp-fields .email-field input{flex:1;width:0;min-width:0}
.login-otp-fields .otp-label{top:48%}
.login-otp-fields .code-field{top:61%}
.login-otp-fields p{position:absolute;top:86%;left:0;margin:0;font-size:clamp(13px,2.2vw,18px);line-height:1.4}

/* Keep text clear of the envelope artwork at all supported widths. */
.game-signup .referrer-field input { padding-left:max(42px,7%); }
.signup-login-button {position:absolute;right:12.5%;top:18.6%;padding:10px 16px;max-width:46%;border:2px solid #a46120;border-radius:18px;background:linear-gradient(175deg,#fbc77e 0%,#c37a32 45%,#a5591b 95%);color:#fff7df;font-size:clamp(16px,2.4vw,22px);font-weight:800;text-decoration:none;text-align:center;text-shadow:0 2px 2px #6f350c;box-shadow:inset 0 2px 2px #ffe6ad,0 3px 0 #7f3e13,0 5px 5px #78451350;z-index:3;line-height:1.3}
.signup-login-button:hover {filter:brightness(1.08)}
.signup-login-button:active {transform:translateY(2px);box-shadow:inset 0 2px 2px #ffe6ad,0 1px 0 #7f3e13}
@media(max-width:400px){.signup-login-button{padding:7px 9px;font-size:15px;right:11.5%;top:18.5%}}

/* Three wooden actions share the existing provider row. */
.signup-provider-cover{position:absolute;left:11.5%;top:84.8%;width:77%;height:6.7%;background:#fff0cd var(--auth-paper);z-index:2;border-radius:14px}
.game-signup .google-button,.game-signup .facebook-button,.game-signup .signup-login-button{position:absolute;top:85.3%;width:24%;height:5.5%;max-width:none;right:auto;padding:4px;border:2px solid #a46120;border-radius:16px;background:linear-gradient(175deg,#fbc77e,#c37a32 45%,#a5591b);color:#fff7df;font-size:clamp(14px,2.2vw,21px);font-weight:800;text-decoration:none;text-align:center;text-shadow:0 2px 2px #6f350c;box-shadow:inset 0 2px 2px #ffe6ad,0 3px 0 #7f3e13;z-index:3;display:flex;align-items:center;justify-content:center;white-space:nowrap}
.game-signup .google-button{left:12%}.game-signup .facebook-button{left:38%}.game-signup .signup-login-button{left:64%;font-size:clamp(12px,1.9vw,18px)}

.game-signup .google-button,.game-signup .facebook-button{gap:6px}
.provider-logo{width:clamp(24px,4.4vw,38px);height:clamp(24px,4.4vw,38px);flex-shrink:0;filter:drop-shadow(0 2px 1px #66380f60)}
.game-signup .signup-login-button svg{width:clamp(28px,5vw,42px);height:clamp(28px,5vw,42px);fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 1px #66380f60)}

.game-signup .signup-login-button{gap:4px;font-size:clamp(12px,1.9vw,18px)}
.game-signup .signup-login-button svg{width:clamp(20px,3.2vw,28px);height:clamp(20px,3.2vw,28px);flex-shrink:0}

.game-signin .login-otp-fields .code-field input {
  padding-left: 38px;
}
