/* ============================================================
   brand.css — UNION ARENA 品牌改版樣式（2026 版型）
   只給「上位卡表／玩家卡表／投稿卡表／查詢投稿狀態」這幾個公開頁面用。
   刻意跟 styles.css 完全分開檔案：admin.html／review.html／單篇卡表頁
   （/p/*.html）／系列總覽頁（/series/*.html）等仍吃舊的 styles.css，
   不會被這裡的樣式影響到。
   ============================================================ */
:root{
  --bg:#F2F9FE; --card:#fff; --line:#E4EBF0;
  --accent:#1E9BD7; --accent-dark:#1683BC; --badge-bg:#E8F5FC;
  --ink:#14222B; --muted:#6B7A85; --muted2:#51606B;
  --stamp-green:#2C7A4B; --stamp-rust:#B5403B; --stamp-gold:#9A6B00;
  --nav-bg:#0F5C8C; --nav-ink:#FFFFFF; --nav-muted:rgba(255,255,255,.76); --nav-line:rgba(255,255,255,.24);
}
html[data-theme="dark"]{
  --bg:#0F1820; --card:#18222C; --line:#28333D;
  --accent:#2BA6DE; --accent-dark:#62C2EE; --badge-bg:#16323F;
  --ink:#E7EDF2; --muted:#92A0AB; --muted2:#B6C1CA;
  --nav-bg:#0A3854; --nav-ink:#EAF6FD; --nav-muted:rgba(234,246,253,.72); --nav-line:rgba(255,255,255,.16);
}

*{ margin:0; padding:0; box-sizing:border-box; }
body{
  background:radial-gradient(var(--line) 1px, transparent 1.4px) 0 0/22px 22px, var(--bg);
  color:var(--ink); font-family:'Noto Sans TC',sans-serif; -webkit-font-smoothing:antialiased;
}
a{ color:inherit; }
.wrap{ max-width:1186px; margin:0 auto; padding:0 24px; }

/* ========== 導覽列：滿版藍色底色，跟下方內容區明確區隔 ========== */
.site-nav{
  background:var(--nav-bg); border-bottom:1px solid rgba(0,0,0,.15); margin-bottom:34px;
  position:sticky; top:0; z-index:100;
}
.site-nav > .wrap{
  display:flex; align-items:center; gap:20px; padding:16px 24px; flex-wrap:wrap; position:relative;
}
.site-nav .brand{ display:flex; align-items:center; gap:11px; text-decoration:none; margin-right:auto; }
.site-nav .brand img{ width:38px; height:38px; border-radius:9px; object-fit:cover; box-shadow:0 3px 10px rgba(0,0,0,.3); flex:none; }
.site-nav .brand .en{
  font-family:Arial,'Helvetica Neue',sans-serif; font-weight:900; font-style:italic; font-size:14px;
  letter-spacing:.03em; color:#fff; transform:skewX(-8deg) scaleX(.94); transform-origin:left; display:block;
}
.site-nav .brand .cn{ font-weight:800; font-size:15px; letter-spacing:-.01em; margin-top:1px; color:var(--nav-ink); }
#visitStat{ font-size:12px; color:var(--nav-muted); white-space:nowrap; }
#visitStat:empty{ display:none; }
#visitStat b{ color:#fff; font-weight:800; }
.site-nav .links{ display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.site-nav .links a.tick, .site-nav .links button.theme-toggle, .site-nav .links a.fanpage{ flex:none; }
.tick{
  display:inline-flex; align-items:center; gap:9px; text-decoration:none; color:var(--nav-ink); background:none; border:none; padding:0;
  font-weight:800; font-style:italic; font-size:15px; letter-spacing:-.01em; cursor:pointer; font-family:inherit;
}
.tick::before{
  content:""; width:13px; height:3px; background:var(--nav-line); transform:skewX(-25deg); transition:background .15s,width .15s; flex:none;
}
.tick:hover::before{ background:#fff; width:19px; }
.tick.active{ color:#fff; }
.tick.active::before{ background:#fff; width:19px; }
.theme-toggle{
  border:1px solid var(--nav-line); background:rgba(255,255,255,.1); border-radius:9px; width:34px; height:34px;
  font-size:15px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; color:#fff;
}
.theme-toggle:hover{ border-color:#fff; }
.fanpage{
  text-decoration:none; color:#fff; font-weight:700; font-size:13px; display:inline-flex; align-items:center; gap:7px;
}
.fanpage::before{ content:""; width:10px; height:2px; background:#fff; transform:skewX(-25deg); flex:none; }

/* 手機漢堡選單 */
.nav-toggle{ display:none; }
.nav-burger{ display:none; flex-direction:column; justify-content:center; gap:5px; width:36px; height:36px; padding:0; background:none; border:none; cursor:pointer; }
.nav-burger span{ display:block; width:24px; height:2px; margin:0 auto; background:#fff; border-radius:2px; }

/* ========== 頁首 ========== */
.page-head2{ margin-bottom:30px; }
.page-head2.center{ text-align:center; }
.page-head2 .tag2{
  display:inline-flex; align-items:center; gap:8px; background:var(--badge-bg); color:var(--accent-dark);
  font-weight:800; font-style:italic; font-size:11.5px; letter-spacing:.14em; padding:5px 12px 5px 10px;
  clip-path:polygon(0 0, 100% 0, 92% 100%, 0% 100%); margin-bottom:12px;
}
.page-head2 h1{
  font-weight:900; font-size:clamp(26px,3.4vw,36px); letter-spacing:-.02em; transform:skewX(-4deg); transform-origin:left;
  display:inline-block; line-height:1.15;
}
.page-head2.center h1{ transform:none; }
.page-head2 p{ margin-top:10px; color:var(--muted2); font-size:14.5px; max-width:640px; line-height:1.6; }
.page-head2.center p{ margin-left:auto; margin-right:auto; }
.page-head2 p a{ color:var(--accent-dark); font-weight:700; text-decoration:none; }
.page-head2 p a:hover{ text-decoration:underline; }

/* ========== 工具列：線條感，取代方框/圓角藥丸 ========== */
.toolbar{
  display:flex; flex-wrap:wrap; align-items:flex-end; gap:18px 30px;
  padding:6px 0 18px; border-bottom:1px solid var(--line); margin-bottom:10px;
}
.toolbar .group{ display:flex; flex-direction:column; gap:5px; }
.toolbar .lbl{ font-size:10.5px; font-weight:800; letter-spacing:.14em; color:var(--muted); text-transform:uppercase; }
.toolbar select{
  appearance:none; -webkit-appearance:none; border:none; border-bottom:2px solid var(--line);
  background:transparent; color:var(--ink); font:inherit; font-weight:700; font-size:13.5px;
  padding:2px 20px 5px 4px; cursor:pointer; border-radius:0; min-width:88px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7A85'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 2px center; transition:border-color .15s;
}
.toolbar select option{ padding-left:4px; }
.toolbar select:hover, .toolbar select:focus{ border-bottom-color:var(--accent); outline:none; }
.toolbar input[type="date"]{
  border:none; border-bottom:2px solid var(--line); background:transparent; color:var(--ink);
  font:inherit; font-size:13px; padding:2px 2px 5px; font-family:inherit;
}
.toolbar .custom-range{ display:inline-flex; align-items:center; gap:6px; }
.toolbar .custom-range .lbl{ text-transform:none; letter-spacing:0; font-weight:600; }
.toolbar .sortgrp{ display:flex; gap:20px; align-items:flex-end; }
.sortbtn{
  display:inline-flex; align-items:center; gap:8px; background:none; border:none; cursor:pointer;
  font-weight:800; font-style:italic; font-size:13.5px; letter-spacing:-.01em; color:var(--muted2);
  padding:2px 0 5px; border-bottom:2px solid transparent; font-family:inherit;
}
.sortbtn::before{ content:""; width:11px; height:2px; background:var(--line); transform:skewX(-25deg); flex:none; }
.sortbtn.active{ color:var(--accent-dark); border-bottom-color:var(--accent); }
.sortbtn.active::before{ background:var(--accent); width:16px; }
.toolbar .count{ margin-left:auto; font-size:12px; color:var(--muted); align-self:flex-end; padding-bottom:6px; }

/* ========== 規格條標籤（取代藥丸標籤）==========
   小型大寫標籤 + 粗體數值，顏色只落在數值文字本身，用直線分隔而非底色區塊 */
.spec{ display:flex; flex-wrap:wrap; row-gap:8px; }
.spec .seg{ padding-right:18px; border-left:1px solid var(--line); padding-left:16px; }
.spec .seg:first-child{ border-left:none; padding-left:0; }
.spec .k{ display:block; font-size:9.5px; font-weight:800; letter-spacing:.14em; color:var(--muted); text-transform:uppercase; margin-bottom:4px; }
.spec .v{ display:block; font-weight:800; font-size:14.5px; letter-spacing:-.01em; }
.spec .v.c-format{ color:var(--accent-dark); }
.spec .v.c-people{ color:var(--stamp-green); }
.spec .v.c-date{ color:var(--muted2); font-weight:700; }

/* ========== 檔案清單：系列圖(官方美術) + 卡表照(投稿實拍) 並排 ========== */
.list-a{ display:flex; flex-direction:column; }
.row-a{
  display:flex; gap:24px; padding:32px 0; border-top:1px solid var(--line); align-items:stretch; cursor:pointer;
  transition:border-color .15s; text-align:left; background:none; border-left:none; border-right:none; border-bottom:none;
  width:100%; font:inherit; color:inherit;
}
.list-a > .row-a:last-child{ border-bottom:1px solid var(--line); }
.row-a:hover{ border-top-color:var(--accent); }
.row-a:hover + .row-a{ border-top-color:var(--accent); }

.row-a .imgs{ display:flex; gap:12px; flex:none; }
.row-a .series-ico{
  width:98px; aspect-ratio:1/1; flex:none; position:relative; overflow:hidden; align-self:center;
  clip-path:polygon(0 0, 100% 0, 100% 100%, 13px 100%, 0 calc(100% - 13px));
  box-shadow:0 4px 11px rgba(20,34,43,.16); background:linear-gradient(150deg,#3E6B8C,#1E3A52);
}
.row-a .series-ico img{ width:100%; height:100%; object-fit:contain; background:var(--card); display:block; }

/* 多副牌組（2V2／3V3）：系列圖由上到下直排，最多 3 個都完整可見，不互相遮擋。
   容器寬度固定跟單一牌組的 .series-ico 一樣（98px，裡面的小圖置中），
   這樣不管這一列是單一牌組還是多副牌組，右邊的卡表照永遠從同一個 X 位置開始，
   不會因為圖欄寬度不同而讓每一列的卡表照左邊界對不齊。 */
.row-a .stack{ display:flex; flex-direction:column; align-items:center; gap:7px; flex:none; width:98px; }
.row-a .stack .series-ico{
  width:64px; height:64px;
  clip-path:polygon(0 0, 100% 0, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  box-shadow:0 3px 8px rgba(20,34,43,.16);
}
.combo-plus{ font-weight:900; font-style:italic; font-size:17px; color:var(--accent); }
.row-a .series-ico .init{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center;
  color:rgba(255,255,255,.92); font-weight:800; font-size:23px;
}
.row-a .thumb{
  width:336px; aspect-ratio:16/10; flex:none; position:relative; overflow:hidden; align-self:center;
  clip-path:polygon(0 0, 100% 0, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  display:flex; align-items:center; justify-content:center; color:var(--muted); font-weight:700; font-size:13px;
  background:repeating-linear-gradient(135deg,var(--badge-bg),var(--badge-bg) 9px,var(--line) 9px,var(--line) 18px);
}
.row-a .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.row-a .thumb::after{ content:""; position:absolute; inset:0; background:linear-gradient(200deg, rgba(20,34,43,.14) 0%, transparent 45%); pointer-events:none; }
.row-a .thumb .multi-badge{
  position:absolute; top:8px; right:8px; background:rgba(20,34,43,.62); color:#fff; font-weight:700; font-size:12px;
  padding:3px 10px; border-radius:999px; z-index:1;
}

.row-a .body{ flex:none; width:min(50%,520px); display:flex; flex-direction:column; justify-content:center; gap:10px; min-width:0; }
/* 第一行：建檔分類資訊（作品名＋顏色色塊），第二行：玩家自填牌組名稱（放大＋粗體） */
.row-a .cat{ display:flex; flex-wrap:wrap; align-items:center; gap:9px; line-height:1.3; }
/* 系列名＋顏色是同一副牌組的資訊，包成一個不換行的單位（deck-chip），
   多副牌組(2V2/3V3)一行放不下時，整組一起換行，不會讓顏色跟系列名拆散、或跟別組混在一起 */
.deck-chip{ display:inline-flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.series-chip{
  display:inline-block; background:rgba(107,122,133,.14); color:var(--ink); font-weight:800; font-size:14.5px;
  letter-spacing:-.005em; padding:5px 12px; border-radius:5px; white-space:nowrap;
}
.color-chip{
  display:inline-block; color:#fff; font-weight:800; font-size:13.5px; letter-spacing:.02em; padding:4px 10px; border-radius:5px;
  white-space:nowrap;
}
.row-a .deckname{ font-size:22px; color:var(--ink); font-weight:800; letter-spacing:-.01em; line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.row-a .by{ font-size:15px; color:var(--muted); }
.row-a .by b{ color:var(--accent-dark); font-weight:700; }

.mcat{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:10px; }

.row-a .go{ margin-left:auto; flex:none; align-self:center; display:flex; align-items:center; gap:18px; padding-left:26px; }
.row-a .go::before{ content:""; width:1px; align-self:stretch; background:var(--line); }
.row-a .go .arrow{ font-weight:900; font-style:italic; font-size:25px; color:var(--line); transition:color .15s, transform .15s; }
.row-a:hover .go .arrow{ color:var(--accent); transform:translateX(6px); }

.more-row{ display:flex; justify-content:center; padding:32px 0 10px; }
.btn-ghost2{
  border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px;
  padding:11px 28px; font-size:13.5px; font-weight:700; cursor:pointer; font-family:inherit; transition:border-color .15s, color .15s;
}
.btn-ghost2:hover{ border-color:var(--accent); color:var(--accent-dark); }

.state{ padding:48px 0; text-align:center; color:var(--muted); font-size:15px; }

/* ========== 卡表獨立頁（/p/{id}.html，Python 靜態產生） ========== */
.post-main{ padding-top:34px; padding-bottom:20px; }
.back2{
  display:inline-flex; align-items:center; gap:8px; color:var(--accent-dark); font-weight:700; font-size:13.5px;
  text-decoration:none; margin-bottom:18px;
}
.back2:hover{ text-decoration:underline; }
.post-head{ margin-bottom:24px; }
.post-head h1{ font-weight:900; font-size:clamp(24px,3.2vw,34px); letter-spacing:-.02em; line-height:1.25; margin-bottom:14px; }
.post-head .cat{ display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-bottom:10px; }
.post-head .by{ font-size:13.5px; color:var(--muted); margin-bottom:6px; }
.post-head .by b{ color:var(--accent-dark); font-weight:700; }
/* 卡表圖通常是密集小字的對局表/牌表截圖，用小縮圖裁切看不清楚，
   直接原尺寸比例（不裁切）放大到接近內容欄寬度，不用點開放大也能看清楚。 */
.post-imgs{ display:flex; flex-direction:column; gap:18px; margin:24px 0; }
.post-imgs img{
  width:100%; max-width:720px; height:auto; display:block; cursor:zoom-in;
  clip-path:polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow:0 6px 18px rgba(20,34,43,.14);
}
.post-text{ white-space:pre-wrap; line-height:1.8; font-size:14.5px; color:var(--ink); margin:24px 0; }
.post-actions{ display:flex; gap:12px; flex-wrap:wrap; margin:30px 0 8px; }
.post-related{ margin-top:44px; padding-top:26px; border-top:1px solid var(--line); }
.post-related h2{ font-weight:900; font-style:italic; font-size:19px; letter-spacing:-.01em; margin-bottom:16px; }
.rel-list{ display:flex; flex-wrap:wrap; gap:14px; }
.rel-row{
  display:flex; align-items:center; gap:12px; flex:1 1 250px; max-width:340px; box-sizing:border-box;
  padding:10px 16px 10px 10px; border:1px solid var(--line); border-radius:10px;
  text-decoration:none; color:inherit; transition:border-color .15s;
}
.rel-row:hover{ border-color:var(--accent); }
.rel-row .rel-thumb{
  width:52px; height:52px; flex:none; overflow:hidden; background:var(--badge-bg);
  clip-path:polygon(0 0, 100% 0, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}
.rel-row .rel-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.rel-row .rel-thumb .ph{ display:flex; align-items:center; justify-content:center; width:100%; height:100%; color:var(--muted); font-size:9px; }
.rel-row .rel-title{ font-weight:800; font-size:14px; color:var(--ink); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rel-row:hover .rel-title{ color:var(--accent-dark); }
@media (max-width:640px){ .rel-row{ flex:1 1 100%; max-width:none; } }

/* ========== 頁尾 ========== */
.foot2{ margin-top:56px; border-top:1px solid var(--line); padding:26px 0; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.foot2 .copy{ display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); }
.foot2 .copy img{ width:22px; height:22px; border-radius:6px; object-fit:cover; flex:none; }
.foot2 .fnav{ display:flex; gap:18px; font-size:12.5px; }
.foot2 .fnav a{ text-decoration:none; color:var(--muted2); font-weight:700; }
.foot2 .fnav a:hover{ color:var(--accent-dark); }

/* ========== 大展式詳情 modal ========== */
.modal-mask{ position:fixed; inset:0; background:rgba(20,34,43,.6); display:none; align-items:center; justify-content:center; padding:32px; z-index:110; }
.modal-mask.open{ display:flex; }
.modal{
  background:var(--card); width:min(1040px,100%); max-height:90vh; overflow:hidden; display:grid;
  grid-template-columns:1.1fr 1fr; box-shadow:0 30px 70px rgba(20,34,43,.35);
  clip-path:polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.modal-img{ background:var(--ink); display:flex; align-items:center; justify-content:center; }
.modal-img img{ width:100%; height:100%; max-height:90vh; object-fit:contain; display:block; cursor:zoom-in; }
.modal-img .ph{ color:var(--muted); font-family:monospace; font-size:13px; padding:40px; }
.carousel{ position:relative; width:100%; height:100%; overflow:hidden; }
.carousel .track{ display:flex; height:100%; transition:transform .25s ease; }
.carousel .slide{ min-width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.carousel .slide img{ width:100%; height:100%; max-height:90vh; object-fit:contain; display:block; cursor:zoom-in; }
.carousel .nav{ position:absolute; top:50%; transform:translateY(-50%); width:38px; height:38px; border-radius:50%; background:rgba(0,0,0,.42); color:#fff; border:none; font-size:22px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:2; }
.carousel .nav:hover{ background:rgba(0,0,0,.62); }
.carousel .nav.prev{ left:10px; } .carousel .nav.next{ right:10px; }
.carousel .counter{ position:absolute; top:10px; right:12px; background:rgba(0,0,0,.5); color:#fff; font-weight:700; font-size:12px; padding:3px 9px; border-radius:999px; z-index:2; }
.carousel .dots{ position:absolute; bottom:12px; left:0; right:0; display:flex; gap:6px; justify-content:center; z-index:2; }
.carousel .dots i{ width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.45); cursor:pointer; transition:background .15s; }
.carousel .dots i.on{ background:#fff; }
.modal-side{ display:flex; flex-direction:column; max-height:90vh; }
.modal-side .head{ padding:24px 26px 16px; border-bottom:1px solid var(--line); }
.modal-side h2{ font-weight:900; font-size:21px; line-height:1.4; margin:0 0 12px; letter-spacing:-.01em; }
.modal-by{ font-size:13px; color:var(--muted); font-weight:600; margin:0 0 10px; }
.modal-by b{ color:var(--accent-dark); }
.modal-side .text{ padding:18px 26px; overflow-y:auto; flex:1; font-size:14.5px; line-height:1.75; white-space:pre-wrap; color:var(--ink); }
.modal-side .foot{ padding:16px 26px 22px; border-top:1px solid var(--line); display:flex; gap:12px; flex-wrap:wrap; }
.btn-primary2{
  background:var(--ink); color:var(--bg); border:none; font-weight:800; font-style:italic; font-size:14px;
  padding:12px 26px; cursor:pointer; letter-spacing:.02em; font-family:inherit; transition:background .15s;
  clip-path:polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%); text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
}
.btn-primary2:hover{ background:var(--accent-dark); }
.btn-discuss{
  background:#1877F2; color:#fff; font-weight:800; font-size:14px; padding:12px 22px; border:none; cursor:pointer;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center; flex:1;
  clip-path:polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
}
.btn-discuss:hover{ background:#1463d2; }
.x-btn{
  position:fixed; top:24px; right:28px; width:40px; height:40px; border-radius:50%; background:var(--card); color:var(--ink);
  border:1px solid var(--line); font-size:18px; cursor:pointer; z-index:111; box-shadow:0 4px 12px rgba(0,0,0,.2);
}

/* ========== 全螢幕圖片燈箱 ========== */
.lb-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.92); display:none; align-items:center; justify-content:center; z-index:120; overflow:hidden; touch-action:none; }
.lb-overlay.open{ display:flex; }
.lb-img{ max-width:100vw; max-height:100vh; transform-origin:center center; user-select:none; -webkit-user-drag:none; will-change:transform; }
.lb-img.rotated{ max-width:100vh; max-height:100vw; }
.lb-close{ position:fixed; top:16px; right:18px; width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,.92); border:none; font-size:20px; cursor:pointer; z-index:121; box-shadow:0 4px 12px rgba(0,0,0,.3); }

/* ========== 響應式 ========== */
@media (max-width:1023px){
  .row-a .thumb{ width:268px; }
  .row-a .body{ width:auto; flex:1; }
}
@media (max-width:900px){
  .site-nav .visit-order{ order:6; }
}
@media (max-width:760px){
  .row-a .go{ display:none; }
}
@media (max-width:767px){
  .site-nav > .wrap{ padding:14px 24px; row-gap:8px; }
  .nav-burger{ display:flex; }
  #visitStat{ order:6; flex-basis:100%; margin:0; }
  .site-nav .links{ display:none; }
  .nav-toggle:checked ~ .links{ display:flex; flex-direction:column; align-items:stretch; width:100%; gap:2px; order:5; }
  .nav-toggle:checked ~ .links .tick{ padding:11px 2px; border-top:1px solid var(--nav-line); }
  .nav-toggle:checked ~ .links .theme-toggle{ align-self:flex-start; margin-top:8px; }
  .nav-toggle:checked ~ .links .fanpage{ padding:11px 2px; border-top:1px solid var(--nav-line); }
  .toolbar .group{ flex-wrap:wrap; }
  .toolbar .custom-range{ flex:1 1 100%; }
  .toolbar .custom-range input[type=date]{ flex:1 1 0; min-width:0; }
  .modal-mask{ padding:14px; align-items:flex-start; overflow-y:auto; }
  .modal{ grid-template-columns:1fr; max-height:none; clip-path:none; }
  .modal-img, .modal-img img{ max-height:46vh; }
  .modal-side{ max-height:none; }
  .modal-side .text{ overflow-y:visible; }
}
@media (max-width:640px){
  .row-a{ flex-wrap:wrap; }
  .row-a .imgs{ width:100%; }
  .row-a .series-ico{ width:74px; }
  .row-a .stack{ width:74px; }
  .row-a .thumb{ flex:1; }
  .row-a .body{ width:100%; }
  .spec .seg{ padding-right:12px; padding-left:12px; }
}

/* ========== 表單（投稿／查詢狀態）：沉穩功能導向，不套大切角，
   只延續線條感輸入框、品牌斜體字＋tick 記號 ========== */
.formwrap{ max-width:640px; margin:0 auto 40px; }

.seg2{ display:flex; border-bottom:1px solid var(--line); margin-bottom:38px; }
.seg2 button{
  flex:1; background:none; border:none; padding:14px 4px; cursor:pointer; font-family:inherit;
  font-weight:800; font-style:italic; font-size:15.5px; letter-spacing:-.01em; color:var(--muted2);
  border-bottom:2px solid transparent; margin-bottom:-1px; transition:color .15s, border-color .15s;
}
.seg2 button.active{ color:var(--accent-dark); border-bottom-color:var(--accent); }

.fsec{ margin-bottom:36px; }
.fsec-head{ display:flex; align-items:baseline; gap:10px; margin-bottom:4px; }
.fsec-head h3{ font-weight:800; font-size:15.5px; letter-spacing:-.01em; }
.fsec-head .req{ color:var(--stamp-rust); margin-left:1px; }
.fsec > .hint{ font-size:12px; color:var(--muted); margin:2px 0 14px; }

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.grid2.g3{ grid-template-columns:repeat(3,1fr); }
.grid2.g2-2{ grid-template-columns:1.3fr 1fr; }
@media (max-width:600px){ .grid2, .grid2.g3, .grid2.g2-2{ grid-template-columns:1fr; } }

.frow{ display:flex; flex-direction:column; gap:7px; }
.frow.solo{ margin-top:16px; }
.frow label{ font-size:10.5px; font-weight:800; letter-spacing:.1em; color:var(--muted); text-transform:uppercase; }
.inp, .sel, .ta{
  border:1.5px solid var(--line); background:var(--card); color:var(--ink); border-radius:7px;
  font:inherit; font-size:14.5px; padding:10px 14px; width:100%; cursor:text; transition:border-color .15s, box-shadow .15s;
}
.sel{
  appearance:none; -webkit-appearance:none; cursor:pointer; padding-right:32px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7A85'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center;
}
.inp:focus, .sel:focus, .ta:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(30,155,215,.14); }
.ta{ min-height:92px; resize:vertical; line-height:1.65; cursor:text; }
.chk{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); margin-top:4px; font-weight:600; cursor:pointer; }
.chk input{ accent-color:var(--accent); }
.privacy-note{ font-size:11.5px; color:var(--muted); margin-top:14px; line-height:1.65; }
.privacy-note b{ color:var(--muted2); }

.file-in{ font-size:13px; color:var(--muted2); font-family:inherit; }
.file-in::file-selector-button{
  border:1px solid var(--line); background:var(--bg); color:var(--ink); font-weight:700; font-size:12.5px;
  padding:8px 15px; border-radius:7px; margin-right:12px; cursor:pointer; font-family:inherit; transition:border-color .15s;
}
.file-in::file-selector-button:hover{ border-color:var(--accent); color:var(--accent-dark); }

.rounds{ display:flex; flex-direction:column; gap:10px; margin:14px 0 14px; }
.round-row{ display:flex; align-items:center; gap:14px; }
.round-row .rlabel{ font-weight:800; font-size:11px; letter-spacing:.08em; color:var(--muted); text-transform:uppercase; width:52px; flex:none; }
.round-row input{
  flex:1; border:1.5px solid var(--line); background:var(--card); border-radius:7px;
  font:inherit; font-size:13.5px; padding:9px 13px; color:var(--ink); cursor:text; transition:border-color .15s, box-shadow .15s;
}
.round-row input:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(30,155,215,.14); }
.round-row .rm{ background:none; border:none; color:var(--line); cursor:pointer; font-size:15px; flex:none; padding:2px; }
.round-row .rm:hover{ color:var(--stamp-rust); }
.btn-add2{
  border:none; background:none; color:var(--accent-dark); font-weight:800; font-style:italic; font-size:13.5px;
  cursor:pointer; display:inline-flex; align-items:center; gap:7px; padding:0; font-family:inherit;
}
.btn-add2 .plus{ font-style:normal; font-size:16px; line-height:1; }

.cf-ph{
  border:1px dashed var(--line); border-radius:8px; padding:16px; text-align:center; font-size:12px;
  color:var(--muted); margin:8px 0 22px;
}

.form-actions{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-top:6px; }
.form-msg{ font-size:12.5px; font-weight:700; }
.form-msg.err{ color:var(--stamp-rust); }
.form-msg.ok{ color:var(--stamp-green); }

.status-hint{ margin-top:6px; }
.status-hint a{ color:var(--accent-dark); font-weight:700; text-decoration:none; font-size:13.5px; }
.status-hint2{ text-align:center; color:var(--muted); font-size:12.5px; margin-top:24px; line-height:1.65; }
.status-hint2 a{ color:var(--accent-dark); font-weight:700; text-decoration:none; }

/* ========== 送出成功結果卡／查詢狀態卡 ========== */
.result2{ text-align:center; padding:44px 10px 20px; max-width:460px; margin:0 auto; }
.result2 .ic{
  width:58px; height:58px; margin:0 auto 18px; border:2px solid var(--accent); border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:24px; color:var(--accent-dark); font-weight:900;
}
.result2 h3{ font-weight:900; font-size:22px; margin-bottom:10px; letter-spacing:-.01em; }
.result2 p{ color:var(--muted2); font-size:13.5px; line-height:1.65; }
.result2 .sr-label{ font-size:12.5px; color:var(--muted); margin-top:22px; }
.code-stub{
  display:inline-flex; align-items:center; gap:16px; border:1.5px dashed var(--line); padding:12px 22px; margin:10px 0 6px;
}
.code-stub .code{ font-family:ui-monospace,monospace; font-weight:800; font-size:23px; letter-spacing:3px; color:var(--ink); }
.code-stub button{
  border:1px solid var(--line); background:var(--card); font-weight:700; font-size:12px; padding:7px 13px;
  cursor:pointer; border-radius:6px; font-family:inherit;
}
.result2 .links{ display:flex; gap:16px; justify-content:center; margin-top:24px; flex-wrap:wrap; }
.btn-ghost3{
  border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px;
  padding:10px 22px; font-size:13px; font-weight:700; cursor:pointer; font-family:inherit;
}

/* ========== 查詢投稿狀態：查詢碼輸入框、狀態徽章、欄位列 ========== */
.status-wrap{ max-width:560px; margin:0 auto 40px; }
.status-msg{ text-align:center; margin:16px 0 0; font-weight:700; font-size:13px; min-height:20px; }
.status-msg.err{ color:var(--stamp-rust); }
.query-form{ display:flex; gap:14px; justify-content:center; align-items:center; flex-wrap:wrap; }
.code-inp{
  border:1.5px solid var(--line); border-radius:7px; background:var(--card); color:var(--ink);
  font:inherit; font-family:ui-monospace,monospace; font-weight:800; font-size:19px; letter-spacing:3px;
  text-transform:uppercase; text-align:center; padding:12px 16px; max-width:230px; width:100%;
  transition:border-color .15s, box-shadow .15s;
}
.code-inp:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(30,155,215,.14); }
.status-card{ margin-top:30px; border:1px solid var(--line); background:var(--card); padding:26px 28px; }
.status-card.hidden{ display:none; }
.st-badge{
  display:inline-flex; align-items:center; gap:8px; font-weight:800; font-style:italic; font-size:12.5px;
  letter-spacing:.05em; padding:6px 16px 6px 12px; color:#fff;
  clip-path:polygon(0 0, 100% 0, 92% 100%, 0% 100%);
}
.st-badge.st-pending{ background:var(--stamp-gold); }
.st-badge.st-approved{ background:var(--stamp-green); }
.st-badge.st-rejected{ background:var(--stamp-rust); }
.st-rows{ margin-top:20px; }
.st-row{ display:flex; justify-content:space-between; gap:16px; padding:11px 0; border-top:1px solid var(--line); }
.st-rows .st-row:first-child{ border-top:none; }
.st-row .k{ font-size:10.5px; font-weight:800; letter-spacing:.1em; color:var(--muted); text-transform:uppercase; padding-top:3px; flex:none; }
.st-row .v{ font-weight:700; font-size:14px; text-align:right; }
.st-reply{
  margin-top:18px; padding:16px 18px; background:var(--badge-bg); border-left:3px solid var(--accent);
  font-size:13.5px; line-height:1.7; white-space:pre-wrap;
}
.st-reply .k{ font-weight:800; display:block; margin-bottom:6px; font-size:10.5px; letter-spacing:.1em; color:var(--accent-dark); text-transform:uppercase; }

@media (max-width:480px){
  .status-card{ padding:22px 18px; }
  .code-inp{ max-width:180px; }
}

/* 深色模式下覆蓋寫死的亮色表面 */
html[data-theme="dark"] .toolbar select,
html[data-theme="dark"] .toolbar input[type="date"]{ color-scheme:dark; }
html[data-theme="dark"] .lb-close{ background:rgba(24,34,41,.92); color:#fff; }
