/* ============================================================
   pincheng 平誠 — 選手前台設計系統
   黑白為主，螢光黃綠 #DCE600 點睛；圓點為品牌母題。
   ============================================================ */
:root {
  --ink: #000000;          /* 主結構色（標題、導覽列、主按鈕、邊框）*/
  --ink-soft: #1a1a1a;
  --bg: #ffffff;           /* 底 */
  --surface: #f5f5f5;      /* 淺灰區塊 */
  --line: #e7e7e7;         /* 分隔線 */
  --accent: #dce600;       /* 螢光黃綠（品牌靈魂色，點綴用）*/
  --accent-ink: #000000;   /* 黃綠底上的文字 */
  --muted: #6b7280;        /* 次要文字 */
  --good: #dce600;         /* 正向狀態以品牌色呈現 */
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.10);
  --font: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: .01em;
}
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -.02em; }
img { max-width: 100%; }

/* ---------- 頂列 / 品牌 ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px solid var(--accent);   /* 黃綠點睛線 */
  position: sticky; top: 0; z-index: 50;
}
.topbar h1 { margin: 0; font-size: 1.15rem; }
.brand { display: inline-flex; align-items: center; gap: .1rem; }
.brand:hover { text-decoration: none; }
.brand-name {
  font-weight: 900; font-size: 1.55rem; letter-spacing: -.045em;
  color: #fff; position: relative; line-height: 1; padding-right: .15em;
}
/* 品牌記憶點：螢光黃綠圓點當「i」的點 */
.brand-name::after {
  content: ""; position: absolute; width: .24em; height: .24em; border-radius: 50%;
  background: var(--accent); top: -.02em; left: .64em;
}

/* 導覽列 */
.nav { display: flex; align-items: center; position: relative; }
.nav-menu { display: flex; align-items: center; gap: 1.05rem; font-size: .9rem; }
.nav a { color: rgba(255,255,255,.78); position: relative; padding: .2rem 0; white-space: nowrap; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.active { color: #fff; font-weight: 700; }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.35rem; height: 3px;
  background: var(--accent); border-radius: 2px;
}
.nav-sep { width: 1px; height: 18px; background: rgba(255,255,255,.35); }
.nav .me { color: #fff; font-weight: 600; }
/* 漢堡（桌機隱藏） */
.nav-toggle { display: none; background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; width: 42px; height: 38px; border-radius: 10px; font-size: 1.2rem; line-height: 1; padding: 0; }
.nav-toggle:hover { border-color: var(--accent); box-shadow: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-menu {
    display: none; position: absolute; top: calc(100% + .6rem); right: 0; min-width: 220px;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--ink);
    border: 1px solid #222; border-radius: 12px; padding: .4rem 0; box-shadow: var(--shadow-hover); z-index: 60;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: .7rem 1.1rem; }
  .nav-menu a.active::after { display: none; }
  .nav-menu a.active { background: rgba(220,230,0,.12); }
  .nav-sep { width: auto; height: 1px; margin: .3rem 0; }
  .nav .me { padding: .5rem 1.1rem; font-size: .85rem; color: #b9b9b9; }
}

/* ---------- 版面 ---------- */
.container { max-width: 760px; margin: 1.75rem auto; padding: 0 1rem; display: grid; gap: 1.25rem; }
.layout {
  max-width: 1040px; margin: 1.75rem auto; padding: 0 1rem;
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.25rem;
}
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.card.narrow { max-width: 380px; }
.card h2 { margin-top: 0; font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
/* 區塊標題前的品牌圓點 */
.card h2::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0;
}
.card h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: .5rem; }
.card h4 { font-size: .92rem; font-weight: 800; }

/* ---------- 表單 ---------- */
form { display: grid; gap: .8rem; }
.narrow form { max-width: 320px; }
label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; color: #333; }
input, select, textarea {
  padding: .6rem .7rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--ink); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(220,230,0,.55);   /* focus 用黃綠外框 */
}

/* ---------- 按鈕 ---------- */
button, .btn {
  padding: .6rem 1.1rem; background: var(--ink); color: #fff; border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; font-weight: 700; font-size: .92rem;
  transition: transform .05s, box-shadow .15s, background .15s, color .15s;
}
button:hover, .btn:hover { box-shadow: var(--shadow-hover); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; box-shadow: none; }
/* 主行動 CTA：螢光黃綠底黑字（報名、送出）*/
.btn-accent, button.btn-accent {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-accent:hover { background: #c7d000; }
/* 次要：白底黑框 */
button.ghost, .ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
button.ghost:hover { background: var(--surface); }
button.small, .small { padding: .35rem .7rem; font-size: .82rem; }
.link-btn {
  background: transparent; color: var(--ink); border: 1.5px dashed var(--ink); font-weight: 700;
}
.link-btn:hover { background: var(--accent); border-style: solid; }

/* ---------- 徽章 / 標籤 / 圓點母題 ---------- */
.dot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--accent); }
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: var(--radius-pill);
  background: var(--surface); color: #333; border: 1px solid var(--line);
}
.badge.paid { background: var(--accent); color: #000; border-color: var(--accent); }     /* 已付款＝品牌色 */
.badge.unpaid { background: #fff; color: #000; border: 1.5px solid #000; }                 /* 待付款＝黑框 */
.badge.refunded { background: #fde2e2; color: #b71c1c; border-color: #f6caca; }
.chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: .25rem .7rem; font-size: .8rem; display: inline-flex; gap: .35rem; align-items: center;
}
.chip small { color: var(--muted); }

/* ---------- 清單 ---------- */
.hint { color: var(--muted); font-size: .85rem; }
.hidden { display: none; }
.ok { color: #6a7000; font-weight: 700; }
.error { color: var(--bad); }
ul { padding-left: 1.2rem; }
ul li::marker { color: var(--accent); }   /* 項目符號用品牌色 */
pre { background: var(--surface); padding: .75rem; border-radius: var(--radius-sm); overflow-x: auto; }

.list { display: grid; gap: .6rem; }
.list-item {
  text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .8rem .9rem; display: grid; gap: .2rem; cursor: pointer; width: 100%;
  transition: box-shadow .15s, border-color .15s, transform .05s;
}
.list-item:hover { box-shadow: var(--shadow-hover); border-color: var(--ink); }
.list-item.active { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.list-item small { color: var(--muted); }

/* 列表封面縮圖 */
.list-item.with-cover { display: flex; align-items: center; gap: .8rem; }
.list-cover {
  width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
  background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.list-cover.placeholder { border: 1px solid var(--line); }
.list-text { display: grid; gap: .1rem; min-width: 0; }
.list-text .desc { color: #9aa5b1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; }

.msg { font-size: .9rem; margin: 0; }
.msg.ok { color: #6a7000; }
.msg.error { color: var(--bad); }

/* ---------- 比賽詳情：封面 / 簡章 / 說明 / 時程 ---------- */
.detail-cover { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin-bottom: .6rem; }
.brochure-link {
  display: inline-block; margin: .25rem .4rem .5rem 0; padding: .45rem .9rem;
  background: var(--ink); color: #fff; border-radius: var(--radius-pill); font-size: .88rem; font-weight: 700;
}
.brochure-link:hover { text-decoration: none; box-shadow: var(--shadow-hover); }
.detail-desc { white-space: pre-wrap; background: var(--surface); border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .9rem; line-height: 1.65; margin-bottom: 1rem; }

.schedule { margin-bottom: 1rem; }
.schedule h3 { margin-bottom: .4rem; }
.schedule ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.schedule li { display: flex; justify-content: space-between; gap: 1rem; background: var(--surface); border-radius: var(--radius-sm); padding: .45rem .75rem; font-size: .88rem; }
.sch-label { color: var(--muted); }
.sch-val { font-weight: 700; }

/* ---------- 報名：組別 + 面板 ---------- */
.reg-divisions { display: grid; gap: .6rem; margin-bottom: 1rem; }
.reg-division {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .9rem; background: #fff;
}
.reg-division:hover { box-shadow: var(--shadow); }
.reg-division small { display: block; color: var(--muted); }
.reg-open-btn { padding: .45rem 1rem; flex-shrink: 0; background: var(--accent); color: #000; border-color: var(--accent); }
.reg-open-btn:hover { background: #c7d000; }
.reg-panel { border: 1.5px solid var(--ink); background: #fff; border-radius: var(--radius); padding: 1rem; margin-top: .5rem; box-shadow: var(--shadow); }
.reg-panel h3 { margin-top: 0; }
.entrant-list { display: grid; gap: .5rem; margin-bottom: .5rem; }
.entrant { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.entrant-other { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; }
.entrant .pid, .slot-cred .pid { width: 120px; text-transform: uppercase; }
.entrant .pin, .slot-cred .pin { width: 90px; }
.dbl-slot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem; margin-bottom: .5rem; }
.slot-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: .4rem; }
/* 「我自己參賽」明顯選中狀態（單打 self-pick / 雙打 self-toggle）*/
.self-pick, .self-toggle { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .9rem;
  padding: .4rem .8rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; transition: all .12s; }
.self-pick input, .self-toggle input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: #000; }
.self-pick:has(input:checked), .self-toggle:has(input:checked) {
  background: var(--accent); border-color: var(--accent); color: #000; box-shadow: 0 2px 8px rgba(220,230,0,.45); transform: translateY(-1px); }
/* 雙打多組（可收合）*/
.pair-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .8rem; background: #fff; overflow: hidden; }
.pair-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; background: var(--surface); }
.pair-toggle { background: transparent; border: none; font-weight: 800; font-size: .95rem; color: var(--ink); cursor: pointer; text-align: left; flex: 1; padding: 0; }
.pair-summary { font-weight: 500; color: #555; font-size: .85rem; }
.pair-remove { background: transparent; border: 1px solid #f0b4ab; color: #c0392b; border-radius: 8px; padding: .25rem .6rem; font-size: .8rem; cursor: pointer; }
.pair-remove.hidden { display: none; }
.pair-body { padding: .7rem; }
.pair-group.collapsed .pair-body { display: none; }

.slot-cred { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
/* 勾「是我自己」→ JS 加 hidden；兩個 class 權重高於 .slot-cred(display:flex)，讓 hidden 真正生效 */
.slot-cred.hidden { display: none; }
/* 同理：選了常用搭檔時隱藏手動 ID/PIN 區 */
.manual-cred.hidden { display: none; }
.verify-name { font-size: .82rem; }
.verify-name.ok { color: #6a7000; }
.verify-name.error { color: var(--bad); }
.reg-actions { display: flex; gap: .6rem; margin-top: .7rem; }
.reg-foot { margin-top: .6rem; font-size: .95rem; font-weight: 600; }
.gift-pick { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; flex-basis: 100%; margin-top: .3rem; font-size: .85rem; }
.gift-pick select { width: auto; }

/* ---------- 組別選擇（舊版相容）---------- */
.divisions { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.division { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.division:has(input:checked) { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.div-fee { color: #6a7000; font-weight: 700; }
.summary { background: var(--surface); border-radius: var(--radius-sm); padding: .75rem 1rem; display: grid; gap: .5rem; }
.summary .row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.summary .total { border-top: 1px solid var(--line); padding-top: .5rem; font-size: 1.05rem; }

/* ---------- 個人頁 ---------- */
.kv { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.id-box .player-id, .player-id { font-weight: 900; letter-spacing: .08em; font-size: 1.05rem; }
.points-balance { font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; }
.points-balance strong { color: #6a7000; }

/* 抵免券卡片 */
.credit-right { display: flex; align-items: center; gap: .5rem; }
.credit-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; margin-bottom: .5rem; cursor: pointer; background: #fff; }
.credit-card:hover { box-shadow: var(--shadow); }
.credit-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .9rem; }
.credit-detail { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--line); font-size: .82rem; color: #475569; display: grid; gap: .25rem; }
.credit-detail.hidden { display: none; }

/* 報名卡 */
.reg-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; margin-bottom: .75rem; background: #fff; }
.reg-card.dq { opacity: .6; }
.reg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.reg-divs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.reg-entries { display: grid; gap: .35rem; margin: .4rem 0; }
.reg-entry { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .88rem; }

/* 我的對戰 */
.mm-card { border: 1px solid var(--line); border-left-width: 5px; border-radius: var(--radius-sm); padding: .65rem .85rem; margin-bottom: .5rem; background: #fff; }
.mm-next { background: linear-gradient(0deg, rgba(220,230,0,.10), rgba(220,230,0,.10)); border-color: var(--ink); }
.mm-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mm-vs { font-size: .98rem; margin-top: .2rem; }
.mm-me { font-weight: 800; background: var(--accent); padding: 0 .35rem; border-radius: 4px; }
.mm-time { font-size: .82rem; color: #475569; margin-top: .3rem; }
.mm-result { font-weight: 800; }
.mm-result.win { color: #5b6100; }
.mm-result.lose { color: var(--bad); }

/* ---------- 公開賽程 / 簽表（event）---------- */
.ev-divtabs, .ev-viewtabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.div-tag { font-size: .82rem; padding: .3rem .7rem; border: 1.5px solid var(--c, #999); color: var(--c, #333); background: #fff; border-radius: var(--radius-pill); cursor: pointer; font-weight: 700; }
.div-tag.on { background: var(--c, #333); color: #fff; }
.vt { padding: .35rem .9rem; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--radius-pill); cursor: pointer; font-size: .85rem; }
.vt.active { background: var(--accent); color: #000; border-color: var(--accent); }

.pbrk-tree { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; }
.pbrk-col { display: flex; flex-direction: column; justify-content: space-around; gap: .5rem; min-width: 160px; }
.pbrk-title { font-size: .78rem; color: var(--muted); text-align: center; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.pbm { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; font-size: .82rem; }
.pbm-slot { padding: .4rem .55rem; border-bottom: 1px solid var(--line); }
.pbm-slot.win { background: var(--accent); font-weight: 800; color: #000; }
.pbm-slot .pending { color: #9aa5b1; }
/* 簽表標頭：賽制 + 72h 醒目提醒 */
.mf-line { margin: 0 0 .7rem; color: var(--ink); font-size: .95rem; }
.mf-banner { margin: 0 0 .8rem; padding: .6rem .85rem; border-radius: 10px; background: #fff7d6; border: 1px solid #f3d24a; color: #7c5e00; font-weight: 700; }
.pbm-slot .sub-tag { color: #0b7a3b; font-size: .72rem; font-weight: 700; }
.pbm-slot .wo-tag { color: #c0392b; font-size: .72rem; font-weight: 700; }
.pbm-slot.win .sub-tag, .pbm-slot.win .wo-tag { color: #000; }
.pbm-score { padding: .2rem .55rem; font-size: .76rem; color: #475569; }
.pbm-sched { padding: .2rem .55rem; border-top: 1px dashed var(--line); color: #5b6100; }
.pbm-sched .pending { color: #9aa5b1; }

.sched-list { display: grid; gap: .5rem; }
.sched-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .75rem; background: #fff; border-left: 4px solid var(--accent); }
.si-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.si-time { font-size: .82rem; color: #5b6100; margin-top: .2rem; }

.standings { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .85rem; margin: .75rem 0; }
.standings strong { display: block; margin-bottom: .35rem; }
.st-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; padding: .2rem 0; border-bottom: 1px solid var(--line); }

/* ============================================================
   深色雜誌風：首頁 hero + 比賽詳情
   ============================================================ */
:root { --dark: #0a0a0a; --dark-2: #141414; --dark-line: #262626; }

/* 引導母題：英文小標（黃綠、寬字距） */
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.sec-title { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
.sec-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* 首頁深色 hero 橫幅 */
.home-hero { background: var(--dark); color: #fff; padding: 3rem 1.25rem 2.4rem; }
.home-hero .eyebrow { margin-bottom: .6rem; display: inline-block; }
.home-title { font-size: clamp(2.4rem, 9vw, 4rem); font-weight: 900; letter-spacing: -.03em; margin: 0; line-height: .98; }
.home-tagline { color: #b9b9b9; margin: .8rem 0 0; max-width: 36ch; }
#homeView .container { margin-top: 1.5rem; }

/* 詳情頁切換 */
#detailView { display: none; background: var(--dark); color: #fff; min-height: 100vh; }
body.detail-mode #detailView { display: block; }
body.detail-mode #topbar, body.detail-mode #homeView { display: none; }

/* Hero（封面背景 + 由下往上深色遮罩，背景由 JS 設） */
.hero {
  position: relative; background: var(--dark); background-size: cover; background-position: center;
  min-height: 64vh; display: flex; flex-direction: column; justify-content: space-between;
  padding: 1rem 1.25rem 2rem;
}
.hero-nav { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
.hero-nav .brand-name { color: #fff; }
.hamburger { background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; width: 42px; height: 38px; border-radius: 10px; font-size: 1.2rem; line-height: 1; }
.hamburger:hover { border-color: var(--accent); box-shadow: none; }
.hero-menu { position: absolute; right: 0; top: 46px; background: #fff; color: #000; border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); display: grid; min-width: 180px; overflow: hidden; z-index: 5; }
.hero-menu.hidden { display: none; }   /* 預設收合：點漢堡才展開（勝過上面的 display:grid）*/
.hero-menu a { padding: .7rem 1rem; color: #000; border-bottom: 1px solid var(--line); font-weight: 600; }
.hero-menu a:last-child { border-bottom: none; }
.hero-menu a:hover { background: var(--accent); text-decoration: none; }

.hero-content { position: relative; z-index: 2; }
.hero-content .eyebrow { display: inline-block; margin-bottom: .7rem; }
.hero-title {
  font-size: clamp(2.6rem, 11vw, 5.5rem); font-weight: 900; letter-spacing: -.035em; line-height: .95;
  margin: 0; text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.hero-sub { color: var(--accent); font-weight: 700; font-size: clamp(1rem, 3.4vw, 1.3rem); margin: .7rem 0 0; }
.hero-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.pill { font-size: .8rem; font-weight: 800; padding: .35rem .8rem; border-radius: var(--radius-pill); }
.pill-accent { background: var(--accent); color: #000; }
.pill-outline { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }

/* 詳情資訊區（深色延續） */
.detail-info { max-width: 960px; margin: 0 auto; padding: 2.2rem 1.25rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } }
.info-cell { border-left: 3px solid var(--accent); padding-left: .85rem; }
.info-cell .eyebrow { margin-bottom: .35rem; display: block; }
.info-big { font-size: clamp(1.3rem, 4.5vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }

/* 統計帶：組別數 / 天後截止 / 報名費起 */
.stat-bar { display: grid; grid-template-columns: repeat(3, 1fr); background: #161616; border: 1px solid var(--dark-line); border-radius: 14px; margin-top: 1.6rem; overflow: hidden; }
.stat-cell { padding: 1.05rem .6rem; text-align: center; }
.stat-cell + .stat-cell { border-left: 1px solid #2a2a2a; }
.stat-num { font-size: clamp(1.5rem, 5.5vw, 2rem); font-weight: 900; letter-spacing: -.02em; line-height: 1; color: #fff; }
.stat-num.accent { color: var(--accent); }
.stat-label { font-size: .76rem; color: #9a9a9a; margin-top: .4rem; }

/* 參加獎提示行 */
.gift-hint { display: flex; align-items: center; gap: .9rem; margin-top: 1.1rem; padding: .9rem 1.1rem; border-radius: 12px; background: rgba(220,230,0,.10); border: 1px solid rgba(220,230,0,.45); }
.gift-hint-icon { color: var(--accent); flex-shrink: 0; display: inline-flex; }
.gift-hint-title { font-weight: 800; color: var(--accent); }
.gift-hint-sub { font-size: .85rem; color: #cfcfcf; margin-top: .15rem; }

/* SCHEDULE 直式時間軸 */
.dark-timeline { margin-top: 1.9rem; }
.dark-timeline .eyebrow { display: block; margin-bottom: .9rem; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--dark-line); }
.tl-item { position: relative; padding: .55rem .7rem .55rem 1.9rem; border-radius: 10px; transition: background .15s; }
.tl-dot { position: absolute; left: 1px; top: .85rem; width: 14px; height: 14px; border-radius: 50%; background: #3a3a3a; box-shadow: 0 0 0 3px #0a0a0a; }
.tl-body { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tl-label { color: #9a9a9a; }
.tl-date { color: #cfcfcf; font-weight: 700; }
/* 強調：報名截止 */
.tl-hot .tl-dot { background: var(--accent); box-shadow: 0 0 0 3px #0a0a0a, 0 0 0 7px rgba(220,230,0,.25); }
.tl-hot .tl-label { color: var(--accent); font-weight: 800; }
.tl-hot .tl-date { color: var(--accent); font-size: 1.2rem; }
/* hover：任一時程點 */
.tl-item:hover { background: rgba(220,230,0,.08); }
.tl-item:hover .tl-dot { background: var(--accent); box-shadow: 0 0 0 3px #0a0a0a, 0 0 0 7px rgba(220,230,0,.22); }
.tl-item:hover .tl-label, .tl-item:hover .tl-date { color: var(--accent); }

.detail-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.btn-lg { padding: .85rem 1.8rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn-outline-light { display: inline-flex; align-items: center; padding: .85rem 1.4rem; border: 1.5px solid rgba(255,255,255,.7); color: #fff; border-radius: var(--radius); font-weight: 700; font-size: 1rem; background: transparent; }
.btn-outline-light:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.detail-desc-dark { white-space: pre-wrap; color: #cfcfcf; line-height: 1.7; margin-top: 1.8rem; border-left: 3px solid var(--dark-line); padding-left: .85rem; }
.detail-desc-dark:empty { display: none; }

.reg-section { margin-top: 2rem; }
.dark-h3 { font-size: 1.3rem; font-weight: 800; margin: .3rem 0 1rem; }
/* 詳情頁的組別卡（深底 + 各組別顏色左條） */
.detail-info .reg-division { background: var(--dark-2); border: 1px solid var(--dark-line); color: #fff; }
.detail-info .reg-division small { color: #9a9a9a; }
.detail-info .reg-division strong { color: #fff; }

/* 報名面板維持白色清爽（疊在深色頁上） */
.detail-info .reg-panel { color: #1f2933; }

/* 深色頁尾 */
.detail-footer { background: #000; color: #fff; padding: 2.2rem 1.25rem; }
.detail-footer .brand-name { color: #fff; font-size: 1.5rem; }
.socials { display: flex; gap: .6rem; margin-top: .4rem; }
.soc { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.soc:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 600px) {
  .home-hero { padding: 2.2rem 1rem 1.8rem; }
  .hero { min-height: 70vh; padding: 1rem 1rem 1.6rem; }
  .detail-info { padding: 1.8rem 1rem; }
}

/* ============================================================
   設計系統補充：共用元件 / 工具類（pincheng.css 收斂）
   ============================================================ */
/* 品牌字標（圓點烤進 SVG，整體縮放不跑位） */
.brand-logo { height: 26px; display: block; }
.topbar .brand-logo, .hero-nav .brand-logo { height: 24px; }
.site-footer .brand-logo, .detail-footer .brand-logo { height: 26px; }

/* 左側黃綠細線引導母題 */
.accent-line { border-left: 3px solid var(--accent); padding-left: .85rem; }

/* 按鈕語意別名（.btn-accent 保留相容） */
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { background: #c7d000; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #1a1a1a; }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--surface); }

/* 組別色點（報名面板標題用） */
.div-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: .45rem; }

/* 常用搭檔 */
.fav-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .5rem; background: #fff; }
.fav-info { display: grid; gap: .15rem; }
.fav-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; align-items: center; }
.fav-form input { flex: 1 1 140px; }
.fav-form .msg { flex-basis: 100%; }
/* 雙打常用搭檔下拉 */
.slot-cred .fav-select { width: 100%; margin-bottom: .4rem; }

/* 攝影作品頁 */
.gallery-hero { background: var(--dark); color: #fff; padding: 2.4rem 1.25rem 2rem; text-align: center; }
.gallery-title { font-size: 1.9rem; font-weight: 900; margin: .3rem 0 .2rem; }
.gallery-sub { color: var(--accent); font-weight: 700; letter-spacing: .04em; }
.gallery-wrap { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1rem 3rem; }
/* 瀑布流：CSS columns */
.gallery-grid { columns: 3 280px; column-gap: 1rem; }
.gphoto { break-inside: avoid; margin: 0 0 1rem; position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--surface); box-shadow: var(--shadow); }
.gphoto img { display: block; width: 100%; height: auto; transition: transform .3s; }
.gphoto:hover img { transform: scale(1.04); }
.gphoto-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .8rem .7rem .6rem; color: #fff;
  background: linear-gradient(to top, rgba(10,10,10,.85), rgba(10,10,10,0)); display: grid; gap: .15rem; }
.gphoto-cap strong { font-size: .95rem; }
.gphoto-cap small { color: #d8d8d8; font-size: .8rem; }
@media (max-width: 640px) { .gallery-grid { columns: 2 150px; column-gap: .6rem; } .gphoto { margin-bottom: .6rem; } }
/* 輕量燈箱 */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,8,8,.94); display: flex; align-items: center; justify-content: center; }
.lightbox.hidden { display: none; }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.lb-cap { color: #fff; text-align: center; margin-top: .7rem; display: grid; gap: .2rem; }
.lb-cap strong { font-size: 1rem; } .lb-cap span { color: #cfcfcf; font-size: .85rem; }
.lb-close { position: absolute; top: 1rem; right: 1.1rem; background: transparent; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 2.4rem; width: 54px; height: 70px; border-radius: 10px; cursor: pointer; }
.lb-nav:hover { background: var(--accent); color: #000; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
@media (max-width: 640px) { .lb-nav { width: 40px; height: 56px; font-size: 1.8rem; } .lb-prev { left: .3rem; } .lb-next { right: .3rem; } }

/* 詳情頁攝影作品促購區（深色 hero 內）*/
.photo-promo { margin: 1.6rem 0; padding: 1.2rem; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.04); }
.photo-promo-title { color: #fff; font-size: 1.15rem; margin: .25rem 0; }
.photo-promo-sub { color: #cfcfcf; font-size: .9rem; margin: 0 0 .9rem; }
.photo-promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; margin-bottom: .9rem; }
.promo-thumb { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.promo-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.promo-thumb:hover img { transform: scale(1.08); }

/* 共用勾選排版（checkbox + 一行文字）：所有「方塊型」勾選套 .check-row + 內層 .check-text
   checkbox 固定不縮、文字 flex:1 水平換行、頂端對齊；避免裸文字被 flex 壓成直書/溢出 */
.check-row { display: flex; flex-direction: row; align-items: flex-start; gap: .45rem; cursor: pointer; }
.check-row input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; margin: .12rem 0 0; }
.check-text { flex: 1 1 auto; min-width: 0; line-height: 1.5; white-space: normal; word-break: break-word; }

/* 攝影加價購：做成吸引人的加購卡片（品牌黃綠點綴；勾選後高亮）*/
.photo-check-wrap {
  margin-top: .6rem; padding: .75rem .85rem; font-size: .92rem; font-weight: 500;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: linear-gradient(135deg, #fcfdf2, #f6fbe6);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.photo-check-wrap:hover { border-color: var(--accent); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.photo-check-wrap:has(input:checked) { border-color: var(--accent); background: #eef8c9; box-shadow: 0 0 0 3px rgba(220,230,0,.28); }
.photo-check-wrap .photo-ttl { display: block; font-weight: 800; font-size: .96rem; color: var(--ink); line-height: 1.35; }
.photo-check-wrap .photo-price { display: inline-block; background: var(--accent); color: var(--ink); border-radius: 6px; padding: .02rem .4rem; font-weight: 900; }
.photo-check-wrap .photo-desc { display: block; color: var(--muted); font-weight: 500; margin-top: .2rem; }
.dbl-photo { display: flex; align-items: center; gap: .5rem; margin: .3rem 0 .2rem; }
/* 影片審核狀態（個人中心報名卡）*/
.reg-video { margin-top: .5rem; font-size: .9rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .45rem .6rem; border-radius: 8px; }
.reg-video.await { background: #fff4e5; border: 1px solid #f3c98b; color: #9a3412; font-weight: 700; }
.reg-video.pending { background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; }
.reg-video.ok { background: #f3fbf4; border: 1px solid #bfe6c7; color: #14622b; }
.reg-video .submit-video { background: var(--accent); border: none; color: var(--ink); font-weight: 800; }
.reg-video .submit-video.ghost { background: #fff; border: 1px solid #c7d2fe; color: #3730a3; font-weight: 600; }
.reg-photo { margin-top: .5rem; font-size: .9rem; }
.reg-photo .buy-photo { background: #fff; border: 1px solid var(--accent); color: var(--ink); font-weight: 700; }

/* 付費加購商品（報名表單 + 補購 modal）*/
.addon-block { margin-top: .6rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fcfdf2; }
/* 加購商品：可收合（預設收合，點標題展開）*/
.addon-fold > summary.addon-head { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .35rem; user-select: none; }
.addon-fold > summary.addon-head::-webkit-details-marker { display: none; }
.addon-fold > summary.addon-head::before { content: '▸'; font-size: .8rem; color: #6b7280; transition: transform .15s; }
.addon-fold[open] > summary.addon-head::before { transform: rotate(90deg); }
.addon-fold.has-sel > summary.addon-head { color: var(--dark); }
.addon-sum { font-weight: 500; font-size: .82rem; color: #6b7280; }
.addon-fold.has-sel .addon-sum { color: #1f7a3d; font-weight: 700; }
.addon-list { margin-top: .4rem; }
.addon-head { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.addon-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .3rem 0; }
.addon-name { flex: 1 1 160px; font-size: .9rem; }
.addon-row select { padding: .3rem; }
.addon-buy-list { display: grid; gap: .3rem; margin-bottom: .6rem; }
.addon-buy-foot { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.addon-buy-total { font-size: 1.1rem; }

/* 影片審核：報名表單影片連結欄位 */
.video-field { margin-top: .5rem; display: grid; gap: .25rem; }
.video-field .video-url { width: 100%; }
.video-note { color: #9a3412; font-weight: 600; }
.mc-video { font-weight: 700; }

/* 狀態 pill 系統（五狀態依日期 + 已取消）— 皆設計在深色卡頭/hero 上 */
.pill-soon   { background: #fff; color: #0a0a0a; border: 1.5px solid #fff; }  /* 即將開放：白框 */
.pill-open   { background: var(--accent); color: #000; }                      /* 開放報名中：黃綠底黑字 */
.pill-closed { background: #f59e0b; color: #fff; }                            /* 報名截止：橘底白字 */
.pill-live   { background: #000; color: #fff; border: 1.5px solid #fff; }     /* 進行中：黑底白字 */
.pill-ended  { background: #6b7280; color: #e5e7eb; }                         /* 已結束：灰底灰字 */
.pill-cancel { background: #ef4444; color: #fff; }                            /* 已取消：紅底白字 */
/* 舊別名相容 */
.pill-end { background: #fde2e2; color: #b71c1c; }
.pill-neutral { background: #fff; color: #000; border: 1.5px solid #000; }

/* 統一頁尾元件 */
.site-footer { background: #000; color: #fff; padding: 2.4rem 1.25rem; }
/* 頁尾左右兩欄：左 logo+社群、右 公司名+email（site-footer 與 detail-footer 共用）*/
.site-footer, .detail-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem; }
.foot-left { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.foot-right { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right; }
.foot-company { color: #9a9a9a; font-size: .9rem; }
.foot-email { color: var(--accent); font-size: .9rem; font-weight: 700; text-decoration: none; }
.foot-email:hover { text-decoration: underline; }
.foot-privacy { color: #cfcfcf; font-size: .85rem; text-decoration: none; }
.foot-privacy:hover { color: var(--accent); text-decoration: underline; }

/* 註冊頁肖像授權勾選 */
/* 同意勾選（排版走共用 .check-row/.check-text）*/
.consent-check { width: 100%; font-size: .9rem; font-weight: 500; }

/* 肖像授權條款頁（深色品牌風、好閱讀）*/
.consent-hero { background: var(--dark); color: #fff; padding: 2.4rem 1.25rem 2rem; text-align: center; }
.consent-title { font-size: 1.7rem; font-weight: 900; margin: .3rem 0 .2rem; }
.consent-sub { color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.consent-doc { max-width: 760px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.consent-sec { margin-bottom: 1.6rem; }
.consent-sec h2 { font-size: 1.1rem; border-left: 4px solid var(--accent); padding-left: .6rem; margin: 0 0 .5rem; }
.consent-sec p { line-height: 1.85; color: #333; margin: 0; }
.consent-foot-note { margin-top: 2rem; padding: .9rem 1.1rem; background: var(--surface); border-radius: var(--radius-sm); color: #555; font-size: .9rem; }
/* 手機：上下堆疊、置中 */
@media (max-width: 560px) {
  .site-footer, .detail-footer { flex-direction: column; align-items: center; text-align: center; }
  .foot-left, .foot-right { align-items: center; text-align: center; }
}

/* 立即報名 CTA：更醒目（黃綠光暈 + hover 放大） */
#ctaRegister {
  font-size: 1.15rem; font-weight: 900; padding: 1rem 2.4rem; letter-spacing: .02em;
  box-shadow: 0 6px 22px rgba(220,230,0,.40); transition: transform .12s ease, box-shadow .15s ease;
}
#ctaRegister:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 32px rgba(220,230,0,.6); }
#ctaRegister:active { transform: translateY(0) scale(1); }

/* ---------- 比賽列表：卡片牆（官網風）---------- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1.1rem; }
.event-card {
  display: block; text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; width: 100%; padding: 0;
  transition: transform .08s, box-shadow .15s, border-color .15s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--ink); }
.ec-top {
  position: relative; height: 92px; background: var(--dark); background-size: cover; background-position: center;
  color: #fff; padding: .7rem .8rem; display: flex; align-items: flex-end; overflow: hidden;
}
/* 無封面：純黑底 + pincheng 浮水印 */
.ec-top.no-cover::after {
  content: ""; position: absolute; right: .7rem; bottom: .6rem; width: 96px; height: 24px;
  background: url(/img/logo-pincheng-white.svg) right center / contain no-repeat; opacity: .18;
}
.ec-date { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; line-height: 1; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.ec-status { position: absolute; top: .6rem; right: .6rem; }
.ec-status .pill { font-size: .72rem; padding: .25rem .6rem; }
.ec-body { padding: .75rem .9rem .85rem; }
.ec-name {
  font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 .3rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ec-meta { font-size: .8rem; color: var(--muted); }
.ec-tags { margin-top: .5rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.ec-tags .tag { font-size: .76rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .15rem .55rem; color: #333; }

/* ---------- 首頁主推大卡（門面）---------- */
.feature-list { display: grid; gap: 1.1rem; }
.feature-card {
  position: relative; width: 100%; text-align: left; cursor: pointer; color: #fff; border: none;
  border-radius: 18px; overflow: hidden; min-height: 300px; padding: 1.4rem;
  background: #0a0a0a; background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .15s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.fc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.fc-name { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .4rem; text-shadow: 0 2px 16px rgba(0,0,0,.55); }
.fc-meta { color: #e5e7eb; font-size: .95rem; margin-bottom: .8rem; }
.fc-cta { display: inline-block; font-weight: 800; color: var(--accent); }

.view-all-wrap { display: flex; justify-content: center; margin-top: 1.6rem; }
.view-all-btn { padding: .7rem 1.6rem; border-radius: var(--radius-pill); }

/* ---------- 列表頁 view 切換 + 篩選列 ---------- */
#listView { display: none; }
body.list-mode #listView { display: block; }
body.list-mode #homeView { display: none; }
body.detail-mode #listView { display: none; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
@media (max-width: 600px) { .feature-card { min-height: 240px; padding: 1.1rem; } }

/* ---------- 個人中心：Level 2 混合風（深色頂部 + 白卡上浮） ---------- */
.profile-hero { background: var(--dark); color: #fff; padding: 1.7rem 1.25rem 3.2rem; }
/* 未設配對 PIN 醒目橫幅（個人中心頂部）*/
.pin-banner {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin: 0 auto 1.2rem; max-width: 380px;
  background: var(--accent); color: #1a1a00; border-radius: 12px;
  padding: .8rem 1rem; box-shadow: 0 6px 18px rgba(220,230,0,.35);
}
.pin-banner-text { flex: 1 1 200px; font-weight: 700; font-size: .92rem; line-height: 1.45; }
.pin-banner-btn {
  flex-shrink: 0; background: #0a0a0a; color: #fff; border: none; border-radius: 8px;
  padding: .5rem 1rem; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.pin-banner-btn:hover { background: #222; }
/* 已設 PIN → JS 加 hidden；兩個 class 權重高於 .pin-banner(display:flex)，讓 hidden 真正生效 */
.pin-banner.hidden { display: none; }
@media (max-width: 420px) { .pin-banner-btn { width: 100%; } }

/* 個人中心背景圖（JS 疊深色漸層遮罩 + 圖）；無圖時維持上面的品牌深色底 */
.profile-hero.has-cover { background-color: var(--dark); background-size: cover; background-position: center; background-repeat: no-repeat; }
.profile-hero-head .eyebrow { display: inline-block; margin-bottom: .45rem; }
.profile-name { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 900; letter-spacing: -.025em; line-height: 1; margin: 0; }

/* 會員卡（照片當背景 + 雙層遮罩；左 QR、右資訊；直式適合手機出示） */
.member-card {
  position: relative; max-width: 380px; margin: 1.6rem auto 0; color: #fff; overflow: hidden;
  border: 1px solid #262626; border-radius: 18px; box-shadow: 0 12px 36px rgba(0,0,0,.45);
  background: #0a0a0a center / cover no-repeat;       /* JS 疊上 漸層遮罩 + 照片 */
  display: flex; flex-direction: column; min-height: 232px;
}
.member-card > * { position: relative; z-index: 1; }   /* 內容在遮罩/浮水印之上 */
/* 沒上傳照片：純黑底 + 右下 pincheng 浮水印（不破版）*/
.member-card.no-photo::after {
  content: ""; position: absolute; right: -6px; bottom: -6px; width: 62%; height: 60%; z-index: 0;
  background: url(/img/logo-pincheng-white.svg) right bottom / contain no-repeat; opacity: .08;
}
.mc-head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.1rem; }
.mc-head .brand-logo { height: 22px; }
.mc-head-label { display: inline-flex; align-items: center; gap: .4rem; font-size: .68rem; font-weight: 800; letter-spacing: .2em; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
/* 主體：左 QR + 右資訊 */
.mc-main { display: flex; gap: 1rem; align-items: flex-start; padding: .3rem 1.1rem 1rem; }
.mc-qr-wrap { flex-shrink: 0; text-align: center; }
.mc-qr-box { width: 116px; height: 116px; background: #fff; border-radius: 10px; padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.mc-qr-box svg { display: block; width: 100%; height: 100%; }
.mc-qr-empty { font-size: .78rem; color: #555; display: flex; align-items: center; justify-content: center; height: 100%; }
.mc-qr-note { font-size: .7rem; color: #e5e5e5; margin-top: .35rem; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.mc-info { min-width: 0; flex: 1; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.mc-name { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.12; margin-bottom: .5rem; }
.mc-line { display: flex; align-items: baseline; gap: .5rem; font-size: .95rem; margin-bottom: .25rem; }
.mc-line .eyebrow { width: 2.6em; color: #dcdcdc; }
.mc-id { font-weight: 800; letter-spacing: .12em; }
.mc-utr { font-weight: 800; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.1rem .9rem; font-size: .78rem; color: #e0e0e0; border-top: 1px solid rgba(255,255,255,.14); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.mc-foot .eyebrow { color: var(--accent); }
@media (max-width: 360px) { .mc-qr-box { width: 96px; height: 96px; } .mc-name { font-size: 1.3rem; } }

/* 會員卡 UTR 連結（有填才顯示） */
.mc-utrlink { color: var(--accent); font-weight: 700; font-size: .82rem; margin-left: .5rem; text-decoration: none; }
.mc-utrlink:hover { text-decoration: underline; }

/* 修改區（進入修改模式才顯示；白底卡片區）*/
.edit-area { background: var(--surface); }
.edit-area .container { display: grid; gap: 1.25rem; margin: 1.5rem auto; }
.edit-area input:disabled, .edit-area input:read-only { background: #f0f0f0; color: #8a8a8a; }
.edit-title { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 900; letter-spacing: -.02em; margin: 0; }
.edit-sep { border: none; border-top: 1px solid var(--line); margin: 1.1rem 0; }
.edit-photo-head { font-weight: 800; margin-bottom: .5rem; }
.edit-actions-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.edit-actions-bar .msg { flex-basis: 100%; margin: 0; }

/* 修改模式：隱藏其他區，只剩修改欄位 */
body.edit-mode .profile-hero,
body.edit-mode .profile-main,
body.edit-mode .site-footer { display: none; }
body.edit-mode #editArea { display: block; }

/* 浮動提示（前台 toast） */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #0a0a0a; color: #fff; padding: .7rem 1.3rem; border-radius: var(--radius-pill); font-weight: 800;
  box-shadow: var(--shadow-hover); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 2000; border-left: 4px solid var(--accent);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 照片上傳/刪除 / 修改按鈕 */
.mc-actions { max-width: 360px; margin: 1rem auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; justify-content: center; }
.mc-upload { cursor: pointer; display: inline-flex; align-items: center; }
.mc-msg { flex-basis: 100%; text-align: center; font-size: .85rem; min-height: 1.1em; }
.mc-msg.ok { color: var(--accent); }
.mc-msg.error { color: #ff8a8a; }
/* 磚牆排版：自動平衡兩欄高度、填補空白；卡片不被拆斷 */
.profile-grid {
  max-width: 1040px; margin: -1.4rem auto 0; padding: 0 1rem; position: relative; z-index: 1;
  column-count: 2; column-gap: 1.25rem;
}
.profile-grid > .card {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  margin: 0 0 1.25rem;
}
@media (max-width: 820px) { .profile-grid { column-count: 1; } }

/* 我的賽事：分頁 + 醒目時間橫幅 */
.profile-main { margin-top: 1.5rem; }
.ev-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
/* 下一場時間橫幅：黑底、黃綠大時間、球場 pill */
.mm-when { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; background: #0a0a0a; color: #fff; border-radius: 12px; padding: .7rem 1rem; margin-top: .7rem; }
.mm-when-main { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.mm-when-date { font-weight: 800; font-size: 1.02rem; }
.mm-when-time { font-size: 1.7rem; font-weight: 900; color: var(--accent); letter-spacing: -.01em; line-height: 1; }
.mm-when-court { background: rgba(220,230,0,.15); border: 1.5px solid var(--accent); color: var(--accent); border-radius: var(--radius-pill); padding: .3rem .85rem; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.mm-when.tbd { justify-content: flex-start; color: #cfcfcf; font-weight: 700; }

/* 付款提醒 */
.pay-remind { background: #fff4e5; border: 1px solid #ffd9a8; color: #8a4b00; padding: .6rem .9rem; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: .6rem; }
.unpaid-order { border-color: #f0a500; }

/* 積點 / 抵免券：可展開小卡 */
.mini-card { padding: 0; overflow: hidden; }
.mini-head { width: 100%; display: flex; align-items: center; gap: .6rem; background: #fff; color: var(--ink); border: none; padding: 1rem 1.25rem; cursor: pointer; font-size: 1rem; font-weight: 700; }
.mini-head:hover { background: var(--surface); box-shadow: none; }
.mini-title { font-weight: 800; display: inline-flex; align-items: center; gap: .5rem; }
.mini-sum { margin-left: auto; color: var(--muted); font-size: .9rem; font-weight: 600; }
.mini-sum strong { color: #6a7000; }
.mini-caret { color: var(--muted); transition: transform .15s; }
.mini-head.open .mini-caret { transform: rotate(180deg); }
.mini-body { padding: 0 1.25rem 1.25rem; }
.mini-body.hidden { display: none; }

/* ---------- 登入 / 註冊：深色雜誌風 ---------- */
.auth-page { background: var(--dark); color: #fff; min-height: 100vh; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 2.6rem 1rem 3.5rem; }
.auth-head { margin-bottom: 1.3rem; }
.auth-head .eyebrow { display: inline-block; margin-bottom: .5rem; }
.auth-title { font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; margin: 0; }
.auth-sub { color: #b9b9b9; margin: .7rem 0 0; }
.auth-card { background: #fff; color: #1f2933; }
.auth-card form { max-width: none; }
.auth-alt { color: #b9b9b9; text-align: center; margin-top: 1.1rem; }
.auth-alt a { color: var(--accent); font-weight: 700; }
/* 金流：立即付款按鈕 / ATM 帳號 / 結果頁狀態 */
.pay-actions { margin-top: .6rem; }
.pay-btn { background: var(--accent); color: #000; font-weight: 800; border: none; }
.pay-btn:hover { filter: brightness(.95); }
.atm-box { margin-top: .6rem; padding: .7rem .85rem; border: 1.5px solid var(--accent); border-radius: 10px;
  background: #fbffe0; font-size: .9rem; font-weight: 500; line-height: 1.7; }
.atm-box .atm-acct { font-size: 1.05rem; letter-spacing: .04em; color: var(--ink); }
.pay-state { text-align: center; padding: 1rem .5rem; }
.pay-state .pay-icon { font-size: 2.6rem; line-height: 1; }
.pay-state h2 { margin: .5rem 0 .3rem; }
.pay-state.ok h2 { color: #1f7a3d; }
.pay-state.fail h2 { color: var(--bad, #c0392b); }
.pay-state.atm h2, .pay-state.pending h2 { color: var(--ink); }
.pay-state .atm-box { text-align: left; }
.pay-state .btn-primary { margin-top: .8rem; }

/* 語言切換器（中｜EN）*/
.lang-toggle { display: inline-flex; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; opacity: .85; }
.lang-toggle button { background: transparent; border: none; color: inherit; padding: .12rem .5rem; font-size: .78rem; font-weight: 800; cursor: pointer; line-height: 1.4; }
.lang-toggle button.on { background: var(--accent); color: #000; }
.auth-langbar { position: absolute; top: 1rem; right: 1rem; color: #fff; }

.auth-forgot { text-align: right; margin: .5rem 0 0; font-size: .85rem; }
.auth-forgot a { color: var(--muted, #888); font-weight: 600; }
.auth-forgot a:hover { color: var(--accent); }
#forgotForm { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line, #2a2a2a); }

/* ---------- 其他 ---------- */
#devVerify { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

/* ---------- RWD（手機優先收尾） ---------- */
@media (max-width: 600px) {
  .topbar { padding: .7rem 1rem; }
  .brand-name { font-size: 1.35rem; }
  .topbar .brand-logo, .hero-nav .brand-logo { height: 22px; }
  .card { padding: 1.15rem; }
  .container, .layout { margin: 1rem auto; }
  .nav { gap: .8rem; font-size: .88rem; }

  /* 詳情頁 CTA：手機釘在底部（sticky），立即報名滿版、簡章/賽程並排 */
  .detail-cta {
    flex-wrap: wrap; gap: .6rem; position: sticky; bottom: 0; z-index: 20;
    margin: 1.8rem -1rem 0; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(10,10,10,.92); backdrop-filter: blur(8px); border-top: 1px solid #1d1d1d;
  }
  .detail-cta .btn-lg { flex: 1 1 100%; justify-content: center; }
  .detail-cta .btn-outline-light { flex: 1 1 calc(50% - .3rem); justify-content: center; }

  /* 報名輸入欄彈性化，避免溢出 */
  .entrant .pid, .slot-cred .pid { width: auto; flex: 1 1 130px; }
  .entrant .pin, .slot-cred .pin { width: auto; flex: 1 1 90px; }
  .gift-pick select { flex: 1 1 40%; }

  /* 頁尾間距 */
  .site-footer, .detail-footer { padding: 2rem 1rem; }

  /* 比賽卡片大日期略縮，資訊區更聚焦 */
  .ec-date { font-size: 1.35rem; }
}

/* ====== 即時看板 live.html（黑底 #DCE600 大螢幕 / 車站時刻表風）====== */
.live-page { margin: 0; background: #0a0a0a; color: #f5f5f5;
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; min-height: 100vh; }
.live-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1.2rem; background: #000; border-bottom: 2px solid #DCE600; }
.live-brand { font-weight: 800; letter-spacing: 1px; color: #DCE600; font-size: 0.85rem; white-space: nowrap; }
.live-title { flex: 1; margin: 0; font-size: 1.5rem; font-weight: 800; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-right { display: flex; align-items: center; gap: 0.8rem; }
.live-updated { color: #9ca3af; font-size: 0.8rem; white-space: nowrap; }
.live-main { padding: 1.2rem; }
.live-empty { text-align: center; color: #9ca3af; padding: 3rem 1rem; font-size: 1.1rem; }
.live-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.live-court { background: #141414; border: 1px solid #262626; border-radius: 14px; overflow: hidden; }
.live-court-head { background: #1c1c1c; padding: 0.6rem 1rem; font-size: 1.25rem; font-weight: 800;
  color: #DCE600; border-bottom: 1px solid #2a2a2a; }
/* 每一場 */
.lm { padding: 0.7rem 1rem; border-top: 1px solid #1f1f1f; }
.lm:first-of-type { border-top: none; }
.lm-empty { color: #6b7280; text-align: center; }
.lm-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.lm-state { font-weight: 800; font-size: 0.8rem; padding: 0.15rem 0.55rem; border-radius: 999px;
  background: #2a2a2a; color: #cbd5e1; white-space: nowrap; }
.lm-meta { display: flex; align-items: center; gap: 0.4rem; color: #9ca3af; font-size: 0.85rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-badge { color: #0a0a0a; font-weight: 800; font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 5px; }
.lm-time { color: #cbd5e1; }
.lm-players { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center;
  flex-wrap: wrap; gap: 0.5rem; line-height: 1.3; }
.lm-vs { font-style: normal; color: #6b7280; font-size: 0.95rem; font-weight: 600; }
.lm-tbd { color: #6b7280; font-weight: 600; }
.lm-win { color: #DCE600; }
.lm-win::after { content: " ▲"; font-size: 0.7em; }
.lm-score { margin-left: auto; font-size: 1rem; font-weight: 800; color: #f5f5f5;
  background: #222; padding: 0.1rem 0.5rem; border-radius: 6px; letter-spacing: 0.5px; }
/* 本場 / 進行中 高亮 */
.lm-cur { background: rgba(220,230,0,0.08); border-left: 4px solid #DCE600; }
.lm-cur .lm-state { background: #DCE600; color: #0a0a0a; }
.lm-live { background: rgba(220,38,38,0.12); border-left: 4px solid #ef4444; }
.lm-live .lm-state { background: #ef4444; color: #fff; }
.lm-completed { opacity: 0.6; }
.lm-completed .lm-state { background: #1f3a24; color: #4ade80; }
/* 沒帶 ?t 的比賽選擇清單 */
.live-picker { display: grid; gap: 0.8rem; max-width: 560px; margin: 1rem auto; }
.live-pick { display: block; padding: 1rem 1.2rem; background: #141414; border: 1px solid #2a2a2a;
  border-radius: 12px; color: #f5f5f5; text-decoration: none; font-size: 1.15rem; font-weight: 700; }
.live-pick:hover { border-color: #DCE600; color: #DCE600; }
/* 大螢幕放大、手機收斂 */
@media (min-width: 1200px) { .live-title { font-size: 1.9rem; } .lm-players { font-size: 1.45rem; } .live-court-head { font-size: 1.4rem; } }
@media (max-width: 560px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-brand { display: none; } .live-title { font-size: 1.15rem; } .lm-players { font-size: 1.1rem; }
}

/* 選手版「我的下一場」排隊位置徽章 */
.mm-pos { display: inline-block; margin-top: 0.35rem; font-size: 0.82rem; font-weight: 700;
  padding: 0.12rem 0.55rem; border-radius: 999px; background: #eef2f7; color: #475569; }
.mm-pos.now { background: #DCE600; color: #1a1a1a; }
.mm-pos.live { background: #ef4444; color: #fff; }

/* ====== 裁判端 referee（黑底 #DCE600，沿用 live 風格）====== */
.ref-page { margin: 0; min-height: 100vh; background: #0a0a0a; color: #f5f5f5;
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
.ref-langbar { position: absolute; top: 0.8rem; right: 1rem; }
/* 登入 */
.ref-box { max-width: 380px; margin: 0 auto; padding: 4.5rem 1.5rem 2rem; }
.ref-brand { color: #DCE600; font-weight: 800; letter-spacing: 1px; font-size: 0.85rem; text-align: center; }
.ref-title { text-align: center; font-size: 1.6rem; font-weight: 800; margin: 0.4rem 0 1.6rem; }
.ref-box form { display: flex; flex-direction: column; gap: 0.9rem; }
.ref-box label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; color: #cbd5e1; }
.ref-box input { padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid #2f2f2f;
  background: #161616; color: #f5f5f5; font-size: 1rem; }
.ref-box input:focus { outline: none; border-color: #DCE600; }
.ref-box button[type=submit] { margin-top: 0.4rem; padding: 0.8rem; border: none; border-radius: 10px;
  background: #DCE600; color: #0a0a0a; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.ref-box button[type=submit]:hover { filter: brightness(1.05); }
.ref-error { color: #f87171; font-size: 0.88rem; min-height: 1.1rem; text-align: center; margin: 0.3rem 0 0; }
/* 已登入佔位頁 */
.ref-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1.2rem; background: #000; border-bottom: 2px solid #DCE600; }
.ref-bar .ref-brand { font-size: 0.9rem; }
.ref-bar-right { display: flex; align-items: center; gap: 0.8rem; }
.ref-who { color: #DCE600; font-weight: 700; font-size: 0.9rem; }
.ref-logout { background: transparent; border: 1px solid #444; color: #f5f5f5;
  padding: 0.35rem 0.8rem; border-radius: 8px; cursor: pointer; font-size: 0.85rem; }
.ref-logout:hover { border-color: #DCE600; color: #DCE600; }
.ref-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.2rem; }
.ref-card { max-width: 440px; text-align: center; background: #141414; border: 1px solid #262626;
  border-radius: 16px; padding: 2.4rem 1.8rem; }
.ref-card-icon { font-size: 2.6rem; }
.ref-card h1 { font-size: 1.5rem; font-weight: 800; margin: 0.6rem 0 0.8rem; color: #DCE600; }
.ref-soon { color: #cbd5e1; line-height: 1.6; font-size: 1rem; }

/* ====== 裁判 App（手機優先：大按鈕、大字、單手操作）====== */
.ref-app-page { padding-bottom: 2rem; }
.ref-bar .ref-back { background: transparent; border: 1px solid #444; color: #f5f5f5; padding: 0.3rem 0.7rem; border-radius: 8px; font-size: 0.9rem; cursor: pointer; }
.ref-app { max-width: 640px; margin: 0 auto; padding: 1rem 0.9rem; }
.ref-loading, .ref-err { text-align: center; color: #9ca3af; padding: 2rem 1rem; }
.ref-err { color: #f87171; }
.ref-empty { text-align: center; padding: 3rem 1rem; color: #cbd5e1; }
.ref-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.ref-head h2 { margin: 0; font-size: 1.3rem; }
/* 通用按鈕 */
.ref-btn { background: #1f1f1f; color: #f5f5f5; border: 1px solid #333; border-radius: 12px; padding: 0.7rem 1rem; font-size: 1rem; font-weight: 600; cursor: pointer; }
.ref-btn.small { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
.ref-btn.big { display: block; width: 100%; padding: 1.1rem; font-size: 1.25rem; margin-top: 1rem; }
.ref-btn.primary { background: #DCE600; color: #0a0a0a; border-color: #DCE600; }
.ref-btn.ghost { background: transparent; }
.ref-btn.disabled, .ref-btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* 球場卡 */
.ref-courts { display: flex; flex-direction: column; gap: 1rem; }
.ref-court { background: #141414; border: 1px solid #262626; border-radius: 14px; overflow: hidden; }
.ref-court-head { background: #1c1c1c; padding: 0.6rem 0.9rem; font-weight: 800; color: #DCE600; }
.ref-court-head small { color: #9ca3af; font-weight: 500; margin-left: 0.4rem; }
.ref-mrow { display: block; padding: 0.8rem 0.9rem; border-top: 1px solid #1f1f1f; text-decoration: none; color: #f5f5f5; }
.ref-mrow:active { background: #1d1d1d; }
.ref-mrow-top { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: #9ca3af; margin-bottom: 0.25rem; }
.ref-mrow-players { font-size: 1.15rem; font-weight: 700; }
.ref-mrow-players i { color: #6b7280; font-style: normal; font-weight: 600; margin: 0 0.3rem; }
.ref-nomatch { padding: 0.8rem 0.9rem; color: #6b7280; border-top: 1px solid #1f1f1f; }
.ref-badge { color: #0a0a0a; font-weight: 800; font-size: 0.72rem; padding: 0.08rem 0.4rem; border-radius: 5px; }
.ref-ready-dot { color: #4ade80; }
.ref-tbd { color: #6b7280; }
.ref-st { font-size: 0.72rem; padding: 0.08rem 0.45rem; border-radius: 999px; background: #2a2a2a; color: #cbd5e1; }
.ref-st.live { background: #ef4444; color: #fff; }
.ref-st.done { background: #1f3a24; color: #4ade80; }
/* 單場 */
.ref-match-head { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.9rem; color: #cbd5e1; margin-bottom: 1rem; }
.ref-match-where { flex-basis: 100%; color: #9ca3af; font-size: 0.85rem; }
.ref-sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; }
.ref-side { background: #141414; border: 1px solid #262626; border-radius: 12px; padding: 0.7rem; min-height: 70px; }
.ref-side-label { font-size: 0.75rem; color: #9ca3af; margin-bottom: 0.4rem; }
.ref-pl { display: flex; flex-direction: column; padding: 0.25rem 0; }
.ref-pl-name { font-size: 1.1rem; font-weight: 700; }
.ref-pl-mark { font-size: 0.78rem; color: #9ca3af; }
.ref-pl.in .ref-pl-mark { color: #4ade80; }
.ref-vs { color: #6b7280; font-weight: 700; }
/* 報到區 */
.ref-checkin { margin-top: 1rem; background: #141414; border: 1px solid #262626; border-radius: 12px; padding: 0.9rem; }
.ref-checkin-head { font-weight: 700; margin-bottom: 0.7rem; }
.ref-prog { color: #DCE600; }
.ref-video { width: 100%; max-height: 50vh; border-radius: 12px; background: #000; margin-bottom: 0.6rem; object-fit: cover; }
.ref-manual { margin-top: 0.9rem; }
.ref-hint { color: #9ca3af; font-size: 0.85rem; }
.ref-manual-row { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.ref-manual-row input { flex: 1; padding: 0.7rem; border-radius: 10px; border: 1px solid #2f2f2f; background: #161616; color: #f5f5f5; font-size: 1rem; text-transform: uppercase; }
/* 計分 */
.ref-score { margin-top: 1rem; }
.ref-score-q { font-weight: 700; margin-bottom: 0.5rem; }
.ref-winner-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.ref-winbtn { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem; border-radius: 12px; border: 2px solid #333; background: #161616; color: #f5f5f5; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.ref-winbtn small { font-weight: 500; color: #9ca3af; font-size: 0.85rem; }
.ref-winbtn.on { border-color: #DCE600; background: rgba(220,230,0,0.12); }
.ref-winbtn.on small { color: #DCE600; }
.ref-score-input { width: 100%; margin-top: 0.8rem; padding: 0.8rem; border-radius: 10px; border: 1px solid #2f2f2f; background: #161616; color: #f5f5f5; font-size: 1.15rem; text-align: center; }
.ref-done-box { margin-top: 1rem; text-align: center; background: #141414; border: 1px solid #1f3a24; border-radius: 12px; padding: 1.2rem; font-size: 1.1rem; line-height: 1.7; }
/* 訊息橫幅 */
.ref-banner { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 10px; font-weight: 600; }
.ref-banner.ok { background: #14321f; color: #4ade80; }
.ref-banner.warn { background: #3a2f12; color: #fbbf24; }
.ref-banner.err { background: #3a1414; color: #f87171; }
/* 確認 modal */
.ref-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; padding: 1.2rem; z-index: 50; }
.ref-modal.hidden { display: none; }  /* 2-class 選擇器，確保 .hidden 勝過上面的 display:flex（修：modal 關不掉/空白） */
.ref-modal-box { background: #161616; border: 1px solid #333; border-radius: 16px; padding: 1.4rem; max-width: 420px; width: 100%; }
.ref-modal-box h3 { margin: 0 0 0.9rem; color: #DCE600; }
.ref-cf-row { font-size: 1.15rem; margin: 0.3rem 0; }
.ref-cf-warn { color: #fbbf24; font-size: 0.88rem; margin: 0.8rem 0 0; }
.ref-modal-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.2rem; }
.ref-modal-btns .ref-btn { padding: 0.9rem; }
@media (max-width: 380px) { .ref-mrow-players, .ref-pl-name { font-size: 1rem; } }
