/* [claude code] 2026-10-26 v0.25 有新版本的更新條(.update-bar) */
/* [codex] 2026-10-22 v0.20 新手入口、整理方案與明顯的隊伍整理主按鈕。 */
/* [claude code] 2026-10-21 v0.18 「更多」裡有事的項目加紅點(原本只有金框,外面有紅點裡面找不到)*/
/* [claude code] 2026-10-19 v0.17 道具 / 裝備圖示(.item-icon:列的最前面 32 px · 裝備格 28 px · 結算的掉落 20 px) */
/* [claude code] 2026-10-19 v0.16 任務追蹤改成一列:[任務] 目標 + 「自動前往」 */
/* [claude code] 2026-10-19 v0.16 貨幣圖示(.coin-icon:頂欄 / 商店價格;沒有圖退回色點) */
/* [claude code] 2026-10-19 v0.2 萌將千秋自己的版面:頂欄 / 任務追蹤 / 地圖區 / 聊天列 / 建角 / 表單。顏色一律用 theme.css 的變數。 */
/* [claude code] 2026-10-19 v0.5 地圖區的 canvas 規則只管直接子層(HUD 裡的小地圖不能被撐滿) */
/* [claude code] 2026-10-19 v0.6 面板開著時底部導覽照樣點得到(英靈 → 隊伍直接切):導覽蓋在遮罩上面、面板停在導覽上緣 */
/* [claude code] 2026-11-10 付費卡只留月卡:盤點各款 + 送派工池 t567~t574 */

.help-mode { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.help-team-actions { display: flex; flex-direction: column; gap: 8px; }
.help-team-actions button { width: 100%; }
.help-upcoming { grid-column: 1 / -1; }
html[data-ui-skin] #more-list > button[hidden], #more-list > button[hidden] { display: none; }
.help-check { display: flex; align-items: center; gap: 8px; padding: 8px; min-height: 48px; border: 1px solid var(--border); border-radius: 8px; }
.help-check input { flex: none; width: 20px; height: 20px; }
#assist-body .box p { margin-top: 6px; }
/* 頂欄:頭像 · 名字 + 境界 + 修為條 · 貨幣 */
#hud { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--border); background: var(--surface); }
html[data-ui-skin] #hud .avatar { width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 999px; border: 2px solid var(--gold); overflow: hidden; }
.look-dot { display: block; width: 100%; height: 100%; border-radius: 999px; }
.look-dot.l0 { background: var(--look-0); }
.look-dot.l1 { background: var(--look-1); }
.look-dot.l2 { background: var(--look-2); }
.look-dot.l3 { background: var(--look-3); }
.look-dot.has-art { overflow: hidden; }
.look-dot.has-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hud-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hud-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hud-line b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-realm { font-size: 11px; color: var(--gold-ink); white-space: nowrap; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.hud-wallet { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.coin { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text); white-space: nowrap; }
.coin i { width: 8px; height: 8px; border-radius: 999px; background: var(--gold); }
.coin.stone i { background: var(--fac-xuanwu); }
.coin.ticket i { background: var(--fac-zhuque); }
.coin-icon { display: inline-block; flex: none; width: 14px; height: 14px; vertical-align: -2px; }
.row .count .coin-icon { width: 16px; height: 16px; margin-right: 2px; vertical-align: -3px; }
.item-icon { display: block; flex: none; width: 32px; height: 32px; object-fit: contain; }
.eq-slot .item-icon { width: 28px; height: 28px; margin: 2px auto; }
.sr-chip-icon { width: 20px; height: 20px; margin-right: 4px; vertical-align: -5px; }

/* 任務追蹤:一行,點了開任務 */

/* 地圖區(Pixi 畫布會放進來) */
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--surface-2); }
.stage > canvas { display: block; width: 100%; height: 100%; touch-action: none; } /* 只管地圖本身那張(HUD 裡的小地圖有自己的大小) */
.stage-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; font-size: 13px; color: var(--mute); text-align: center; }

/* 聊天列:第 6 段起在 social.css(表情鈕 + 最新一則 + 未讀) */

/* 底部導覽在遮罩(25)/ 面板(30)之上、戰鬥(40)/ 召喚演出(50)之下;--dock-h 由 app.js 量 */
#dock { position: relative; z-index: 35; }
#game .sheet { bottom: calc(var(--dock-h, 0px) + 8px); }

/* 表單(登入 / 建角 / 綁定) */
.form { display: flex; flex-direction: column; gap: 8px; }
.form[hidden] { display: none; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); }
.msg { min-height: 20px; font-size: 13px; color: var(--danger); }
.msg.ok { color: var(--accent); }

/* 建角:外觀 */
.look-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
html[data-ui-skin] .look-list button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 96px; padding: 8px 4px; border-radius: 14px; background: var(--surface); }
html[data-ui-skin] .look-list button[aria-checked="true"] { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.look-list .look-dot { width: 56px; height: 56px; }
.look-list span:last-child { font-size: 11px; color: var(--mute); }

/* 「更多」裡的入口 */
.grid-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html[data-ui-skin] .grid-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 72px; padding: 12px; border-radius: 14px; background: var(--surface); text-align: left; }
.grid-list b { font-size: 15px; }
.grid-list small { font-size: 11px; color: var(--mute); }
.grid-list .ready { border-color: var(--gold); }
/* 有事要做的那一項:跟底部導覽一樣的紅點(外面「更多」亮紅點,點開要找得到是哪一項)*/
#more-list > button { position: relative; }
#more-list > button.ready::after { content: ''; position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 999px; background: var(--danger); }

/* 設定裡的帳號區 */
.box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.box h3 { margin: 0; font-size: 15px; }
.rescue { padding: 12px; border: 2px dashed var(--gold); border-radius: 8px; font-size: 20px; letter-spacing: .2em; text-align: center; color: var(--gold-ink); background: var(--surface-2); user-select: all; }
button.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
/* [codex] 2026-10-22 v0.21 手機可橫捲的能力比較與戰報。 */
.ad-table-wrap { max-width: 100%; overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ad-table th, .ad-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); text-align: right; }
.ad-table th:first-child { text-align: left; }
.ad-table thead th { color: var(--mute); white-space: nowrap; }
.ad-report-box { margin: 8px 0; text-align: left; }
.ad-report-box summary { padding: 12px 8px; cursor: pointer; color: var(--accent); font-weight: bold; }
.ad-cost-sources { display: flex; gap: 4px; flex-wrap: wrap; }
.ad-cost-sources button { padding: 4px 8px; font-size: 11px; }
#progress-body > button { width: 100%; text-align: left; }
#progress-body .row { flex-wrap: wrap; }
#progress-body .row > div { flex: 1; min-width: 140px; }
#progress-body .box .note { overflow-wrap: anywhere; }
/* [codex] 2026-10-22 v0.22 目標、委託與背包工具。 */
.px-form label { display: flex; flex-direction: column; gap: 4px; }
.px-form select, .px-form input:not([type="checkbox"]) { width: 100%; min-width: 0; }
.px-form input[type="checkbox"] { width: 24px; height: 24px; }
.px-search { display: flex; gap: 4px; flex-wrap: wrap; }
.px-search input { flex: 1; min-width: 100px; }
.px-equip-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.px-equip-filters select { flex: 1; min-width: 100px; }
.px-form select, .px-equip-filters select, #pursuits-body select { min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; }
.px-equip-actions { display: flex; flex-direction: column; flex: none; gap: 4px; max-width: 92px; }
#pursuits-body { overflow-wrap: anywhere; }
#pursuits-body > button { width: 100%; text-align: left; }
#pursuits-body .box > button { margin: 4px; }
#pursuits-body select { max-width: 100%; }
#pursuits-body .tags .missing { opacity: .45; }
.px-frame-preview { display: inline-flex; padding: 4px; border-radius: 999px; }
[data-frame="qinglong"] { outline: 3px double var(--fac-qinglong); outline-offset: 1px; }
[data-frame="baihu"] { outline: 3px double var(--fac-baihu); outline-offset: 1px; }
[data-frame="zhuque"] { outline: 3px double var(--fac-zhuque); outline-offset: 1px; }
[data-frame="xuanwu"] { outline: 3px double var(--fac-xuanwu); outline-offset: 1px; }
[data-frame="xian"] { outline: 3px double var(--fac-xian); outline-offset: 1px; }
[data-frame="mo"] { outline: 3px double var(--fac-mo); outline-offset: 1px; }

/* [codex] 2026-10-22 v0.23 便利中心與唯讀回放。 */
#comfort-body > button { width: 100%; min-height: 44px; margin-bottom: 8px; }
#comfort-body .box { margin-bottom: 8px; }
#comfort-body .box button { min-height: 44px; margin: 4px; }
#comfort-body select { min-height: 44px; max-width: 100%; font-size: 15px; }
.cx-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-controls button { flex: 1; min-height: 44px; }
.cx-replay-field { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-replay-field .box { padding: 8px; }
.cx-replay-field progress { width: 100%; }
.cx-replay-field .note { font-size: 11px; }
.cx-replay-events { max-height: 240px; overflow-y: auto; }
.cx-challenge-info { white-space: normal; }

#comfort-body label { display: grid; gap: 8px; }
#comfort-body label select { width: 100%; }
#comfort-body .cx-controls button { margin: 0; }

/* [codex] 2026-10-22 v0.24 週常與藍圖、連線狀態。 */
.ev-connection { min-height: 44px; font-size: 11px; width: 100%; }
.update-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 80; min-height: 44px; padding-top: calc(8px + env(safe-area-inset-top)); border: 0; border-radius: 0; background: var(--accent); color: var(--surface); font-weight: 700; } /* 蓋在所有面板 / 對白 / 結算之上:開著什麼都按得到 */
.update-bar[hidden] { display: none; }
#evolution-body { display: flex; flex-direction: column; gap: 8px; }
#evolution-body button, #evolution-body select { min-height: 44px; }
#evolution-body .box button { margin-top: 8px; }
#evolution-body label { display: grid; gap: 8px; }
#evolution-body select { width: 100%; font-size: 15px; }
.ev-layout { position: relative; width: 100%; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; }
.ev-layout-bld { position: absolute; border: 1px solid var(--accent); background: var(--surface); font-size: 11px; overflow: hidden; text-align: center; }

.ev-layout { background-image: linear-gradient(to right, var(--border) 1px, transparent 1px), linear-gradient(to bottom, var(--border) 1px, transparent 1px); background-size: calc(100% / var(--ev-land)) calc(100% / var(--ev-land)); }
.ev-layout-yard { position: absolute; top: 0; left: 0; border: 1px dashed var(--gold); color: var(--gold-ink); font-size: 11px; overflow: hidden; }

button.busy::after { content: ''; display: inline-block; width: 1em; height: 1em; margin-left: .5em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; animation: cc-busy 1s linear infinite; }
@keyframes cc-busy { to { transform: rotate(360deg); } }
.result-unlock { font-size: 20px; font-weight: 700; padding: 8px; border: 1px solid var(--gold); color: var(--gold-ink); background: var(--surface-2); border-radius: 8px; }
#game .shell-result { align-items: flex-start; }
#game .sr-box { margin-block: auto; flex-shrink: 0; }
#game .sr-hero-v { color: var(--gold-ink); }

.signin-calendar { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.signin-calendar .box { display: flex; flex-direction: column; gap: 4px; padding: 8px; margin: 0; }

.sheet button:disabled[data-disabled-reason]:not([data-disabled-reason=""])::after { content: attr(data-disabled-reason); display: block; white-space: normal; font-size: 11px; font-weight: normal; }
#toast.milestone { font-size: 20px; border: 2px solid var(--gold); }

.daily-outlook { font-size: 11px; margin: 0; padding: 2px 8px; color: var(--mute); text-align: center; }

.wh-top[data-collapsed="true"] { position: relative; padding-right: 28px; }
.wh-top[data-collapsed="true"]::after { content: "▾"; position: absolute; right: 8px; top: 4px; }
.source-hint { position: absolute; top: 100px; left: 16px; right: 16px; z-index: 71; background: var(--surface); border: 1px solid var(--gold); border-radius: 14px; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.source-hint[hidden] { display: none; }
#hud-avatar.ready::after { content: ""; position: absolute; right: 0; top: 0; width: 8px; height: 8px; border-radius: 999px; background: var(--danger); }
#center-body > button { text-align: left; display: flex; flex-direction: column; gap: 4px; }

.milestone-card { position: absolute; top: 100px; left: 16px; right: 16px; z-index: 72; background: var(--surface); border: 2px solid var(--gold); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.milestone-card[hidden] { display: none; }
.milestone-card h3 { font-size: 20px; margin: 0 0 8px; color: var(--gold-ink); }
.milestone-card ul { padding-left: 20px; font-size: 13px; }
/* [codex] 2026-11-15 第七輪：第一屏操作、等待與圖示。 */
.sheet-content:has(> .panel-layout) { overflow: hidden; }
.panel-layout { display: flex !important; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; gap: 8px; }
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.panel-return { flex: 0 0 auto; align-self: flex-start; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; padding: 8px 0; border-top: 1px solid var(--border); background: var(--surface); }
.panel-actions > button { flex: 1; min-height: 44px; font-size: 13px; }
#spirit-body .panel-actions > button { min-height: 72px; }
.panel-actions .busy { min-width: 88px; }
.panel-actions button::after { max-width: 100%; }
.busy { position: relative; cursor: wait; }
button.busy > * { visibility: hidden; }
button.busy { color: transparent !important; }
button.busy::after { content: attr(data-busy-text); position: absolute; inset: 0; display: grid; place-content: center; padding-left: 20px; color: var(--text); font-size: 13px; }
button.busy::before { content: ''; position: absolute; left: 8px; top: calc(50% - 7px); width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--text); border-radius: 999px; animation: busy-spin .7s linear infinite; }
button.busy:disabled::after { content: attr(data-busy-text) !important; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
.star-icon { display: inline-block; width: 14px; height: 14px; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 35%); background: var(--border); }
.star-icon.lit { background: var(--rar-5); }
.pips { display: inline-flex; gap: 2px; }
.sp-summary { display: flex; gap: 8px; justify-content: space-between; padding: 8px; border: 2px solid var(--rar-3); border-radius: 8px; }
.r1 { --grade: var(--border); }
.r2 { --grade: var(--accent); }
.r3 { --grade: var(--rar-3); }
.r4 { --grade: var(--rar-4); }
.r5 { --grade: var(--rar-5); }
.sp-card, .rv-card.open, .codex-card, .log-row, .eq-slot, .eq-pick > .row, .tm-slot.filled, [data-equip], .sp-summary { border: 2px solid var(--grade, var(--border)); background-image: linear-gradient(135deg, color-mix(in srgb, var(--grade, var(--surface)) 14%, transparent), transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--grade, var(--border)) 30%, transparent); }
.cooldown-ring { display: inline-block; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 999px; background: conic-gradient(var(--border) var(--cd), var(--accent) 0); mask: radial-gradient(transparent 48%, var(--text) 52%); }
.cd-button { position: relative; }
.cd-button > .cooldown-ring { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 8px; mask: none; opacity: .55; pointer-events: none; background: conic-gradient(var(--reveal-bg) var(--cd), transparent 0); }
.nav-count { width: auto !important; height: auto !important; min-width: 18px; padding: 1px 4px; border-radius: 999px; color: var(--surface); font-size: 11px; line-height: 16px; }
.station-slots, .tal-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.station-slots button, .tal-slots button { min-height: 60px; }
#daily-outlook { padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 13px; }
#daily-outlook b, #daily-outlook small { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rar { display: inline-block; width: 14px; height: 14px; border-radius: 8px; background: var(--grade); }
#game .sp-card, #game .rv-card.open, #game .codex-card, #game .log-row, #game .eq-slot, #game .eq-pick > .row, #game .tm-slot.filled, #game [data-equip], #game .sp-summary { border: 2px solid var(--grade, var(--border)); background-image: linear-gradient(135deg, color-mix(in srgb, var(--grade, var(--surface)) 14%, transparent), transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--grade, var(--border)) 30%, transparent); }
[data-ware] { flex-wrap: wrap; }
[data-ware] > div { min-width: 140px; }
[data-ware] > button { flex: 1; }
.currency-reward { display: inline-flex; gap: 4px; align-items: center; margin-right: 8px; }
.result-unlock.result-feature { font-size: 13px; line-height: 1.4; margin: 4px 0; padding: 6px; }
.wh-btn:disabled[data-disabled-reason]:not([data-disabled-reason=""]):not(.busy)::after { content: attr(data-disabled-reason); display: block; white-space: normal; font-size: 11px; font-weight: normal; }
