/*
 * 會員與報名流程的樣式
 *
 * 由 node v3/make_forms_css.js 從 _ref/site_css.js 抽出，不要直接改這一支；
 * 要改請改來源再重跑。只有 login／register／account／programme／apply／
 * apply-done 這幾頁會載入。
 *
 * 顏色一律沿用 header.css 的變數，所以年度換色時這幾頁會跟著換。
 */

:root {
  --radius-lg: 10px;
  /*
   * 必填的星號是 13.4px/600 的小字，AAA 要 7:1。
   * 原本的 #B3261E 在白底只有 6.54、在淺色帶更低到 5.45，
   * 沿同一個色相壓深到 #8F1E18：白底 8.84、淺色帶 7.37、
   * 條件必填的米底 8.22、通過狀態的綠底 8.01，四種底色都過。
   */
  --danger: #8F1E18;
  --ok-bg: #EDF6EE;
  --ok-line: #C5E2CA;
  --ok-dot: #2E7D32;
}

/* 表單這一段的寬度收窄，一行太長讀起來很累 */
.formband .wrap { max-width: 64rem; }

/*
 * 次要按鈕：原本 .btn.o 與 .btn.ghost 沒有規則，看起來跟主按鈕一樣，
 * 一排三顆都是深色分不出主次。改成外框樣式。
 */
.formband .btn.o,
.formband .btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.formband .btn.o:hover,
.formband .btn.ghost:hover { background: var(--sand); }


/*
 * 以下四組是 Laravel 實際輸出的那兩頁才會用到的：
 * 退回狀態的狀態框、欄位錯誤訊息、驗證碼欄位、只有一顆按鈕的登出表單。
 */
:root {
  /*
   * 退回狀態的底色。--danger 在這個底色上是 7.62、
   * 內文的 --muted 是 7.45，小字 AAA 要的 7:1 兩者都過。
   */
  --bad-bg: #FBEAE8;
  --bad-line: #EFC9C4;
}
.statebox.bad { background: var(--bad-bg, #FBEAE8); border: 1px solid var(--bad-line, #EFC9C4); }
.statebox.bad .dot { background: var(--danger, #8F1E18); }

/*
 * 欄位錯誤訊息。訊息本身就是文字，不是只靠紅色表示出錯，
 * 所以不另外加圖示（圖示在部分螢幕閱讀器會被唸成奇怪的字）。
 */
.formband .fld .err {
  display: block;
  margin-top: .35rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--danger, #8F1E18);
}
.formband [aria-invalid="true"] {
  border-color: var(--danger, #8F1E18);
  box-shadow: 0 0 0 1px var(--danger, #8F1E18);
}

/*
 * 驗證碼欄位。等寬字並拉開字距，六個字元一眼看得出有幾個；
 * 不用 inputmode="numeric"，碼裡有英文字母。
 */
.formband .codefld {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.3rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  max-width: 14rem;
}

/* 登出是 POST，所以是一個只有一顆按鈕的表單，要能排在句子裡 */
.formband .inlineform { display: inline; }

/* 按鈕與連結的點擊區至少 44px，鍵盤焦點要看得見 */
.formband .btn,
.formband button,
.formband .gbtn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.formband a:focus-visible,
.formband button:focus-visible,
.formband input:focus-visible,
.formband select:focus-visible,
.formband textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.btn.lg { padding: .85rem 1.9rem; font-size: 1rem; }
.navdd > summary.on { color: var(--primary); font-weight: 600; }
.yearpick > summary .dot { width: .42rem; height: .42rem; border-radius: 50%; background: var(--gold); flex: none; }
.notes { list-style: none; margin: 0; padding: 0; max-width: 50rem; }
.notes li { position: relative; padding-left: 1.6rem; margin-bottom: 1rem; color: var(--muted); }
.notes li::before { content: ""; position: absolute; left: 0; top: .65rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.notes li b { color: var(--ink); font-weight: 600; }
.lecturers.one { max-width: 34rem; }
/* ---------- 會員與報名 ---------- */
.steps { display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; margin: 0 auto 2.5rem; padding: 0; counter-reset: s; max-width: 46rem; }
.steps li {
  flex: 1 1 10rem; border-top: 3px solid var(--line); padding-top: .7rem;
  font-size: .85rem; color: var(--muted); counter-increment: s;
}
.steps li::before {
  content: counter(s, decimal-leading-zero); display: block;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; color: var(--gold-text); margin-bottom: .2rem;
}
.steps li.on { border-top-color: var(--primary); color: var(--ink); font-weight: 600; }
.steps li.on::before { color: var(--primary); }
.steps li.done { border-top-color: var(--gold); }
/* 已完成的階段改標勾號，不再顯示編號 */
.steps li.done::before { content: "\2713"; font-size: .82rem; letter-spacing: 0; }
.steps li .rng { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); margin-top: .15rem; }
/*
 * 當前階段的子步驟。
 * 每一列要讓學生看得出「現在等誰」——等承辦人還是等自己動作，
 * 這是客服詢問量的主要來源。
 */
.substeps { list-style: none; margin: 0 auto 1.6rem; padding: 0; max-width: 46rem; }
.substeps li {
  position: relative; padding: .5rem 0 .5rem 2rem;
  font-size: .88rem; color: var(--muted);
}
.substeps li::before {
  content: ""; position: absolute; left: .3rem; top: .92rem;
  width: .62rem; height: .62rem; border-radius: 50%;
  border: 2px solid var(--line); background: #fff; box-sizing: border-box;
}
.substeps li::after {
  content: ""; position: absolute; left: .61rem; top: 1.62rem; bottom: -.25rem;
  border-left: 2px solid var(--line);
}
.substeps li:last-child::after { display: none; }
.substeps li.done { color: var(--ink); }
.substeps li.done::before { border-color: var(--gold); background: var(--gold); }
.substeps li.now { color: var(--ink); font-weight: 600; }
.substeps li.now::before {
  border-color: var(--primary); background: var(--primary);
  box-shadow: 0 0 0 4px rgba(93,0,17,.12);
}
.substeps .who {
  display: inline-block; margin-left: .5rem; font-size: .72rem; font-weight: 600;
  border-radius: 999px; padding: .12rem .6rem; vertical-align: .08em; white-space: nowrap;
}
.substeps .who.you { background: var(--primary); color: #fff; }
.substeps .who.them { background: rgba(158,125,81,.14); color: var(--gold-text); }
.substeps .miss { display: block; margin-top: .3rem; font-size: .8rem; font-weight: 400; color: var(--muted); }
/* 原型專用：切換階段以便檢視各階段畫面，正式版不輸出 */
.stagepick {
  max-width: 46rem; margin: 0 auto 1.3rem; padding: .7rem .9rem;
  border: 1px dashed var(--line); border-radius: var(--radius-lg, 10px);
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: center;
}
.stagepick b {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-right: .25rem;
}
.stagepick button {
  font: inherit; font-size: .78rem; border: 1px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 999px;
  padding: .26rem .72rem; cursor: pointer;
}
.stagepick button[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.formcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg, 10px);
  box-shadow: var(--shadow-sm); padding: 2rem; max-width: 46rem;
}
.formcard { margin-inline: auto; }
.formcard + .formcard { margin-top: 1.5rem; }
.formcard > h2 { font-size: 1.1rem; margin: 0 0 1.25rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
/* 區塊說明文字，放在標題與欄位之間 */
.formnote { margin: -.5rem 0 1.25rem; font-size: .86rem; color: var(--muted); line-height: 1.7; }
.formnote b { color: var(--ink); font-weight: 600; }
/* 選購項目的價格標籤 */
.pricetag { display: inline-block; margin-left: .5rem; padding: .1rem .5rem; border-radius: 999px;
  background: var(--hero-deep); color: var(--gold-text); font-family: var(--mono);
  font-size: .76rem; font-weight: 700; }
/* 條件式必填欄位：僅特定課程需要 */
.fld.condreq { display: block; margin-bottom: 1.1rem; padding: 1rem 1.1rem;
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--sand); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: .25rem 1.25rem; }
.fields.one { grid-template-columns: 1fr; }
.fld { display: block; margin-bottom: 1.1rem; }
.fld > span { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .32rem; }
.fld > span em { font-style: normal; color: var(--danger, #B3261E); }
.fld input[type="text"], .fld input[type="email"], .fld input[type="password"],
.fld input[type="tel"], .fld input[type="date"], .fld input[type="file"], .fld select, .fld textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem;
  font: inherit; font-size: .92rem; background: var(--bg); color: var(--ink);
  /* AAA 的點擊目標要 44px；只靠 padding 算出來是 43px，差一個 px 就不合格 */
  min-height: 2.75rem;
}
.fld textarea { min-height: 7rem; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93,0,17,.1);
}
.fld .hint { font-size: .78rem; color: var(--muted); margin-top: .28rem; }
/* 長得像連結的按鈕：用來開條款視窗，語意上是按鈕不是連結 */
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--primary);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.linkbtn:hover { text-decoration-thickness: 2px; }
.linkbtn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/*
 * 條款視窗。
 * 沒有 JS 的時候內容要直接攤在頁面上 —— 不能讓人勾「我已閱讀」
 * 卻打不開內容，所以隱藏規則只掛在 html.js 底下。
 */
.infodlg { border: 0; padding: 0; background: none; }
/*
 * 瀏覽器內建樣式就是 dialog:not([open]) { display: none }，
 * 所以沒有 JS 的時候要明確把它顯示出來，不能只靠不加隱藏規則。
 */
html:not(.js) .infodlg { display: block; position: static; max-width: none; }
.js .infodlg:not([open]) { display: none; }
.infodlg::backdrop { background: rgba(28, 19, 18, .55); }
.infodlg-box {
  background: var(--paper, #fff); color: var(--ink); border-radius: var(--radius-lg, 10px);
  padding: 1.4rem 1.5rem; max-width: 44rem; max-height: 80vh; overflow-y: auto;
  border: 1px solid var(--line);
}
.infodlg-box h3 { margin: 0 0 .8rem; font-size: 1.1rem; }
.infodlg .dlglist { margin: 0; padding-left: 1.2rem; font-size: .92rem; line-height: 1.7; }
.infodlg .dlglist li { margin-bottom: .55rem; }
.infodlg-acts { margin-top: 1.2rem; display: flex; justify-content: flex-end; }
/* 沒有 JS 時那顆關閉鈕沒有意義，藏起來 */
html:not(.js) .infodlg-acts { display: none; }
/*
 * 備取順位。
 * 備取生最先想知道的就是「我第幾個」，所以名次做成大字，
 * 說明文字接在旁邊而不是上面，一眼就看得到重點。
 */
.waitnum { display: flex; align-items: baseline; gap: .7rem; margin: .2rem 0 1.1rem; }
.waitnum b { font-size: 2.6rem; line-height: 1; font-weight: 700; color: var(--primary); }
.waitnum span { font-size: .9rem; color: var(--muted); }
/* 尺寸對照表 */
.sizechart { margin: -.4rem 0 1.1rem; }
.sizechart > summary {
  cursor: pointer; font-size: .84rem; color: var(--primary);
  padding: .55rem 0; min-height: 2.75rem; display: flex; align-items: center;
}
.sizechart > summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sizechart-box { padding: .2rem 0 .6rem; }
.sizechart table { border-collapse: collapse; font-size: .88rem; }
.sizechart caption { text-align: left; font-size: .78rem; color: var(--muted); padding-bottom: .4rem; }
.sizechart th, .sizechart td {
  border: 1px solid var(--line); padding: .45rem .9rem; text-align: left;
}
.sizechart thead th { background: var(--sand, #F3E9DC); }
/*
 * 版型建議表有八欄（身高加七個體重級距），手機放不下。
 * 讓盒子自己橫向捲動，不要去壓字級 —— 壓到讀不出來等於沒有這張表。
 */
.sizechart-box { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sizechart .fitchart { margin-top: 1.2rem; font-size: .82rem; }
.sizechart .fitchart th, .sizechart .fitchart td {
  padding: .4rem .6rem; text-align: center; white-space: nowrap;
}
.sizechart .fitchart th[scope="row"] { text-align: left; }
.fld.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; }
.fld.check input { width: 1.05rem; height: 1.05rem; margin-top: .2rem; accent-color: var(--primary); flex: none; }
/*
 * 勾選框的說明要自成一行。
 * 一般欄位的 .hint 是 .fld 這個直向 flex 的子項，所以自然換行；
 * 但勾選框的 hint 包在標籤的 <span> 裡面，是 inline 的，
 * 上面那條 .fld .hint 的 margin-top 對 inline 元素也不生效，
 * 結果說明會直接黏在標籤文字後面（「…programme.Please read…」）。
 */
.fld.check .hint { display: block; margin-top: .35rem; }
.pick { display: grid; gap: .75rem; }
.pick label { position: relative; cursor: pointer; display: block; }
.pick input { position: absolute; opacity: 0; }
.pick .box {
  border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem;
  display: flex; gap: 1rem; align-items: flex-start; transition: border-color .15s, box-shadow .15s;
}
.pick input:checked + .box { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(93,0,17,.07); }
.pick .box b { display: block; font-size: .96rem; }
.pick .box span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.6; margin-top: .2rem; }
.pick .box .mark { font-family: var(--mono); font-size: .78rem; color: var(--gold-text); flex: none; padding-top: .15rem; }
.statebox { display: flex; gap: 1.1rem; align-items: flex-start; border-radius: var(--radius-lg, 10px); padding: 1.35rem 1.5rem; margin: 0 auto 1.5rem; max-width: 46rem; }
.statebox.wait { background: var(--sand); border: 1px solid var(--line); }
.statebox.ok { background: var(--ok-bg, #EDF6EE); border: 1px solid var(--ok-line, #C5E2CA); }
.statebox .dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; margin-top: .55rem; }
.statebox.wait .dot { background: var(--gold); }
.statebox.ok .dot { background: var(--ok-dot, #2E7D32); }
/*
 * 只有標題那個 b 要獨立成一行。寫成 .statebox b 會連內文裡
 * 強調信箱用的 <b> 一起變成區塊，後面的句點被擠到下一行變成「 . 」
 */
.statebox > div > b { display: block; font-size: 1rem; margin-bottom: .25rem; }
.statebox p { margin: 0; font-size: .88rem; color: var(--muted); }
.summary { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--line); }
.summary li { display: flex; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.summary li b { flex: none; width: 10rem; color: var(--muted); font-weight: 600; }
.formacts { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }
.formacts .side { margin-left: auto; font-size: .86rem; color: var(--muted); }
/* 只有一個動作時讓按鈕佔滿寬度 */
.formacts.one { display: block; }
/* 卡片底部的補充說明，與上方內容用細線隔開 */
.formfoot {
  margin: 1.5rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line);
  font-size: .88rem; color: var(--muted); line-height: 1.7;
}
/*
 * 第三方登入按鈕
 * 依 Google 的識別規範：白底、灰框、深灰字，標誌不另外上色
 */
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  width: 100%; box-sizing: border-box;
  background: var(--surface); color: var(--ink) !important;
  border: 1px solid #747775; border-radius: var(--radius);
  padding: .8rem 1.4rem; font-size: 1rem; font-weight: 600;
  text-decoration: none; line-height: 1.5;
  transition: background .15s ease, border-color .15s ease;
}
.gbtn:hover { background: #F7F3EE; border-color: var(--ink); }
.gbtn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gmark { width: 1.25rem; height: 1.25rem; flex: none; }
/* 由第三方帶入、不開放修改的欄位 */
.fld input[readonly] { background: var(--sand); color: var(--muted); cursor: default; }
.fld input[readonly]:focus { border-color: var(--line); box-shadow: none; }
.themebar a.on { background: #F4ECE3; color: #181210; border-color: #F4ECE3; font-weight: 700; }
@media (max-width: 640px) {
  /* 資料列改直式，長信箱才不會撐破 */
  .summary li { flex-direction: column; gap: .15rem; }
  .summary li b { width: auto; font-size: .82rem; }
  .summary li span { word-break: break-word; }
}
/* ---------- 可報名項目一覽 ---------- */

/* 只給讀屏用的標題。本站原本沒有這個工具類別 */
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.actlist { width: 100%; border-collapse: collapse; margin: 1.25rem 0 .5rem; }
.actlist th, .actlist td {
  text-align: left; vertical-align: top; padding: .85rem .9rem;
  border-bottom: 1px solid var(--line-soft); font-weight: 400;
}
.actlist thead th {
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid var(--line);
  padding-bottom: .5rem; font-weight: 600;
}
.actlist tbody th { padding-right: 1.5rem; }
.actlist b { display: block; color: var(--ink); font-weight: 600; }
.actlist span { display: block; font-size: .84rem; color: var(--muted); margin-top: .15rem; }
.actlist tr.opt th b { font-weight: 400; }
/* ---------- 行程月曆 ---------- */

/* 原型框：清楚標示這一塊的資料還不是正式的 */
.proto {
  border: 2px dashed var(--line); border-radius: var(--radius-lg, 10px);
  padding: 1.1rem 1.1rem 1.35rem; margin: 1.25rem 0 1rem;
  background: var(--bg);
}
.proto > b {
  display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: .9rem;
}
.tag.course { border-left-color: var(--primary); background: #F0E4E6; }
.tag.tour { border-left-color: var(--gold); background: #F7EEDF; }
.tag.extra { border-left-color: #35525C; background: #E6EDEF; }
.tag.key { border-left-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.tag.travel { border-left-color: var(--muted); background: var(--line-soft); }
.callegend { list-style: none; margin: 1.1rem 0 0; padding: 0; font-size: .82rem; color: var(--muted); }
.callegend li { display: flex; gap: .55rem; align-items: center; margin-top: .4rem; }
.callegend .tag { margin: 0; flex: none; width: 2.2rem; }
.calnote { margin: .9rem 0 0; font-size: .8rem; color: var(--muted); }
/*
 * 逐日課表。
 * 2026-11-13 依客戶第 10 則註解，從「窄螢幕才出現的替代清單」
 * 改成各寬度都是主體 —— 客戶要的是每日詳細課表，不是月曆。
 */
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { border-bottom: 1px solid var(--line-soft); }
.agenda li:last-child { border-bottom: 0; }
.agenda b { font-size: .9rem; color: var(--ink); }
.agenda .tag { margin: 0; }
.agenda .day > summary {
  display: grid; grid-template-columns: 9rem 1fr; gap: .6rem; align-items: center;
  /* 點擊目標 44px */
  min-height: 2.75rem; padding: .6rem .2rem; cursor: pointer;
}
.agenda .day > summary:focus-visible { outline: 3px solid var(--primary); outline-offset: -2px; }
.agenda .day > summary span { display: flex; flex-wrap: wrap; gap: .3rem; }
.agenda .day[open] > summary { font-weight: 600; }
.daytable { width: 100%; border-collapse: collapse; margin: .2rem 0 .9rem; font-size: .86rem; }
.daytable th, .daytable td {
  text-align: left; padding: .45rem .7rem; border-top: 1px solid var(--line-soft);
  vertical-align: top;
}
.daytable thead th { font-size: .78rem; color: var(--muted); font-weight: 600; }
.daytable tbody th { white-space: nowrap; font-weight: 400; color: var(--ink); }
.daytable .venue { color: var(--muted); }
@media (max-width: 560px) {
  .agenda .day > summary { grid-template-columns: 1fr; gap: .25rem; }
  .daytable thead { display: none; }
  .daytable tbody th, .daytable td { display: block; border-top: 0; padding: .1rem .2rem; }
  .daytable tbody tr { display: block; border-top: 1px solid var(--line-soft); padding: .5rem 0; }
}
@media (max-width: 760px) {
  .calnote { display: none; }
  .actlist thead { display: none; }
  .actlist tbody th, .actlist td {
    display: block; border-bottom: 0; padding: .2rem 0;
  }
  .actlist tbody th { padding-top: 1rem; }
  .actlist tbody tr { display: block; border-bottom: 1px solid var(--line-soft); padding-bottom: .9rem; }
  .actlist td::before {
    content: attr(data-l); display: block; font-size: .7rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted);
  }
}
/* ---------- 日期欄位本身 ---------- */
input.dp {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A4F49' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 1.15em 1.15em;
  padding-right: 2.5em !important;
}
input.dp::placeholder { color: var(--muted); opacity: .75; }
