/* Racco Local — 表單頁（推薦好店、回報錯誤、認領、認領確認）
   擁有者：表單模組。token 在 app.css（--ink、--paper、--card、--yellow、--blue、--red……）。
   原則：標籤在輸入框上面；輸入框字級 16px 以上（iOS 才不會自動放大）；方角、1px 墨線、硬陰影；
   錯誤用珊瑚色「填色」＋墨色文字，絕不把珊瑚色文字放在米色底上（對比不夠）。手機優先，斷點 620／900。 */

.form-main { padding-bottom: 8px; }
.form-page { max-width: 760px; padding-top: 18px; }

/* 開頭 */
.form-intro { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 18px; padding: 18px 0 22px; border-bottom: 1px solid var(--ink); }
.form-intro h1 { font-size: clamp(28px, 6.4vw, 44px); }
.form-intro .lead { margin-top: 12px; }
.form-racco { width: 72px; height: auto; }
@media (min-width: 620px) { .form-racco { width: 112px; } }

.form-promises { display: grid; gap: 8px; margin: 18px 0 0; }
.form-promises li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.6; }
.form-promises li::before { position: absolute; left: 0; top: .35em; width: 14px; height: 14px; border: 1px solid var(--ink); background: var(--yellow); content: ""; }

/* 這是哪一家店 */
.biz-summary { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.biz-summary-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.biz-summary-name { font-size: 18px; font-weight: 800; line-height: 1.4; }
.biz-summary-name a { border-bottom: 1px solid currentColor; }
.biz-summary-name a:hover { background: var(--yellow); }
.biz-summary-name span { font-weight: 500; }
.biz-summary-addr { margin-top: 2px; font-size: 14px; color: var(--muted); }

/* 表單 */
.wl-form { display: grid; gap: 22px; margin-top: 24px; }
.form-note { font-size: 14px; color: var(--muted); }
.wl-form fieldset { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 18px 16px 20px; border: 1px solid var(--ink); background: var(--card); }
.wl-form legend { padding: 2px 8px; border: 1px solid var(--ink); background: var(--paper); font-size: 15px; font-weight: 800; line-height: 1.5; }
.wl-form h2 { font-family: var(--sans); font-size: 16px; letter-spacing: 0; }
@media (min-width: 620px) { .wl-form fieldset { padding: 22px 22px 24px; } }

.field { display: grid; gap: 6px; min-width: 0; }
.field label, .choices legend { font-size: 15px; font-weight: 700; line-height: 1.45; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 220px; } }

.req, .opt { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid var(--ink); font-size: 11px; font-weight: 700; line-height: 1.6; vertical-align: 2px; }
.req { background: var(--yellow); }
.opt { background: transparent; font-weight: 500; }
.hint { font-size: 13px; line-height: 1.6; color: var(--muted); }

.wl-form input[type="text"], .wl-form input[type="email"], .wl-form input[type="tel"], .wl-form input[type="url"],
.wl-form select, .wl-form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0;
  background: #fff; color: var(--ink); font-size: 16px; line-height: 1.5; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.wl-form textarea { min-height: 96px; resize: vertical; }
.wl-form select {
  padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
.wl-form input:focus-visible, .wl-form select:focus-visible, .wl-form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 4px 4px 0 var(--yellow); }
.wl-form input:hover, .wl-form select:hover, .wl-form textarea:hover { box-shadow: 3px 3px 0 var(--yellow); }

/* 錯誤：珊瑚色只當填色，文字一律墨色 */
.has-error input, .has-error select, .has-error textarea { border-width: 2px; box-shadow: 4px 4px 0 var(--red); }
.field-error { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.field-error::before { flex: none; width: 12px; height: 12px; margin-top: .3em; border: 1px solid var(--ink); background: var(--red); content: ""; }
.error-summary { padding: 16px 18px; border: 2px solid var(--ink); border-left-width: 12px; border-left-color: var(--red); background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.error-summary:focus { outline: 2px solid var(--ink); outline-offset: 3px; }
.error-summary h2 { margin-bottom: 8px; font-family: var(--sans); font-size: 17px; letter-spacing: 0; }
.error-summary ul { display: grid; gap: 6px; padding-left: 0; }
.error-summary li { font-size: 15px; line-height: 1.5; }
.error-summary a { border-bottom: 1px solid currentColor; font-weight: 700; }
.error-summary a:hover { background: var(--yellow); }

/* 單選（回報類型） */
.choices { display: grid; gap: 10px; }
.choices.has-error { border-width: 2px; box-shadow: 4px 4px 0 var(--red); }
.choice { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--ink); background: #fff; }
.choice:hover { background: #fffbe6; }
.choice:has(input:checked) { background: var(--yellow); }
.choice input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); }
.choice label { display: grid; gap: 2px; cursor: pointer; }
.choice label b { font-size: 15px; line-height: 1.45; }
.choice label span { font-size: 13px; line-height: 1.55; color: var(--muted); }
.choice:has(input:checked) label span { color: var(--ink); }

/* 說明框 */
.callout { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--ink); background: var(--paper); font-size: 14px; line-height: 1.7; }
.callout-blue { background: var(--blue); }
.callout h3 { font-size: 16px; }
.community-evidence { display: grid; gap: 16px; }
.community-evidence[hidden] { display: none; }

/* 字數 */
.counter { justify-self: end; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.counter.near { color: var(--ink); font-weight: 500; }
.counter.full { padding: 0 6px; background: var(--red); color: var(--ink); }

/* 蜜罐：移到畫面外（不用 display:none） */
.hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Turnstile */
.turnstile-wrap { display: grid; gap: 8px; min-height: 65px; }
.turnstile-wrap.needs-attention { padding: 8px; outline: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--red); }

/* 提醒（暫停、本機開發） */
.notice { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--ink); background: var(--card); font-size: 15px; }
.notice h2 { margin-bottom: 6px; font-family: var(--sans); font-size: 18px; letter-spacing: 0; }
.notice-paused { border-left: 12px solid var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.notice-dev { border-style: dashed; background: var(--mist); font-family: var(--mono); font-size: 12px; word-break: break-all; }

.privacy-note { padding: 12px 14px; border-top: 1px solid var(--ink); font-size: 13px; line-height: 1.7; color: var(--muted); }
.privacy-note h2 { margin-bottom: 4px; color: var(--ink); font-size: 13px !important; }

.form-actions { display: grid; gap: 10px; justify-items: start; }
.form-actions .button { min-width: 200px; }
.form-actions .button[disabled] { cursor: progress; opacity: .7; transform: none; box-shadow: none; }
@media (max-width: 619px) { .form-actions .button { width: 100%; } }

/* 認領流程 */
.claim-how { display: grid; gap: 14px; margin-top: 28px; }
.claim-how h2 { font-size: clamp(22px, 4.6vw, 30px); }
.steps { display: grid; gap: 10px; counter-reset: step; }
.steps li { position: relative; display: grid; gap: 2px; padding: 10px 12px 10px 52px; border: 1px solid var(--ink); background: var(--card); counter-increment: step; }
.steps li::before { position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ink); background: var(--yellow); content: counter(step); font-family: var(--mono); font-size: 14px; font-weight: 500; }
.steps b { font-size: 15px; line-height: 1.5; }
.steps span { font-size: 14px; line-height: 1.65; color: var(--muted); }

/* 結果頁（謝謝、請收信、確認、連結失效） */
.result-page { display: grid; gap: 18px; justify-items: start; max-width: 760px; padding-top: 32px; padding-bottom: 8px; }
.result-racco { width: 120px; height: auto; }
.result-copy { display: grid; gap: 12px; }
.result-copy h1 { font-size: clamp(28px, 6.4vw, 44px); }
.result-copy > p { max-width: 38em; font-size: 16px; line-height: 1.85; }
.result-copy .actions { margin-top: 8px; }
.confirm-form { margin-top: 8px; }
@media (min-width: 620px) {
  .result-page { grid-template-columns: 168px 1fr; align-items: start; gap: 28px; }
  .result-racco { width: 168px; }
}
