:root {
  color-scheme: light;
  --auth-ink: #243341;
  --auth-muted: #555f68;
  --auth-rule: #e5dac1;
  --auth-accent: #a76e02;
  --auth-highlight-bg: #fff4d1;
  --auth-highlight-border: #e6d2a0;
  --auth-highlight-ink: #6f4a00;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: #fdf9f0 radial-gradient(#71531525 1px, transparent 1.2px) 0 0 / 22px 22px; color: var(--auth-ink); font: 16px/1.6 'Noto Sans TC', system-ui, -apple-system, 'Microsoft JhengHei', sans-serif; }
form, .box { min-inline-size: 0; inline-size: min(100%, 414px); padding: clamp(22px, 5vw, 34px); border: 1px solid var(--auth-rule); border-radius: 23px; background: #fffefa; box-shadow: 0 14px 42px #614b1714; }
form.su { inline-size: min(100%, 476px); }
.auth-heading, .box { text-align: center; }
.auth-heading { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid #eee6d4; }
.auth-heading h1 { font-size: clamp(24px, 5vw, 31px); line-height: 1.22; margin: 9px 0 0; }
.logo { display: inline-flex; gap: 7px; align-items: center; text-decoration: none; color: inherit; font-weight: 900; font-size: 23px; }
.logo b, .maint-icon { color: var(--auth-accent); }
.logo img { width: 26px; height: 26px; }
p { color: var(--auth-muted); }
.locked-card {
  inline-size: min(100%, 500px);
  padding: clamp(22px, 6vw, 40px);
}
.locked-card .auth-heading { margin-bottom: 24px; }
.locked-icon {
  display: grid;
  place-items: center;
  inline-size: 64px;
  block-size: 64px;
  margin: 0 auto 16px;
  border: 1px solid var(--auth-highlight-border);
  border-radius: 18px;
  background: var(--auth-highlight-bg);
  color: var(--auth-highlight-ink);
}
.locked-card h1 {
  margin: 0;
  font-size: clamp(23px, 6vw, 32px);
  line-height: 1.3;
  text-wrap: balance;
}
.locked-message { margin: 10px 0 0; text-wrap: pretty; }
.locked-guidance {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--auth-highlight-border);
  border-radius: 12px;
  background: var(--auth-highlight-bg);
  color: var(--auth-highlight-ink);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
label { display: block; min-inline-size: 0; color: var(--auth-muted); font-size: 14px; font-weight: 700; margin: 0 0 12px; }
input:not([type="checkbox"]) { display: block; min-inline-size: 0; max-inline-size: 100%; inline-size: 100%; min-height: 47px; margin-top: 4px; padding: 9px 11px; border: 1px solid #ded3bb; border-radius: 11px; background: #fff; color: var(--auth-ink); font: inherit; font-size: 16px; font-weight: 400; line-height: 1.45; }
input[type="date"] { -webkit-appearance: none; appearance: none; overflow: hidden; }
input[type="date"]::-webkit-datetime-edit { min-width: 0; padding: 0; }
input[type="date"]::-webkit-date-and-time-value { min-width: 0; min-height: 1.4em; text-align: start; }
input:not([type="checkbox"]):focus { border-color: #987021; outline: 2px solid #ebca8366; outline-offset: 1px; }
.field-note { margin: -8px 0 12px; font-size: 12px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.agree { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.65; padding-top: 4px; }
.agree input { width: 19px; height: 19px; flex: none; margin: 2px 0 0; accent-color: var(--auth-ink); }
.agree a, .alt a { color: var(--auth-ink); font-weight: 700; text-underline-offset: 3px; }
button { inline-size: 100%; min-height: 47px; border: 0; border-radius: 999px; background: var(--auth-ink); color: #fff; padding: 9px 15px; font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: #344a58; }
:focus-visible { outline: 2px solid #205c85; outline-offset: 4px; }
.err, .ok { border: 1px solid #edc5bd; border-radius: 11px; background: #fff3ef; color: #8c3225; font-size: 14px; padding: 9px 12px; margin: 0 0 12px; }
.maintenance-note { border-color: var(--auth-highlight-border); background: var(--auth-highlight-bg); color: var(--auth-highlight-ink); }
.ok { background: #ecf6ed; border-color: #c0dbc6; color: #235c37; }
.alt { margin: 13px 0 0; font-size: 14px; text-align: center; }
@media (max-width: 459px) { body:has(.su) { align-items: start; } }
@media (max-width: 365px) { .two { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* 人機驗證（Cloudflare Turnstile）：寬度最少 300px，小手機上表單比它窄，等比例縮小放進表單裡 */
.cf-turnstile { margin: 2px 0 12px; min-height: 65px; }
@media (max-width: 400px) {
  .cf-turnstile { height: 57px; min-height: 0; }
  .cf-turnstile > div { transform: scale(.87); transform-origin: left top; }
}
@media (max-width: 340px) {
  .cf-turnstile { height: 52px; }
  .cf-turnstile > div { transform: scale(.8); }
}
