/* ============================================================
   領取頁面（三種獎金）
   ============================================================ */

/* ---------- 提示訊息 ---------- */

.claim-flash {
  padding: 13px 17px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 16px;
  word-break: break-word;
}

.flash-ok {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

.flash-err {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
}

/* ---------- 獎金卡片 ---------- */

.reward-card {
  background: var(--navy-800);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.reward-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  opacity: 0.6;
}

.reward-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.reward-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.reward-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-static {
  background: #4da3ff;
  box-shadow: 0 0 8px rgba(77, 163, 255, 0.7);
}

.dot-direct {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
}

.dot-community {
  background: #d4af37;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

/* ---------------- 兌換 USDS 卡片 ---------------- */

.dot-usds {
  background: linear-gradient(135deg, #ffe79a, #e8c25a 45%, #b8860b);
  box-shadow: 0 0 10px rgba(232, 194, 90, 0.85);
}

/* 小龍蝦：橘紅漸層 */
.dot-lobster {
  background: linear-gradient(135deg, #ffb27a, #ff6f3c 55%, #c2410c);
  box-shadow: 0 0 10px rgba(255, 111, 60, 0.85);
}

/* USDS 兌換回 USDT：反向（青綠） */
.dot-usds-sell {
  background: linear-gradient(135deg, #8ff0c8, #26a17b 50%, #0f6b4f);
  box-shadow: 0 0 10px rgba(38, 161, 123, 0.85);
}

/* 美債入金回饋：1:1 送 USDS（藍色，與上面幾張區隔） */
.dot-usds-gift {
  background: linear-gradient(135deg, #a5d8ff, #4dabf7 50%, #1971c2);
  box-shadow: 0 0 10px rgba(77, 171, 247, 0.85);
}

/* ---------------- USDS 上線說明卡（全紫色系） ---------------- */

.usds-notice {
  margin: 14px 0 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(191, 90, 242, 0.38);
  background:
    linear-gradient(135deg, rgba(147, 51, 234, 0.14), rgba(191, 90, 242, 0.06)),
    rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

/* 左側裝飾條：紫色漸層 */
.usds-notice::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #f3d9ff, #bf5af2 45%, #7e22ce);
}

.usds-notice-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.usds-notice-icon {
  font-size: 17px;
  line-height: 1;
}

.usds-notice-title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #f3d9ff, #d8a6ff 45%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.usds-notice-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ---- 代幣名稱：USDS / USDT 用黑色 ---- */

.token-black {
  /* 蓋掉父層的漸層文字效果（-webkit-text-fill-color: transparent） */
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #000 !important;
  color: #000 !important;
  font-weight: 900;
  letter-spacing: 0.3px;
  /* 深色背景上純黑會糊掉，加一圈淺色描邊把字框出來 */
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.85),
    0 0 3px rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(255, 255, 255, 0.35);
}

/* 標語裡的代幣名稱稍微放大，跟「即將上各大交易所」有層次 */
.usds-slogan-main .token-black {
  font-size: 1.08em;
}

/* 內文粗體裡的代幣名稱 */
.usds-notice-line b.token-black,
.usds-slogan-sub b.token-black {
  font-size: 1em;
}

/* ---- 「兌換」用綠色 ---- */

.token-green {
  /* 同樣要蓋掉父層的漸層文字效果 */
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #22e07d !important;
  color: #22e07d !important;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 0 12px rgba(34, 224, 125, 0.55);
}

/* ---- 強調標語（全紫） ---- */

.usds-slogan {
  margin: 2px 0 12px;
  padding: 14px 14px 13px;
  border-radius: 11px;
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(191, 90, 242, 0.22), transparent 70%),
    linear-gradient(135deg, rgba(147, 51, 234, 0.16), rgba(191, 90, 242, 0.08));
  border: 1px solid rgba(191, 90, 242, 0.45);
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.2) inset;
  position: relative;
  overflow: hidden;
}

.usds-slogan-main {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  line-height: 1.4;
  background: linear-gradient(135deg, #fdf4ff, #f0abfc 30%, #d946ef 60%, #a21caf);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 26px rgba(217, 70, 239, 0.5);
}

/* 標語下方的紫色分隔線 */
.usds-slogan::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin: 9px auto 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #a855f7, #e879f9, #a855f7);
}

.usds-slogan-sub {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 1px;
  color: #c9b3d6;
  font-variant-numeric: tabular-nums;
}

.usds-slogan-sub b {
  font-weight: 800;
  font-size: 14.5px;
  color: #e879f9;
  text-shadow: 0 0 14px rgba(232, 121, 249, 0.5);
}

/* USDT 用較淺的紫，仍與數字有層次差 */
.usds-slogan-sub b:last-child {
  color: #d8b4fe;
  text-shadow: 0 0 14px rgba(191, 90, 242, 0.5);
}

.usds-notice-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  word-break: break-word;
}

.usds-notice-line b {
  color: #e879f9;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.usds-notice-foot {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed rgba(191, 90, 242, 0.32);
  font-size: 11.5px;
  line-height: 1.6;
  color: #a78bbd;
  letter-spacing: 0.3px;
}

/* ---- 目前人數進度 ---- */

.usds-progress {
  margin-top: 14px;
  padding: 13px 14px 12px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(191, 90, 242, 0.26);
}

.usds-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.usds-progress-label {
  font-size: 12px;
  color: #a78bbd;
  letter-spacing: 0.5px;
}

.usds-progress-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.usds-progress-value b {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #fdf4ff, #e879f9 45%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.usds-progress-target {
  font-size: 12.5px;
  color: #a78bbd;
  font-weight: 600;
}

.usds-progress-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.usds-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7e22ce, #a855f7 55%, #e879f9);
  box-shadow: 0 0 12px rgba(191, 90, 242, 0.65);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.usds-progress-note {
  margin-top: 8px;
  font-size: 11.5px;
  color: #a78bbd;
  text-align: center;
  letter-spacing: 0.3px;
}

.usds-sell-text {
  background: linear-gradient(135deg, #b9f6dd, #26a17b 55%, #0f6b4f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.usds-sell-btn {
  background: linear-gradient(135deg, #26a17b, #0f6b4f) !important;
  color: #eafff6 !important;
  font-weight: 800;
  border: 0 !important;
}

.usds-sell-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.35);
}

/* 數量輸入列 */
.usds-sell-input-row {
  margin: 4px 0 12px;
}

/* 快捷金額（100 / 200 / 500 / 1000 U） */
.usds-sell-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 2px 0 10px;
}

.usds-sell-chip {
  background: #f2c94c;
  border: 1px solid #d9a91f;
  color: #1a1400;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-variant-numeric: tabular-nums;
}

.usds-sell-chip:hover {
  background: #ffd75e;
}

.usds-sell-chip:active {
  transform: scale(0.97);
}

.usds-sell-chip.active {
  background: #ffb300;
  border-color: #a87400;
  color: #1a1400;
  box-shadow: inset 0 0 0 2px rgba(26, 20, 0, 0.25);
}

.usds-sell-chip.hit {
  border-color: #a87400;
}

.usds-sell-chip.miss {
  opacity: 0.35;
  cursor: not-allowed;
}

.usds-sell-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.usds-sell-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px 4px 4px 12px;
}

.usds-sell-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 8px 0;
}

.usds-sell-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.usds-sell-max {
  flex-shrink: 0;
  background: rgba(38, 161, 123, 0.18);
  color: #57e0b0;
  border: 1px solid rgba(38, 161, 123, 0.45);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.usds-sell-max:active {
  transform: scale(0.96);
}

.usds-card {
  border-color: rgba(232, 194, 90, 0.35);
  background:
    linear-gradient(180deg, rgba(232, 194, 90, 0.06), transparent 60%),
    var(--bg-card);
}

.usds-text {
  background: linear-gradient(135deg, #ffe79a, #e8c25a 50%, #b8860b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.usds-preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
  min-height: 18px;
}

.usds-preview b {
  color: #e8c25a;
  font-weight: 700;
}

.usds-btn {
  background: linear-gradient(135deg, #e8c25a, #b8860b) !important;
  color: #2a1f00 !important;
  font-weight: 800;
  border: 0 !important;
}

.usds-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.reward-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 2px 9px;
  letter-spacing: 0.5px;
}

.reward-amount {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.reward-unit {
  font-size: 13px;
  font-weight: 500;
  margin-left: 6px;
  -webkit-text-fill-color: var(--text-muted);
  color: var(--text-muted);
}

.reward-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ---------- 結算時段說明 ---------- */

.settle-info {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(168, 134, 28, 0.2);
}

.settle-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
}

.settle-time {
  font-family: Consolas, Monaco, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-200);
  letter-spacing: 0.5px;
  flex: 0 0 auto;
  min-width: 46px;
}

.settle-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.settle-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(168, 134, 28, 0.25);
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- 領取按鈕 ---------- */

.reward-btn {
  width: 100%;
  padding: 12px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  font-family: inherit;
  cursor: not-allowed;
  transition: all 0.25s;

  background: var(--navy-600);
  color: var(--text-muted);
}

.reward-btn.ready {
  background: linear-gradient(135deg, #f0d98a, #d4af37 55%, #b8942a);
  color: #1a1200;
  border-color: transparent;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.28);
}

.reward-btn.ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.45);
}

.reward-btn.ready:active {
  transform: translateY(0);
}

/*
 * 按下後的「處理中」狀態。
 *
 * 為什麼需要：
 *   按鈕在送出時會設 disabled = true（防止連點造成重複領取），
 *   但 .ready 的金色漸層用的是 background-image，
 *   只改 background-color 蓋不掉它，
 *   所以 disabled 之後看起來還是金色、像可以按，
 *   會員會以為沒反應又猛點。
 *
 *   這裡同時清掉 background-image 與 background-color，
 *   強制覆蓋成灰色 + 不可點，
 *   讓「已經送出去了」一眼就能看出來。
 */
.reward-btn:disabled,
.reward-btn.ready:disabled,
.reward-btn.busy {
  background-color: #2a3548 !important;
  background-image: none !important;
  color: #8b98ab !important;
  border-color: #3a4557 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  letter-spacing: 2px;
  animation: btn-busy 1.4s ease-in-out infinite;
}

/* 處理中的呼吸效果，表示「正在跑，不是壞掉」 */
@keyframes btn-busy {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

.reward-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 9px;
  text-align: center;
  line-height: 1.6;
}

/* ---------- 全部領取 ---------- */

.claim-all-btn {
  width: 100%;
  padding: 16px 30px;
  margin-top: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 40px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  font-family: inherit;
  cursor: not-allowed;
  transition: all 0.25s;

  background: transparent;
  color: var(--text-muted);
}

.claim-all-btn.ready {
  background: linear-gradient(135deg, #f0d98a, #d4af37 55%, #b8942a);
  color: #1a1200;
  border-color: transparent;
  cursor: pointer;
  box-shadow: 0 6px 26px rgba(212, 175, 55, 0.32);
}

.claim-all-btn.ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(212, 175, 55, 0.5);
}

/* ---------- 領取歷史狀態標籤 ---------- */

.status-tag {
  font-size: 10.5px;
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.status-ok {
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
}

.status-pending {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
}

.status-fail {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}

/* ---------- 資金池警告 ---------- */

.pool-note {
  padding: 13px 17px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.7;
  margin-top: 14px;
}

.pool-warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

/* ---------- RWD ---------- */

@media (max-width: 640px) {
  .reward-card {
    padding: 17px 16px;
  }

  .reward-amount {
    font-size: 26px;
  }

  .reward-btn,
  .claim-all-btn {
    letter-spacing: 2px;
    font-size: 13.5px;
  }

  .reward-title {
    font-size: 13.5px;
  }
}

/* ================================================================== */
/*  領取補助金（入金專屬）                                             */
/* ================================================================== */

.subsidy-info {
  margin: 14px 0 4px;
}

.subsidy-amount {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: var(--gold, #d4af37);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.subsidy-amount small {
  font-size: 13px;
  margin-left: 5px;
  color: #94a3b8;
  font-weight: 500;
}

.subsidy-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.subsidy-row:last-child {
  border-bottom: none;
}

.subsidy-row > span:first-child {
  color: #8b7d55;
  white-space: nowrap;
  flex-shrink: 0;
}

.subsidy-row > span:last-child {
  color: #5c4d20;
  text-align: right;
  word-break: break-all;
}

/* 地址用等寬字體，方便核對 */
.subsidy-row .s-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.2px;
  max-width: 62%;
  line-height: 1.6;
}

/* 被拒絕時的審核說明 */
.s-reason {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 14px 0 4px;
  padding: 13px 15px;
  border-radius: 11px;
  background: rgba(224, 90, 90, 0.08);
  border: 1px solid rgba(224, 90, 90, 0.38);
}

.s-reason-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #c0392b;
  letter-spacing: 0.5px;
}

.s-reason-text {
  font-size: 13.5px;
  color: #7a2f22;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

.s-reason-tip {
  font-size: 11px;
  color: #a89860;
  line-height: 1.5;
}

/* 三段進度 */
.subsidy-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 18px 0 16px;
  padding: 0 2px;
}

.s-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.s-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #f3ecd8;
  color: #a89860;
  border: 1px solid #ddd0a8;
  position: relative;
  z-index: 2;
  transition: all 0.25s;
}

.s-step.active .s-dot {
  background: linear-gradient(180deg, #e8c968, #d4af37);
  color: #3d3008;
  border-color: #d4af37;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.s-step.done .s-dot {
  background: #6fbf73;
  color: #fff;
  border-color: #6fbf73;
}

.s-label {
  font-size: 10.5px;
  color: #a89860;
  white-space: nowrap;
  transition: color 0.25s;
}

.s-step.active .s-label,
.s-step.done .s-label {
  color: #5c4d20;
  font-weight: 600;
}

.s-line {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e8dfc4;
  z-index: 1;
  transition: background 0.25s;
}

.s-step.done .s-line {
  background: #6fbf73;
}

.s-step:last-child .s-line {
  display: none;
}

/* 面板 */
.s-panel {
  display: none;
}

.s-panel.active {
  display: block;
  animation: sFadeIn 0.25s ease;
}

@keyframes sFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.s-desc {
  font-size: 13px;
  color: #7a6b40;
  line-height: 1.75;
  margin-bottom: 14px;
}

/* 表單欄位 */
.s-field {
  margin-bottom: 16px;
}

.s-label-txt {
  display: block;
  font-size: 12.5px;
  color: #5c4d20;
  margin-bottom: 7px;
  font-weight: 600;
}

.s-field input[type="tel"] {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid #ddd0a8;
  background: #fffdf6;
  color: #3d3008;
  font-size: 16px;
  letter-spacing: 2px;
  font-family: ui-monospace, Consolas, monospace;
  transition: border-color 0.2s;
}

.s-field input[type="tel"]:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.s-field-hint {
  font-size: 11px;
  color: #a89860;
  margin-top: 6px;
  line-height: 1.55;
}

/* 國家／地區下拉選單（與上方卡號欄位同一套視覺） */
.s-field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid #ddd0a8;
  background: #fffdf6;
  color: #3d3008;
  font-size: 16px;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #a89860 50%),
                    linear-gradient(135deg, #a89860 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px),
                       calc(100% - 13px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.s-field select:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.s-field select.invalid {
  border-color: #e05a5a;
  box-shadow: 0 0 0 3px rgba(224, 90, 90, 0.12);
}

/* ================================================================
 *  自訂下拉選單（國家／地區）
 *
 *  為什麼不用原生 <select>：
 *    TokenPocket 的內建瀏覽器是 Android WebView，
 *    原生 select 在部分版本「點下去完全沒反應」，
 *    使用者根本選不到國家。
 *
 *  做法：
 *    真正的 <select> 用 .s-select-native 隱藏（仍保留供 JS 讀值），
 *    上面疊按鈕 + 清單，全部用一般 click 事件，
 *    任何瀏覽器（含 WebView）都能正常操作。
 * ================================================================ */

/* 真正的 select：隱藏但仍在 DOM 裡（JS 讀 .value 用） */
.s-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.s-select {
  position: relative;
  width: 100%;
}

/* 觸發按鈕：外觀與 .s-field select 一致 */
.s-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid #ddd0a8;
  background: #fffdf6;
  color: #3d3008;
  font-size: 16px;
  font-family: inherit;
  letter-spacing: 0.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.s-select-btn:focus-visible {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.s-select-btn.open {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

/* 未選擇時顯示灰字（placeholder 感） */
.s-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a7c4a;
}

.s-select-btn.has-value .s-select-label {
  color: #3d3008;
}

.s-select-caret {
  flex-shrink: 0;
  font-size: 10px;
  color: #a89860;
  transition: transform 0.2s;
}

.s-select-btn.open .s-select-caret {
  transform: rotate(180deg);
}

/* 展開清單：貼在按鈕下方，可捲動 */
.s-select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid #ddd0a8;
  background: #fffdf6;
  box-shadow: 0 10px 30px rgba(80, 60, 10, 0.18);
  padding: 6px;
}

.s-select-list[hidden] {
  display: none;
}

.s-select-opt {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: #3d3008;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.s-select-opt:active,
.s-select-opt.active {
  background: rgba(212, 175, 55, 0.16);
}

.s-select-opt.selected {
  background: rgba(212, 175, 55, 0.24);
  font-weight: 700;
}

/* 驗證失敗時的紅框 */
.s-select-btn.invalid {
  border-color: #e05a5a;
  box-shadow: 0 0 0 3px rgba(224, 90, 90, 0.12);
}

/* 上傳按鈕 */
.s-upload {
  width: 100%;
  padding: 20px 14px;
  border-radius: 11px;
  border: 1.5px dashed #ddd0a8;
  background: #fffdf6;
  color: #a89860;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.s-upload:active {
  background: #f8f2e0;
  border-color: #d4af37;
}

.s-preview {
  width: 100%;
  border-radius: 10px;
  display: block;
  border: 1px solid #ddd0a8;
}

.s-preview-actions {
  display: flex;
  gap: 9px;
  margin-top: 9px;
}

.s-preview-actions button {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  font-size: 12.5px;
  border: 1px solid #ddd0a8;
  background: #fffdf6;
  color: #5c4d20;
  cursor: pointer;
}

.s-preview-actions button:active {
  background: #f3ecd8;
}
