/* 由 ToeicApp/tools/join-gen/gen.mjs 產生（母版樣式＋麻將接龍配色）。要改配色請改 apps.json 再重新產生。 */
  :root {
    --ground: #1F5A3C; --card: #16402B; --ink: #F6EEDC; --muted: #D4E3D8; --faint: #C2D6C8;
    --rule: #3B8460; --strong: #A9703F; --accent: #F2C766; --ok: #A8E0BE; --sel: #2A6E4B; --alert: #FFB09E;
  }
  @media (prefers-color-scheme: light) {
    :root {
      --ground: #1F5A3C; --card: #16402B; --ink: #F6EEDC; --muted: #D4E3D8; --faint: #C2D6C8;
    --rule: #3B8460; --strong: #A9703F; --accent: #F2C766; --ok: #A8E0BE; --sel: #2A6E4B; --alert: #FFB09E;
    }
  }
  * { 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; }
  

  /* 螢幕閱讀器（盲人使用者）：只給讀螢幕唸、畫面上看不到的字；鍵盤按 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-11-08 使用者選 B）─────
   綠桌布＋胡桃木框＋象牙牌；五個加入步驟是石板路上的五棟建築（圖用 App 首頁的 map_*.png）。
   產生器 ToeicApp/tools/join-gen 用 apps.json 的 extraCssFile 接在 join.css 最後；只換色票不算自己的設計（skill recruit-join-site）。 */
body.mjtown {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.07), transparent 60%),
    repeating-linear-gradient(45deg, rgba(0,0,0,.035) 0 2px, transparent 2px 5px),
    #1F5A3C;
}
body.mjtown main {
  border: 10px solid #7A4A24;
  outline: 2px solid #2A160A;
  box-shadow: inset 0 0 0 2px #A9703F, 0 6px 0 #2A160A;
  border-radius: 18px;
  background: #1D5638;
  margin-top: 18px; margin-bottom: 18px;
}
body.mjtown h1, body.mjtown h2 { color: #F2C766; letter-spacing: .04em; }
body.mjtown .kicker { color: #C2D6C8; }

/* 右上角的印章換成一張象牙麻將牌（紅「中」） */
body.mjtown .stamp {
  background: #FBF4E4; color: #9E2A1A; border: 2px solid #C7B48E; border-radius: 10px;
  box-shadow: 0 6px 0 #2E8B5E, 0 7px 0 #1C6644;
  transform: rotate(4deg);
}
body.mjtown .stamp span, body.mjtown .stamp b { color: #9E2A1A; }

/* 獎勵框：朱紅緞帶 */
body.mjtown .reward {
  background: #8C2F25; color: #FFF6E8; border: 2px solid #F2C766; border-radius: 12px;
}
body.mjtown .reward b { color: #FFE9A8; }

/* 重點小卡：一張張象牙牌，底下露出綠色牌背 */
body.mjtown .facts li {
  background: #FBF4E4; color: #3A2A14; border: 1px solid #C7B48E; border-radius: 10px;
  box-shadow: 0 5px 0 #2E8B5E, 0 6px 0 #1C6644;
}
body.mjtown .facts li b { color: #7A2A1C; }
body.mjtown .facts li span:not(.ic) { color: #4E4130; }

/* 提示框、表單：深綠漆盤＋金邊 */
body.mjtown .note-box, body.mjtown form, body.mjtown .line, body.mjtown details {
  background: #16402B; border: 1px solid #C08A2C; border-radius: 12px;
}
body.mjtown .note-box.important { background: #4A1C14; border: 2px solid #FFB09E; }

/* 五個步驟＝石板路上的五棟建築，左右交錯，中間一條虛線石板路 */
body.mjtown ol.steps {
  list-style: none; padding: 0; margin: 18px 0; position: relative; counter-reset: s;
}
body.mjtown ol.steps::before {
  content: ""; position: absolute; top: 40px; bottom: 40px; left: 50%; width: 0;
  border-left: 6px dashed #D9C79E; transform: translateX(-3px); opacity: .55;
}
body.mjtown ol.steps > li {
  counter-increment: s; position: relative; width: 62%; min-height: 128px; box-sizing: border-box;
  margin: 0 0 14px; padding: 12px 14px 12px 120px;
  background: #16402B; border: 1px solid #C08A2C; border-radius: 14px;
}
body.mjtown ol.steps > li:nth-child(even) { margin-left: 38%; }
body.mjtown ol.steps > li::before {
  content: ""; position: absolute; left: 8px; top: 10px; width: 104px; height: 108px;
  background: center bottom / contain no-repeat;
}
body.mjtown ol.steps > li::after {
  content: counter(s); position: absolute; left: 6px; top: 6px; width: 30px; height: 38px;
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
  background: #FBF4E4; color: #9E2A1A; border: 1px solid #C7B48E; border-radius: 6px;
  box-shadow: 0 3px 0 #2E8B5E;
}
body.mjtown ol.steps > li:nth-child(1)::before { background-image: url("img/map_temple.png"); }
body.mjtown ol.steps > li:nth-child(2)::before { background-image: url("img/map_teahouse.png"); }
body.mjtown ol.steps > li:nth-child(3)::before { background-image: url("img/map_board.png"); }
body.mjtown ol.steps > li:nth-child(4)::before { background-image: url("img/map_stall.png"); }
body.mjtown ol.steps > li:nth-child(5)::before { background-image: url("img/map_mansion.png"); }
@media (max-width: 640px) {
  body.mjtown main { border-width: 6px; }
  body.mjtown ol.steps::before { left: 52px; }
  body.mjtown ol.steps > li, body.mjtown ol.steps > li:nth-child(even) { width: 100%; margin-left: 0; padding-left: 104px; }
  body.mjtown ol.steps > li::before { width: 88px; height: 92px; }
}

/* 按鈕：朱紅漆面、金邊（深色字改淺色） */
body.mjtown .btn, body.mjtown .btn.dark, body.mjtown button#go {
  background: #B3341F; color: #FFF6E8; border: 2px solid #F2C766; border-radius: 12px;
  box-shadow: 0 4px 0 #5E1A0E;
}
body.mjtown .btn:active, body.mjtown button#go:active { transform: translateY(3px); box-shadow: 0 1px 0 #5E1A0E; }
body.mjtown .gbtn { background: #FBF4E4; color: #3A2A14; border: 1px solid #C7B48E; }
body.mjtown input[type=email] { background: #FBF4E4; color: #2A1E0E; border: 2px solid #C08A2C; }
body.mjtown .kw { background: #FBF4E4; color: #9E2A1A; border-radius: 6px; padding: 0 6px; }
body.mjtown a:not(.btn):not(.lang):not(.skip) { color: #FFE08A; }
@media (prefers-reduced-motion: reduce) { body.mjtown .stamp { transform: none; } }
