/* OkiGuard 共用樣式：色彩變數、版型骨架（header/footer/按鈕）
   各頁面（index.html / login.html / terms.html / privacy.html）都會載入這份檔案，
   頁面各自的內容樣式則寫在各自檔案的 <style> 裡，避免重複。 */
:root{
  --glow: #22D3EE;
  --glow-soft: rgba(34,211,238,0.14);
  --bg: #0A1626;
  --bg-alt: #0E2038;
  --glass: rgba(255,255,255,0.045);
  --glass-strong: rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.11);
  --text: #F5F7FA;
  --text-body: rgba(245,247,250,0.68);
  --text-mute: rgba(245,247,250,0.45);
  --good: #86EFAC;
  --warn: #FDE047;
  --bad: #FCA5A5;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{
  scroll-behavior:smooth;
  /* iOS 橫屏時不要自行放大字級，維持設計比例 */
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text-body);
  line-height: 1.6;
  min-height:100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(34,211,238,0.10), transparent 38%),
    radial-gradient(circle at 88% 28%, rgba(34,211,238,0.08), transparent 42%),
    radial-gradient(circle at 20% 70%, rgba(34,211,238,0.06), transparent 40%),
    radial-gradient(circle at 90% 88%, rgba(34,211,238,0.08), transparent 42%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
  background-attachment: fixed;
}
/* 簡體中文改用 SC 字型堆疊：上面堆疊裡的 Noto Sans TC／PingFang TC／微軟正黑體雖然也含簡體字碼，
   但字形是繁體寫法（例：「关」會被畫成「关」的繁中字形，看起來像錯字；複製出來仍然是 U+5173「关」），
   由 common/include.jsp 把 <html lang> 覆寫成目前語系後，這條規則接手 */
html[lang^="zh-CN"] body,
html[lang^="zh-Hans"] body,
html[lang^="zh-SG"] body{
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Microsoft JhengHei", sans-serif;
}
/* 泰文：上述中文字型（正黑體／雅黑）完全不含泰文字形，若不指定，瀏覽器會隨機挑備援字型，
   聲調符（่ ้ ์）容易錯位；Leelawadee UI 是 Windows 內建泰文字型，Tahoma 當舊版備援 */
html[lang^="th"] body{
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans Thai", "Leelawadee UI", "Tahoma", "Microsoft JhengHei", sans-serif;
}
/* 英文／越南文：正黑體只收基本拉丁，越南文的聲調符（ữ ạ ế）在 Latin Extended Additional 區它沒有，
   英文若直接沿用正黑體也會拿到偏寬的 CJK 拉丁字形；改用系統 UI 字型最完整 */
html[lang="en"] body,
html[lang^="vi"] body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif;
}
a{ text-decoration:none; color:inherit; }
img{ display:block; max-width:100%; }
.container{ max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section{ padding: 88px 0; position:relative; }
h1,h2,h3{ font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
h2{ font-size: 32px; margin-bottom: 14px; }
h3{ font-size: 18px; margin-bottom: 8px; color: var(--text); }
p{ color: var(--text-body); }
.eyebrow{
  display:inline-block; font-size:13px; font-weight:700; letter-spacing:0.06em;
  color: var(--glow); background: var(--glow-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.section-head{ max-width:640px; margin-bottom:12px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 13px 26px; border-radius: 999px; font-weight:700; font-size:15px;
  cursor:pointer; border: 1.5px solid transparent; transition: all .15s ease;
}
.btn-primary{ background: var(--glow); color:#062430; box-shadow: 0 0 0 1px rgba(34,211,238,0.35), 0 14px 32px -10px rgba(34,211,238,0.55); }
.btn-primary:hover{ background:#67E3F4; transform: translateY(-1px); }
.btn-outline{ background: transparent; color: var(--text); border-color: rgba(255,255,255,0.28); }
.btn-outline:hover{ background: rgba(255,255,255,0.06); }

/* Header: floating pill nav */
header{ position: sticky; top: 16px; z-index: 50; padding: 0 24px; }
.nav-shell{
  max-width: 1120px; margin: 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  background: rgba(10,22,38,0.72); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: 999px;
  padding: 10px 12px 10px 22px;
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.6);
}
.brand-lockup{ display:flex; align-items:baseline; gap:8px; }
.brand-lockup .product-tag{ font-size:11px; font-weight:700; letter-spacing:0.08em; color: var(--glow); text-transform:uppercase; }
.nav-links{ display:flex; gap:30px; align-items:center; }
.nav-links a{ font-size:14px; font-weight:600; color: var(--text-body); }
.nav-links a:hover{ color: var(--text); }
.nav-cta{ display:flex; gap:10px; align-items:center; }
.nav-cta .btn{ padding: 9px 18px; font-size:13px; }

.reveal{ opacity:0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view{ opacity:1; transform:none; }

/* Footer */
footer{ border-top:1px solid var(--glass-border); padding: 48px 0; }
.footer-top{ display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:32px; padding-bottom:32px; margin-bottom:24px; border-bottom:1px solid var(--glass-border); }
.footer-tagline{ font-size:13px; color: var(--text-mute); max-width:280px; margin-top:12px; }
.footer-cols{ display:flex; gap:56px; flex-wrap:wrap; }
.footer-col h4{ font-size:12px; font-weight:800; color: var(--text); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:14px; }
.footer-col a{ display:block; font-size:13px; color: var(--text-mute); margin-bottom:10px; }
.footer-col a:hover{ color: var(--glow); }
.footer-row{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; }
.footer-links{ display:flex; gap:24px; }
.footer-links a{ font-size:13px; color: var(--text-mute); }
.footer-note{ font-size:12px; color: rgba(245,247,250,0.3); margin-top:20px; }

@media (max-width: 860px){
  .nav-links{ display:none; }
  .footer-top{ flex-direction:column; }
}

/* ============================================================
   App Shell：登入後會員端共用側邊欄／頂欄骨架
   供 app-check.html / app-monitoring.html / app-billing.html 共用
   ============================================================ */
.app-shell{ display:flex; min-height:100vh; }
.app-sidebar{
  width:224px; flex-shrink:0; background: rgba(10,22,38,0.6); backdrop-filter: blur(14px);
  border-right:1px solid var(--glass-border); padding:20px 14px; display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh;
}
.app-sidebar .brand-lockup{ display:flex; align-items:center; gap:8px; padding:6px 8px 24px; }
.app-nav{ display:flex; flex-direction:column; gap:2px; }
.app-nav a{
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px;
  font-size:14px; font-weight:600; color: var(--text-body);
}
.app-nav a:hover{ background: var(--glass); color: var(--text); }
.app-nav a.active{ background: var(--glow-soft); color: var(--glow); }
.app-nav a svg{ flex-shrink:0; }
.nav-badge{
  margin-left:auto; font-size:10px; font-weight:700; color: var(--text-mute);
  background: rgba(255,255,255,0.06); padding:2px 7px; border-radius:6px; letter-spacing:0.02em;
}
.app-sidebar-foot{ margin-top:auto; padding-top:16px; border-top:1px solid var(--glass-border); }
.app-sidebar-foot a{ display:flex; align-items:center; gap:8px; font-size:13px; color: var(--text-mute); padding:8px 12px; }
.app-sidebar-foot a:hover{ color: var(--bad); }

.app-main{ flex:1; min-width:0; }
.app-topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 32px; border-bottom:1px solid var(--glass-border);
}
.app-topbar h1{ font-size:22px; }
.app-topbar-right{ display:flex; align-items:center; gap:12px; }
.credit-pill{
  display:flex; align-items:center; gap:6px; background: var(--glow-soft); color: var(--glow);
  font-size:13px; font-weight:700; padding:8px 14px; border-radius:999px;
}
/* 剩餘次數為 0：pill 轉警示色，配合查詢頁的儲值提示條 */
.credit-pill.credit-empty{ background: rgba(252,165,165,0.14); color: var(--bad); }
.avatar-badge{
  width:32px; height:32px; border-radius:50%; background: var(--glass-strong); border:1px solid var(--glass-border);
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color: var(--text);
  text-decoration:none; cursor:pointer;
}
.avatar-badge:hover{ border-color: var(--glow); color: var(--text); }
.app-body{ padding:28px 32px 60px; }
.app-banner{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  background: rgba(253,224,71,0.08); border:1px solid rgba(253,224,71,0.3); border-radius:14px;
  padding:16px 20px; margin-bottom:22px; font-size:13px; color: rgba(245,247,250,0.85);
}
.app-card{
  background: var(--glass); border:1px solid var(--glass-border); border-radius:16px;
  padding:24px; margin-bottom:20px;
}
.app-card h2{ font-size:16px; margin-bottom:16px; }
.app-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--glass-border); margin-bottom:22px; }
.app-tabs button{
  background:none; border:none; cursor:pointer; padding:10px 4px; margin-right:24px;
  font-size:14px; font-weight:600; color: var(--text-mute); border-bottom:2px solid transparent;
  font-family:inherit;
}
.app-tabs button.active{ color: var(--glow); border-bottom-color: var(--glow); }
[data-panel]{ display:none; }
[data-panel].active{ display:block; }
/* 表格橫向滾動外殼：窄螢幕時表格維持可讀寬度，超出就讓外殼左右滑，
   不要再把整頁撐寬（會員端各頁的訂單／紀錄表都包這層） */
.table-responsive{ width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table-responsive > .app-table{ min-width:640px; }
.app-table{ width:100%; border-collapse:collapse; font-size:13px; }
.app-table th{ text-align:left; padding:10px 12px; color: var(--text-mute); font-weight:600; border-bottom:1px solid var(--glass-border); }
.app-table td{ padding:12px; border-bottom:1px solid var(--glass-border); color: var(--text-body); }
.app-table tr:last-child td{ border-bottom:none; }
.risk-pill{ display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.risk-low{ background: rgba(134,239,172,0.14); color: var(--good); }
.risk-medium{ background: rgba(253,224,71,0.14); color: var(--warn); }
.risk-high{ background: rgba(252,165,165,0.14); color: var(--bad); }
.risk-severe{ background: var(--bad); color:#4A1313; }
/* 窄螢幕：側邊欄改成頁首橫向導覽（≤760px 再收成純圖示，見下方規則），
   原本直接 display:none 會讓手機用戶完全沒有選單可切換頁面 */
@media (max-width: 900px){
  .app-shell{ flex-direction:column; }
  .app-sidebar{
    width:100%; height:auto; position:sticky; top:0; z-index:40;
    flex-direction:row; align-items:center; gap:6px; padding:8px 12px;
    border-right:none; border-bottom:1px solid var(--glass-border);
    overflow-x:auto; -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  /* 萬一翻譯特別長仍溢出，也不要在導覽條下露出一根灰色滾動條 */
  .app-sidebar::-webkit-scrollbar{ height:0; display:none; }
  .app-sidebar .brand-lockup{ flex:none; padding:0 10px 0 2px; }
  .app-nav{ flex-direction:row; gap:2px; flex:none; }
  .app-nav a{ padding:8px 10px; font-size:13px; white-space:nowrap; }
  .app-sidebar-foot{ margin-top:0; margin-left:auto; padding-top:0; border-top:none; flex:none; }
  .app-sidebar-foot a{ padding:8px 10px; white-space:nowrap; }
  .app-topbar, .app-body{ padding-left:20px; padding-right:20px; }
}

/* Topbar dropdowns: 說明選單 / 大頭貼選單 */
.dropdown{ position:relative; }
.dropdown-panel{
  position:absolute; top:calc(100% + 10px); right:0; min-width:210px;
  background: var(--glass-strong); backdrop-filter: blur(14px); border:1px solid var(--glass-border);
  border-radius:12px; padding:6px; box-shadow: 0 16px 36px -14px rgba(0,0,0,0.6);
  display:none; z-index:60;
}
.dropdown.open .dropdown-panel{ display:block; }
.dropdown-panel a{
  display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px;
  font-size:13px; font-weight:500; color: var(--text-body);
}
.dropdown-panel a:hover{ background: var(--glass); color: var(--text); }
.dropdown-panel a svg{ flex-shrink:0; opacity:0.8; }
.dropdown-panel a.disabled{ color: var(--text-mute); cursor:default; }
.dropdown-panel a.disabled:hover{ background:none; }
.dropdown-panel a[data-lang]{ justify-content:space-between; }
.dropdown-panel a.active-lang{ color: var(--glow); font-weight:700; }
.dropdown-panel a[data-lang] .lang-check{ opacity:0; color: var(--glow); font-weight:800; }
.dropdown-panel a.active-lang .lang-check{ opacity:1; }
.dropdown-panel a.disabled .soon-tag{
  font-size:10px; font-weight:700; color: var(--text-mute); background: var(--glass); padding:1px 7px; border-radius:999px;
}
.help-btn{
  width:32px; height:32px; border-radius:50%; background: var(--glass-strong); border:1px solid var(--glass-border);
  display:flex; align-items:center; justify-content:center; color: var(--text-body); cursor:pointer;
}
.help-btn:hover{ color: var(--text); border-color: var(--glow); }
.lang-toggle{
  width:32px; height:32px; border-radius:50%; background: var(--glass-strong); border:1px solid var(--glass-border);
  display:flex; align-items:center; justify-content:center; color: var(--text-body); cursor:pointer;
  font-size:11px; font-weight:700; font-family:inherit;
}
.lang-toggle:hover{ color: var(--text); border-color: var(--glow); }

/* Toggle switch（示範用，無實際狀態儲存） */
.toggle{
  width:40px; height:22px; border-radius:999px; background: var(--glass-strong);
  border:1px solid var(--glass-border); position:relative; cursor:pointer; flex-shrink:0;
}
.toggle::after{
  content:""; width:16px; height:16px; border-radius:50%; background: var(--text-mute);
  position:absolute; top:2px; left:2px; transition: left .15s ease, background .15s ease;
}
.toggle.on{ background: var(--glow-soft); border-color: var(--glow); }
.toggle.on::after{ background: var(--glow); left:20px; }

/* Settings row（帳戶設定頁常用列） */
.setting-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px 0; border-bottom:1px solid var(--glass-border);
}
.setting-row:last-child{ border-bottom:none; }
.setting-row .setting-label{ font-size:14px; font-weight:600; color: var(--text); margin-bottom:4px; }
.setting-row .setting-desc{ font-size:12px; color: var(--text-mute); max-width:420px; }
.status-badge{ display:inline-block; font-size:11px; font-weight:700; padding:3px 10px; border-radius:999px; }
.status-badge.off{ background: var(--glass); color: var(--text-mute); }
.status-badge.on{ background: rgba(134,239,172,0.14); color: var(--good); }


	  /* 处理中状态 */
	.btn-processing,
	.btn-processing:hover,
	.btn-processing:focus,
	.btn-processing:active {
	    background-color: #bfbfbf !important;
	    border-color: #bfbfbf !important;
	    color: #ffffff !important;
	    cursor: default !important;
	    pointer-events: none;
	    opacity: 0.8;
	}
	
	
	
	
/* 分页容器 */
#pagination.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0 8px;
    padding: 12px 0;
    flex-wrap: wrap;
}

/* 页码按钮 */
#pagination .page-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 38px;
    height: 36px;
    padding: 0 12px;

    border: 1px solid rgba(137, 179, 204, 0.22);
    border-radius: 8px;

    color: #aebdcc;
    background: rgba(32, 57, 78, 0.72);

    font-size: 14px;
    line-height: 1;
    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

/* 鼠标悬停 */
#pagination .page-btn:hover {
    color: #ffffff;
    background: rgba(30, 102, 130, 0.75);
    border-color: #24c7e5;
    box-shadow: 0 0 12px rgba(36, 199, 229, 0.25);
    transform: translateY(-1px);
}

/* 当前页 */
#pagination .page-btn.active {
    color: #062132;
    background: #24c7e5;
    border-color: #24c7e5;
    box-shadow: 0 0 14px rgba(36, 199, 229, 0.42);
    font-weight: 600;
}

/* 当前页悬停 */
#pagination .page-btn.active:hover {
    color: #062132;
    background: #39d5ed;
    border-color: #39d5ed;
}

/* 上一页、下一页 */
#pagination .page-btn.prev,
#pagination .page-btn.next {
    padding: 0 16px;
    color: #d3e1eb;
}

/* 禁用状态 */
#pagination .page-btn:disabled,
#pagination .page-btn.disabled {
    color: #627789;
    background: rgba(25, 45, 63, 0.55);
    border-color: rgba(137, 179, 204, 0.12);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 省略号 */
#pagination .page-ellipsis {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 4px;
    color: #7890a2;
    font-size: 14px;
}

#pagination .page-btn.active {
    background: linear-gradient(135deg, #20c7e5, #26b8d7);
    border-color: #20c7e5;
    color: #062132;
}

#pagination.pagination {
    justify-content: flex-end; /* 改为靠右对齐 */
    padding-right: 12px;
}

/* 💡 补充 2：每页显示条数下拉框的外观设计（完美融合你的微圆角和蓝暗色调） */
#pagination .page-size-label {
    color: #aebdcc;
    font-size: 14px;
    margin-left: 12px;
}

#pagination .page-size-select {
    background: rgba(32, 57, 78, 0.9); /* 融合你原本的背景色 */
    color: #ffffff;
    border: 1px solid rgba(137, 179, 204, 0.35); /* 融合你原本的边框色 */
    border-radius: 8px; /* 融合你原本的 8px 圆角 */
    padding: 0 10px;
    font-size: 14px;
    cursor: pointer;
    height: 36px; /* 高度与你的按钮保持绝对一致 */
    outline: none;
    transition: border-color 0.2s ease;
}

/* 下拉框悬停高亮 */
#pagination .page-size-select:hover {
    border-color: #24c7e5;
}

/* 你的分页大外框容器 */
#pagination.pagination {
    display: flex;
    justify-content: space-between; /* 💡 关键：让文字在最左，按钮在最右 */
    align-items: center;
    margin: 24px 0 8px;
    padding: 12px;
}

/* 左侧文字样式说明 */
#pagination .page-info-text {
    color: #627789; /* 完美契合你暗黑风的灰蓝色 */
    font-size: 14px;
}

/* 右侧按钮组合包装容器 */
#pagination .page-buttons-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

	
/* ==========================================
   🧱 1. 全局分页大容器（PC端标准两端对齐）
   ========================================== */
.pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important; /* 🔥 PC端强制不换行 */
    gap: 15px;
    padding: 20px 10px;
    width: 100%;
    box-sizing: border-box;
}

/* 左侧“显示第 1–10 笔”文字 */
.page-info-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap; /* 防止文字换行 */
}

/* 🔥 右侧总控制器外壳：PC端铁律强制在一行横向排开 */
.page-controls-main {
    display: flex !important;
    flex-direction: row !important; /* 🔥 核心修正：PC端必须横向一行 */
    align-items: center !important;
    flex-wrap: nowrap !important; /* 🔥 核心修正：PC端绝对不准折行 */
    gap: 16px;
}

/* 数字按钮包裹小层 */
.page-buttons-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
}

/* 每页显示选单外壳 */
.page-size-wrapper {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important; /* 锁死文字 */
    gap: 8px;
}

/* “每页显示”文字 */
.page-size-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

/* 下拉选单暗黑风 */
.page-size-select {
    background: #1e1e24;
    color: #fff;
    border: 1px solid #333;
    padding: 4px 8px;
    border-radius: 4px;
    outline: none;
    font-size: 13px;
    cursor: pointer;
}

/* ==========================================
   📱 2. 移动端（手机版）全自动垂直立式排版
   ========================================== */
@media screen and (max-width: 768px) {
    /* 手机版大容器变为垂直上下排队 */
    .pagination {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    /* 手机版右侧主壳变为垂直排队（第一层按键，第二层下拉选单） */
    .page-controls-main {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* 手机版左侧提示文字置中 */
    .page-info-text {
        text-align: center !important;
        width: 100% !important;
    }

    /* 手机版按钮、下拉选单全部完美置中 */
    .page-buttons-wrapper {
        justify-content: center !important;
        width: 100% !important;
    }
    .page-size-wrapper {
        justify-content: center !important;
        width: 100% !important;
    }
}	

/* ============================================================
   共用元件：由各頁面的內聯 style 收斂而來
   ============================================================ */
/* 品牌字標尺寸：頁首 26px、會員端側欄 22px */
.brand-logo{ height:26px; width:auto; }
.brand-logo-sm{ height:22px; width:auto; }
/* 頁首品牌區垂直置中（原本各頁寫 inline align-items:center） */
.nav-brand{ display:flex; align-items:center; gap:8px; }

/* 表單錯誤／提示文字（原本是 inline style，JS 只用 style.display 切換顯隱） */
.form-error-text{ color:#ff4d4f; font-size:14px; margin:5px 0; display:none; }
/* 服務端渲染的錯誤提示（如 Google 授權取消）用這個類別展開，避免內聯 style */
.form-error-text.is-visible{ display:block; }

/* 地址輸入框：含特殊字元時標紅（對應 appcheck 頁的 .check-input-row，focus 態也保持紅色） */
.check-input-row input.is-invalid,
.check-input-row input.is-invalid:focus{ border-color:#ff4d4f; box-shadow:0 0 0 3px rgba(255,77,79,0.16); }
.form-hint{ font-size:13px; }

/* 按鈕尺寸補充：表格／卡片內的次要操作、滿寬主按鈕 */
.btn-sm{ padding:8px 18px; font-size:13px; }
.btn-block{ width:100%; }

/* ============================================================
   全站響應式基礎層（平板 / 手機）
   - 只處理骨架間距與堆疊，桌面（>900px）視覺完全維持不變
   - 各頁自己的 .pkg-grid / .tier-compare 等到各自頁面內用 @media 收
   ============================================================ */
@media (max-width: 768px){
  section{ padding:56px 0; }
  .container{ padding:0 16px; }
  h2{ font-size:26px; }

  /* 會員端骨架 */
  .app-body{ padding:16px 14px 48px; }
  .app-topbar{ flex-wrap:wrap; row-gap:10px; padding:14px; }
  .app-topbar h1{ font-size:18px; }
  .app-topbar-right{ gap:8px; flex-wrap:wrap; }
  .credit-pill{ font-size:12px; padding:6px 10px; }
  .app-banner{ flex-direction:column; align-items:flex-start; }
  .app-card{ padding:16px; border-radius:14px; margin-bottom:14px; }
  .app-tabs{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .app-tabs button{ margin-right:16px; white-space:nowrap; }
  .setting-row{ flex-wrap:wrap; }

  /* 表格：內容維持可讀寬度，靠外殼橫向滑 */
  .app-table th, .app-table td{ padding:9px 10px; font-size:12.5px; }

  /* 法務頁（terms / privacy / refundpolicy） */
  .doc-wrap{ padding:36px 16px 64px !important; }

  /* 登入 / 註冊 / 驗證類頁面 */
  .auth-wrap{ padding:24px 16px !important; }
  .auth-card{ padding:24px !important; border-radius:16px; }

  /* 網站頁首 */
  .nav-shell{ padding:8px 10px 8px 16px; }
  .nav-shell .nav-cta .btn{ padding:8px 14px; font-size:12px; }

  /* 手機端固定背景在 iOS 上會錯位且拖慢滾動 */
  body{ background-attachment: scroll; }

  /* iOS Safari：輸入框字級 <16px 時一聚焦就自動放大整個頁面，
     這裡統一拉到 16px（桌面端不受影響），避免填表單時畫面亂跳。
     用低權重的類型選擇器，頁面自己用 class 寫的 !important 字級（例如 2FA 驗證碼 .code-input）仍會勝出 */
  input, select, textarea{ font-size:16px !important; }

  /* 頁尾法務連結在泰文／越南文下較長，允許折行避免橫向溢出 */
  .footer-links{ flex-wrap:wrap; row-gap:8px; }
}

/* 會員端頁首導覽：手機寬度下文字標籤塞不下（泰文／越南文更長），
   收成純圖示按鈕，靠 title 屬性提供說明，就不再需要左右拖動 */
@media (max-width: 760px){
  .app-sidebar{ padding:6px 10px; }
  .app-sidebar .brand-lockup{ flex:none; padding:0 8px 0 2px; }
  .app-sidebar .product-tag{ display:none; }
  .app-nav a{ padding:9px 10px; gap:0; }
  .app-nav a > span{ display:none; }
  /* 登出跟選單分區，視覺上不要擠成一排圖示 */
  .app-sidebar-foot{ padding-left:6px; border-left:1px solid var(--glass-border); }
  .app-sidebar-foot a{ padding:9px 10px; gap:0; }
  .app-sidebar-foot a > span{ display:none; }
}

/* 會員端頂欄：手機上固定成「一行」——標題可省略號、右側控制項不換行，
   不再出現標題一行＋控制項又一行的兩行堆疊 */
@media (max-width: 560px){
  .app-topbar{ padding:12px; gap:8px; flex-wrap:nowrap; }
  .app-topbar h1{
    flex:1 1 auto; min-width:0; font-size:15px; line-height:1.3;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .app-topbar-right{ flex:0 0 auto; flex-wrap:nowrap; gap:6px; }
  .credit-pill{ font-size:11px; padding:5px 9px; gap:4px; white-space:nowrap; font-variant-numeric: tabular-nums; }
  .credit-pill .cp-label-remain{ display:none; }
  .app-topbar .btn{ padding:6px 10px; font-size:11.5px; white-space:nowrap; }
  .help-btn, .lang-toggle, .avatar-badge{ width:30px; height:30px; flex:none; }
  .avatar-badge{ font-size:11px; }
}

@media (max-width: 480px){
  .app-body{ padding:14px 12px 40px; }
  .app-card{ padding:14px; }
  .app-card h2{ font-size:15px; }
  .footer-cols{ gap:32px; }

  /* 頁碼按鈕較多時允許折行，避免撐破卡片 */
  .page-buttons-wrapper{ flex-wrap:wrap; row-gap:6px; }

  /* 極窄螢幕：頁首膠囊導覽允許折行，避免 Logo＋語言＋兩顆按鈕橫向爆開 */
  header{ padding:0 12px; }
  .nav-shell{ flex-wrap:wrap; row-gap:8px; padding:8px 12px; border-radius:22px; }
  .nav-shell .nav-cta{ flex-wrap:wrap; gap:8px; }
}

/* ===== 頁內提示 toast：取代 alert，手機端不彈系統對話框 ===== */
.ok-toast-host{
  position: fixed; left: 0; right: 0; bottom: 20px; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 16px; pointer-events: none;
}
.ok-toast{
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; max-width: 480px; box-sizing: border-box;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(10,18,28,0.96); color: #fff;
  font-size: 13.5px; line-height: 20px; text-align: left;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.65);
  animation: okToastIn .18s ease-out;
}
.ok-toast.is-error{ border-color: rgba(248,113,113,0.6); }
.ok-toast.is-success{ border-color: rgba(52,211,153,0.6); }
.ok-toast.is-info{ border-color: rgba(34,211,238,0.6); }
.ok-toast.is-hiding{ opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
.ok-toast-msg{ flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.ok-toast-close{
  flex-shrink: 0; border: 0; background: transparent; color: rgba(255,255,255,0.62);
  font-size: 18px; line-height: 16px; padding: 0 2px; cursor: pointer; font-family: inherit;
}
.ok-toast-close:hover{ color: #fff; }
@keyframes okToastIn{ from{ opacity: 0; transform: translateY(10px); } to{ opacity: 1; transform: none; } }
@media (max-width: 480px){
  .ok-toast-host{ bottom: 12px; padding: 0 12px; }
  .ok-toast{ font-size: 13px; padding: 11px 12px; }
}

	
