/* 由 ToeicApp/tools/join-gen/gen.mjs 產生（母版樣式＋活頁筆記配色）。要改配色請改 apps.json 再重新產生。 */
  :root {
    --ground: #F8F1EA; --card: #FDF9F3; --ink: #38312A; --muted: #6B6157; --faint: #70665B;
    --rule: #E5DACB; --strong: #BFAF9B; --accent: #A5513A; --ok: #4B6F43; --sel: #F0E7DC; --alert: #B3261E;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --ground: #2A241E; --card: #342D26; --ink: #F4EBDD; --muted: #D8CBB8; --faint: #B9AC99;
    --rule: #4A4036; --strong: #6A5D4F; --accent: #E58A6F; --ok: #A9C38F; --sel: #3B332B; --alert: #FF8A80;
    }
  }
  * { box-sizing: border-box; }
  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: 32px 16px 64px; }
  .mono { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; }
  h1, h2 { font-family: "Noto Serif TC", "PMingLiU", serif; line-height: 1.3; }
  h1 { font-size: 30px; margin: 8px 0 12px; }
  h2 { font-size: 20px; margin: 36px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
  .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 20px; }
  .kicker { font-size: 13px; color: var(--muted); letter-spacing: .08em; }
  .lead { color: var(--muted); margin: 0; }
  .stamp { flex: none; width: 92px; height: 92px; border: 3px solid var(--accent); border-radius: 50%; color: var(--accent);
    display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-9deg);
    font: 700 15px/1.25 "Noto Serif TC", serif; text-align: center; }
  .stamp b { font-size: 26px; }
  ol, ul { padding-left: 1.3em; margin: 8px 0; }
  li { margin: 6px 0; }
  .reward { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--accent); padding: 12px 16px; margin: 16px 0; }
  .reward b { color: var(--accent); }
  form { background: var(--card); border: 1px solid var(--rule); padding: 20px 16px; margin-top: 12px; }
  label { display: block; font-weight: 700; margin-bottom: 4px; }
  input[type=email] { width: 100%; min-height: 44px; padding: 8px 12px; font: 16px "IBM Plex Mono", ui-monospace, Consolas, monospace;
    background: var(--ground); color: var(--ink); border: 1px solid var(--strong); border-radius: 2px; }
  input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, .shots:focus-visible { outline: 3px solid var(--accent); 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(--accent); }
  .gbtn { background: transparent; color: var(--ink); border: 1px solid var(--strong); font-weight: 500; margin: 0 0 4px; }
  .gbtn:hover:not(:disabled) { border-color: var(--accent); }
  .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: flex-start; font-weight: 400; margin: 4px 0; min-height: 36px; align-items: center; }
  .opt input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
  .check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-weight: 400; }
  .check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--accent); }
  button { width: 100%; min-height: 48px; font: 700 16px "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; cursor: pointer; margin-top: 8px;
    background: var(--ink); color: var(--ground); border: 1px solid var(--ink); border-radius: 2px; }
  button:disabled { opacity: .5; cursor: default; }
  .msg { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--strong); display: none; }
  .msg.show { display: block; }
  .msg.ok { border-color: var(--ok); color: var(--ok); font-weight: 700; }
  .msg.err { border-color: var(--accent); color: var(--accent); }
  .hp { position: absolute; left: -9999px; }
  .line { background: var(--card); border: 1px solid var(--rule); padding: 16px; margin-top: 16px; }
  .line h3 { margin: 0 0 6px; font: 700 17px "Noto Serif TC", "PMingLiU", serif; }
  .line p { margin: 6px 0; }
  .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); text-decoration: none; font-weight: 700; }
  .btn.dark { background: var(--ink); color: var(--ground); }
  .kw { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; color: var(--accent); font-weight: 700; }
  a { color: var(--accent); text-underline-offset: 3px; }
  .slots { margin: 0 0 12px; font-weight: 700; }
  .slots.full { color: var(--accent); border: 1px solid var(--accent); padding: 8px 12px; }
  .opt.off { opacity: .45; }
  details { margin: 8px 0; }
  .shots { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .shots figure { flex: none; width: 200px; margin: 0; scroll-snap-align: start; }
  .shots img, .rep img { display: block; width: 100%; height: auto; border: 1px solid var(--strong); border-radius: 6px; background: var(--card); }
  figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
  .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(--accent); border-radius: 50%; box-shadow: 0 0 0 3px rgba(184, 57, 42, .25); pointer-events: none; }
  .pin span { position: absolute; right: 2%; top: 63%; background: var(--accent); color: var(--ground); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 2px; }
  summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
  footer { margin-top: 40px; font-size: 13px; color: var(--muted); }
  footer a { color: var(--muted); text-underline-offset: 3px; }
  .lang { float: right; font-size: 14px; font-weight: 700; margin: 0 0 8px 12px; }
  html[lang="en"] body { font-family: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
  html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .stamp, html[lang="en"] .line h3 { font-family: Georgia, "Times New Roman", serif; }
  html[lang="en"] button { font-family: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
  .note-box { background: var(--card); border: 1px solid var(--rule); padding: 10px 14px; font-size: 15px; }
  .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; border-radius: 2px;
    font: 700 13px "IBM Plex Mono", ui-monospace, Consolas, monospace; letter-spacing: .08em;
    background: var(--ink); color: var(--ground); border: 1px solid var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
  .to-top:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

  .steps { list-style: none; counter-reset: st; padding: 0; }
  .steps li { counter-increment: st; background: var(--card); border: 1px solid var(--rule); padding: 12px 16px; margin: 10px 0; }
  .steps li p { margin: 8px 0 0; }
  .steps .btn { width: 100%; }

  @media (max-width: 480px) { .stamp { width: 64px; height: 64px; font-size: 12px; } .stamp b { font-size: 19px; } }
  /* 重要提示：紅色粗框與「重要」標籤，一眼就看到 */
  .note-box.important { background: var(--card); background: color-mix(in srgb, var(--alert) 12%, 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: var(--ground); font-size: 13px; font-weight: 700;
    line-height: 1.5; padding: 0 8px; border-radius: 2px; margin-right: 4px; vertical-align: 1px; }
  @media (prefers-color-scheme: dark) { .note-box.important b { color: color-mix(in srgb, var(--alert) 65%, #fff); } }

  /* 螢幕閱讀器（盲人使用者）：只給讀螢幕唸、畫面上看不到的字；鍵盤按 Tab 才出現的「跳到登記表單」 */
  .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; }
  .skip:focus { top: 12px; }
  .note-box.done { border: 2px solid var(--ok); font-weight: 700; margin: 0 0 8px; }
  .shots { scroll-padding-left: 4px; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.email-warn { background: color-mix(in srgb, var(--alert) 10%, transparent); border: 2px solid var(--alert); 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(--alert)); outline-offset: 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--alert, 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, var(--alert)) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .attn { animation: none; } }
.msg.err { border-color: var(--alert, var(--alert)); color: var(--alert, var(--alert)); border-width: 2px; font-weight: 700; }

/* 封測進度（第幾天、截止、正式版上架；2026-10-28 使用者） */
.test-status { border: 2px solid var(--ok, var(--alert)); border-radius: 10px; padding: 12px 14px; margin: 16px 0;
  background: color-mix(in srgb, var(--ok, var(--alert)) 8%, transparent); }
.test-status.ended { border-color: var(--alert, var(--alert)); background: color-mix(in srgb, var(--alert, var(--alert)) 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(--alert)); 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; } }

/* 活頁筆記專屬設計「活頁本」（2026-10-28 使用者選 A）：整頁是一張活頁筆記紙，左邊是彩色分頁標籤，步驟像一頁一頁的分頁。
   顏色取自 App：分頁色 #8FA3B8 #D4857A #9DB08A #D9BE85、紙張 --card、桌面 --sel。由 apps.json 的 extraCssFile 加進 join.css；改這裡後重跑 gen.mjs。 */
body.binder { background: var(--sel); --t1: #8FA3B8; --t2: #D4857A; --t3: #9DB08A; --t4: #D9BE85; }
body.binder main { position: relative; max-width: 700px; margin: 28px auto 40px; padding: 36px 26px 56px 62px; background: var(--card);
  border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 8px 28px rgba(56, 49, 42, .12); }
/* 左邊的分頁欄：米色底、虛線分隔，上面插四個彩色分頁標籤 */
body.binder main::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 34px; background: var(--sel);
  border-right: 1px dashed var(--strong); border-radius: 14px 0 0 14px; }
body.binder main::after { content: ""; position: absolute; left: 0; top: 40px; width: 34px; height: 220px;
  background:
    linear-gradient(var(--t1), var(--t1)) 0 0 / 30px 38px no-repeat,
    linear-gradient(var(--t2), var(--t2)) 0 50px / 24px 38px no-repeat,
    linear-gradient(var(--t3), var(--t3)) 0 100px / 24px 38px no-repeat,
    linear-gradient(var(--t4), var(--t4)) 0 150px / 24px 38px no-repeat; }
/* 版頭：像筆記本第一頁，標題用襯線字，章（右上）改成方形印章 */
body.binder .top { border-bottom: 0; padding-bottom: 8px; }
body.binder h1 { font-size: 32px; letter-spacing: .02em; }
body.binder .kicker { color: var(--accent); }
body.binder .lead { background-image: repeating-linear-gradient(transparent, transparent 29px, var(--rule) 29px, var(--rule) 30px); line-height: 30px; padding-bottom: 2px; }
body.binder .stamp { border-radius: 16px; transform: rotate(-6deg); border-width: 2px; background: var(--sel); }
/* 區塊標題前面一個小分頁標籤，四色輪流 */
body.binder h2 { border-bottom: 1px dashed var(--strong); display: flex; align-items: center; gap: 10px; }
body.binder h2::before { content: ""; flex: none; width: 10px; height: 22px; border-radius: 3px 0 0 3px; background: var(--t1); }
body.binder h2:nth-of-type(4n+2)::before { background: var(--t2); }
body.binder h2:nth-of-type(4n+3)::before { background: var(--t3); }
body.binder h2:nth-of-type(4n+4)::before { background: var(--t4); }
/* 獎勵：像貼在紙上的便條 */
body.binder .reward { background: #F6EBCF; color: #38312A; border: 1px solid #E5D3A6; border-left: 1px solid #E5D3A6; border-radius: 4px; transform: rotate(-.6deg); box-shadow: 0 2px 6px rgba(56, 49, 42, .12); }
body.binder .reward b { color: #8A3F2A; }
/* 步驟：一頁一頁的分頁，左邊用分頁色，數字寫在書籤上 */
body.binder .steps li { position: relative; border-radius: 6px; border-left: 8px solid var(--t1); padding: 14px 16px 14px 56px; }
body.binder .steps li:nth-child(4n+2) { border-left-color: var(--t2); }
body.binder .steps li:nth-child(4n+3) { border-left-color: var(--t3); }
body.binder .steps li:nth-child(4n+4) { border-left-color: var(--t4); }
body.binder .steps li::before { content: counter(st); position: absolute; left: 12px; top: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sel); color: var(--accent); font: 700 17px/32px "Noto Serif TC", Georgia, serif; text-align: center; }
body.binder form { border-radius: 8px; background: var(--sel); }
body.binder .btn, body.binder button { border-radius: 8px; }
body.binder input[type=email] { border-radius: 6px; }
body.binder footer { border-top: 1px dashed var(--strong); padding-top: 14px; }
@media (max-width: 560px) {
  body.binder main { margin: 0; border-radius: 0; border-width: 0; padding: 28px 16px 48px 44px; box-shadow: none; min-height: 100vh; }
  body.binder main::before { width: 24px; border-radius: 0; }
  body.binder main::after { width: 24px; background-size: 22px 34px, 18px 34px, 18px 34px, 18px 34px; background-position: 0 0, 0 44px, 0 88px, 0 132px; }
  body.binder h1 { font-size: 26px; }
  body.binder .steps li { padding-left: 52px; }
}
@media (prefers-reduced-motion: no-preference) { body.binder .reward { transition: transform .2s; } body.binder .reward:hover { transform: rotate(0); } }
