/* 連連看招募頁（2026-10-27 改成 App 自己的「藍染夜色 × 金漆」風格，不再用多益產生器的樣式）。
   底圖取自 App 的 bg_night.png（夜空、青海波），字型是 App 用的霞鶩文楷；牌面、漆盤、朱印照 design/Spec.kt。
   之後別再用 ToeicApp/tools/join-gen/gen.mjs 覆蓋這份 css；步驟、文案有改時手動同步 index.html。 */
:root {
  color-scheme: dark;
  --ground: #031C38; --deep: #071530; --card: #13244A; --card2: #0F1E40;
  --ink: #F3EADB; --muted: #C3C8D8; --faint: #A3AAC2;
  --gold: #E0B65A; --gold-hi: #F6D88F; --gold-lo: #9C7A2E;
  --red: #B3321F; --red-hi: #D2533C; --red-txt: #F08A72;
  --tile: #F6EEDC; --tile-edge: #D9C9A3; --tile-ink: #1A2547;
  --ok: #7ED3A6; --rule: rgba(224, 182, 90, .35);
  --accent: var(--gold); --alert: var(--red-txt);
}
* { box-sizing: border-box; }
html { background: var(--deep); }
body {
  margin: 0; overflow-wrap: anywhere; color: var(--ink);
  font: 17px/1.75 "LXGW WenKai TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background:
    url("img/sky.jpg") top center / 900px auto no-repeat,
    linear-gradient(var(--ground), rgba(3, 28, 56, 0) 45%) bottom center / 100% 567px no-repeat,
    url("img/waves.jpg") bottom center / 900px auto repeat-x,
    linear-gradient(var(--ground), var(--ground));
}
html[lang="en"] body { font-family: "LXGW WenKai TC", Georgia, "Times New Roman", serif; }
main { max-width: 640px; margin: 0 auto; padding: 28px 16px 220px; }
.mono { font-family: inherit; }
b { color: var(--gold-hi); font-weight: 700; }
a { color: var(--gold-hi); text-underline-offset: 3px; }

/* 標題區：金字標題、三張牌面、朱印 */
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 8px 0 20px; }
.top > div:first-child { flex: 1; min-width: 0; }
.kicker { font-size: 13px; color: var(--gold); letter-spacing: .18em; }
h1, h2, .line h3 { font-family: inherit; line-height: 1.35; }
h1 { font-size: 32px; margin: 6px 0 12px; color: var(--gold-hi); text-shadow: 0 2px 0 #3a2a08, 0 0 18px rgba(224, 182, 90, .25); }
.lead { color: var(--muted); margin: 0; }
.tiles { display: flex; gap: 8px; margin: 14px 0 14px; align-items: center; }
.tiles span { width: 46px; height: 58px; display: grid; place-items: center; border-radius: 7px;
  background: linear-gradient(#FFFBF0, var(--tile)); color: var(--tile-ink); font-size: 30px; font-weight: 700;
  box-shadow: 0 4px 0 var(--tile-edge), 0 6px 10px rgba(0, 0, 0, .45); }
.tiles span:nth-child(1) { color: #A3301E; }
.tiles span:nth-child(2) { color: #1F6B4A; }
.tiles i { flex: none; width: 22px; height: 3px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 8px var(--gold); }
.tiles span.sel { outline: 3px solid var(--gold); outline-offset: 1px; }
/* 朱印：方印、米色字，像 App 的 Seal */
.stamp { flex: none; width: 84px; height: 96px; margin-top: 30px; border-radius: 6px; transform: rotate(-6deg);
  background: radial-gradient(circle at 30% 25%, var(--red-hi), var(--red) 70%); color: var(--tile);
  border: 2px solid #E8C9A6; box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px rgba(243, 234, 219, .7), 0 6px 14px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; font-size: 15px; line-height: 1.2; }
.stamp b { color: var(--tile); font-size: 32px; line-height: 1.1; }

/* 金色分隔標題 */
h2 { font-size: 22px; margin: 40px 0 10px; color: var(--gold-hi); text-align: center; display: flex; align-items: center; gap: 12px; }
h2::before, h2::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
h2::after { background: linear-gradient(270deg, transparent, var(--gold)); }

/* 漆盤面板：深藍漆面、金框、四角飾角 */
.reward, form, .line, .note-box, .steps li, details {
  position: relative; background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1.5px solid var(--gold-lo); border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--card2), inset 0 0 0 4px var(--rule), 0 6px 16px rgba(0, 0, 0, .35);
}
.reward, form { background-image:
    linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--gold), var(--gold)),
    linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--gold), var(--gold)),
    linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--gold), var(--gold)),
    linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--gold), var(--gold)),
    linear-gradient(180deg, var(--card), var(--card2));
  background-size: 14px 2px, 2px 14px, 14px 2px, 2px 14px, 14px 2px, 2px 14px, 14px 2px, 2px 14px, auto;
  background-position: 8px 8px, 8px 8px, right 8px top 8px, right 8px top 8px, 8px bottom 8px, 8px bottom 8px, right 8px bottom 8px, right 8px bottom 8px, 0 0;
  background-repeat: no-repeat;
}
.reward { padding: 18px 20px; margin: 18px 0; font-size: 18px; text-align: center; }
.reward b { 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; color: var(--gold-hi); }
.line p { margin: 6px 0; }

/* 遊戲畫面 */
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-padding-left: 4px;
  scrollbar-color: var(--gold-lo) transparent; }
.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: 12px; border: 2px solid var(--gold-lo);
  box-shadow: 0 0 0 4px var(--deep), 0 0 0 5px var(--rule), 0 8px 16px rgba(0, 0, 0, .5); }
figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; }

/* 步驟：圓形金框編號 */
ol, ul { padding-left: 1.3em; margin: 8px 0; }
li { margin: 6px 0; }
ul li::marker { color: var(--gold); }
.steps { list-style: none; counter-reset: st; padding: 0; }
.steps li { counter-increment: st; padding: 14px 16px 14px 62px; margin: 12px 0; }
.steps li::before { content: counter(st); position: absolute; left: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: var(--tile-ink);
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 60%, var(--gold-lo)); box-shadow: 0 2px 0 #5c4512; }
.steps li p { margin: 10px 0 0; }
.steps .btn { width: 100%; }

/* 按鈕：朱紅漆、金邊，按下下沉 */
.btn, button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 18px;
  border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.3; text-decoration: none; cursor: pointer;
  color: var(--tile); background: linear-gradient(180deg, var(--red-hi), var(--red)); border: 2px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 0 #6d1c10, 0 6px 12px rgba(0, 0, 0, .4); transition: transform .08s, box-shadow .08s; }
.btn:active, button:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #6d1c10, 0 2px 6px rgba(0, 0, 0, .4); }
.btn.dark { background: linear-gradient(180deg, var(--red-hi), var(--red)); color: var(--tile); }
button { width: 100%; margin-top: 10px; }
#go { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: var(--tile-ink); border-color: #FBE7B5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 #5c4512, 0 6px 12px rgba(0, 0, 0, .4); font-size: 18px; }
button:disabled { opacity: .5; cursor: default; }
.gbtn { background: transparent; color: var(--ink); border: 1px solid var(--gold-lo); box-shadow: none; font-weight: 500; margin: 0 0 4px; }

/* 表單 */
form { padding: 24px 18px; margin-top: 12px; }
label { display: block; font-weight: 700; margin-bottom: 4px; color: var(--gold-hi); }
input[type=email] { width: 100%; min-height: 48px; padding: 8px 12px; font: 17px ui-monospace, Consolas, monospace;
  background: var(--deep); color: var(--ink); border: 1.5px solid var(--gold-lo); border-radius: 8px; }
input[type=email]::placeholder { color: var(--faint); }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, .shots:focus-visible { outline: 3px solid var(--gold-hi); 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(--red-txt); }
.hint { font-size: 15px; color: var(--muted); margin: 6px 0 16px; }
fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 4px; color: var(--gold-hi); }
.opt { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 4px 0; min-height: 40px; color: var(--ink); }
.opt input, .check input { width: 22px; height: 22px; flex: none; accent-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-weight: 400; color: var(--ink); }
.check input { margin-top: 4px; }
.opt.off { opacity: .45; }
.msg { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--gold-lo); border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.ok { border-color: var(--ok); color: var(--ok); font-weight: 700; }
.msg.err { border-color: var(--red-txt); color: var(--red-txt); }
.hp { position: absolute; left: -9999px; }
.kw { color: var(--gold-hi); font-weight: 700; }
.slots { margin: 0 0 12px; font-weight: 700; color: var(--gold-hi); }
.slots.full { color: var(--red-txt); border: 1px solid var(--red-txt); border-radius: 8px; padding: 8px 12px; }

/* 常見問題：每題一塊小漆盤 */
details { margin: 10px 0; padding: 0 16px; box-shadow: inset 0 0 0 3px var(--card2), inset 0 0 0 4px var(--rule); }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--gold-hi); }
details p { margin: 0 0 12px; }

footer { margin-top: 48px; font-size: 14px; color: var(--muted); text-align: center; text-shadow: 0 1px 2px #000; }
footer a { color: var(--muted); }
.lang { float: right; font-size: 15px; font-weight: 700; margin: 0 0 8px 12px; padding: 2px 12px; border: 1px solid var(--gold-lo); border-radius: 999px; 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: linear-gradient(180deg, #3A1A22, #2A1420); border: 2px solid var(--red-hi); border-left-width: 8px; font-weight: 500; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.note-box.important b { color: var(--red-txt); }
.note-box .imp { display: inline-block; background: var(--red); color: var(--tile); border: 1px solid #E8C9A6; font-size: 14px; font-weight: 700;
  line-height: 1.5; padding: 0 8px; border-radius: 4px; margin-right: 4px; vertical-align: 1px; }
.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(--gold); color: var(--tile-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

@media (max-width: 480px) {
  h1 { font-size: 27px; }
  .stamp { width: 64px; height: 76px; margin-top: 34px; font-size: 12px; } .stamp b { font-size: 24px; }
  .tiles span { width: 40px; height: 50px; font-size: 26px; }
  .shots figure { width: 150px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, button { transition: none; } }
.email-warn { background: color-mix(in srgb, var(--red-txt) 10%, transparent); border: 2px solid var(--red-txt); border-radius: 10px; padding: 10px 14px; margin: 4px 0 16px; font-size: 16px; font-weight: 500; }

/* 沒填或沒勾的那一組：紅框從外面收進來、晃一下、再閃三下；錯誤訊息也用提醒色（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; } }
