/* ============================================================
   eat-g 共用設計系統 (site.css)
   供 privacy.html / terms.html / support.html / partner.html 使用
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  /* 品牌色系 */
  --primary: #c94f22;
  --primary-dark: #9a3714;
  --primary-2: #e2703a;
  --gold: #d1a63f;
  /* 中性色 */
  --ink: #2a231c;
  --muted: #6f6559;
  --line: #e7ded0;
  /* 背景/卡片 */
  --bg: #f4efe4;
  --card: #fefaf3;
  --soft: #fbe8d8;
  /* 狀態色 */
  --ok: #3f7a52;
  --warn: #b0431f;
  /* 陰影 */
  --shadow: 0 3px 16px rgba(60,45,20,.08);
  --shadow-lg: 0 18px 44px rgba(45,30,10,.20);
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #ef8b56;
    --primary-dark: #ffb182;
    --primary-2: #ff9f5a;
    --gold: #ddbd6c;
    --ink: #efe6da;
    --muted: #a89d90;
    --line: #3b3229;
    --bg: #17120e;
    --card: #211b15;
    --soft: #2f241a;
    --ok: #7cc48f;
    --warn: #f08a63;
    --shadow: 0 3px 18px rgba(0,0,0,.45);
    --shadow-lg: 0 18px 44px rgba(0,0,0,.6);
  }
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "PingFang TC","Noto Sans TC","Microsoft JhengHei","Heiti TC",sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.85;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word; min-height: 100vh;
}

/* ===== 品牌 favicon (SVG data URI) ===== */
:root { --favicon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%23c94f22'/%3E%3Cpath d='M8 15h16a8 8 0 0 1-16 0z' fill='none' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M6.5 15h19' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13 11c0-1.4 1-1.7 1-3M17 11c0-1.4 1-1.7 1-3' stroke='%23ffd9a8' stroke-width='1.6' stroke-linecap='round'/%3C/svg%3E"); }

/* ===== 共用排版工具 ===== */
.max-w { max-width: 760px; margin: 0 auto; }
.px { padding-left: clamp(16px,5vw,40px); padding-right: clamp(16px,5vw,40px); }
.py-main { padding-top: clamp(24px,6vw,48px); padding-bottom: 56px; }
.px-sm { padding-left: clamp(12px,4vw,24px); padding-right: clamp(12px,4vw,24px); }

/* ===== 頂欄 Header ===== */
.site-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px clamp(16px,5vw,40px);
  background: var(--card); border-bottom: 2px solid var(--primary);
}
.site-brand { font-weight: 900; font-size: 17px; color: var(--primary-dark); letter-spacing: .02em; text-decoration: none; }
.site-brand span { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.site-nav { display: flex; gap: 8px; }
.site-nav a {
  font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap;
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; transition: .15s;
}
.site-nav a:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 主內容區 ===== */
main { max-width: 760px; margin: 0 auto; padding: clamp(24px,6vw,48px) clamp(16px,5vw,40px) 56px; }

h1 {
  font-size: clamp(25px,5.4vw,36px); font-weight: 900; line-height: 1.3; color: var(--primary-dark);
}
.meta { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.meta b { color: var(--ink); font-weight: 800; }

/* 摘要區塊 */
.tldr {
  margin: 26px 0 8px; padding: 18px 20px; background: var(--card);
  border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: 14px; box-shadow: var(--shadow);
}
.tldr h2 { font-size: 15px; font-weight: 900; margin-bottom: 10px; color: var(--primary-dark); }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { font-size: 14.5px; margin: 6px 0; }

/* 區塊標題 */
h2.sec {
  font-size: 19px; font-weight: 900; margin: 38px 0 12px; line-height: 1.45;
  display: flex; align-items: flex-start; gap: 10px;
}
h2.sec::before {
  content: ""; width: 5px; height: 1.15em; margin-top: .18em; border-radius: 3px; flex: 0 0 auto;
  background: linear-gradient(var(--primary), var(--gold));
}
h3 { font-size: 15.5px; font-weight: 800; margin: 20px 0 8px; color: var(--primary-dark); }

/* 基礎排版 */
p { margin: 10px 0; font-size: 15px; }
ul, ol { margin: 10px 0 10px 22px; font-size: 15px; }
li { margin: 5px 0; }
strong { font-weight: 800; color: var(--primary-dark); }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code {
  font-family: ui-monospace,"SFMono-Regular","Menlo","Consolas",monospace;
  font-size: .9em; background: var(--soft); padding: 1px 6px; border-radius: 5px;
}

/* 表格 */
.tw { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 14.5px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-weight: 800; color: var(--primary-dark); white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* 提示框 */
.callout {
  margin: 16px 0; padding: 14px 18px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; font-size: 14.5px;
}

/* 聯絡區塊 */
.contact { margin-top: 14px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.contact p { margin: 6px 0; font-size: 15px; }

/* 頁腳 */
.site-foot {
  border-top: 1px solid var(--line); margin-top: 46px;
  padding: 22px clamp(16px,5vw,40px) 34px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.site-foot a { color: var(--muted); margin: 0 8px; text-decoration: none; }
.site-foot a:hover { color: var(--primary); text-decoration: underline; }

/* ===== 額外組件 (support/partner 專用但共用化) ===== */

/* 流程卡 */
.flow {
  margin: 18px 0; padding: 16px 20px; background: var(--card);
  border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: 14px; box-shadow: var(--shadow); font-size: 15px;
}
.flow b { color: var(--primary-dark); }

/* 步驟清單 */
.steps { list-style: none; margin: 16px 0 0; counter-reset: s; }
.steps > li {
  counter-increment: s; position: relative; padding: 0 0 16px 44px; margin: 0;
  border-left: 2px solid var(--line); margin-left: 14px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s); position: absolute; left: -15px; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.steps .t { font-weight: 800; font-size: 15.5px; display: block; margin-bottom: 2px; }
.steps .d { font-size: 14.5px; color: var(--muted); }
.steps .d code { color: var(--ink); }

/* FAQ details */
details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin: 10px 0; box-shadow: var(--shadow); overflow: hidden;
}
details[open] { border-color: var(--primary); }
summary {
  cursor: pointer; list-style: none; padding: 14px 46px 14px 18px; position: relative;
  font-weight: 800; font-size: 15.5px; line-height: 1.6;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 18px; top: 22px;
  width: 9px; height: 9px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(45deg); transition: transform .18s;
}
details[open] summary::after { transform: rotate(-135deg); top: 25px; }
details .body { padding: 0 18px 16px; border-top: 1px solid var(--line); }
details .body > *:first-child { margin-top: 12px; }

/* 提示條 */
.note {
  margin: 14px 0; padding: 13px 17px; border-radius: 11px; font-size: 14.5px;
  background: var(--soft); border: 1px solid var(--line);
}
.note.warn { border-color: var(--warn); }
.note.warn b { color: var(--warn); }

/* 勾選清單 */
.check { list-style: none; margin: 14px 0 0; padding: 0; }
.check li {
  padding: 11px 16px 11px 42px; position: relative; margin: 8px 0; font-size: 15px;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
}
.check li::before {
  content: ""; position: absolute; left: 16px; top: 18px;
  width: 13px; height: 7px; border-left: 2.4px solid var(--ok); border-bottom: 2.4px solid var(--ok);
  transform: rotate(-45deg);
}

/* 功能卡片網格 (partner) */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.feat b { display: block; margin-bottom: 4px; }
.feat span { font-size: 13.5px; color: var(--muted); }

/* 表單 */
.form-grid { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
label { font-size: 13.5px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 4px; }
input, textarea { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
.btn {
  font: inherit; font-weight: 900; font-size: 16px; color: #fff;
  background: var(--primary); border: 0; border-radius: 999px; padding: 13px; cursor: pointer; transition: .15s;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn:hover:not(:disabled) { filter: brightness(1.05); }
.msg { border-radius: 10px; padding: 12px 14px; font-size: 14.5px; display: none; }
.msg.ok { display: block; background: rgba(63,122,82,.12); color: var(--ok); }
.msg.err { display: block; background: rgba(176,67,31,.12); color: var(--warn); }

/* 英文副標 */
.en { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ===== Hidden 修正：防止 author 樣式贏過 UA [hidden] ===== */
.geo-banner[hidden], .hero #hero-logo[hidden] { display: none !important; }