:root {
  --元件間距: 12px;
  --主要顏色: #0b2545;
  --強調顏色: #c9a227;
  --連結顏色: #2b6cb0;
  --背景顏色: #ffffff;
  --卡片背景顏色: #ffffff;
  --字體顏色: #333333;
  --頁尾背景顏色: #081a33;
  --頁尾字體顏色: #c8d0dc;
  --輔助字體顏色: #69707a;
  --區塊背景顏色: #f1f3f7;
  --邊框顏色: #b8bdc4;
  --成功顏色: #28a745;
  --危險顏色: #c0392b;
  --警示顏色: #b35b00;
  --主視覺字體大小: 56px;
  --標題字體大小: 40px;
  --導覽字體大小: 18px;
  --內文字體大小: 16px;
  --輔助字體大小: 15px;
  --頁面邊距: 60px;
  --內容寬度上限: 1406px;
  --卡片弧度: 10px;
  --按鈕弧度: 8px;
  --卡片陰影: none;
  --頁首高度: 78px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--背景顏色);
  color: var(--字體顏色);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: var(--內文字體大小);
  line-height: 1.5;
}

a,
button,
label,
summary,
input,
select,
textarea {
  touch-action: manipulation;
}

a {
  color: var(--連結顏色);
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ===== 按鈕（照醫療器材官網） ===== */

.共用強調按鈕,
.共用普通按鈕,
.共用綠色按鈕,
.共用藍色按鈕,
.共用藍框按鈕,
.共用紅色按鈕,
.共用灰色按鈕 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: var(--按鈕弧度);
  color: #ffffff;
  font-size: var(--內文字體大小);
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.共用強調按鈕 {
  background: var(--強調顏色);
  color: #ffffff;
  font-weight: 500;
}

.共用普通按鈕 {
  border-color: var(--邊框顏色);
  background: #ffffff;
  color: var(--字體顏色);
}

.共用綠色按鈕 {
  background: #28a745;
}

.共用藍色按鈕 {
  background: #007bff;
}

.共用藍框按鈕 {
  border-color: #007bff;
  background: #ffffff;
  color: #007bff;
}

.共用紅色按鈕 {
  background: #dc3545;
}

.共用灰色按鈕 {
  background: #6c757d;
}

@media (hover: hover) {
  .共用強調按鈕:hover,
  .共用綠色按鈕:hover,
  .共用藍色按鈕:hover,
  .共用紅色按鈕:hover,
  .共用灰色按鈕:hover {
    filter: brightness(0.92);
  }

  .共用普通按鈕:hover,
  .共用小按鈕:hover {
    background: #f1f3f7;
  }

  .共用藍框按鈕:hover {
    background: #eef3fb;
  }
}

button:disabled,
.共用強調按鈕:disabled,
.共用普通按鈕:disabled,
.共用綠色按鈕:disabled,
.共用藍色按鈕:disabled,
.共用藍框按鈕:disabled,
.共用紅色按鈕:disabled,
.共用灰色按鈕:disabled {
  border-color: transparent;
  background: #99aabb;
  color: #ffffff;
  cursor: not-allowed;
  filter: none;
}

button.處理中:disabled {
  cursor: wait;
}

.共用小按鈕 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
  color: var(--字體顏色);
  font-size: var(--輔助字體大小);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.值附按鈕 {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.共用小按鈕.共用綠色按鈕,
.共用小按鈕.共用藍色按鈕,
.共用小按鈕.共用紅色按鈕,
.共用小按鈕.共用灰色按鈕 {
  border-color: transparent;
  color: #ffffff;
}

.共用小按鈕.共用綠色按鈕 {
  background: #28a745;
}

.共用小按鈕.共用藍色按鈕 {
  background: #007bff;
}

.共用小按鈕.共用紅色按鈕 {
  background: #dc3545;
}

.共用小按鈕.共用灰色按鈕 {
  background: #6c757d;
}

.垂直按鈕區 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.垂直按鈕區 button,
.垂直按鈕區 a {
  width: 100%;
}

.水平按鈕區 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ===== 頁首（照醫療器材官網） ===== */

.頁首 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--頁首高度);
  padding: 0 var(--頁面邊距);
  background: var(--主要顏色);
}

.品牌連結 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.品牌圖示 {
  flex: none;
  width: auto;
  height: 56px;
}

.品牌區 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#版面選單 {
  flex: none;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: var(--導覽字體大小);
}

#手機版面預覽框 {
  display: block;
  box-sizing: content-box;
  width: 390px;
  height: calc(100vh - var(--頁首高度) - 2px);
  margin: 0 auto;
  border: 1px solid var(--邊框顏色);
}

body.手機版面預覽 > :not(.頁首):not(#手機版面預覽框) {
  display: none;
}

.導覽區 {
  display: flex;
  align-items: center;
  gap: 28px;
}

.導覽區 a {
  padding: 24px 0;
  border-bottom: 3px solid transparent;
  color: #ffffff;
  text-decoration: none;
  font-size: var(--導覽字體大小);
  white-space: nowrap;
}

.導覽區 a.當前頁面 {
  border-bottom-color: var(--強調顏色);
}

.帳號選單 {
  position: relative;
}

.登入名稱 {
  min-height: 0;
  padding: 24px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--頁尾字體顏色);
  font-family: inherit;
  font-size: var(--導覽字體大小);
  white-space: nowrap;
  cursor: pointer;
}

.登入名稱.語言按鈕 {
  color: #ffffff;
}

.登入名稱.當前頁面 {
  border-bottom-color: var(--強調顏色);
}

.帳號選單清單 {
  position: absolute;
  z-index: 60;
  right: 0;
  top: 100%;
  min-width: 140px;
  border: 1px solid var(--邊框顏色);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.導覽區 .帳號選單清單 a {
  display: block;
  padding: 7px 10px;
  border-bottom: 0;
  color: var(--字體顏色);
  white-space: nowrap;
}

.導覽區 .帳號選單清單 a:hover {
  background: #eef3fb;
}

.自訂選單 {
  position: relative;
  margin-top: 8px;
}

.自訂選單按鈕 {
  display: block;
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
  color: var(--字體顏色);
  font-size: var(--內文字體大小);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.自訂選單按鈕::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.自訂選單按鈕:focus {
  border-color: #2b6cb0;
  outline: 2px solid rgba(43, 108, 176, 0.25);
}

.自訂選單清單 {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 280px;
  margin: 4px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--邊框顏色);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.自訂選單選項 {
  padding: 7px 10px;
  color: var(--字體顏色);
  font-weight: 400;
  cursor: pointer;
}

.自訂選單選項:hover {
  background: #eef3fb;
}

.自訂選單選項[aria-selected="true"] {
  font-weight: 700;
}

.導覽按鈕 {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.頁首通知區 {
  display: inline-flex;
  align-items: center;
}

/* ===== 後台管理功能卡片（照醫療器材官網） ===== */

#功能清單 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.功能卡片 {
  display: block;
  padding: 28px 24px;
  border: 1px solid var(--邊框顏色);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--主要顏色);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.功能卡片:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  background: #f7faff;
}

/* ===== 系統設定卡片（照 gosueshop 設定頁） ===== */

button.設定卡片 {
  width: 100%;
  font: inherit;
}

.設定卡片標題 {
  display: block;
  font-size: 18px;
}

.設定卡片說明 {
  display: block;
  margin-top: 8px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  font-weight: 400;
}

.語言勾選區 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 6px;
}

.可移除欄位 { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.可移除欄位 select, .可移除欄位 input { flex: 1; }
.可移除欄位 .共用小按鈕 { flex-shrink: 0; margin-left: 0; }

.設定彈窗卡片 {
  max-height: 85vh;
  overflow-y: auto;
}

/* ===== 功能設定卡片（照醫療器材官網 features.html） ===== */

.卡片清單 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

#功能設定清單 {
  margin-top: 24px;
}

#功能設定清單 [draggable] {
  cursor: grab;
}

.功能卡片.拖曳目標 {
  outline: 2px solid #2b6cb0;
  outline-offset: -2px;
  background: #dce9f7;
}

.功能卡片 label {
  display: block;
  margin-bottom: 12px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  text-align: left;
}

.功能卡片 label input,
.功能卡片 label select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  font-size: var(--內文字體大小);
}

.API網址摘要 {
  margin: 6px 0 8px;
  color: var(--字體顏色);
  font-weight: 400;
  text-align: left;
  word-break: break-all;
}

.功能卡片 .啟用勾選框容器 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
}

.功能卡片 .啟用勾選框容器 input {
  width: auto;
  margin: 0;
  padding: 0;
}

.API網址標題區 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

/* 通知鈴鐺 */

.通知區 {
  position: relative;
}

.通知鈴鐺 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #ffffff;
  cursor: pointer;
}

.通知鈴鐺 svg {
  width: 24px;
  height: 24px;
}

.通知數量 {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e0453a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.通知面板 {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  right: 0;
  width: 360px;
  max-height: 70vh;
  overflow-y: auto;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  color: var(--字體顏色);
}

.通知面板標題 {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--邊框顏色);
  color: var(--主要顏色);
  font-size: var(--內文字體大小);
  font-weight: 700;
}

.通知項目 {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--邊框顏色);
  color: inherit;
  font-size: var(--輔助字體大小);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.通知項目.未讀 {
  background: #eef3fb;
}

.通知時間 {
  display: block;
  margin-top: 2px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.空白提示 {
  margin: 0;
  padding: 28px 16px;
  color: var(--輔助字體顏色);
  text-align: center;
}

/* ===== 頁身 ===== */

.頁身 {
  flex: 1;
  padding: 40px 0 80px;
}

.區塊內容 {
  width: 100%;
  max-width: var(--內容寬度上限);
  margin: 0 auto;
  padding: 0 var(--頁面邊距);
}

.區塊內容.窄版 {
  max-width: 760px;
}

.區塊標題 {
  margin: 0 0 40px;
  color: var(--主要顏色);
  font-size: var(--標題字體大小);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.頁面按鈕區 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
}

.頁面按鈕區 .共用強調按鈕,
.頁面按鈕區 .共用普通按鈕,
.頁面按鈕區 .共用綠色按鈕 {
  padding: 8px 20px;
  font-weight: 500;
}

.分頁標籤區 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.分頁標籤 {
  padding: 10px 24px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
  color: var(--字體顏色);
  font-size: var(--內文字體大小);
  cursor: pointer;
}

.分頁標籤.當前分頁 {
  border-color: var(--主要顏色);
  background: var(--主要顏色);
  color: #ffffff;
}

.分頁標籤[hidden] {
  display: none;
}

.頁面說明 {
  margin: 0 0 24px;
  color: var(--輔助字體顏色);
}

.置中 {
  text-align: center;
}

/* ===== 卡片 ===== */

.資料卡片 {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  background: var(--卡片背景顏色);
  box-shadow: var(--卡片陰影);
}

.卡片標題 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--主要顏色);
  font-size: 19px;
  font-weight: 700;
}

.卡片說明 {
  margin: -8px 0 16px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.雙欄版面 {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: start;
}

.雙欄版面 > * {
  min-width: 0;
}

.雙欄版面.次欄在右 > :first-child {
  grid-column: 2;
  grid-row: 1;
}

.雙欄版面.次欄在右 > :last-child {
  grid-column: 1;
  grid-row: 1;
}

/* ===== 表單（比照醫療器材官網的共用表單卡片） ===== */

.共用表單卡片 {
  display: flex;
  flex-direction: column;
  gap: var(--元件間距);
  max-width: 420px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid var(--邊框顏色);
  border-radius: 10px;
  background: #ffffff;
}

.共用表單卡片 > :not(.共用彈窗關閉按鈕) {
  margin-top: 0;
  margin-bottom: 0;
}

.卡片清單 > .共用表單卡片 {
  max-width: none;
  margin: 0;
}

#更換錢包表單 > button[type="submit"],
#設定表單 .操作區全寬 > button,
.共用表單卡片 > button:not(.共用彈窗關閉按鈕),
.共用表單卡片 > form > button[type="submit"],
.共用表單卡片 > .垂直按鈕區 > button {
  width: 100%;
}

.共用表單卡片 .區塊標題 {
  margin: 0;
  font-size: 24px;
  text-align: center;
}

.表單欄位 {
  display: block;
  margin-bottom: 20px;
  color: var(--字體顏色);
  font-size: 16px;
  font-weight: 700;
}

.表單欄位 input,
.表單欄位 select,
.表單欄位 textarea,
.共用輸入框 {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
  color: var(--字體顏色);
  font-size: var(--內文字體大小);
  font-weight: 400;
}

.表單欄位 textarea,
textarea.共用輸入框 {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.表單欄位 input:focus,
.表單欄位 select:focus,
.表單欄位 textarea:focus,
.共用輸入框:focus {
  border-color: #2b6cb0;
  outline: 2px solid rgba(43, 108, 176, 0.25);
}

.表單欄位 .唯讀欄位,
.共用輸入框[readonly] {
  background: #eef0f4;
  color: #555566;
}

.欄位說明 {
  display: block;
  margin: 4px 0 8px;
  color: #666677;
  font-size: 14px;
  font-weight: 400;
}

.下間距 {
  margin-bottom: var(--元件間距);
}

.大下間距 {
  margin-bottom: calc(var(--元件間距) * 2);
}

.欄位說明.下間距 {
  margin: 0 0 var(--元件間距);
}

.無外距 {
  margin: 0;
}

.顆數輸入區 {
  display: block;
  position: relative;
}

.顆數輸入區 input {
  padding-right: 72px;
  font-size: 22px;
  font-weight: 700;
}

.後綴輸入區 {
  display: block;
  position: relative;
}

.後綴輸入區 input {
  margin-top: 0;
  padding-right: 56px;
}

.後綴標示 {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--輔助字體顏色);
  font-weight: 400;
}

.顆數幣種 {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: var(--輔助字體顏色);
  font-weight: 700;
}

.勾選項目 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  color: var(--字體顏色);
  font-size: var(--內文字體大小);
  cursor: pointer;
}

.勾選項目 input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
}

.勾選名稱 {
  font-size: 16px;
  font-weight: 700;
}

.欄位標題 { display: flex; align-items: center; gap: 10px; }
.欄位名稱 { font-weight: bold; }
.欄位標題 .勾選項目 { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: bold; white-space: nowrap; cursor: pointer; }
.欄位標題 .勾選項目 input { width: auto; height: auto; margin: 0; flex: 0 0 auto; }

.錯誤訊息 {
  min-height: 24px;
  margin: 0 0 16px;
  color: var(--危險顏色);
  font-size: var(--輔助字體大小);
  overflow-wrap: anywhere;
}

.登入須知 {
  max-width: 460px;
  margin: 24px auto 0;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  line-height: 1.7;
}

.登入須知標題 {
  margin: 0 0 8px;
  font-size: var(--輔助字體大小);
  font-weight: 700;
}

.登入須知 p {
  margin: 0;
}

/* ===== 提示框 ===== */

.提示框 {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #c4d4ee;
  border-radius: var(--按鈕弧度);
  background: #eaf0fa;
  color: #24457f;
  font-size: var(--輔助字體大小);
  overflow-wrap: anywhere;
}

.提示框.警示 {
  border-color: #ecd3a8;
  background: #fdf3e3;
  color: #7a4300;
}

.提示框.危險 {
  border-color: #ecc7c7;
  background: #fbeeee;
  color: #8f2424;
}

.提示框.成功 {
  border-color: #b7e0c4;
  background: #e6f4ea;
  color: #1f6638;
}

.提示框 b {
  font-weight: 700;
}

/* ===== 狀態標籤（配色比照浪人的待辦事項狀態） ===== */

.狀態標籤 {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--邊框顏色);
  border-radius: 12px;
  background: #f2f5f9;
  color: #505866;
  font-size: var(--輔助字體大小);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.狀態標籤.藍色 {
  border-color: #c4d4ee;
  background: #eaf0fa;
  color: #2d5299;
}

.狀態標籤.橘色 {
  border-color: #ecd3a8;
  background: #fdf3e3;
  color: #9a4e00;
}

.狀態標籤.綠色 {
  border-color: #b7e0c4;
  background: #e6f4ea;
  color: #1f6e3c;
}

.狀態標籤.紅色 {
  border-color: #ecc7c7;
  background: #fbeeee;
  color: #a82c2c;
}

.狀態標籤.大標籤 {
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
}

/* ===== 步驟條 ===== */

.步驟條 {
  display: flex;
  margin: 0 0 20px;
  padding: 20px 8px 16px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  background: #ffffff;
  box-shadow: var(--卡片陰影);
  list-style: none;
}

.步驟 {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 2px;
  color: #8a919c;
  font-size: var(--輔助字體大小);
  text-align: center;
}

.步驟::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  left: -50%;
  height: 3px;
  background: #d8dee6;
}

.步驟:first-child::before {
  display: none;
}

.步驟圓點 {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border: 3px solid var(--邊框顏色);
  border-radius: 50%;
  background: #ffffff;
  color: #8a919c;
  font-size: 14px;
  font-weight: 700;
}

.步驟名稱 {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.步驟.完成 {
  color: var(--成功顏色);
}

.步驟.完成::before,
.步驟.目前::before {
  background: var(--成功顏色);
}

.步驟.完成 .步驟圓點 {
  border-color: var(--成功顏色);
  background: var(--成功顏色);
  color: #ffffff;
}

.步驟.目前 {
  color: var(--主要顏色);
  font-weight: 700;
}

.步驟.目前 .步驟圓點 {
  border-color: var(--強調顏色);
  background: var(--強調顏色);
  color: var(--主要顏色);
  box-shadow: 0 0 0 5px rgba(201, 162, 39, 0.22);
}

.步驟.異常 {
  color: var(--危險顏色);
  font-weight: 700;
}

.步驟.異常::before {
  background: var(--危險顏色);
}

.步驟.異常 .步驟圓點 {
  border-color: var(--危險顏色);
  background: var(--危險顏色);
  color: #ffffff;
}

/* ===== 現況卡片：現在是什麼狀態、輪到誰、下一步 ===== */

.現況卡片 {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--邊框顏色);
  border-left: 6px solid #8a919c;
  border-radius: var(--卡片弧度);
  background: #ffffff;
  box-shadow: var(--卡片陰影);
}

.現況卡片.由我處理,
.現況卡片.對象是自己 {
  border-left-color: var(--強調顏色);
  background: #fffdf5;
}

.現況卡片.等待中 {
  border-left-color: #2b6cb0;
}

.現況卡片.完成 {
  border-left-color: var(--成功顏色);
}

.現況卡片.異常 {
  border-left-color: var(--危險顏色);
}

.現況標籤列,
.現況標籤區 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.輪到標籤,
.處理對象標籤 {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 14px;
  background: var(--強調顏色);
  color: var(--主要顏色);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.輪到標籤.對方,
.處理對象標籤.對方 {
  background: #e3e8ef;
  color: #3b4656;
}

.現況標題 {
  margin: 0 0 8px;
  color: var(--主要顏色);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.現況說明 {
  margin: 0 0 16px;
  color: #444c58;
  overflow-wrap: anywhere;
}

.現況卡片 > :last-child {
  margin-bottom: 0;
}

.倒數區 {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: var(--按鈕弧度);
  background: var(--區塊背景顏色);
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.倒數時間 {
  color: var(--主要顏色);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.倒數區.緊急 .倒數時間 {
  color: var(--危險顏色);
}

.操作步驟 {
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
}

.操作步驟.已完成 {
  border-color: #b7e0c4;
  background: #f3faf5;
}

.操作步驟標題 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--主要顏色);
  font-weight: 700;
}

.操作步驟說明 {
  margin: 0 0 12px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.操作步驟 > :last-child {
  margin-bottom: 0;
}

.次要操作區 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--邊框顏色);
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

/* ===== 地址 ===== */

.地址元件 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}

.地址內容 {
  min-width: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.94em;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.地址內容.短地址 {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.複製按鈕 {
  flex: none;
}

.可點地址 {
  color: var(--連結顏色);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}

.可點列 {
  cursor: pointer;
}

.可點列:hover {
  background: var(--區塊背景顏色);
}

.統計數字區 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.主視覺區 + .區塊內容 > .統計數字區:first-child {
  margin: -36px 0 32px;
}

.統計數字項目 {
  background: var(--卡片背景顏色);
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  padding: 14px 16px;
  min-width: 0;
}

.統計數字標籤 {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.統計數字 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.統計數字補充 {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

@media (max-width: 480px) {
  .統計數字 {
    font-size: 22px;
  }
}

.核對地址框 {
  margin: 0 0 16px;
  padding: 16px;
  border: 2px solid var(--強調顏色);
  border-radius: var(--卡片弧度);
  background: #fff8e1;
}

.核對地址標題 {
  margin: 0 0 4px;
  color: #6b5200;
  font-size: var(--輔助字體大小);
  font-weight: 700;
}

.核對地址內容 {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 10px;
  color: var(--主要顏色);
  font-family: Consolas, "Courier New", monospace;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}

.核對地址內容 span:first-child,
.核對地址內容 span:last-child {
  color: #a35c00;
}

.核對地址說明 {
  margin: 10px 0 0;
  color: #6b5200;
  font-size: var(--輔助字體大小);
}

/* ===== 明細表（名稱：內容） ===== */

.明細表 {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px 20px;
  margin: 0;
}

.明細表 dt {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  line-height: 1.8;
}

.明細表 dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.置中明細區 {
  display: flex;
  justify-content: center;
}

.置中明細區 .明細表 {
  width: min(100%, 640px);
  grid-template-columns: 13em minmax(0, 1fr);
}

.暫停按鈕區 {
  display: flex;
  justify-content: center;
}

.待核准變更區 {
  margin-top: 28px;
}

.顆數大字 {
  color: var(--主要顏色);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
}

.顆數幣種字 {
  margin-left: 4px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  font-weight: 500;
}

.不相符 {
  color: var(--危險顏色);
  font-weight: 700;
}

/* ===== 清單與輸入列（後台備註、裁定記錄、處置記錄、參數變更共用） ===== */

.對話輸入區 {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.對話輸入區 textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 9px 12px;
}

.對話輸入區 button {
  flex: none;
}

.證明清單 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.證明項目 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #fafbfd;
}

.證明項目 a {
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.證明資訊 {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

/* ===== 資料表（照醫療器材官網；手機保持橫向捲動） ===== */

.資料表容器 {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--邊框顏色);
  border-radius: 10px;
  background: #ffffff;
}

.資料表 {
  width: 100%;
  border-collapse: collapse;
}

.資料表 th,
.資料表 td {
  padding: 15px;
  border-bottom: 1px solid var(--邊框顏色);
  text-align: center;
  vertical-align: middle;
  overflow-wrap: break-word;
  white-space: nowrap;
}

.資料表 th {
  background: #f8f9fa;
  color: var(--主要顏色);
  font-weight: 700;
  white-space: nowrap;
}

.資料表 tbody tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 769px) {
  .資料表.緊湊 .地址元件 {
    gap: 4px;
  }

  .資料表.緊湊 .複製按鈕 {
    min-height: 26px;
    padding: 2px 6px;
    font-size: var(--輔助字體大小);
  }
}

@media (hover: hover) {
  .資料表 tbody tr:hover {
    background: #f8f9fa;
  }
}

.資料表 .數字欄 {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.資料表 .操作欄 {
  white-space: nowrap;
}

.共用日期框 {
  padding: 10px 14px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  font-size: var(--內文字體大小);
}

.篩選區 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--元件間距);
  margin: 0 0 calc(var(--元件間距) * 2);
}

.篩選區 > span {
  align-self: center;
}

.日期區間 {
  display: inline-flex;
  align-items: center;
  gap: var(--元件間距);
}

.篩選區 input:not([type="checkbox"]),
.篩選區 select {
  display: inline-block;
  width: auto;
  min-width: 160px;
  max-width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
  color: var(--字體顏色);
  font-size: var(--內文字體大小);
}

.篩選區 .自訂選單 {
  min-width: 160px;
  margin: 0;
}

.篩選區 .自訂選單按鈕 {
  height: 100%;
  padding: 10px 40px 10px 14px;
}

.篩選區 .自訂選單清單 {
  min-width: 100%;
  width: max-content;
  max-width: 90vw;
}

.篩選區 .篩選關鍵字 {
  width: 360px;
}

.篩選區 .勾選項目 {
  margin: 0;
  align-items: center;
}

.分頁標籤區 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.分頁標籤 {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: #ffffff;
  color: var(--字體顏色);
  font-size: var(--內文字體大小);
  cursor: pointer;
}

.分頁標籤.當前分頁 {
  border-color: var(--主要顏色);
  background: var(--主要顏色);
  color: #ffffff;
}

/* ===== 首頁 ===== */

.主視覺區 {
  margin-top: -40px;
  padding: 64px 0;
  background: linear-gradient(135deg, var(--主要顏色), #1d4e89);
  color: #ffffff;
}

.主視覺標語 {
  margin: 0 0 16px;
  font-size: var(--主視覺字體大小);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 1px;
}

.主視覺說明 {
  max-width: 640px;
  margin: 0 0 28px;
  color: #d5deea;
  font-size: 18px;
}

.主視覺區 .共用普通按鈕 {
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
  color: #ffffff;
}

.流程清單 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  counter-reset: 流程;
}

.流程項目 {
  padding: 24px 20px;
  border: 1px solid var(--邊框顏色);
  border-radius: 12px;
  background: #ffffff;
  counter-increment: 流程;
}

.流程項目::before {
  content: counter(流程);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--強調顏色);
  color: var(--主要顏色);
  font-weight: 700;
}

.流程名稱 {
  margin: 0 0 6px;
  color: var(--主要顏色);
  font-size: 18px;
  font-weight: 700;
}

.流程說明 {
  margin: 0;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.小節標題 {
  margin: 0 0 20px;
  color: var(--主要顏色);
  font-size: 24px;
  font-weight: 500;
}

.重點清單 {
  margin: 0;
  padding-left: 22px;
}

.重點清單 li {
  margin-bottom: 8px;
}

/* 交易清單卡片（我的交易） */

.交易卡片清單 {
  display: grid;
  gap: 12px;
}

.交易卡片 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto;
  gap: 8px 20px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  background: #ffffff;
  box-shadow: var(--卡片陰影);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (hover: hover) {
  .交易卡片:hover {
    transform: translateY(-2px);
  }
}

.交易卡片 > * {
  min-width: 0;
}

.交易卡片主要 {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.交易卡片編號 {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.交易卡片顆數 {
  color: var(--主要顏色);
  font-size: 20px;
  font-weight: 700;
}

.交易卡片資訊 {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  overflow-wrap: anywhere;
}

.交易卡片狀態 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.角色標籤 {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--主要顏色);
  color: #ffffff;
  font-size: var(--輔助字體大小);
  line-height: 1.7;
  white-space: nowrap;
}

.角色標籤.收款方 {
  background: #6b4fa0;
}

/* 邀請連結 */

.連結框 {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.連結框 input {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--輔助字體大小);
}

.連結框 button {
  flex: none;
}

/* 開關（推播） */

.設定框 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.設定框說明 {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}

/* ===== 彈窗（照醫療器材官網） ===== */

.共用彈窗 {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.共用彈窗 .共用表單卡片 {
  position: relative;
  width: max-content;
  min-width: min(420px, 94vw);
  max-width: 94vw;
  margin: auto;
  padding: 40px;
}

.共用彈窗 .共用表單卡片 > p,
.共用彈窗 .共用表單卡片 > label,
.共用彈窗 .提示框,
.共用彈窗 .確認明細 {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.共用彈窗 .區塊標題 {
  margin: 0;
  padding: 0 32px;
  font-size: 24px;
  text-align: center;
}

.共用彈窗 .共用彈窗關閉按鈕 {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: #666666;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.訊息彈窗內容 {
  margin: 8px 0 24px;
  font-size: var(--導覽字體大小);
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.訊息彈窗內容.錯誤 {
  color: var(--危險顏色);
}

.確認明細 {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--按鈕弧度);
  background: var(--區塊背景顏色);
}

.共用彈窗按鈕區 {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 20px auto 0;
}

.共用彈窗按鈕區 button {
  padding: 8px 20px;
}

/* ===== 頁尾 ===== */

.頁尾 {
  padding: 20px var(--頁面邊距);
  background: var(--頁尾背景顏色);
  color: var(--頁尾字體顏色);
  font-size: var(--輔助字體大小);
  text-align: center;
}

.頁尾段落 {
  margin: 0;
  overflow-wrap: anywhere;
}

.載入中 {
  padding: 48px 0;
  color: var(--輔助字體顏色);
  text-align: center;
}

.密鑰框 {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px dashed #99aabb;
  border-radius: var(--按鈕弧度);
  background: #fafbfd;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.QR碼圖形 {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 0 0 12px;
  border: 1px solid var(--邊框顏色);
  image-rendering: pixelated;
}

/* ===== 平板與手機 ===== */

@media (max-width: 1280px) {
  :root {
    --頁面邊距: 20px;
    --主視覺字體大小: 36px;
    --標題字體大小: 28px;
  }

  .導覽按鈕 {
    display: block;
  }

  .導覽區 {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding-bottom: 12px;
  }

  .頁首.展開導覽 .導覽區 {
    display: flex;
  }

  .導覽區 a,
  .登入名稱 {
    padding: 12px 0;
    text-align: left;
  }

  .導覽區 .帳號選單清單 {
    position: static;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .導覽區 .帳號選單清單 a {
    padding: 12px 0 12px 20px;
    color: #ffffff;
  }

  .導覽區 .帳號選單清單 a:hover {
    background: none;
  }

  .頁首通知區 {
    padding: 8px 0;
  }

  .流程清單 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --頁首高度: 64px;
    --主視覺字體大小: 30px;
    --標題字體大小: 26px;
    --頁面邊距: 16px;
  }

  .頁身 {
    padding: 28px 0 48px;
  }

  .區塊標題 {
    margin-bottom: 28px;
  }

  .卡片清單,
  #功能清單 {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .卡片清單 .功能卡片 {
    padding: 16px 12px;
  }

  .功能卡片 .卡片標題 {
    gap: 6px;
  }

  .功能卡片 .卡片標題 > span {
    white-space: nowrap;
  }

  .功能卡片 .API網址摘要 {
    font-size: var(--輔助字體大小);
    word-break: normal;
    overflow-wrap: break-word;
  }

  .功能卡片 label select {
    padding: 6px 4px;
    font-size: var(--輔助字體大小);
  }

  .資料表 {
    min-width: 640px;
  }

  .資料表容器 {
    padding: 12px;
  }

  .主視覺區 {
    margin-top: -28px;
    padding: 40px 0 56px;
  }

  .主視覺說明 {
    font-size: 16px;
  }

  .品牌連結 {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .品牌圖示 {
    width: auto;
    height: 44px;
  }

  .雙欄版面 {
    grid-template-columns: minmax(0, 1fr);
  }

  .雙欄版面.次欄在右 > :first-child,
  .雙欄版面.次欄在右 > :last-child {
    grid-column: 1;
    grid-row: auto;
  }

  .資料卡片,
  .現況卡片 {
    padding: 18px 16px;
  }

  .現況標題 {
    font-size: 21px;
  }

  .共用表單卡片 {
    padding: 28px 16px;
  }

  .共用彈窗 {
    padding: 8px;
  }

  .共用彈窗 .共用表單卡片 {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 28px 16px;
  }

  .頁面按鈕區,
  .共用彈窗按鈕區 {
    grid-auto-flow: row;
  }

  .流程清單 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .流程項目 {
    padding: 16px;
  }

  .步驟條 {
    padding: 16px 4px 12px;
  }

  .步驟 {
    font-size: var(--輔助字體大小);
  }

  .步驟圓點 {
    width: 28px;
    height: 28px;
    font-size: var(--輔助字體大小);
  }

  .步驟::before {
    top: 13px;
  }

  .核對地址內容 {
    font-size: 19px;
  }

  .明細表 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .明細表 dt {
    margin-top: 10px;
    font-size: var(--輔助字體大小);
  }

  .明細表 dt:first-child {
    margin-top: 0;
  }

  .置中明細區 .明細表 {
    grid-template-columns: minmax(0, 1fr);
  }

  .通知面板 {
    position: fixed;
    top: var(--頁首高度);
    right: 8px;
    left: 8px;
    width: auto;
  }

  .交易卡片 {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
  }

  .交易卡片資訊 {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .操作區全寬 > button,
  .操作區全寬 > a,
  .現況卡片 .水平按鈕區 > button,
  .現況卡片 .水平按鈕區 > a,
  .操作步驟 > button {
    width: 100%;
    min-height: 48px;
  }

  .連結框 {
    flex-direction: column;
  }

  .連結框 button {
    min-height: 44px;
  }


  .分頁標籤區 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .分頁標籤 {
    min-height: 44px;
    padding: 8px 10px;
  }
}

@media (pointer: coarse) {
  button,
  .共用小按鈕 {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}

/* ===== 交易記錄卡（三個區塊：近 30 天、評價、帳戶與累計） ===== */

.交易記錄卡 {
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  background: var(--卡片背景顏色);
  padding: 14px 16px;
  min-width: 0;
}

.交易記錄卡 + .交易記錄卡,
.記錄卡容器 + .記錄卡容器 {
  margin-top: 12px;
}

.記錄標題列 {
  margin-bottom: 10px;
}

.記錄標題 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--輔助字體大小);
}

.記錄地址 {
  color: var(--輔助字體顏色);
  font-family: Consolas, "Courier New", monospace;
}

.記錄區塊 {
  padding: 12px 0;
  border-top: 1px solid var(--邊框顏色);
}

.記錄標題列 + .記錄區塊 {
  border-top: 0;
  padding-top: 0;
}

.記錄區塊.四欄 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
}

.記錄區塊.三欄 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 10px;
}

.記錄欄位 {
  min-width: 0;
}

.記錄數值 {
  font-size: 18px;
  font-weight: 700;
  color: var(--主要顏色);
  overflow-wrap: anywhere;
}

.記錄標籤,
.記錄補充 {
  font-size: var(--輔助字體大小);
  color: var(--輔助字體顏色);
  overflow-wrap: anywhere;
}

.記錄區塊.評價區塊 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}

.好差評數 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: var(--輔助字體大小);
}

.好差評數[hidden],
.記錄區塊[hidden] {
  display: none;
}

.好評數 {
  color: var(--成功顏色);
}

.差評數 {
  color: var(--危險顏色);
}

.評價清單按鈕,
.記錄更多按鈕 {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--連結顏色);
  font-size: var(--輔助字體大小);
  cursor: pointer;
  text-decoration: underline;
}

.記錄更多按鈕 {
  display: block;
  margin-top: 4px;
}

.評價清單區 {
  border-top: 1px solid var(--邊框顏色);
  padding: 10px 0 4px;
  max-height: 320px;
  overflow-y: auto;
}

.評價項目 {
  padding: 8px 0;
  border-bottom: 1px dashed var(--邊框顏色);
}

.評價項目:last-child {
  border-bottom: 0;
}

.評價項目標題 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.評價來源 {
  font-size: var(--輔助字體大小);
  color: var(--輔助字體顏色);
}

.評價內容 {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* 建立交易頁：兩種方式的切換 */

.方式切換區 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.方式按鈕 {
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: var(--區塊背景顏色);
  padding: 10px 8px;
  font-size: var(--內文字體大小);
  color: var(--字體顏色);
  cursor: pointer;
}

.方式按鈕.使用中 {
  border-color: var(--主要顏色);
  background: var(--主要顏色);
  color: #ffffff;
  font-weight: 700;
}

/* 交易詳情頁：評價區 */

.評價選擇區 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.評價選項 {
  border: 1px solid var(--邊框顏色);
  border-radius: var(--按鈕弧度);
  background: var(--卡片背景顏色);
  padding: 10px 8px;
  font-size: var(--內文字體大小);
  cursor: pointer;
}

.評價選項.好評.選取 {
  border-color: var(--成功顏色);
  background: #e9f6ec;
  color: var(--成功顏色);
  font-weight: 700;
}

.評價選項.差評.選取 {
  border-color: var(--危險顏色);
  background: #fdecea;
  color: var(--危險顏色);
  font-weight: 700;
}

.評價顯示 {
  padding: 10px 0;
  border-top: 1px solid var(--邊框顏色);
}

.評價顯示:first-child {
  border-top: 0;
  padding-top: 0;
}

.評價顯示標題 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .記錄區塊.四欄,
  .記錄區塊.三欄 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .日期區間 {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    flex: 0 0 100%;
  }

  .日期區間 input[type="date"] {
    flex: 1 1 40%;
    width: 0;
    min-width: 0;
  }

  .記錄數值 {
    font-size: 17px;
  }

  .篩選區 {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .篩選區 > .日期區間 {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-self: stretch;
  }

  .篩選區 > input:not([type="checkbox"]),
  .篩選區 > select,
  .篩選區 > .自訂選單,
  .篩選區 > button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .統計數字項目 .短地址 {
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .統計數字項目:has(.地址元件) {
    grid-column: 1 / -1;
  }

  .統計數字項目 .地址元件 {
    display: flex;
    align-items: flex-start;
  }

  #功能設定清單 {
    grid-template-columns: minmax(0, 1fr);
  }

  #分頁標籤區 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== 錢包選單（同一種共用彈窗） ===== */

.共用彈窗 .錢包選單卡片 {
  width: min(520px, 94vw);
}

.錢包選單內容 {
  padding: 0;
}

.錢包選單卡片.連接中 .錢包選單內容 {
  opacity: 0.5;
  pointer-events: none;
}

.錢包選單說明 {
  margin: 0 0 14px;
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
}

.錢包清單 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.錢包項目 {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  min-height: 60px;
  padding: 9px 12px;
  border: 1px solid var(--邊框顏色);
  border-radius: var(--卡片弧度);
  background: var(--區塊背景顏色);
  color: var(--字體顏色);
  font: inherit;
  text-align: left;
}

.錢包項目.可選 {
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.錢包項目.可選:focus-visible {
  outline: 2px solid var(--強調顏色);
  outline-offset: 1px;
}

.錢包圖示 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.錢包圖示 img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.錢包項目:not(.可選) .錢包圖示 img {
  filter: grayscale(1);
  opacity: 0.65;
}

.錢包圖示文字 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--主要顏色);
  color: var(--強調顏色);
  font-size: 18px;
  font-weight: 700;
}

.錢包文字區 {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.錢包名稱 {
  color: var(--主要顏色);
  font-weight: 700;
  line-height: 1.4;
}

.錢包副標 {
  color: var(--輔助字體顏色);
  font-size: var(--輔助字體大小);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.錢包右側 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.狀態標籤.錢包上次使用 {
  border-color: #e3cf8a;
  background: #fbf4dc;
  color: #6b5200;
}

.錢包連結 {
  min-height: 30px;
  color: var(--主要顏色);
  font-weight: 500;
}

.錢包選單狀態 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 24px 0;
  padding: 10px 14px;
  border: 1px solid #c4d4ee;
  border-radius: var(--按鈕弧度);
  background: #eaf0fa;
  color: #24457f;
  font-size: var(--輔助字體大小);
  overflow-wrap: anywhere;
}

.錢包選單狀態[hidden] {
  display: none;
}

.錢包選單狀態::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 2px solid #9db4dc;
  border-top-color: var(--主要顏色);
  border-radius: 50%;
  animation: 錢包選單轉圈 0.8s linear infinite;
}

@keyframes 錢包選單轉圈 {
  to {
    transform: rotate(360deg);
  }
}

.錢包選單錯誤 {
  margin: 14px 0 0;
}

.錢包選單錯誤:empty {
  margin: 0;
}

.錢包步驟清單 {
  margin: 0 0 16px;
  padding-left: 22px;
}

.錢包步驟清單 li {
  margin-bottom: 6px;
}

.錢包選單內容 .共用彈窗按鈕區 {
  margin-top: 4px;
}

@media (hover: hover) {
  .錢包項目.可選:hover {
    border-color: var(--強調顏色);
    background: #fffdf4;
    box-shadow: 0 0 0 1px var(--強調顏色);
  }
}

@media (prefers-reduced-motion: reduce) {
  .錢包選單狀態::before {
    animation: none;
  }
}

@media (max-width: 480px) {
  .錢包項目 {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .錢包右側 {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* ===== 鍵盤焦點外框（全站統一）：用鍵盤操作時，按鈕、連結、輸入框等聚焦的元件都有清楚的外框；滑鼠點擊不顯示 ===== */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
input[type="file"]:focus-visible,
[role="tab"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* 深色底（頁首、頁尾）上的連結與按鈕用亮色外框才看得清楚 */
.頁首 a:focus-visible,
.頁首 button:focus-visible,
.頁首 select:focus-visible,
.頁尾 a:focus-visible {
  outline-color: #ffd866;
}

/* ===== 頁尾連結（使用說明、服務條款、隱私權政策）與客服聯絡方式 ===== */

.頁尾連結區 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin-top: 8px;
}

.頁尾連結 {
  color: var(--頁尾字體顏色);
  text-decoration: underline;
}

.頁尾連結:hover {
  color: #ffffff;
}

.頁尾客服 {
  margin-top: 6px;
}

/* ===== 公告橫幅（首頁；設定檔有填「公告」才顯示） ===== */

.公告區 {
  /* 頁身上方有 32px 的留白、主視覺區用負的上邊距貼齊頁首：橫幅也貼齊頁首，並把自己的高度讓出來 */
  margin: -32px 0 32px;
  padding: 12px var(--頁面邊距);
  border-width: 0 0 1px;
  border-radius: 0;
  font-size: inherit;
  font-weight: 700;
  text-align: center;
  white-space: pre-line;
}

/* ===== 內容頁（服務條款、隱私權政策、使用說明） ===== */

.內容頁 {
  line-height: 1.8;
}

.內容頁 p {
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}

.內容頁 a {
  color: var(--連結顏色);
}

.內容頁標題 {
  margin: 28px 0 12px;
  padding-top: 4px;
  color: var(--主要顏色);
  font-size: 20px;
  font-weight: 700;
  scroll-margin-top: 80px;
}

.內容頁標題:first-child {
  margin-top: 0;
}

.內容頁 .重點清單 {
  margin-bottom: 14px;
}

.內容頁 .重點清單 li,
.內容頁步驟 li {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.內容頁步驟 {
  margin: 0 0 16px;
  padding-left: 24px;
}

.內容頁目錄 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 16px 20px;
}

.內容頁目錄 a {
  padding: 6px 12px;
  border: 1px solid var(--邊框顏色);
  border-radius: 999px;
  color: var(--連結顏色);
  font-size: var(--輔助字體大小);
  text-decoration: none;
}

.內容頁目錄 a:hover {
  background: #eaf0fa;
}

.問答項目 {
  border-bottom: 1px solid var(--邊框顏色);
}

.問答項目 summary {
  padding: 12px 0;
  color: var(--主要顏色);
  font-weight: 700;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.問答項目 p {
  margin: 0 0 14px;
  color: var(--字體顏色);
}

/* ===== 找不到頁面、系統錯誤 ===== */

.錯誤頁卡片 {
  margin-top: 32px;
  padding: 40px 24px;
  text-align: center;
}

.錯誤頁代碼 {
  margin: 0 0 8px;
  color: var(--強調顏色);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.錯誤頁說明 {
  margin: 12px 0 24px;
  color: var(--輔助字體顏色);
  overflow-wrap: anywhere;
}

.錯誤頁按鈕區 {
  justify-content: center;
}

/* ===== 同意服務條款的勾選項目、封鎖名單、自動取消說明 ===== */

.勾選項目 a {
  color: var(--連結顏色);
}

.封鎖輸入列 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.封鎖輸入列 input {
  flex: 1 1 240px;
  min-width: 0;
  margin-top: 0;
}

.封鎖清單 {
  margin: 0;
  padding: 0;
  list-style: none;
}

.封鎖項目 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--邊框顏色);
}

.封鎖項目 .地址元件 {
  min-width: 0;
}

.自動取消說明 {
  margin: 12px 0 0;
}

/* ===== 補五：用戶畫面與用戶流程 ===== */

/* 頁面上方常駐的橫幅（連線中斷、被停權）：貼齊頁首，並把自己的高度讓出來（做法同公告橫幅） */
.頁面橫幅區 {
  position: sticky;
  top: var(--頁首高度);
  z-index: 40;
  margin: -40px 0 32px;
}

.連線中斷提示,
.停權提示 {
  padding: 12px var(--頁面邊距);
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

.連線中斷提示 {
  border-bottom: 1px solid #ecc7c7;
  background: #fbeeee;
  color: #8f2424;
}

.停權提示 {
  border-bottom: 1px solid #ecd3a8;
  background: #fdf3e3;
  color: #7a4300;
}

/* 聯絡客服（交易詳情的現況卡片與右欄；連結取自網站設定的「客服聯絡方式」，空白就不顯示） */
.聯絡客服框 {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 2px solid var(--強調顏色);
  border-radius: var(--卡片弧度);
  background: #fffdf5;
}

.聯絡客服標題 {
  margin: 0 0 8px;
  color: var(--主要顏色);
  font-weight: 700;
}

.聯絡客服說明 {
  margin: 0 0 8px;
  color: #7a4300;
  font-size: var(--輔助字體大小);
}

.聯絡客服按鈕 {
  display: inline-block;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.資料卡片 .聯絡客服框 {
  margin-bottom: 0;
}

/* 存款已送出、等鏈上確認 */
.存款送出區 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.訊息彈窗內容 .地址元件 {
  margin-left: 4px;
}

/* 我的交易：清單上的倒數 */
.交易卡片倒數時間 {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.交易卡片倒數時間.緊急 {
  color: var(--危險顏色);
}

/* 交易頁：封鎖對方的捷徑 */
.封鎖操作區:empty {
  display: none;
}

/* 資料表裡的按鈕與按鈕樣式的連結：整顆不從字中間折行（欄位窄時整顆換到下一行，不會把「Review」折成兩行）。
   .資料表 的格子為了長地址設了 overflow-wrap: anywhere，按鈕要另外改回來 */
@media (min-width: 0) {
  .資料表 td button,
  .資料表 td a[class*="按鈕"] {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
  }
}

@media (max-width: 600px) {
  .連線中斷提示,
  .停權提示 {
    padding: 10px 16px;
    font-size: var(--輔助字體大小);
  }

  .法幣顆數列 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
