/* ══════════════════════════════════════════════════════════════════════════
   layout.css — 元件「會動」所需的結構規則（版位、溢出、輪播軌道、動畫格）
   ─────────────────────────────────────────────────────────────────────────
   style.css 是主題（顏色、邊框、陰影），會整份重畫；這一份只放「拿掉就壞掉」的東西，
   載在 style.css 後面。改配色請改 style.css，不要改這裡。
   ══════════════════════════════════════════════════════════════════════════ */

/* 五大職業輪播：一次只露一張、整條軌道平移 */
.famslide { grid-template-areas: "prev view next" "dots dots dots"; }
.fs-view { grid-area: view; overflow: hidden; border-radius: inherit; }
.fs-track { display: flex; transition: transform var(--dur-3) var(--ease-in-out); }
.fs-slide { flex: 0 0 100%; min-width: 100%; box-sizing: border-box; }
.fs-slide > header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.fs-slide > header h3 { margin: 0; }
.fs-slide > header p { margin: 2px 0 0; }
.fs-slide > p { max-width: 78ch; }
.fs-nav.prev { grid-area: prev; }
.fs-nav.next { grid-area: next; }
.fs-dots { grid-area: dots; display: flex; gap: 8px; justify-content: center; }
.fs-dot { padding: 0; border: 0; }
@media (max-width: 700px) {
  .famslide { grid-template-columns: 1fr; grid-template-areas: "view" "dots"; }
  .fs-nav { display: none; }
  .fs-slide { display: block; }
}

/* 職業逐幀動畫：整條 sprite strip 依幀數平移（--fw/--fh/--n 由 app.js 帶入） */
.janim { display: block; flex: none; background-repeat: no-repeat; background-position: 0 0; image-rendering: pixelated;
  width: calc(var(--fw) * 1px * var(--z, .42)); height: calc(var(--fh) * 1px * var(--z, .42));
  background-size: calc(var(--fw) * 1px * var(--z, .42) * var(--n, 1)) calc(var(--fh) * 1px * var(--z, .42)); }
.jcard .janim { --z: .40; margin: -8px 0; }
.jhero .janim { --z: .95; }
.famhead .janim { --z: .42; }

/* 職業樹：五個家族一欄 */
.jtree { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
.famcol { display: grid; gap: 8px; }
.jcard { display: flex; align-items: center; gap: 10px; }
.famhead { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1100px) { .jtree { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .jtree { grid-template-columns: 1fr; } }

/* 本服改了什麼（首頁） */
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.chgroup h4 { margin: 0 0 8px; }
.chg { padding: 7px 0; }
.chg p { margin: 3px 0 0; }
@media (max-width: 960px) { .chgrid { grid-template-columns: 1fr; } }

/* 外觀圖鑑 */
.lookgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.lr-c { display: flex; gap: 8px; flex-wrap: wrap; }
.lookcell { margin: 0; text-align: center; }
.lookcell img { display: block; margin: 0 auto; object-fit: contain; }

/* 立繪與圖示的固定尺寸（image-rendering 要像素風，縮放不能糊） */
.jart, .fportrait, .sicon, .jemb { image-rendering: pixelated; object-fit: contain; }
.jhero { display: flex; gap: 16px; align-items: flex-start; }
@media (max-width: 960px) { .jhero { flex-wrap: wrap; } }



/* 篩選列改成多層 tag（裝備／外觀）——原本用下拉選單，改成一眼看得到全部選項 */
.filters.col { flex-direction: column; align-items: stretch; gap: 10px; }
.filters .frow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .chips .chip small { opacity: 1; font-weight: 400; margin-left: 2px; }
.chips.multi .chip:not([data-v=""])::before {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px;
  border: 1.5px solid currentColor; border-radius: var(--rad-sm); vertical-align: -1px; opacity: .5;
}
.chips.multi .chip.on:not([data-v=""])::before { background: currentColor; opacity: .9; }
.filters .cbx { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chips.wrapall { flex-basis: 100%; }
@media (max-width: 640px) {
  .filters .frow { gap: 6px; }
  .filters .chips { gap: 4px; }
}


/* 探險實況：暗色畫布嵌在亮色官網裡，用一個暗底容器把它框起來 */
.livebox { background: #0f1218; color: #e8e8e8; border-radius: var(--rad-md); padding: 12px; margin-top: 12px; }
.livebox canvas { width: 100%; height: auto; display: block; background: #1a2230; border-radius: var(--rad-sm); image-rendering: pixelated; }
.livebox #hud { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; padding: 4px 2px 10px; color: #cfd6e4; font-size: var(--fs-xs); }
.livebox #hud b { color: var(--on-solid); font-size: var(--fs-sm); }
.livebox #hud .st { padding: 2px 8px; border-radius: var(--rad-pill); background: #243044; font-size: var(--fs-3xs); }
/* 接手打怪（只有本人看得到）：Discord 主要按鈕的樣子 */
.livebox #hud .take-btn { margin-left: auto; padding: 4px 14px; border-radius: 4px; background: #5865f2; color: #fff; font-weight: 700; text-decoration: none; }
.livebox #hud .take-btn:hover { background: #4752c4; color: #fff; text-decoration: none; }
.livebox #hud .muted { color: #8a94a6; font-size: var(--fs-3xs); }
.livebox #list { margin-top: 10px; }
.livebox #list a { display: block; padding: 10px 12px; margin: 6px 0; background: #171d27; border-radius: var(--rad-sm); color: #e8e8e8; text-decoration: none; }
.livebox #list a:hover { background: #222b3a; }
.livebox #list a b { color: var(--on-solid); }   /* 2026-10-15：b 會吃到全站的 --text-dark（淺色模式＝深灰字配深底，名字看不見） */
.livebox #list a .muted { color: #a9b4c6; }
.livebox .empty { color: #8a94a6; padding: 24px; text-align: center; }


/* 線上試穿：左邊紙娃娃、右邊角色選擇 */
.panel.tryon { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin: 12px 0 16px; }
.tryon-doll { flex: 0 0 auto; width: 160px; height: 208px; min-height: 180px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.04); border-radius: var(--rad-md); padding: 10px; overflow: hidden; }
.tryon-doll img { image-rendering: pixelated; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; margin: auto; }
.tryon-side { flex: 1 1 260px; min-width: 0; }
.tryon-side h3 { margin: 0 0 8px; }
.tryon-side .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tryon-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.tryon-act .chip[disabled] { opacity: .45; pointer-events: none; }
.tryon-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lookcell[data-try] { cursor: pointer; }
.lookcell.on { outline: 2px solid var(--accent, #e07b39); outline-offset: 2px; border-radius: var(--rad-sm); }
@media (max-width: 640px) { .tryon-doll { width: 120px; height: 160px; min-height: 140px; } }

/* 外觀頁的第一層選單（美容／時裝／限定）。2026-10-15 對比稽核：pages.css 的樣式掛在 #app:has(> #lookbody)，
   React 殼把舊頁包進 .legacy-host 之後就對不到了 → 按鈕變回瀏覽器預設的淺灰底，深色模式字翻亮就看不見。
   這裡只補最基本、走代幣的樣子（深淺模式都讀得到）；選中＝實心深橘底白字。 */
.lm-1 { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.lm-g {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  padding: 8px 16px; border-radius: var(--rad-md); border: 1.5px solid var(--line-strong);
  background: var(--card-parchment); color: var(--text-title); font: inherit; cursor: pointer;
}
.lm-g b { color: inherit; font-weight: 900; }
.lm-g small { color: var(--muted); font-size: var(--fs-3xs); }
.lm-g.on { background: linear-gradient(180deg, var(--accent-ink) 0%, var(--accent-ink-deep) 100%); border-color: var(--accent-ink-deep); color: var(--on-solid); }
.lm-g.on small { color: var(--on-solid); }
.lm-2 { display: flex; flex-wrap: wrap; gap: 7px; }
