/* 露營掌門招募頁（2026-10-27 改成 App 自己的「野外手冊」風格，不再用多益產生器的樣式）。
   暖紙底＋等高線底紋、松綠圖示方塊、左邊色條的圓角卡片、松綠實心按鈕與營火橘行動鈕、等寬數字，
   色票照 ui/design/Theme.kt（LightPalette／DarkPalette：bg、surface、pine、moss、ember、ok、bad）。
   之後別再用 ToeicApp/tools/join-gen/gen.mjs 覆蓋這份 css；步驟、文案有改時手動同步 index.html 與 en/index.html。 */
:root {
  color-scheme: light;
  --bg: #EDE8DC; --surface: #FAF8F2; --raised: #F3EFE5; --ink: #1B241F; --muted: #5D6A62; --line: #D3CCBB;
  --pine: #1F3D30; --on-pine: #F4F1E8; --moss: #557560; --ember: #D2632A; --ember-btn: #A9491A; --ember-txt: #A9491A;
  --ok: #287549; --bad: #AD3727; --warn: #C58A14; --imp-bg: #F8E9E2; --alert: var(--bad); --accent: var(--pine);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0F1411; --surface: #171E1A; --raised: #1E2621; --ink: #E7E4DC; --muted: #A3ADA6; --line: #2C3630;
    --pine: #86BC9C; --on-pine: #0F1411; --moss: #6F927B; --ember: #F08A4B; --ember-btn: #F08A4B; --ember-txt: #F4A06B;
    --ok: #55B37C; --bad: #EC7461; --warn: #E2AE3C; --imp-bg: #2A1A16;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; overflow-wrap: anywhere; color: var(--ink);
  font: 17px/1.75 "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: url("img/topo.svg") top center / 900px auto no-repeat, var(--bg);
}
main { max-width: 640px; margin: 0 auto; padding: 28px 16px 80px; }
.mono, .num { font-family: "Roboto Mono", ui-monospace, Consolas, monospace; }
b { font-weight: 700; }
a { color: var(--pine); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--pine); } }

/* 標題區：松綠圖示方塊（像 App 每頁左上角）、粗標題、資訊膠囊、等高線 */
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 4px 0 20px; }
.top > div:first-child { flex: 1; min-width: 0; }
.kicker { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 13px; font-weight: 600; color: var(--moss); letter-spacing: .1em; }
@media (prefers-color-scheme: dark) { .kicker { color: var(--pine); } }
h1, h2, .line h3 { line-height: 1.35; }
html[lang="zh-Hant"] h1 { word-break: keep-all; }
h1 { font-size: 33px; font-weight: 900; margin: 6px 0 10px; }
.lead { color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; padding: 0; list-style: none; }
.chips li { margin: 0; padding: 2px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink); }
.chips li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--ok); }
.chips li:nth-child(2)::before { background: var(--ember); }
.chips li:nth-child(3)::before { background: var(--warn); }
/* 「14 天」：松綠圓角方塊，裡面一頂帳篷 */
.stamp { flex: none; width: 92px; min-height: 104px; margin-top: 26px; border-radius: 18px; background: var(--pine); color: var(--on-pine);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 4px;
  font-weight: 700; font-size: 13px; line-height: 1.2; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.stamp svg { width: 34px; height: 26px; margin-bottom: 2px; }
.stamp b { font: 700 30px/1.05 "Roboto Mono", ui-monospace, monospace; }

/* 段落標題：小圖示點＋細線（App 的分段標題） */
h2 { font-size: 22px; font-weight: 900; margin: 40px 0 12px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--pine); }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 卡片：圓角 12、細框、左邊松綠色條 */
.reward, form, .line, .note-box, .steps li, details { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.reward, .line, .note-box { border-left: 5px solid var(--pine); }
.reward { padding: 18px 20px; margin: 18px 0; font-size: 18px; border-left-color: var(--ember); }
.reward b { color: var(--ember-txt); font-size: 20px; white-space: nowrap; }
.note-box { padding: 12px 16px; font-size: 16px; }
.line { padding: 16px; margin-top: 16px; }
.line h3 { margin: 0 0 6px; font-size: 18px; }
.line p { margin: 6px 0; }

/* App 畫面 */
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-padding-left: 2px;
  scrollbar-color: var(--line) transparent; border-radius: 12px; }
.shots figure { flex: none; width: 168px; margin: 0; scroll-snap-align: start; text-align: center; }
.shots img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 6px 14px rgba(27, 36, 31, .15); }
figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }

/* 步驟：松綠圓角方塊編號 */
ol, ul { padding-left: 1.3em; margin: 8px 0; }
li { margin: 6px 0; }
ul li::marker { color: var(--moss); }
.steps { list-style: none; counter-reset: st; padding: 0; }
.steps li { counter-increment: st; padding: 14px 16px 14px 64px; margin: 12px 0; }
.steps li::before { content: counter(st); position: absolute; left: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font: 700 18px "Roboto Mono", ui-monospace, monospace; color: var(--on-pine); background: var(--pine); }
.steps li p { margin: 10px 0 0; }
.steps .btn { width: 100%; }

/* 按鈕：松綠實心圓角，主要行動用營火橘（App 的「回報營況」） */
.btn, button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 8px 18px;
  border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.3; text-decoration: none; cursor: pointer;
  color: var(--on-pine); background: var(--pine); border: 0; transition: transform .08s, filter .08s; }
.btn:active, button:active:not(:disabled) { transform: translateY(2px); filter: brightness(.95); }
.btn.dark { color: var(--on-pine); background: var(--pine); }
button { width: 100%; margin-top: 10px; }
#go { font-size: 18px; min-height: 54px; background: var(--ember-btn); color: #FFF; }
@media (prefers-color-scheme: dark) { #go { color: #0F1411; } }
button:disabled { opacity: .5; cursor: default; }
.gbtn { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 500; margin: 0 0 4px; }

/* 表單 */
form { padding: 24px 18px; margin-top: 12px; }
label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type=email] { width: 100%; min-height: 50px; padding: 8px 12px; font: 17px "Roboto Mono", ui-monospace, Consolas, monospace;
  background: var(--raised); color: var(--ink); border: 1px solid var(--muted); border-radius: 10px; }
input[type=email]::placeholder { color: var(--muted); }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, .shots:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
#stepsDone:focus-visible { outline: 3px solid var(--ok); outline-offset: 2px; }
input[aria-invalid="true"] { border: 2px solid var(--bad); }
.hint { font-size: 15px; color: var(--muted); margin: 6px 0 16px; }
.email-warn { background: var(--imp-bg); border: 2px solid var(--bad); border-radius: 10px; padding: 10px 14px; margin: -8px 0 16px; font-size: 16px; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.opt { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 4px 0; min-height: 40px; }
.opt input, .check input { width: 22px; height: 22px; flex: none; accent-color: var(--pine); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-weight: 400; }
.check input { margin-top: 4px; }
.opt.off { opacity: .45; }
.msg { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: none; }
.msg.show { display: block; }
.msg.ok { border-color: var(--ok); color: var(--ok); font-weight: 700; }
.msg.err { border-color: var(--bad); color: var(--bad); }
.hp { position: absolute; left: -9999px; }
.kw { color: var(--ember-txt); font-weight: 700; }
.slots { margin: 0 0 12px; font-weight: 700; }
.slots.full { color: var(--bad); border: 1px solid var(--bad); border-radius: 10px; padding: 8px 12px; }

/* 常見問題 */
details { margin: 10px 0; padding: 0 16px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
summary::marker { color: var(--moss); }
details p { margin: 0 0 12px; }

footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); text-align: center; }
footer a { color: var(--muted); }
.lang { float: right; font-size: 15px; font-weight: 700; margin: 0 0 8px 12px; padding: 4px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20;
  width: auto; min-width: 56px; min-height: 44px; margin: 0; padding: 8px 14px; font-size: 14px; letter-spacing: .08em; }

/* 重要提示：警示紅粗框 */
.note-box.important { background: var(--imp-bg); border: 2px solid var(--bad); border-left-width: 8px; font-weight: 500; }
.note-box.important b { color: var(--bad); }
.note-box .imp { display: inline-block; background: var(--bad); color: #FFF; font-size: 14px; font-weight: 700;
  line-height: 1.5; padding: 0 8px; border-radius: 6px; margin-right: 4px; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .note-box .imp { color: #0F1411; } }
.note-box.done { border: 2px solid var(--ok); font-weight: 700; margin: 0 0 8px; }

/* 螢幕閱讀器、鍵盤 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 30; padding: 10px 16px; background: var(--pine); color: var(--on-pine); font-weight: 700; text-decoration: none; border-radius: 10px; }
.skip:focus { top: 12px; }

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  .stamp { width: 74px; min-height: 88px; margin-top: 30px; font-size: 11px; } .stamp b { font-size: 24px; } .stamp svg { width: 28px; height: 22px; }
  .shots figure { width: 150px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, button { transition: none; } }

/* 沒填或沒勾的那一組：紅框從外面收進來、晃一下、再閃三下；錯誤訊息也用提醒色（2026-10-28 使用者：未勾同意很不明顯） */
.attn { outline: 3px solid var(--alert, var(--accent)); outline-offset: 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--alert, var(--accent)) 10%, transparent);
  animation: attn-in .35s ease-out, attn-shake .4s ease-in-out .35s, attn-blink .7s ease-in-out .75s 3; }
@keyframes attn-in { from { outline-offset: 18px; outline-color: transparent; } }
@keyframes attn-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes attn-blink { 50% { outline-color: color-mix(in srgb, var(--alert, var(--accent)) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .attn { animation: none; } }
.msg.err { border-color: var(--alert, var(--accent)); color: var(--alert, var(--accent)); border-width: 2px; font-weight: 700; }

/* 封測進度（第幾天、截止、正式版上架；2026-10-28 使用者） */
.test-status { border: 2px solid var(--ok, var(--accent)); border-radius: 10px; padding: 12px 14px; margin: 16px 0;
  background: color-mix(in srgb, var(--ok, var(--accent)) 8%, transparent); }
.test-status.ended { border-color: var(--alert, var(--accent)); background: color-mix(in srgb, var(--alert, var(--accent)) 8%, transparent); }
.test-status p { margin: 0; }
.test-status .ts-main { font-weight: 700; font-size: 17px; }
.test-status .ts-sub { margin-top: 6px; }
.test-status .btn { margin-top: 10px; }
.ts-bar { height: 10px; border-radius: 5px; margin: 10px 0 2px; overflow: hidden; background: color-mix(in srgb, currentColor 14%, transparent); }
.ts-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok, var(--accent)); transform-origin: left; animation: ts-grow .9s ease-out; }
@keyframes ts-grow { from { transform: scaleX(0); } }
.test-status.appear { animation: ts-in .28s ease-out; }
@keyframes ts-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .ts-bar i, .test-status.appear { animation: none; } }

.msg.field-err { margin: 8px 0 6px; }

/* 重點小卡（2026-10-28 使用者：招募頁說明改成重點式） */
.facts { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px; }
.facts li { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: start; animation: ts-in .28s ease-out backwards; }
.facts li:nth-child(2) { animation-delay: .05s; } .facts li:nth-child(3) { animation-delay: .1s; } .facts li:nth-child(4) { animation-delay: .15s; } .facts li:nth-child(5) { animation-delay: .2s; } .facts li:nth-child(6) { animation-delay: .25s; }
.facts .ic { grid-row: span 2; font-size: 22px; line-height: 1.2; }
.facts b { font-size: 15px; }
.facts span:last-child { font-size: 14px; color: var(--muted); line-height: 1.45; }
.brief { padding-left: 20px; margin: 8px 0 16px; }
.brief li { margin: 4px 0; }
@media (prefers-reduced-motion: reduce) { .facts li { animation: none; } }
/* 重點小卡套這一頁的配色 */
.facts li { background: var(--raised); border-color: var(--line); }
