/* ============================================================
   設計變數:顏色和間距集中在這裡
   要改整站配色,只改這一段就好,不用全檔搜尋替換
   ============================================================ */
:root {
  --bg:        #ffffff;
  --bg-alt:    #f6f7f9;
  --text:      #16181d;
  --text-dim:  #5c626e;
  --border:    #e3e5ea;
  --accent:    #2563eb;
  --accent-fg: #ffffff;
  --radius:    12px;
  --maxw:      1000px;   /* 內容最大寬度,超過這個就置中留白 */
}

/* 使用者系統設成深色模式時,自動換一組變數。
   不用寫 JS,也不用做切換按鈕 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0f1115;
    --bg-alt:   #161a21;
    --text:     #e8eaee;
    --text-dim: #9aa1ae;
    --border:   #262b34;
    --accent:   #5b8cff;
  }
}

/* ============================================================
   基本重置
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;        /* 指令太長時自己橫向捲,不會把整頁撐爆 */
}
pre code { background: none; border: none; padding: 0; }

/* ============================================================
   導覽列
   ============================================================ */
.nav {
  position: sticky;        /* 捲動時黏在頂端 */
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__brand { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.nav__links { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.nav__links a {
  color: var(--text-dim);
  font-size: 0.92rem;
  /* 內距讓 hover 的藍色方塊有大小;圓角 + 過渡讓它「浮現」而不是硬跳出來 */
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav__links a:hover {
  color: var(--accent-fg);          /* 白字 */
  background: var(--accent);        /* ★ 滑過浮現藍色方塊 */
  text-decoration: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  /* hero 比例跟圖一樣 3:2,整張圖完整顯示。
     用 grid 兩列把文字固定放在上半(黃框位置),圖跨滿整個 hero。 */
  max-width: none;
  margin: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 600px;
  display: grid;
  grid-template-rows: 74% 26%;   /* 文字放第一列置中 → 落在整體 37% 高度(黃框) */
  overflow: hidden;
  text-align: center;
  background-color: #0a0e16;
}
.hero__bg {
  grid-column: 1;
  grid-row: 1 / 3;               /* 圖跨滿上下兩列 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero__inner {
  grid-column: 1;
  grid-row: 1 / 2;              /* ★ 文字放上半列 */
  align-self: center;          /* 在上半列置中 = 整體約 37% 高度,黃框位置 */
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  /* 只有貼著文字的一圈柔和暗暈,讓白字在亮天空上讀得清楚,不是整片壓暗 */
  background: radial-gradient(ellipse 65% 75% at 50% 50%,
    rgba(6,9,15,0.52) 0%, rgba(6,9,15,0.22) 60%, transparent 80%);
}

/* ============================================================
   冰城封面「寒氣」動畫 —— 純 CSS,無 JS,很淡不搶戲。
   兩層:① 冷霧(上方淡藍白緩慢呼吸) ② 飄雪(兩層白點不同速度往下飄)
   疊在圖(z-index:1)之上、文字(z-index:2)之下,不擋點擊。
   ============================================================ */
.hero__frost {
  grid-column: 1;
  grid-row: 1 / 3;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  /* ① 冷霧:上緣一層淡藍白,緩慢呼吸 */
  background: radial-gradient(130% 90% at 50% -10%,
    rgba(190,222,255,0.12) 0%, rgba(190,222,255,0.04) 40%, transparent 70%);
  animation: frostBreath 9s ease-in-out infinite;
}
/* ② 飄雪:兩層重複的白點,往下飄(平移剛好一個 tile 高 → 無縫循環) */
.hero__frost::before,
.hero__frost::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -260px; bottom: 0;
  background-repeat: repeat;
  pointer-events: none;
}
.hero__frost::before {
  background-image:
    radial-gradient(2px 2px    at 20px 30px,   rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px    at 120px 90px,  rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 70px 160px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 175px 210px,rgba(255,255,255,0.6), transparent);
  background-size: 220px 260px;
  opacity: 0.55;
  animation: snowFall 16s linear infinite;
}
.hero__frost::after {
  background-image:
    radial-gradient(1.5px 1.5px at 90px 40px,  rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px    at 210px 120px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px    at 40px 220px,  rgba(255,255,255,0.5), transparent);
  background-size: 300px 260px;
  opacity: 0.35;
  animation: snowFall 26s linear infinite;
}
@keyframes snowFall {
  from { transform: translateY(0); }
  to   { transform: translateY(260px); }
}
@keyframes frostBreath {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
/* 使用者若在系統設定「減少動態」,就關掉動畫(不閃、不飄) */
@media (prefers-reduced-motion: reduce) {
  .hero__frost,
  .hero__frost::before,
  .hero__frost::after { animation: none; }
}
.hero__badge {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-dim);
  font-size: 0.8rem;
}
.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.25rem);   /* 隨螢幕寬度縮放,手機不會爆版 */
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;                            /* 壓在圖上,固定白字 */
  /* 貼著字的暗色光暈(不是方框),白字在任何背景上都讀得清楚 */
  text-shadow: 0 0 18px rgba(0,0,0,0.9), 0 2px 6px rgba(0,0,0,0.95), 0 1px 2px rgba(0,0,0,0.95);
}
.hero__sub {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: #eaf1f9;
  font-size: 1.05rem;
  text-shadow: 0 0 14px rgba(0,0,0,0.9), 0 1px 4px rgba(0,0,0,0.95);
}
.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   按鈕
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { opacity: 0.9; }
.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--bg-alt); }
.btn--lg { padding: 0.95rem 2rem; font-size: 1.05rem; }

/* ============================================================
   區塊
   ============================================================ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
/* --alt 是「換底色」的變體,讓相鄰區塊有視覺分隔 */
.section--alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
/* 這裡要扣掉 3rem(左右內距各 1.5rem)。
   .section 的 max-width 是連內距一起算的(border-box),實際內容只有
   1000-48=952px;--alt 的子元素沒有內距,不扣的話會比別區寬 48px,
   標題就對不齊上下相鄰的區塊。 */
.section--alt > * {
  max-width: calc(var(--maxw) - 3rem);
  margin-inline: auto;
}

/* 這裡故意用 margin-block(只管上下)而不是 margin 簡寫。
   簡寫會連左右一起重設成 0,把上面 .section--alt > * 的
   margin-inline:auto 蓋掉,標題就會掉到滿版區塊的最左邊。 */
.section__title {
  margin-block: 0 2rem;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

/* ============================================================
   特色卡片
   auto-fit + minmax:寬度夠就並排,不夠就自己換行。
   不用寫任何 @media query
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.card {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card__icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-dim); font-size: 0.94rem; }

/* ============================================================
   會員方案
   沿用 .card 的外框和內距,這裡只補價格、清單、按鈕對齊。

   注意選擇器都寫成 .plan xxx 而不是單一 class:
   上面 .card h3 和 .card p 是「兩層」的選擇器,優先級比單一 class 高,
   只寫 .plan__price 會被 .card p 蓋掉(字會變小變灰)。
   ============================================================ */
.plan { display: flex; flex-direction: column; gap: 0.75rem; }

/* 卡片本來是靠上排列,方案卡高度不一時按鈕會參差。
   margin-top:auto 把按鈕推到底部,三張的按鈕就對齊了 */
.plan .btn { margin-top: auto; text-align: center; }

.plan h3 { margin: 0; font-size: 1.05rem; }

.plan .plan__price {
  margin: 0;
  color: var(--text);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
}
.plan .plan__price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-dim);
}

.plan__list {
  margin: 0;
  padding: 0;
  list-style: none;          /* 拿掉預設的圓點,改用下面的打勾 */
  display: grid;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.94rem;
}
.plan__list li { position: relative; padding-left: 1.4rem; }
/* ::before 是「在這個元素前面插一個看不見的小方塊」,
   內容由 CSS 決定。打勾不寫在 HTML 裡,因為它是裝飾不是內容 */
.plan__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* 推薦方案:邊框換成主色,不用改任何 HTML 結構 */
.plan--featured { border-color: var(--accent); }
.plan .plan__tag {
  align-self: flex-start;
  margin: 0;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================================
   下載區
   ============================================================ */
.download {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.download__meta { margin: 0.85rem 0 0; color: var(--text-dim); font-size: 0.88rem; }

.specs { margin: 0; display: grid; gap: 0.6rem; }
/* 分隔線畫在「上緣」而不是下緣:最後一列被 hidden 時才不會留一條孤兒橫線 */
.specs > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.specs > div:first-child { border-top: none; padding-top: 0; }
/* 上面的 display:flex 權重壓過 hidden 的預設 display:none,要補這行 hidden 才有效 */
.specs > div[hidden] { display: none; }
.specs dt { color: var(--text-dim); font-size: 0.88rem; }
.specs dd { margin: 0; font-size: 0.88rem; text-align: right; word-break: break-all; }

.note { margin-top: 1.25rem; color: var(--text-dim); font-size: 0.88rem; }

/* ============================================================
   教學步驟
   ============================================================ */
/* 同樣不能用 margin 簡寫,否則在 section--alt 裡會失去置中(見 .section__title 的註解) */
.steps { margin-block: 0; padding: 0; list-style: none; counter-reset: step; }
.step {
  counter-increment: step;
  position: relative;
  padding: 0 0 2rem 3.25rem;
  border-left: 2px solid var(--border);
  margin-left: 1rem;
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
/* 用 CSS counter 自動編號,新增步驟不用手改數字 */
.step::before {
  content: counter(step);
  position: absolute;
  left: -1.05rem;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.9rem;
  font-weight: 700;
}
.step h3 { margin: 0.15rem 0 0.4rem; font-size: 1.05rem; }
.step p { margin: 0 0 0.75rem; color: var(--text-dim); }

/* ============================================================
   FAQ(瀏覽器原生摺疊)
   ============================================================ */
.faq {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq[open] summary { margin-bottom: 0.5rem; }
.faq p { margin: 0; color: var(--text-dim); }

/* ============================================================
   操作教學 —— 可折疊面板(用瀏覽器內建 <details>,不需要 JS)
   點標題展開/收起,裡面放每個工具的教學內容(步驟、截圖)。
   ============================================================ */
.teach {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.teach > summary {
  list-style: none;                 /* 去掉 Firefox 預設三角 */
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.05rem 1.25rem;
  font-weight: 600;
  font-size: 1.05rem;
}
.teach > summary::-webkit-details-marker { display: none; }  /* 去掉 Safari/Chrome 預設三角 */
.teach__icon  { font-size: 1.5rem; line-height: 1; }
.teach__title { flex: 1; }
.teach__chev  { color: var(--text-dim); transition: transform .2s ease; }
.teach[open] .teach__chev { transform: rotate(90deg); }
.teach__body {
  padding: 0 1.25rem 1.2rem;
  color: var(--text-dim);
  line-height: 1.85;
}
.teach__body p { margin: 0 0 0.6rem; }
.teach__body img { max-width: 100%; border-radius: 8px; margin: 0.5rem 0; }
.teach__body ol, .teach__body ul { margin: 0.3rem 0 0.6rem; padding-left: 1.3rem; }

/* ============================================================
   頁尾
   ============================================================ */
.footer {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}
.footer p { margin: 0.2rem 0; }
.footer__small { font-size: 0.8rem; opacity: 0.75; }

/* ============================================================
   帳號區(註冊 / 登入)— Google 登入頁風格

   ★ 這一區刻意「不用」上面那組 --bg / --accent 變數,自己開一組。
     原因:Google 的配色和這個站的主色不一樣(它的按鈕在深色下是
     淺藍底深藍字),硬套站內變數會變成四不像。
     自己一組的代價是深色模式要自己寫,所以底下有一段 media query。
   ============================================================ */

/* hidden 屬性要贏過底下任何 display 設定,不然藏不住 */
[hidden] { display: none !important; }

.gauth {
  /* 淺色(Google 白底版) */
  --g-card:    #ffffff;
  --g-text:    #1f1f1f;
  --g-dim:     #444746;
  --g-border:  #747775;
  --g-accent:  #0b57d0;
  --g-btn-bg:  #0b57d0;
  --g-btn-fg:  #ffffff;
  --g-hover:   rgba(11, 87, 208, 0.08);
  --g-error:   #d93025;
  --g-ok:      #188038;

  /* 拿掉雪花和左欄之後改成單欄。
     寬度收到 520px 是因為:輸入框變大了,再讓它橫跨 880px
     一行會長到眼睛要掃很遠,反而難填。 */
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--g-card);
  color: var(--g-text);
  border: 1px solid var(--border);
  border-radius: 28px;              /* Google 的大圓角是這個樣式的招牌 */
}

@media (prefers-color-scheme: dark) {
  .gauth {
    --g-card:   #1f1f1f;
    --g-text:   #e3e3e3;
    --g-dim:    #c4c7c5;
    --g-border: #8e918f;
    --g-accent: #a8c7fa;
    --g-btn-bg: #a8c7fa;
    --g-btn-fg: #062e6f;            /* 淺藍底配深藍字,不是白字 */
    --g-hover:  rgba(168, 199, 250, 0.12);
    --g-error:  #f28b82;
    --g-ok:     #81c995;
    border-color: transparent;
  }
}

@media (max-width: 720px) {
  .gauth { padding: 2rem 1.5rem; border-radius: 20px; }
}

/* 標題用站內的 .section__title(跟「會員制度」同一個樣式),
   所以卡片裡只剩這行副標。 */
.gauth__sub {
  margin: 0 0 2rem;
  color: var(--g-text);
  font-size: 1.05rem;
  line-height: 1.6;
}
.gauth__sub a { color: var(--g-accent); }

/* ---- 浮動標籤輸入框(Material 的 outlined text field)----
   做法:input 放一個空白 placeholder,再用 :placeholder-shown 判斷
   「有沒有輸入內容」。純 CSS,不需要任何 JS。
   label 的背景要跟卡片同色,才能在邊框上「咬」出一個缺口。 */
.gfield { position: relative; margin-bottom: 1.6rem; }
.gfield input {
  display: block;
  width: 100%;
  box-sizing: border-box;           /* 不加的話 padding 會把 100% 撐爆出去 */
  padding: 1.15rem 1.1rem;
  font-size: 1.1rem;
  font-family: inherit;
  line-height: 1.4;
  color: var(--g-text);
  background: transparent;
  border: 1px solid var(--g-border);
  border-radius: 10px;
  outline: none;
}
.gfield input:focus {
  border-color: var(--g-accent);
  box-shadow: inset 0 0 0 1px var(--g-accent);   /* 聚焦時邊框變兩倍粗 */
}
.gfield label {
  position: absolute;
  left: 0.7rem;
  top: 1.15rem;                     /* 對齊 input 的 padding-top */
  padding: 0 0.4rem;
  color: var(--g-dim);
  font-size: 1.1rem;                /* 未浮起時跟輸入文字一樣大 */
  line-height: 1.4;
  background: var(--g-card);
  pointer-events: none;                          /* 不要擋住點擊輸入框 */
  transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}
.gfield input:focus + label,
.gfield input:not(:placeholder-shown) + label {
  top: -0.6rem;
  font-size: 0.82rem;
}
.gfield input:focus + label { color: var(--g-accent); }

/* ---- 按鈕 ---- */
.gauth__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.gbtn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;             /* 藥丸形 */
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.gbtn--filled {
  padding: 0.8rem 1.9rem;
  background: var(--g-btn-bg);
  color: var(--g-btn-fg);
}
.gbtn--filled:hover { opacity: 0.9; }
.gbtn--text {
  padding: 0.8rem 1rem;
  background: transparent;
  color: var(--g-accent);
}
.gbtn--text:hover { background: var(--g-hover); }
.gbtn:disabled { opacity: 0.5; cursor: not-allowed; }

.gauth__msg {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  min-height: 1.2em;
}
.gauth__msg.is-error { color: var(--g-error); }
.gauth__msg.is-ok    { color: var(--g-ok); }

.gauth__hi {
  margin: 0 0 0.3rem;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--g-text);
  word-break: break-all;
}
.gauth__hi strong { font-weight: 600; }

/* 信箱退成次要資訊 —— 主角是暱稱,信箱只是讓人確認登入的是哪個帳號 */
.gauth__who { margin: 0; font-size: 0.9rem; color: var(--g-dim); word-break: break-all; }

/* ── 我的序號 ────────────────────────────────────────── */
.mylic { margin-top: 1.5rem; display: grid; gap: 0.6rem; }
.mylic__item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--g-accent);
  border-radius: 10px;
}
.mylic__key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem; font-weight: 600; color: var(--g-accent);
  word-break: break-all;
}
.mylic__meta { margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--g-dim); }
.mylic__expired { color: var(--g-error); }

/* ── 申請購買 ────────────────────────────────────────── */
.orderbox { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--g-border); }
.orderbox__title { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--g-text); }
.orderbox__state { margin: 0 0 0.75rem; font-size: 0.85rem; line-height: 1.6; color: var(--g-dim); }
.orderbox__form { display: grid; gap: 0.15rem; }
.orderbox__label { font-size: 0.78rem; color: var(--g-dim); margin-top: 0.5rem; }
.orderbox__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.orderbox select,
.orderbox input {
  width: 100%; box-sizing: border-box;
  padding: 0.6rem 0.7rem; font-size: 0.95rem; font-family: inherit;
  color: var(--g-text); background: transparent;
  border: 1px solid var(--g-border); border-radius: 8px; outline: none;
}
.orderbox select { appearance: none; }
/* ★ 深色底的 <option> 在某些瀏覽器會沿用系統的白底 —— 明確指定才不會白字白底 */
.orderbox select option { background: var(--g-card); color: var(--g-text); }
.orderbox input:focus,
.orderbox select:focus { border-color: var(--g-accent); box-shadow: inset 0 0 0 1px var(--g-accent); }
.orderbox .gbtn { margin-top: 1rem; width: 100%; }

.gauth__foot {
  max-width: 520px;                 /* 跟卡片同寬,左邊界才會對齊 */
  margin: 1rem auto 0;
  padding: 0 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ── 訊息 ────────────────────────────────────────────── */
.msgbox { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--g-border); }
.msgbox__thread {
  display: grid; gap: 0.6rem;
  max-height: 320px; overflow-y: auto;      /* 訊息多了自己捲,不要把整頁撐長 */
  margin: 0.75rem 0;
}
.msgbox__thread:empty { display: none; }    /* 沒訊息時不要留一塊空白 */
.msg {
  padding: 0.7rem 0.9rem; border-radius: 12px;
  font-size: 0.92rem; line-height: 1.6;
  max-width: 85%; white-space: pre-wrap; word-break: break-word;
}
/* 自己說的靠右、對方說的靠左 —— 一眼看出誰講的,不用讀標籤 */
.msg--me    { margin-left: auto; background: var(--g-btn-bg); color: var(--g-btn-fg); }
.msg--admin { margin-right: auto; background: var(--g-border); color: var(--g-text); opacity: .95; }
.msg__time  { display: block; margin-top: 0.3rem; font-size: 0.7rem; opacity: .7; }
.msgbox textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  padding: 0.7rem 0.8rem; font-size: 0.95rem; font-family: inherit;
  color: var(--g-text); background: transparent;
  border: 1px solid var(--g-border); border-radius: 10px; outline: none;
}
.msgbox textarea:focus { border-color: var(--g-accent); box-shadow: inset 0 0 0 1px var(--g-accent); }
.msgbox .gbtn { margin-top: 0.75rem; width: 100%; }

/* 未登入時擋在序號輸入框前面的提示 */
.license-locked {
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* 使用者開了「減少動態效果」就關掉動畫 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
