/* 山跡招募頁（2026-10-28 改成 App 自己的「野外筆記本」風格，照 app/.../design/Spec.kt：米色紙、墨綠字、森林綠、步道橘、朱紅登頂章、
   IBM Plex Mono 數字；首屏是山稜與步道虛線，加入步驟是一條往山頂的步道。不再用多益產生器的樣式，之後不要再用產生器覆蓋，文案改動手動同步） */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&display=swap");
:root {
  --ground: #F4F1E8; --deep: #EAE6D8; --card: #FCFAF4; --ink: #1F2A24; --muted: #545C52; --faint: #676D64;
  --rule: #D5D0C0; --strong: #B7B3A2; --accent: #2F5D3A; --forest-soft: #DCE6DA; --ok: #2F5D3A; --sel: #EAE6D8;
  --trail: #C8622A; --trail-deep: #A64B19; --trail-soft: #F3DED1; --stamp: #B8392A; --alert: #A64B19; --on-forest: #F4F1E8;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121613; --deep: #171C18; --card: #1B201C; --ink: #E8E4D8; --muted: #A3AA9F; --faint: #8E958A;
    --rule: #2E352F; --strong: #434B44; --accent: #8FBF94; --forest-soft: #22342A; --ok: #8FBF94; --sel: #232A24;
    --trail: #E39060; --trail-deep: #E39060; --trail-soft: #3B2A20; --stamp: #E8735F; --alert: #E08A55; --on-forest: #121613;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-wrap: anywhere; background: var(--ground); color: var(--ink); font: 16px/1.7 "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 24px 16px 72px; }
.mono { font-family: var(--mono); }

/* ── 首屏：筆記本封面＋山稜與步道 ── */
.top { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: 20px 18px max(110px, 33%); border: 1px solid var(--rule);
  border-top: 3px solid var(--ink); border-radius: 6px; background: url(img/ridge.svg) bottom center / 100% auto no-repeat, var(--deep); overflow: hidden; }
.kicker { font: 600 12px/1.4 var(--mono); letter-spacing: .14em; color: var(--muted); }
h1 { font-size: clamp(28px, 6.5vw, 36px); font-weight: 700; letter-spacing: 2px; line-height: 1.25; margin: 6px 0 10px; }
h1 small { display: block; font-size: .58em; letter-spacing: 1px; color: var(--muted); margin-top: 4px; }
.lead { color: var(--muted); margin: 0; }
.lang { position: absolute; top: 16px; right: 18px; font: 600 13px var(--mono); color: var(--accent); }
/* 「招募中 14 天」做成 App 的朱紅登頂章 */
.stamp { flex: none; width: 96px; height: 96px; margin-top: 30px; border-radius: 50%; color: var(--stamp); border: 3px solid var(--stamp);
  box-shadow: inset 0 0 0 4px var(--deep), inset 0 0 0 6px var(--stamp); display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-12deg); font: 700 13px/1.2 "Noto Sans TC", sans-serif; text-align: center; opacity: .92; }
.stamp b { font: 700 30px/1 var(--mono); }

/* ── 小標：App 的「— 標題」寫法＋粗墨線 ── */
h2 { font-size: 20px; font-weight: 700; letter-spacing: 1px; margin: 40px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; flex: none; width: 14px; height: 3px; background: var(--accent); }

/* ── 卡片：筆記本頁 ── */
.reward, form, .line, .note-box, details { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
.reward { margin: 18px 0 12px; padding: 14px 16px 14px 60px; position: relative; }
.reward::before { content: "登頂"; position: absolute; left: 12px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%;
  border: 2px solid var(--stamp); color: var(--stamp); font: 700 11px/34px "Noto Sans TC", sans-serif; text-align: center; transform: rotate(-10deg); }
html[lang="en"] .reward::before { content: "TOP"; font-family: var(--mono); }
.reward b { color: var(--stamp); }
form { padding: 20px 16px; margin-top: 12px; border-top: 3px solid var(--accent); }
.line { padding: 16px; margin-top: 16px; }
.line h3 { margin: 0 0 6px; font-size: 17px; }
.line p { margin: 6px 0; }
.note-box { padding: 12px 16px; font-size: 15px; margin: 16px 0; }
ol, ul { padding-left: 1.3em; margin: 8px 0; }
li { margin: 6px 0; }
a { color: var(--accent); text-underline-offset: 3px; }

/* ── 重點：像 App 的統計格，虛線分隔 ── */
.facts { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
.facts li { margin: 0; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: start; border-bottom: 1px dashed var(--strong);
  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; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: var(--forest-soft); }
.facts b { font-size: 16px; }
.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; }
.brief li::marker { color: var(--trail); }

/* ── 加入步驟：一條往山頂的步道（步道橘虛線、航點編號、最後是山頂旗） ── */
.steps { list-style: none; counter-reset: st; padding: 0; margin: 12px 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 30px; border-left: 3px dashed var(--trail); }
.steps li { counter-increment: st; position: relative; padding: 4px 0 18px 54px; margin: 0; }
.steps li::before { content: counter(st); position: absolute; left: 2px; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 700 16px var(--mono); color: var(--accent); background: var(--card); border: 2px solid var(--accent); }
.steps li:last-child::before { content: "⚑"; color: var(--on-forest); background: var(--stamp); border-color: var(--stamp); font-family: "Noto Sans TC", sans-serif; }
.steps li p { margin: 10px 0 0; }
.steps .btn { width: 100%; }

/* ── 表單 ── */
label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type=email] { width: 100%; min-height: 46px; padding: 8px 12px; font: 500 16px var(--mono); background: var(--ground); color: var(--ink); border: 1px solid var(--strong); border-radius: 6px; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, .shots:focus-visible { outline: 3px solid var(--trail); 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(--alert); }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 16px; }
fieldset { border: 0; padding: 0; margin: 18px 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: 2px 0; min-height: 40px; border-bottom: 1px dashed var(--rule); }
.opt input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.opt.off { opacity: .45; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 12px; font-weight: 400; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--accent); }

/* ── 按鈕：App 的森林綠實心、步道深橘「送出」 ── */
button { width: 100%; min-height: 50px; margin-top: 10px; font: 700 17px "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; letter-spacing: 2px; cursor: pointer;
  background: var(--trail-deep); color: #fff; border: 0; border-radius: 6px; }
button:disabled { opacity: .5; cursor: default; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 16px; border: 1px solid var(--strong); border-radius: 6px;
  color: var(--ink); background: var(--card); text-decoration: none; font-weight: 700; letter-spacing: 1px; }
.btn.dark { background: var(--accent); color: var(--on-forest); border-color: var(--accent); }
.gbtn { background: var(--card); color: var(--ink); border: 1px solid var(--strong); font-weight: 500; margin: 0 0 4px; }
.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: 700 13px var(--mono); letter-spacing: .1em; background: var(--accent); color: var(--on-forest); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
@media (hover: hover) { .btn.dark:hover, .to-top:hover { filter: brightness(1.1); } }

/* ── 訊息 ── */
.msg { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--strong); border-radius: 6px; display: none; }
.msg.show { display: block; }
.msg.ok { border: 2px solid var(--ok); color: var(--ok); font-weight: 700; }
.msg.err { border: 2px solid var(--alert); color: var(--alert); font-weight: 700; }
.msg.field-err { margin: 8px 0 6px; }
.hp { position: absolute; left: -9999px; }
.kw { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.slots { margin: 0 0 12px; font-weight: 700; }
.slots.full { color: var(--alert); border: 1px solid var(--alert); border-radius: 6px; padding: 8px 12px; }
.email-warn { background: var(--trail-soft); border: 2px solid var(--alert); border-radius: 6px; padding: 10px 14px; margin: 4px 0 16px; font-size: 16px; font-weight: 500; }

/* ── 重要提示 ── */
.note-box.important { background: var(--card); border: 2px solid var(--alert); border-left-width: 8px; font-weight: 500; }
.note-box.important b { color: var(--alert); }
.note-box .imp { display: inline-block; background: var(--alert); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.5; padding: 0 8px; border-radius: 3px; margin-right: 4px; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .note-box .imp, button:not(.to-top):not(.gbtn) { color: var(--ground); } }
.note-box.done { border: 2px solid var(--ok); font-weight: 700; margin: 0 0 8px; }

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

/* ── 截圖 ── */
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-padding-left: 4px; }
.shots figure { flex: none; width: 190px; margin: 0; scroll-snap-align: start; }
.shots img, .rep img { display: block; width: 100%; height: auto; border: 1px solid var(--strong); border-radius: 14px; background: var(--card); }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.rep { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.rep figure { margin: 0; width: calc(50% - 8px); min-width: 180px; max-width: 240px; }
.pin { position: relative; }
.pin::after { content: ""; position: absolute; left: 93.1%; top: 79.3%; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid var(--stamp); border-radius: 50%; pointer-events: none; }
.pin span { position: absolute; right: 2%; top: 63%; background: var(--stamp); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 3px; }

footer { margin-top: 44px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); }
html[lang="en"] body, html[lang="en"] button { font-family: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif; }

/* ── 螢幕閱讀器、跳到表單 ── */
.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(--ink); color: var(--ground); font-weight: 700; text-decoration: none; border-radius: 6px; }
.skip:focus { top: 12px; }

/* 沒填或沒勾的那一組：紅框從外面收進來、晃一下、再閃三下（2026-10-28 使用者：未勾同意很不明顯） */
.attn { outline: 3px solid var(--alert); outline-offset: 6px; border-radius: 8px; background: color-mix(in srgb, var(--alert) 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) 25%, transparent); } }

/* 封測進度（第幾天、截止、正式版上架；2026-10-28 使用者）：進度條是一段步道 */
.test-status { border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 6px; padding: 12px 14px; margin: 16px 0; background: var(--card); }
.test-status.ended { border-top-color: var(--alert); background: var(--trail-soft); }
.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: var(--deep); }
.ts-bar i { display: block; height: 100%; border-radius: inherit; background: repeating-linear-gradient(90deg, var(--trail) 0 12px, transparent 12px 18px), var(--trail-soft);
  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 (max-width: 480px) {
  .top { grid-template-columns: 1fr; }
  .stamp { position: absolute; right: 14px; bottom: 12px; width: 76px; height: 76px; margin: 0; font-size: 11px; background: var(--deep); }
  .stamp b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .attn, .ts-bar i, .test-status.appear, .facts li { animation: none; }
}
