/* 碼庫平台會員的頁與公司的頁幾頁共用的版面：服務卡、方案卡、卡片與清單、表格與表單、付款結果、對話框這類；
   只有一頁用的寫在那一頁的資料夾 /{語言}/pages/{頁}/style.css。
   排在 site.css 後面、頁的 style.css 前面載入；版面照設計定案 marku/products/membership/design/platform/README.md「版面」：手機 375 一欄、
   桌機 900 以上兩欄或格狀、內容最寬 1180。MarkuUI 的元件只換 --marku-* 變數（方案卡的訂閱鈕、價格、積木盒），不蓋元件內部的樣式。 */
@keyframes rise { from { transform: translateY(14px) scale(0.98); } }
.section { padding-block: 56px 0; }
.section--last { padding-bottom: 72px; }
.sec-head { display: grid; gap: 6px; margin-bottom: 24px; max-width: 760px; }
.sec-head h2 { font-size: var(--fs-h2); font-weight: 750; line-height: 1.35; }
.sec-head p { color: var(--muted); }
.svcs { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.svc {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: border-color 180ms, box-shadow 180ms, transform 180ms var(--ease);
}
.svc:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
/* 整張卡點得到：名稱的連結蓋滿整張卡；卡裡的另一個入口（svc__more）疊在上面、各自點 */
.svc__link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.svc__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.svc__link:focus-visible { outline: none; }
.svc__link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 2px; }
.svc__icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px rgb(0 0 0 / 6%); }
.svc__body { display: grid; gap: 6px; min-width: 0; }
.svc__where { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.svc__name { display: flex; align-items: center; gap: 6px; font-size: 1.125rem; font-weight: 750; line-height: 1.35; }
.svc__go { width: 18px; height: 18px; color: var(--muted); transition: transform 180ms var(--ease), color 180ms; }
.svc:hover .svc__go { color: var(--ink); transform: translate(2px, -2px); }
.svc__desc { font-size: 0.9375rem; line-height: 1.65; }
html[data-who="in"][data-who-paid] #member-block { display: none; }
.bricks-count { color: var(--muted); font-size: 0.9375rem; }
.bricks-count b { color: var(--ink); font-size: var(--fs-title); font-weight: 750; font-variant-numeric: tabular-nums; margin-right: 4px; }
.plansum { display: flex; align-items: center; gap: 16px; }
.plansum__body { display: grid; gap: 4px; min-width: 0; }
.plansum__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plansum__name { color: var(--ink); font-size: var(--fs-h2); font-weight: 800; line-height: 1.2; }
.plansum__line { color: var(--text); font-size: 0.9375rem; }
.plansum__line.is-warn { color: var(--warn); font-weight: 600; }
.card__hint--top { margin-top: 12px; }
.login__card { width: 100%; max-width: 460px; justify-self: center; padding: 28px 22px; }
.login__card .title { margin-bottom: 10px; }
.login__card hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0 16px; }
.login__card .alert { margin-bottom: 16px; }
.login__consent { margin-top: 14px; color: var(--muted); font-size: var(--fs-small); line-height: 1.65; }
.login__consent a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.chip--from { margin-bottom: 18px; padding: 4px 12px 4px 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.chip--from img { border-radius: 6px; }
/* Google 的登入鈕照 Google 的品牌規範：淺色白底、#747775 框、#1F1F1F 字；深色 #131314 底、#8E918F 框、#E3E3E3 字 */
.gbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #747775;
  border-radius: 12px;
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 160ms, box-shadow 160ms;
}
.gbtn:hover:not(:disabled) { background: #f8f9fa; box-shadow: 0 1px 3px rgb(60 64 67 / 20%); }
.gbtn:disabled { cursor: default; }
.gbtn.is-busy { color: #444746; }
.gbtn__g { width: 20px; height: 20px; flex: none; }
@media (prefers-color-scheme: dark) {
  .gbtn { background: #131314; border-color: #8e918f; color: #e3e3e3; }
  .gbtn:hover:not(:disabled) { background: #1f1f20; }
  .gbtn.is-busy { color: #c4c7c5; }
}
/* ---------- 方案 ---------- */
.page-head { display: grid; gap: 12px; padding-block: 36px 24px; justify-items: start; }
.page-head .alert { width: 100%; max-width: 760px; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-tint); }
.seg__opt { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 650; font-size: 0.9375rem; cursor: pointer; }
/* 選中的那一種：pages/plans/script.js 換上的鈕照 aria-checked；換上之前照 <html data-pay>（js/who-early.js 照記下的 defaults 標）標同一個樣子 */
.seg__opt[aria-checked="true"],
html[data-pay="TWD"] .seg__opt[data-pay-opt="TWD"],
html[data-pay="USD"] .seg__opt[data-pay-opt="USD"],
html[data-pay="USD-TW"] .seg__opt[data-pay-opt="USD"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
/* 產頁時寫好的「台灣的付款即將開放」（gen-pages.mjs 的 plansMain，正式站還沒開通時才有）：先顯示新台幣、還沒訂閱的人才看到；
   pages/plans/script.js 照 ShopPlans 換上同一句（測試站開通了，換上時這一句會拿掉） */
.plans__twd-wait { display: none; }
html[data-pay="TWD"]:not([data-who-method]) .plans__twd-wait,
html:not([data-pay]) .plans-page[data-currency="TWD"] .plans__twd-wait { display: grid; }
/* 三套價格（中英文都有）：顯示哪一套照 <html data-pay>：TWD 新台幣、USD 美元在台灣以外使用、USD-TW 美元在台灣使用（含稅）；
   wait 是還不知道先選哪一種（沒記過 defaults），價格的位置放一樣高的骨架，pages/plans/script.js 問到再畫；沒開 JavaScript 時照產頁寫的 data-currency */
html[data-pay="TWD"] [data-currency-show]:not([data-currency-show="TWD"]),
html[data-pay="USD"] [data-currency-show]:not([data-currency-show="USD"]),
html[data-pay="USD-TW"] [data-currency-show]:not([data-currency-show="USD-TW"]),
html[data-pay="wait"] [data-currency-show],
html:not([data-pay]) .plans-page[data-currency="TWD"] [data-currency-show]:not([data-currency-show="TWD"]),
html:not([data-pay]) .plans-page[data-currency="USD"] [data-currency-show]:not([data-currency-show="USD"]) { display: none !important; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  --marku-font-size-large: 1.75rem;
}
/* 推薦的方案頂邊的雙色條：畫成卡片背景的一層（背景照卡片的圓角裁），條的兩端跟框線同一個弧度；頂邊的框線讓給色條 */
.plan--featured { border-color: var(--line-strong); border-top-color: transparent; box-shadow: var(--shadow-2); background: var(--brand-bar) top / 100% 5px no-repeat border-box, var(--surface); }
/* 目前的方案：pages/plans/script.js 換上的卡標 .plan--current；換上之前，記得登入狀態的照 <html data-who-plan> 先標同一個樣子 */
.plan--current,
html[data-who="in"][data-who-plan="free"] .plan[data-plan="free"],
html[data-who="in"][data-who-plan="plus"] .plan[data-plan="plus"],
html[data-who="in"][data-who-plan="pro"] .plan[data-plan="pro"],
html[data-who="in"][data-who-plan="max"] .plan[data-plan="max"],
html[data-who="in"][data-who-plan="ultra"] .plan[data-plan="ultra"] { border: 2px solid var(--ink); padding: 21px 19px 19px; }
.plan--featured.plan--current,
html[data-who="in"][data-who-plan="pro"] .plan--featured[data-plan="pro"] { border-top-color: transparent; }
.plan__zh { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.plan__tax { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.plan__allow { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg-tint); }
.plan__allow b { color: var(--ink); font-size: 0.9375rem; line-height: 1.45; }
.plan__allow span { color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.plan__list { display: grid; gap: 8px; align-content: start; font-size: 0.875rem; line-height: 1.55; }
.plan__list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; }
.plan__list .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--good); }
/* 螢幕閱讀器用的隱藏字是 position: absolute，可以橫捲的框要 relative，不然會把手機整頁撐寬（web-engineer-notes.md 第 12 條） */
.table-box { position: relative; margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 0 12px; padding: 0 2px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; cursor: pointer; }
.back:hover { color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
.stat { display: grid; align-content: start; gap: 4px; }
.stat .card__label { margin-bottom: 2px; }
.stat__n { color: var(--ink); font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__sub { color: var(--muted); font-size: var(--fs-small); }
/* 手機：只留數字，四欄放得下、不必橫捲 */
.chip--bad { background: var(--bad-soft); color: var(--bad); }
.chip--info { background: var(--cyan-soft); color: var(--cyan-ink); }
.alert--good { background: var(--good-soft); color: var(--ink); }
.alert--good > .ic { color: var(--good); }
/* ---------- 付款結果、刪除完成、取消收信 ---------- */
.result { display: grid; justify-items: center; gap: 16px; max-width: 600px; padding-block: 40px 80px; text-align: center; }
.result__art { width: 200px; }
.result__art img { width: 100%; }
/* 產頁時寫的骨架（gen-pages.mjs 的 resultWaitHtml）：圖、標題、一段話，跟換上的同樣置中 */
.result > .skel--art { width: 200px; height: 200px; border-radius: 24px; }
.result > .skel--title { width: min(360px, 80%); }
.result > .skel--block { width: 100%; height: 120px; }
.result__art--success img { animation: click 700ms var(--ease) both; }
.result__art--pending img { animation: hover 2.4s ease-in-out infinite; }
@keyframes click { 0% { transform: translateY(-14px) scale(0.94); } 60% { transform: translateY(2px) scale(1.02); } 100% { transform: none; } }
@keyframes hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.result__lede { max-width: 32em; color: var(--text); }
.result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ticks { display: grid; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; }
.ticks li .ic { margin-top: 4px; color: var(--good); }
.ticks--plain li .ic { color: var(--muted); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-l); text-align: center; color: var(--text); }
.empty--quiet { padding: 28px 16px; color: var(--muted); }
.empty__ic { width: 28px; height: 28px; color: var(--muted); }
/* 沒有空格的長字（代號、路徑）在窄螢幕斷行，不撐出框外 */
.empty p { max-width: 100%; overflow-wrap: anywhere; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 7em) minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.row:last-child { border-bottom: 0; }
.row dt { color: var(--muted); }
.row dd { min-width: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 22.5rem) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
/* 320 這一級的手機：欄名放在值的上面，值有整行寬（email 在 @ 前面換行就放得下，不從名稱的中間斷） */
.row__plan, .row__google { display: inline-flex; align-items: center; gap: 8px; }
.row__note { display: block; color: var(--muted); font-weight: 400; font-size: 0.8125rem; }
.narrow { max-width: 640px; padding-block: 24px 80px; }
/* 產頁時寫的骨架（gen-pages.mjs 的 deleteWaitHtml）：刪除帳號那一張卡 */
.narrow > .skel--card { height: 360px; border-radius: var(--r-l); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--bad); }
/* 額度與積木盒：每週額度怎麼分（固定比例一格 5%）與額外用量（上限、打開前的同意、收款紀錄）；錨點給用到額度的地方連過來 */
#allocation, #extra, #box { scroll-margin-top: 84px; }
.check--plain { padding: 0; border: 0; }
.check--plain input { accent-color: var(--ink); }
/* 對話框：手機從下方滑上、桌機淡入 */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: end center;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  background: var(--scrim);
  animation: fade 160ms ease;
}
.dialog { display: grid; gap: 16px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); box-shadow: var(--shadow-3); animation: sheet 260ms var(--ease); }
.dialog:focus { outline: none; }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
.dialog__title { font-size: var(--fs-h2); font-weight: 750; line-height: 1.35; }
.dialog__actions { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.dialog__actions .btn { flex: 1 1 140px; }
@media (min-width: 640px) {
  .svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc--site { grid-column: span 2; }
  .plan { display: grid; grid-row: span 6; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 12px; margin-bottom: 14px; align-content: start; }
  .dialog { margin: 16px; padding: 26px 26px 22px; border-radius: var(--r-xl); }
  .scrim { place-items: center; }
  .dialog__actions .btn { flex: 0 0 auto; }
}
/* ---------- 寬一點的螢幕 ---------- */
@media (min-width: 900px) {
  .svcs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .svc--site { grid-column: span 3; }
  .svc--app { grid-column: span 2; }
  .svc--pair { grid-column: span 3; }
  .svc--full { grid-column: span 6; }
  .login__card { justify-self: start; padding: 36px 32px; }
}
@media (min-width: 1180px) {
  /* 五欄最窄（1180）的卡，內容寬約 178px：價格 1.375rem 時最長的「US$199.99/month」也放得下一行，五張一樣高 */
  .plan { padding: 22px 16px 18px; --marku-font-size-large: 1.375rem; }
  .plan--current,
  html[data-who="in"][data-who-plan="free"] .plan[data-plan="free"],
  html[data-who="in"][data-who-plan="plus"] .plan[data-plan="plus"],
  html[data-who="in"][data-who-plan="pro"] .plan[data-plan="pro"],
  html[data-who="in"][data-who-plan="max"] .plan[data-plan="max"],
  html[data-who="in"][data-who-plan="ultra"] .plan[data-plan="ultra"] { padding: 21px 15px 17px; }
}
