/* 創作者主頁的網頁加入頁（/join/@帳號）。版面照設計稿 CreatorWebJoin：手機是底部抽屜，寬螢幕是置中卡片。
   品牌色與字型取自官網的 /assets/site/chrome.css（--sx-*，頁面先載它）；這裡沒有內嵌樣式、沒有外部圖：
   背景是品牌漸層＋白色點點＋柔和色塊，頭像走同源的 /@帳號/avatar.png。 */
@font-face { font-family: "Huninn"; src: url('/fonts/Huninn-subset.woff2') format('woff2'); font-display: swap; }
:root {
  --ink: var(--sx-deep, #2d2463); --body: var(--sx-ink, #34305f); --muted: var(--sx-muted, #5c5883); --line: var(--sx-line, #e6e1f7); --line-d: #d9d3f2;
  --accent: var(--sx-purple, #6955d7); --accent-d: var(--sx-purple-d, #5440bf); --accent-shadow: #3f2f96; --tint: var(--sx-lavender, #f6f3ff); --tint-on: #ece7ff;
  --green: var(--sx-mint-d, #0f6b4d); --green-bg: var(--sx-mint, #ddf5ea); --gold: var(--sx-yellow-d, #7a5200); --gold-bg: var(--sx-yellow, #fff3d0);
  --err: var(--sx-coral-d, #a3401b); --err-bg: #fff4ee;
  --card-shadow: 0 14px 30px rgba(80, 60, 190, .12);
  --font: Huninn, "PingFang TC", system-ui, -apple-system, "Segoe UI", "Noto Sans TC", sans-serif;
  --display: var(--sx-display, "Huninn Display", "PingFang TC", system-ui, sans-serif);
}
:lang(zh-Hans) { --font: "PingFang SC", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif; }
:lang(ja) { --font: "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, "Noto Sans JP", sans-serif; }
:lang(en) { --font: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif; --display: var(--font); }
* { box-sizing: border-box; }
html { color-scheme: light; background: #6450d4; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; align-items: flex-end; padding-top: 64px;
  font-family: var(--font); color: var(--ink); line-height: 1.6; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

/* ---------- 背景：品牌漸層＋白色點點，再疊幾塊模糊的柔和色塊（像一面看不清的作品牆，沒有任何照片） ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, .32) 1.4px, transparent 1.7px), linear-gradient(160deg, #6450d4 0%, #8d7ff8 55%, #ffb8d4 100%);
  background-size: 22px 22px, 100% 100%; }
.bg span { position: absolute; display: block; border-radius: 42px; filter: blur(22px); opacity: .55; }
.bg span:nth-child(1) { width: 46vmax; height: 46vmax; left: -14vmax; top: -10vmax; background: #ffb8d4; transform: rotate(-12deg); }
.bg span:nth-child(2) { width: 30vmax; height: 30vmax; right: -8vmax; top: 4vmax; background: #9fe6c8; opacity: .4; transform: rotate(14deg); }
.bg span:nth-child(3) { width: 24vmax; height: 24vmax; left: 30%; top: 22%; background: #ffe08a; opacity: .32; transform: rotate(8deg); }
.bg span:nth-child(4) { width: 36vmax; height: 36vmax; right: 6%; bottom: -12vmax; background: #c9bfff; opacity: .5; transform: rotate(-6deg); }
.bg span:nth-child(5) { width: 28vmax; height: 28vmax; left: -6vmax; bottom: 8vmax; background: #9ad7f5; opacity: .38; transform: rotate(18deg); }

/* ---------- 頁首：官網字標（連回同語系首頁），跟官網頁首同一套 ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 2; height: 56px; padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(80, 60, 190, .10); }
.topbar-in { max-width: 1200px; height: 56px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { display: block; width: 96px; height: auto; }
@media (min-width: 640px) { .topbar, .topbar-in { height: 64px; } .brand img { width: 112px; } }

/* ---------- 抽屜（手機）／置中卡片（寬螢幕）：大圓角、白邊、柔和紫色陰影，由下往上滑進來 ---------- */
.sheet { width: 100%; max-width: 460px; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; background-clip: padding-box; border: 4px solid rgba(255, 255, 255, .6); border-bottom: 0; border-radius: 30px 30px 0 0;
  padding: 10px 20px calc(26px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(80, 60, 190, .18), var(--card-shadow);
  animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .spinner { animation-duration: 3s; } button, .button { transition: none; } }
@media (min-width: 640px) {
  body { align-items: center; padding: 88px 16px 32px; }
  .sheet { border: 4px solid rgba(255, 255, 255, .6); border-radius: 30px; padding: 24px 26px 28px; max-height: calc(100dvh - 120px); box-shadow: var(--card-shadow), 0 30px 60px rgba(45, 36, 99, .22); }
}
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-d); margin: 0 auto; }
@media (min-width: 640px) { .grab { display: none; } }

/* ---------- 抽屜頁首：頭像（白邊＋紫色外框）＋標題＋一行小字 ---------- */
.who { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.who-text { min-width: 0; flex: 1 1 auto; }
.hero { flex: none; display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: contain; background: var(--tint); padding: 6px; }
.hero.avatar, .hero-initial { border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent), 0 6px 14px rgba(80, 60, 190, .18); }
.hero.avatar { object-fit: cover; padding: 0; background: var(--tint); }
/* 市集加入頁的預設頭像：吉祥物（祕密市集抱著鎖頭、公開市集揮手）放在淡紫色圓框裡，完整顯示不裁臉；市集頭像圖載好（#hero 顯示）時就收起來。 */
.hero.avatar.hero-mascot { object-fit: contain; padding: 6px; }
#hero:not([hidden]) ~ .hero-mascot { display: none; }
/* 沒有頭像：名字的第一個字放在圓裡。 */
.hero-initial { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--tint); color: var(--accent-d); display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 24px; line-height: 1; }
.kicker { margin: 0; font-size: 12px; color: var(--accent-d); letter-spacing: .04em; }
h1 { margin: 0; font-family: var(--display); font-size: 20px; line-height: 1.35; font-weight: 400; color: var(--ink); overflow-wrap: anywhere; }
.lead { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
/* 完成、找不到這類畫面用的是吞吞插圖，不是頭像：放大、置中。 */
.who:has(.hero:not(.avatar):not([hidden])) { flex-direction: column; text-align: center; gap: 4px; margin-top: 6px; }
.who:has(.hero:not(.avatar):not([hidden])) .hero { width: 132px; height: 132px; border-radius: 0; background: none; padding: 0; filter: drop-shadow(0 10px 16px rgba(80, 60, 190, .18)); }
.who:has(.hero:not(.avatar):not([hidden])) h1 { font-size: 23px; }
.who:has(.hero:not(.avatar):not([hidden])) .lead { font-size: 14px; }
.who:has(.hero:not(.avatar):not([hidden])) .who-text { flex: none; width: 100%; }

/* ---------- 市集加入頁（/join/m/<代號>）登入前的封面與頭像 ----------
   join.js 在市集模式替卡片加上 .is-market、拿掉 #cover 的 hidden 並放進封面圖；封面與下面的版面只在落地頁（#landing）顯示中才生效，
   登入後的步驟（補資料、問卷、完成…）維持原本的小頭像頁首。創作者加入頁沒有 .is-market、#cover 一直是隱藏的，版面完全不變。
   不支援 :has() 的舊瀏覽器整段都不生效，頁面就是原本的樣子（頭像換成圖的部分仍會生效）。 */
/* 封面：卡片最上方的滿版橫幅，3:1，跟著卡片的上圓角裁切（卡片自己 overflow 裁切）。空間先保留好（aspect-ratio），圖載入時版面不會跳。
   沒有圖、還沒載入、載入失敗時就是這個預設封面（祕密、公開市集同一款，純 CSS、沒有圖片檔）：品牌紫到粉的柔和漸層，疊上白色圓點紋理、
   兩顆半透明的大圓（一顆帶細外圈）、柔和的黃與薄荷色塊，再加兩顆小星星（::before／::after）。圖載入成功才淡入、蓋在最上面。 */
.cover { display: none; position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 3 / 1; margin: -10px -20px 0;
  background: radial-gradient(rgba(255, 255, 255, .3) 1.4px, transparent 1.7px) 0 0 / 22px 22px,
    radial-gradient(circle at 91% -10%, rgba(255, 255, 255, 0) 0 41%, rgba(255, 255, 255, .34) 41.3% 42.4%, rgba(255, 255, 255, 0) 42.8%),
    radial-gradient(circle at 91% -10%, rgba(255, 255, 255, .22) 0 31%, rgba(255, 255, 255, 0) 31.4%),
    radial-gradient(circle at 4% 118%, rgba(255, 255, 255, .2) 0 36%, rgba(255, 255, 255, 0) 36.4%),
    radial-gradient(circle at 62% 6%, rgba(255, 224, 138, .6) 0, rgba(255, 224, 138, 0) 30%),
    radial-gradient(circle at 30% 108%, rgba(159, 230, 200, .62) 0, rgba(159, 230, 200, 0) 38%),
    linear-gradient(120deg, var(--accent) 0%, #8d7ff8 50%, #ffb8d4 100%); }
.cover::before, .cover::after { content: ""; position: absolute; z-index: 0; aspect-ratio: 1; background: #fff; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.cover::before { left: 52%; top: 18%; width: 7%; opacity: .95; }
.cover::after { left: 73%; top: 56%; width: 4.2%; opacity: .8; }
@media (min-width: 640px) { .cover { margin: -24px -26px 0; } }
@media (max-width: 360px) { .cover { margin-left: -16px; margin-right: -16px; } }
.cover-img { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.cover-img.loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cover-img { transition: none; } }
.sheet.is-market:has(#landing:not([hidden])) .cover { display: block; }
/* 手機的抽屜把手改疊在封面上方（白色半透明）。 */
.sheet.is-market:has(#landing:not([hidden])) { position: relative; }
.sheet.is-market:has(#landing:not([hidden])) .grab { position: absolute; top: 8px; left: 50%; margin: 0 0 0 -22px; background: rgba(255, 255, 255, .8); box-shadow: 0 1px 4px rgba(45, 36, 99, .28); }
/* 頁首：頭像（80px、白色外框）靠左、壓在封面下緣（一半在封面上），市集名稱與「免費，30 秒完成」排在它下面。 */
.sheet.is-market:has(#landing:not([hidden])) .who { margin-top: 0; flex-direction: column; align-items: flex-start; gap: 8px; }
.sheet.is-market:has(#landing:not([hidden])) .who-text { flex: none; width: 100%; }
.sheet.is-market:has(#landing:not([hidden])) .hero.avatar,
.sheet.is-market:has(#landing:not([hidden])) .hero-initial { position: relative; width: 80px; height: 80px; margin-top: -40px; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(80, 60, 190, .22); }
.sheet.is-market:has(#landing:not([hidden])) .hero-initial { font-size: 34px; }
.sheet.is-market:has(#landing:not([hidden])) .hero.avatar.hero-mascot { padding: 9px; }
.sheet.is-market:has(#landing:not([hidden])) .hero-initial.is-lock::before { top: 17px; width: 20px; height: 17px; margin-left: -10px; border-width: 4px 4px 0; border-radius: 10px 10px 0 0; }
.sheet.is-market:has(#landing:not([hidden])) .hero-initial.is-lock::after { top: 33px; width: 32px; height: 23px; margin-left: -16px; border-radius: 6px; }
.sheet.is-market:has(#landing:not([hidden])) h1 { font-size: 22px; }
@media (max-width: 360px) { .sheet.is-market:has(#landing:not([hidden])) h1 { font-size: 20px; } }

/* ---------- 共用元件 ---------- */
h2 { margin: 18px 0 6px; font-family: var(--display); font-size: 18px; font-weight: 400; color: var(--ink); }
.hint { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.hint.center, .center { text-align: center; }
.error { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--err); }
a { color: var(--accent-d); }
a:hover { color: var(--accent-shadow); }
/* 主按鈕：官網的紫色立體按鈕。 */
button, .button { appearance: none; border: 1.5px solid transparent; border-radius: 999px; background: var(--accent-d); color: #fff; font: inherit; font-size: 16px; font-weight: 700; line-height: 1.4;
  min-height: 48px; padding: 12px 22px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 5px 0 var(--accent-shadow); margin-bottom: 5px; transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease; }
button:hover, .button:hover { background: var(--accent); color: #fff; }
button:active:not(:disabled), .button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-shadow); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(105, 85, 215, .4); outline-offset: 3px; }
.ghost { background: #fff; color: var(--ink); border-color: var(--line-d); box-shadow: 0 5px 0 var(--line); }
.ghost:hover { background: var(--tint); color: var(--ink); }
.ghost:active { box-shadow: 0 2px 0 var(--line); }
.link { background: none; color: var(--muted); font-size: 13px; font-weight: 400; min-height: 44px; padding: 8px; text-decoration: underline; display: flex; margin: 2px auto 0; box-shadow: none; }
.link:hover { background: none; color: var(--ink); }
.link:active:not(:disabled) { transform: none; box-shadow: none; }
.buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.buttons > * { width: 100%; }
.buttons.row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.buttons.row > * { flex: 1 1 140px; width: auto; }
.spinner { width: 38px; height: 38px; margin: 30px auto 22px; border-radius: 50%; border: 4px solid var(--tint-on); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { margin: 14px 0 4px; padding: 12px 16px; border-radius: 18px; background: var(--tint); font-size: 13px; line-height: 1.6; color: var(--body); }
.notice p { margin: 0; }
.notice .ghost { margin-top: 10px; min-height: 44px; font-size: 14px; }
.notice-line { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--gold-bg); color: var(--gold); font-size: 13px; }
.num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--tint-on); color: var(--accent-d); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; }

/* ---------- 1. 落地頁 ---------- */
/* 市集加入頁：公開／祕密徽章（祕密用鎖頭）與成員數。 */
.market-meta { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--tint-on); color: var(--accent-d); font-size: 13px; line-height: 1.5; }
.badge.secret { position: relative; padding-left: 30px; background: var(--ink); color: #fff; }
.badge.secret::before { content: ""; position: absolute; left: 13px; top: 5px; width: 6px; height: 5px; border: 2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.badge.secret::after { content: ""; position: absolute; left: 11px; top: 11px; width: 12px; height: 9px; border-radius: 2px; background: currentColor; }
.members { white-space: nowrap; }
/* 祕密市集的頭像：鎖頭（CSS 畫的，沒有圖）。 */
.hero-initial.is-lock { position: relative; background: var(--ink); color: #fff; }
.hero-initial.is-lock::before { content: ""; position: absolute; left: 50%; top: 13px; width: 14px; height: 12px; margin-left: -7px; border: 3px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0; }
.hero-initial.is-lock::after { content: ""; position: absolute; left: 50%; top: 24px; width: 22px; height: 16px; margin-left: -11px; border-radius: 4px; background: #fff; }
.perks { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--body); }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.markets { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.markets legend { padding: 0; font-size: 15px; color: var(--ink); }
.market-chips { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
/* 市集勾選：薰衣草底；勾了就紫色描邊。 */
.market-chip { display: flex; flex-direction: row; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--tint); color: var(--body);
  padding: 8px 13px; border-radius: 999px; font-size: 14px; min-height: 40px; cursor: pointer; }
.market-chip:has(input:checked) { border-color: var(--accent); background: var(--tint-on); color: var(--ink); }
.market-chip input { accent-color: var(--accent); margin: 0; }
.market-chip span { overflow-wrap: anywhere; }
.google-btn { width: 100%; margin-top: 18px; background: #fff; color: var(--ink); border-color: var(--line-d); min-height: 50px; padding: 12px; font-weight: 600; box-shadow: 0 5px 0 var(--line); }
.google-btn:hover { background: var(--tint); color: var(--ink); }
.google-btn:active:not(:disabled) { box-shadow: 0 2px 0 var(--line); }
.google-btn .logo { flex: none; }
/* 保持登入而且已經登入：按鈕只說「加入」，不放 Google 標誌。 */
.google-btn.kept .logo { display: none; }
.consent { margin-top: 12px; display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--body); padding: 6px 8px; margin-left: -8px; margin-right: -8px; border-radius: 12px; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.consent.invalid { background: var(--err-bg); }
.foot { margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
#landing-error { margin-top: 10px; }
/* 追蹤創作者：和市集勾選同一組視覺（薰衣草底，勾了紫色描邊）。 */
.follow { margin-top: 14px; display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; border: 1.5px solid var(--line);
  background: var(--tint); color: var(--ink); font-size: 14px; line-height: 1.5; cursor: pointer; }
.follow:has(input:checked) { border-color: var(--accent); background: var(--tint-on); }
.follow input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.follow span { min-width: 0; overflow-wrap: anywhere; }

/* ---------- 2. 補資料 ---------- */
form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; text-align: left; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
input[type="text"], input[type="number"], select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; }
input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { resize: vertical; min-height: 84px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.selects { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.age-hint { margin: -4px 0 0; }
.age-hint.bad { color: var(--err); }
form .error { margin: 0; }
form button[type="submit"] { margin-top: 4px; width: 100%; }

/* ---------- 3. 問卷與確認 ---------- */
.target { margin: 14px 0 0; padding: 8px 14px; border-radius: 14px; background: var(--tint-on); color: var(--accent-d); font-size: 14px; overflow-wrap: anywhere; }
.account { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.account strong { display: block; margin-top: 2px; color: var(--ink); font-size: 16px; font-weight: 400; overflow-wrap: anywhere; }
#survey h2 { margin-top: 6px; }
#survey .hint { margin-top: 0; }
#survey-questions { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.question { border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 14px; background: #fff; }
.question.invalid { border-color: var(--err); background: var(--err-bg); }
.q-prompt { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.q-tag { margin-left: 6px; font-size: 12px; color: var(--muted); }
.q-tag.required { color: var(--err); }
.q-hint { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
label.chip { position: relative; display: inline-flex; flex-direction: row; gap: 0; color: var(--body); font-size: 14px; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--tint); overflow-wrap: anywhere; }
.chip input:checked + span { background: var(--tint-on); border-color: var(--accent); color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid rgba(105, 85, 215, .4); outline-offset: 2px; }
.chip input:disabled { cursor: default; }
.chip input:disabled + span { opacity: .45; }
.like-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px dashed var(--line-d); }
.like-row:first-of-type { border-top: 0; padding-top: 0; }
.like-name { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.number-row { display: flex; align-items: center; gap: 8px; }
.number-row input { flex: 1 1 auto; min-width: 0; }
.number-row .unit { flex: none; font-size: 14px; color: var(--muted); }
#approval-hint { margin: 0; }

/* ---------- 4. 完成 ---------- */
.followed { margin: 12px auto 0; width: fit-content; max-width: 100%; padding: 6px 14px; border-radius: 999px; background: var(--tint-on); color: var(--accent-d); font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.followed::before { content: "★ "; }
.account-box { margin-top: 14px; padding: 12px 16px; border-radius: 18px; background: var(--green-bg); color: var(--green); text-align: center; }
.code-label { margin: 0; font-size: 12px; }
.account-value { margin: 2px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.next-steps { margin: 16px 0 6px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--body); }
.next-steps li { display: flex; gap: 10px; align-items: center; }
.next-steps li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
#done .buttons.row { margin-top: 14px; }
#done-signout { margin-top: 10px; width: 100%; }
#problem .error { margin: 14px 0 0; font-size: 14px; text-align: center; }
#notfound .button { margin-top: 0; }
#retry { margin-top: 14px; }
#retry button { width: 100%; }

/* 日文與英文的句子比較長：不用硬擠在一行。 */
h1, .lead, .perks, .hint, .foot, .consent { word-break: keep-all; overflow-wrap: anywhere; }
:lang(en) h1, :lang(en) .lead, :lang(en) .perks, :lang(en) .hint, :lang(en) .foot, :lang(en) .consent { word-break: normal; overflow-wrap: break-word; }
@media (max-width: 360px) { .sheet { padding-left: 16px; padding-right: 16px; } h1 { font-size: 18px; } }

/* ---------- X／Telegram 登入與「用 Email 查登入方式」（external-auth.js；開關關著時這些元素都不存在） ---------- */
/* 「上次登入：…　清除」：置中的同一行，放在所有登入鈕上方；清除是行內的小連結。 */
.external-last { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); text-align: center; }
.link-inline { display: inline-block; min-height: 0; margin: -6px 0 -6px 2px; padding: 6px; border: 0; border-radius: 8px; background: none; box-shadow: none; color: inherit; font: inherit; font-weight: 400; text-decoration: underline; }
.link-inline:hover { background: none; color: var(--ink); }
.link-inline:active:not(:disabled) { transform: none; box-shadow: none; }
/* 外部登入的按鈕群接在 Google、Apple 之後，間距和它們一樣；登入鈕下方一行淡色小字；查詢結果是說明加整寬直排的登入鈕。 */
#signin .external-last + .buttons { margin-top: 10px; }
#signin #external-signin, #signin #external-signin .buttons { margin-top: 0; }
#external-signin .error { margin: 0; text-align: center; }
#external-signin .external-result { margin: 6px 0 2px; font-size: 14px; line-height: 1.55; color: var(--body); text-align: center; text-wrap: balance; }
#external-signin .external-result:empty { display: none; }
#external-signin form { margin-top: 4px; }
/* Telegram 的紙飛機是品牌藍；按鈕停用時跟著文字的停用色。 */
.provider:disabled .tg { fill: currentColor; }
