/* css/platform.css?v=6 */
/* js/platform.js (請先關閉上一個分頁) and js/account.js (連線中斷 / 資料同步): full-screen notices over everything */
.ts-modal { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 10, 20, .82); padding: 16px; }
.ts-modal-box { max-width: 380px; background: #1d2236; color: #eef; border: 1px solid #556; border-radius: 12px; padding: 20px 22px;
  text-align: center; font: 15px/1.6 "Microsoft JhengHei", "PingFang TC", sans-serif; box-shadow: 0 8px 30px #000a; }
.ts-modal-box b { display: block; font-size: 17px; }
.ts-modal-box p { margin: 10px 0 0; }
.ts-modal-box .sub { color: #aab3d0; font-size: 13px; }
.ts-modal-box button { margin-top: 16px; font: inherit; padding: 8px 18px; border-radius: 8px; border: 0; background: #4a7cff; color: #fff; cursor: pointer; }
.ts-modal-box button:focus-visible { outline: 2px solid #9fc0ff; outline-offset: 2px; }

/* pictures of the page are not dragged out (js/platform.js does the same for browsers without this property) */
img { -webkit-user-drag: none; }

/* Space in an NPC dialog with several choices: the choices light up once (game.js dialogNext) */
#dlg-actions.dlg-pick button:not(.alt) { animation: dlg-pick .6s ease-out; }
/* 可下拉提示 (js/scrollhint.js, 2026-11-28): a translucent blinking down arrow at the bottom middle of a box that still
   scrolls further down; never takes a click */
.sch-arrow { position: absolute; z-index: 30; width: 24px; height: 16px; margin: -21px 0 0 -12px; pointer-events: none;
  color: #34406e; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff); animation: sch-blink 1.1s ease-in-out infinite; }
.sch-arrow.sch-fixed { position: fixed; z-index: 95; }
.sch-arrow svg { display: block; }
@keyframes sch-blink { 0%, 100% { opacity: .2; transform: translateY(-3px); } 50% { opacity: .75; transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) { .sch-arrow { animation: none; opacity: .5; } }
/* a hand-in on its way to the server (js/quests.js handIn): the buttons wait, dimmed — the cursor stays as it was
   (2026-11-28, user: 「點交付任務的時候 鼠標會變成自身電腦的鼠標」 — `cursor: progress` was the system's spinner) */
#dlg-actions.dlg-wait button { opacity: .55; }
/* 省電 (設定 › 畫面更新 省電; js/platform.js saveClass, 2026-12-01): the endless decorative animations that stay on screen
   while playing are stopped — their look stays (green 自動 button, the glow's colours), only the movement goes */
html.ts-save .auto.on, html.ts-save #angel, html.ts-save .money .fortune.on, html.ts-save #dig-mode::before,
html.ts-save .ap-tab i, html.ts-save .ap-state.on i, html.ts-save .sch-arrow { animation: none; }
html.ts-save .sch-arrow { opacity: .5; }
@keyframes dlg-pick { 0% { box-shadow: 0 0 0 0 #ffd84a; } 40% { box-shadow: 0 0 0 4px #ffd84a; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* css/style.css?v=14 */
:root {
  --panel: rgba(255, 255, 255, .92);
  --panel-edge: #b9c3ea;
  --ink: #3b3f63;
  --sub: #8a8fae;
  --hp: #ec3b3b;
  --mp: #33b7ef;
  --gold: #f2b21b;
  --accent: #5a7bf0;
  --shadow: 0 2px 6px rgba(20, 30, 70, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1d2a; }
body { font: 12px/1.3 "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif; color: var(--ink); user-select: none; }
button { font: inherit; cursor: pointer; }
#game { position: fixed; inset: 0; overflow: hidden; }
/* the client's own map cursor (tools/cursors.py, data\cursor\cursor002.nri): point_release, the white glove; while the
   button is held, point_press. Over NPCs, drops, doors and monsters js/cursor.js puts the client's others inline. */
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: url("../assets/cursor/c2_018.png") 5 5, default; image-rendering: auto; }
#world:active { cursor: url("../assets/cursor/c2_048.png") 5 5, default; }
/* …and the game's own arrow over the rest of the page — dialogs, windows, the tracker, the HUD (2026-11-28, user video:
   「原本是遊戲鼠標 一到任務上變成自己的鼠標」, then 「要用跟手動釋放技能一樣的滑鼠樣式 只是沒有綠色漩渦」): ui_arrow.png is
   the arrow of the skill-aim cursor c2_088 (skills.css cast-arm) with the green swirl cut away, the same hot spot 1 1.
   `:not(#world)` both leaves the map's own cursors alone (glove / cast / dig / js/cursor.js) and lifts this rule above
   the ~200 `cursor: pointer` / `move` rules of the UI without !important (inline cursors set by scripts — dragging —
   still win). Text fields keep the text caret. */
html, body { cursor: url("../assets/cursor/ui_arrow.png") 1 1, default; }
body *:not(#world):not(input):not(textarea):not(select):not([contenteditable="true"]) { cursor: url("../assets/cursor/ui_arrow.png") 1 1, default; }
.hud { position: absolute; z-index: 5; }
.hidden { display: none !important; }
.panel { background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 6px; box-shadow: var(--shadow); }

/* loading */
#loading { position: absolute; inset: 0; z-index: 50; background: #000 url("../assets/misc/loading.jpg?v=5") center/cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 6vh; transition: opacity .6s; }
#loading.done { opacity: 0; pointer-events: none; }
.load-bar { width: min(520px, 80vw); height: 14px; border-radius: 8px; background: rgba(0,0,0,.55); border: 2px solid #fff; overflow: hidden; }
#load-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd25a, #ff8a3d); transition: width .2s; }
#load-text { margin-top: 8px; color: #fff; text-shadow: 0 1px 3px #000; font-weight: bold; }

/* status */
#status { left: 12px; top: 10px; display: flex; align-items: flex-start; gap: 6px; }
.portrait { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow); background: #f2e7ff; overflow: hidden; }
.portrait .face { position: absolute; inset: 0; background: no-repeat; background-size: 140px auto; background-position: center -34px; image-rendering: pixelated; }
.badge { position: absolute; font-weight: bold; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 15px; }
.badge.lv { left: 50%; bottom: -2px; transform: translateX(-50%); background: #3d8cf3; border: 1.5px solid #fff; }
#status .lv { position: absolute; }
.badge.tm { left: 4px; top: 64px; background: #2f5fc8; border: 1.5px solid #fff; }
.bars { padding-top: 2px; }
.name { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; font-size: 13px; margin-bottom: 2px; }
.bar { position: relative; width: 190px; height: 12px; border-radius: 6px; background: rgba(30, 30, 50, .6); border: 1.5px solid #fff; margin-bottom: 3px; overflow: hidden; }
.bar i { position: absolute; inset: 0; transform-origin: left; transition: transform .3s; }
.bar.hp i { background: linear-gradient(#ff7676, var(--hp)); }
.bar.mp i { background: linear-gradient(#8fe0ff, var(--mp)); }
.bar span { position: relative; display: block; text-align: center; color: #fff; font-size: 10px; line-height: 9px; text-shadow: 0 0 2px #000; }
.money { color: #fff; text-shadow: 0 0 2px #000; display: flex; align-items: center; gap: 4px; font-size: 11px; }
.coin { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3a0, var(--gold)); display: inline-block; }
.star { color: #fff; }

/* side buttons */
#side-buttons { left: 52px; top: 110px; display: flex; flex-direction: column; gap: 8px; }
.round { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; background: rgba(60, 70, 110, .55); box-shadow: var(--shadow); display: grid; place-items: center; padding: 0; color: #fff; }
.round img { max-width: 26px; max-height: 26px; }
.round.small { width: 28px; height: 28px; font-size: 14px; margin-left: 3px; }
#bgm-btn.on { background: var(--accent); }

/* tracker */
#tracker { left: 102px; top: 108px; width: 260px; padding: 6px 8px; }
.trk-head { display: flex; gap: 6px; align-items: center; border-bottom: 1px solid #dfe3f5; padding-bottom: 5px; }
.trk-head img { width: 22px; }
.next { color: #f08a24; font-weight: bold; }
.sub { color: var(--sub); font-size: 11px; }
.trk-ep { margin: 5px 0 3px; font-weight: bold; }
.trk-ep span { color: var(--accent); margin-left: 12px; }
.trk-item { display: flex; gap: 6px; align-items: center; background: #eef1ff; border-left: 3px solid var(--accent); padding: 4px 6px; border-radius: 3px; cursor: pointer; }
.trk-item img { width: 22px; }
.trk-item.done b::after { content: " ✔"; color: #3bb26b; }

/* notice */
#notice { left: 50%; top: 18px; transform: translateX(-50%); background: rgba(255, 255, 255, .9); border: 2px solid var(--panel-edge); border-radius: 18px; padding: 5px 16px 5px 6px; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); font-size: 13px; max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .4s; }
#notice .dot { width: 20px; height: 20px; border-radius: 50%; background: #2f90ef; color: #fff; display: grid; place-items: center; font-size: 11px; }

/* menu */
#menu { right: 14px; top: 8px; display: flex; gap: 4px; }
#menu button { position: relative; width: 52px; height: 52px; background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-shadow: 0 0 2px #000, 0 0 3px #000; font-size: 11px; padding: 0; }
#menu button img { max-height: 32px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); transition: transform .12s; }
#menu button:hover img { transform: translateY(-2px) scale(1.08); }
#menu .gold { color: var(--gold); }
#menu .chev { font-size: 26px; width: 22px; justify-content: center; }
#menu .hamb { font-size: 26px; line-height: 30px; }
.pip { position: absolute; top: 0; right: 6px; min-width: 14px; height: 14px; border-radius: 7px; background: #fff; color: #222; font-style: normal; font-size: 10px; line-height: 14px; text-shadow: none; text-align: center; border: 1px solid #888; }
.pip.red { background: #f44; border-color: #fff; min-width: 9px; height: 9px; right: 10px; }

/* minimap */
#minimap { right: 14px; top: 66px; width: 250px; border: 3px solid #fff; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.mm-head { display: flex; align-items: center; gap: 6px; background: #f5f7ff; padding: 2px 4px; font-size: 11px; }
.mm-head span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#clock { background: #3e8ff0; color: #fff; padding: 0 6px; border-radius: 8px; font-weight: bold; }
#mm-fold, #mm-tp { border: 0; background: none; padding: 0 2px; }
#mm-tp { font-size: 14px; color: var(--accent); font-weight: bold; }
.tp-group { margin: 8px 0 2px; font-weight: bold; color: var(--accent); }
.qrow.tp { cursor: pointer; }
/* 2026-11-26 傳送 (T) window: the note + group tabs stay put, only the rows scroll (js/game.js tpTabbed) */
#win-teleport > .win-body { display: flex; flex-direction: column; overflow: hidden; }
#win-teleport .tp-head { flex: none; display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
#win-teleport .tp-head > p { margin: 0; }
#win-teleport .tp-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.qrow.tp:hover { background: #eef1ff; }
.qrow.tp.here { background: #fff4e3; }
.chip.tp-lv { background: #2f6fb3; color: #fff; font-weight: bold; }
/* 2026-11-29 傳送費: small, on the name line (the row keeps its height) */
.qrow.tp .tp-fee { font-size: 10px; color: #a0761a; font-weight: bold; white-space: nowrap; }
.qrow.tp .tp-fee.short { color: #d03a3a; }
.tp-thumb { width: 44px !important; height: 34px; object-fit: cover; border-radius: 3px; border: 1px solid #ccd; }
.mm-body { position: relative; height: 200px; }
#minimap.folded .mm-body { display: none; }
#mm { width: 100%; height: 100%; display: block; background: #2a4d6e; cursor: crosshair; }
.mm-btn { position: absolute; width: 28px; height: 28px; border-radius: 5px; border: 2px solid #fff; background: rgba(40, 50, 80, .6); color: #fff; font-size: 15px; display: grid; place-items: center; padding: 0; }
.mm-btn.tl { left: 6px; top: 6px; }
.mm-btn.bl { left: 6px; bottom: 6px; }
.mm-btn.br1 { right: 70px; bottom: 6px; }
.mm-btn.br2 { right: 38px; bottom: 6px; }
.mm-btn.br3 { right: 6px; bottom: 6px; background: rgba(20, 20, 20, .75); }

/* quick slots */
#quick { right: 14px; bottom: 14px; width: 290px; height: 380px; }
#quick kbd { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font: 9px/12px system-ui; background: #fff; color: #555; padding: 0 3px; border-radius: 3px; border: 1px solid #bbb; }
.qs { position: absolute; color: #fff; font-size: 20px; border: 2px solid #fff; background: rgba(180, 190, 210, .55); box-shadow: var(--shadow); display: grid; place-items: center; padding: 0; }
.qs img { max-width: 30px; max-height: 30px; }
.qs small { position: absolute; right: 2px; bottom: 0; font-size: 10px; background: rgba(0,0,0,.55); padding: 0 3px; border-radius: 3px; }
.qs:active, .sk:active, .attack:active { transform: scale(.94); }
.qs.cool::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: cool 1.2s linear forwards; border-radius: inherit; }
@keyframes cool { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(100% 0 0 0); } }
.row.f58 { position: absolute; right: 0; top: 0; display: flex; gap: 14px; }
.qs.round { position: relative; width: 42px; height: 42px; border-radius: 50%; }
.qs.sq { width: 52px; height: 52px; border-radius: 6px; }
#F4 { right: 140px; top: 70px; }
#F3 { right: 212px; top: 100px; }
#F2 { right: 212px; top: 168px; }
.sk { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; background: radial-gradient(circle at 40% 35%, #cfd8ef, #7c8db8); box-shadow: var(--shadow); padding: 0; display: grid; place-items: center; }
.sk img { max-width: 32px; filter: grayscale(.2); }
.sk.s1 { right: 8px; top: 140px; }
.sk.s2 { right: 8px; top: 200px; }
.sk.s3 { right: 58px; top: 105px; }
.attack { position: absolute; right: 70px; top: 165px; width: 96px; height: 96px; border-radius: 50%; border: 4px solid #fff; background: radial-gradient(circle at 40% 30%, #ffffff, #c6cbe0 60%, #8d96b8); box-shadow: 0 3px 10px rgba(0,0,0,.45); padding: 0; display: grid; place-items: center; }
.attack img { width: 56px; }
.auto { position: absolute; right: 168px; top: 245px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: #8d98b9; color: #fff; font-weight: bold; font-size: 10px; box-shadow: var(--shadow); padding: 0; }
.auto.on { background: #3fbf72; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(63, 191, 114, .25); } }
#angel { position: absolute; right: 24px; top: 262px; width: 34px; animation: float 2.4s ease-in-out infinite; cursor: pointer; }
@keyframes float { 50% { transform: translateY(-6px); } }
#angel-tip { position: absolute; right: 62px; top: 300px; background: #1d7ad8; color: #fff; border: 2px solid #fff; border-radius: 4px; padding: 3px 8px; white-space: nowrap; font-size: 11px; box-shadow: var(--shadow); }
.page { position: absolute; right: 0; bottom: 6px; display: flex; gap: 4px; align-items: center; color: #fff; }
.page span { background: rgba(0,0,0,.4); border-radius: 50%; width: 16px; height: 16px; display: grid; place-items: center; font-size: 10px; }
.page button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(60,70,110,.6); color: #fff; font-size: 16px; padding: 0; }

/* bottom-left */
#exp { left: 12px; bottom: 10px; background: #fff; border-radius: 12px; padding: 3px 10px; display: flex; gap: 12px; box-shadow: var(--shadow); font-size: 11px; color: #777; }
#exp b { color: #333; }
#buffs { left: 220px; bottom: 12px; display: flex; gap: 4px; align-items: center; color: #fff; text-shadow: 0 0 2px #000; }
.buff { font-weight: bold; font-size: 10px; padding: 0 4px; border-radius: 3px; color: #000; text-shadow: none; }
.buff.exp { background: #47e04f; }
.buff.tmb { background: #1f2a6a; color: #fff; }
#chatlog { left: 14px; bottom: 44px; width: 420px; max-height: 150px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; pointer-events: none; }
.msg { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; font-size: 12px; animation: fadein .3s; }
.msg .tag { background: #9be14b; color: #234; border-radius: 9px; padding: 0 6px; font-size: 10px; margin-right: 4px; text-shadow: none; font-weight: bold; }
.msg .tag.me { background: #8ad2ff; }
.msg .tag.npc { background: #ffc66b; }
.msg.sys { color: #ffe680; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }
#chat-btn { left: 444px; bottom: 44px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: rgba(40,40,60,.65); color: #fff; padding: 0; }
#chat-input { left: 14px; bottom: 40px; width: 420px; height: 28px; border-radius: 14px; border: 2px solid #fff; background: rgba(20, 24, 40, .8); color: #fff; padding: 0 12px; outline: none; display: none; }
#chat-input.show { display: block; }
#chat-input.show ~ #chatlog { bottom: 74px; }

/* windows */
.win { position: absolute; z-index: 20; width: 340px; background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.win-head { cursor: move; display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: linear-gradient(#e8edff, #cfd8fb); border-radius: 6px 6px 0 0; font-weight: bold; }
.win-head img { height: 22px; }
.win-head span { flex: 1; }
.win-head button { border: 0; background: #ff6b6b; color: #fff; border-radius: 4px; width: 20px; height: 20px; padding: 0; }
.win-body { padding: 10px; max-height: 60vh; overflow: auto; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.slot { aspect-ratio: 1; background: #eef1fb; border: 1px solid #c9d0ec; border-radius: 4px; display: grid; place-items: center; position: relative; }
.slot img { max-width: 80%; max-height: 80%; }
.slot small { position: absolute; right: 2px; bottom: 0; font-size: 9px; }
.slot:hover { border-color: var(--accent); background: #fff; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.tabs b { padding: 2px 10px; border-radius: 10px; background: #e3e7f7; font-weight: normal; }
.tabs b.on { background: var(--accent); color: #fff; }
.qrow { display: flex; gap: 8px; padding: 6px; border-bottom: 1px dashed #d6dbef; align-items: center; }
.qrow img { width: 24px; }
.qrow .st { margin-left: auto; font-size: 11px; color: var(--accent); }
.skrow { display: flex; gap: 8px; align-items: center; padding: 5px; border-bottom: 1px dashed #d6dbef; }
.skrow img { width: 32px; }
.skrow .lvl { margin-left: auto; color: #f08a24; font-weight: bold; }
.chargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.charcell { position: relative; height: 84px; padding: 0; border: 2px solid #d3daf3; border-radius: 6px; background: linear-gradient(#f7f9ff, #e4e9fb); overflow: hidden; }
.charcell img { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); height: 80px; }
.charcell span { position: absolute; left: 3px; right: 3px; top: 1px; z-index: 1; font-size: 10px; line-height: 1.15; text-align: left; color: var(--sub);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }   /* a job's name (js/jobnames.js): may take two lines over the picture */
.charcell:hover { border-color: var(--accent); }
.charcell.on { border-color: #f08a24; box-shadow: 0 0 0 2px rgba(240, 138, 36, .35); }
.portrait { cursor: pointer; }
.statgrid { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }

/* dialog */
#dialog { position: absolute; z-index: 30; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(720px, 94vw); height: 190px; }
#dlg-illu { position: absolute; left: -40px; bottom: 0; height: 300px; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.dlg-box { position: absolute; left: 190px; right: 0; bottom: 0; height: 160px; background: rgba(255,255,255,.96); border: 3px solid #9fb0ec; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.4); padding: 12px 16px; display: flex; flex-direction: column; }
.dlg-name { position: absolute; top: -14px; left: 14px; background: var(--accent); color: #fff; padding: 2px 14px; border-radius: 12px; font-weight: bold; border: 2px solid #fff; }
/* 2026-11-25 (user: 所有NPC對話框新增X): every NPC dialog can be closed, also the pages that offer no 離開 */
.dlg-x { position: absolute; top: -13px; right: -11px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid #fff;
  background: #e0607a; color: #fff; font-size: 15px; font-weight: bold; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 2; }
.dlg-x:hover { background: #f0738c; }
.dlg-text { flex: 1; font-size: 14px; line-height: 1.6; margin-top: 6px; white-space: pre-wrap; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dlg-actions button { border: 2px solid #fff; background: var(--accent); color: #fff; border-radius: 14px; padding: 4px 16px; box-shadow: var(--shadow); }
.dlg-actions button.alt { background: #fff; color: #3a4170; border-color: #c2c9e4; }   /* was grey with white text (2026-11-26) */
/* the server's dialogs are long and offer up to a dozen choices: let the box grow upwards and scroll */
.dlg-box { height: auto; min-height: 160px; max-height: 62vh; }
.dlg-text { overflow: auto; min-height: 54px; user-select: text; }
.dlg-actions { flex-wrap: wrap; margin-top: 8px; max-height: 30vh; overflow: auto; padding: 2px; }
.dlg-actions button { text-align: left; max-width: 100%; }

/* NPC windows: shop / exchange / compound lists and the NPC search */
.win .search { width: 100%; padding: 6px 8px; margin-bottom: 4px; border: 1px solid #c9d0ec; border-radius: 6px; font: inherit; color: var(--ink); background: #fff; outline: none; }
.win .search:focus { border-color: var(--accent); }
.qrow.pick { cursor: pointer; }
.qrow.pick:hover { background: #eef1ff; }
.qrow.pick.off { opacity: .55; }   /* (結婚禮物: a 禮服 / 彩虹戒指 whose 商城 ticket is not held) */
.qrow .st { white-space: nowrap; padding-left: 6px; }
.chip { display: inline-block; background: #e3e7f7; border-radius: 9px; padding: 0 7px; font-size: 11px; margin-left: 2px; white-space: nowrap; }

/* full map */
#fullmap { position: absolute; inset: 0; z-index: 40; background: rgba(10, 14, 30, .7); display: grid; place-items: center; }
.fm-inner { position: relative; border: 4px solid #fff; border-radius: 6px; box-shadow: 0 8px 30px #000; background: #fff; }
#fm { display: block; max-width: 86vw; max-height: 80vh; }
.fm-title { position: absolute; top: -34px; left: 0; right: 0; color: #fff; font-size: 16px; font-weight: bold; display: flex; justify-content: space-between; }
.fm-title button { border: 0; background: #ff6b6b; color: #fff; border-radius: 4px; }

/* short screens: keep the quick-slot cluster clear of the minimap */
@media (max-height: 800px) {
  #quick { transform: scale(.82); transform-origin: right bottom; }
  .mm-body { height: 160px; }
}
@media (max-height: 640px) {
  #quick { transform: scale(.7); }
  .mm-body { height: 130px; }
}

/* small screens */
@media (max-width: 900px) {
  #tracker, #notice, #buffs, #angel-tip { display: none; }
  #minimap { width: 170px; }
  .mm-body { height: 130px; }
  #quick { transform: scale(.75); transform-origin: right bottom; }
  #menu button { width: 40px; }
  #chatlog, #chat-input { width: calc(100vw - 260px); }
  #chat-btn { display: none; }
}
@media (max-width: 620px) {
  .bar { width: 110px; }
  .money { display: none; }
  #menu { gap: 0; right: 6px; }
  #menu button { width: 34px; height: 40px; }
  #menu button span, #menu .chev { display: none; }
  #menu button img { max-height: 26px; }
  #minimap { top: 118px; width: 150px; }
  .mm-body { height: 110px; }
  .mm-btn { width: 22px; height: 22px; font-size: 12px; }
  .mm-btn.br1 { right: 54px; } .mm-btn.br2 { right: 30px; }
  #side-buttons { left: 12px; top: 96px; }
  #quick { transform: scale(.62); }
  #exp { font-size: 10px; }
  #chatlog, #chat-input { width: calc(100vw - 30px); bottom: 300px; }
  .dlg-box { left: 0; }
  #dlg-illu { height: 160px; left: auto; right: 0; bottom: 150px; }
}

/* css/base.css?v=2 */
/* 全遊戲按鈕／欄位的底樣式（2026-11-26，user: 「不希望遊戲內有像這樣陽春的按紐 重新檢查 排版設計所有的」）。
   很多視窗的按鈕只設了 padding / 字級，外觀落回瀏覽器預設的灰按鈕（角色屬性 › 守護者、公會、設定…）。
   這裡用 :where() 包起來 = 權重 0：任何模組自己寫的按鈕規則都會蓋過它，只有「沒寫外觀」的按鈕才吃到這一套。
   只用 background-color（不用漸層），模組只設 background-color 的按鈕不會被蓋一層圖；文字維持深色，
   只改底色不改字色的按鈕也不會變成淺底白字。
   不加 box-shadow / 滑過底色：透明的圖示按鈕會被描出一圈框（user: 「上方選單列不要加透明按紐邊框」）。視窗裡的立體感
   由 css/bevel.css 負責。HUD（.hud 底下：上方選單列、左側按鈕、追蹤、小地圖、快捷列、攻擊鍵、聊天鈕）與 🔒 整個不套。
   變化：.alt 次要（白底）、.danger 紅、.good 綠、.gold 金、.mini 小；:disabled 灰掉。 */
:root { --bt-ink: #24306c; --bt-bg: #e6ecff; --bt-edge: #8e9dd8; }
:where(button:not(.hud *, #lock-btn)) {
  font: inherit; font-weight: 700; line-height: 1.25; color: var(--bt-ink);
  background-color: var(--bt-bg); border: 1px solid var(--bt-edge); border-radius: 7px; padding: 3px 10px;
  cursor: pointer; white-space: nowrap;
}
:where(button.alt:not(.hud *)) { background-color: #fff; color: #3a4170; border-color: #c2c9e4; }
:where(button.danger:not(.hud *)) { background-color: #fff2f2; color: #b52828; border-color: #e6a3a3; }
:where(button.good:not(.hud *)) { background-color: #1f9e58; color: #fff; border-color: #127a41; }
:where(button.gold:not(.hud *)) { background-color: #f1b52e; color: #3a2600; border-color: #b67f0c; }
:where(button.mini:not(.hud *)) { padding: 1px 8px; font-size: 12px; border-radius: 6px; }
:where(button:disabled:not(.hud *)) { background-color: #eceef6; color: #9da2bb; border-color: #d4d8e8; cursor: default; }

/* 下拉選單與文字欄位：同一套邊框（HUD 的聊天輸入列不套） */
:where(select:not(.hud *)) {
  font: inherit; color: var(--bt-ink); background-color: #fff; border: 1px solid #aab4dc; border-radius: 6px; padding: 3px 6px;
  cursor: pointer;
}
:where(:is(input:not([type]), input[type=text], input[type=number], input[type=search], input[type=password], input[type=email], input[type=tel], textarea):not(.hud *)) {
  font: inherit; color: var(--bt-ink); background-color: #fff; border: 1px solid #aab4dc; border-radius: 6px; padding: 3px 6px;
}
:where(:is(select, input, textarea):not(.hud *):focus) { outline: none; border-color: #5a7bf0; }
:where(input[type=checkbox], input[type=radio], input[type=range]) { accent-color: #4a6ae6; }

/* css/items.css?v=37 */
/* Item windows (js/items.js): bag, equipment, item details, encyclopedia, NPC shop, tooltip. */
.it-ic { image-rendering: pixelated; max-width: 32px; max-height: 32px; }
/* small picture before an item's name in text, lists, chips and chat (TSItems.ic / decorate) */
.ii { display: inline-block; width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin: -3px 3px -2px 0; image-rendering: pixelated; }
.chip .ii { width: 16px; height: 16px; margin: -2px 2px 0 0; }
#chatlog .ii { width: 18px; height: 18px; margin: -3px 2px -2px 1px; }
.it-noic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: #dfe3f5; color: var(--sub); font-style: normal; font-size: 11px; }
.slot.has { cursor: pointer; }
.slot.sel { border: 2px solid #f08a24; background: #fff6e0; box-shadow: 0 0 0 2px rgba(240, 138, 36, .25); }
.slot .it-ic { max-width: 86%; max-height: 86%; }
/* 不能穿的裝備 (js/items.js whyNot): grey cell, greyed picture; the tip says why */
.grid .slot.nowear, .grid .slot.nowear:hover { background: #8e939f; border-color: #6c717c; }
.grid .slot.nowear.sel { background: #8e939f; border-color: #f08a24; }
.slot.nowear img { filter: grayscale(.65) brightness(.85); }
/* 4 孔以上的裝備 (js/items.js holeCls → .h4): a red frame over the cell, while 設定 › 介面 has it on (body.hole-mark) */
.hole-mark .h4 { position: relative; }
.hole-mark .h4::after { content: ''; position: absolute; inset: 0; border: 2px solid #e02424; border-radius: inherit; box-shadow: 0 0 4px rgba(224, 36, 36, .55), inset 0 0 3px rgba(224, 36, 36, .35); pointer-events: none; }
#item-tip .tt-nowear { color: #ff8a8a; font-weight: 700; margin: 2px 0; }
/* 道具上鎖 (2026-12-04, js/items.js lkMark): a small gold padlock in the cell's top-right corner; the tip says what it stops */
.slot.lk { position: relative; }
/* 背包的搜尋／種類／排序 (js/items.js bagBody, 2026-12-04) */
.bag-tools { display: flex; gap: 4px; margin: 4px 0 6px; }
.bag-tools input { flex: 1 1 auto; min-width: 0; padding: 3px 7px; border: 1px solid #c9d0ec; border-radius: 6px; font-size: 12px; }
.bag-tools select { flex: 0 1 auto; min-width: 0; max-width: 34%; padding: 2px 4px; border: 1px solid #c9d0ec; border-radius: 6px; font-size: 12px; background: #fff; }
.bag-found { margin: -2px 0 6px; font-size: 11px; }
.bag-found a { margin-left: 8px; cursor: pointer; color: var(--accent, #4566e6); }
.slot .it-lk, .sv-cell .it-lk { position: absolute; right: 1px; top: 1px; width: 11px; height: 13px; pointer-events: none; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 13' shape-rendering='crispEdges'%3E%3Cpath d='M3 6V4a2.5 2.5 0 0 1 5 0v2' fill='none' stroke='%233a2400' stroke-width='3'/%3E%3Cpath d='M3 6V4a2.5 2.5 0 0 1 5 0v2' fill='none' stroke='%23ffd76e' stroke-width='1.4'/%3E%3Crect x='.5' y='5.5' width='10' height='7' rx='1' fill='%23ffc93c' stroke='%233a2400'/%3E%3Crect x='1.5' y='6.5' width='8' height='2' fill='%23fff1b0'/%3E%3Crect x='5' y='8.5' width='1' height='2.5' fill='%233a2400'/%3E%3C/svg%3E") center / contain no-repeat; }
#item-tip .tt-lock { color: #ffd76e; font-weight: 700; margin: 2px 0; }
.it-acts button.it-lockb { background: #fff7df; color: #6a4a00; border-color: #e8c25a; }
.it-acts button.it-unlock { background: #ffd76e; color: #3a2400; border-color: #fff; }
.slot small { font-size: 10px; font-weight: bold; color: var(--ink); text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.qrow .it-ic { width: auto; flex: 0 0 auto; }
.qrow > .it-ic, .qrow > .it-noic { margin: 0 2px; }
.qrow > div { min-width: 0; }

.it-tabs { flex-wrap: wrap; align-items: center; }
.it-tabs b { cursor: pointer; padding: 2px 8px; white-space: nowrap; }
.it-tabs b i { font-style: normal; font-size: 10px; margin-left: 3px; opacity: .75; }
.it-gold { margin-left: auto; }
.it-foot { display: flex; justify-content: space-between; margin: 8px 0 4px; }
.win a[data-show] { color: var(--accent); cursor: pointer; text-decoration: underline; }

/* equipment */
.eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin-bottom: 4px; }
.eq-cell { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 2px; border-radius: 6px; }
.eq-cell .slot { grid-row: 1 / 3; width: 38px; }
.eq-cell span { color: var(--sub); font-size: 11px; align-self: end; }
.eq-cell b, .eq-cell em { align-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.eq-cell em { color: #c3c8de; }
.eq-cell.has { cursor: pointer; }
.eq-cell.has:hover { background: #eef1ff; }
/* the equipment window, laid out as the client's: slots around the character, FASHION below, three buttons */
#win-equip { width: 292px; }
#win-equip .win-body { max-height: calc(100vh - 90px); }
.eq-doll { display: grid; grid-template-columns: repeat(4, 50px); grid-template-rows: repeat(5, 50px); gap: 8px; justify-content: center; padding: 8px;
  border-radius: 10px; background: linear-gradient(#f4f1ff, #e6ecfb); border: 1px solid #d6dcf3; }
.eq-slot { position: relative; width: 50px; height: 50px; padding: 0; display: grid; place-items: center; border-radius: 6px; border: 1px solid #c3cbe8;
  background: linear-gradient(#fbfbff, #e9edf9); box-shadow: inset 0 1px 2px rgba(255, 255, 255, .9), 0 1px 2px rgba(40, 50, 90, .15); color: #b7bdd6; }
.eq-slot span { font-size: 10px; line-height: 1.1; pointer-events: none; }
.eq-slot img { max-width: 40px; max-height: 40px; image-rendering: pixelated; pointer-events: none; }
.eq-slot.has { background: linear-gradient(#fff, #f1f3fc); border-color: #a9b4e3; cursor: pointer; }
.eq-slot:hover { border-color: var(--accent); }
.eq-slot.sel { border: 2px solid #f08a24; box-shadow: 0 0 0 2px rgba(240, 138, 36, .3); }
.eq-slot.drop { border: 2px solid #ffb020; background: #fff6e0; }
.eq-blank { width: 50px; height: 50px; border-radius: 6px; border: 1px dashed #d6dcf3; display: grid; place-items: center; color: #c9cee3; }
.eq-blank span { font-size: 10px; line-height: 1.1; }
.eq-chr { position: relative; border-radius: 8px; background: radial-gradient(ellipse at 50% 80%, #fff 0%, #f3eefe 60%, #e4e8fb 100%); border: 1px solid #d6dcf3; overflow: hidden; }
.eq-chr canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.eq-chr span { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 11px; color: var(--sub); }
.eq-fashion { margin-top: 8px; padding: 6px 8px 8px; border-radius: 10px; background: linear-gradient(#fff4f6, #f8eef6); border: 1px solid #f0d6e2; }
.eq-fl { font: italic bold 11px/14px Georgia, serif; letter-spacing: 1px; color: #e0709a; margin-bottom: 4px; }
.eq-frow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.eq-frow .eq-slot, .eq-frow .eq-blank { width: 100%; height: auto; aspect-ratio: 1; }
.eq-frow .eq-slot { border-color: #ecc8d8; background: linear-gradient(#fff, #fbf1f6); color: #d9b3c4; }
.eq-frow .eq-slot img { max-width: 30px; max-height: 30px; }
.eq-frow .eq-blank { border-color: #f0d6e2; }
.eq-selinfo { margin: 8px 2px 4px; min-height: 18px; font-size: 12px; }
.eq-btns { display: flex; gap: 6px; }
.eq-btns button { flex: 1; padding: 5px 0; border: 2px solid #fff; border-radius: 8px; background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.eq-btns button.alt { background: #fff; color: #3a4170; border-color: #c2c9e4; }
.eq-btns button[disabled] { background: #c5cadf; cursor: default; }
.eq-totbox { margin-top: 8px; }
.eq-totbox summary { cursor: pointer; color: var(--accent); font-weight: bold; }
@media (hover: none), (pointer: coarse) { .eq-doll { grid-template-columns: repeat(4, 54px); grid-template-rows: repeat(5, 54px); } .eq-slot, .eq-blank { width: 54px; height: 54px; } }

/* abilities, one per line (item window, equipment totals) */
.it-statbox { margin: 8px 0 2px; padding: 6px 8px; border: 1px solid #dfe3f5; border-radius: 8px; background: #f8f9ff; }
.it-stattab { width: 100%; border-collapse: collapse; font-size: 12px; }
.it-stattab th { font-weight: normal; color: var(--sub); font-size: 11px; text-align: right; padding: 0 6px 3px; border-bottom: 1px solid #dfe3f5; }
.it-stattab th:first-child, .it-stattab td:first-child { text-align: left; padding-left: 0; }
.it-stattab td { padding: 3px 6px; text-align: right; border-bottom: 1px dashed #e4e7f5; font-variant-numeric: tabular-nums; white-space: nowrap; }
.it-stattab tr:last-child td { border-bottom: 0; }
.it-stattab td:first-child { color: var(--ink); }
.it-stattab td.v, .it-stattab td.t { font-weight: bold; color: #23703f; }
/* 數值 (the piece's own number after its roll): plain black, no + (user 2026-11-23) */
.it-stattab td.v, .it-stattab td.v.neg { color: #000; }
.it-stattab td.b { color: #2f9e55; }
.it-stattab td.t { width: 64px; }
.it-stattab td.neg { color: #c0392b; }
.it-stattab tr.fx td.v { color: #2a7fc0; text-align: left; }
.eq-tot { max-width: 260px; }
.it-sock { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #dfe3f5; font-size: 12px; }
.it-sock .k { color: var(--sub); width: 3em; }
.it-kinds { align-items: flex-start; }
.it-kinds .k { line-height: 22px; }
.it-kind-list { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.it-kind-list .chip { color: #7a4fd0; }
.it-stattab td.c, .it-stattab th.c { color: #7a4fd0; }
.lg-b { color: #2f9e55; font-weight: bold; }
.lg-c { color: #7a4fd0; font-weight: bold; }
.it-sock-list { flex-basis: 100%; margin: 0; padding-left: calc(3em + 6px + 1.4em); display: flex; flex-direction: column; gap: 2px; }
.it-sock-list li { display: grid; grid-template-columns: 6em auto; color: var(--ink); }
.it-sock-list li::marker { color: var(--sub); font-size: 10px; }
.it-sock-list b { color: #7a4fd0; font-variant-numeric: tabular-nums; }
/* 成長組合 slots as cells (js/items.js sockCells): ability, the material's icon, value; hover / tap = the material box */
.it-sc-row { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: calc(3em + 6px); }
.it-sc { position: relative; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 2px; border: 1px solid #d8cff0; border-radius: 6px; background: #faf7ff; cursor: pointer; outline: none; }
.it-sc small { font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.it-sc-ic { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: #efe8ff; }
.it-sc-ic img { width: 32px; height: 32px; image-rendering: pixelated; }
.it-sc-ic i { font-style: normal; color: var(--sub); }
.it-sc b { color: #7a4fd0; font-variant-numeric: tabular-nums; font-size: 12px; }
.it-sc.empty { cursor: default; background: #f6f7fb; border-style: dashed; }
.it-sc.empty small { color: var(--sub); }
.it-sc-pop { display: none; }   /* the text; shown in #sc-pop (body level, so the window's scroll box does not cut it) */
.it-sc:hover, .it-sc.on { border-color: #7a4fd0; }
#sc-pop { position: fixed; z-index: 100000; white-space: nowrap; padding: 4px 8px; border-radius: 4px; background: rgba(20, 22, 34, .94); color: #fff; font-size: 12px; line-height: 1.5; pointer-events: none; }
#sc-pop em { display: block; font-style: normal; color: #ffe27a; }
.it-holes { display: inline-flex; gap: 3px; }
.it-holes i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #9aa3c4; background: #fff; box-sizing: border-box; }
.it-holes i.on { border-color: #7a4fd0; background: radial-gradient(circle at 35% 35%, #e3d2ff, #8a5ce0); }
/* the hover tooltip */
#item-tip .tt-stats { display: grid; grid-template-columns: auto auto auto auto; gap: 1px 6px; margin: 3px 0; font-variant-numeric: tabular-nums; }
#item-tip .tt-stats b { color: #fff; text-align: right; }
#item-tip .tt-stats i { font-style: normal; color: #8fe0a3; text-align: right; }
#item-tip .tt-stats u { text-decoration: none; color: #d2b0ff; text-align: right; }
/* a row with 成長組合 in it (2026-11-23, user: 有成長組合的那一行用別的顏色顯示 要看得清楚): bright gold, name and total */
#item-tip .tt-stats .cb { color: #ffd54a; font-weight: bold; }
#item-tip .tt-comb { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 0 10px; margin: 2px 0 2px 1em; font-variant-numeric: tabular-nums; }
#item-tip .tt-comb span { color: #b9c0e6; }
#item-tip .tt-comb b { color: #d2b0ff; text-align: right; }
#item-tip .tt-sock { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
#item-tip .tt-kinds { margin-top: 2px; color: #d2b0ff; }   /* what 成長組合 can add (Equip_Property) */
#item-tip .it-holes i { width: 10px; height: 10px; border-color: #b9c0e6; background: transparent; }
#item-tip .it-holes i.on { border-color: #c9a2ff; background: #a87cf0; }

/* item details */
#win-item { width: 380px; }
.it-top { display: flex; gap: 10px; align-items: flex-start; }
.it-illu { flex: 0 0 112px; min-height: 80px; display: grid; place-items: center; background: #eef1fb; border: 1px solid #c9d0ec; border-radius: 6px; padding: 4px; }
.it-illu img { max-width: 104px; max-height: 150px; image-rendering: pixelated; }
.it-top .statgrid { flex: 1; min-width: 0; }
.it-top .statgrid span { color: var(--sub); white-space: nowrap; }
.it-top .statgrid b { font-weight: normal; overflow-wrap: anywhere; }
.it-stats { margin: 8px 0 0; }
.it-stats .chip { margin: 0 4px 3px 0; background: #e6f5ea; color: #23703f; }
.it-acts, .it-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.it-acts button { border: 2px solid #fff; background: var(--accent); color: #fff; border-radius: 14px; padding: 3px 14px; box-shadow: var(--shadow); }
.it-acts button.alt { background: #fff; color: #3a4170; border-color: #c2c9e4; }
.it-quick button { border: 1px solid #c9d0ec; background: #fff; color: var(--ink); border-radius: 4px; padding: 1px 7px; }
.it-quick button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.it-list { margin: 2px 0; padding-left: 16px; }
.it-list li { margin: 1px 0; overflow-wrap: anywhere; }
#win-item .win-body p { margin: 3px 0; overflow-wrap: anywhere; }

/* encyclopedia */
.it-filters { display: flex; gap: 4px; margin-bottom: 2px; }
.it-filters select { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d0ec; border-radius: 6px; padding: 4px; }
.it-filters { flex-wrap: wrap; align-items: center; margin-top: 4px; }
.it-filters input[type=number] { flex: 1; min-width: 0; width: 60px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d0ec; border-radius: 6px; padding: 4px; }
.it-flab { font-size: 12px; color: #6a7396; white-space: nowrap; }
.it-lvrow select { flex: 2; }
.it-reset { font: inherit; border: 1px solid #c9d0ec; background: #fff; color: var(--ink); border-radius: 6px; padding: 3px 10px; }
.it-more { display: block; margin: 8px auto 2px; border: 1px solid #c9d0ec; background: #fff; color: var(--ink); border-radius: 12px; padding: 3px 14px; }

/* NPC shop: an amount per row, ticks and 賣出所選 on the sell tab */
#win-npcshop { width: 470px; }
.shop-row { gap: 6px; flex-wrap: wrap; }
.shop-row.on { background: #fff6e0; }
.shop-main { flex: 1 1 120px; min-width: 0; }
.shop-main b { overflow-wrap: anywhere; }
.shop-chk { display: grid; place-items: center; width: 22px; align-self: stretch; cursor: pointer; }
.shop-chk input { width: 17px; height: 17px; margin: 0; cursor: pointer; }
.shop-qty { display: inline-flex; align-items: center; border: 1px solid #c9d0ec; border-radius: 6px; overflow: hidden; background: #fff; flex: 0 0 auto; }
.shop-qty button { border: 0; background: #eef1fb; color: var(--ink); width: 24px; height: 26px; padding: 0; font-size: 14px; }
.shop-qty button:hover { background: #dfe5fb; }
.shop-qty button.mx { width: auto; padding: 0 6px; font-size: 11px; border-left: 1px solid #c9d0ec; }
.shop-qty input { width: 46px; height: 26px; border: 0; border-left: 1px solid #c9d0ec; border-right: 1px solid #c9d0ec; text-align: center; font: inherit; color: var(--ink); -moz-appearance: textfield; }
.shop-qty input::-webkit-outer-spin-button, .shop-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shop-qty.one { border: 0; background: none; color: var(--sub); padding: 0 6px; }
.shop-go { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 58px; padding: 3px 8px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: bold; flex: 0 0 auto; }
.shop-go small { font-weight: normal; font-size: 10px; opacity: .9; }
.shop-go small::after { content: " G"; }
.shop-go:hover { filter: brightness(1.08); }
.shop-go.big { flex-direction: row; padding: 6px 14px; background: #e08a2a; }
.shop-go[disabled] { background: #b8bed6; cursor: default; filter: none; }
.shop-filter { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.shop-filter b { padding: 2px 10px; border-radius: 10px; background: #e3e7f7; font-weight: normal; cursor: pointer; }
.shop-filter b.on { background: #e08a2a; color: #fff; }
.shop-bar { position: sticky; bottom: -10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px -10px 0; padding: 8px 10px;
  background: rgba(255, 255, 255, .97); border-top: 1px solid #dfe3f5; z-index: 1; }
.shop-bar > button:not(.shop-go) { border: 1px solid #c9d0ec; background: #fff; color: var(--ink); border-radius: 12px; padding: 3px 10px; }
.shop-bar span { flex: 1; min-width: 120px; color: var(--sub); }
/* phone: a window body has 6px padding there, not 10 — the bar's -10px sides made it 8px wider than the window
   (a sideways scroll in 回收裝備); .pn-shop keeps its own (css/panels.css) */
html.phone .shop-bar { bottom: -6px; margin-left: -6px; margin-right: -6px; padding: 6px; }
.shop-bar span b { color: #c06a00; }
@media (hover: none), (pointer: coarse) {
  .shop-qty button { width: 34px; height: 36px; font-size: 18px; }
  .shop-qty input { height: 36px; width: 52px; font-size: 15px; }
  .shop-go { min-height: 40px; min-width: 64px; }
  .shop-chk { width: 34px; }
  .shop-chk input { width: 22px; height: 22px; }
}

/* quick slots that hold an item */
.qs img { image-rendering: pixelated; }

/* tooltip */
#item-tip { position: fixed; z-index: 200; max-width: 260px; pointer-events: none; padding: 6px 9px; border-radius: 6px; background: rgba(28, 32, 54, .94); color: #fff; border: 1px solid #8ea0e6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45); font-size: 12px; line-height: 1.45; }
#item-tip[hidden] { display: none; }
/* 裝備對照: two cards side by side, the worn one on the right */
#item-tip.dual { display: flex; align-items: flex-start; gap: 6px; max-width: none; padding: 0; background: none; border: 0; box-shadow: none; }
#item-tip.dual[hidden] { display: none; }
#item-tip .tt-card { width: 240px; padding: 6px 9px; border-radius: 6px; background: rgba(28, 32, 54, .94); border: 1px solid #8ea0e6; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
#item-tip .tt-worn { border-color: #6f7aa8; background: rgba(22, 25, 42, .94); }
#item-tip .tt-tag { display: inline-block; margin-bottom: 3px; padding: 0 6px; border-radius: 3px; background: #4a5488; color: #dfe4ff; font-size: 11px; }
@media (max-width: 560px) { #item-tip.dual { flex-direction: column; } #item-tip .tt-card { width: 220px; } }
#item-tip b { color: #ffe9a8; }
#item-tip .sub { color: #b9c0e6; }

/* 髮色 in the 角色選擇 window (game.js, js/items.js setHair) */
.hair-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.hair-sw { width: 24px; height: 24px; padding: 0; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px #b9c0d8; cursor: pointer; }
.hair-sw.on { box-shadow: 0 0 0 2px #23283b; }
@media (pointer: coarse) { .hair-sw { width: 32px; height: 32px; } }
/* the item's stars over its picture (RefineLevelTable MarkCount), as the client draws them */
.it-illu { position: relative; }
.it-stars { position: absolute; left: 4px; bottom: 3px; display: flex; gap: 0; pointer-events: none; }
.it-stars img { width: 17px; height: 18px; image-rendering: pixelated; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
#item-tip .tt-stars-row { display: inline-flex; margin-left: 6px; vertical-align: -3px; }
#item-tip .tt-stars-row img { width: 12px; height: 13px; image-rendering: pixelated; }
/* 丟棄 confirmation (js/items.js drop) */
#it-discard { position: fixed; inset: 0; z-index: 9500; background: rgba(8, 10, 20, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
#it-discard .itd-box { width: min(340px, 100%); background: linear-gradient(#2b3555, #1c2238); border: 1px solid #6d86c8; border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6); color: #eef2ff; padding: 12px 14px 12px; font-size: 13px; }
#it-discard .itd-t { font-weight: 700; color: #ffe6a8; font-size: 15px; margin-bottom: 8px; }
#it-discard .itd-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#it-discard .itd-item .it-ic { width: 32px; height: 32px; }
#it-discard .itd-item .sub { margin-left: auto; color: #b9c0e6; }
#it-discard .itd-n { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
#it-discard .itd-n input { width: 90px; padding: 4px 6px; border-radius: 5px; border: 1px solid #6d86c8; background: #11162a; color: #fff; font-size: 14px; }
#it-discard .itd-n button { padding: 4px 10px; border-radius: 5px; border: 0; background: #5a5f74; color: #fff; cursor: pointer; }
#it-discard .itd-warn { margin: 0 0 10px; padding: 7px 9px; border-radius: 6px; background: rgba(255, 80, 80, .14); border: 1px solid rgba(255, 110, 110, .5); color: #ffc9c9; line-height: 1.5; }
#it-discard .itd-warn b { color: #ff8a8a; }
#it-discard .itd-btns { display: flex; gap: 8px; justify-content: flex-end; }
#it-discard .itd-btns button { padding: 6px 16px; border-radius: 6px; border: 0; color: #fff; cursor: pointer; font-weight: 600; min-height: 32px; }
#it-discard .itd-ok { background: #c8463f; }
#it-discard .itd-no { background: #5a5f74; }
/* NPC shop (2026-11-20): category tabs with counts, compact buy rows (a tap opens the trade box) */
.shop-cats { position: sticky; top: -10px; z-index: 1; margin: -2px -10px 6px; padding: 6px 10px; background: rgba(255, 255, 255, .97); border-bottom: 1px solid #dfe3f5; }
.shop-cats b { display: inline-flex; align-items: center; gap: 4px; }
.shop-cats b i { font-style: normal; font-size: 10px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: rgba(0, 0, 0, .08); text-align: center; }
.shop-cats b.on i { background: rgba(255, 255, 255, .3); }
.shop-buyrow { flex-wrap: nowrap; cursor: pointer; }
.shop-buyrow:hover { background: #f3f6ff; }
.shop-buyrow.off { cursor: default; opacity: .6; }
.shop-buyrow .shop-main .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-price { flex: 0 0 auto; white-space: nowrap; font-size: 12px; color: #6b5200; }
.shop-price b { color: #c06a00; font-size: 13px; }
.shop-buyrow .shop-go { padding: 6px 10px; }
/* the trade box: modal over the whole page while an NPC shop purchase / sale is open (js/items.js tradeBox) */
#shop-modal { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; padding: 12px;
  background: rgba(8, 10, 20, .55); touch-action: none; }
#shop-modal .sm-box { width: min(360px, 100%); max-height: calc(100% - 8px); overflow-y: auto; background: linear-gradient(#2b3555, #1c2238);
  border: 1px solid #6d86c8; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .6); color: #eef2ff; padding: 12px 14px; font-size: 13px; touch-action: auto; }
#shop-modal .sm-t { font-weight: 700; color: #ffe6a8; font-size: 15px; margin-bottom: 8px; }
#shop-modal .sm-item { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#shop-modal .sm-item .it-ic { width: 36px; height: 36px; flex: none; object-fit: contain; }
#shop-modal .sm-item b { color: #fff; }
#shop-modal .sub { color: #b9c0e6; }
#shop-modal .sm-qty { display: flex; align-items: stretch; border: 1px solid #6d86c8; border-radius: 8px; overflow: hidden; }
#shop-modal .sm-qty button { flex: 0 0 auto; min-width: 34px; border: 0; background: #3a4570; color: #fff; font-size: 14px; cursor: pointer; padding: 0 6px; }
#shop-modal .sm-qty button:hover { background: #4a5790; }
#shop-modal .sm-qty button.mx { background: #b06a1a; }
#shop-modal .sm-qty input { flex: 1; min-width: 0; height: 34px; border: 0; text-align: center; font-size: 16px; font-weight: bold; background: #11162a; color: #fff; -moz-appearance: textfield; }
#shop-modal .sm-qty input::-webkit-outer-spin-button, #shop-modal .sm-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#shop-modal .sm-range { width: 100%; margin: 8px 0 2px; accent-color: #e08a2a; }
#shop-modal .sm-sum { margin: 8px 0 4px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); line-height: 1.6; }
#shop-modal .sm-sum b { color: #ffd27a; font-size: 15px; }
#shop-modal .sm-note { margin: 4px 0; color: #c9d0f2; font-size: 12px; line-height: 1.5; }
#shop-modal .sm-bad { color: #ff8a8a; }
#shop-modal .sm-list { max-height: 160px; overflow-y: auto; margin-bottom: 4px; }
#shop-modal .sm-list div { display: flex; align-items: center; gap: 6px; padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .1); }
#shop-modal .sm-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shop-modal .sm-list b { color: #ffd27a; font-weight: normal; }
#shop-modal .sm-msg { min-height: 1.2em; color: #ffb4b4; font-size: 12px; }
#shop-modal.working .sm-msg { color: #ffe6a8; }
#shop-modal .sm-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
#shop-modal .sm-btns button { min-width: 96px; min-height: 36px; padding: 6px 14px; border-radius: 8px; border: 0; color: #fff; font-weight: 700; cursor: pointer; background: #e08a2a; }
#shop-modal .sm-btns button.alt { background: #5a5f74; }
#shop-modal .sm-btns button[disabled] { background: #4a4f64; color: #9aa0b8; cursor: default; }
#item-tip .tt-look { color: #c9b6ff; }
#item-tip .tt-look .ii { width: 16px; height: 16px; vertical-align: -3px; margin-right: 3px; }
@media (pointer: coarse) { #shop-modal .sm-qty button { min-width: 44px; font-size: 18px; } #shop-modal .sm-qty input { height: 44px; } }
/* 倉庫／銀行 (game.js storeBody, 2026-11-22): the bag's grid twice — 存放 | 背包 side by side, stacked on narrow screens */
#win-warehouse, #win-bank { width: 640px; max-width: calc(100vw - 16px); }
.wh-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wh-pane { min-width: 0; background: rgba(255, 255, 255, .45); border: 1px solid #d6dcf2; border-radius: 6px; padding: 6px; }
.wh-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 5px; }
.wh-h b { font-size: 13px; } .wh-h span { font-size: 11px; color: var(--sub); }
.wh-pane .grid { max-height: 300px; overflow-y: auto; align-content: start; padding-right: 2px; }
.wh-gold { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin: 8px 0 2px; font-size: 12px; }
.wh-gbtn { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wh-gbtn input { width: 96px; padding: 3px 5px; }
.wh-gbtn button { padding: 3px 9px; }
.wh-help { margin: 4px 0 0; }
@media (max-width: 600px) {
  .wh-panes { grid-template-columns: 1fr; }
  .wh-pane .grid { max-height: 200px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  #win-warehouse, #win-bank { width: min(680px, calc(100vw - 12px)); }
  .wh-pane .grid { max-height: calc(100dvh - 190px); }
  html.phone .wh-help { display: none; }
}
/* 倉庫／銀行: an equipment piece tapped once (js/game.js, 清單 六-1) — the second tap moves it */
.wh-pane .wh-arm, .wh-pane [data-whin].wh-arm, .wh-pane [data-whout].wh-arm { outline: 2px solid #ffcf3a; outline-offset: -2px; box-shadow: 0 0 10px rgba(255, 207, 58, .8); }
/* 2026-11-25 (user: 「倉庫修改 限制900格 一頁90格 銀行限制100格」): the kept side's 上一頁 / 第 n / m 頁 / 下一頁 row under its
   grid, the 「n / 900 格」 count turned red when no slot is left, and the empty cells past the limit drawn closed */
.wh-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.wh-pager span { min-width: 84px; text-align: center; color: var(--sub); white-space: nowrap; }
.wh-pager button { padding: 3px 9px; white-space: nowrap; }
.wh-pager button[disabled] { opacity: .45; cursor: default; }
.wh-pager .wh-sort { margin-left: 6px; }   /* 2026-11-26 整理: same items on one page */
.wh-h span.wh-full { color: #d0443c; font-weight: 700; }
.wh-pane .slot.wh-lock, .wh-pane .slot.wh-lock:hover { background: repeating-linear-gradient(45deg, #e6e9f4 0 4px, #d6daea 4px 8px); border-color: #d6daea; opacity: .6; }
/* 神秘卡片: the bag's count on a slot (js/secretmap.js, 清單 六-2) */
.sm-slot .sm-cnt { position: absolute; right: 2px; bottom: 1px; font-size: 11px; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }

/* a drill's durability left (2026-11-26, user: 「電鑽本身要顯示剩餘耐久度」, js/items.js drBar): a bar along the icon's
   foot, green → yellow (≤ 50 %) → red (≤ 20 %), the % over it; the tooltip says 耐久 x / max */
.dr-life { position: absolute; left: 3px; right: 3px; bottom: 2px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .45); pointer-events: none; font-style: normal; }
.dr-life::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); border-radius: 2px; background: #3cc36a; }
.dr-life.mid::before { background: #e0b000; }
.dr-life.low::before { background: #e04040; }
.dr-life em { position: absolute; right: 0; bottom: 5px; font: bold 9px/1 system-ui, sans-serif; font-style: normal; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 1px #000; }
.dr-life.low em { color: #ffd0d0; }
#item-tip .tt-drill { color: #b8f0c8; margin: 2px 0; }
#item-tip .tt-drill b { color: #fff; }
/* css/skills.css?v=6 */
/* the skill window and bar (js/skills.js) */
#win-skill { width: 400px; }
.sk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.sk-head select { font: inherit; padding: 1px 4px; border: 1px solid #c9d0ec; border-radius: 5px; background: #fff; color: var(--ink); }
.sk-bar { display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--sub); margin-bottom: 6px; }
.sk-slot { position: relative; width: 28px; height: 28px; border-radius: 6px; background: #e3e7f7; display: grid; place-items: center; font-size: 10px; color: #8a92b5; }
.sk-slot img { position: absolute; inset: 2px; width: 24px; height: 24px; }
.sk-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.sk-tabs button, .sk-act button { font: inherit; font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid #c9d0ec; background: #fff; color: var(--ink); cursor: pointer; }
.sk-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.skrow.ts-sk { align-items: flex-start; cursor: pointer; }
.skrow.ts-sk:hover { background: #f3f5ff; }
.skrow.ts-sk:not(.got) > img { filter: grayscale(.85); opacity: .7; }
.skrow.ts-sk.todo .sk-main > b { color: #8a92b5; }
.sk-main { flex: 1; min-width: 0; }
.sk-act { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; }
/* 2026-12-04 (UI 檢查 第 6 項: every row carried its 放到快捷列… button, rows ~55 px): it shows under the mouse or on the row
   tapped open; a row with nothing else to press folds its button line away. Dragging a skill to the bar works as ever. */
.ts-sk { position: relative; }
.ts-sk:not(.open):not(:hover) .sk-act [data-skbar] { display: none; }
.ts-sk:not(.open):not(:hover) .sk-act:not(:has(> :not([data-skbar]))) { display: none; }
/* under the mouse, a line with only that button floats over the row's right side: the list never jumps */
.ts-sk:not(.open):hover .sk-act:not(:has(> :not([data-skbar]))) { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); margin: 0; z-index: 1; }
@media (hover: none) { .ts-sk:not(.open) .sk-act [data-skbar] { display: none; } .ts-sk:not(.open) .sk-act:not(:has(> :not([data-skbar]))) { display: none; } }
.sk-act button.go { background: #e9fbe9; border-color: #74c47a; }
.sk-put { display: inline-flex; gap: 2px; }
.sk-put button { padding: 0; width: 20px; height: 20px; border-radius: 50%; }
.sk-put button.on { background: #f08a24; border-color: #f08a24; color: #fff; }
.sk-no { font-size: 11px; color: #c0587a; }
.sk-more { margin: 4px 0; padding: 6px; background: #f6f7fd; border-radius: 6px; font-size: 12px; line-height: 1.5; }
.sk-more .warn { color: #c0587a; }
.sk-more a { color: var(--accent); cursor: pointer; text-decoration: underline; }
.skrow .lvl { white-space: nowrap; }
.sk img.ts-skicon { max-width: 34px; width: 34px; height: 34px; border-radius: 50%; filter: none; }

/* 2026-11-25 (user: 「技能頁面重新設計排版」): a header card, bigger pill tabs, the 其他技能 tab apart on the right */
#win-skill .sk-head { padding: 7px 10px; border-radius: 10px; background: linear-gradient(135deg, #3b4fb8, #6a4bc2); color: #fff; }
#win-skill .sk-head b { color: #ffe68a; } #win-skill .sk-head .chip { background: rgba(255,255,255,.2); color: #fff; border-color: transparent; }
/* 2026-11-29 (user): name card + hint stay put while the skill list scrolls; --py/--px = the window body's padding */
#win-skill .sk-top { --py: 10px; --px: 10px; position: sticky; top: calc(-1 * var(--py)); z-index: 3;
  margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 1px; background: var(--sk-top-bg, #f9f9fc); }
#win-skill .sk-top .sk-bar { margin-bottom: 4px; }
@media (max-height: 540px) and (orientation: landscape) { #win-skill .sk-top { --py: 6px; --px: 8px; } }
html.phone #win-skill .sk-top { --py: 4px; --px: 6px; }
#win-skill .sk-tabs { gap: 5px; margin: 6px 0; padding-bottom: 6px; border-bottom: 1px solid #e1e5f5; }
#win-skill .sk-tabs button { font-size: 12px; padding: 4px 11px; border-radius: 14px; }
#win-skill .sk-tabs .sk-other-tab { margin-left: auto; border-color: #b77cff; color: #7a3fc6; }
#win-skill .sk-tabs .sk-other-tab.on { background: #8a4fd6; border-color: #8a4fd6; color: #fff; }
.sko-list { display: flex; flex-direction: column; gap: 6px; }
.sko { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; border: 1px solid #ddd3f5; background: #faf7ff; }
.sko.off { opacity: .6; }
.sko > img, .sko-ic .it-ic { width: 36px; height: 36px; flex: none; }
.sko-t { flex: 1; min-width: 0; } .sko-t b { font-size: 13px; color: #3a2a6a; } .sko-t small { display: block; font-size: 11px; color: #7a6a9a; }
.sko-t p { margin: 3px 0 0; font-size: 11.5px; color: #555; }
.sko-b { display: flex; flex-direction: column; gap: 4px; } .sko-b button { font-size: 12px; padding: 3px 10px; }
/* 手動施法: a skill picked, waiting for the click (js/skills.js armCast) */
/* the client's skill cursor (pointer + green swirl, hot spot 1 1); js/cursor.js plays its turning frames inline over this */
body.cast-arm #world { cursor: url(../assets/cursor/c2_088.png) 1 1, crosshair; }

/* css/quests.css?v=19 */
/* Trickster Web — the quest window (js/quests.js) */
#win-quest { width: 400px; }
.q-sec { font-weight: bold; margin: 10px 0 4px; padding-bottom: 3px; border-bottom: 1px solid #dfe3f5; }
.q-sec:first-child { margin-top: 0; }
.q-card { border: 1px solid #d6dbef; border-radius: 6px; padding: 7px 8px; margin: 6px 0; background: #fafbff; }
.q-top { display: flex; align-items: center; gap: 6px; }
.q-top .st { margin-left: auto; font-size: 11px; color: var(--accent); white-space: nowrap; }
.q-kind { display: inline-block; font-size: 10px; line-height: 15px; padding: 0 5px; margin-right: 4px; border-radius: 8px; border: 1px solid currentColor; white-space: nowrap; vertical-align: 1px; }
.q-kind.kQ { color: #2f6fd0; } .q-kind.kS { color: #a0522d; } .q-kind.kM { color: #b3261e; } .q-kind.kP { color: #2e7d4f; }
.q-desc { margin: 3px 0; }
.q-goal { display: flex; align-items: center; gap: 4px; margin: 2px 0; }
.q-goal b { margin-left: 2px; }
.q-goal.ok { color: #2e9a57; }
.q-goal.ok b::after { content: " ✔"; }
.q-ic { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; vertical-align: middle; margin-right: 2px; }
.q-card details { margin-top: 4px; font-size: 12px; }
.q-card summary { cursor: pointer; color: var(--accent); }
.q-card details p { margin: 4px 0; padding-left: 8px; border-left: 2px solid #d6dbef; white-space: pre-line; }
.q-map { position: relative; margin-top: 4px; line-height: 0; }
.q-map img { width: 100%; border-radius: 4px; }
.q-map i { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #e0362c; color: #fff; font: bold 11px/18px sans-serif;
  text-align: center; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .5); }
.q-map i.m0 { background: #2f6fd0; width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.q-btns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 5px; }
.q-btns button { font: inherit; font-size: 12px; padding: 2px 10px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.q-btns button.alt { background: #fff; color: var(--sub); border-color: #c9d0ec; }
.q-done { display: flex; flex-wrap: wrap; gap: 4px; }
.q-done span { font-size: 11px; background: #eef1ff; border-radius: 8px; padding: 1px 7px; color: var(--sub); }
.q-kind.kK { color: #c77700; }
.q-btns .sub { align-self: center; margin-right: auto; }

/* 完成次數／可完成次數 + 狩獵・組隊任務的倒數 (2026-11-25) */
.q-cnt { color: #6a4fc0; font-weight: bold; white-space: nowrap; }
.q-clock { display: inline-block; font: bold 14px/18px Consolas, "Courier New", monospace; color: #fff; background: #2f6fd0; border-radius: 9px; padding: 0 7px; white-space: nowrap; letter-spacing: .5px; }
.q-clock.ok { background: #2e9a57; font-family: inherit; }
.q-clock.warn { background: #e07000; animation: q-pulse 1s ease-in-out; }
.q-clock.crit { background: #d01f1f; animation: q-blink .5s steps(1) 2; box-shadow: 0 0 6px #ff3b3b; }
@keyframes q-pulse { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes q-blink { 0% { opacity: 1; } 50% { opacity: .35; } }
.q-top .q-cnt { flex: none; font-size: 10px; font-weight: normal; line-height: 14px; padding: 0 5px; border-radius: 7px; background: #efeaff; border: 1px solid #cfc3f5; }
.q-goal .q-clock { font-size: 16px; line-height: 22px; padding: 0 9px; border-radius: 11px; }
#tracker .trk-nm { display: flex; align-items: center; gap: 4px; min-width: 0; }
#tracker .trk-nm b { flex: 1; min-width: 0; }
#tracker .trk-cnt { flex: none; font-style: normal; font-size: 10px; line-height: 14px; padding: 0 5px; border-radius: 7px; background: #efeaff; color: #6a4fc0; border: 1px solid #cfc3f5; white-space: nowrap; }
#tracker .trk-item .sub .q-clock { font-size: 13px; line-height: 16px; padding: 0 6px; vertical-align: 0; }
#tracker .trk-item .sub .trk-k { display: inline; }
#q-timer { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 40; pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 4px 14px; border-radius: 18px; color: #fff;
  background: #c25e00e6; box-shadow: 0 2px 12px #0008; font-size: 13px; white-space: nowrap; }
#q-timer span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#q-timer b { font: bold 22px/28px Consolas, "Courier New", monospace; flex: none; }
#q-timer em { font-style: normal; opacity: .9; flex: none; }
#q-timer.crit { background: #c81818ee; animation: q-blink .5s steps(1) 2; }

/* the tracker (left): 劇情任務 / 關鍵任務 groups, a row per quest (click = auto pathing, js/pathing.js) */
#tracker .trk-head > div { flex: 1; min-width: 0; }
#tracker .trk-all { border: 1px solid #c9d0ec; background: #fff; border-radius: 6px; width: 26px; height: 24px; cursor: pointer; font-size: 14px; line-height: 1; color: var(--sub); }
#tracker .trk-auto { border: 1px solid #c9d0ec; background: #fff; border-radius: 6px; width: 26px; height: 24px; cursor: pointer; font-size: 13px; line-height: 1; margin-right: 3px; filter: grayscale(1); opacity: .55; }
#tracker .trk-auto.on { filter: none; opacity: 1; border-color: #6fc3ff; background: #eaf6ff; }
#tracker .trk-grp.gF .trk-ep { color: #2f6fd0; }
#tracker .trk-grp.gF .trk-item { border-left-color: #2f6fd0; background: #eef4ff; }
#tracker .trk-grp + .trk-grp { margin-top: 2px; }
/* branch quests under their quest (one row per NPC) and the 「下一步」 row after a chain quest */
#tracker .trk-br { margin: 2px 0 3px 14px; padding-left: 6px; border-left: 2px dotted #c9d0ec; font-size: 11px; }
#tracker .trk-brh { color: var(--sub); margin-bottom: 1px; }
#tracker .trk-bri { display: flex; align-items: center; gap: 4px; padding: 1px 4px; border-radius: 4px; cursor: pointer; min-height: 18px; }
#tracker .trk-bri:hover { background: #eef1ff; }
#tracker .trk-bri i { font-style: normal; width: 14px; text-align: center; flex: none; }
#tracker .trk-bri span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tracker .trk-bri em { font-style: normal; color: var(--sub); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
#tracker .trk-bri.b-done { color: #2e9a57; opacity: .75; }
#tracker .trk-bri.b-open { color: #2f6fd0; font-weight: bold; }
#tracker .trk-bri.b-wait { color: #999; }
#tracker .trk-bri.next { box-shadow: 0 0 0 1px #6fc3ff inset; background: #eaf6ff; }
#tracker .trk-next { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 6px; border-radius: 6px; background: #fff7e0; border-left: 3px solid #e0a000; cursor: pointer; font-size: 12px; }
#tracker .trk-next:hover { filter: brightness(1.04); box-shadow: 0 0 0 1px #9fb4ff inset; }
#tracker .trk-next > div { flex: 1; min-width: 0; }
#tracker .trk-next .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 下一個劇情／關鍵任務 (chain.json, 2026-11-27): a quest still above the character's level */
#tracker .trk-next .trk-lv { margin-right: 4px; padding: 0 4px; border-radius: 4px; background: #c0392b; color: #fff; font-style: normal; font-size: 10px; }

/* quest window tabs and 歷史任務 */
.q-tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid #dfe3f5; }
.q-tabs button { font: inherit; font-size: 13px; padding: 4px 12px; border: 1px solid #d6dbef; border-bottom: none; border-radius: 6px 6px 0 0; background: #f2f4fb; color: var(--sub); cursor: pointer; min-height: 28px; }
.q-tabs button.on { background: #fff; color: var(--accent); font-weight: bold; position: relative; top: 1px; }
.q-hbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; }
.q-hf { font: inherit; font-size: 12px; padding: 2px 9px; border-radius: 10px; border: 1px solid #c9d0ec; background: #fff; color: var(--sub); cursor: pointer; }
.q-hf.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.q-hsearch { flex: 1 1 140px; min-width: 0; font: inherit; font-size: 12px; padding: 3px 7px; border: 1px solid #c9d0ec; border-radius: 10px; }
.q-hrow { border: 1px solid #e1e5f4; border-radius: 6px; margin: 4px 0; background: #fafbff; }
.q-hrow > summary { display: flex; align-items: center; gap: 4px; padding: 5px 7px; cursor: pointer; list-style: none; }
.q-hrow > summary::-webkit-details-marker { display: none; }
.q-hrow > summary b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-hrow[open] > summary { border-bottom: 1px dashed #d6dbef; }
.q-hrow > :not(summary) { margin-left: 8px; margin-right: 8px; }
.q-hrow > .q-btns { margin-bottom: 6px; }
.q-hrow > .sub:last-of-type { margin-bottom: 4px; }
.q-hw { font-size: 11px; padding: 0 6px; border-radius: 8px; white-space: nowrap; }
.q-hw.hd { background: #e3f6ea; color: #2e9a57; } .q-hw.hx { background: #f1f1f4; color: #777; } .q-hw.hf { background: #fde8e6; color: #b3261e; }
.q-hnow { font-size: 11px; color: var(--accent); white-space: nowrap; }
.q-ht { font-size: 11px; color: var(--sub); white-space: nowrap; margin-left: 4px; }
@media (max-width: 520px) { .q-ht { display: none; } }
#tracker .trk-grp.gS .trk-ep { color: #a0522d; }
#tracker .trk-grp.gK .trk-ep { color: #c77700; }
#tracker .trk-item { margin-top: 3px; }
#tracker .trk-grp.gS .trk-item { border-left-color: #a0522d; }
#tracker .trk-grp.gK .trk-item { border-left-color: #e0a000; background: #fff7e0; }
#tracker .trk-grp.gH .trk-ep { color: #b03a3a; }
#tracker .trk-grp.gH .trk-item { border-left-color: #b03a3a; }
#tracker .trk-grp.gN .trk-ep { color: #2f6fd0; }
#tracker .trk-grp.gN .trk-item { border-left-color: #6f9fe0; }
#tracker .trk-item > div { flex: 1; min-width: 0; }
#tracker .trk-item b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tracker .trk-item .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tracker .trk-item .q-ic { width: 16px; height: 16px; }
#tracker .trk-item:hover { filter: brightness(1.04); box-shadow: 0 0 0 1px #9fb4ff inset; }
#tracker .trk-item.going { box-shadow: 0 0 0 2px #6fc3ff inset; }
#tracker .trk-go { color: var(--accent); font-size: 13px; flex: none; }
#tracker .trk-more, #tracker .trk-none { font-size: 11px; color: var(--sub); margin-top: 4px; cursor: pointer; }
#tracker .trk-none { cursor: default; text-align: center; padding: 6px 0 2px; }
@media (max-width: 900px), (max-height: 540px) {
  #tracker { max-height: calc(100vh - 240px); overflow-y: auto; }   /* clear of the chat log */
  #tracker .trk-item { padding: 3px 5px; }
  #tracker .trk-item img { width: 18px; }
  #tracker .trk-head .sub { display: none; }
}

/* the chapter sign (EP banner): the client's ChapterSign.nri pictures, CSS opacity / transform only */
#ts-ep { position: absolute; left: 0; right: 0; top: 18%; z-index: 55; pointer-events: none; opacity: 0; transition: opacity .5s ease-out; --k: 1; }
#ts-ep.on { opacity: 1; }
#ts-ep.off { opacity: 0; transition: opacity 1.3s ease-in; }
#ts-ep .ep-sp { display: inline-block; background-image: var(--ep-img); background-repeat: no-repeat; width: calc(var(--w) * var(--k) * 1px); vertical-align: bottom; }
#ts-ep .ep-band { position: relative; height: calc(152px * var(--k)); overflow: visible; display: flex; align-items: center; justify-content: center; }
#ts-ep .ep-bandimg { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; opacity: .92; }
#ts-ep .ep-in { position: relative; text-align: center; transform: scale(.92); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); }
#ts-ep.on .ep-in { transform: scale(1); }
#ts-ep .ep-epi { font: bold calc(15px * var(--k)) Georgia, "Times New Roman", serif; letter-spacing: .3em; color: #ffe9a0; text-shadow: 0 0 6px #b07a00, 0 2px 2px #000; }
#ts-ep .ep-ch { line-height: 0; margin: calc(2px * var(--k)) 0; }
#ts-ep .ep-ch .ep-sp + .ep-sp { margin-left: calc(4px * var(--k)); }
#ts-ep .ep-name { font: bold calc(26px * var(--k)) "Microsoft JhengHei", sans-serif; color: #fff; text-shadow: 0 0 8px #ffcc33, 0 0 2px #7a4a00, 0 2px 3px #000; white-space: nowrap; }
#ts-ep .ep-fl { display: block; margin: calc(2px * var(--k)) auto 0; }
#ts-ep .ep-state { font: bold calc(14px * var(--k)) "Microsoft JhengHei", sans-serif; color: #ffe08a; letter-spacing: .4em; text-shadow: 0 1px 2px #000; }
/* a light sweeping across the band, once */
#ts-ep .ep-light { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 240, 180, .55), transparent); transform: translateX(-120%); }
#ts-ep.on .ep-light { animation: ep-sweep 1.6s .2s ease-in-out forwards; }
@keyframes ep-sweep { to { transform: translateX(380%); } }
/* the end: the client's "Success" ribbon drops in after the client's 300 ms */
#ts-ep .ep-ok { position: absolute; left: 50%; bottom: calc(-70px * var(--k)); transform: translateX(-50%) scale(1.8); opacity: 0; }
#ts-ep.on .ep-ok { animation: ep-ok .45s .8s cubic-bezier(.2, 1.5, .5, 1) forwards; }
@keyframes ep-ok { to { opacity: 1; transform: translateX(-50%) scale(1); } }
/* sparks rising from the band */
#ts-ep .ep-spark { display: block; position: absolute; top: 60%; width: calc(6px * var(--k)); height: calc(6px * var(--k)); border-radius: 50%; background: radial-gradient(#fff, #ffd84a 50%, transparent 70%); opacity: 0; }
#ts-ep.on .ep-spark { animation: ep-spark 1.8s ease-out forwards; }
#ts-ep .ep-spark:nth-of-type(1) { left: 12%; animation-delay: .25s; } #ts-ep .ep-spark:nth-of-type(2) { left: 22%; animation-delay: .6s; }
#ts-ep .ep-spark:nth-of-type(3) { left: 31%; animation-delay: .4s; } #ts-ep .ep-spark:nth-of-type(4) { left: 40%; animation-delay: .9s; }
#ts-ep .ep-spark:nth-of-type(5) { left: 49%; animation-delay: .3s; } #ts-ep .ep-spark:nth-of-type(6) { left: 58%; animation-delay: .75s; }
#ts-ep .ep-spark:nth-of-type(7) { left: 66%; animation-delay: .5s; } #ts-ep .ep-spark:nth-of-type(8) { left: 74%; animation-delay: 1s; }
#ts-ep .ep-spark:nth-of-type(9) { left: 82%; animation-delay: .35s; } #ts-ep .ep-spark:nth-of-type(10) { left: 90%; animation-delay: .8s; }
@keyframes ep-spark { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(-90px * var(--k))) scale(1.2); } }

/* 2026-11-26 (user: 「左側任務清單頁面 使用半透明」): the tracker see-through — the panel and its rows let the map show,
   the text keeps a soft white edge so it stays readable */
#tracker.panel { background: rgba(255, 255, 255, .38); border-color: rgba(255, 255, 255, .55); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
#tracker .trk-head { border-bottom-color: rgba(120, 130, 170, .3); }
#tracker .trk-item { background: rgba(238, 241, 255, .5); }
#tracker .trk-grp.gK .trk-item, #tracker .trk-next { background: rgba(255, 247, 224, .55); }
#tracker .trk-grp.gF .trk-item { background: rgba(238, 244, 255, .55); }
#tracker .trk-all, #tracker .trk-auto { background: rgba(255, 255, 255, .6); }
#tracker .trk-auto.on { background: rgba(234, 246, 255, .75); }
#tracker b { color: #1f2433; }
#tracker .sub, #tracker .trk-none, #tracker .trk-bri em { color: #3f465a; }
#tracker b, #tracker .sub, #tracker .trk-ep, #tracker .trk-none, #tracker .trk-bri { text-shadow: 0 0 1px rgba(255, 255, 255, .85); }
/* the quest window: 「追蹤」 tick on each quest (unticked = not in the tracker), 全部勾選／全部取消 by the heading */
.q-top .q-show { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--sub); cursor: pointer; white-space: nowrap; margin-left: 4px; }
.q-top .q-show input { margin: 0; width: 14px; height: 14px; accent-color: #4f7fe0; cursor: pointer; }
.q-card.q-off { opacity: .72; }
/* the title line wraps on narrow cards (phones) instead of squeezing the name into a column */
.q-top { flex-wrap: wrap; row-gap: 2px; }
.q-top > b { flex: 1 1 7em; min-width: 7em; }
.q-sec .q-showall { float: right; font-size: 11px; font-weight: normal; }
.q-sec .q-showall button { padding: 1px 7px; font-size: 11px; margin-left: 4px; }
/* 2026-11-26 (user: 「任務清單欄位 固定大小 超出範圍用上下滑動」, then 「固定欄高 只固定最大 沒接任務的時候縮到最小」): the
   tracker grows with its quests up to a fixed MAXIMUM — computers 330 px (less on short windows), phones the left button
   column's height, at least 150 px (js/ui.js trackerCap) — and scrolls inside past it;
   the 任務追蹤 head stays on top while scrolling */
#tracker { box-sizing: border-box; height: auto; max-height: min(330px, calc(100vh - 260px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html.phone #tracker { max-height: none; }   /* phones: js/ui.js trackerCap sets it */
#tracker .trk-head { position: sticky; top: -6px; z-index: 1; margin: -6px -8px 0; padding: 6px 8px 5px; background: rgba(255, 255, 255, .72); border-radius: 4px 4px 0 0; }/* 實體／半透明 switch (◐, left of 🧭): see-through by default; .solid puts the tracker's old solid look back */
#tracker .trk-alpha { border: 1px solid #c9d0ec; background: rgba(255, 255, 255, .6); border-radius: 6px; width: 26px; height: 24px; cursor: pointer; font-size: 14px; line-height: 1; margin-right: 3px; color: #6c7380; padding: 0; }
#tracker .trk-alpha.on { color: #2f6fd0; border-color: #6fc3ff; background: #eaf6ff; }
#tracker.panel.solid { background: var(--panel); border-color: var(--panel-edge); box-shadow: var(--shadow); }
#tracker.solid .trk-head { background: var(--panel); border-bottom-color: #dfe3f5; }
#tracker.solid .trk-item { background: #eef1ff; }
#tracker.solid .trk-grp.gK .trk-item, #tracker.solid .trk-next { background: #fff7e0; }
#tracker.solid .trk-grp.gF .trk-item { background: #eef4ff; }
#tracker.solid .trk-all, #tracker.solid .trk-auto, #tracker.solid .trk-alpha { background: #fff; }
#tracker.solid .trk-auto.on, #tracker.solid .trk-alpha.on { background: #eaf6ff; }
#tracker.solid b, #tracker.solid .sub, #tracker.solid .trk-ep, #tracker.solid .trk-none, #tracker.solid .trk-bri { text-shadow: none; }
/* 2026-11-26 (user: 「任務 小地圖上方表頭縮窄一點 太厚了 圖示可縮小到跟字上下一樣高 然後尋路按鈕置中 現在是歪的」): a thin head —
   the picture and the three buttons as tall as the text line, each button's symbol centred (grid, no padding) */
#tracker .trk-head { padding-top: 3px; padding-bottom: 3px; gap: 5px; }
#tracker .trk-head img { width: 18px; height: 18px; }
#tracker .trk-head b { line-height: 18px; }
#tracker .trk-head .sub { line-height: 14px; }
#tracker .trk-head button { display: inline-grid; place-items: center; width: 22px; height: 18px; padding: 0; margin: 0 0 0 0; border-radius: 5px; font-size: 12px; line-height: 1; }
#tracker .trk-head button + button { margin-left: 2px; }
#tracker .trk-head .trk-auto { font-size: 11px; text-indent: 0; letter-spacing: 0; }

/* 2026-11-30 主線 row (always there until the story is done; ▾ folds it to one line) */
#tracker .trk-main { display: flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 5px; border-radius: 6px; background: rgba(250, 236, 222, .6); border-left: 3px solid #a0522d; cursor: pointer; font-size: 12px; }
#tracker .trk-main:hover { filter: brightness(1.04); box-shadow: 0 0 0 1px #d9a27a inset; }
#tracker .trk-main > div { flex: 1; min-width: 0; }
#tracker .trk-main b { display: flex; align-items: center; gap: 4px; white-space: nowrap; color: #7a3a14; }
#tracker .trk-main .trk-msec { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: normal; color: #5a4636; }
#tracker .trk-main .trk-mn { flex: none; font-style: normal; font-size: 10px; line-height: 14px; padding: 0 5px; border-radius: 7px; background: #fff3e6; color: #a0522d; border: 1px solid #e3b899; }
#tracker .trk-main .sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }   /* the why (先取得「…」) may take two lines on a narrow phone tracker */
#tracker .trk-main .trk-mi { flex: none; font-size: 13px; line-height: 1; }
#tracker .trk-main .trk-mx { flex: none; width: 20px; height: 20px; font-size: 10px; padding: 0; }
#tracker .trk-main.fold { padding-top: 2px; padding-bottom: 2px; }
#tracker.solid .trk-main { background: #fbefe3; }
#tracker.solid .trk-main b { text-shadow: none; }

/* 2026-11-30 任務簿: 劇情／支線／轉職. Computers: list left, the chosen quest right (the window widens). Phones and narrow
   windows: one column — a tap shows the quest in the list's place, 「‹ 返回」 goes back */
html:not(.phone) #win-quest.qb-wide { width: min(680px, calc(100vw - 12px)); }
#win-quest.qb-wide .win-body { columns: auto; }
.qb-seg { display: flex; gap: 4px; margin-bottom: 6px; }
.qb-seg button { flex: 1; font: inherit; font-size: 13px; min-height: 28px; padding: 2px 6px; border: 1px solid #c9d0ec; border-radius: 14px; background: #fff; color: var(--sub); cursor: pointer; }
.qb-seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: bold; }
.qb { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 8px; align-items: start; }
.qb-list, .qb-det { max-height: min(470px, calc(100vh - 190px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.qb-det { border: 1px solid #d6dbef; border-radius: 6px; padding: 7px 8px; background: #fafbff; }
.qb-back { display: none; }
.qb-note { margin: 0 0 4px; }
.qb-opt { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--sub); margin: 0 2px 6px; cursor: pointer; }
.qb-opt input { margin: 0; width: 15px; height: 15px; accent-color: #a0522d; cursor: pointer; }
.qb-g { border: 1px solid #e1e5f4; border-radius: 6px; margin: 0 0 4px; background: #fff; }
.qb-gh { display: flex; align-items: center; gap: 5px; padding: 5px 7px; cursor: pointer; min-height: 22px; }
.qb-gh:hover { background: #f2f4fb; }
.qb-gh i { font-style: normal; width: 12px; color: var(--sub); flex: none; }
.qb-gh b { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-n { flex: none; font-size: 11px; padding: 0 6px; border-radius: 8px; background: #eef1ff; color: var(--sub); }
.qb-n.all { background: #e3f6ea; color: #2e9a57; }
.qb-gb { padding: 0 4px 4px; border-top: 1px dashed #d6dbef; }
.qb-sec { display: flex; gap: 4px; font-size: 11px; font-weight: bold; color: #a0522d; margin: 5px 2px 2px; }
.qb-sec span { margin-left: auto; font-weight: normal; color: var(--sub); }
.qb-sec.qb-now { color: #2f6fd0; font-weight: normal; }
.qb-row { display: flex; align-items: center; gap: 5px; padding: 3px 5px; min-height: 22px; border-radius: 4px; cursor: pointer; font-size: 12px; border-left: 3px solid transparent; }
.qb-row:hover { background: #eef1ff; }
.qb-row.on { background: #e4ebff; box-shadow: 0 0 0 1px #9fb4ff inset; }
.qb-row i { font-style: normal; width: 16px; text-align: center; flex: none; }
.qb-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-row em { flex: none; max-width: 48%; font-style: normal; font-size: 11px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-row.s-done { color: #2e9a57; } .qb-row.s-done span { opacity: .8; }
.qb-row.s-open { color: #2f6fd0; font-weight: bold; }
.qb-row.s-take em { color: #c77700; }
.qb-row.s-lock { color: #8a8f9c; }
.qb-row.cur { background: #fff3e6; border-left-color: #a0522d; }
.qb-row.t-K { border-left-color: #e0a000; } .qb-row.t-S:not(.cur) { border-left-color: #e3b899; }
.qb-dh { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.qb-dh b { flex: 1 1 8em; min-width: 0; }
.qb-st { font-size: 12px; margin: 2px 0 4px; }
.qb-st.s-done { color: #2e9a57; } .qb-st.s-open { color: #2f6fd0; } .qb-st.s-take { color: #c77700; } .qb-st.s-lock { color: #b3261e; }
.qb-det .q-btns { justify-content: flex-start; }
.qb-hint { text-align: center; padding: 20px 0; }
@media (max-width: 720px) { .qb { display: block; } }
html.phone .qb { display: block; }
html.phone .qb.sel .qb-list { display: none; }
html.phone .qb:not(.sel) .qb-det { display: none; }
html.phone .qb-back { display: inline-block; }
html.phone .qb-list, html.phone .qb-det { max-height: none; overflow: visible; }
html.phone .qb-row { min-height: 28px; font-size: 13px; }
html.phone .qb-gh { min-height: 28px; }
html.phone .qb-back { font: inherit; font-size: 12px; padding: 2px 10px; min-height: 26px; border: 1px solid #c9d0ec; border-radius: 12px; background: #fff; color: var(--accent); cursor: pointer; margin-right: 4px; }
@media (max-width: 720px) {
  .qb.sel .qb-list { display: none; }
  .qb:not(.sel) .qb-det { display: none; }
  .qb-back { display: inline-block; font: inherit; font-size: 12px; padding: 2px 10px; min-height: 26px; border: 1px solid #c9d0ec; border-radius: 12px; background: #fff; color: var(--accent); cursor: pointer; margin-right: 4px; }
  .qb-list, .qb-det { max-height: none; overflow: visible; }
}
/* css/worldmap.css?v=5 */
/* the world map (js/worldmap.js) and the auto pathing status line (js/pathing.js) */
#wm { position: fixed; inset: 0; z-index: 60; background: rgba(8, 10, 18, .62); display: flex; align-items: center; justify-content: center; }
#wm.hidden { display: none; }
#wm .wm-box { display: flex; flex-direction: column; gap: 0; max-width: calc(100vw - 16px); }
#wm .wm-tabs { display: flex; align-items: center; gap: 4px; padding: 4px 4px 0; background: linear-gradient(#5b3a1c, #3f2812); border: 2px solid #b8894c; border-bottom: 0; border-radius: 8px 8px 0 0; }
#wm .wm-tabs button[data-wtab] { font: bold 13px "Microsoft JhengHei", sans-serif; color: #f6e2b8; background: #6e4a26; border: 1px solid #b8894c; border-bottom: 0; border-radius: 6px 6px 0 0; padding: 5px 12px; cursor: pointer; }
#wm .wm-tabs button[data-wtab].on { background: #e9d3a6; color: #4a2d10; }
#wm .wm-here { flex: 1; color: #f6e2b8; font-size: 12px; text-align: right; padding-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#wm .wm-x { width: 26px; height: 27px; border: 0; background-color: transparent; cursor: pointer; flex: none; }
#wm .wm-stage { position: relative; overflow: hidden; background: #2b1d10; border: 2px solid #b8894c; border-top: 0; user-select: none; color: #3b250e; font-family: "Microsoft JhengHei", sans-serif; }
#wm .wm-stage > * { position: absolute; }
#wm .wm-bg { inset: 0; width: 100%; height: 100%; pointer-events: none; }
#wm .wm-dm { pointer-events: none; }
#wm .sub { color: #7a5a35; font-size: .82em; }

/* the island: region buttons (the client's own button pictures; hover shows the lit one) */
#wm .wm-rg { border: 0; padding: 0; background: none; cursor: pointer; }
#wm .wm-rg .sp { position: absolute; inset: 0; }
#wm .wm-rg .sp.on { opacity: 0; transition: opacity .12s; }
#wm .wm-rg:hover .sp.on, #wm .wm-rg:focus-visible .sp.on { opacity: 1; }
#wm .wm-rg.here .sp.on { opacity: 1; }
#wm .wm-lv { position: absolute; left: 50%; bottom: -1.25em; transform: translateX(-50%); white-space: nowrap; font: bold .8em sans-serif; color: #fff; background: rgba(40, 24, 8, .78); border: 1px solid #d7a85c; border-radius: 8px; padding: 0 .5em; pointer-events: none; }
#wm .wm-q { position: absolute; right: -.4em; top: -.6em; width: 1.4em; height: 1.4em; line-height: 1.4em; text-align: center; font: bold 1em sans-serif; color: #3b2400; background: radial-gradient(#fff6b0, #ffc928 60%, #c98a00); border: 2px solid #6b4300; border-radius: 50%; animation: wm-bob 1.2s ease-in-out infinite; pointer-events: none; }
#wm .wm-me { pointer-events: none; animation: wm-bob .9s ease-in-out infinite; z-index: 3; }
@keyframes wm-bob { 50% { transform: translateY(-18%); } }
#wm .wm-other { right: 1.5%; bottom: 6%; font: bold .9em "Microsoft JhengHei", sans-serif; color: #fbe7c0; background: rgba(70, 44, 18, .86); border: 1px solid #d7a85c; border-radius: 6px; padding: .3em .8em; cursor: pointer; }
#wm .wm-other .wm-q { position: static; display: inline-block; width: 1.2em; height: 1.2em; line-height: 1.2em; animation: none; }
#wm .wm-other.here { box-shadow: 0 0 0 2px #ffd84a; }
#wm .wm-foot { left: 0; right: 0; bottom: 0; text-align: center; font-size: .82em; color: #fbe7c0; background: rgba(40, 24, 8, .55); padding: .2em; pointer-events: none; }

/* a region: zones on the detail picture, the side panel */
#wm .wm-z { border: 2px solid transparent; background: transparent; cursor: pointer; padding: 0; border-radius: 2px; }
#wm .wm-z:hover { border-color: #fff8; background: rgba(255, 255, 255, .14); }
#wm .wm-z.safe { box-shadow: inset 0 0 0 1px rgba(80, 200, 120, .55); }
#wm .wm-z.here { border-color: #ffd84a; background: rgba(255, 216, 74, .16); }
#wm .wm-z.sel { border-color: #ff7b2e; background: rgba(255, 123, 46, .18); }
#wm .wm-z.pt { border-radius: 50%; background: #c46a1c; border: 2px solid #fff3d0; box-shadow: 0 0 0 1px #6b3a0a; }
#wm .wm-z.pt.here { background: #ffd84a; }
#wm .wm-z .wm-q { font-size: .8em; }
#wm .wm-side { display: flex; flex-direction: column; gap: .35em; }
#wm .wm-card { display: block; width: 100%; aspect-ratio: 206 / 110; flex: none; }
#wm .wm-rlv { text-align: center; font-weight: bold; color: #5b2f06; font-size: .95em; }
#wm .wm-desc { flex: none; max-height: 24%; overflow-y: auto; font-size: .78em; line-height: 1.45; background: rgba(255, 244, 222, .55); border-radius: 4px; padding: .3em .45em; color: #3b250e; }
#wm .wm-desc .y { color: #b05a00; } #wm .wm-desc .c { color: #0a7d8c; }
#wm .wm-list { flex: 1; min-height: 0; overflow-y: auto; background: rgba(255, 244, 222, .5); border-radius: 4px; padding: .2em; }
#wm .wm-row { padding: .25em .4em; border-radius: 3px; cursor: pointer; font-size: .86em; border-left: 3px solid transparent; }
#wm .wm-row:hover { background: rgba(255, 255, 255, .45); }
#wm .wm-row.here { border-left-color: #e0a800; background: rgba(255, 216, 74, .25); }
#wm .wm-row.sel { border-left-color: #ff7b2e; background: rgba(255, 123, 46, .2); }
#wm .wm-row .sub { margin-top: 1px; }
#wm .wm-you { font-size: .75em; color: #fff; background: #d88a00; border-radius: 6px; padding: 0 .4em; margin-left: .3em; }
#wm .wm-qd { font: bold .75em sans-serif; color: #3b2400; background: #ffc928; border-radius: 50%; padding: 0 .35em; margin-left: .3em; }
#wm .wm-chip { font-style: normal; font-size: .9em; border-radius: 6px; padding: 0 .35em; margin-right: .25em; color: #fff; background: #8a6a45; }
#wm .wm-chip.town { background: #b0761d; } #wm .wm-chip.safe { background: #2f9a55; } #wm .wm-chip.gate { background: #a33a3a; }
#wm .wm-chip.dig { background: #6b5a2a; } #wm .wm-chip.field { background: #5a7a3a; } #wm .wm-chip.in { background: #6a6a8a; }
#wm .wm-back { flex: none; align-self: center; width: 88%; aspect-ratio: 185 / 53; border: 0; cursor: pointer; background-color: transparent; }
#wm .wm-other-list { display: flex; flex-direction: column; gap: .3em; padding: .6em; }
#wm .wm-other-list h3 { margin: 0; color: #5b2f06; }
#wm .wm-find { font: inherit; font-size: .9em; padding: .2em .4em; border: 1px solid #b8894c; border-radius: 4px; background: #fff8ea; }

/* a map's card */
#wm .wm-card-box { z-index: 4; background: rgba(255, 246, 226, .96); border: 2px solid #b8894c; border-radius: 8px; padding: .55em .8em; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); overflow-y: auto; font-size: .92em; display: flex; flex-direction: column; gap: .3em; }
#wm .wm-card-box .wm-name { font-size: 1.15em; color: #4a2208; }
#wm .wm-cx { position: absolute; right: .3em; top: .2em; border: 0; background: none; font-size: 1.1em; cursor: pointer; color: #6b4300; }
#wm .wm-mons { font-size: .9em; line-height: 1.5; }
#wm .wm-qs span { display: inline-block; margin: 0 .4em .2em 0; background: #fff0b8; border: 1px solid #e0b030; border-radius: 6px; padding: 0 .4em; font-size: .88em; }
#wm .wm-qs i { font-style: normal; color: #9a6a00; margin-left: .3em; font-size: .85em; }
#wm .wm-acts { margin-top: auto; display: flex; align-items: center; gap: .5em; flex-wrap: wrap; }
#wm .wm-acts button { font: bold 1em "Microsoft JhengHei", sans-serif; color: #fff; background: linear-gradient(#d88a28, #a85a10); border: 1px solid #6b3a0a; border-radius: 6px; padding: .3em 1em; cursor: pointer; }
#wm .wm-no { color: #a33a3a; font-size: .9em; }

/* 目前地圖 */
#wm .wm-local { inset: 0; width: 100%; height: 100%; cursor: crosshair; }
#wm .wm-ltip { left: 0; right: 0; bottom: 0; text-align: center; font-size: .82em; color: #fbe7c0; background: rgba(0, 0, 0, .45); pointer-events: none; padding: .2em; }

/* the auto pathing line (js/pathing.js): top middle, under the notice */
#ts-path { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 6px; max-width: min(640px, calc(100vw - 340px));
  background: rgba(16, 28, 48, .86); border: 1px solid #6fc3ff; border-radius: 16px; padding: 3px 4px 3px 10px; color: #e8f4ff; font-size: 13px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
#ts-path.hidden { display: none; }
#ts-path .tp-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ts-path .tp-txt b { color: #ffd84a; }
#ts-path .tp-sub { color: #b8d6f0; }
#ts-path .tp-x { flex: none; font: bold 12px "Microsoft JhengHei", sans-serif; color: #fff; background: #b8452a; border: 1px solid #ff9a7a; border-radius: 12px; padding: 3px 10px; cursor: pointer; }

/* phones (landscape, short): the line shorter, the tabs smaller */
@media (max-width: 900px), (max-height: 540px) {
  /* under the menu row, between the status block and the minimap */
  #ts-path { top: 54px; font-size: 11px; max-width: calc(100vw - 440px); min-width: 200px; }
  #ts-path .tp-sub:last-child { display: none; }
  #wm .wm-desc { display: none; }   /* the region's text: too small to read on a phone; the map list gets the room */
  #wm .wm-tabs button[data-wtab] { padding: 6px 10px; font-size: 12px; }
  #wm .wm-here { font-size: 11px; }
}

/* 記憶傳點機 rows (2026-11-26, user: 「記憶傳點機右側按鈕跟地圖名稱分開 目前地圖長短會影響按鈕位置 欄高」, js/travel.js
   memBody): number | name (one line, …) | buttons in a fixed column — the same height and button places on every row */
.mem-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 46px; box-sizing: border-box;
  margin-top: 5px; padding: 0 8px; border: 1px solid #dfe3f5; border-radius: 6px; background: #f7f8fe; }
.mem-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #e3e8fb; color: #4a5a9a; }
.mem-name { min-width: 0; }
.mem-name b, .mem-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-name small { font-size: 11px; color: var(--sub); }
.mem-name small.bad { color: #c0392b; }
.mem-row.empty .mem-name b { font-weight: normal; color: var(--sub); }
.mem-btns { display: grid; grid-template-columns: 76px 54px 54px; gap: 4px; }
.mem-btns button { width: 100%; margin: 0; padding: 4px 0; font-size: 12px; white-space: nowrap; }
html.phone .mem-row { gap: 6px; padding: 0 6px; }
html.phone .mem-btns { grid-template-columns: 66px 46px 46px; gap: 3px; }
html.phone .mem-btns button { font-size: 11px; }html:not(.phone) #win-memport { width: 560px; max-width: calc(100vw - 16px); }   /* room for the map names on computers */
/* css/dig.css?v=18 */
/* Trickster Web — drilling (js/dig.js): the pressure gauge over the HUD */
#dig-ui { position: absolute; left: 50%; bottom: 158px; transform: translateX(-50%); width: min(480px, 92vw); padding: 8px 12px 9px;
  background: rgba(22, 26, 44, .92); color: #fff; border: 1px solid rgba(255, 214, 140, .35); border-radius: 12px; z-index: 30;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .45); user-select: none; -webkit-user-select: none; pointer-events: none; }
#dig-ui.hidden { display: none; }
.dg-top { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 6px; }
.dg-top b { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dg-top span { color: #ffd9a0; white-space: nowrap; }
.dg-top .dg-fit { font-weight: normal; font-size: 11px; padding: 0 5px; border-radius: 8px; }
.dg-top .dg-fit.up { color: #8dff9a; background: rgba(60, 160, 80, .25); }
.dg-top .dg-fit.down { color: #ff9a9a; background: rgba(180, 60, 60, .25); }
.dg-x { background: none; border: 0; color: #c9d0ec; font-size: 15px; cursor: pointer; padding: 0 2px; line-height: 1; }
.dg-x:hover { color: #fff; }
#dig-ui.on { border-color: rgba(143, 240, 154, .7); }
#dig-ui .dg-x { pointer-events: auto; }
/* the pressure: the bar fills from the left; the green band at the right end is where the drill digs */
.dg-gauge { position: relative; height: 26px; background: #2a2433; border-radius: 6px; overflow: hidden; border: 1px solid #120e18; }
.dg-band { position: absolute; top: 0; bottom: 0; background: rgba(90, 220, 120, .28); border-left: 2px solid #5adc78; }
.dg-gauge::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: #ff4b3e; }
.dg-fillp { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #6b7cff, #b3bcff); }
.dg-gauge[data-st="dig"] .dg-fillp { background: linear-gradient(90deg, #3fae5b, #8ff09a); box-shadow: 0 0 8px #5adc78; }
.dg-gauge[data-st="pop"] { animation: dg-pop .3s 2; }
@keyframes dg-pop { 50% { background: #7a2020; } }
.dg-lb { position: absolute; left: 6px; top: 0; line-height: 26px; font-size: 11px; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 2px #000; }
.dg-depth { position: relative; height: 16px; margin-top: 6px; background: #20253a; border-radius: 4px; overflow: hidden; }
.dg-depth i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #c98a3a, #f2c66b); }
.dg-depth span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 16px; text-shadow: 0 1px 2px #000; }
.dg-tip { margin-top: 5px; font-size: 11px; color: #c9d0ec; text-align: center; }
#dig-btn { position: relative; font-size: 18px; }
#dig-btn.dig-can::after { content: ''; position: absolute; right: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #7dff8a; box-shadow: 0 0 5px #7dff8a; }

/* 手動鑽地模式 (js/dig.js setMode): the sign over the HUD, the drill cursor over the map, the lit 挖掘 slot */
#dig-mode { position: absolute; left: 50%; bottom: 122px; transform: translateX(-50%); z-index: 29; display: flex; align-items: center; gap: 7px;
  padding: 3px 4px 3px 10px; border: 1px solid #7dff8a; border-radius: 18px; background: rgba(22, 26, 44, .88); color: #fff; font-size: 12px; white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(125, 255, 138, .22), 0 4px 14px rgba(0, 0, 0, .4); user-select: none; -webkit-user-select: none; }
#dig-mode.hidden { display: none; }
#dig-mode::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #7dff8a; box-shadow: 0 0 6px #7dff8a; animation: dm-blink 1.2s ease-in-out infinite; }
@keyframes dm-blink { 50% { opacity: .3; } }
#dig-mode img { width: 18px; height: 18px; }   /* ic_dig, 36 px: halved smoothly */
#dig-mode b { color: #9dffaa; }
#dig-mode span { color: #c9d0ec; }
#dig-mode button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; line-height: 24px; cursor: pointer; }
#dig-mode button:hover { background: #e05656; }
/* the client's own drill cursor (data\cursor\cursor002.nri 'drill', tools/cursors.py; user: 改用原版鑽頭): its first
   picture, until js/cursor.js turns it (98–100, 80 ms each, inline). The drawn bear-head drill assets/ui/cur_dig.png
   (tools/uiicons.py cursor_dig, hot spot 10 30) is kept but not used. */
html.dig-mode #world { cursor: url('../assets/cursor/c2_098.png') 10 23, crosshair; }
.bs.lit { border-color: #7dff8a; background: rgba(60, 170, 90, .7); box-shadow: 0 0 0 2px rgba(125, 255, 138, .45), 0 0 12px rgba(125, 255, 138, .85); }
#quick .bs.arc.lit { background: radial-gradient(circle at 40% 35%, #d2ffd9, #3fae5b); }
.bs em.lit { left: auto; right: 1px; background: #1f8a46; }

/* 前往寶藏點 (js/dig.js spotBtn): the treasure map's spot, its map and time left; a click walks there */
/* z 900: over the windows (.win starts at 20 and climbs by 1 on every click, game.js winZ), which used to bury it */
#dig-spot { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 7px;
  padding: 3px 4px 3px 8px; border: 1px solid #ffd84a; border-radius: 18px; background: rgba(40, 30, 14, .9); color: #fff; font-size: 12px; white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(255, 216, 74, .22), 0 4px 14px rgba(0, 0, 0, .4); cursor: pointer; user-select: none; -webkit-user-select: none; }
#dig-spot .ii { width: 20px; height: 20px; }
#dig-spot .ds-t { display: flex; flex-direction: column; line-height: 1.2; }
#dig-spot b { color: #ffe680; font-weight: 700; }
#dig-spot em { font-style: normal; font-size: 10px; color: #d8c9a0; }
#dig-spot .ds-go { height: 24px; padding: 0 12px; border: 0; border-radius: 12px; background: linear-gradient(#ffd84a, #d89a1e); color: #3a2400; font-weight: 700; font-size: 12px; cursor: pointer; }
#dig-spot:hover .ds-go { filter: brightness(1.12); }
#dig-spot.here { border-color: #7dff8a; }
/* the same 「前往」 at the end of the chat line that names the spot (dig.js sysGo); #chatlog itself lets clicks through */
#chatlog .ds-chatgo { pointer-events: auto; height: 18px; padding: 0 8px; margin-left: 2px; border: 0; border-radius: 9px; vertical-align: middle;
  background: linear-gradient(#ffd84a, #d89a1e); color: #3a2400; font-weight: 700; font-size: 11px; line-height: 18px; cursor: pointer; }
#chatlog .ds-chatgo:hover { filter: brightness(1.12); }
#dig-spot.here .ds-go { background: linear-gradient(#9dffaa, #3fae5b); color: #0c2a14; }
/* 2026-12-02 (「挖寶藏…做B」): the last minute in red; the pill is placed by js/ui.js stackTop (under the GM notices) */
#dig-spot.late em { color: #ff8a8a; font-weight: 700; }
/* under the windows like the rest of the HUD (its z 900 put it over a window's title bar now that it sits in ui.js's
   stack, right where windows open); the chat line's 「前往」 is still there while a window covers it */
#dig-spot { z-index: 15; }
/* the treasure's result window (js/dig.js lootBody, #win-treasure): .pn parts, dgt- its own */
#win-treasure { width: 340px; }
.dgt .dgt-got { display: flex; flex-direction: column; gap: 5px; }
.dgt .dgt-it { display: flex; align-items: center; gap: 8px; padding: 5px 9px; background: #fff; border: 1px solid var(--pn-line); border-radius: 8px; }
.dgt .dgt-it .ii, .dgt .dgt-it .it-ic { width: 26px; height: 26px; flex: none; object-fit: contain; }
.dgt .dgt-it span { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dgt .dgt-it b { color: #8a5a00; font-size: 13px; }
.dgt .dgt-row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.dgt .dgt-row button.good { flex: 1; }
html.phone #win-treasure { width: 320px; }
html.phone #dig-spot { top: calc(72px + env(safe-area-inset-top, 0px)); gap: 5px; padding: 2px 3px 2px 6px; font-size: 10px; }
html.phone #dig-spot .ii { width: 16px; height: 16px; }
html.phone #dig-spot em { font-size: 9px; }
html.phone #dig-spot .ds-go { height: 22px; padding: 0 9px; font-size: 11px; }

/* phones in landscape: lower profile */
@media (max-height: 540px) and (orientation: landscape) {
  #dig-ui { bottom: 104px; padding: 6px 10px; }   /* above the 手動鑽地模式 sign */
  .dg-tip { display: none; }
  #dig-mode { bottom: 66px; font-size: 11px; }
  #dig-mode button { width: 28px; height: 28px; line-height: 28px; }
}

/* 瘋狂值 (js/dig.js paintCdm): the stress gathered toward Crazy Drill, or its time left while it is on */
.cdm { position: relative; display: block; height: 12px; margin-top: 5px; background: #2b1c1a; border-radius: 6px; overflow: hidden; border: 1px solid #120c0a; }
.cdm.hidden { display: none !important; }
.cdm i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #a8441e, #ff8a3d); transition: width .25s; }
.cdm em { position: absolute; inset: 0; font-style: normal; text-align: center; font-size: 10px; line-height: 12px; color: #ffe2c8; text-shadow: 0 1px 2px #000; }
.cdm.rage i { background: linear-gradient(90deg, #c22a1a, #ff5a2a); box-shadow: 0 0 6px #ff5a2a; }
.cdm.on i { background: linear-gradient(90deg, #ff5a1f, #ffd84a); animation: cdm-burn .6s ease-in-out infinite alternate; }
@keyframes cdm-burn { to { filter: brightness(1.35); } }
#dig-mode .cdm { display: inline-block; width: 92px; height: 14px; margin: 0; flex: none; }
#dig-mode .cdm em { line-height: 14px; }
.dg-top .dg-fit.sense { color: #9fe0ff; background: rgba(60, 120, 180, .28); }
.dg-dn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Crazy Drill on: the gauge burns, the screen edge glows, the moment it starts a flash with the big title */
#dig-ui.crazy { border-color: #ff8a3d; box-shadow: 0 0 0 2px rgba(255, 120, 50, .35), 0 0 18px rgba(255, 110, 40, .6); }
#dig-ui.crazy .dg-gauge { display: none; }
html.dig-crazy #dig-mode { border-color: #ff8a3d; box-shadow: 0 0 0 2px rgba(255, 120, 50, .35), 0 0 14px rgba(255, 110, 40, .7); }
html.dig-crazy #dig-mode::before { background: #ff8a3d; box-shadow: 0 0 6px #ff8a3d; }
html.dig-crazy #dig-mode b { color: #ffc07a; }
html.dig-crazy #game::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 28;
  box-shadow: inset 0 0 80px 16px rgba(255, 80, 20, .62); animation: dig-crazy-edge 1.1s ease-in-out infinite alternate; }
@keyframes dig-crazy-edge { from { opacity: .55; } to { opacity: 1; } }
.dig-crazy-flash { position: absolute; inset: 0; z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 220, 120, .55), rgba(255, 90, 20, .25) 45%, rgba(0, 0, 0, 0) 75%); animation: dig-crazy-flash 2.2s ease-out forwards; }
.dig-crazy-flash b { font-size: 46px; font-weight: 900; letter-spacing: 4px; color: #fff3c4;
  text-shadow: 0 0 6px #ff7a1a, 0 0 18px #ff4a10, 0 3px 0 #8a2a08, 0 0 40px #ffb02e; animation: dig-crazy-title 2.2s ease-out forwards; }
.dig-crazy-flash span { font-size: 15px; color: #ffe8c8; text-shadow: 0 1px 3px #000, 0 0 10px #ff6a1a; }
@keyframes dig-crazy-flash { 0% { opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dig-crazy-title { 0% { transform: scale(2.4); opacity: 0; } 12% { transform: scale(.92); opacity: 1; } 20% { transform: scale(1.06); } 28% { transform: scale(1); } 100% { transform: scale(1.04); } }

/* phones (user 2026-11-21: 「鑽地系統介面在手機版太大了 縮小一點」): a narrow strip, smaller type, no tips */
html.phone #dig-ui { width: min(250px, 56vw); padding: 4px 7px 5px; border-radius: 9px; bottom: 150px; }
html.phone .dg-top { font-size: 10px; gap: 5px; margin-bottom: 3px; }
html.phone .dg-top .ii { width: 14px; height: 14px; }
html.phone .dg-top .dg-fit { font-size: 9px; padding: 0 3px; }
html.phone .dg-top .dg-fit.up:not(.sense), html.phone .dg-top .dg-fit.down { display: none; }
html.phone .dg-x { font-size: 13px; padding: 0 4px; }
html.phone .dg-gauge { height: 16px; border-radius: 4px; }
html.phone .dg-lb { line-height: 16px; font-size: 9px; }
html.phone .dg-depth { height: 11px; margin-top: 3px; }
html.phone .dg-depth span { font-size: 9px; line-height: 11px; }
html.phone .cdm { height: 9px; margin-top: 3px; }
html.phone .cdm em { font-size: 8px; line-height: 9px; }
html.phone .dg-tip { display: none; }
/* the mode sign sits at the top centre on phones, clear of the shortcut bar */
html.phone #dig-mode { top: calc(44px + env(safe-area-inset-top, 0px)); bottom: auto; gap: 5px; padding: 2px 3px 2px 7px; font-size: 10px; }
html.phone #dig-mode img { width: 14px; height: 14px; }
html.phone #dig-mode #dm-how { display: none; }
html.phone #dig-mode .cdm { width: 64px; height: 12px; }
html.phone #dig-mode .cdm em { line-height: 12px; font-size: 8px; }
html.phone #dig-mode button { width: 22px; height: 22px; line-height: 22px; font-size: 11px; }
html.phone .dig-crazy-flash b { font-size: 30px; letter-spacing: 2px; }
html.phone .dig-crazy-flash span { font-size: 12px; }
@media (max-height: 540px) and (orientation: landscape) {
  html.phone #dig-ui { bottom: 84px; }
  html.phone #dig-mode { top: calc(40px + env(safe-area-inset-top, 0px)); bottom: auto; }
}

/* 2026-11-26 (user: 「鑽地的時候是有動畫的」): the client's own gauge (DrillUI.nri, js/dig.js drawArt) in place of the web's
   two bars once its picture is loaded: the boy's face, the gears turning while the drill bites, pressure and depth */
#dg-art { display: none; width: 320px; max-width: 100%; height: auto; margin: 0 auto; image-rendering: pixelated; }
#dig-ui.art #dg-art { display: block; }
#dig-ui.art .dg-gauge, #dig-ui.art .dg-depth { display: none; }
html.phone #dig-ui.art #dg-art { width: 240px; }
/* 2026-11-26 (user: 「這樣好醜 不需要背景框 直接顯示在畫面上 然後小一點 現在太大了」): with the game's own gauge the dark
   box goes — the gauge, the drill's name / life line and the 瘋狂值 bar stand straight on the map (text with a dark edge),
   and all of it smaller: computers 240 px wide (was 320), phones 180 (was 240) */
#dig-ui.art { width: auto; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
#dig-ui.art.on, #dig-ui.art.crazy { border: 0; box-shadow: none; }
#dig-ui.art .dg-top { width: 240px; margin: 0 auto 1px; font-size: 11px; gap: 6px; text-shadow: 0 1px 2px #000, 0 0 3px #000, 0 0 1px #000; }
#dig-ui.art .dg-top .ii { width: 16px; height: 16px; }
#dig-ui.art .dg-x { width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 11px; text-shadow: none; }
#dig-ui.art #dg-art { width: 240px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
#dig-ui.art.crazy #dg-art { filter: drop-shadow(0 0 5px #ff7a2a) drop-shadow(0 0 2px #ff4a10); }
#dig-ui.art .cdm { width: 200px; height: 9px; margin: 1px auto 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
#dig-ui.art .cdm em { font-size: 8px; line-height: 9px; }
#dig-ui.art .dg-tip { margin-top: 2px; text-shadow: 0 1px 2px #000, 0 0 3px #000; color: #e6ebff; }
html.phone #dig-ui.art { padding: 0; }
html.phone #dig-ui.art .dg-top { width: 180px; font-size: 10px; }
html.phone #dig-ui.art #dg-art { width: 180px; }
html.phone #dig-ui.art .cdm { width: 150px; height: 11px; }
html.phone #dig-ui.art .cdm em { font-size: 8px; line-height: 11px; }
/* css/account.css?v=16 */
/* login and character choice (js/account.js) */
#acct { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: #0d1220 url("../assets/misc/login.jpg?v=4") center/cover no-repeat; overflow: auto; }
#acct::before { content: ""; position: fixed; inset: 0; background: rgba(8, 12, 28, .55); }
.acct-card { position: relative; width: min(460px, 100%); background: rgba(255, 255, 255, .96); border-radius: 14px; padding: 22px 22px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45); color: #23283b; font-family: "Microsoft JhengHei", sans-serif; }
.acct-card h1 { margin: 0 0 6px; font-size: 24px; color: #3e5bd6; }
.acct-card h1 small { font-size: 14px; color: #8a90a8; font-weight: normal; }
.acct-sub { margin: 4px 0 12px; color: #5b6177; font-size: 13px; }
.acct-sub a { color: #3e5bd6; cursor: pointer; margin-left: 6px; }
.acct-card label { display: block; margin: 8px 0; font-size: 13px; color: #4a5068; }
.acct-card input:not([type="radio"]) { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 9px 10px; border: 1px solid #c9d0ec;
  border-radius: 8px; font: inherit; font-size: 15px; }
.acct-card input:focus { outline: 2px solid #9fb1ff; border-color: #6b83ea; }
.acct-btns { display: flex; gap: 8px; margin-top: 12px; }
.acct-card button { flex: 1; padding: 9px 12px; border: 0; border-radius: 8px; background: #4566e6; color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.acct-card button.alt { background: #e6e9f5; color: #3a4058; }
.acct-card button:hover { filter: brightness(1.08); }
.acct-msg { min-height: 1.4em; margin: 10px 0 0; color: #d0454c; font-size: 13px; }
.acct-chars { display: grid; gap: 8px; margin-bottom: 10px; }
.acct-char { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #dfe3f3; border-radius: 10px; }
.acct-char img { width: 44px; height: 44px; object-fit: contain; background: #eef1fb; border-radius: 8px; }
.acct-char > div { flex: 1; }
.acct-char .sub { color: #7a8099; font-size: 12px; }
.acct-char button { flex: 0 0 auto; padding: 6px 12px; font-size: 14px; }
.acct-card details { margin-top: 6px; }
.acct-card summary { cursor: pointer; color: #3e5bd6; font-weight: bold; margin-bottom: 8px; }
.acct-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.acct-pick label { margin: 0; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border: 2px solid #e2e6f4; border-radius: 10px; cursor: pointer; text-align: center; }
.acct-pick label:has(input:checked) { border-color: #4566e6; background: #eef2ff; }
.acct-pick input { position: absolute; opacity: 0; pointer-events: none; }
.acct-pick img { width: 48px; height: 48px; object-fit: contain; }
.acct-pick span { font-size: 13px; color: #23283b; }
.acct-pick small { display: block; font-size: 10px; color: #7a8099; }
@media (max-width: 420px) { .acct-pick { grid-template-columns: repeat(2, 1fr); } }

/* ---------- the creation screen over the whole window (js/account.js createScreen; art from tools/createui.py) ---------- */
#acct.mk { display: block; padding: 0; background: #7fb6e8 url("../assets/ui/create/bg.jpg?v=3") center/cover no-repeat; overflow: hidden; }
#acct.mk::before { display: none; }
/* 2026-12-01 (user: 「每個角色點下去位置都不一樣 能調整成每個角色按鈕都在固定位置嗎」): #acct keeps the title screens'
   justify-items: center, which newer Chrome applies to a block box too — .mk-wrap shrank to its content and was centred,
   and the middle column (1fr = at least the picture) followed each picture's width, so the faces and the form moved with
   every character. Now the box has its own width (centred, at most 1560px) and the picture's column is minmax(0, 1fr):
   the faces and the form stay put, the picture fits inside its column. */
#acct.mk { justify-items: normal; place-items: normal; }
.mk-wrap { position: relative; height: 100%; width: min(100%, 1560px); margin: 0 auto; display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(300px, 360px); grid-template-rows: 1fr auto;
  font-family: "Microsoft JhengHei", sans-serif; color: #23283b; }
.mk-art { min-width: 0; }
/* left: the face rows */
.mk-left { grid-column: 1; grid-row: 1; z-index: 2; display: flex; flex-direction: column; gap: 10px; padding: 18px 0 0; }
.mk-row { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 0; border-radius: 0 12px 12px 0; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 55%, transparent)); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.mk-type { width: 54px; display: flex; flex-direction: column; align-items: center; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.mk-type b { font-size: 17px; } .mk-type small { font-size: 8px; letter-spacing: 1px; }
.mk-face { position: relative; width: 58px; height: 58px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.mk-face img { width: 54px; height: 54px; border-radius: 6px; transition: transform .12s; }
.mk-face img.on { display: none; width: 58px; height: 58px; }
.mk-face.sel img { display: none; } .mk-face.sel img.on { display: block; }
.mk-face:hover img { transform: translateY(-2px); }
.mk-face.lock { cursor: default; opacity: .85; }
/* middle: the illustration, the description over its lower left */
.mk-art { grid-column: 1 / 3; grid-row: 1 / 3; z-index: 1; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; overflow: hidden; }
.mk-art img { height: min(100vh, 900px); max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .3)); }
.mk-info { grid-column: 1 / 3; grid-row: 1; align-self: end; justify-self: start; z-index: 3; width: min(430px, 46vw); margin: 0 0 14px 10px; padding: 0 0 10px;
  border-radius: 10px; background: rgba(88, 40, 140, .72); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); overflow: hidden; }
.mk-name { padding: 6px 14px; font-size: 30px; font-weight: 900; font-style: italic; letter-spacing: 1px; background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,.6));
  color: #4b2a7a; -webkit-text-stroke: 0; }
.mk-name small { margin-left: 8px; font-size: 18px; color: #6b4aa0; }
.mk-tj { display: flex; gap: 18px; padding: 8px 14px 4px; font-size: 17px; }
.mk-tj b { color: #ffd34d; }
.mk-info ul { margin: 2px 0 0; padding: 0 14px 0 30px; font-size: 12.5px; line-height: 1.55; }
.mk-info li b { color: #ffe08a; font-weight: normal; }
/* right: title, sprite + name, radar, buttons */
.mk-right { grid-column: 3; grid-row: 1 / 3; z-index: 3; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px 6px; overflow: auto; }
.mk-title { font: italic 900 34px/1 "Arial Black", "Segoe UI", sans-serif; color: #fff; text-align: right; text-shadow: 0 2px 0 #4b6fb5, 0 4px 10px rgba(0, 0, 0, .35); }
.mk-title small { display: block; margin-top: 4px; font: 12px "Microsoft JhengHei", sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.mk-card { padding: 10px; border-radius: 10px; background: rgba(110, 120, 190, .85); border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.mk-prev { height: 110px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(#eef3fb, #dfe7f7); }
.mk-prev img { height: 96px; image-rendering: pixelated; }
.mk-lab { display: block; margin: 8px 0 4px; padding: 3px 0; text-align: center; color: #fff; font-weight: bold; border-radius: 6px; background: rgba(40, 50, 110, .55); font-size: 13px; }
.mk-radar .mk-lab { margin-top: 0; }
#acct.mk input#acct-name { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 2px solid #fff; border-radius: 6px; font: inherit; font-size: 15px; }
.mk-radar .st-pick { background: #fff; border-radius: 8px; padding: 6px; }
.mk-msg { margin: 0; min-height: 1.2em; color: #fff !important; text-shadow: 0 1px 2px #a00; font-weight: bold; }
.mk-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; }
.mk-btns button { min-width: 96px; padding: 9px 16px; border: 2px solid #fff; border-radius: 8px; background: #4566e6; color: #fff; font: inherit; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.mk-btns button.alt { background: #8d98bd; }
/* narrow screens: one column that scrolls — faces, illustration with its text, then the form */
@media (max-width: 860px) and (orientation: portrait) {   /* phones are landscape only: they keep the three columns (css/mobile.css makes them fit) */
  #acct.mk { overflow: auto; }
  .mk-wrap { height: auto; min-height: 100%; grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .mk-left { grid-column: 1; grid-row: 1; padding-top: 10px; }
  .mk-row { justify-content: flex-start; margin-right: 10px; }
  .mk-art { grid-column: 1; grid-row: 2; position: relative; height: 46vh; }
  .mk-art img { height: 100%; }
  .mk-info { grid-column: 1; grid-row: 2; width: auto; max-width: calc(100% - 20px); margin: 0 10px 8px; align-self: end; }
  .mk-name { font-size: 22px; }
  .mk-right { grid-column: 1; grid-row: 3; padding: 10px; overflow: visible; }
  .mk-title { font-size: 24px; text-align: left; }
}/* the background picture carries the "Create Character" title itself: leave room for it, no second title */
.mk-title { font-size: 0; min-height: 96px; }
.mk-title small { font-size: 12px; margin-top: 82px; }
.mk-right { gap: 8px; overflow: hidden; }
.mk-prev { height: 84px; } .mk-prev img { height: 76px; }
.mk-radar .st-note { display: none; }
.mk-radar .st-gg-big { margin: 0 auto; }
.mk-art img { height: min(96vh, 860px); }
@media (max-height: 700px) { .mk-title { min-height: 60px; } .mk-title small { margin-top: 48px; } .mk-right { overflow: auto; } }
@media (max-width: 860px) and (orientation: portrait) { .mk-title { min-height: 0; } .mk-title small { margin-top: 0; font-size: 13px; text-align: left; } .mk-right { overflow: visible; } }/* the illustration stands between the faces and the form (the faces must not cover its head) */
@media (min-width: 861px), (orientation: landscape) { .mk-art { grid-column: 2; margin-left: -40px; } }/* 髮色 swatches (tools/hair.py) */
.mk-hair { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; padding: 6px; border-radius: 6px; background: #fff; }
.mk-sw { aspect-ratio: 1; min-width: 0; padding: 0; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 0 1px #b9c0d8; cursor: pointer; }
.mk-sw:hover { transform: scale(1.12); }
.mk-sw.on { box-shadow: 0 0 0 2px #23283b; border-color: #fff; }
.mk-none { grid-column: 1 / -1; color: #8a90a8; font-size: 12px; text-align: center; }/* the buttons stay at the bottom right like the client's; the column above may scroll on short screens */
@media (min-width: 861px), (orientation: landscape) {
  .mk-right { overflow-y: auto; padding-bottom: 70px; }
  .mk-btns { position: absolute; right: 16px; bottom: 14px; z-index: 4; margin: 0; }
  .mk-msg { position: absolute; right: 16px; bottom: 64px; z-index: 4; }
}
.mk-prev { height: 76px; } .mk-prev img { height: 70px; }/* the radar inside its card: the corner boxes and the gear sized to the card (the svg scales with its box), the
   + / - rows kept (compact) — the dots are clickable as well */
.mk-radar .st-pick { padding: 6px 4px; overflow: hidden; }
.mk-radar .st-gg-big { grid-template-columns: 52px minmax(0, 1fr) 52px; column-gap: 4px; width: 100%; margin: 0; }
.mk-radar .st-gg-mid { width: 100% !important; max-width: 190px; height: auto !important; aspect-ratio: 174 / 178; justify-self: center; }
.mk-radar .st-gg-box span { font-size: 12px; }
.mk-radar .st-gg-box b { font-size: 18px; padding: 1px 0 3px; }
.mk-radar .st-gg-ic { width: 24px; height: 24px; }
.mk-radar .st-axes { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-top: 4px; font-size: 12px; }
.mk-radar .st-axes span { display: flex; align-items: center; gap: 4px; }
.mk-radar .st-axes b { width: 2.4em; }
.mk-radar .st-axes button { width: 24px; height: 22px; padding: 0; border: 1px solid #c9d0ec; border-radius: 5px; background: #fff; color: #3a4058; font-size: 14px; line-height: 1; cursor: pointer; }
.mk-radar .st-axes button:disabled { opacity: .35; cursor: default; }
.mk-radar .st-axes i { font-style: normal; width: 1.2em; text-align: center; font-weight: bold; }/* the walking preview with its turn buttons */
.mk-prev { position: relative; display: flex; align-items: stretch; justify-content: space-between; gap: 4px; height: 120px; padding: 0 4px; }
.mk-prev canvas { flex: 1; min-width: 0; height: 100%; }
.mk-rot { align-self: center; width: 30px; height: 44px; padding: 0; border: 2px solid #fff; border-radius: 8px; background: rgba(69, 102, 230, .85); color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); }
.mk-rot:hover { background: #4566e6; }
.mk-rot:active { transform: scale(.92); }
@media (max-height: 800px) and (min-width: 861px) { .mk-prev { height: 96px; } }
/* ---------- the title screens: 登入 / 註冊 / 選擇伺服器 / 選擇角色 (js/account.js stage()) ---------- */
#acct.ttl { --ink: #13235e; --gold: #ffc93a; --pink: #ff6fb8; --sky: #5fd0ff; display: block; justify-items: stretch; place-items: stretch; padding: 0; background: #0b1230; overflow: hidden auto;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif; color: #fff; }
#acct.ttl::before { display: none; }
.ttl-bg { position: fixed; inset: -20px; background: url("../assets/misc/login.jpg?v=4") center/cover no-repeat; animation: ttl-pan 40s ease-in-out infinite alternate; }
.ttl-bg::after { content: ""; position: absolute; inset: 0;
  /* the art is a light watercolor (login.jpg): only the edges and the footer strip are darkened */
  background: radial-gradient(ellipse at 50% 40%, rgba(60, 40, 30, 0) 45%, rgba(50, 32, 40, .35) 100%), linear-gradient(rgba(0, 0, 0, 0) 75%, rgba(30, 20, 40, .45)); }
@keyframes ttl-pan { from { transform: scale(1.04) translateX(-10px); } to { transform: scale(1.1) translateX(10px); } }
.ttl-sparks { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.ttl-sparks i { position: absolute; left: var(--x); bottom: -20px; width: 10px; height: 10px; transform: scale(var(--s)); opacity: 0;
  background: radial-gradient(circle, #fff 0 20%, rgba(255, 230, 150, .7) 35%, transparent 70%); border-radius: 50%;
  animation: ttl-rise var(--d) linear var(--w) infinite; }
@keyframes ttl-rise { 0% { opacity: 0; transform: translateY(0) scale(var(--s)); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(30px, -105vh) scale(var(--s)); } }
.ttl-wrap { position: relative; width: 100%; min-height: 100%; box-sizing: border-box;   /* full width: status.css / mobile.css centre #acct's items */ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 16px 10px; }
@media (max-height: 820px) { .ttl-logo { width: min(440px, 80vw); } }
.ttl-logo { width: min(560px, 88vw); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .45)); animation: ttl-float 5s ease-in-out infinite; }
@keyframes ttl-float { 50% { transform: translateY(-6px); } }
.ttl-foot { flex-basis: 100%; text-align: center; font-size: 11px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 3px rgba(20, 10, 30, .9); pointer-events: none; }
/* the three steps */
.ttl-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.ttl-steps li { display: flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border-radius: 99px; background: rgba(10, 18, 60, .8); color: rgba(255, 255, 255, .75); }
.ttl-steps b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 11px; }
.ttl-steps li.on { color: #fff; background: linear-gradient(90deg, #2f86ff, #5a45e0); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.ttl-steps li.on b { background: var(--gold); color: var(--ink); }
.ttl-steps li.done b { background: #48c774; }
/* the glass panel */
.ttl-panel { position: relative; width: min(380px, 100%); box-sizing: border-box; padding: 18px 22px 16px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(40, 60, 150, .82), rgba(22, 26, 80, .9)); border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 4px rgba(19, 35, 94, .6), 0 16px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .35); backdrop-filter: blur(6px);
  animation: ttl-in .35s ease-out; }
@keyframes ttl-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.ttl-panel h2, .cs-head h2 { margin: 0 0 12px; text-align: center; font-size: 19px; letter-spacing: 3px; color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(95, 208, 255, .6); }
.ttl-panel h2::before, .ttl-panel h2::after { content: "✦"; margin: 0 8px; color: var(--gold); font-size: 13px; vertical-align: 2px; }
.ttl-field { position: relative; display: block; margin: 0 0 10px; }
.ttl-field > span { display: block; margin: 0 0 4px 2px; font-size: 12.5px; font-weight: bold; color: #cfe3ff; }
.ttl-field input { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 10px;
  background: rgba(255, 255, 255, .94); color: #1d2550; font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.ttl-field input:focus { outline: 0; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(95, 208, 255, .35); }
.ttl-field em { display: block; min-height: 0; margin: 3px 2px 0; font-size: 11.5px; font-style: normal; }
.ttl-field em.good { color: #8ff0b0; } .ttl-field em.bad { color: #ffb0c4; }
.ttl-eye { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 15px; cursor: pointer; opacity: .45; }
.ttl-eye.on, .ttl-eye:hover { opacity: 1; }
.ttl-check { display: flex; align-items: center; gap: 7px; margin: 4px 0 12px; font-size: 13px; color: #dfe9ff; cursor: pointer; user-select: none; }
.ttl-check input { width: 16px; height: 16px; accent-color: var(--pink); }
.ttl-btn { padding: 9px 16px; border: 2px solid #fff; border-radius: 10px; background: linear-gradient(#7fd8ff, #2f86ff 55%, #3d5ee0); color: #fff; font: inherit; font-size: 14px;
  font-weight: bold; text-shadow: 0 1px 0 rgba(19, 35, 94, .6); cursor: pointer; box-shadow: 0 3px 0 var(--ink), 0 6px 14px rgba(0, 0, 0, .3); transition: transform .08s, filter .12s; }
.ttl-btn:hover:not(:disabled) { filter: brightness(1.1); }
.ttl-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink), 0 3px 8px rgba(0, 0, 0, .3); }
.ttl-btn:disabled { filter: grayscale(.8) brightness(.8); cursor: default; }
.ttl-btn.big { width: 100%; padding: 11px 16px; font-size: 17px; letter-spacing: 2px; background: linear-gradient(#ffb4dc, var(--pink) 50%, #d8338f); }
.ttl-btn.alt { background: linear-gradient(#a9b6e8, #6a78b8); }
.ttl-btn.danger { background: linear-gradient(#ff9a9a, #d84b5c); }
.ttl-row { display: flex; gap: 8px; align-items: stretch; }
.ttl-row .ttl-btn.big { flex: 1; width: auto; }
#acct.ttl .acct-msg { min-height: 1.3em; margin: 8px 0 0; text-align: center; color: #ffb0c4; font-size: 13px; font-weight: bold; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
#acct.ttl .acct-msg.ok { color: #9ff0c0; }
.ttl-links { display: flex; justify-content: center; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .25); font-size: 13px; color: #b9c8ef; }
.ttl-links a { color: var(--gold); font-weight: bold; text-decoration: none; }
.ttl-links a:hover { text-decoration: underline; }
/* 帳號安全 (2026-11-25): code rows, the lock pad, notes */
.ttl-note { margin: 0 0 10px; font-size: 12.5px; line-height: 1.55; color: #dfe9ff; }
.ttl-code { display: flex; gap: 8px; align-items: flex-end; }
.ttl-code .ttl-field { flex: 1; min-width: 0; }
.ttl-code .ttl-btn { margin-bottom: 10px; padding: 9px 10px; font-size: 13px; white-space: nowrap; }
.ttl-pin input { display: block; width: 100%; box-sizing: border-box; padding: 10px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 10px;
  background: rgba(255, 255, 255, .94); color: #1d2550; font: inherit; font-size: 24px; letter-spacing: 10px; text-align: center; }
.ttl-padkeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.ttl-padkeys button { padding: 12px 0; border: 2px solid rgba(255, 255, 255, .6); border-radius: 10px; background: linear-gradient(#a9b6e8, #6a78b8);
  color: #fff; font: inherit; font-size: 18px; font-weight: bold; cursor: pointer; touch-action: manipulation; }
.ttl-padkeys button:active { transform: translateY(2px); }
.ttl-sec { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 13.5px; color: #fff; }
.ttl-sec dt { color: #b9c8ef; } .ttl-sec dd { margin: 0; } .ttl-sec .bad { color: #ffb0c4; }
.ttl-reg .ttl-row { flex-wrap: wrap; margin: 4px 0 2px; } .ttl-reg .ttl-row .ttl-btn { flex: 1 1 auto; font-size: 13px; padding: 8px 10px; }
/* register: password strength + rules */
.ttl-meter { display: flex; align-items: center; gap: 8px; margin: -4px 2px 10px; font-size: 11.5px; color: #cfe3ff; }
.ttl-meter i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); position: relative; overflow: hidden; }
.ttl-meter i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; transition: width .2s, background .2s; }
.ttl-meter[data-s="1"] i::after { width: 25%; background: #ff6b81; } .ttl-meter[data-s="2"] i::after { width: 50%; background: #ffc93a; }
.ttl-meter[data-s="3"] i::after { width: 75%; background: #5fd0ff; } .ttl-meter[data-s="4"] i::after { width: 100%; background: #48c774; }
.ttl-meter span { min-width: 2.5em; }
.ttl-rules { margin: 0 0 6px; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .2); font-size: 12px; color: #dfe9ff; }
.ttl-rules summary { cursor: pointer; font-weight: bold; color: var(--gold); }
.ttl-rules ul { margin: 6px 0 2px; padding-left: 18px; line-height: 1.6; }
/* server select */
.ttl-srv { width: min(460px, 100%); }
.srv-list { display: grid; gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
.srv { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 12px; cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(255, 255, 255, .92), rgba(225, 235, 255, .88)); color: var(--ink); font: inherit; animation: ttl-in .3s ease-out calc(var(--i) * 60ms) backwards; transition: transform .1s; }
.srv:hover { transform: translateX(3px); }
.srv.sel { border-color: var(--gold); background: linear-gradient(90deg, #fff7c8, #ffe27a); box-shadow: 0 0 0 3px rgba(255, 201, 58, .45), 0 0 18px rgba(255, 201, 58, .5); }
.srv.down { filter: grayscale(.9); opacity: .7; }
.srv-gem { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; font: 900 15px/1 "Segoe UI", sans-serif; color: #fff;
  background: linear-gradient(#7fd8ff, #2f86ff 60%, #5a45e0); clip-path: polygon(50% 0, 100% 27%, 100% 73%, 50% 100%, 0 73%, 0 27%); text-shadow: 0 1px 0 var(--ink); }
.srv.sel .srv-gem { background: linear-gradient(#fff6b8, #ffc93a 50%, #f09a12); color: var(--ink); text-shadow: none; }
.srv-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srv-name b { font-size: 16px; }
.srv-name small { font-size: 11px; color: #5a6390; letter-spacing: 1px; }
.srv-load { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; font-size: 13px; font-weight: bold; }
.srv-load em { font-style: normal; }
.srv-load small { margin-left: 4px; font-size: 11px; font-weight: normal; color: #5a6390; }
.ttl-srv .ttl-row { margin-top: 10px; }
/* character select */
.cs-wrap { width: min(1060px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; animation: ttl-in .35s ease-out; }
#acct.ttl-chars .ttl-logo { width: min(340px, 60vw); }
.cs-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; justify-content: center; }
.cs-head h2 { margin: 0; font-size: 22px; }
.cs-head span { font-size: 13px; color: #dfe9ff; }
.cs-gm { padding: 1px 6px; border-radius: 4px; background: var(--gold); color: var(--ink); font-style: normal; font-weight: bold; font-size: 11px; }
.cs-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; width: 100%; }
.cs-card { position: relative; aspect-ratio: 160 / 230; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; outline: 0;
  animation: ttl-in .35s ease-out calc(var(--i) * 50ms) backwards; transition: transform .15s, filter .15s; }
.cs-card:hover { transform: translateY(-4px); }
.cs-frame { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45)); }
.cs-card.sel { transform: translateY(-8px) scale(1.04); z-index: 1; }
.cs-card.sel .cs-frame { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 12px var(--gold)) drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.cs-card.sel::after { content: "▼"; position: absolute; left: 50%; top: -22px; transform: translateX(-50%); color: var(--gold); font-size: 16px; text-shadow: 0 0 6px rgba(0, 0, 0, .6); animation: ttl-float 1s ease-in-out infinite; }
/* the character's canvas is larger than its card: the body sits in the card's window at one scale for all cards
   (account.js standing()), wings / weapons / hats may hang out over the frame and the neighbours; clicks pass through */
.cs-spr { position: absolute; left: -75%; top: -75%; width: 250%; height: 180%; z-index: 1; pointer-events: none; }
.cs-plate, .cs-play { z-index: 2; }
#acct.ttl-chars .ttl-logo, #acct.ttl-chars .ttl-steps, .cs-head { position: relative; z-index: 3; }   /* tall wings pass behind the headings */
#acct.ttl-chars .ttl-wrap { overflow-x: clip; }   /* the outer cards' canvases end at the window's edge: nothing to scroll sideways to */
.cs-plate { position: absolute; left: 8%; right: 8%; bottom: 7%; padding: 4px 2px; border-radius: 6px; background: rgba(19, 35, 94, .82); text-align: center; line-height: 1.2; }
.cs-plate b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-plate small { font-size: 11px; color: var(--gold); font-weight: bold; }
.cs-play { position: absolute; right: 4%; top: 4%; width: 28px; height: 28px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--pink); color: #fff;
  font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.cs-card:hover .cs-play, .cs-card.sel .cs-play { opacity: 1; }
/* the empty slot: the client's diamond card, the old mark covered by the 星夢物語 logo, 「＋ 建立角色」 on its plate */
.cs-mark { position: absolute; left: 4%; top: 36%; width: 92%; padding: 6px 0; border-radius: 8px; background: rgba(255, 255, 255, .85); box-shadow: 0 0 10px rgba(255, 255, 255, .8); }
.cs-card.empty span { position: absolute; left: 8%; right: 8%; bottom: 7%; padding: 5px 2px; border-radius: 6px; background: rgba(19, 35, 94, .7); text-align: center;
  font-size: 13px; font-weight: bold; color: #fff; transition: background .15s; }
.cs-card.empty:hover span, .cs-card.empty:focus-visible span { background: var(--pink); }
.cs-info { width: min(560px, 100%); box-sizing: border-box; padding: 10px 16px; border-radius: 12px; background: linear-gradient(160deg, rgba(40, 60, 150, .82), rgba(22, 26, 80, .9));
  border: 2px solid rgba(255, 255, 255, .5); box-shadow: 0 0 0 3px rgba(19, 35, 94, .5); display: flex; align-items: center; gap: 18px; }
.cs-info p { margin: 0; width: 100%; text-align: center; color: #dfe9ff; }
.cs-name { flex: 0 0 auto; max-width: 40%; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(255, 111, 184, .7); overflow: hidden; text-overflow: ellipsis; }
.cs-info dl { flex: 1; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 3px 10px; margin: 0; font-size: 12.5px; }
.cs-info dt { color: #9fb3e8; } .cs-info dd { margin: 0; color: #fff; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-btns { width: min(560px, 100%); }
.cs-btns .ttl-btn { font-size: 13px; padding: 8px 10px; }
.cs-btns .ttl-btn.big { font-size: 17px; }
@media (max-width: 760px) {
  .cs-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 420px; }
  .cs-info { flex-direction: column; align-items: stretch; gap: 6px; } .cs-name { max-width: none; text-align: center; }
  .cs-btns { flex-wrap: wrap; } .cs-btns .ttl-btn.big { flex-basis: 100%; order: -1; }
}
/* short screens (phones are landscape, ~460 px tall): smaller logo, the panel beside it */
@media (max-height: 560px) {
  .ttl-wrap { padding: 8px 12px 24px; gap: 6px; }
  .ttl-logo { width: min(300px, 40vw); }
  #acct.ttl-chars .ttl-logo { display: none; }
  .ttl-steps { font-size: 11px; }
  .ttl-panel { padding: 10px 16px 10px; }
  .ttl-panel h2 { margin-bottom: 6px; font-size: 16px; }
  .ttl-field { margin-bottom: 6px; } .ttl-field input { padding: 7px 10px; }
  .ttl-check { margin: 2px 0 6px; }
  .ttl-btn.big { padding: 8px 14px; font-size: 15px; }
  .ttl-links { padding-top: 6px; margin-top: 2px; }
  .ttl-rules { display: none; }
  .cs-cards { width: min(100%, calc((100vh - 230px) * 160 / 230 * 6 + 50px)); gap: 10px; margin-top: 14px; }
  #acct.ttl-chars .ttl-steps, #acct.ttl-chars .ttl-foot { display: none; }
  .cs-wrap { gap: 6px; }
  .cs-info { width: min(760px, 100%); padding: 5px 12px; } .cs-name { font-size: 18px; }
  .cs-info dl { grid-template-columns: repeat(3, auto 1fr); }
  #acct.ttl-chars .acct-msg { margin: 0; min-height: 0; } #acct.ttl-chars .acct-msg:empty { display: none; }
  .cs-btns { width: min(760px, 100%); }
}
@media (max-height: 560px) and (orientation: landscape) and (min-width: 640px) {
  #acct.ttl-login .ttl-wrap, #acct.ttl-reg .ttl-wrap, #acct.ttl-server .ttl-wrap { flex-direction: row; flex-wrap: wrap; align-content: center; column-gap: 28px; }
  #acct.ttl-login .ttl-steps, #acct.ttl-reg .ttl-steps, #acct.ttl-server .ttl-steps { display: none; }
  .srv-list { max-height: 52vh; }
}
@media (prefers-reduced-motion: reduce) { .ttl-bg, .ttl-logo, .ttl-sparks i, .cs-card.sel::after { animation: none; } }
/* the loading screen's logo (index.html #loading) */
#loading .load-logo { position: absolute; left: 50%; top: 9vh; transform: translateX(-50%); width: min(520px, 80vw); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5)); }
@media (max-height: 560px) { #loading .load-logo { top: 4vh; width: min(320px, 50vw); } }

/* css/mail.css?v=3 */
/* the mailbox window (js/mail.js) */
#win-mail { width: 400px; }
#mail-btn { position: relative; }
#mail-btn .mail-pip { top: -4px; right: -4px; background: #f44; color: #fff; border-color: #fff; }
/* the top bar's 信箱 with letters waiting (js/mail.js badge, 2026-11-30): a red count on the envelope's corner and a small bob */
#menu > button[data-top="mail"] .mail-pip { top: 0; right: 4px; left: auto; background: #f44; color: #fff; border-color: #fff; font-weight: 700; padding: 0 3px; }
#menu > button[data-top="mail"].has-mail img { animation: ts-mail-bob 1.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes ts-mail-bob { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 78% { transform: translateY(-3px) rotate(-8deg); } 86% { transform: translateY(-1px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { #menu > button[data-top="mail"].has-mail img { animation: none; } }
.mail-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.mail-tabs button, .mail-acts button, .mail-form button:not(.chip), .mail-row button { font-size: 12px; padding: 2px 10px; border-radius: 10px; border: 1px solid #c9d0ec; background: #fff; color: var(--ink); }
.mail-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mail { border: 1px solid #d6dbef; border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; background: #fff; }
.mail.new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mail-head { display: flex; gap: 6px; align-items: center; }
.mail-head .sub { margin-left: auto; }
.mail-head .sub + .sub { margin-left: 4px; }
.mail-text { margin: 4px 0; white-space: normal; word-break: break-word; }
.mail-att { margin: 4px 0; }
.mail-acts { display: flex; gap: 6px; justify-content: flex-end; }
.mail-acts button.buy, #mail-send { background: #f0a020; border-color: #f0a020; color: #fff; }
.chip.sale { background: #ffe2b0; } .chip.gm { background: #ffd0f0; } .chip.gold { background: #fff0a8; }
.mail-form label { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.mail-form label > input, .mail-form label > textarea { flex: 1; font: inherit; padding: 3px 6px; border: 1px solid #c9d0ec; border-radius: 6px; }
.mail-form .mail-n { width: 70px; }
.mail-send { margin: 8px 0; }
.mail-bag { display: flex; flex-wrap: wrap; gap: 4px; max-height: 180px; overflow: auto; }
.mail-bag .chip { border: 0; cursor: pointer; font-size: 12px; padding: 2px 8px; }
.mail-bag .chip:hover { background: var(--accent); color: #fff; }
/* 清單 六-3: 刪除已讀／已領取 */
.mail-clean { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.mail-clean button { padding: 4px 10px; }

/* css/mall.css?v=9 */
/* the item mall window (js/mall.js) */
#windows #win-shop { width: min(900px, calc(100vw - 16px)); }
#win-shop .win-body { max-height: 78vh; }
/* goods on the left; on the right the fitting room, the compact buy box and the cart, staying in view while the list scrolls */
.mall-cols { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 10px; align-items: start; }
.mall-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; max-height: calc(78vh - 64px); overflow-y: auto; }
.mall-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.mall-cash { font-size: 13px; padding: 4px 12px; border-radius: 14px; background: linear-gradient(#fff6d6, #ffe39a); border: 1px solid #f2c34f; color: #7a4c00; }
.mall-cash b { font-size: 15px; margin-left: 4px; }
.mall-top button { font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid #c9d0ec; background: #fff; color: var(--ink); cursor: pointer; }
.mall-top .m-topup { display: inline-flex; align-items: center; gap: 4px; color: var(--sub, #7a7f9f); font-size: 11px; }
.mall-top .m-topup button { border-color: #f2c34f; color: #7a4c00; }
.mall-top .m-logbtn { margin-left: auto; }
/* the window's title bar (js/mall.js bind): 「商城」, the points and ⟳ right after it; 購買紀錄 on the right before ✕ */
#win-shop .win-head span { flex: none; }   /* (every span of a title bar grows by default) */
#win-shop .mall-headbar { display: flex; align-items: center; gap: 6px; font-weight: normal; }
#win-shop .mall-headbar.left { margin-left: 10px; }
#win-shop .mall-headbar.right { margin-left: auto; margin-right: 8px; }
#win-shop .mall-headbar .mall-cash { font-size: 12px; padding: 2px 10px; white-space: nowrap; }
#win-shop .mall-headbar .mall-cash b { font-size: 14px; margin: 0 2px 0 4px; }
#win-shop .mall-headbar button { font: inherit; font-size: 12px; font-weight: normal; width: auto; height: auto; min-height: 0; padding: 3px 12px; border-radius: 12px;
  border: 1px solid #c9d0ec; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; line-height: 1.3; }
#win-shop .mall-headbar .m-logbtn.on { background: #5b74d8; border-color: #5b74d8; color: #fff; }
#win-shop .mall-headbar .m-topup { display: inline-flex; gap: 3px; }
#win-shop .mall-headbar .m-topup button { border-color: #f2c34f; color: #7a4c00; padding: 3px 6px; }
/* 試穿的加入購物車: under the fitting room */
.mall-fit > .m-fitcart { display: block; width: 100%; margin-top: 6px; font-size: 12px; padding: 4px 6px; border-radius: 12px; border: 1px solid #f2c34f; background: #fff6d6; color: #7a4c00; }

/* tabs + groups + sub-groups + search row: fixed at the top of the window body while the goods scroll (js/mall.js .mall-fix);
   solid so the cards passing under it do not show through; the shadow paints over the body's top padding when it sticks */
.mall-fix { position: sticky; top: 0; z-index: 3; background: #fbfcff; box-shadow: 0 -12px 0 #fbfcff, 0 4px 6px -4px rgba(60, 80, 160, .25); padding-bottom: 2px; }
.mall-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid #9fb0ef; }
.mall-tabs b { cursor: pointer; padding: 5px 14px; border-radius: 8px 8px 0 0; background: #e3e7f7; color: var(--ink); font-size: 13px; }
.mall-tabs b.on { background: #5b74d8; color: #fff; }
.mall-groups { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.mall-groups b { cursor: pointer; padding: 2px 10px; border-radius: 11px; background: #fff; border: 1px solid #c9d0ec; font-weight: normal; white-space: nowrap; }
.mall-groups b.on { background: #ffe39a; border-color: #f2c34f; font-weight: bold; }
.mall-groups b i { font-style: normal; font-size: 10px; margin-left: 3px; opacity: .7; }
/* the chosen group's smaller groups (tools/mall.py SUBS) */
.mall-subs { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 6px; padding: 4px 6px; border-radius: 8px; background: #f2f4fd; }
.mall-subs b { cursor: pointer; padding: 1px 9px; border-radius: 10px; border: 1px dashed #b9c2e6; background: #fff; font-weight: normal; font-size: 11px; white-space: nowrap; }
.mall-subs b.on { border-style: solid; border-color: #5b74d8; background: #5b74d8; color: #fff; }
.mall-subs b i { font-style: normal; font-size: 10px; margin-left: 3px; opacity: .7; }
.mall-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.mall-tools .search { flex: 1 1 200px; width: auto; margin: 0; }
.mall-tools select { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d0ec; border-radius: 6px; padding: 5px 4px; }
.mall-tools .m-mine { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.m-count { margin: 2px 0 4px; }

.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.mall-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; min-height: 104px;
  border: 1px solid #d4daf2; border-radius: 8px; background: linear-gradient(#fff, #f2f4fd); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.mall-card:hover { border-color: #8aa0ee; box-shadow: 0 2px 6px rgba(70, 90, 180, .2); }
.mall-card.sel { border: 2px solid #f2b21b; padding: 7px 3px 5px; background: linear-gradient(#fffbea, #fff1c4); }
.mall-card.off { opacity: .6; }
.mall-card .it-ic { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
/* max-width: a centred flex child keeps its one-line width — a long name (第二次轉職水牛服裝箱3) was cut at BOTH ends, the
   box number lost; now it wraps onto its two lines */
.mall-card > b { font-size: 12px; line-height: 1.25; max-height: 2.5em; overflow: hidden; word-break: break-all; max-width: 100%; text-align: center; white-space: normal; }   /* (the card is a <button>: nowrap from the button look) */
.mall-card .m-price { color: #b06d00; font-weight: bold; font-size: 12px; }
.mall-card .m-chips { position: absolute; top: 3px; left: 3px; right: 3px; display: flex; flex-wrap: wrap; gap: 2px; pointer-events: none; }
.mall-card .m-chips i { font-style: normal; font-size: 10px; line-height: 14px; padding: 0 4px; border-radius: 7px; background: #e3e7f7; }
.mall-card .m-chips i.m-new { background: #ff6b6b; color: #fff; font-weight: bold; }
.mall-card .m-chips i.m-no { background: #ddd; color: #666; margin-left: auto; }

.mall-card .m-marks { position: absolute; bottom: 3px; right: 3px; display: flex; gap: 2px; pointer-events: none; }
.mall-card .m-marks i { font-style: normal; font-size: 10px; line-height: 14px; padding: 0 4px; border-radius: 7px; background: #dff3e4; color: #23703f; }
.mall-card .m-marks i.m-incart { background: #ffe39a; color: #7a4c00; }

/* the right column's boxes */
.mall-fit, .mall-buy, .mall-cartbox { border: 1px solid #c9d3f3; border-radius: 8px; background: linear-gradient(#f7f8ff, #eaeefc); padding: 7px 8px; }
.mall-side .sub { font-size: 11px; }
.mall-side button { font: inherit; cursor: pointer; }
/* the fitting room */
.m-fit-head, .m-cart-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.m-fit-head b, .m-cart-head b { font-size: 13px; }
.m-stage { position: relative; height: 130px; border-radius: 6px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 88%, #d9e1fb 0 28%, transparent 29%), linear-gradient(#ffffff, #e3e9fb); border: 1px solid #d4daf2; }
.m-stage canvas { width: 100%; height: 100%; display: block; }
.m-turn { position: absolute; top: 50%; margin-top: -13px; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid #c9d0ec; background: rgba(255,255,255,.85); color: var(--ink); font-size: 11px; }
.m-turn.l { left: 6px; } .m-turn.r { right: 6px; }
.m-tried { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.m-tried .chip { margin: 0; display: inline-flex; align-items: center; gap: 2px; max-width: 100%; background: #dff3e4; }
.m-tried .chip .ii { width: 16px; height: 16px; }
.m-tried .chip button { border: 0; background: none; color: #c0392b; padding: 0 0 0 2px; font-size: 11px; }
.m-fit-tip { margin: 5px 0 0; }
.m-fit-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.m-fit-acts button { flex: 1 1 auto; font-size: 12px; padding: 3px 6px; border-radius: 12px; border: 1px solid #c9d0ec; background: #fff; color: var(--ink); }
.m-fit-acts button.m-hot { flex-basis: 100%; border-color: #f2c34f; background: #fff6d6; color: #7a4c00; }
.m-fit-note { margin: 4px 0 0; }
/* the compact buy box */
.mall-buy.empty { text-align: center; }
.mall-buy.empty p { margin: 4px 0; }
.mall-buy .m-head { display: flex; gap: 6px; align-items: center; }
.mall-buy .m-icon { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; flex: none; background: #fff; border-radius: 6px; border: 1px solid #d4daf2; }
.mall-buy .m-name { font-size: 13px; line-height: 1.25; word-break: break-all; }
.mall-buy .m-stats { margin-top: 3px; color: #23703f; font-size: 11px; }
.mall-buy .m-warn, .mall-cartbox .m-warn { margin-top: 3px; color: #c0392b; font-size: 11px; }
.mall-buy .m-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.mall-side .m-one { font-weight: bold; }
.mall-buy .m-gift { display: flex; align-items: center; gap: 3px; margin-top: 5px; }
.mall-buy .m-to { width: 100%; margin-top: 3px; font: inherit; padding: 3px 6px; border: 1px solid #c9d0ec; border-radius: 6px; color: var(--ink); background: #fff; }
.mall-buy .m-btns { display: flex; gap: 5px; margin-top: 6px; }
.mall-buy .m-btns > button { flex: 1; }
.mall-buy .m-more { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--accent); cursor: pointer; text-decoration: underline; }
.mall-side .m-cart { font-weight: bold; font-size: 12px; padding: 5px 4px; border-radius: 8px; border: 1px solid #f2c34f; background: #fff6d6; color: #7a4c00; }
.mall-side .m-cart:disabled { opacity: .6; cursor: default; }
.mall-side .m-go { font-weight: bold; font-size: 13px; padding: 4px 6px; border: 0; border-radius: 8px; color: #fff;
  background: linear-gradient(#ffb340, #f08a00); box-shadow: 0 2px 0 #c46e00; display: flex; flex-direction: column; align-items: center; }
.mall-side .m-go small { font-size: 10px; font-weight: normal; }
.mall-side .m-go:disabled { background: #bbb; box-shadow: none; cursor: default; }
.mall-side .m-go.wide { width: 100%; margin-top: 5px; }
/* the cart */
.m-cart-head .m-link { margin-left: auto; border: 0; background: none; color: var(--accent); font-size: 11px; text-decoration: underline; padding: 0; }
.m-cart-list { max-height: 190px; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.m-cline { display: flex; align-items: center; gap: 4px; padding: 2px 3px; background: #fff; border-radius: 6px; border: 1px solid #e0e5f6; }
.m-cline .it-ic { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; flex: none; }
.m-cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-cmain b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-cline .m-x { border: 0; background: none; color: #c0392b; padding: 0 2px; font-size: 12px; }
.shop-qty.mini button { width: 18px; height: 20px; font-size: 12px; }
.shop-qty.mini input { width: 28px; height: 20px; font-size: 11px; }
.m-cart-sum { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.m-cart-sum b { color: #b06d00; }
.mall-log .qrow { display: flex; align-items: center; gap: 8px; }
.mall-log .qrow > div { flex: 1; }
.chip.mall { background: #ffe39a; color: #7a4c00; }

@media (max-width: 560px), (max-height: 540px) and (orientation: landscape) {
  .mall-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .mall-card { min-height: 92px; }
  .mall-cols { grid-template-columns: minmax(0, 1fr) 200px; gap: 6px; }
  .m-stage { height: 110px; }
}
/* narrow screens: the right column goes under the goods */
@media (max-width: 600px) {
  .mall-cols { grid-template-columns: 1fr; }
  .mall-side { position: static; max-height: none; }
}

/* css/auto.css?v=7 */
/* 星夢物語 網頁版 — 自動戰鬥頁、自動挖地頁 (js/auto.js) */
#win-autoplay { width: min(830px, calc(100vw - 16px)); }
#win-autoplay .win-body { max-height: min(80vh, 660px); }
#win-autoplay h4 { margin: 0 0 5px; font-size: 13px; }
/* 「間隔（秒）」 said once in the section head instead of on every slot (user 2026-11-27: 「一堆重複的字 寫一次就好」) */
#win-autoplay h4 .ap-h-gap { float: right; font-weight: normal; font-size: 11px; color: #7a83a8; }
/* the pages, picked from the column on the left */
.ap-wrap { display: flex; align-items: flex-start; gap: 10px; }
.ap-tabs { position: sticky; top: 0; flex: none; width: 76px; display: flex; flex-direction: column; gap: 6px; }
.ap-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 6px; border: 1px solid #d3d9ef; border-radius: 8px;
  background: #eef1fb; color: #4a5272; font: inherit; font-size: 12px; font-weight: bold; cursor: pointer; }
.ap-tab img { width: 30px; height: 30px; image-rendering: pixelated; }
.ap-tab:hover { border-color: #9fb0ff; }
.ap-tab.cur { background: #fff; border-color: var(--accent, #5b6ee1); color: var(--accent, #5b6ee1); box-shadow: inset 3px 0 0 var(--accent, #5b6ee1); }
.ap-tab i { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #2fbf5f; box-shadow: 0 0 0 2px rgba(47, 191, 95, .3); animation: ap-blink 1.2s ease-in-out infinite; }
.ap-tab kbd { font: 10px/1.2 monospace; color: #7a83a8; font-weight: normal; }
.ap-tab kbd:empty { display: none; }
.ap-page { flex: 1; min-width: 0; }
/* start / stop and the running state */
.ap-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.ap-sec .ap-top { margin: 4px 0 2px; }
.ap-go { flex: none; min-width: 150px; padding: 8px 14px; border: 0; border-radius: 8px; background: #3fae6a; color: #fff; font: inherit; font-weight: bold; cursor: pointer; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.ap-go.stop { background: #e05656; }
.ap-go:disabled { background: #a9b0c8; cursor: not-allowed; box-shadow: none; }
.ap-go.small { min-width: 0; padding: 5px 10px; font-size: 12px; }
.ap-state { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; background: #eef0f6; border: 1px solid #d6dbec; font-size: 12px; }
.ap-state i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #9aa3c0; }
.ap-state b { flex: none; color: #6b7390; }
.ap-state span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4a5272; }
.ap-state.on { background: #e6f8ec; border-color: #8fd8a6; }
.ap-state.on i { background: #2fbf5f; box-shadow: 0 0 0 3px rgba(47, 191, 95, .25); animation: ap-blink 1.2s ease-in-out infinite; }
.ap-state.on b { color: #1f8a46; }
@keyframes ap-blink { 50% { opacity: .35; } }
/* the sections, in two columns when there is room */
.ap-cols { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; }
.ap-col { flex: 1 1 270px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ap-sec { border: 1px solid #dfe4f7; border-radius: 8px; padding: 7px 9px 6px; background: rgba(255, 255, 255, .55); }
.ap-sec .sub, .ap-foot { margin: 5px 0 0; font-size: 11px; color: #7a83a8; line-height: 1.45; }
.ap-foot a { color: var(--accent, #5b6ee1); cursor: pointer; text-decoration: underline; }
/* 自動補給: a switch, the threshold slider, the potion */
.ap-sup { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; padding: 5px 0; border-top: 1px dashed #e3e7f5; }
.ap-sup:first-of-type { border-top: 0; padding-top: 0; }
.ap-sup.off .ap-pct, .ap-sup.off .ap-pick { opacity: .45; }
.ap-sw { grid-row: span 2; display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 12.5px; }
.ap-pct, .ap-pick { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.ap-pct > span, .ap-pick > span { flex: none; color: #6b7390; }
.ap-pct input[type="range"] { flex: 1; min-width: 60px; accent-color: var(--accent, #5b6ee1); }
.ap-pct b { flex: none; width: 34px; text-align: right; }
.ap-sup .ap-choices { grid-column: 1 / -1; }
/* a picked potion / skill, and the chooser that opens under it */
.ap-sel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #c9d0ec; border-radius: 6px; background: #fff; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.ap-sel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sel small { margin-left: auto; color: #7a83a8; white-space: nowrap; }
.ap-sel i { font-style: normal; color: #7a83a8; }
.ap-sel.open { border-color: var(--accent, #5b6ee1); box-shadow: 0 0 0 2px rgba(91, 110, 225, .2); }
.ap-sel .ii, .ap-chip .ii { flex: none; }
.ap-sk { flex: none; width: 20px; height: 20px; image-rendering: pixelated; }
.ap-auto { color: #3b7a4f; font-weight: bold; }
.ap-none { color: #9aa3c0; }
.ap-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin: 4px 0 2px; padding: 5px; border: 1px solid #dfe4f7; border-radius: 6px; background: #f2f4fc; max-height: 190px; overflow: auto; }
.ap-choices .sub { grid-column: 1 / -1; margin: 2px; }
.ap-chip { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 3px 6px; border: 1px solid #d3d9ef; border-radius: 6px; background: #fff; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.ap-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-chip small { flex-basis: 100%; color: #7a83a8; font-size: 10.5px; }
.ap-chip:hover { border-color: #9fb0ff; }
.ap-chip.on { border-color: var(--accent, #5b6ee1); background: #e9ecff; box-shadow: inset 0 0 0 1px var(--accent, #5b6ee1); }
.ap-chip.mini { display: inline-flex; flex-wrap: nowrap; padding: 3px 9px; }
/* 輔助技能 / 攻擊技能: number, skill, 間隔 */
.ap-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 3px 0; }
.ap-slot.bad .ap-sel { border-color: #e0a0a0; background: #fff4f4; }
.ap-slot .ap-choices { flex-basis: 100%; }
.ap-slot .ap-sel { flex: 1 1 110px; }   /* too narrow for the name: 間隔 goes to a line of its own */
.ap-slot .ap-gap { margin-left: auto; }
.ap-no { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent, #5b6ee1); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.ap-gap { flex: none; display: flex; align-items: center; gap: 2px; font-size: 12px; }
.ap-gap em { margin: 0 2px; color: #6b7390; font-style: normal; }
.ap-gap button { width: 22px; height: 22px; padding: 0; border: 1px solid #c9d0ec; border-radius: 5px; background: #eef1ff; font: inherit; line-height: 1; cursor: pointer; }
.ap-gap input { width: 46px; padding: 2px 3px; border: 1px solid #c9d0ec; border-radius: 5px; font: inherit; text-align: center; }
/* the 自動挖地 page */
.ad-live { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 9px; border: 1px solid #ecdcb4; border-radius: 6px; background: #f8f2e2; color: #6b5a2c; font-size: 12px; }
.ad-live b { color: #8a5a00; }
.ad-last { display: inline-flex; align-items: center; gap: 3px; }
.ad-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; margin-top: 6px; font-size: 12px; }
.ad-kv > span { color: #6b7390; }
.ad-kv small { color: #6b7390; }
.ad-pet { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 4px; font-size: 12.5px; }
.ad-pet small { color: #7a83a8; }
#win-autoplay .warn { color: #c83c3c; }
.ap-list.tall { max-height: 260px; }
.ap-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; font-size: 12px; }
.ap-line select { font: inherit; padding: 2px 4px; border: 1px solid #c9d0ec; border-radius: 5px; }
.ap-line a { margin-left: auto; color: var(--accent, #5b6ee1); cursor: pointer; text-decoration: underline; }
.ap-list { max-height: 170px; overflow: auto; border: 1px solid #dfe4f7; border-radius: 6px; padding: 3px 5px; background: #fff; }
.ap-list.dim { opacity: .55; }
.ap-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; font-size: 12px; cursor: pointer; }
.ap-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row small { color: #7a83a8; }
.ap-row.dim { opacity: .5; cursor: default; }   /* 守護者技能 not learned yet */
.ap-s-awk .ap-row span { flex: none; }
.ap-s-awk .ap-row small { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ap-btn { font-size: 16px; }
#ap-btn.on { background: #e0a030; box-shadow: 0 0 10px #ffcc55; }

/* touch screens: room for a finger */
@media (hover: none), (pointer: coarse) {
  .ap-gap button { width: 30px; height: 30px; }
  .ap-gap input { height: 30px; }
  .ap-sel { min-height: 32px; }
  .ap-pct input[type="range"] { height: 26px; }
}
/* narrow phones (portrait): a slimmer column so the page keeps its width */
@media (max-width: 520px) {
  .ap-wrap { gap: 6px; }
  .ap-tabs { width: 54px; }
  .ap-tab { padding: 5px 2px 4px; font-size: 10.5px; }
  .ap-tab img { width: 24px; height: 24px; }
}
/* phones in landscape (988×460 and 844×382 layouts): wide, the two columns side by side, thinner rows */
@media (max-height: 540px) and (orientation: landscape) {
  #win-autoplay .win-body { max-height: calc(100vh - 46px); max-height: calc(100dvh - 46px); }
  /* 自動戰鬥: three columns — 自動補給 + 攻擊技能 | 輔助技能 | 目標 + 拾取 — so the page fits a 460 px tall screen unscrolled
     (2026-11-25, user: 「自動戰鬥 輔助技能2個改成4個」: 輔助技能's four slots take the middle column by themselves, 攻擊技能
     moved under 自動補給; before: 自動補給 | 輔助 + 攻擊技能 | 目標 + 拾取) */
  #win-autoplay { width: min(1060px, calc(100vw - 12px)); }
  #win-autoplay .ap-p-fight .ap-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; align-items: start; }
  #win-autoplay .ap-p-fight .ap-foot { margin-top: 3px; }
  #win-autoplay .ap-p-fight .ap-col { display: contents; }
  #win-autoplay .ap-p-fight .ap-s-sup { grid-column: 1; grid-row: 1; }
  #win-autoplay .ap-p-fight .ap-s-atk { grid-column: 1; grid-row: 2; }
  #win-autoplay .ap-p-fight .ap-s-buff { grid-column: 2; grid-row: 1 / span 2; }
  #win-autoplay .ap-p-fight .ap-s-tgt { grid-column: 3; grid-row: 1; }
  #win-autoplay .ap-p-fight .ap-s-loot { grid-column: 3; grid-row: 2; }
  #win-autoplay .ap-p-fight .ap-list { max-height: 74px; }
  #win-autoplay .ap-p-fight .ap-s-loot .sub { display: none; }
  #win-autoplay .ap-p-fight .ap-sup { padding: 3px 0; }
  #win-autoplay .ap-slot .ap-sel small { display: none; }   /* the skill's name needs the room more than its Lv */
  .ap-top { margin-bottom: 6px; }
  .ap-go { min-width: 130px; padding: 6px 12px; }
  .ap-tabs { width: 62px; }
  .ap-tab { padding: 5px 3px 4px; font-size: 11px; }
  .ap-tab img { width: 24px; height: 24px; }
  .ap-col { gap: 6px; }
  .ap-sec { padding: 5px 7px 4px; }
  .ap-sec .sub, .ap-foot { font-size: 10.5px; line-height: 1.35; }
  .ap-list { max-height: 120px; }
  .ap-list.tall { max-height: 170px; }
  .ap-choices { max-height: 150px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* css/services.css?v=29 */
/* NPC 服務視窗（js/services.js）：裝備隨機、成長組合 */
.sv-card { border: 1px solid #d6dbef; border-radius: 8px; padding: 8px 10px; margin: 6px 0; background: #fbfcff; }
.sv-head { font-weight: bold; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.sv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0; }
.sv-row > .sub:first-child { min-width: 56px; }
.sv-tab { width: 100%; border-collapse: collapse; font-size: 12px; margin: 4px 0; }
.sv-tab th { text-align: left; font-weight: normal; color: #6b7395; border-bottom: 1px solid #d6dbef; padding: 2px 4px; }
.sv-tab td { padding: 3px 4px; border-bottom: 1px dashed #e3e7f7; vertical-align: middle; }
.sv-tab td .ii, .sv-tab td .it-ic { vertical-align: middle; }
.sv-tab button { font-size: 12px; padding: 1px 10px; border-radius: 10px; border: 1px solid var(--accent, #4566e6); background: var(--accent, #4566e6); color: #fff; cursor: pointer; }
.sv-off td { opacity: .45; }
.sv-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: #e3e7f7; margin-left: 6px; vertical-align: middle; overflow: hidden; }
.sv-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8fb7ff, #ffb347); }
.sv-pcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin: 4px 0 8px; }
.sv-pc { display: flex; gap: 6px; align-items: flex-start; border: 1px solid #d6dbef; border-radius: 6px; padding: 4px 6px; cursor: pointer; background: #fff; }
.sv-pc:hover { border-color: var(--accent, #4566e6); }
.sv-pc.on { border-color: #f0a020; background: #fff4e3; box-shadow: 0 0 0 1px #f0a020 inset; }
.sv-pc-n { min-width: 0; font-size: 12px; }
.sv-pc-n b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-slot { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 34px; padding: 0 4px;
  border: 1px dashed #b9c1e0; border-radius: 6px; font-size: 11px; color: #9aa3c4; background: #fff; }
.sv-slot.on { border: 1px solid #c9a2ff; background: #f5eeff; color: #5b3d8f; }
.sv-slot b { font-size: 12px; }
.chip.sv-mix { background: #efe4ff; }
/* the workbench: slots on top, the bag below */
.sv-bench { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; padding: 8px; border-radius: 8px; background: linear-gradient(#f3f5fd, #e8ecf8); border: 1px solid #d6dbef; margin-bottom: 6px; }
.sv-slotbox { flex: 1 1 140px; display: flex; gap: 6px; align-items: center; padding: 6px; border: 2px dashed #b9c1e0; border-radius: 8px; background: #fff; min-height: 52px; }
.sv-slotbox.on { border-style: solid; border-color: #f0a020; cursor: pointer; }
.sv-slotbox.on:hover { background: #fff4e3; }
.sv-slotpic { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: #eef1fa; color: #9aa3c4; font-size: 20px; }
.sv-slotpic .it-ic { width: 32px; height: 32px; }
.sv-slotlab { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.sv-slotlab b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-go { flex: 1 1 100%; display: flex; gap: 8px; align-items: center; }
.sv-go button { padding: 4px 18px; border-radius: 14px; border: 2px solid #fff; background: #f0a020; color: #fff; font-weight: bold; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sv-go button:disabled { background: #c3c8da; cursor: default; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; margin: 4px 0 8px; }
.sv-cell { position: relative; display: flex; gap: 4px; align-items: center; padding: 3px 5px; border: 1px solid #d6dbef; border-radius: 6px; background: #fff; cursor: pointer; font-size: 11px; }
.sv-cell:hover { border-color: var(--accent, #4566e6); }
.sv-cell.on { border-color: #f0a020; background: #fff4e3; box-shadow: 0 0 0 1px #f0a020 inset; }
.sv-cell.off { opacity: .4; cursor: default; }
.sv-cell.lk { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }   /* 道具上鎖: refused by every bench */
.sv-cell.lk .it-lk { left: 2px; right: auto; top: 2px; z-index: 1; }
/* 自動洗 running (js/services.js autoGo): the bag's pieces cannot go onto a bench now */
body.sv-busy #win-bag .slot[data-iid*="_"] { opacity: .45; filter: grayscale(.6); cursor: not-allowed; }
/* …and the bench's own buttons / slots look as refused as they are (only 停止 works) */
body.sv-busy :is(#win-refine, #win-reform, #win-growth, #win-compose, #win-pet) :is([data-svdo="refine"], [data-svdo="reform"], [data-svdo="eqrand"], [data-svmix], [data-svtrain], [data-svunmix], [data-svtab], .sv-slotbox.on, .sv-cell) { opacity: .5; filter: grayscale(.5); cursor: not-allowed; }
.sv-cell .it-ic { width: 28px; height: 28px; flex: none; }
.sv-cell small { position: absolute; left: 22px; top: 20px; font-size: 10px; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.sv-cell span { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sv-cell span, .sv-cell em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-cell em { font-style: normal; color: #7a55b5; font-size: 10px; }
.sv-more { margin: 4px 0; font-size: 12px; }
.sv-more summary { cursor: pointer; color: #6b7395; }
.sv-warn { color: #b0600a; background: #fff4e3; border-radius: 6px; padding: 3px 8px; font-size: 12px; }

/* 裝備隨機: before / after of the last roll */
.sv-rollcard { border-color: #c9d6f7; background: #f6f9ff; }
.sv-roll td.n, .sv-roll th:nth-child(2), .sv-roll th:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.sv-roll td.ar { color: #9aa3c4; text-align: center; width: 18px; }
.sv-roll td.d { text-align: right; white-space: nowrap; font-weight: bold; font-variant-numeric: tabular-nums; }
.sv-roll tr.up td.d, .sv-roll tr.up td.n b, .sv-up { color: #23903f; }
.sv-roll tr.down td.d, .sv-roll tr.down td.n b, .sv-down { color: #c0392b; }
.sv-roll tr.same td.d { color: #9aa3c4; font-weight: normal; }
.sv-roll tr.up { background: #effaf2; }
.sv-roll tr.down { background: #fdf1f0; }
.sv-roll .sv-pct { margin-left: 3px; font-size: 10px; color: #8a8fae; font-weight: normal; }
.sv-range td.n, .sv-range th:nth-child(2), .sv-range th:nth-child(3), .sv-range th:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
.sv-range .sv-bar { display: inline-block; width: 100%; max-width: 90px; margin-left: 0; }
/* 2026-11-23 (user: 字太擠 畫面一直跳): fixed column widths so a new roll never moves the columns, ability names on one line */
.sv-range { table-layout: fixed; }
.sv-range th:nth-child(1) { width: 21%; }
.sv-range th:nth-child(2) { width: 12%; }
.sv-range th:nth-child(3), .sv-range th:nth-child(5) { width: 13%; }
.sv-range th:nth-child(6) { width: 17%; }
.sv-range th, .sv-range td { padding: 5px 3px; }
.sv-range td:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-range td.n { white-space: nowrap; }
/* 裝備隨機: 目前 on the right with the last roll's change, the lines a 輔助物品 raises, the ability chips in its slot */
.sv-range td.sv-cur { white-space: nowrap; padding-right: 3px; }
.sv-range td.sv-chg { white-space: nowrap; padding-left: 0; font-variant-numeric: tabular-nums; }
.sv-range td.sv-chg span { display: inline-block; padding: 0 5px; border-radius: 8px; font-size: 11px; font-weight: bold; line-height: 16px; }
.sv-range td.sv-chg .up { background: #d9f3df; color: #1d7a35; }
.sv-range td.sv-chg .down { background: #fbdcd8; color: #b0291c; }
.sv-range td.sv-chg .same { color: #9aa3c4; }
.sv-range tr.sv-aimed td { background: #fff3c4; }
/* 裝備隨機: both 輔助物品 slots always there and as tall as a filled one, so 進行隨機 never moves */
.sv-hslot { flex: 1 1 100%; display: flex; }
.sv-hslot > .sv-slotbox { flex: 1; min-height: 92px; box-sizing: border-box; }
.sv-ghost { display: block; visibility: hidden; pointer-events: none; }
/* 2026-12-04 (user: 手機版工作台的空輔助格改成精簡的一行 「好」): on a phone an EMPTY slot of any bench is one short line
   (＋ 名稱 從背包點選放入), and the two 輔助物品 sit side by side — the ability table and 自動洗 come up into view */
html.phone .sv-slotbox:not(.on) { min-height: 0; padding: 2px 6px; gap: 5px; border-width: 1px; }
html.phone .sv-slotbox:not(.on) .sv-slotpic { width: 20px; height: 20px; font-size: 13px; border-radius: 4px; }
html.phone .sv-slotbox:not(.on) .sv-slotlab { flex-direction: row; align-items: baseline; gap: 5px; font-size: 11px; }
html.phone .sv-slotbox:not(.on) .sv-ghost { display: none; }
html.phone .sv-hslot { flex: 1 1 calc(50% - 4px); min-width: 0; }
html.phone .sv-hslot > .sv-slotbox { min-height: 0; }
.sv-aims { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.sv-aim { padding: 0 6px; font-size: 11px; line-height: 18px; border-radius: 9px; border: 1px solid #c9d0ea; background: #fff; color: #5a6185; cursor: pointer; }
.sv-aim.on { background: #23903f; border-color: #23903f; color: #fff; }
.sv-roll td.rg { text-align: right; color: #8a8fae; font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 成長組合: 每一格的解除鈕（奈特的葫蘆瓶）與水鑽加成後的結果範圍 */
.sv-slot .sv-unmix{margin-left:6px;padding:0 6px;font-size:11px;line-height:16px}
.sv-mixrange{display:block;margin-top:4px;font-size:12px;color:#7a4fb5}
.sv-mixrange b{color:#b0306a}

/* 成長組合, laid out like the client's window (services.js growthBody) */
#win-growth { width: 420px; }
.gw { display: flex; flex-direction: column; gap: 8px; }
.gw-sec { padding: 6px 8px 8px; border-radius: 10px; background: #eef1fb; border: 1px solid #d6dcf3; }
.gw-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-weight: bold; color: #3a4372; }
.gw-h i { font-style: normal; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: #e8607a; color: #fff; font-size: 11px; }
.gw-sec + .gw-sec .gw-h i { background: #f0b030; }
.gw-top { display: flex; gap: 8px; align-items: flex-start; }
.gw-slot { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 8px; border: 2px dashed #b9c2e6; background: #fff; color: #b9c2e6; font-size: 20px; }
.gw-slot.on { border-style: solid; border-color: #8ea0e6; cursor: pointer; }
.gw-slot.big { width: 64px; height: 64px; }
.gw-slot img { max-width: 80%; max-height: 80%; image-rendering: pixelated; }
.gw-slot small { position: absolute; right: 2px; bottom: 1px; font-size: 10px; font-weight: bold; color: #3a4372; }
.gw-slot small.lack { color: #c0392b; }
.gw-slot em { position: absolute; left: -2px; right: -2px; bottom: -14px; font-style: normal; font-size: 9px; color: #7a4fd0; text-align: center; white-space: nowrap; overflow: hidden; }
.gw-tab { flex: 1; min-width: 0; border-collapse: collapse; font-size: 12px; background: #fff; border-radius: 6px; overflow: hidden; }
.gw-tab th { width: 6.2em; padding: 4px 6px; text-align: left; font-weight: normal; color: #fff; background: #8a95c8; vertical-align: top; white-space: nowrap; border-bottom: 1px solid #fff; }
.gw-tab td { padding: 4px 6px; border-bottom: 1px solid #eef1fb; vertical-align: top; }
.gw-tab td div { line-height: 1.55; }
.gw-abl div.on { margin: 0 -6px; padding: 0 6px; background: #e8607a; color: #fff; border-radius: 3px; }
.gw-abl b.up { color: #ffe08a; }
.gw-un { margin-left: 4px; padding: 0 6px; font-size: 10px; border: 1px solid #c9d0ec; border-radius: 8px; background: #fff; color: #7a83a8; cursor: pointer; }
.gw-low { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; }
.gw-btns { margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.gw-btns button { min-width: 64px; padding: 5px 10px; border: 2px solid #fff; border-radius: 8px; background: #4566e6; color: #fff; font-weight: bold; box-shadow: var(--shadow); cursor: pointer; }
.gw-btns button.alt { background: #e98a3a; }
.gw-btns button[disabled] { background: #b8bed6; cursor: default; }/* 成長組合: the table keeps its height (a list scrolls past 5 lines), so section ② and its buttons never move */
.gw-list { height: 94px; overflow-y: auto; }
.gw-abl .gw-list div.on { margin: 0 0 0 -6px; }
.gw-low { display: grid; grid-template-columns: 54px 54px 54px 1fr 84px; align-items: center; gap: 8px; padding-bottom: 0; min-height: 76px; }
.gw-btns { grid-column: 5; margin: 0; width: 84px; }
.gw-btns button { width: 100%; }
/* confirmation and the one-second progress bar, over the window */
.sv-ask { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border-radius: 8px; background: rgba(30, 36, 64, .45); }
.sv-ask-card { width: min(280px, 86%); padding: 14px 16px 12px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); text-align: center; }
.sv-ask-msg { font-size: 13px; line-height: 1.7; color: #23283b; }
.sv-ask-msg b { color: #3a4372; }
.sv-ask-btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.sv-ask-btns button { min-width: 80px; padding: 6px 12px; border: 0; border-radius: 8px; background: #4566e6; color: #fff; font-weight: bold; cursor: pointer; }
.sv-ask-btns button.alt { background: #e6e9f5; color: #3a4058; }
.sv-prog { height: 12px; margin-top: 12px; border-radius: 6px; background: #e3e7f7; overflow: hidden; }
.sv-prog i { display: block; width: 0; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8fb7ff, #c9a2ff); transition: width .95s linear; }/* 再教育: the ability the 糖果鎖 keeps */
.sv-range tr.sv-locked td { background: #fff6e0; color: #b06a00; }
/* a picture keeps its shape in a workbench slot (pets are not square) */
.sv-slotpic .it-ic { width: auto !important; height: auto !important; max-width: 34px; max-height: 34px; object-fit: contain; }
/* aiming a 輔助物品 / the 糖果鎖: click the ability's row */
.sv-range tr.sv-pickrow { cursor: pointer; }
.sv-range tr.sv-pickrow:hover td { background: #f3f5ff; }
.sv-range .sv-mark { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-right: 3px; padding: 0 3px; border-radius: 8px; background: #f0a020; color: #fff; font-size: 10px; font-weight: bold; }
/* 寵物融合 */
.sv-fuse td.n { text-align: right; font-variant-numeric: tabular-nums; }
.sv-fuse tr.chg td { color: #c0392b; }
.sv-fuse tr.chg td.res b { color: #c0392b; }
.sv-fuse td.res { text-align: right; white-space: nowrap; }
.sv-star { color: #f0a020; letter-spacing: -1px; }
/* 精煉: the stage's rate, the table of all 13 stages (user's rates and fees, 2026-11-20) */
.sv-rate { color: #c0392b; font-size: 14px; }
.sv-rates { margin-top: 4px; font-size: 12px; }
.sv-rates summary { cursor: pointer; color: #6b7395; }
.sv-rates td.n { text-align: right; font-variant-numeric: tabular-nums; }
.sv-rates tr.on td { background: #fff3c4; font-weight: bold; }
/* 外觀合成・拆解: the result beside a live picture of the character wearing it */
.sv-compose { display: flex; gap: 10px; align-items: stretch; border: 1px solid #d6dbef; border-radius: 8px; padding: 8px; margin: 6px 0; background: #fbfcff; }
.sv-prev { flex: 0 0 110px; width: 110px; height: 140px; border-radius: 8px; background: radial-gradient(circle at 50% 70%, #e9eefc, #cfd6ef); }
.sv-res { flex: 1; min-width: 0; font-size: 12px; }
.sv-res p { margin: 2px 0; }
.sv-res .it-ic { width: 22px; height: 22px; vertical-align: middle; }
.sv-decomp .sub .ii { vertical-align: middle; }
#win-compose { width: 400px; }
@media (max-width: 480px) { .sv-prev { flex-basis: 84px; width: 84px; height: 110px; } }
/* 🔁 自動洗: a fold under each rolling bench (js/services.js autoPanel) */
.sv-auto { margin: 6px 0; border: 1px solid #cfd8f3; border-radius: 8px; background: #f7f9ff; font-size: 12px; }
.sv-auto.running { border-color: #46b36a; background: #f1fbf4; }
.sv-auto > summary { cursor: pointer; padding: 6px 10px; font-weight: bold; color: #3a4372; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.sv-auto > summary::-webkit-details-marker { display: none; }
.sv-auto > summary::after { content: '▾'; margin-left: auto; color: #8a93b8; }
.sv-auto[open] > summary::after { content: '▴'; }
.sv-auto-n { padding: 0 7px; border-radius: 8px; background: #46b36a; color: #fff; font-size: 11px; line-height: 17px; }
.sv-auto > div { padding: 0 10px 6px; }
.sv-auto .sub { margin: 3px 0; }
.sv-auto-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0; }
.sv-auto input[type=number] { width: 72px; padding: 3px 5px; border: 1px solid #c5cce6; border-radius: 6px; font: inherit; }
.sv-auto select { padding: 3px 4px; border: 1px solid #c5cce6; border-radius: 6px; font: inherit; background: #fff; }
.sv-auto button { padding: 5px 12px; border: 0; border-radius: 8px; background: #4566e6; color: #fff; font-weight: bold; cursor: pointer; min-height: 30px; }
.sv-auto button.alt { background: #e6e9f5; color: #3a4058; font-weight: normal; padding: 3px 10px; min-height: 26px; }
.sv-auto button.stop { background: #d9463a; }
.sv-auto button:disabled { opacity: .5; cursor: default; }
.sv-auto-go { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px !important; border-top: 1px dashed #d6dbef; }
.sv-auto-st { flex: 1; min-width: 140px; color: #4b5274; }
.sv-auto-on { color: #1d7a35; }
.sv-auto-hist { border-top: 1px dashed #d6dbef; padding-top: 4px !important; }
/* 自動洗 成長組合: the piece's slots in place (services.js histBlock) */
.sv-aslots { display: flex; flex-wrap: wrap; gap: 4px; }
.sv-aslot { display: inline-flex; flex-direction: column; align-items: center; min-width: 54px; padding: 2px 6px; border: 1px solid #d6dbef; border-radius: 6px; background: #f4f6fc; color: #4b5274; font-size: 11px; line-height: 15px; }
.sv-aslot b { font-size: 13px; font-variant-numeric: tabular-nums; }
.sv-aslot.empty { color: #a7adc8; justify-content: center; border-style: dashed; }
.sv-aslot.hit { background: #e3f6e9; border-color: #46b36a; color: #1d7a35; }
.sv-aslot.miss { background: #fdf1f0; border-color: #e3a39b; color: #b0412f; }
.sv-aslot.now { outline: 2px solid #4566e6; }
.sv-roll-big { font-size: 14px; color: #b0412f; }
.sv-roll-big.hit { color: #1d7a35; }
.sv-rolls { display: flex; flex-wrap: wrap; gap: 3px; max-height: 64px; overflow: auto; }
.sv-roll { min-width: 26px; padding: 0 4px; border-radius: 5px; background: #e6e9f5; color: #4b5274; text-align: center; font-size: 11px; line-height: 18px; font-variant-numeric: tabular-nums; }
.sv-roll.hit { background: #46b36a; color: #fff; font-weight: bold; }
.sv-roll.new { outline: 2px solid #4566e6; }
.sv-roll i { font-style: normal; }
.sv-roll i.ok { color: #1d7a35; font-weight: bold; }
.sv-roll.hit i.ok { color: #fff; }
.sv-roll-big span { color: #b0412f; }
.sv-roll-big span.ok, .sv-roll-big.hit span { color: #1d7a35; }
.sv-agoal { width: 100%; }
.sv-agoal td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sv-agoal input[type=number] { width: 64px; }
.sv-agoal tr.hit td { background: #e3f6e8; }
/* 寵物訓練 (2026-11-22 redesign): banner, picture tabs, cards, pet grid */
#win-pet { width: 460px; }
.pt-hero { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; color: #fff;
  background: linear-gradient(120deg, #ff9ac4 0%, #b58cff 55%, #7fb4ff 100%); box-shadow: 0 2px 6px rgba(120, 80, 180, .25); }
.pt-emb { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 24px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }
.pt-emb .it-ic { width: 36px; height: 36px; }
.pt-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-ht b { font-size: 16px; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(80,40,120,.4); }
.pt-ht small { font-size: 11px; opacity: .95; }
.pt-num { text-align: center; line-height: 1.1; padding: 4px 10px; border-radius: 10px; background: rgba(255,255,255,.22); }
.pt-num b { display: block; font-size: 18px; }
.pt-num small { font-size: 10px; }
.pt-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 8px; }
.pt-tabs button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px 4px; border: 1px solid #d9d2f0; border-radius: 10px; background: #f7f4ff; color: #5a4a86; font-size: 11px; cursor: pointer; }
.pt-tabs button i { font-style: normal; font-size: 17px; line-height: 20px; }
.pt-tabs button:hover { background: #efe8ff; }
.pt-tabs button.on { background: linear-gradient(#b58cff, #8f6ae6); border-color: #8f6ae6; color: #fff; font-weight: bold; box-shadow: 0 2px 4px rgba(110,70,200,.3); }
.pt-list { display: flex; flex-direction: column; gap: 6px; }
.pt-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e0d8f4; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(90,70,140,.08); }
.pt-card.max { background: #faf8ff; opacity: .85; }
.pt-flow { flex: none; display: flex; align-items: center; gap: 3px; }
.pt-flow .it-ic { width: 34px; height: 34px; padding: 2px; border-radius: 8px; background: #f2eeff; }
.pt-flow.big .it-ic { width: 48px; height: 48px; }
.pt-arrow { color: #b58cff; font-weight: bold; }
.pt-plus { color: #9aa3c4; }
.pt-maxb { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #ffe9a8; color: #a86a00; font-size: 11px; font-weight: bold; }
.pt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.pt-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-info small { color: #7a7396; }
.pt-info p { margin: 1px 0; }
.pt-need { align-self: flex-start; padding: 1px 8px; border-radius: 8px; background: #e9f7ec; color: #237a3a; font-size: 11px; }
.pt-need.short { background: #fdecec; color: #c0392b; }
.pt-stats { display: flex; flex-wrap: wrap; gap: 3px; }
.pt-go { flex: none; min-width: 64px; padding: 6px 12px; border: 2px solid #fff; border-radius: 16px; background: linear-gradient(#ffb347, #f08a1c); color: #fff; font-weight: bold; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pt-go.alt { background: linear-gradient(#a9b3d6, #8792bd); }
.pt-go:disabled { background: #c9cede; cursor: default; }
.pt-res { display: flex; align-items: center; gap: 12px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 5px; }
.pt-pet { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border: 1px solid #e0d8f4; border-radius: 9px; background: #fff; cursor: pointer; min-width: 0; }
.pt-pet:hover { background: #f7f2ff; }
.pt-pet.on { border: 2px solid #f0a020; background: #fff4e3; padding: 4px 5px; }
.pt-pet .it-ic { flex: none; width: 30px; height: 30px; }
.pt-pet span { display: flex; flex-direction: column; min-width: 0; font-size: 11px; }
.pt-pet b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-pet small { color: #8a83a6; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt .sv-bench { background: linear-gradient(#f8f4ff, #efe8ff); border-color: #ddd2f6; }
.pt .tp-group { margin-top: 10px; }
@media (max-width: 560px) { #win-pet { width: auto; } .pt-tabs { grid-template-columns: repeat(3, 1fr); } }

/* 求婚 / 婚禮 (2026-12-01, js/services.js wedPropose / wedPart / WINS.wedroom) */
.sv-chip { display: inline-block; padding: 2px 10px; margin: 2px; border-radius: 999px; border: 1px solid #d6dbef; background: #fff; font-size: 12px; cursor: pointer; }
.sv-chip:hover { background: #eef1ff; }
.sv-chip.on { background: #ffe3ef; border-color: #ff9bc4; color: #b0306a; font-weight: bold; }
.qrow.pick.on { background: #fff0f6; box-shadow: inset 3px 0 0 #ff7fb2; }
.sv-wsteps { display: grid; gap: 3px; margin: 6px 0; }
.sv-wstep { padding: 4px 8px; border-radius: 6px; background: #f4f6fd; color: #8a90ad; font-size: 13px; }
.sv-wstep b { display: inline-block; min-width: 18px; }
.sv-wstep.done { background: #eef9ef; color: #4b8a52; }
.sv-wstep.on { background: #ffe3ef; color: #b0306a; font-weight: bold; }

/* css/status.css?v=15 */
/* growth graph, BONUS POINT and the 成長 tab (js/status.js); the radar on the creation screen (js/account.js) */
.st-radar { width: 100%; max-width: 320px; display: block; margin: 0 auto; background: #eef0fb; border-radius: 10px; }
.st-axes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 6px; }
.st-axes span { display: flex; align-items: center; gap: 4px; }
.st-axes b { flex: 1; font-size: 14px; }
.st-axes i { font-style: normal; font-weight: bold; width: 14px; text-align: center; }
.st-axes button { flex: 0 0 auto !important; width: 30px; height: 30px; padding: 0 !important; border-radius: 6px !important; border: 1px solid #c9d0ec !important;
  background: #fff !important; color: #3a4058 !important; font-size: 15px !important; cursor: pointer; }
.st-axes button:disabled { opacity: .35; cursor: default; }
.st-note { font-size: 12px; color: #7a8099; margin: 6px 0 0; }

/* creation screen: one row per type, like the client */
.st-pickrows { display: grid; grid-template-columns: 46px repeat(3, 1fr); gap: 5px; margin-bottom: 8px; }
.st-pickrows .st-tl { color: #fff; font-weight: bold; border-radius: 8px 0 0 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.st-pickrows label { margin: 0 !important; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border: 2px solid #e2e6f4; border-radius: 8px; cursor: pointer; text-align: center; font-size: 12px; }
.st-pickrows label:has(input:checked) { border-color: #e6c200; background: #fffbe6; }
.st-pickrows input { position: absolute; opacity: 0; pointer-events: none; }
.st-pickrows img { width: 44px; height: 44px; object-fit: contain; }
.st-pickrows .st-q { border: 2px dashed #e2e6f4; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #b9bfd6; font-size: 18px; }
.st-info { font-size: 13px; margin: 4px 0 8px; color: #4a5068; }
.st-info b { color: #ee8a3a; }
.st-panel { background: #7a80c8; border-radius: 10px; padding: 6px; margin: 8px 0; }
.st-panel h4 { margin: 0 0 6px; text-align: center; color: #fff; font-size: 13px; }
.st-panel .st-pick { background: #fff; border-radius: 8px; padding: 6px; }

/* 基本情報: the growth graph chosen at creation, like the client's character screen, in the top right beside the info */
.st-gg { float: right; display: grid; grid-template-columns: 62px auto 62px; grid-template-rows: auto auto; align-items: center; column-gap: 2px;
  margin: 0 0 6px 8px; }
.st-gg-mid { position: relative; grid-column: 2; grid-row: 1 / span 2; }
.st-gg-mid > img:first-child, .st-gg-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-gg-ic { position: absolute; width: 26px; height: 26px; }
.st-gg-i0 { left: -4px; top: -4px; } .st-gg-i1 { right: -4px; top: -4px; } .st-gg-i2 { left: -4px; bottom: -4px; } .st-gg-i3 { right: -4px; bottom: -4px; }
.st-gg-box { display: flex; flex-direction: column; align-items: center; border: 1px solid; border-radius: 5px; overflow: hidden; background: #fff; font-size: 11px; }
.st-gg-box span { width: 100%; text-align: center; font-weight: bold; padding: 1px 0; }
.st-gg-box b { font-weight: normal; padding: 2px 0; color: #4a5068; }
.st-gg-b0 { grid-column: 1; grid-row: 1; border-color: #f1a7b5; } .st-gg-b0 span { background: #fde0e6; color: #d23d63; }
.st-gg-b1 { grid-column: 3; grid-row: 1; border-color: #a9bff0; } .st-gg-b1 span { background: #e0e9fd; color: #3b62c4; }
.st-gg-b2 { grid-column: 1; grid-row: 2; border-color: #cdb0ec; } .st-gg-b2 span { background: #efe3fd; color: #8a43c9; }
.st-gg-b3 { grid-column: 3; grid-row: 2; border-color: #f3c08e; } .st-gg-b3 span { background: #fde9d5; color: #d4751c; }
.st-gg-box.main { box-shadow: 0 0 0 2px currentColor; }
.st-gg-b0.main { color: #e8607a; } .st-gg-b1.main { color: #4f78c8; } .st-gg-b2.main { color: #9a62c9; } .st-gg-b3.main { color: #ee8a3a; }
#win-system .statgrid { overflow: hidden; gap: 0; }   /* the info lines keep beside the graph */
/* one line each, with a dashed line between, as the 裝備加成 list below */
#win-system .statgrid > span, #win-system .statgrid > b { padding: 4px 0; border-bottom: 1px dashed #d6dbef; }
#win-system .statgrid > span { color: #6b7395; white-space: nowrap; padding-right: 12px; }
#win-system .statgrid > b { font-weight: normal; overflow-wrap: anywhere; }
/* the groups: who (名稱 職業) | level and EXP | HP MP | gold and map; a solid line between them */
#win-system .statgrid > :nth-child(4), #win-system .statgrid > :nth-child(3),
#win-system .statgrid > :nth-child(12), #win-system .statgrid > :nth-child(11),
#win-system .statgrid > :nth-child(16), #win-system .statgrid > :nth-child(15) { border-bottom: 1px solid #b9c1e0; }
@media (max-width: 480px) { .st-gg { float: none; justify-content: center; margin: 0 auto 6px; } }

/* 基本情報 redone (2026-11-21, "角色屬性視窗重新設計排版"): a card at the top (name, job, Lv / TM, gold, map | growth
   graph), four gauges, then 裝備加成 as two columns of chips. game.js writes .ch-top / .ch-bars, items.js .ch-eq,
   status.js puts the graph into .ch-top. */
.ch-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  background: linear-gradient(135deg, #f3f5ff, #fdf1f6); border: 1px solid #dde2f6; }
.ch-top .st-gg { float: none; margin: 0 0 0 auto; flex: none; }
.ch-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-name { font-size: 18px; font-weight: bold; color: #23283b; overflow-wrap: anywhere; line-height: 1.2; }
.ch-job { align-self: flex-start; font-size: 11px; padding: 1px 8px; border-radius: 9px; background: var(--accent); color: #fff; }
.ch-lvs { display: flex; gap: 6px; margin-top: 3px; }
.ch-lvs span { display: flex; align-items: baseline; gap: 3px; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid #d6dbef; }
.ch-lvs small { font-size: 10px; color: var(--sub); font-weight: bold; }
.ch-lvs b { font-size: 16px; color: #3b62c4; }
.ch-lvs .tm b { color: #9a62c9; }
.ch-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 5px 0 0; font-size: 12px; }
.ch-kv dt { color: var(--sub); }
.ch-kv dd { margin: 0; overflow-wrap: anywhere; color: #23283b; }
.ch-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 8px 2px 4px; }
.ch-bar { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 4px; font-size: 11px; }
.ch-bar span { grid-row: 1 / span 2; font-weight: bold; color: #4a5068; }
.ch-bar i { display: block; height: 8px; border-radius: 4px; background: #e4e7f4; overflow: hidden; }
.ch-bar em { display: block; height: 100%; border-radius: 4px; }
.ch-bar b { font-weight: normal; color: #4a5068; text-align: right; font-variant-numeric: tabular-nums; }
.ch-hp em { background: linear-gradient(90deg, #e4574a, #f07a6a); }
.ch-mp em { background: linear-gradient(90deg, #3f74e0, #6aa0f5); }
.ch-exp em { background: linear-gradient(90deg, #e3a10a, #f5cf4e); }
.ch-tm em { background: linear-gradient(90deg, #8a5bd8, #b893f0); }
.ch-h { margin: 8px 0 4px; padding-bottom: 3px; border-bottom: 1px solid #dde2f6; font-weight: bold; color: var(--accent); font-size: 13px; }
.ch-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 12px; }
.ch-eq span { display: flex; justify-content: space-between; padding: 2px 6px; border-radius: 4px; background: #f5f7fd; }
.ch-eq i { font-style: normal; color: #4a5068; }
.ch-eq b { color: #23703f; font-variant-numeric: tabular-nums; }
.ch-eq b.neg { color: #c0392b; }
/* 五大屬性 | 抗性 side by side (items.js W.system.body); each keeps one chip column */
.ch-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ch-pair .ch-eq { grid-template-columns: 1fr; }
@media (max-width: 360px) { .ch-pair { grid-template-columns: 1fr; } }
/* 目前能力 + 狀態加成 (status.js liveHtml) */
.ch-tot b { color: #23283b; }
.ch-tot em, .ch-st em { font-style: normal; font-size: 11px; margin-left: 4px; color: #2f8f5b; }
.ch-tot em.neg, .ch-st em.neg { color: #c0392b; }
.ch-sts { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.ch-st { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 4px; background: #f2faf5; }
.ch-st.bad { background: #fff0ee; }
.ch-st img, .ch-st > i { width: 20px; height: 20px; flex: none; border-radius: 4px; }
.ch-st > i { background: #d9e6ff; }
.ch-st b { flex: none; color: #3a4060; }
.ch-st span { flex: 1; min-width: 0; color: #4a5068; }
.ch-st em { margin-left: 2px; }
.ch-st small { flex: none; color: #7a8099; font-variant-numeric: tabular-nums; }
.ch-foot { margin: 8px 0 0; }
@media (min-height: 600px) { #win-system .win-body { max-height: min(78vh, 640px); } }
@media (max-width: 480px) {
  .ch-top { flex-direction: column; align-items: stretch; }
  .ch-top .st-gg { margin: 4px auto 0; }
  .ch-bars, .ch-eq { grid-template-columns: 1fr; }
}

/* the 戀人 tab (js/status.js coupleTab) */
.cp-tab { display: flex; flex-direction: column; gap: 8px; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #fff;
  background: linear-gradient(120deg, #ff7fae, #ffa8c7); box-shadow: 0 3px 10px rgba(255, 105, 160, .3); }
.cp-head.wed { background: linear-gradient(120deg, #e05f97, #f6a15f); }
.cp-head.single { background: linear-gradient(120deg, #9aa3c4, #c2c8df); box-shadow: none; }
.cp-heart { font-size: 28px; line-height: 1; text-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.cp-who { display: flex; flex-direction: column; min-width: 0; }
.cp-who small { font-size: 11px; opacity: .9; }
.cp-who b { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-badge { margin-left: auto; padding: 2px 10px; border-radius: 12px; background: rgba(255, 255, 255, .9); color: #d2477f; font-size: 12px; font-weight: bold; }
.cp-days { display: flex; gap: 8px; }
.cp-days > div { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 8px; background: #fff0f6; border: 1px solid #ffd2e4; }
.cp-days b { font-size: 22px; color: #d2477f; line-height: 1.1; }
.cp-days span { font-size: 11px; color: #8a6a7a; }
.cp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.cp-facts dt { color: #8a90a8; }
.cp-facts dd { margin: 0; }
.cp-note { margin: 0; padding: 6px 10px; border-radius: 8px; background: #fff6e0; border: 1px solid #f3d48a; font-size: 12.5px; }
.cp-rules { margin: 0; padding-left: 20px; font-size: 12.5px; line-height: 1.6; color: #4a5068; }

/* the 成長 tab */
.st-tabs { margin-bottom: 6px; }
.st-tabs b { cursor: pointer; }
.st-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.st-graph { display: flex; gap: 8px; font-size: 12px; }
.st-bp { margin-left: auto; display: flex; border-radius: 12px; overflow: hidden; font-weight: bold; font-size: 12px; }
.st-bp span { background: #2f8f5b; color: #fff; padding: 2px 10px; }
.st-bp b { background: #5fcf8a; color: #063; padding: 2px 10px; min-width: 40px; text-align: center; }
.st-grp { padding: 3px 0; }
#win-system { width: 460px; }   /* the 成長 tab's five columns need the room: at 340 px the values were cut off */
.st-row { display: grid; grid-template-columns: 72px minmax(92px, 1fr) 64px 92px 40px; gap: 4px; align-items: center; margin: 2px 0; font-size: 13px; }
.st-a input { width: 100%; min-width: 0; border: 0; background: none; text-align: center; font: inherit; font-weight: bold; padding: 0; -moz-appearance: textfield; color: #23283b; }
.st-a input::-webkit-outer-spin-button, .st-a input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.st-a input:focus { outline: 2px solid #9fb1ff; border-radius: 3px; background: #f4f6ff; }
.st-all { border: 1px solid #f0c08a; background: #fff4e8; color: #b05f17; border-radius: 4px; font-size: 11px; font-weight: bold; padding: 0; min-height: 26px; cursor: pointer; white-space: nowrap; }
.st-all:disabled { opacity: .35; cursor: default; }
.st-n { font-weight: bold; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.st-t0 { background: #fde4e8; color: #b23a55; } .st-t1 { background: #e1e8f6; color: #34589e; }
.st-t2 { background: #ece2f6; color: #6f3f9e; } .st-t3 { background: #fde9d9; color: #b05f17; }
.st-v, .st-l, .st-a { background: #fff; border: 1px solid #dfe3f3; border-radius: 4px; text-align: center; padding: 1px 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.st-v em { font-style: normal; color: #2f8f5b; }
/* the value: the ability's own on top, what equipment / skills add under it in small green, so neither is cut off */
.st-v { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; min-height: 26px; overflow: visible; }
.st-v b { font-weight: bold; }
.st-v em { font-size: 10px; }
.st-l { position: relative; font-size: 12px; }
.st-l i { position: absolute; left: 0; bottom: 0; height: 2px; background: #5a7bf0; }
.st-a { display: flex; align-items: center; justify-content: space-between; padding: 0; }
.st-a button { border: 0; background: none; color: #ee8a3a; cursor: pointer; font-size: 14px; padding: 0 6px; min-height: 26px; }
.st-a button:disabled { opacity: .25; cursor: default; }
.st-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.st-foot .sub { margin-right: auto; font-size: 11px; }
.st-foot button { border: 2px solid #fff; background: var(--accent, #5a7bf0); color: #fff; border-radius: 14px; padding: 3px 14px; cursor: pointer; }
.st-foot button.alt { background: #e6e9f5; color: #3a4058; }
.st-foot button:disabled { opacity: .45; cursor: default; }
.st-warn { color: #c0392b; font-size: 12px; margin: 2px 0; }
@media (max-width: 480px) { .st-row { grid-template-columns: 50px minmax(64px, 1fr) 46px 70px 32px; gap: 2px; font-size: 11px; } .st-n { padding: 2px 2px; font-size: 11px; } .st-all { font-size: 10px; }
  .st-v { padding: 1px 2px; } .st-l { font-size: 10px; padding: 1px 1px; } .st-a button { padding: 0 4px; } }
.st-axes b { white-space: nowrap; }
/* narrow phones: the creation card must not run off the screen */
#acct { grid-template-columns: minmax(0, 1fr); justify-items: center; }
#acct .acct-card { min-width: 0; }
.st-pickrows { grid-template-columns: 40px repeat(3, minmax(0, 1fr)); }
.st-pickrows label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 360px) { #acct .acct-card { padding: 16px 12px 12px; } .st-pickrows img { width: 34px; height: 34px; } .st-axes { grid-template-columns: 1fr; } }

/* first time: pick the graph */
#st-ask { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(8, 12, 28, .55); overflow: auto; }
.st-ask-card { width: min(380px, 100%); background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); color: #23283b; }
.st-ask-card h3 { margin: 0 0 6px; color: #3e5bd6; }
.st-ask-card .sub { font-size: 12px; color: #5b6177; }
.st-ask-btns { display: flex; justify-content: flex-end; margin-top: 10px; }
.st-ask-btns button { border: 0; border-radius: 8px; background: #4566e6; color: #fff; padding: 8px 22px; font-size: 15px; cursor: pointer; }

/* 成長 tab: what equipment, skills and states add sits to the right of the value, with its sign */
.st-v { flex-direction: row; align-items: baseline; justify-content: center; gap: 6px; }
.st-v em { font-size: 11px; white-space: nowrap; }
/* the creation picker drawn on the gear (TSStatus.radar): larger than 基本情報's, the dots clickable */
.st-gg-big { float: none; display: grid; justify-content: center; grid-template-columns: 66px auto 66px; column-gap: 6px; margin: 4px auto 6px; }
.st-gg-big .st-gg-box span { display: flex; flex-direction: column; line-height: 1.15; padding: 2px 0; font-size: 13px; }
.st-gg-big .st-gg-box small { font-size: 9px; font-weight: normal; opacity: .75; }
.st-gg-big .st-gg-box b { font-size: 22px; font-weight: bold; padding: 2px 0 4px; color: #23283b; }
.st-gg-big .st-gg-svg { pointer-events: auto; }
.st-gg-big .st-gg-ic { width: 30px; height: 30px; pointer-events: none; }
@media (max-width: 380px) { .st-gg-big { grid-template-columns: 54px auto 54px; column-gap: 2px; } }
/* 結婚稱號 (2026-12-01, js/status.js titlePick / 隱藏・顯示) */
.cp-tbtn { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; border: 1px solid #d6dbef; background: #fff; font-size: 11px; cursor: pointer; }
.cp-tbtn:hover { background: #eef1ff; }
.cp-titles { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.cp-tpick { padding: 3px 10px; border-radius: 999px; border: 1px solid #ffc4dc; background: #fff6fa; color: #b0306a; font-size: 12px; cursor: pointer; }
.cp-tpick:hover { background: #ffe3ef; }

/* css/bossrec.css?v=1 */
/* 角色屬性 › 業績：個人 BOSS 狩獵量（js/bossrec.js） */
.br { font-size: 13px; color: #3a4058; }
.br-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(135deg, #fff4d6, #ffe3b0); border: 1px solid #f0c776; }
.br-crown { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; background: radial-gradient(circle at 35% 30%, #ffd36b, #e08a12); box-shadow: 0 2px 6px rgba(196, 116, 10, .35); }
.br-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.br-title small { color: #9a7330; font-size: 11px; }
.br-title b { font-size: 17px; color: #b35f00; }
.br-prog { height: 6px; border-radius: 3px; background: rgba(179, 95, 0, .15); overflow: hidden; }
.br-prog i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ff7a1a); border-radius: 3px; }
.br-kpi { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.br-kpi > div { background: #f4f6fd; border: 1px solid #e2e6f4; border-radius: 8px; padding: 6px 4px; text-align: center; display: flex; flex-direction: column; }
.br-kpi small { color: #7a8099; font-size: 11px; }
.br-kpi b { font-size: 18px; color: #2e3550; font-variant-numeric: tabular-nums; }
.br-kpi em { font-style: normal; font-size: 10px; color: #9aa0b8; }
.br-sec { margin-top: 8px; }
.br-sec h5 { margin: 0 0 6px; font-size: 13px; color: #4a5068; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.br-sec h5 .sub { font-weight: normal; font-size: 11px; color: #8a90a8; }
.br-days { display: flex; align-items: flex-end; gap: 3px; height: 92px; padding: 4px 4px 0; background: #f8f9fe; border: 1px solid #e8ebf6; border-radius: 8px; }
.br-day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.br-day i { width: 70%; max-width: 18px; background: #f0b45c; border-radius: 3px 3px 0 0; }
.br-day.now i { background: #ff7a1a; }
.br-day .br-dv { font-size: 10px; color: #8a6a30; line-height: 12px; height: 12px; }
.br-day small { font-size: 9px; color: #9aa0b8; line-height: 14px; white-space: nowrap; }
.br-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.br-tools input { flex: 1; min-width: 120px; padding: 5px 8px; border: 1px solid #c9d0ec; border-radius: 6px; font-size: 13px; }
.br-sort { display: flex; gap: 2px; }
.br-sort button { padding: 4px 9px !important; font-size: 12px !important; border-radius: 6px !important; border: 1px solid #c9d0ec !important;
  background: #fff !important; color: #4a5068 !important; cursor: pointer; }
.br-sort button.on { background: #ffb347 !important; border-color: #e08a12 !important; color: #fff !important; }
.br-list { max-height: 300px; overflow-y: auto; border: 1px solid #e8ebf6; border-radius: 8px; }
.br-row { display: grid; grid-template-columns: 28px minmax(90px, 1.2fr) minmax(90px, 1.3fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid #eef0f8; }
.br-row:last-child { border-bottom: 0; }
.br-row:nth-child(even) { background: #fafbff; }
.br-rank { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px;
  background: #eef0f8; color: #6a7090; }
.br-rank.r1 { background: #ffd34d; color: #7a5200; } .br-rank.r2 { background: #d9dee9; color: #4a5068; } .br-rank.r3 { background: #f0b98a; color: #6e3c10; }
.br-name { display: flex; flex-direction: column; min-width: 0; }
.br-name b { color: #b35f00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-name small, .br-time small { color: #8a90a8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-bar { position: relative; height: 20px; background: #f1f3fa; border-radius: 4px; overflow: hidden; }
.br-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffd08a, #ff9d3d); }
.br-bar b { position: relative; padding-left: 6px; line-height: 20px; font-size: 12px; color: #4a3000; font-variant-numeric: tabular-nums; }
.br-time { display: flex; flex-direction: column; text-align: right; }
.br-empty { text-align: center; color: #8a90a8; padding: 16px 8px; margin: 8px 0 0; background: #f8f9fe; border-radius: 8px; line-height: 1.7; }
@media (max-width: 560px) {
  .br-kpi { grid-template-columns: repeat(3, 1fr); }
  .br-row { grid-template-columns: 26px 1fr 1fr; }
  .br-time { grid-column: 2 / -1; flex-direction: row; justify-content: space-between; text-align: left; }
}

/* css/secretmap.css?v=2 */
/* 角色屬性 › 神秘：神秘卡片 No.1-16 的藏寶圖底板（js/secretmap.js） */
.sm:not(.pn-ava) { color: #5a4325; }   /* .pn-ava.sm = panels.css small avatar, not this window */
.sm-board { position: relative; padding: 14px; border-radius: 8px; border: 3px double #8d6a3e;
  background: radial-gradient(ellipse at 50% 45%, #f3e2bd 0%, #e6cc98 62%, #caa66b 100%);
  box-shadow: inset 0 0 24px rgba(110, 72, 28, .45), 0 2px 6px rgba(0, 0, 0, .2); }
.sm-board::before, .sm-board::after { content: '❦'; position: absolute; font-size: 18px; color: #a17a45; opacity: .7; }
.sm-board::before { left: 8px; bottom: 4px; transform: rotate(180deg); }
.sm-board::after { right: 8px; bottom: 4px; }
.sm-in { position: relative; width: 100%; aspect-ratio: 422 / 299; }   /* 6.4 pieces of 66 px across, 3.25 of 92 down */
.sm-rose { position: absolute; right: 10px; top: 8px; width: 54px; height: 54px; color: #8d6a3e; opacity: .55; pointer-events: none; }
.sm-slot { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 3px;
  background: rgba(120, 84, 40, .22); box-shadow: inset 0 0 0 1px rgba(110, 72, 28, .45), inset 2px 3px 6px rgba(80, 50, 15, .35); }
.sm-slot i { font-style: normal; font-weight: bold; font-size: 15px; color: rgba(90, 60, 25, .45); }
.sm-slot.on { background: none; box-shadow: 0 1px 3px rgba(60, 35, 10, .45); z-index: 1; }
.sm-slot img { width: 100%; height: 100%; display: block; }
.sm-slot.new { animation: sm-in .7s ease-out; }
@keyframes sm-in { from { transform: scale(1.6) rotate(-8deg); opacity: 0; } 60% { transform: scale(.95); opacity: 1; } to { transform: none; } }
.sm-board.full { border-color: #c48a1a; box-shadow: inset 0 0 24px rgba(110, 72, 28, .45), 0 0 12px rgba(255, 196, 60, .7); }
.sm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 2px 4px; }
.sm-n { font-size: 13px; color: #6a5030; } .sm-n b { font-size: 18px; color: #b35f00; }
.sm-foot button { padding: 6px 14px !important; }
.sm .sub { font-size: 12px; margin: 4px 0 0; }

/* css/ambience.css?v=3 */
/* js/ambience.js: the map sign shown on entering a zone, the emoticon picker (F3) */
.amb-sign {
  position: absolute; left: 50%; top: 70px; z-index: 30; pointer-events: none;
  width: min(250px, 46vw); height: auto; transform: translate(-50%, -12px) scale(.92);
  opacity: 0; transition: opacity .45s ease, transform .45s ease; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45));
}
.amb-sign.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
/* zones whose sign picture exists in no client: a wooden plank with the zone's name */
.amb-sign-text {
  width: auto; max-width: min(420px, 80vw); padding: 10px 26px; box-sizing: border-box;
  font: bold 20px/1.3 "Microsoft JhengHei", "PingFang TC", sans-serif; color: #fff6dc; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; letter-spacing: 1px;
  text-shadow: 0 0 3px #3a2108, 0 2px 0 #3a2108, 2px 0 0 #3a2108, -2px 0 0 #3a2108, 0 -2px 0 #3a2108;
  background: linear-gradient(#b07a3e, #8a5523 55%, #6e4119); border: 3px solid #4a2c10; border-radius: 10px;
  box-shadow: inset 0 2px 0 rgba(255, 230, 180, .45), inset 0 -3px 0 rgba(0, 0, 0, .25);
}

#emo-picker {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 40;
  width: min(560px, calc(100vw - 32px)); max-height: min(360px, 60vh); display: flex; flex-direction: column;
  background: rgba(24, 28, 44, .94); border: 1px solid rgba(160, 180, 255, .35); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); color: #eef1ff; font-size: 13px;
}
#emo-picker .emo-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px 12px; font-weight: 700; }
#emo-picker .emo-head span { font-weight: 400; font-size: 12px; color: #aab3d6; flex: 1; }
#emo-picker .emo-head .x { background: none; border: 0; color: #cfd6f5; font-size: 15px; cursor: pointer; padding: 2px 6px; }
#emo-picker .emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; padding: 4px 10px 10px; overflow-y: auto; }
#emo-picker .emo-grid button {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 62px;
  background: rgba(255, 255, 255, .06); border: 1px solid transparent; border-radius: 8px; color: #dfe4fb; cursor: pointer; padding: 4px 2px;
}
#emo-picker .emo-grid button:hover { background: rgba(140, 165, 255, .22); border-color: rgba(160, 180, 255, .5); }
#emo-picker .emo-grid i { display: block; image-rendering: pixelated; background-repeat: no-repeat; flex: none; margin: auto 0; }
#emo-picker .emo-grid span { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* js/items.js offerRevive: fallen with a revive item in the bag */
#revive-ask {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 45; min-width: 260px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; text-align: center;
  background: rgba(30, 22, 34, .95); border: 1px solid rgba(255, 170, 170, .45); color: #fff1f1; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
#revive-ask b { font-size: 16px; color: #ffb3b3; }
#revive-ask span { font-size: 13px; color: #e9d9de; }
#revive-ask button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 8px; border: 0;
  background: #e8a33b; color: #2a1a05; font-weight: 700; cursor: pointer; font-size: 13px; }
#revive-ask button.alt { background: rgba(255, 255, 255, .14); color: #f4e9ec; font-weight: 400; }
@media (max-width: 900px), (max-height: 540px) {
  #emo-picker { bottom: 150px; }
  #emo-picker .emo-grid button { height: 66px; }
}

/* css/death.css?v=2 */
/* the fallen character's window (js/death.js) */
#death-box {
  position: fixed; left: 50%; top: 36%; transform: translate(-50%, -50%); z-index: 9001; width: 320px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 7px; padding: 14px 16px; border-radius: 12px; text-align: center;
  background: rgba(30, 22, 34, .95); border: 1px solid rgba(255, 170, 170, .45); color: #fff1f1; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
/* 倒下時 everything else is out of reach (user 2026-11-23): a veil over the whole page, under the window */
#death-block { position: fixed; inset: 0; z-index: 9000; background: rgba(10, 4, 12, .28); touch-action: none; }
#death-box b { font-size: 17px; color: #ffb3b3; letter-spacing: 2px; }
#death-box span { font-size: 13px; color: #e9d9de; }
#death-box .death-pen { color: #ffd38a; }
#death-box .death-count { color: #9fd2ff; font-variant-numeric: tabular-nums; }
#death-box .death-none { color: #b9aab0; font-size: 12px; }
#death-box .death-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
#death-box button { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; min-height: 36px; padding: 7px 12px;
  border-radius: 8px; border: 0; background: #e8a33b; color: #2a1a05; font-weight: 700; cursor: pointer; font-size: 13px; }
#death-box button small { flex-basis: 100%; font-weight: 400; font-size: 11px; opacity: .85; }
#death-box button.alt { background: rgba(255, 255, 255, .16); color: #f4e9ec; }
#death-box button:hover { filter: brightness(1.1); }
@media (max-height: 540px) and (orientation: landscape) {
  #death-box { top: 46%; width: 300px; padding: 10px 12px; gap: 5px; }
  #death-box button { min-height: 40px; }
}

/* css/cards.css?v=15 */
/* js/cards.js: the card bag (卡片包, six tabs) and card identification (卡片識別); the skill window's 需要「卡名」 chip */
/* the card bag is laid out like the bag (.grid of .slot from style.css / items.css): same width, 6 slots a row */
#win-cards { width: 340px; max-width: calc(100vw - 16px); }
.cd-tabs { margin-bottom: 6px; gap: 3px; flex-wrap: nowrap; }
.cd-tabs b { padding: 2px 6px; }
@media (min-height: 600px) { #win-cards .win-body { max-height: min(84vh, 680px); } }
.cd-grid { max-height: 300px; overflow-y: auto; padding: 1px; }
.cd-slot.got img { opacity: .55; }
.cd-slot.got::after { content: '已學'; position: absolute; left: 1px; top: 1px; font-size: 9px; line-height: 12px; padding: 0 2px; border-radius: 3px; background: #5a9b5f; color: #fff; }
.cd-slot.idf::after { content: '識'; position: absolute; left: 1px; top: 1px; font-size: 9px; line-height: 12px; width: 12px; text-align: center; border-radius: 3px; background: #8a5bd8; color: #fff; }
.cd-slot .cd-no { position: absolute; right: 2px; top: 0; font-size: 9px; font-weight: 700; color: #a0601a; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
/* the chosen card: picture, name and fields in one strip under the grid, buttons below */
.cd-sel { display: grid; grid-template-columns: 58px 1fr; gap: 4px 8px; margin-top: 8px; padding: 6px; border: 1px solid #dfe3f5; border-radius: 6px; background: #f7f8fd; min-height: 58px; }
.cd-sel > p.sub { grid-column: 1 / -1; margin: auto 0; text-align: center; }
.cd-illu { display: grid; place-items: center; width: 58px; height: 74px; background: #fff; border: 1px solid #e2e5f3; border-radius: 5px; overflow: hidden; }
.cd-illu img { max-width: 100%; max-height: 100%; }
.cd-illu .it-ic { width: 36px; height: 36px; }
.cd-txt { min-width: 0; }
.cd-txt h4 { margin: 0 0 3px; font-size: 13px; }
.cd-txt h4 small { margin-left: 5px; font-weight: normal; color: var(--sub); font-size: 11px; }
.cd-info { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11px; }
.cd-info i { font-style: normal; color: var(--sub); margin-right: 3px; }
.cd-desc { margin: 3px 0 0; font-size: 11px; color: var(--sub); white-space: pre-line; max-height: 44px; overflow-y: auto; }
.cd-btns { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; }
.cd-btns button { flex: 1; padding: 4px 0; font-size: 12px; }
.cd-count button { font-size: 11px; padding: 2px 8px; }
/* js/skills.js: learning needs the skill card (lit = in the card bag, grey = missing); 技能大師 by Gold */
.sk-card { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 6px 1px 2px; border-radius: 10px; margin-right: 4px;
  border: 1px solid #c9d7a6; background: #f2f8e6; color: #3d6b1f; vertical-align: middle; }
.sk-card .ii { width: 18px; height: 18px; }
.sk-card.miss { border-color: #d6d6d6; background: #f1f1f1; color: #8a8a8a; }
.sk-card.miss .ii, .sk-card.miss img { filter: grayscale(1); opacity: .55; }
.skrow button[disabled] { opacity: .5; cursor: not-allowed; }
.skrow .sk-master { background: linear-gradient(#ffe9a6, #f3c64d); border-color: #c99a1d; color: #5a3d00; font-weight: 600; }
.skrow .sk-master.poor { filter: grayscale(.7); opacity: .75; }
.sk-mst { color: #c48a00; font-weight: 700; }

#win-cardid { width: min(520px, calc(100vw - 16px)); }
.ci-head { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.ci-head b { font-size: 15px; color: var(--accent); }
.ci-head b.low { color: #d23a3a; }
.ci-life { height: 6px; border-radius: 3px; background: #e2e5f3; margin: 5px 0 8px; overflow: hidden; }
.ci-life i { display: block; height: 100%; background: linear-gradient(90deg, #e4574a, #f2c14e, #59c26b); transition: width .3s; }
.ci-board { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ci-card { position: relative; aspect-ratio: 2 / 3; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.ci-card.up { cursor: default; }
.ci-card.up:not(.gone) .ci-face { animation: ci-flip .25s ease-out; }
.ci-card.gone .ci-face { opacity: .5; filter: grayscale(.6); }
.ci-back, .ci-face { position: absolute; inset: 0; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.ci-card.up .ci-back, .ci-card:not(.up) .ci-face { display: none; }
@keyframes ci-flip { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ci-back { background: repeating-linear-gradient(45deg, #5b46b8 0 6px, #6f59cf 6px 12px); border: 2px solid #f1d27a; box-shadow: inset 0 0 0 2px #3a2a80; }
.ci-back::after { content: '?'; color: #f1d27a; font: 700 20px/1 serif; }
.ci-card:not(.up):hover .ci-back { filter: brightness(1.15); }
.ci-face { background: #fffaf0; border: 2px solid #c9b27a; padding: 3px; }
.ci-face b { font-size: 10px; line-height: 1.15; color: var(--ink); word-break: break-all; font-weight: 600; }
.ci-face small { font-size: 9px; color: #8a5bd8; }
.ci-card.bonus .ci-face { border-color: #f2b51e; box-shadow: 0 0 8px #f2c14e; }
.ci-card.bonus .ci-face::before { content: '★'; position: absolute; right: 3px; top: 1px; color: #e3a10a; font-size: 11px; }
.ci-card.sp .ci-face { background: #f3ecff; }
.ci-tip { margin: 8px 0 0; font-size: 12px; }
.ci-next p { margin: 8px 0 5px; font-size: 12px; color: var(--ink); }
.ci-pick { display: flex; flex-wrap: wrap; gap: 4px; max-height: 120px; overflow-y: auto; }
.ci-pick button { display: flex; align-items: center; gap: 4px; padding: 3px 7px; font: inherit; font-size: 11px; }
.ci-pick small { color: var(--sub); }
.ci-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 560px) {
  .ci-board { grid-template-columns: repeat(4, 1fr); }
}
@media (max-height: 540px) and (orientation: landscape) {
  .cd-grid { max-height: 42vh; }
  .ci-board { grid-template-columns: repeat(7, minmax(0, 64px)); justify-content: center; }
}

/* 2026-11-25 (清單 八): the new card identification board — the original CardIdentify.nri pieces (assets/ui/cardid) */
.ci2 { --ci-w: 62px; }
.ci2-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ci2-stage { position: relative; width: 162px; height: 31px; flex: none; image-rendering: pixelated; }
.ci2-gimg { position: absolute; inset: 0; width: 162px; height: 31px; }
.ci2-sn { position: absolute; left: 4px; top: 13px; width: 22px; text-align: center; font: 700 13px/1 sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.ci2-gauge { position: absolute; left: 58px; top: 17px; width: 98px; height: 7px; border-radius: 3px; overflow: hidden; }
.ci2-gauge i { display: block; height: 100%; background: linear-gradient(90deg, #ffe58a, #ffb52e); box-shadow: 0 0 6px #ffcf3a; transition: width .5s; }
.ci2-life { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 10px; background: #2a2340; image-rendering: pixelated; }
.ci2-life img { height: 15px; }
.ci2-life b { font: 800 20px/1 sans-serif; color: #ffd84a; text-shadow: 0 1px 0 #6a3a00; min-width: 22px; text-align: right; }
.ci2-life.low b { color: #ff6060; animation: ci2-blink .6s infinite alternate; }
@keyframes ci2-blink { to { opacity: .45; } }
.ci2-pop { position: absolute; right: -6px; top: -14px; font: 800 15px/1 sans-serif; animation: ci2-pop 1.6s ease-out forwards; pointer-events: none; }
.ci2-pop.up { color: #3fd46a; text-shadow: 0 0 3px #063; } .ci2-pop.down { color: #ff5a5a; text-shadow: 0 0 3px #600; }
@keyframes ci2-pop { from { transform: translateY(6px); opacity: 0; } 15% { transform: none; opacity: 1; } 75% { opacity: 1; } to { transform: translateY(-14px); opacity: 0; } }
.ci2-stats { display: flex; align-items: center; gap: 16px; margin: 2px 0 8px; font-size: 13px; }
.ci2-stats span { display: inline-flex; align-items: center; gap: 6px; }
.ci2-stats img { height: 10px; image-rendering: pixelated; }
.ci2-stats b { font-size: 15px; color: var(--accent); }
.ci2-board { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 8px; border-radius: 10px; background: radial-gradient(ellipse at center, #3b2f6b, #1d1838); }
.ci2-six { display: grid; grid-template-columns: repeat(3, var(--ci-w)); gap: 8px; }
.ci2-seven { padding-left: 14px; border-left: 2px dashed rgba(255, 216, 74, .45); }
.ci2 .ci-card { width: var(--ci-w); aspect-ratio: 29 / 42; }
.ci2 .ci-back { border: 0; box-shadow: none; background: none; }
.ci2 .ci-back::after { content: none; }
.ci2 .ci-back img { width: 100%; height: 100%; image-rendering: pixelated; }
.ci2 .ci-back em { position: absolute; right: 3px; bottom: 2px; font: 800 12px/1 sans-serif; color: #ffd84a; text-shadow: 0 0 2px #000; }
.ci2 .ci-card.seventh:not(.up) { cursor: default; filter: saturate(.7); }
.ci2 .ci-card.seventh:not(.up) .ci-back { animation: ci2-wait 1.6s ease-in-out infinite; }
@keyframes ci2-wait { 50% { filter: brightness(1.25) drop-shadow(0 0 4px #ffd84a); } }
.ci2 .ci-face { border: 0; background: center / 100% 100% no-repeat; image-rendering: pixelated; padding: 6px 3px; }
.ci2 .ci-face .it-ic { width: 28px; height: 28px; image-rendering: auto; }
.ci2 .ci-face b { font-size: 9px; color: #2b2340; text-align: center; }
.ci2 .ci-card.gold .ci-face { box-shadow: 0 0 10px #ffcf3a; }
.ci2 .ci-card.gold .ci-face b { color: #6a3a00; }
.ci2 .ci-card.gone .ci-face { opacity: .55; filter: grayscale(.4); }
.ci2 .ci-card.turning .ci-back { animation: ci-flip .25s ease-out reverse; }
.ci2 .ci-card:not(.up):not(.seventh):hover .ci-back img { filter: brightness(1.2) drop-shadow(0 0 4px #fff); }
@media (max-width: 560px) { .ci2 { --ci-w: 54px; } .ci2-board { gap: 8px; } .ci2-seven { padding-left: 8px; } .ci2-stage { transform: scale(.9); transform-origin: left center; } }
.ci2 .ci-face { justify-content: flex-start; padding: 7px 3px 12px; }
.ci2 .ci-face b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 卡片識別 (2026-11-25): on the field, round the character, as the client draws it (js/cards.js #ci-fld).
   --u = one client pixel (the map's zoom; 1.25 at least on a phone); every place is the client window's own number
   minus the character's feet (131.5, 154). The box itself is a point: only its pieces take clicks. ---------- */
#ci-fld { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; --u: 1px; pointer-events: none; image-rendering: pixelated; user-select: none; }
#ci-fld img { image-rendering: pixelated; }
.cif-card { position: absolute; width: calc(var(--u) * 29); height: calc(var(--u) * 42); padding: 0; margin: 0; border: 0; background: none; cursor: pointer; overflow: visible; pointer-events: auto; }
.cif-card.hid { visibility: hidden; pointer-events: none; }
.cif-card:disabled { cursor: default; }
.cif-f { position: absolute; left: 0; top: 0; height: calc(var(--u) * 42); width: auto; }
.cif-card:not(:disabled):hover .cif-f { filter: brightness(1.2); }
.cif-face { position: absolute; inset: 0; pointer-events: none; }
.cif-card.turn .cif-face { visibility: hidden; }
.cif-face .cif-ic { position: absolute; left: calc(var(--u) * 2.5); top: calc(var(--u) * 5); width: calc(var(--u) * 24); height: calc(var(--u) * 24); max-width: none; max-height: none; margin: 0; object-fit: contain; }
.cif-sym { position: absolute; right: calc(var(--u) * 2); top: calc(var(--u) * 3); width: auto; height: calc(var(--u) * 10); }
/* CURSOR_ANIMATION: the two arrows over and under the card the mouse is on (frames 7 / 8, 80 ms each, 8 two pixels in) */
.cif-cur { position: absolute; left: calc(var(--u) * 10); top: calc(var(--u) * -18); width: calc(var(--u) * 9); height: calc(var(--u) * 78); display: none; pointer-events: none; }
.cif-cur img { position: absolute; left: 0; top: 0; width: calc(var(--u) * 9); height: auto; }
.cif-cur img + img { top: calc(var(--u) * 2); animation: cif-cur .16s steps(1) infinite; }
.cif-cur img:first-child { animation: cif-cur .16s steps(1) infinite reverse; }
@keyframes cif-cur { 0% { opacity: 1; } 50% { opacity: 0; } }
.cif-card:not(:disabled):hover .cif-cur { display: block; }
/* the name of the card turned last, on the client's blue name plate, over that card */
.cif-tag { position: absolute; top: calc(var(--u) * -162); transform: translateX(-50%); padding: 1px 4px; border-radius: 3px; white-space: nowrap; pointer-events: none;
  background: rgba(38, 62, 150, .82); box-shadow: 0 0 0 1px rgba(120, 160, 255, .55); color: #fff; font: bold calc(var(--u) * 11) / 1.2 "Microsoft JhengHei", sans-serif; text-shadow: 0 0 2px #1b2a78, 0 1px 0 #1b2a78; }
/* CARD_GAUGE_UI under the feet */
.cif-gauge { position: absolute; left: calc(var(--u) * -99.5); top: calc(var(--u) * 10); width: calc(var(--u) * 162); height: calc(var(--u) * 54); pointer-events: none; }
.cif-gimg { position: absolute; left: 0; top: 0; width: calc(var(--u) * 162); height: calc(var(--u) * 31); }
.cif-stage { position: absolute; left: calc(var(--u) * 2); top: calc(var(--u) * 12); width: calc(var(--u) * 19); text-align: center; font: 900 calc(var(--u) * 15) / 1 "Arial Black", Arial, sans-serif; color: #7a1c30; }
/* 2026-12-02 (user 「卡片沒有在格子內」): the card box of CARD_GAUGE_UI (f/17.png) is x 30–52, y 2–28 (measured on the
   picture: white edge 29/53, transparent inside 31–51 × 3–27); it was drawn at x 22, 8 px left of it */
.cif-use { position: absolute; left: calc(var(--u) * 30); top: calc(var(--u) * 2); width: calc(var(--u) * 23); height: calc(var(--u) * 27); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cif-use .cif-uic { width: calc(var(--u) * 23); height: calc(var(--u) * 23); max-width: none; max-height: none; margin: 0; object-fit: contain; }
.cif-life, .cif-pt { position: absolute; left: calc(var(--u) * 59); width: calc(var(--u) * 100); overflow: hidden; }
.cif-life { top: calc(var(--u) * 18); height: calc(var(--u) * 4); }
.cif-life i { display: block; height: 100%; background: url(../assets/ui/cardid/f/16.png) left / calc(var(--u) * 100) 100% no-repeat; transition: width .35s; }
.cif-pt { top: calc(var(--u) * 24); height: calc(var(--u) * 1); }
.cif-pt i { display: block; height: 100%; background: url(../assets/ui/cardid/f/15.png) left / calc(var(--u) * 100) 100% no-repeat; transition: width .35s; }
.cif-ticks { position: absolute; left: calc(var(--u) * 68); top: calc(var(--u) * 18); width: calc(var(--u) * 81); height: calc(var(--u) * 4); }
/* the numbers: the client's are small block digits, white with a dark edge like the words SCORE / COMBO */
.cif-lnum, .cif-snum, .cif-cnum { position: absolute; display: flex; font-family: "Arial Black", Arial, sans-serif; font-weight: 900; line-height: 1; white-space: nowrap; color: #fff;
  text-shadow: calc(var(--u) * 1) 0 0 #1f2748, calc(var(--u) * -1) 0 0 #1f2748, 0 calc(var(--u) * 1) 0 #1f2748, 0 calc(var(--u) * -1) 0 #1f2748; }
.cif-lnum i, .cif-snum i, .cif-cnum i { font-style: normal; display: block; text-align: center; }
.cif-lnum { left: calc(var(--u) * 143); top: calc(var(--u) * 7); font-size: calc(var(--u) * 7); }
.cif-lnum.low { color: #ff8a8a; }
.cif-snum { left: calc(var(--u) * 68); top: calc(var(--u) * 32.5); font-size: calc(var(--u) * 10); letter-spacing: calc(var(--u) * .5); }
.cif-cnum { left: calc(var(--u) * 68); top: calc(var(--u) * 45.5); font-size: calc(var(--u) * 7); }
.cif-score, .cif-combo { position: absolute; left: calc(var(--u) * 30); }
.cif-score { top: calc(var(--u) * 32); width: calc(var(--u) * 34); }
.cif-combo { top: calc(var(--u) * 45); width: calc(var(--u) * 24); }
.cif-pop { position: absolute; left: calc(var(--u) * 96); top: calc(var(--u) * -16); animation: cif-pop 1.5s ease-out forwards; pointer-events: none; }
.cif-pop img { width: calc(var(--u) * 63); display: block; }
.cif-pop b { font: 900 calc(var(--u) * 11) / 1 "Arial Black", Arial, sans-serif; color: #ff5050; text-shadow: 0 0 2px #000, 0 1px 0 #400; white-space: nowrap; }
@keyframes cif-pop { 0% { transform: translateY(6px); opacity: 0; } 15% { transform: translateY(0); opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }
/* web: the next card and 結束, small, under the gauge */
.cif-ctl { position: absolute; left: calc(var(--u) * -99.5); top: calc(var(--u) * 68); width: calc(var(--u) * 199); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; pointer-events: none; }
.cif-ctl > * { pointer-events: auto; }
.cif-note { padding: 2px 7px; border-radius: 10px; background: rgba(27, 32, 68, .78); color: #ffe9a8; font-size: 12px; white-space: nowrap; pointer-events: none; }
.cif-pick { position: relative; width: 30px; height: 30px; padding: 1px; border: 1px solid #8c9be0; border-radius: 6px; background: rgba(27, 32, 68, .78); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cif-pick:hover { background: rgba(80, 96, 190, .9); }
.cif-pick .it-ic { max-width: 26px; max-height: 26px; }
.cif-pick small { position: absolute; right: 1px; bottom: 0; color: #fff; font-size: 10px; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.cif-btn { padding: 3px 9px; border: 1px solid #8c9be0; border-radius: 10px; background: rgba(27, 32, 68, .78); color: #fff; font-size: 12px; cursor: pointer; white-space: nowrap; }
.cif-btn:hover { background: rgba(80, 96, 190, .9); }
.cif-btn.end { margin-left: auto; border-color: #e08c9b; }
.cif-btn.end:hover { background: rgba(190, 70, 96, .9); }
html.phone .cif-btn { padding: 6px 12px; font-size: 13px; } html.phone .cif-pick { width: 36px; height: 36px; }
/* 2026-12-02 (user 「卡片識別…不好用」→「只做ab」): each card takes clicks a little round itself (the look is the same; the gaps
   between the cards are 10, so 5 a side), and the items of this round beside the gauge (newest first) */
.cif-card::before { content: ""; position: absolute; left: calc(var(--u) * -5); right: calc(var(--u) * -5); top: calc(var(--u) * -8); bottom: calc(var(--u) * -8); }
.cif-got { position: absolute; left: calc(var(--u) * 66); top: calc(var(--u) * 6); display: grid; grid-template-columns: repeat(3, calc(var(--u) * 20)); gap: calc(var(--u) * 1); pointer-events: auto; }
.cif-gi { width: calc(var(--u) * 20); height: calc(var(--u) * 20); display: grid; place-items: center; border-radius: calc(var(--u) * 3); background: rgba(27, 32, 68, .72); box-shadow: 0 0 0 1px rgba(140, 155, 224, .6); }
.cif-gi .it-ic { width: calc(var(--u) * 18); height: calc(var(--u) * 18); max-width: none; max-height: none; margin: 0; object-fit: contain; }
.cif-gi:first-child { box-shadow: 0 0 0 1px #ffd76a; }
.cif-gi { position: relative; }
.cif-gi small { position: absolute; right: 0; bottom: calc(var(--u) * -1); font: 900 calc(var(--u) * 7) / 1 "Arial Black", Arial, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
/* 大量消耗卡片 (2026-12-02): this stage's multiplier on the stage box, and the panel's multiplier row */
.cif-x { position: absolute; left: calc(var(--u) * 1); top: calc(var(--u) * -9); padding: 0 calc(var(--u) * 3); border-radius: calc(var(--u) * 3); background: #e9a823; color: #3a2600;
  font: 900 calc(var(--u) * 8) / 1.25 "Arial Black", Arial, sans-serif; box-shadow: 0 0 0 1px #8a5a00; }
.cid .cid-mult .cid-row { gap: 4px; }
.cid .cid-mult .cid-row > b:first-child { margin-right: 4px; }
.cid .cid-xv { min-width: 34px; text-align: center; color: #8a5a00; }

/* the 卡片識別 panel (js/cards.js idBody, window #win-cardid): .pn parts, cid- its own */
#win-cardid { width: 360px; }
.cid .cid-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cid .cid-row .grow, .cid .pn-sec .grow { flex: 1; }
.cid .cid-res .pn-stats { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.cid .cid-got { display: flex; flex-wrap: wrap; gap: 4px; }
.cid .cid-gi { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--pn-line); border-radius: 7px; background: #fafbfe; }
.cid .cid-gi .it-ic { max-width: 28px; max-height: 28px; }
.cid .cid-gi small { position: absolute; right: 2px; bottom: 0; font-size: 10.5px; font-weight: 800; color: #262a4d; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.cid .cid-res button { flex: 1; }
.cid .cid-auto { font-size: 12px; font-weight: 400; white-space: nowrap; cursor: pointer; }
.cid .cid-list { max-height: min(42vh, 330px); }
.cid .cid-ic .it-ic { position: static; width: 26px; height: 26px; object-fit: contain; }
.cid .pn-big b { font-size: 13px; }
.cid .cid-tip { line-height: 1.45; }
html.phone #win-cardid { width: 340px; }
html.phone .cid .cid-list { max-height: 150px; }
html.phone .cid .cid-tip { display: none; }
/* a secret card: its picture over the ribbon (ACI_GETSECRSETCARD_ILLUST) */
.cif-secret { position: absolute; left: calc(var(--u) * -131.5); top: calc(var(--u) * -176); width: calc(var(--u) * 263); height: calc(var(--u) * 170); display: flex; align-items: center; justify-content: center; pointer-events: none; animation: cif-sec 3.5s ease forwards; z-index: 3; }
.cif-secret .rb { position: absolute; width: 100%; height: auto; }
.cif-secret .il { position: relative; height: 92%; image-rendering: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
@keyframes cif-sec { 0% { opacity: 0; transform: scale(.85); } 10% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* css/tarot.css?v=6 */
/* js/tarot.js: 塔羅占卜 (the fortune house). Pictures from the client's UI_nori (assets/tarot/ui, tools/tarot.py). */
#win-tarot { width: min(820px, calc(100vw - 16px)); }
#win-tarot .win-body { padding: 0; max-height: min(86vh, 640px); }
.tr-room { position: relative; padding: 10px 12px 12px; background: #2a130a center / cover no-repeat; color: #fbe9cf; min-height: 440px;
  border-radius: 0 0 8px 8px; overflow: hidden; }
.tr-room::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(30, 10, 4, .55), rgba(30, 10, 4, .78)); pointer-events: none; }
.tr-room > * { position: relative; }
/* the client's texts are dark ink (0x282559) with red numbers: a parchment box like the client's NPC balloon */
.tr-talk { display: flex; gap: 8px; align-items: flex-start; background: linear-gradient(#fff6e4, #f3dfbd); border: 2px solid #b0703a; border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; line-height: 1.5; min-height: 40px; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.tr-talk > b { flex: none; color: #fff2cf; padding: 1px 7px; border-radius: 10px; background: #8a3414; font-size: 12px; }
.tr-talk span[style] { font-weight: 700; }
.tr-talk > div { color: #282559; }
.tr-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 7px 2px; font-size: 12px; color: #f1d3a4; }
.tr-info b { color: #ffe08a; }
.tr-info .sub { color: #c9a77c; }
.tr-stars i { font-style: normal; color: #6b4a2e; letter-spacing: 1px; }
.tr-stars i.on { color: #ffd84a; text-shadow: 0 0 4px #ffb21e; }
.tr-panel { background: rgba(48, 18, 8, .78); border: 2px solid #8c4a1f; border-radius: 10px; padding: 4px 8px 8px; box-shadow: inset 0 0 18px rgba(0, 0, 0, .55); }
.tr-panel h5 { margin: 0 0 4px; font: 700 11px/1.4 Georgia, serif; letter-spacing: 2px; color: #e09a52; text-align: center; }
.tr-row { display: flex; justify-content: center; gap: 6px; flex-wrap: nowrap; padding-top: 6px; }
.tr-slot { position: relative; }
.tr-low { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 10px; align-items: stretch; }
.tr-mine { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 4px; min-height: 92px; align-items: flex-end; }
.tr-mine-c { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tr-mine-c small { font-size: 10px; color: #ffd9a0; }
.tr-mine-c.sel .tr-card { outline: 2px solid #ffe14d; outline-offset: 2px; transform: translateY(-4px); }
.tr-none { margin: 6px; font-size: 12px; color: #d6b48a; }
.tr-balls { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.tr-ball { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 6px 4px; border-radius: 12px; border: 1px solid #8c4a1f;
  background: rgba(60, 20, 8, .7); color: #ffe5b8; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.tr-ball img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 45% 40%; transition: transform .15s, filter .15s; }
.tr-ball:hover img { transform: scale(1.08); filter: brightness(1.15) drop-shadow(0 0 6px #ffb347); }
.tr-ball.go { border-color: #d8902f; }

/* a card: the client's frame (one colour per ability) over the card's picture, the ability label and the level */
.tr-card { position: relative; display: inline-block; width: 64px; height: 80px; cursor: pointer; flex: none; transition: transform .12s, filter .12s; border-radius: 4px; }
.tr-card .tr-face, .tr-card .tr-back { position: absolute; inset: 0; }
.tr-card .tr-back { display: none; border-radius: 4px; border: 2px solid #e2b45c; background: #5a2410 url(../assets/tarot/ui/back.png) center / cover; }
.tr-card .tr-art { position: absolute; left: 27.5%; top: 7%; width: 63.75%; height: 71%; object-fit: cover; object-position: 50% 15%; background: #1d1c2d; }
.tr-card .tr-ic { display: grid; place-items: center; }
.tr-card .tr-frame { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.tr-card .tr-lab { position: absolute; left: 4%; bottom: 5%; height: 12%; image-rendering: pixelated; }
.tr-card .tr-num { position: absolute; right: 6%; bottom: 3%; height: 18%; image-rendering: pixelated; }
.tr-card:hover { transform: translateY(-3px); filter: brightness(1.12); }
.tr-card.own { box-shadow: 0 0 0 2px #ffe14d, 0 0 10px 2px rgba(255, 210, 80, .75); }
.tr-card.sel { outline: 2px dashed #fff4b8; outline-offset: 3px; transform: translateY(-5px); }
.tr-card.out { filter: grayscale(.9) brightness(.6); cursor: default; }
.tr-slot.own::after { content: 'MY'; position: absolute; left: 2px; top: -9px; font: 700 9px/12px sans-serif; padding: 0 4px; border-radius: 6px; background: #c9471b; color: #fff; }
.tr-x { position: absolute; right: -6px; top: -8px; width: 17px; height: 17px; border-radius: 50%; background: #3a1206; border: 1px solid #ffcf7a; color: #ffcf7a;
  font: 700 12px/15px sans-serif; text-align: center; cursor: pointer; }
.tr-card.hi { transform: translateY(-8px) scale(1.06); box-shadow: 0 0 0 2px #fff7c2, 0 0 16px 4px rgba(255, 236, 140, .9); }
.tr-card.main { transform: translateY(-8px) scale(1.08); box-shadow: 0 0 0 3px #ffd84a, 0 0 18px 6px rgba(255, 190, 40, .95); animation: tr-pulse 1s ease-in-out infinite alternate; }
.tr-card.cross { transform: translateY(-5px); box-shadow: 0 0 0 3px #9fd8ff, 0 0 16px 5px rgba(120, 200, 255, .9); }
@keyframes tr-pulse { to { filter: brightness(1.25); } }

/* the reveal: the star clock, then the two cards (the cross card across the main one) */
/* while the light runs, the clock sits over MY CARD and the table stays in sight; the result covers everything */
.tr-stage { position: absolute; left: 0; right: 0; bottom: 0; top: 52%; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(rgba(20, 8, 3, 0), rgba(20, 8, 3, .8) 30%); animation: tr-in .35s ease-out; pointer-events: none; }
.tr-stage .tr-clock { width: min(210px, 40vh); }
.tr-stage.done { top: 0; background: radial-gradient(circle at 50% 45%, rgba(60, 25, 8, .86), rgba(12, 4, 2, .96)); pointer-events: auto; }
@keyframes tr-in { from { opacity: 0; } }
.tr-clock { position: relative; width: min(300px, 60vh); aspect-ratio: 1; flex: none; animation: tr-pop .5s ease-out; }
.tr-clock.small { width: min(170px, 34vh); opacity: .9; }
@keyframes tr-pop { from { transform: scale(.4) rotate(-40deg); opacity: 0; } }
.tr-dial { width: 100%; height: 100%; }
.tr-hand { position: absolute; image-rendering: auto; }
.tr-hand.sun { left: 43.4%; top: 27.1%; width: 13.2%; height: 50%; transform-origin: 50% 45.8%; animation: tr-spin 2.6s linear infinite; }
.tr-hand.moon { left: 45.6%; top: 32%; width: 8.8%; height: 45.5%; transform-origin: 50% 39.6%; animation: tr-spin 1.7s linear infinite reverse; }
.tr-hand.star { left: 45.5%; top: 35.8%; width: 9%; height: 40.8%; transform-origin: 50% 34.7%; animation: tr-spin 1.1s linear infinite; }
.tr-stage.done .tr-hand { animation-duration: 8s; }
@keyframes tr-spin { to { transform: rotate(360deg); } }
.tr-wait { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-weight: 700; color: #ffe08a; letter-spacing: 2px; }
.tr-result { display: flex; align-items: center; gap: 18px; }
.tr-cross { position: relative; width: 190px; height: 190px; flex: none; }
.tr-cross .tr-card.big { position: absolute; width: 120px; height: 150px; left: 35px; top: 20px; cursor: default; animation: tr-flip .6s ease-out both; }
.tr-cross .tr-card.big.main { transform: none; z-index: 2; }
/* the crossing card lies across, under the main one: its two ends show on both sides */
.tr-cross .tr-card.big.cross { transform: rotate(90deg) scale(1.18); z-index: 1; filter: brightness(.85); animation: tr-lay .6s .55s ease-out both; }
@keyframes tr-flip { 0% { transform: perspective(500px) rotateY(90deg) scale(.6); } 60% { transform: perspective(500px) rotateY(-12deg) scale(1.04); } 100% { transform: perspective(500px) rotateY(0) scale(1); } }
@keyframes tr-lay { 0% { transform: translateY(-60px) rotate(20deg) scale(.6); opacity: 0; } 100% { transform: rotate(90deg) scale(1.18); opacity: 1; } }
/* the three picked cards side by side, each with what it gives (2026-11-21) */
.tr-three { display: flex; gap: 10px; flex: none; }
.tr-pick { display: flex; flex-direction: column; align-items: center; gap: 3px; animation: tr-flip .6s ease-out both; }
.tr-pick .tr-card.big { width: 96px; height: 120px; cursor: default; animation: none; transform: none; }
.tr-pick small { font-size: 11px; color: #e9c792; }
.tr-pick b { font-size: 12.5px; color: #fff3b0; text-shadow: 0 0 6px #ff9b2e; white-space: nowrap; }
.tr-res-text .sub { color: #d6b48a; font-size: 12px; }
/* three cards + the text need the whole width: the clock steps back into the corner */
.tr-stage.done .tr-clock.small { position: absolute; left: 10px; top: 10px; width: 110px; opacity: .5; }
.tr-stage.done .tr-res-text { min-width: 0; max-width: 300px; }
.tr-res-text { max-width: 330px; font-size: 13px; line-height: 1.55; }
.tr-res-text p { margin: 3px 0; }
.tr-res-text b { color: #ffe08a; }
.tr-eff { font-size: 18px; font-weight: 800; color: #fff3b0; text-shadow: 0 0 8px #ff9b2e; }
.tr-stamp { display: inline-block; font: 900 26px/1 serif; padding: 4px 12px; border: 3px double currentColor; border-radius: 10px; color: #f2c14e; transform: rotate(-8deg);
  animation: tr-stamp .45s 1.1s ease-out both; }
@keyframes tr-stamp { from { transform: rotate(-8deg) scale(2.4); opacity: 0; } }
.tr-result.great .tr-stamp { color: #ff6a3d; text-shadow: 0 0 10px #ffb24d; }
.tr-result.triple .tr-stamp { color: #fff3a0; text-shadow: 0 0 8px #ff4dd2, 0 0 16px #7a5cff; }
.tr-tri { color: #ffe066; font-weight: bold; text-shadow: 0 0 6px #ff4dd2; }
.tr-result.good .tr-stamp { color: #ffd84a; }
.tr-result.fine .tr-stamp { color: #bfe3ff; }
.tr-result.none .tr-stamp { color: #b5a08a; }
.tr-res-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tr-res-btns button { padding: 5px 12px; }

/* 今日運勢: the zodiac card (js/tarot.js todayHtml). The client's uRefFortuneView (0088b030 / 0088b360): the sign's name on a
   238x20 strip, 5 px under it the card 150x220 centred, its Word on the card's plate 32 px above the card's bottom (18 px
   high, white with a grey edge), 5 px under the card the Comment 250 wide. --ch = the card's height: everything on it scales. */
.trd { --ch: 220px; box-sizing: border-box; width: 260px; max-width: 94vw; padding: 5px; border-radius: 8px; background: rgba(24, 28, 50, .95);
  border: 1px solid #98a4e6; box-shadow: 0 6px 22px rgba(0, 0, 0, .55); color: #f3f4ff; font-size: 12.5px; line-height: 1.5; text-align: left; cursor: default; }
.trd-title { box-sizing: border-box; width: 238px; max-width: 100%; height: 20px; margin: 0 auto 5px; border-radius: 4px; border: 1px solid #8792d8;
  background: linear-gradient(#515cab, #2f3772); color: #fff; font-weight: 700; font-size: 13px; line-height: 18px; text-align: center; letter-spacing: 3px;
  text-shadow: 1px 1px 0 #888; }
.trd-card { position: relative; width: calc(var(--ch) * 150 / 220); height: var(--ch); margin: 0 auto 5px; flex: none; }
.trd-card img { display: block; width: 100%; height: 100%; user-select: none; }
.trd-word { position: absolute; left: 0; right: 0; top: calc(var(--ch) * 188 / 220); height: calc(var(--ch) * 18 / 220); line-height: calc(var(--ch) * 18 / 220);
  font-size: calc(var(--ch) * 12 / 220); font-weight: 700; text-align: center; white-space: nowrap; color: #fff; pointer-events: none;
  text-shadow: 1px 0 0 #888, -1px 0 0 #888, 0 1px 0 #888, 0 -1px 0 #888, 1px 1px 0 #888, -1px -1px 0 #888, 1px -1px 0 #888, -1px 1px 0 #888; }
.trd-text { box-sizing: border-box; width: 250px; max-width: 100%; margin: 0 auto; }
.trd-sub { margin: 6px 0 0; padding-top: 4px; border-top: 1px dashed rgba(152, 164, 230, .5); font-size: 11.5px; color: #c3c9f2; }
.trd-sub b { color: #7fc6ff; }
/* beside 星姬's dialog (「我想看今日運勢」): over the dialog box's right end, clear of its ✕ */
#trd-dlg { position: absolute; right: 0; bottom: calc(100% + 18px); z-index: 3; animation: trd-in .3s ease-out; }
#trd-dlg:empty { display: none; }
@keyframes trd-in { from { opacity: 0; transform: translateY(10px); } }
/* in the reading's window: the sign's name is a button, the card comes up over the table */
.tr-zod { margin-right: 6px; padding: 0 9px; border-radius: 10px; border: 1px solid #b9c1ff; background: linear-gradient(#5560b4, #333b7c); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; }
.tr-zod:hover { filter: brightness(1.2); }
.trd-ov { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 6px; background: rgba(12, 4, 2, .74); overflow-y: auto;
  cursor: pointer; animation: tr-in .25s ease-out; }
/* low screens: the card on the left, the text on the right; beside the dialog the card shrinks to what is left over the box,
   a tap on it brings the whole panel up over the dialog (and back) */
@media (max-height: 680px) {
  #trd-dlg .trd, .trd-ov .trd { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; width: min(470px, 94vw); }
  #trd-dlg .trd-title, .trd-ov .trd-title { grid-column: 1 / 3; width: auto; }
  #trd-dlg .trd-card, .trd-ov .trd-card { margin: 0; }
  #trd-dlg .trd-text, .trd-ov .trd-text { width: auto; max-height: var(--ch); overflow-y: auto; }
  #trd-dlg .trd { --ch: clamp(90px, calc(100vh - 262px), 220px); --ch: clamp(90px, calc(100dvh - 262px), 220px); }
  #trd-dlg .trd-card { cursor: zoom-in; }
  .trd-ov .trd { --ch: clamp(90px, calc(100vh - 150px), 220px); --ch: clamp(90px, calc(100dvh - 150px), 220px); }
  #trd-dlg.trd-zoom { bottom: 0; }
  #trd-dlg.trd-zoom .trd { --ch: clamp(90px, calc(100vh - 60px), 220px); --ch: clamp(90px, calc(100dvh - 60px), 220px); }
  #trd-dlg.trd-zoom .trd-card { cursor: zoom-out; }
}
@media (max-height: 540px) and (orientation: landscape) {
  #trd-dlg .trd { --ch: clamp(90px, calc(100vh - 226px), 220px); --ch: clamp(90px, calc(100dvh - 226px), 220px); }
  #trd-dlg.trd-zoom .trd { --ch: clamp(90px, calc(100vh - 52px), 220px); --ch: clamp(90px, calc(100dvh - 52px), 220px); }
}

/* narrow screens: the ten cards on two rows */
@media (max-width: 700px) {
  .tr-row { flex-wrap: wrap; }
  .tr-low { grid-template-columns: 1fr; }
  .tr-balls { flex-direction: row; justify-content: center; }
  .tr-result { flex-direction: column; gap: 6px; }
  .tr-stage { flex-direction: column; gap: 6px; }
}
/* phones (landscape, the 460-tall layout): smaller cards, everything visible without scrolling the window much */
@media (max-height: 540px) and (orientation: landscape) {
  #win-tarot { width: min(820px, calc(100vw - 12px)); }
  #win-tarot .win-body { padding: 0; max-height: calc(100vh - 46px); max-height: calc(100dvh - 46px); }
  .tr-room { min-height: 0; padding: 6px 8px 8px; }
  .tr-talk { font-size: 11px; min-height: 0; padding: 4px 8px; max-height: 64px; overflow-y: auto; }
  .tr-info { margin: 4px 2px; font-size: 11px; }
  .tr-card { width: 46px; height: 58px; }
  .tr-row { gap: 4px; padding-top: 4px; }
  .tr-mine { min-height: 66px; padding: 4px 2px 2px; }
  .tr-low { grid-template-columns: 1fr auto; margin-top: 6px; }
  .tr-balls { flex-direction: column; }
  .tr-ball img { width: 34px; height: 34px; }
  .tr-ball { font-size: 11px; }
  .tr-clock { width: min(220px, 52vh); }
  .tr-clock.small { width: min(120px, 28vh); }
  .tr-cross { width: 140px; height: 140px; }
  .tr-cross .tr-card.big { width: 84px; height: 105px; left: 28px; top: 17px; }
  .tr-pick .tr-card.big { width: 64px; height: 80px; }
  .tr-three { gap: 6px; }
  .tr-res-text { font-size: 12px; }
  .tr-eff { font-size: 15px; }
  .tr-stage { flex-direction: row; }
  .tr-result { flex-direction: row; }
}

/* css/awaken.css?v=15 */
/* the awakening / guardian window (js/awaken.js) */
#win-awaken { width: 560px; max-width: calc(100vw - 32px); }
#win-awaken .aw-tabs { margin-bottom: 8px; }
.aw-hero { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; background: rgba(255, 246, 176, .07); }
.aw-hero img { width: 120px; height: auto; border-radius: 6px; flex: none; }
.aw-hero h4 { margin: 0 0 4px; }
.aw-hero p { margin: 2px 0; }
.aw-sk { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.aw-sk img { width: 32px; height: 32px; image-rendering: pixelated; }
.aw-sk b { display: block; }
.aw-sk small { opacity: .7; }
.aw-sk p { margin: 2px 0 0; font-size: 12px; opacity: .85; }
.aw-sk button { min-width: 84px; }
.aw-bar { display: inline-block; vertical-align: middle; width: 120px; height: 7px; margin: 0 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.aw-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f5d36a, #ffe9a8); }
.aw-bar.sp i { background: linear-gradient(90deg, #b48cff, #e0ccff); }
.aw-seed, .aw-st, .aw-ev { border-collapse: collapse; width: 100%; font-size: 13px; }
.aw-seed th, .aw-seed td, .aw-ev th, .aw-ev td { padding: 4px 6px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .06); white-space: nowrap; }
.aw-seed small { opacity: .7; }
.aw-ev tr.off td { opacity: .45; }
.aw-ev td:first-child { white-space: normal; }
.aw-log { margin: 4px 0; padding-left: 18px; font-size: 12px; max-height: 120px; overflow: auto; }
.aw-glist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.aw-g { display: flex; flex-direction: column; align-items: center; width: 92px; padding: 6px 4px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); font-size: 12px; }
.aw-g img { height: 56px; width: auto; max-width: 84px; object-fit: contain; }
.aw-g.on { border-color: #f5d36a; box-shadow: 0 0 0 1px #f5d36a inset; }
.aw-g.empty { justify-content: center; min-height: 84px; opacity: .5; }
.aw-gd { display: flex; gap: 12px; align-items: flex-start; }
.aw-gd h4 { margin: 0 0 4px; }
.aw-gd small { opacity: .7; font-weight: normal; }
.aw-big { width: 120px; height: auto; flex: none; object-fit: contain; }
.aw-st { columns: 2; display: block; }
.aw-st tr { display: inline-flex; width: 48%; justify-content: space-between; }
.aw-st th { font-weight: normal; opacity: .75; padding-right: 8px; }
@media (max-width: 600px), (max-height: 540px) {
  .aw-hero img, .aw-big { width: 80px; }
  .aw-gd { flex-direction: column; }
  .aw-bar { width: 70px; }
}

/* 角色屬性 › 守護者 (js/awaken.js guardHtml, 2026-11-25) — prefix gd2- */
.gd2 { display: flex; gap: 10px; align-items: flex-start; }
.gd2-list { display: flex; flex-direction: column; gap: 6px; width: 150px; flex: none; }
.gd2-pick { display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid #c9d5f0; border-radius: 9px; background: #f5f8ff; text-align: left; cursor: pointer; font: inherit; color: #2a3560; }
.gd2-pick img { width: 34px; height: 34px; object-fit: contain; }
.gd2-pick b { display: block; font-size: 12px; } .gd2-pick small { font-size: 11px; color: #6a7aa8; }
.gd2-pick.on { border-color: #ff5fae; box-shadow: 0 0 0 2px rgba(255, 95, 174, .25); background: #fff4fa; }
.gd2-pick.eq small { color: #c47a00; }
.gd2-pick.empty { justify-content: center; color: #9aa6c8; font-size: 12px; border-style: dashed; cursor: default; min-height: 44px; }
.gd2-main { flex: 1; min-width: 0; }
.gd2-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: linear-gradient(135deg, #2d2756, #4b3b8f); color: #fff; }
.gd2-big { width: 84px; height: 84px; object-fit: contain; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 70%); border-radius: 50%; }
.gd2-id { flex: 1; min-width: 0; }
.gd2-id h4 { margin: 0 0 2px; font-size: 15px; } .gd2-id small { color: #d8d2ff; font-size: 11.5px; }
.gd2-lv { display: flex; align-items: center; gap: 6px; margin: 5px 0; } .gd2-lv b { color: #ffd84a; }
.gd2-lv .aw-bar { flex: 1; } .gd2-lv small { white-space: nowrap; }
.gd2-btns { display: flex; gap: 6px; } .gd2-btns button { padding: 3px 12px; font-size: 12px; min-height: 26px; border-radius: 7px; }
/* 2026-11-26 the purple card's buttons (were the browser's grey default): 裝備 = gold, 變更名稱 = glass, 裝備中 = a gold badge */
.gd2-card .gd2-btns button { background-color: #ffd84a; color: #3a2600; border: 1px solid #c99a12;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -3px 0 rgba(120,70,0,.25), 0 2px 4px rgba(0,0,0,.35); }
.gd2-card .gd2-btns button:hover:not(:disabled) { background-color: #ffe27a; border-color: #c99a12; }
.gd2-card .gd2-btns button.alt { background-color: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 4px rgba(0,0,0,.3); }
.gd2-card .gd2-btns button.alt:hover:not(:disabled) { background-color: rgba(255,255,255,.26); border-color: #fff; }
.gd2-card .gd2-btns button:disabled { background-color: rgba(255,216,74,.16); color: #ffe48a; border: 1px solid rgba(255,216,74,.55); box-shadow: none; cursor: default; }
.gd2-sec { margin: 9px 0 5px; font-weight: 700; font-size: 13px; color: #4b3b8f; border-bottom: 1px solid #ddd6f5; padding-bottom: 2px; }
.gd2-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px 8px; font-size: 12px; }
.gd2-stats span { display: flex; justify-content: space-between; padding: 2px 6px; border-radius: 5px; background: #f3f1ff; }
.gd2-stats i { font-style: normal; color: #6a6a9a; } .gd2-stats b { color: #2a2560; }
.gd2-stats .gd2-own { font-style: normal; font-weight: 600; color: #1f9d4c; margin-left: 3px; font-size: 11px; }   /* 角色的 10 % */
.gd2-socks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gd2-sock { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); background: color-mix(in srgb, var(--c) 10%, #fff); }
.gd2-sock i { width: 22px; height: 22px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000)); box-shadow: 0 0 6px var(--c); }
.gd2-sock .gd2-st { width: 28px; height: 28px; flex: none; object-fit: contain; filter: drop-shadow(0 0 3px var(--c)); }
.gd2-sock b { display: block; font-size: 12px; color: #2a2560; } .gd2-sock small { font-size: 11px; color: #777; }
.gd2-cards { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.gd2-cards button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 12px; }
.gd2-cards small { color: #888; }
.gd2-cards button.no { opacity: .55; }
.gd2-sks { display: flex; gap: 6px; } .gd2-sk { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; background: #eef7ff; border: 1px solid #b9dcf3; font-size: 12px; }
.gd2-sk img { width: 22px; height: 22px; } .gd2-sk.empty { color: #9aa6c8; border-style: dashed; background: none; }
/* 2026-11-26: registered skills (click = cast / don't cast), 前置用 ones, 戰鬥設定 */
.gd2-sks { flex-wrap: wrap; }
.gd2-sk small { color: #5b7fa0; font-size: 11px; }
button.gd2-sk { cursor: pointer; font: inherit; font-size: 12px; color: inherit; }
.gd2-sk.off { background: #f1f1f4; border-color: #cfcfd8; opacity: .6; }
.gd2-sk.pre { background: #f6f3ff; border-color: #d8cff3; }
.gd2-skw { display: inline-flex; align-items: center; gap: 2px; }
.gd2-x { padding: 0 6px; min-width: 0; height: 22px; line-height: 20px; font-size: 11px; border-radius: 6px; background: #fff0f0; border: 1px solid #e3b3b3; color: #b44; cursor: pointer; }
.gd2-x:hover { background: #ffdede; }
/* 2026-11-29 「技能頁面整齊排列 成兩排」: registered skills and the cards that fit, two even columns */
.gd2 .gd2-sks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gd2 .gd2-skw { display: flex; min-width: 0; gap: 3px; }
.gd2 .gd2-skw > .gd2-sk { flex: 1; min-width: 0; }
.gd2 .gd2-sk b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.gd2 .gd2-sk small { white-space: nowrap; }
.gd2 .gd2-skw > button:not(.gd2-sk) { flex: none; align-self: center; }
.gd2 .gd2-skcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gd2 .gd2-skcards > button { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0; text-align: left; }
.gd2 .gd2-skcards > button b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; }
.gd2-ord { padding: 0 6px; min-width: 0; height: 22px; line-height: 20px; font-size: 11px; border-radius: 6px; background: #eef6ff; border: 1px solid #a9c6e6; color: #2f5f8f; cursor: pointer; }
.gd2-ord.one { background: #fff6e0; border-color: #e2c27a; color: #8a6210; }
.gd2-ord:hover { filter: brightness(0.96); }
.gd2-use { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 12px; }
.gd2-use > span { color: #4b3b8f; font-weight: 700; margin-right: 2px; }
.gd2-use button { padding: 3px 10px; font-size: 12px; }
.gd2-use button.off { opacity: .6; filter: grayscale(.8); }
.gd2-feed > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #e3e3f1; font-size: 12.5px; }
.gd2-feed span { display: inline-flex; align-items: center; gap: 5px; } .gd2-feed small { color: #777; }
.gd2-feed button { padding: 3px 9px; font-size: 12px; }
@media (max-width: 640px) { .gd2 { flex-direction: column; } .gd2-list { flex-direction: row; overflow-x: auto; width: 100%; } .gd2-pick { min-width: 130px; } .gd2-stats { grid-template-columns: repeat(2, 1fr); } }
#win-system:has(.gd2-main) { width: min(700px, 96vw) !important; }
.gd2-stats { grid-template-columns: repeat(3, 1fr); } .gd2-stats i, .gd2-stats b { white-space: nowrap; }

/* ---------- 種子教感情報 (2026-11-25): the client's soulseedUI.nri pieces, placed as in Trickster.bin (js/awaken.js).
   The window is the panel and nothing more, as in the client (the user's screenshot). ---------- */
#win-awaken { width: max-content; min-width: 0; max-width: calc(100vw - 16px); }
.ssi { position: relative; width: calc(var(--u) * 123); height: calc(var(--u) * 228); margin: 2px auto 4px; image-rendering: pixelated; }
.ssi-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.ssi-graph { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: auto; }
/* the seed's name on the top band */
.ssi-name { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--u) * 16); line-height: calc(var(--u) * 16); text-align: center; white-space: nowrap; overflow: hidden;
  color: #fff; font-size: calc(var(--u) * 10.5); text-shadow: 0 1px 0 #5a66b8, 0 0 2px #5a66b8; }
/* the levels: the client's small yellow digits with a dark edge */
.ssi-n { position: absolute; width: calc(var(--u) * 16); z-index: 1; text-align: center; font: 900 calc(var(--u) * 10) / 1 'Arial Black', Arial, sans-serif; color: #ffe84a;
  text-shadow: 1px 0 0 #2b2350, -1px 0 0 #2b2350, 0 1px 0 #2b2350, 0 -1px 0 #2b2350, 1px 1px 0 #2b2350, -1px -1px 0 #2b2350, 1px -1px 0 #2b2350, -1px 1px 0 #2b2350; cursor: help; }
.ssi-n small { font-size: .6em; color: #fff; margin-left: 1px; }
.ssi-aura { position: absolute; left: 0; top: calc(var(--u) * 139); width: 100%; height: calc(var(--u) * 15); text-align: center;
  font-size: calc(var(--u) * 10.5); line-height: calc(var(--u) * 15); color: #fff; text-shadow: 0 1px 0 #5a66b8, 0 0 2px #5a66b8; cursor: help; }
.ssi-aura i { font-style: normal; }
/* the aura: buff_bar (111 × 9, five pieces) in the white box, one red `buff` piece (21 × 7) a stage */
.ssi-bar { position: absolute; left: calc(var(--u) * 6); top: calc(var(--u) * 158); width: calc(var(--u) * 111); height: calc(var(--u) * 9); cursor: help; }
.ssi-bar img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.ssi-bar i { position: absolute; left: calc(var(--u) * 1); top: calc(var(--u) * 1); height: calc(var(--u) * 7); background: url(../assets/ui/soulseed/39.png) repeat-x; background-size: calc(var(--u) * 22) calc(var(--u) * 7); image-rendering: pixelated; }
.ssi-k, .ssi-v { position: absolute; height: calc(var(--u) * 15); line-height: calc(var(--u) * 15); font-size: calc(var(--u) * 10.5); white-space: nowrap; overflow: hidden; }
.ssi-k { left: calc(var(--u) * 1); width: calc(var(--u) * 54); color: #fff; text-align: center; text-shadow: 0 1px 0 #5a66b8, 0 0 2px #5a66b8; }
.ssi-v { left: calc(var(--u) * 56); width: calc(var(--u) * 64); color: #3c4058; text-align: center; }
.ssi-foot { margin: 0 2px 2px; max-width: calc(1.5px * 123); font-size: 11.5px; line-height: 1.5; text-align: center; color: #555a78; }
.ssi-done { color: #c08a00; }

/* the winged seed at the bottom right (uSoulSeedMainView: screen W − 80, H − 100 in the client) */
#ss-hud { position: absolute; right: 14px; top: 270px; width: 101px; height: 104px; z-index: 6; cursor: pointer; image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
#ss-hud.hidden { display: none; }
#ss-hud img { position: absolute; image-rendering: pixelated; pointer-events: none; }
#ss-hud .bar { position: absolute; left: -5px; top: 96px; width: 111px; height: 9px; }
#ss-hud .bar img { position: static; }
#ss-hud .bar i { position: absolute; left: 1px; top: 1px; height: 7px; background: url(../assets/ui/soulseed/39.png) repeat-x; background-size: 22px 7px; }
#ss-hud:hover { filter: drop-shadow(0 0 6px #fff6b0) drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
html.phone #ss-hud { transform: scale(.6); transform-origin: right top; top: 150px; right: 4px; }

/* css/shadow.css?v=1 */
/* the rainbow-stone defenses (js/shadow.js) */
#shadow-banner { position: fixed; left: 50%; top: 22%; transform: translate(-50%, -8px); z-index: 60; max-width: min(640px, calc(100vw - 32px));
  padding: 10px 22px; border-radius: 10px; background: rgba(12, 8, 28, .78); font: bold 18px/1.45 "Microsoft JhengHei", sans-serif;
  text-align: center; white-space: pre-line; text-shadow: 0 1px 3px #000; pointer-events: none; opacity: 0; transition: opacity .35s, transform .35s; }
#shadow-banner.on { opacity: 1; transform: translate(-50%, 0); }
#shadow-hud { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 55; min-width: 240px; padding: 6px 14px 7px;
  border-radius: 8px; background: rgba(12, 8, 28, .72); color: #f1ecff; font: 13px/1.4 "Microsoft JhengHei", sans-serif; text-align: center; pointer-events: none; }
#shadow-hud b { margin-right: 6px; color: #ffe9a8; }
#shadow-hud small { display: block; opacity: .8; }
#shadow-hud .sh-stones { display: flex; gap: 5px; justify-content: center; margin: 4px 0 2px; }
#shadow-hud .sh-stones i { display: block; width: 38px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
#shadow-hud .sh-stones em { display: block; height: 100%; background: linear-gradient(90deg, #8ad6ff, #e0b8ff, #ffe39a); }
@media (max-height: 540px) { #shadow-banner { font-size: 14px; top: 18%; } #shadow-hud { top: 4px; font-size: 11px; } }

/* css/useitems.css?v=4 */
/* js/books.js: the book reader (the client's BookUI.nri page, 390 x 474) */
#book-reader { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(10, 8, 6, .55); }
#book-reader .bk-wrap { position: relative; width: 390px; height: 512px; transform-origin: center center; flex: none; }
#book-reader .bk-page { position: absolute; left: 0; top: 0; width: 390px; height: 474px; background-repeat: no-repeat; background-size: 390px 474px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .55)); overflow: hidden; }
#book-reader .bk-page span { position: absolute; white-space: pre; font: 12px/15px "Microsoft JhengHei", "PMingLiU", sans-serif; letter-spacing: .2px; }
#book-reader .bk-img { position: absolute; left: 50%; transform: translateX(-50%); width: auto; max-width: 330px; object-fit: contain; image-rendering: auto; }
#book-reader .bk-bar { position: absolute; left: 0; right: 0; top: 480px; display: flex; align-items: center; justify-content: center; gap: 14px; }
#book-reader .bk-bar span { min-width: 64px; text-align: center; color: #f6ecd8; font: 600 14px "Microsoft JhengHei", sans-serif; text-shadow: 0 1px 3px #000; }
#book-reader .bk-prev, #book-reader .bk-next { width: 40px; height: 30px; border: 0; cursor: pointer; background: center / contain no-repeat; }
#book-reader .bk-prev { background-image: url(../assets/book/btn_prepage00.png); }
#book-reader .bk-next { background-image: url(../assets/book/btn_nextpage00.png); }
#book-reader .bk-prev:hover:not(:disabled) { background-image: url(../assets/book/btn_prepage01.png); }
#book-reader .bk-next:hover:not(:disabled) { background-image: url(../assets/book/btn_nextpage01.png); }
#book-reader .bk-prev:disabled, #book-reader .bk-next:disabled { opacity: .35; cursor: default; }
#book-reader .bk-x { position: absolute; right: -6px; top: -6px; width: 28px; height: 28px; border: 0; cursor: pointer; background: url(../assets/book/btn_exit00.png) center / contain no-repeat; }
#book-reader .bk-x:hover { background-image: url(../assets/book/btn_exit01.png); }
#book-reader .bk-title { position: absolute; left: 0; right: 0; top: -26px; text-align: center; color: #f6ecd8; font: 600 14px "Microsoft JhengHei", sans-serif; text-shadow: 0 1px 3px #000; }

/* js/useitems.js: small question panels (dye, skill reset, growth reset, megaphone) */
#use-panel { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 55; width: min(380px, calc(100vw - 32px));
  background: rgba(24, 28, 44, .96); border: 1px solid rgba(160, 180, 255, .4); border-radius: 12px; color: #eef1ff; font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
#use-panel .up-head { display: flex; align-items: center; padding: 9px 12px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .08); }
#use-panel .up-head .x { margin-left: auto; background: none; border: 0; color: #cfd6f5; font-size: 15px; cursor: pointer; }
#use-panel .up-body { padding: 10px 12px 12px; max-height: 60vh; overflow-y: auto; }
#use-panel p { margin: 0 0 8px; color: #c9d1f2; }
#use-panel .up-sw { display: grid; grid-template-columns: repeat(auto-fill, 30px); gap: 6px; }
#use-panel .up-sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); cursor: pointer; }
#use-panel .up-sw button.on { border-color: #ffd84a; box-shadow: 0 0 0 2px rgba(255, 216, 74, .4); }
#use-panel .up-list { display: flex; flex-direction: column; gap: 4px; }
#use-panel .up-list button, #use-panel .up-ok { text-align: left; padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(160, 180, 255, .3); background: rgba(255, 255, 255, .06); color: #eef1ff; cursor: pointer; font-size: 13px; }
#use-panel .up-list button:hover, #use-panel .up-ok:hover { background: rgba(140, 165, 255, .22); }
#use-panel .up-ok { margin-top: 8px; text-align: center; background: #4a63d8; border-color: #6d84f0; font-weight: 700; }
#use-panel .up-in { width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 7px; border: 1px solid rgba(160, 180, 255, .4); background: rgba(0, 0, 0, .3); color: #fff; }
#use-panel .up-radar { display: block; }
#use-panel button:disabled { opacity: .45; cursor: default; }

/* the item the window uses (姓名變更 / 成長初始化) */
#use-panel .up-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 10px; border-radius: 9px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(160, 180, 255, .18); }
#use-panel .up-item img, #use-panel .up-item .ii { width: 34px; height: 34px; flex: none; }
#use-panel .up-item div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#use-panel .up-item b { font-size: 14px; color: #fff; }
#use-panel .up-item small { color: #aab3d8; font-size: 12px; }
#use-panel .up-lab { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; color: #aab3d8; font-size: 12px; }
#use-panel .up-lab input:disabled { opacity: .7; }
#use-panel .up-why { min-height: 1em; margin: 0 0 4px; color: #ff9b9b; font-size: 12px; }
#use-panel .up-rules { margin: 6px 0 0; padding: 0 0 0 16px; color: #aab3d8; font-size: 12px; line-height: 1.6; }
#use-panel .up-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
#use-panel .up-foot button { margin: 0; min-width: 96px; padding: 8px 14px; text-align: center; }
#use-panel .up-cancel { border-radius: 7px; border: 1px solid rgba(160, 180, 255, .3); background: rgba(255, 255, 255, .06); color: #eef1ff; cursor: pointer; font-size: 13px; }
#use-panel .up-cancel:hover { background: rgba(255, 255, 255, .12); }

/* 成長初始化: picker card left, before → after right */
#use-panel.up-wide { width: min(660px, calc(100vw - 24px)); top: 50%; }
#use-panel.up-wide .up-body { max-height: calc(100vh - 90px); }
#use-panel .up-gr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
#use-panel .up-gr-t { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: #ffd84a; letter-spacing: .5px; }
#use-panel .up-gr-pick { padding: 8px 10px 10px; border-radius: 10px; background: #f4f6ff; color: #23283b; }
#use-panel .up-gr-pick .up-gr-t { color: #6b55c9; }
#use-panel .up-gr-pick .st-gg-big { margin: 0 auto 4px; }
#use-panel .up-gr-pick .st-note { display: none; }
#use-panel .up-gr-pick .st-axes { gap: 6px 14px; }
#use-panel .up-gr-pick .st-axes b { font-size: 13px; }
#use-panel .up-gr-pick .st-axes button { width: 28px; height: 28px; }
#use-panel .up-gr-side { display: flex; flex-direction: column; min-width: 0; }
#use-panel .up-cmp { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
#use-panel .up-row { display: grid; grid-template-columns: 10px 1fr 22px 16px 22px 26px; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 7px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; }
#use-panel .up-row i { width: 10px; height: 10px; border-radius: 50%; }
#use-panel .up-row b { text-align: center; font-size: 15px; color: #aab3d8; font-weight: 600; }
#use-panel .up-row b.nw { color: #fff; }
#use-panel .up-row em { font-style: normal; color: #6f7aa8; text-align: center; }
#use-panel .up-row small { font-size: 11px; color: #ffd84a; text-align: right; }
#use-panel .up-row.ch { border-color: rgba(255, 216, 74, .45); background: rgba(255, 216, 74, .08); }
#use-panel .up-row.main span::after { content: '本職'; margin-left: 6px; padding: 0 5px; border-radius: 6px; background: rgba(255, 255, 255, .12); font-size: 10px; color: #cfd6f5; }
#use-panel .up-back { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; padding: 9px 11px; border-radius: 9px; background: rgba(74, 99, 216, .18); border: 1px solid rgba(109, 132, 240, .45); }
#use-panel .up-back span { font-size: 12px; color: #cfd6f5; font-weight: 700; }
#use-panel .up-back b { font-size: 20px; color: #fff; }
#use-panel .up-back small { grid-column: 1 / -1; color: #aab3d8; font-size: 11px; }
/* a phone held sideways (the game's phone layout): smaller gear, the buttons stay in sight */
@media (max-height: 560px) {
  #use-panel.up-wide .up-head { padding: 6px 12px; }
  #use-panel.up-wide .up-body { padding: 8px 12px 0; max-height: calc(100vh - 56px); }
  #use-panel.up-wide .up-item { padding: 5px 8px; margin-bottom: 6px; }
  #use-panel.up-wide .up-item img, #use-panel.up-wide .up-item .ii { width: 26px; height: 26px; }
  #use-panel .up-gr-pick { zoom: .72; }
  #use-panel .up-row { padding: 4px 8px; }
  #use-panel .up-cmp { margin-bottom: 8px; }
  #use-panel.up-wide .up-rules { display: none; }
  #use-panel .up-foot { position: sticky; bottom: 0; margin: 8px -12px 0; padding: 8px 12px; background: rgba(24, 28, 44, .98); border-top: 1px solid rgba(255, 255, 255, .08); }
}
@media (max-height: 420px) { #use-panel.up-wide .up-item { display: none; } }
@media (max-width: 620px) {
  #use-panel .up-gr { grid-template-columns: 1fr; }
  #use-panel .up-gr-pick { justify-self: center; width: 100%; box-sizing: border-box; }
  #use-panel .up-foot button { flex: 1; }
}

/* the card book window */
.cb-head { margin: 0 0 8px; color: #6b5a3a; font-weight: 700; }
.cb-empty { color: #7a6a50; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.cb-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 8px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(120, 100, 60, .25); text-align: center; }
.cb-card b { font-size: 12px; line-height: 1.2; }
.cb-card small { font-size: 11px; color: #7a5a1a; }

/* the chips beside the EXP / TM ones: transformation, seals switched on, timed boosts */
#use-chips { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
#use-chips .buff { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; }
#use-chips .use-tr { cursor: pointer; border: 0; background: #8a5bd8; color: #fff; border-radius: 9px; padding: 1px 7px; font: inherit; font-size: 11px; }
#use-chips img { width: 16px; height: 16px; }

/* css/social.css?v=11 */
/* 公會、組隊、組隊留言板、決鬥、PK、公會對戰（js/social.js） */
#windows .win[id^="win-g"], #win-party, #win-pboard, #win-pvp, #win-duelres { width: min(640px, calc(100vw - 32px)); }
#win-guild, #win-gglobby, #win-ggresult { width: min(720px, calc(100vw - 32px)); }
/* 2026-11-21 (user: 對戰視窗重新設計：改善部分文字不清晰、文字被其他介面覆蓋): the game's windows are LIGHT panels
   (style.css --panel white, --ink dark), but these rules used to colour text for a dark background (pale yellow headings,
   pale grey labels, pale green / red marks on white): now dark, high-contrast colours on the light panel, 13 px and up,
   long tables scroll inside their window instead of running out of it. `.win h4` / `.win .warn` no longer touch other
   modules' windows (they were global). */
.win .so-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.win .so-tabs button { padding: 5px 12px; border-radius: 6px 6px 0 0; background: #eef1fb; border: 1px solid #c3cbea; color: #3b3f63; cursor: pointer; font-weight: 600; }
.win .so-tabs button.on { background: #3d6fd6; border-color: #2f58b5; color: #fff; }
.win .so-tabwrap { overflow-x: auto; margin: 6px 0; }
.win .so-tab { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; color: #23264a; }
.win .so-tabwrap > .so-tab { margin: 0; min-width: 520px; }
.win .so-tab th { text-align: left; font-weight: 700; color: #2f4a9e; background: #e9edfb; border-bottom: 2px solid #b9c3ea; padding: 4px 6px; white-space: nowrap; }
.win .so-tab th a { cursor: pointer; text-decoration: underline dotted; }
.win .so-tab th a.on { color: #c2410c; }
.win .so-tab td { padding: 4px 6px; border-bottom: 1px solid #dde2f3; vertical-align: middle; }
.win .so-tab tr[data-so] { cursor: pointer; }
.win .so-tab tr[data-so]:hover { background: #e3eaff; }
.win .so-tab tr.sel { background: #cfdcff; box-shadow: inset 3px 0 0 #3d6fd6; }
.win .so-tab tr.off td { opacity: .6; }
.win .so-face { width: 18px; height: 18px; vertical-align: middle; margin-right: 4px; border-radius: 3px; object-fit: cover; }
.win .so-on { color: #15803d; font-weight: 700; }
.win .so-kv { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 4px 12px; font-size: 13.5px; margin: 4px 0 8px; }
.win .so-kv span { color: #5d6385; }
.win .so-kv b { font-weight: 700; color: #23264a; word-break: break-all; }
@media (max-width: 560px) { .win .so-kv { grid-template-columns: max-content 1fr; } }
.win .so-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; }
.win .so-form input:not([type="checkbox"]):not([type="radio"]), .win .so-form select, .win .so-row input, .win .so-row select { background: #fff; color: #23264a; border: 1px solid #aab4dc; border-radius: 5px; padding: 3px 6px; min-width: 0; }
.win .so-form input[type="number"] { width: 5.5em; }
.win .so-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.win button.mini { padding: 2px 8px; font-size: 12px; }
/* only the social windows' own buttons: a bare `.win button.alt` turned every window's light 取消 button dark red with dark text */
/* (2026-11-21: these windows now use the shared .pn look of css/panels.css, where .alt is the light secondary button and
   .danger the red one; the old dark-red .alt rule is gone) */
.win .so-list { margin: 4px 0; padding-left: 18px; font-size: 13px; color: #23264a; }
.win .so-list li { margin: 2px 0; }
.win .so-list small { color: #5d6385; font-size: 12px; }
.win .so-notice { background: #fff6dc; border-left: 3px solid #e0a106; padding: 4px 8px; color: #4a3b10; }
.win .so-detail { background: #f1f4fd; border: 1px solid #dde2f3; border-radius: 6px; padding: 6px 10px; margin: 6px 0; font-size: 13px; }
.win [class^="so-"] .warn, .win .so-tab .warn, #win-party .warn, #win-guild .warn, #win-pvp .warn { color: #c62828; }
:is(#win-party, #win-pboard, #win-guild, #win-glist, #win-gboard, #win-grank, #win-gmake, #win-gglobby, #win-ggroom, #win-ggladder, #win-ggresult, #win-duelres, #win-pvp) h4 { margin: 10px 0 4px; color: #2f4a9e; font-size: 14px; }
:is(#win-party, #win-pboard, #win-guild, #win-glist, #win-gboard, #win-grank, #win-gmake, #win-gglobby, #win-ggroom, #win-ggladder, #win-ggresult, #win-duelres, #win-pvp) .sub { color: #5d6385; font-size: 12px; }
:is(#win-gglobby, #win-ggroom, #win-ggladder, #win-ggresult, #win-duelres, #win-pvp) .win-body { color: #23264a; font-size: 13px; }
.win .so-bar { display: inline-block; width: 60px; height: 6px; background: rgba(0,0,0,.5); border-radius: 3px; overflow: hidden; vertical-align: middle; }
.win .so-bar.wide { width: 90px; }
.so-bar i { display: block; height: 100%; }
.so-bar.hp i { background: #ef4646; }
.so-bar.mp i { background: #3bb6f0; }
.win .so-sides { display: flex; gap: 10px; align-items: stretch; }
.win .so-side { flex: 1; background: #f1f4fd; border: 1px solid #d3daf2; border-radius: 8px; padding: 6px 10px; min-width: 0; }
.win .so-side h4 { margin-top: 2px; overflow-wrap: anywhere; }
.win .so-side.won { border: 2px solid #e0a106; background: #fff8e1; }
.win .so-vs { align-self: center; font-weight: 900; font-size: 22px; color: #c62828; }
.win .so-picks { display: flex; flex-wrap: wrap; gap: 4px 12px; max-height: 160px; overflow: auto; font-size: 13px; }
.win .so-big { text-align: center; font-size: 30px; font-weight: 900; margin: 4px 0 8px; letter-spacing: 2px; color: #2f4a9e; }
.win .so-big.won { color: #b26a00; text-shadow: 0 1px 0 #fff3c4; }
.win .so-big.lose { color: #5d6385; }
.win .so-res-foe { text-align: center; font-size: 14px; margin: 0 0 6px; }
.win .so-exit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.win button.so-exit { background: #c62828; color: #fff; border: 1px solid #8f1d1d; border-radius: 6px; padding: 6px 22px; font-size: 15px; font-weight: 700; min-height: 34px; }
@media (max-width: 600px) { .win .so-sides { flex-direction: column; } .win .so-vs { font-size: 16px; } }

/* invitations and confirmations, top centre */
#so-asks { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 9000; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.so-ask { pointer-events: auto; background: linear-gradient(#2b3555, #1c2238); border: 1px solid #6d86c8; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.5); color: #eef2ff; padding: 10px 12px 8px; font-size: 13px; }
.so-ask-t { font-weight: 700; color: #ffe6a8; margin-bottom: 4px; }
.so-ask-b { line-height: 1.5; }
.so-ask-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.so-ask-btns button { padding: 5px 14px; border-radius: 6px; border: 0; background: #3d6fd6; color: #fff; cursor: pointer; font-weight: 600; }
.so-ask-btns button.alt { background: #5a5f74; }
.so-ask-bar { height: 3px; background: rgba(255,255,255,.12); margin-top: 8px; border-radius: 2px; overflow: hidden; }
.so-ask-bar i { display: block; height: 100%; background: #ffd666; animation: so-shrink linear forwards; }
@keyframes so-shrink { from { width: 100%; } to { width: 0; } }

/* the menu of another player */
#so-menu { position: fixed; z-index: 9100; min-width: 150px; background: #1e2540; border: 1px solid #6d86c8; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.5); padding: 4px; color: #eef2ff; }
#so-menu .so-menu-h { padding: 4px 8px 6px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 3px; }
#so-menu .so-menu-h small { font-weight: 400; color: #c7cfe6; }
#so-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 6px 8px; border-radius: 5px; cursor: pointer; font-size: 13px; }
#so-menu button:hover { background: rgba(120,170,255,.2); }

/* the party on the left of the screen */
/* in #game since 2026-11-22: over the HUD (5), under the windows (20) — at 40 in <body> it covered every open window */
#so-party { position: fixed; left: 10px; top: 150px; z-index: 8; width: 170px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #eef2ff; cursor: pointer; }
#so-party .so-pt-h { background: rgba(20,26,48,.75); border-radius: 6px; padding: 2px 6px; font-weight: 700; color: #8dff9a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#so-party .so-pt-h small { color: #c7cfe6; font-weight: 400; }
#so-party .so-pm { display: flex; gap: 5px; align-items: center; background: rgba(20,26,48,.72); border-radius: 6px; padding: 3px 5px; }
#so-party .so-pm.off { opacity: .5; }
#so-party .so-pm img { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; }
#so-party .so-pm > div { flex: 1; min-width: 0; }
#so-party .so-pm b { font-weight: 600; }
/* 治療術 on this member (js/skills.js healOne): a finger-sized button at the end of the row */
#so-party .so-heal { order: 3; flex: none; width: 34px; height: 34px; padding: 2px; border: 1px solid #5fd27a; border-radius: 7px; background: rgba(40,110,60,.55); cursor: pointer; touch-action: manipulation; }
#so-party .so-heal:active { transform: scale(.92); background: rgba(80,190,110,.7); }
#so-party .so-pm .so-heal img { width: 28px; height: 28px; border-radius: 4px; display: block; }
/* phones: the party list's heal buttons go (the left thumb steers there); the 治療術 slot opens #so-healpick instead */
html.phone #so-party .so-heal { display: none; }
/* 治療術's member row on phones (js/social.js healPick): beside the slot, finger-sized faces numbered 1–5 */
#so-healpick { position: fixed; z-index: 30; display: flex; gap: 8px; padding: 8px; border-radius: 14px; background: rgba(16, 22, 44, .88);
  border: 2px solid #5fd27a; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); touch-action: manipulation; }
#so-healpick .hpk { position: relative; width: 66px; padding: 4px 3px 5px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 2px solid #8dff9a; border-radius: 10px; background: rgba(40, 110, 60, .55); color: #eef2ff; font: 600 11px/1.2 system-ui, sans-serif; cursor: pointer; }
#so-healpick.cure { border-color: #9fd6ff; }
#so-healpick.cure .hpk:not(.me) { border-color: #9fd6ff; background: rgba(40, 80, 130, .55); }
#so-healpick .hpk.me { border-color: #ffe27a; background: rgba(120, 100, 30, .5); }
#so-healpick .hpk.no { opacity: .4; }
#so-healpick .hpk:active { transform: scale(.92); }
#so-healpick .hpk > i { position: absolute; left: 3px; top: 1px; font-style: normal; font-size: 12px; color: #ffe27a; text-shadow: 0 1px 2px #000; }
#so-healpick .hpk img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; pointer-events: none; }
#so-healpick .hpk b { max-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
#so-healpick .so-bar { display: block; width: 56px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .5); overflow: hidden; pointer-events: none; }
#so-healpick .so-bar i { display: block; height: 100%; background: #ff5a5a; }
#so-party .so-pm em { display: block; font-style: normal; color: #ffd27a; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 隊伍技能 on a member (js/social.js pstIcons): the skill icons with their seconds under the bars */
#so-party .so-pst { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
#so-party .so-pst .st-ic, #so-party .so-pst .st-ic img { width: 16px; height: 16px; display: block; object-fit: contain; border-radius: 3px; }
#so-party .so-pst .st-ic small { font-size: 7px; line-height: 8px; }
#so-party .so-bar { display: block; width: 100%; height: 4px; background: rgba(0,0,0,.55); border-radius: 2px; overflow: hidden; margin-top: 2px; }

/* PK zones: peace / battle */
#so-pk { position: fixed; right: 12px; top: 210px; z-index: 45; padding: 6px 12px; border-radius: 16px; border: 1px solid #8fb7ff; background: rgba(30,50,90,.85); color: #dfe9ff; font-weight: 700; cursor: pointer; }
#so-pk.pk { background: rgba(140,30,30,.9); border-color: #ff8a8a; color: #fff; box-shadow: 0 0 12px rgba(255,80,80,.6); }

/* the battle bar: guild match / 1V1 / BOSS room (js/social.js drawHud). Redesigned 2026-11-21: a solid dark panel (the map
   behind it no longer shows through the letters), rows of large light text, the score as big digits in team colours, one
   row of real buttons. Its top / left are set by js/ui.js stackTop (under the menu row, clear of the minimap, the target
   window and the notices) — only the fallback place is here; translateX(-50%) is kept, stackTop centres by it. */
#so-hud { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 19; box-sizing: border-box;   /* in #game: over the HUD (5), under the windows (20) */
  min-width: 220px; max-width: min(460px, calc(100vw - 24px)); padding: 6px 14px 7px; border-radius: 12px;
  background: rgba(12, 16, 32, .94); border: 2px solid #e2a83a; box-shadow: 0 4px 16px rgba(0,0,0,.55);
  color: #f4f6ff; font-size: 14px; line-height: 1.35; text-align: center; cursor: default; }
#so-hud.duel { border-color: #e55a5a; }
#so-hud.watch { border-color: #8aa8ff; }
#so-hud.inst { border-color: #c084fc; }
#so-hud .sh-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
#so-hud .sh-row + .sh-row { margin-top: 3px; }
#so-hud .sh-title { font-size: 14px; font-weight: 800; color: #ffd36b; white-space: nowrap; }
#so-hud .sh-time { font-size: 17px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
#so-hud .sh-cd { font-size: 20px; font-weight: 900; color: #ffd36b; font-variant-numeric: tabular-nums; }
#so-hud .sh-sub { font-size: 12.5px; color: #c9d1ee; white-space: nowrap; }
#so-hud .sh-tag { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 9px; background: #3b4a7a; color: #fff; white-space: nowrap; }
#so-hud .sh-tag.won { background: #b8860b; }
#so-hud .sh-tag.lose { background: #5b6178; }
#so-hud .sh-tag.watch { background: #3d6fd6; }
#so-hud .sh-tag.boss { background: #7e22ce; }
#so-hud .sh-warn { font-size: 13px; font-weight: 800; color: #ffb35c; white-space: nowrap; }
#so-hud .sh-score { gap: 6px; }
#so-hud .sh-team { flex: 1 1 0; min-width: 0; max-width: 150px; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#so-hud .sh-team.me { color: #7ee3a0; text-align: right; }
#so-hud .sh-team.foe { color: #ff9a9a; text-align: left; }
#so-hud .sh-n { font-size: 24px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; min-width: 1.2em; }
#so-hud .sh-n.me { color: #7ee3a0; }
#so-hud .sh-n.foe { color: #ff9a9a; }
#so-hud .sh-colon, #so-hud .sh-vs { font-size: 16px; font-weight: 900; color: #ffd36b; }
#so-hud .sh-mine b { font-size: 15px; color: #fff; }
#so-hud .sh-boss { color: #f0d9ff; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#so-hud .sh-btns { margin-top: 5px; }
#so-hud button { padding: 3px 14px; min-height: 28px; border-radius: 7px; border: 1px solid #6b7393; background: #3a4262; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
#so-hud button.sh-exit { background: #c62828; border-color: #ff8a8a; }
#so-hud button:hover { filter: brightness(1.15); }

/* 1V1: the 準備完成 panel (centre of the screen) and the big count-down */
#so-ready { position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 8900; width: min(380px, calc(100vw - 24px));
  background: rgba(12, 16, 32, .95); border: 2px solid #e55a5a; border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.6);
  color: #f4f6ff; padding: 10px 14px 12px; text-align: center; font-size: 14px; }
#so-ready .sr-t { font-size: 16px; font-weight: 900; color: #ffd36b; margin-bottom: 8px; letter-spacing: 1px; }
#so-ready .sr-vs { display: flex; align-items: stretch; gap: 8px; }
#so-ready .sr-p { flex: 1; min-width: 0; background: rgba(255,255,255,.07); border: 1px solid #4a5478; border-radius: 9px; padding: 6px 6px; }
#so-ready .sr-p b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#so-ready .sr-p.me b { color: #7ee3a0; }
#so-ready .sr-p.foe b { color: #ff9a9a; }
#so-ready .sr-p span { font-size: 12.5px; color: #c9d1ee; }
#so-ready .sr-p.ok { border-color: #4ade80; background: rgba(34,197,94,.16); }
#so-ready .sr-p.ok span { color: #86efac; font-weight: 700; }
#so-ready .sr-x { align-self: center; font-size: 18px; font-weight: 900; color: #ffd36b; }
#so-ready .sr-btns { display: flex; gap: 10px; justify-content: center; margin: 10px 0 6px; }
#so-ready button { min-height: 34px; padding: 4px 18px; border-radius: 8px; border: 1px solid #6b7393; background: #3a4262; color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; }
#so-ready button.go { background: #16a34a; border-color: #4ade80; min-width: 130px; }
#so-ready button.go:disabled { background: #2f5a40; border-color: #3f7a55; color: #cde9d6; cursor: default; }
#so-ready .sr-sub { font-size: 12.5px; color: #c9d1ee; }
#so-ready .sr-sub b { color: #ffd36b; }
#so-count { position: fixed; left: 50%; top: 47%; transform: translate(-50%, -50%); z-index: 9200; pointer-events: none;
  font: 900 96px/1 "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif; color: #ffd36b;
  -webkit-text-stroke: 3px #3a1d00; text-shadow: 0 4px 0 #7a3e00, 0 0 24px rgba(255, 190, 60, .7); }
#so-count.go { color: #ff6b6b; -webkit-text-stroke-color: #3d0000; text-shadow: 0 4px 0 #7a0000, 0 0 24px rgba(255, 80, 80, .7); }
#so-count.pop { animation: so-pop .9s ease-out; }
@keyframes so-pop { 0% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(.92); opacity: .2; } }

@media (max-height: 540px) and (orientation: landscape) {
  #so-party { top: 110px; width: 140px; }
  #so-party .so-pm > img { display: none; }
  #so-pk { top: 160px; }
  #so-hud { top: 40px; font-size: 12.5px; padding: 4px 10px 5px; min-width: 200px; max-width: min(400px, calc(100vw - 16px)); }
  #so-hud .sh-n { font-size: 20px; }
  #so-hud .sh-time { font-size: 15px; }
  #so-hud .sh-team { font-size: 12.5px; max-width: 120px; }
  #so-hud .sh-sub { font-size: 12px; }
  #so-hud .sh-row + .sh-row { margin-top: 1px; }
  #so-hud .sh-btns { margin-top: 3px; }
  #so-hud button { min-height: 30px; padding: 2px 12px; }
  #so-ready { top: 50%; padding: 8px 12px 10px; }
  #so-ready .sr-t { margin-bottom: 5px; }
  #so-count { font-size: 76px; top: 54%; }
}

/* ---------- 公會對戰結果 (js/social.js resultBody, redesigned 2026-11-25) ----------
   never the class "win" inside a window: it is every game window's own class (style.css .win = position absolute) */
.ggr { display: flex; flex-direction: column; gap: 10px; }
.ggr-banner { border-radius: 12px; padding: 14px 12px 12px; text-align: center; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f6b73c, #e07b12); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.ggr-banner.lost { background: linear-gradient(135deg, #6f7a9a, #444c66); }
.ggr-banner.draw { background: linear-gradient(135deg, #6aa5e8, #3d6fd6); }
.ggr-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% -20%, rgba(255, 255, 255, .45), transparent 60%); pointer-events: none; }
.ggr-big { position: relative; font-size: 34px; font-weight: 900; letter-spacing: 4px; line-height: 1.1; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.ggr-sub { position: relative; margin-top: 4px; font-size: 14px; font-weight: 700; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ggr-sub span { background: rgba(0, 0, 0, .18); border-radius: 10px; padding: 0 10px; font-weight: 600; }
.ggr-meta { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.ggr-board { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 10px; background: #1f2747; color: #fff; border-radius: 10px; padding: 8px 14px; }
.ggr-board span { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ggr-board span.h { text-align: right; color: #9cc0ff; } .ggr-board span.g { color: #ffaaa0; }
.ggr-board b { font-size: 30px; font-weight: 900; min-width: 40px; text-align: center; }
.ggr-board b.h { color: #9cc0ff; } .ggr-board b.g { color: #ffaaa0; }
.ggr-board i { font-style: normal; font-size: 24px; opacity: .7; }
.ggr-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ggr-team { background: #fff; border: 1px solid #d3daf2; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.ggr-team > header { display: flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 14px; color: #fff; background: #3d6fd6; }
.ggr-team.guest > header { background: #c0392b; }
.ggr-team > header b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ggr-team.won { border: 2px solid #e0a106; box-shadow: 0 0 0 3px rgba(224, 161, 6, .18); }
.ggr-crown { background: #ffd24a; color: #6b4200; font-weight: 900; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; flex: none; }
.ggr-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #e6eaf6; border-bottom: 1px solid #e6eaf6; }
.ggr-nums > div { background: #f7f9ff; padding: 5px 4px; text-align: center; min-width: 0; }
.ggr-nums small { display: block; font-size: 10.5px; color: #6a7194; white-space: nowrap; }
.ggr-nums b { font-size: 16px; color: #23264a; }
.ggr-nums b.rec { font-size: 11.5px; white-space: nowrap; }
.ggr-nums em { font-style: normal; font-size: 11px; margin-left: 2px; font-weight: 700; }
.ggr-nums em.up { color: #1f9d55; } .ggr-nums em.down { color: #c62828; }
.ggr-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.ggr-tab th { font-size: 11px; color: #6a7194; font-weight: 600; padding: 4px 8px; text-align: center; background: #fafbff; border-bottom: 1px solid #e6eaf6; }
.ggr-tab th:first-child, .ggr-tab td.nm { text-align: left; }
.ggr-tab td { padding: 5px 8px; text-align: center; border-bottom: 1px solid #f0f2fa; white-space: nowrap; }
.ggr-tab td.nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.ggr-tab td.k { color: #1f6fd0; font-weight: 700; } .ggr-tab td.d { color: #8a5a5a; }
.ggr-tab tr.me td { background: #fff7dd; }
.ggr-mvp { font-style: normal; font-size: 9.5px; font-weight: 900; color: #6b4200; background: linear-gradient(#ffe27a, #f5b300); border-radius: 4px; padding: 0 4px; margin-right: 4px; vertical-align: 1px; }
.ggr-reward { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff8e1; border: 1px solid #f0d58a; border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.ggr-reward > b { color: #8a5a00; } .ggr-reward span { display: inline-flex; align-items: center; gap: 3px; } .ggr-reward small { color: #8a7a55; margin-left: auto; }
.ggr-exit { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.win .ggr-exit button.so-exit { background: #c62828; color: #fff; border: 1px solid #8f1d1d; border-radius: 6px; padding: 6px 26px; font-size: 15px; font-weight: 700; min-height: 34px; }
@media (max-width: 600px) { .ggr-teams { grid-template-columns: 1fr; } .ggr-big { font-size: 26px; } .ggr-board b { font-size: 24px; } .ggr-nums b { font-size: 14px; } }

/* css/friends.css?v=9 */
/* 聊天頻道（js/chat.js）、好友 / 玩家資訊 / 檢舉（js/friends.js）、玩家選單與組隊經驗的補充（js/social.js）。2026-11-20 */

/* ---------- chat channels: the pill inside the chat box, the picker above it, line colours, the 廣播 banner ---------- */
#ch-pill { position: fixed; z-index: 30; height: 22px; padding: 0 8px; border-radius: 11px; border: 1px solid rgba(255,255,255,.55);
  background: rgba(30,36,60,.92); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
#ch-pill.ch-p { background: #1f5a2c; border-color: #8dff9a; }
#ch-pill.ch-g { background: #5a4214; border-color: #ffd27a; }
#ch-pill.ch-all { background: #134a63; border-color: #7fd3ff; }
#ch-pill.ch-bc { background: #6a2f14; border-color: #ff9b6b; }
#ch-pill.ch-w { background: #5a1f58; border-color: #ff9bf5; }
/* 聊天視窗透明度 (js/chat.js ◐): --chat-bg = panel darkness, --chat-fg = line opacity */
#chatlog .msg { opacity: var(--chat-fg, 1); }
#chatlog.chat-panel { background: rgba(10, 14, 28, var(--chat-bg, 0)); border-radius: 8px; padding: 4px 6px; box-sizing: border-box; }
#chatlog.chat-panel:empty { background: none; padding: 0; }
#ch-alpha-btn { position: fixed; z-index: 30; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
  background: rgba(30,36,60,.92); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer; }
/* 2026-11-25 (清單 二-4): 200 lines kept; shut = the newest lines that fit; open (chat box shown) = all of them, scrollable.
   2026-11-26: how many lines show when shut, the open log's height and the lines' look are in css/chat.css */
#chatlog.scroll { display: block; overflow-y: auto; pointer-events: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: rgba(10, 14, 28, max(.45, var(--chat-bg, 0))); border-radius: 8px; padding: 4px 6px; box-sizing: border-box;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.4) transparent; }
/* 2026-11-25 (清單 二-2): an NPC dialog comes first — the chat cannot be touched; phones hide it (and its ◐ / pill) */
body.npc-talk #chatlog, body.npc-talk #chat-btn, body.npc-talk #chat-input, body.npc-talk #ch-pill, body.npc-talk #ch-alpha-btn, body.npc-talk #ch-alpha { pointer-events: none !important; }
body.npc-talk #ch-alpha-btn, body.npc-talk #ch-alpha, body.npc-talk #ch-pill { display: none !important; }
html.phone body.npc-talk #chatlog, html.phone body.npc-talk #chat-btn, html.phone body.npc-talk #chat-input { visibility: hidden !important; }
html.phone body.npc-talk #dialog { z-index: 9000; }
#ch-alpha { position: fixed; z-index: 9050; width: 220px; background: #1e2540; border: 1px solid #6d86c8; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5); padding: 8px 10px; color: #eef2ff; font-size: 13px; }
#ch-alpha .ca-h { font-weight: 700; margin-bottom: 6px; }
#ch-alpha label { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
#ch-alpha label span { flex: none; width: 2.5em; }
#ch-alpha input[type=range] { flex: 1; min-width: 0; height: 24px; accent-color: #8fb4ff; }
#ch-alpha label b { flex: none; width: 3em; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
#ch-alpha .ca-f { text-align: right; }
#ch-alpha .ca-f button { padding: 3px 10px; border-radius: 5px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; cursor: pointer; }
#ch-pop { position: fixed; z-index: 9050; width: min(300px, calc(100vw - 16px)); background: #1e2540; border: 1px solid #6d86c8; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5); padding: 6px; color: #eef2ff; font-size: 13px; }
#ch-pop .ch-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
#ch-pop .ch-btns button { padding: 6px 4px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: inherit;
  cursor: pointer; font-weight: 700; line-height: 1.15; }
#ch-pop .ch-btns button small { display: block; font-weight: 400; font-size: 10.5px; opacity: .8; }
#ch-pop .ch-btns button.on { outline: 2px solid #ffd666; }
#ch-pop .ch-btns button.dim { opacity: .45; }
#ch-pop .ch-btns .ch-p { color: #8dff9a; } #ch-pop .ch-btns .ch-g { color: #ffd27a; } #ch-pop .ch-btns .ch-all { color: #7fd3ff; }
#ch-pop .ch-btns .ch-bc { color: #ff9b6b; } #ch-pop .ch-btns .ch-w { color: #ff9bf5; }
#ch-pop .ch-w { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
#ch-pop .ch-w input { width: 9em; background: rgba(0,0,0,.35); color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 3px 6px; }
#ch-pop .ch-mini { padding: 2px 6px; font-size: 12px; border-radius: 5px; border: 0; background: rgba(255,155,245,.18); color: #ffd6fb; cursor: pointer; }
/* the chat log: one colour per channel (the name and the text) — css/chat.css since 2026-11-26 */
#chatlog .tag[data-name] { pointer-events: auto; cursor: pointer; }
#chatlog .tag[data-name]:hover { text-decoration: underline; }
#ch-banner { position: fixed; z-index: 40; top: 92px; left: 50%; transform: translate(-50%, -10px); max-width: min(620px, calc(100vw - 32px));
  background: linear-gradient(90deg, rgba(120,44,10,.92), rgba(160,70,20,.92)); border: 1px solid #ffb07f; border-radius: 18px; padding: 6px 16px;
  color: #fff4e8; font-size: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
  display: flex; gap: 8px; align-items: baseline; }
#ch-banner.on { opacity: 1; transform: translate(-50%, 0); }
#ch-banner b { color: #ffd27a; white-space: nowrap; }
#ch-banner b i { font-style: normal; font-size: 11px; background: #ffd27a; color: #5a2a00; border-radius: 4px; padding: 0 4px; margin-left: 2px; }
#ch-banner span { overflow-wrap: anywhere; }

/* ---------- the player menu (js/social.js playerMenu) ---------- */
#so-menu .so-fr { color: #ff9bf5; font-weight: 600; }
#so-menu button.so-rep { color: #ffb3b3; }
@media (max-height: 540px) {
  #so-menu { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2px; min-width: 240px; }
  #so-menu .so-menu-h { grid-column: 1 / -1; }
  #so-menu button { padding: 7px 8px; }
}

/* ---------- the friends window, 玩家資訊, 檢舉 (the game's light windows: style.css --panel / --ink / --sub) ---------- */
#win-friends { width: min(560px, calc(100vw - 24px)); }
#win-pinfo { width: min(400px, calc(100vw - 24px)); }
#win-report { width: min(420px, calc(100vw - 24px)); }
#win-friends h4, #win-pinfo h4, #win-report h4 { margin: 10px 0 4px; color: #9a5a08; font-size: 13px; }
#win-friends .warn, #win-pinfo .warn, #win-report .warn { color: #c0392b; }
.win .fr-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.win .fr-tabs button { padding: 4px 10px; border-radius: 6px 6px 0 0; background: #eef1ff; border: 1px solid #c9d0ec; color: var(--ink); cursor: pointer; }
.win .fr-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.win .fr-add { display: flex; gap: 6px; margin: 0 0 8px; }
.win .fr-add input, .win .fr-form select, .win .fr-form textarea, .win #rp-detail { background: #fff; color: var(--ink); border: 1px solid #c9d0ec;
  border-radius: 5px; padding: 4px 6px; min-width: 0; font: inherit; }
.win .fr-add input { flex: 1; }
.win .fr-list { display: flex; flex-direction: column; gap: 4px; max-height: min(52vh, 420px); overflow: auto; }
.win .fr-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; background: #f3f5ff; border: 1px solid #e0e5f8; }
.win .fr-row.off { opacity: .6; }
.win .fr-face { width: 30px; height: 30px; flex: none; border-radius: 6px; background: #dfe5fb; overflow: hidden; display: inline-block; }
.win .fr-face img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.win .fr-face.big { width: 54px; height: 54px; }
.win .fr-main { flex: 1; min-width: 0; font-size: 13px; }
.win .fr-main b { white-space: nowrap; }
.win .fr-main small { color: var(--sub); }
.win .fr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #a8adc4; margin-right: 5px; vertical-align: 1px; }
.win .fr-row.on .fr-dot { background: #2ecc55; box-shadow: 0 0 4px #2ecc55; }
.win .fr-where { font-size: 12px; color: #5d6488; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win .fr-acts { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; max-width: 52%; }
.win .fr-acts button.hl { outline: 2px solid #f2b21b; }
/* (2026-11-21: 好友 / 檢舉 use the shared .pn look of css/panels.css: .alt light, .danger red) */
.win .fr-hint { background: #fff4e3; border-left: 3px solid #f2b21b; padding: 4px 8px; margin: 0 0 6px; font-size: 13px; }
.win .fr-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.win .fr-form textarea { flex: 1 1 100%; resize: vertical; }
.win .fr-check { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }
.win .fr-note { background: #f3f5ff; border: 1px solid #e0e5f8; border-radius: 6px; padding: 5px 8px; margin: 4px 0; font-size: 13px; }
.win .fr-note.new { border-left: 3px solid #d64fc8; }
.win .fr-note.sent { opacity: .75; }
.win .fr-nh { display: flex; gap: 6px; align-items: center; }
.win .fr-nh b { flex: 1; }
.win .fr-nh small { color: var(--sub); }
.win .fr-nt { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.win small.fr-on { color: #1f9e43; font-weight: 600; }
/* 查看玩家資訊 */
.win .pi-head { display: flex; gap: 10px; align-items: center; }
.win .pi-name { font-size: 16px; }
.win .pi-kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; font-size: 13px; margin-top: 4px; }
.win .pi-kv span { color: var(--sub); }
.win .pi-eqs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; max-height: min(44vh, 320px); overflow: auto; }
.win .pi-eq { display: flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 2px 4px; border-radius: 4px; cursor: pointer; min-width: 0; }
.win .pi-eq:hover { background: #eef1ff; }
.win .pi-eq b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win .pi-slot { color: #9a5a08; font-size: 11.5px; min-width: 2.6em; }
.win .pi-btns { display: flex; gap: 6px; flex-wrap: wrap; }
/* 檢舉玩家 */
.win .rp-reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; margin: 6px 0; font-size: 13px; }
.win #rp-detail { width: 100%; box-sizing: border-box; resize: vertical; }
.win .rp-count { text-align: right; }

/* ---------- the party window: 組隊經驗 ---------- */
.win .so-ratio { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; background: rgba(90,123,240,.08); border-radius: 6px; padding: 5px 8px; }
.win .so-ratio[hidden] { display: none; }
.win .so-ratio b { flex: 1 1 100%; font-size: 12.5px; }
.win .so-ratio input[type="number"] { width: 4.2em; }
.win .so-good { color: #1f9e43; }

/* ---------- short screens (phones in landscape) ---------- */
@media (max-height: 540px) {
  .win .fr-row { flex-wrap: wrap; }
  .win .fr-acts { max-width: none; flex: 1 1 100%; justify-content: flex-start; }
  .win .fr-acts button { padding: 4px 9px; }
  .win .fr-list { max-height: calc(100vh - 170px); }
  .win .rp-reasons { grid-template-columns: repeat(2, 1fr); }
  #ch-banner { top: 64px; font-size: 13px; }
}
/* 2026-11-25: the chat box held in place / dragged (js/chat.js setupMove): --chat-x / --chat-y = the input's left and its
   distance from the bottom; the log sits right above the input */
body.chat-moved #chat-input { left: var(--chat-x) !important; bottom: var(--chat-y) !important; top: auto !important; }
body.chat-moved #chatlog { left: var(--chat-x) !important; bottom: calc(var(--chat-y) + 34px) !important; top: auto !important; }
#ch-grip { position: fixed; z-index: 31; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
  background: rgba(30,36,60,.92); color: #fff; font-size: 13px; line-height: 20px; cursor: move; touch-action: none; }
/* 最上方的經驗／TM 倍率 (#rate-sum; user 2026-11-25: 「改成不是在最上方 其他視窗可以蓋掉她」): under the windows (they start at z 21) */
#rate-sum { z-index: 10 !important; }

/* css/target.css?v=4 */
/* 鎖定目標視窗（js/target.js）與右側快捷欄上方的「更換目標」按鈕 */
#target-frame { left: 50%; top: 66px; transform: translateX(-50%); z-index: 4; min-width: 240px; max-width: min(360px, 70vw);
  display: flex; flex-direction: column; gap: 4px; padding: 6px 10px 7px; border-radius: 10px; pointer-events: auto;
  background: linear-gradient(180deg, rgba(22, 28, 52, .88), rgba(14, 18, 36, .88)); border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45); color: #fff; font: 12px/1.3 "Microsoft JhengHei", system-ui, sans-serif; }
#target-frame.hidden, #target-frame .hidden { display: none !important; }
#target-frame.no-target { min-width: 0; padding: 4px 8px; }
#target-frame.no-target .tf-main { display: none; }
#target-frame .tf-head { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; }
#target-frame .tf-lv { color: #9fd6ff; font-weight: bold; }
#target-frame .tf-name { font-size: 14px; color: #ffe9a8; overflow: hidden; text-overflow: ellipsis; }
#target-frame .tf-hp { position: relative; height: 14px; border-radius: 7px; background: #2a1c22; border: 1px solid #000; overflow: hidden; }
#target-frame .tf-hp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #ff7a7a, #d62f2f); transition: width .15s; }
#target-frame .tf-hp span { position: relative; display: block; text-align: center; font: bold 10px/14px system-ui, sans-serif; text-shadow: 0 0 2px #000, 0 0 2px #000; }
/* 王血條 (2026-11-26): the bar being hit in its colour (--cur) over the next bar's colour (--nxt), ×N on the right, one pip
   per bar under it (broken ones dark), 無敵格檔 = pale-blue pulsing frame + seconds (js/target.js, js/monsters.js bars) */
#target-frame .tf-hp.boss { height: 16px; background: var(--nxt, #2a1c22); }
#target-frame .tf-hp.boss i { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .18)), var(--cur); }
#target-frame .tf-hp.boss span { line-height: 16px; }
#target-frame .tf-hp.boss.inv { box-shadow: 0 0 0 2px #aee1ff, 0 0 8px #6fc6ff; animation: tf-inv .45s ease-in-out infinite alternate; }
@keyframes tf-inv { from { box-shadow: 0 0 0 2px rgba(174, 225, 255, .45), 0 0 4px rgba(111, 198, 255, .4); } to { box-shadow: 0 0 0 2px #d8f1ff, 0 0 10px #6fc6ff; } }
#target-frame .tf-bars { display: flex; align-items: center; gap: 6px; font-size: 11px; white-space: nowrap; }
#target-frame .tf-pips { display: flex; gap: 3px; flex: 1; }
#target-frame .tf-pips b { flex: 1; max-width: 34px; height: 5px; border-radius: 2px; border: 1px solid #000; background: var(--c); }
#target-frame .tf-pips b.off { background: #3a3a46; }
#target-frame .tf-cnt { font-weight: bold; color: var(--cur); text-shadow: 0 0 2px #000, 0 0 2px #000; }
#target-frame .tf-blk { color: #bfe6ff; font-weight: bold; }
#target-frame .tf-blk:empty { display: none; }
#target-frame .tf-st:empty { display: none; }
#target-frame .tf-st, #target-frame .tf-list { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
#target-frame .tf-bad { display: flex; align-items: center; gap: 6px; padding-top: 3px; border-top: 1px solid rgba(255, 255, 255, .15); }
#target-frame.no-target .tf-bad { border-top: 0; padding-top: 0; }
#target-frame .tf-lbl { color: #ff9b9b; font-size: 11px; white-space: nowrap; }
.tf-ic { position: relative; display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 4px; flex: none;
  background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 1px rgba(255, 255, 255, .8), 0 1px 3px rgba(0, 0, 0, .5); }
.tf-ic img { width: 22px; height: 22px; display: block; border-radius: 4px; }
.tf-ic.txt { padding: 0 3px; }
.tf-ic.txt b { font-size: 10px; color: #ffd84a; white-space: nowrap; }
.tf-ic small { position: absolute; right: -3px; bottom: -4px; font: bold 8px/9px system-ui, sans-serif; padding: 0 1px; border-radius: 3px; background: rgba(0, 0, 0, .75); color: #fff; }
.tf-ic small:empty { display: none; }
.tf-ic.bad { box-shadow: 0 0 0 1px #ff6b6b, 0 0 4px rgba(255, 80, 80, .7); }
.tf-ic.bad.txt b { color: #ff9bf5; }
/* where it starts: js/ui.js stackTop() places it (2026-11-21) — below the menu, under the duel / guild-match bar
   (#so-hud) when there is one (they used to cover each other), on phones in the row beside the status block when it
   fits there */
@media (max-width: 1180px) { #target-frame { top: 112px; } }

/* 更換目標: above the page pill of the action pad (#quick); since 2026-11-21 its picture only (user: 移除文字，僅保留功能
   圖示; assets/ui/ic_target.png from tools/uiicons.py), a small round button like the attack button, the name in its
   title / aria-label. Its place: css/ui.css (desktop), css/mobile.css (phones) */
#quick .tgt-next { position: absolute; right: 6px; bottom: 232px; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: 3px solid #fff; background: radial-gradient(circle at 40% 30%, #ffffff, #e9c9c9 55%, #b98a8e); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); cursor: pointer; }
#quick .tgt-next img { width: 30px; height: 30px; image-rendering: pixelated; pointer-events: none; }
#quick .tgt-next:hover { filter: brightness(1.08); }
#quick .tgt-next:active { transform: scale(.94); }
#quick .tgt-next kbd { position: absolute; top: -9px; right: -6px; left: auto; bottom: auto; transform: none; }
.has-bar #quick .tgt-next { bottom: 254px; }

/* phones (landscape): the notice is hidden there, so the frame goes to the top edge (js/ui.js: when it fits beside
   the menu, else under it) */
@media (max-height: 540px) and (orientation: landscape) {
  #target-frame { top: 6px; transform: translateX(-50%) scale(.85); transform-origin: top center; }
}

/* css/exchange.css?v=3 */
/* 道具兌換 window (js/exchange.js) */
#win-swap { width: min(560px, 96vw); }
#win-swap .xc-list { display: flex; flex-direction: column; gap: 8px; max-height: min(62vh, 560px); overflow-y: auto; padding-right: 2px; }
#win-swap .xc-group { font-size: 12px; color: #ffe08a; margin: 2px 0 -2px; letter-spacing: 1px; }
#win-swap .xc-card { border: 1px solid #ffffff2a; border-radius: 8px; padding: 8px 10px; background: #ffffff0d; }
#win-swap .xc-card.off { opacity: .62; }
#win-swap .xc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#win-swap .xc-head b { font-size: 14px; color: #fff; }
#win-swap .xc-tag { font-size: 11px; padding: 0 7px; border-radius: 8px; background: #4a6cd655; color: #cfe0ff; }
#win-swap .xc-note { font-size: 12px; color: #c9cfe8; margin: 2px 0; }
#win-swap .xc-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; margin: 6px 0; }
#win-swap .xc-side { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#win-swap .xc-it { display: flex; align-items: center; gap: 3px; font-size: 12px; min-width: 0; }
#win-swap .xc-it b { font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#win-swap .xc-it em { font-style: normal; color: #9fd6a0; font-size: 11px; white-space: nowrap; }
#win-swap .xc-it.short em, #win-swap .xc-it.short b { color: #ff9b8a; }
#win-swap .xc-it .it-ic { width: 24px; height: 24px; flex: none; }
#win-swap .xc-arrow { font-size: 18px; color: #ffe08a; }
#win-swap .xc-foot { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: 12px; }
#win-swap .xc-foot input { width: 58px; }
#win-swap .xc-why { color: #ffb4a6; margin-right: auto; }
#win-swap .xc-go { min-width: 72px; }
#win-swap .xc-tip { margin: 8px 0 0; }
@media (max-height: 540px) and (orientation: landscape) {
  #win-swap .xc-list { max-height: 64vh; }
  #win-swap .xc-row { margin: 3px 0; }
}

/* VIP SHOP window (js/game.js WIN.vip): weekday + tab buttons, one line per item (the window is light: dark text) */
#win-vip { width: min(560px, 96vw); }
#win-vip .win-body { max-height: min(70vh, 640px); overflow-y: auto; }
#win-vip .vip-days, #win-vip .vip-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
#win-vip .vip-days button, #win-vip .vip-tabs button { padding: 3px 9px; border-radius: 6px; border: 1px solid #b9c0dc; background: #fff; color: #33395a; font-size: 12px; cursor: pointer; }
#win-vip .vip-tabs button { font-size: 13px; padding: 4px 12px; }
#win-vip .vip-tabs button .sub { color: #7a809c; }
#win-vip .vip-days button:hover, #win-vip .vip-tabs button:hover { background: #eef1ff; }
#win-vip .vip-days button.on, #win-vip .vip-tabs button.on { background: #e8b34a; border-color: #b9821c; color: #2a1a00; font-weight: bold; }
#win-vip .vip-days button.on .sub, #win-vip .vip-tabs button.on .sub { color: #5a3a00; }
#win-vip .vip-n { color: #2f7a35; font-weight: bold; }
#win-vip .vip-cost { margin-left: auto; white-space: nowrap; font-size: 12px; color: #8a5a00; }
#win-vip .qrow .st { margin-left: 8px; }

/* css/signin.css?v=4 */
/* 每日簽到／角色等級鎖定 (js/signin.js) — prefix sg-, on the shared light .pn panel */
#win-signin { width: min(420px, 94vw); }
.sg .pn-tabs { margin: 6px 0 8px; }
.sg-card { border: 1px solid #c9d5f0; border-radius: 10px; padding: 8px 12px; background: #f5f8ff; color: #2a3560; }
.sg-card.done { border-color: #6fc79a; background: #f0fbf4; }
.sg-big { font-size: 17px; font-weight: 700; text-align: center; margin: 2px 0 8px; color: #2a3560; }
.sg-card.done .sg-big { color: #23935a; }
.sg-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; border-bottom: 1px dashed #d6def2; }
.sg-row:last-child { border-bottom: 0; }
.sg-row span { color: #6a7aa8; } .sg-row b { color: #2a3560; text-align: right; }
.sg-row b.sg-on { color: #c47a00; }
.sg-cost { margin: 8px 0; padding: 6px 10px; border-radius: 8px; background: #fff7e6; border: 1px solid #f1d39a; font-size: 12.5px; line-height: 1.6; color: #5a4520; }
.sg-cost b { color: #b0620a; }
.sg-in { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; color: #2a3560; }
.sg-in input { width: 110px; padding: 5px 8px; border-radius: 6px; border: 1px solid #9fb2e0; background: #fff; color: #1d2550; font: inherit; }
.sg-btns { display: flex; gap: 8px; }
.sg-btn { display: block; width: 100%; margin: 8px 0 4px; padding: 10px; border-radius: 10px; border: 2px solid #fff; font: inherit; font-size: 15px; font-weight: 700;
  color: #fff; background: linear-gradient(#ffb4dc, #ff5fae 50%, #d8338f); cursor: pointer; touch-action: manipulation; box-shadow: 0 2px 0 rgba(120, 40, 90, .35); }
.sg-btn.danger { background: linear-gradient(#ff9a9a, #d84b5c); }
.sg-btn:disabled { filter: grayscale(.8) brightness(.95); cursor: default; }

/* 月卡簽到 (2026-12-04, js/signin.js monthBody): 30 cells, a tick on the days claimed */
.mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 4px 2px 6px; color: #2a3560; }
.mc-head b { font-size: 15px; }
.mc-head span { font-size: 12px; color: #6a73a0; }
.mc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.mc-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 46px;
  border: 1px solid #c9d5f0; border-radius: 8px; background: #f5f8ff; color: #2a3560; }
.mc-cell b { font-size: 14px; line-height: 1.1; }
.mc-cell span { font-size: 10px; color: #8a92b8; }
.mc-cell.mc-bonus {   /* (not "coin": a global class, the Gold icon) */ background: #fff8e6; border-color: #f0d080; }
.mc-cell .mc-coin { position: absolute; right: 1px; top: 1px; font-style: normal; }
.mc-cell .mc-coin .ii { width: 14px; height: 14px; margin: 0; }
.mc-cell.today { border: 2px solid #f08a24; background: #fff3e0; box-shadow: 0 0 0 2px rgba(240, 138, 36, .2); }
.mc-cell.ok { background: #eafaf0; border-color: #6fc79a; }
.mc-cell.miss { background: #eceef3; border-color: #d4d8e2; color: #a0a6b8; }
.mc-cell.miss b { color: #a0a6b8; }
.mc-cell.later { opacity: .85; }
/* the tick / the cross drawn with borders (no emoji) */
.mc-tick { position: absolute; left: 50%; top: 50%; width: 18px; height: 9px; margin: -8px 0 0 -9px; border-left: 4px solid #23935a;
  border-bottom: 4px solid #23935a; transform: rotate(-45deg); opacity: .85; pointer-events: none; }
.mc-x { position: absolute; inset: 0; pointer-events: none; }
.mc-x::before, .mc-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; margin: -1px 0 0 -11px; background: #b8bdcc; }
.mc-x::before { transform: rotate(45deg); }
.mc-x::after { transform: rotate(-45deg); }
.mc-off .sg-row b .ii { margin-right: 2px; }

/* css/feedback.css?v=1 */
/* BUG與建議 (js/feedback.js, 2026-11-26): one window, both kinds — the shared .pn look (css/panels.css) plus these parts */
#windows .win#win-feedback { width: min(560px, calc(100vw - 16px)); }
#win-feedback .win-body { max-height: min(78vh, 720px); }
.pn.fb { --fb-bug: #d8414e; --fb-bug-bg: #fff4f4; --fb-idea: #d99a0b; --fb-idea-bg: #fffaea; }
.pn-hero.fb-hero { --hacc: #5b74e6; --hbg: linear-gradient(90deg, #f1f4ff, #fff7ec); border-color: #dfe3f6; }
.pn-hero.fb-hero .pn-emb img { width: 30px; height: 30px; max-width: none; max-height: none; image-rendering: pixelated; }
.pn .pn-tabs button i.hot { background: var(--pn-bad); color: #fff; }
.fb-tabs .fb-ti { margin-right: 4px; }

/* the two kind cards */
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pn button.fb-kc { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; white-space: normal; padding: 9px 12px; min-height: 64px;
  border-radius: 12px; background: #fff; color: var(--pn-ink); border: 2px solid var(--pn-line); font-weight: 400; transition: border-color .15s, background .15s, transform .1s, box-shadow .15s; }
.pn button.fb-kc:hover { filter: none; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(40, 50, 110, .1); }
.fb-kc-ic { flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; }
.fb-kc-ic img { width: 36px; height: 36px; image-rendering: pixelated; }
.fb-kc.bug .fb-kc-ic { background: radial-gradient(circle at 35% 30%, #fff, #ffe1e3); border: 1px solid #f6c8cc; }
.fb-kc.idea .fb-kc-ic { background: radial-gradient(circle at 35% 30%, #fff, #fff0c4); border: 1px solid #f2dc9c; }
.fb-kc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fb-kc-t b { font-size: 15px; }
.fb-kc-t small { font-size: 11.5px; color: var(--pn-sub); line-height: 1.35; }
.fb-kc-ck { position: absolute; top: 6px; right: 8px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900;
  color: #fff; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.pn button.fb-kc.bug.on { border-color: var(--fb-bug); background: var(--fb-bug-bg); }
.pn button.fb-kc.idea.on { border-color: var(--fb-idea); background: var(--fb-idea-bg); }
.fb-kc.on .fb-kc-ck { opacity: 1; transform: none; }
.fb-kc.bug .fb-kc-ck { background: var(--fb-bug); }
.fb-kc.idea .fb-kc-ck { background: var(--fb-idea); }

/* the form */
.fb-form textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.fb-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.pn button.fb-cat { background: #fff; color: #3d4472; border: 1px solid #d3d9f1; border-radius: 999px; padding: 3px 11px 3px 7px; min-height: 28px; font-weight: 600; font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 4px; }
.pn button.fb-cat:hover { filter: none; background: #f3f6ff; }
.pn button.fb-cat.on { background: var(--pn-acc); color: #fff; border-color: var(--pn-acc-d); }
.fb-cat span { font-size: 14px; }
.fb-auto { display: flex; gap: 8px; align-items: flex-start; background: var(--pn-soft); border: 1px dashed #cdd5f2; border-radius: 9px; padding: 6px 9px; }
.fb-auto-ic { font-size: 16px; line-height: 1.2; }
.fb-auto b { display: block; font-size: 12.5px; }
.fb-auto small { display: block; color: var(--pn-sub); font-size: 11.5px; line-height: 1.45; }
.fb-shot-ck { display: flex; align-items: center; gap: 4px; font-weight: 600; cursor: pointer; flex-wrap: wrap; }
.fb-shot { position: relative; border-radius: 9px; overflow: hidden; border: 1px solid var(--pn-line); background: #000; }
.fb-shot img { display: block; width: 100%; max-height: 180px; object-fit: contain; }
.fb-shot button { position: absolute; right: 6px; bottom: 6px; }
.fb-send { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.pn button.fb-go { min-height: 42px; font-size: 15px; border-radius: 10px; letter-spacing: 1px; }
.pn button.fb-go.bug { background: linear-gradient(180deg, #ec5a66, #c8323f); border-color: #a92633; }
.pn button.fb-go.idea { background: linear-gradient(180deg, #f5bb35, #d9930a); border-color: #b47a06; color: #3a2600; }
.fb-ok { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-left-color: #3cb371; background: #effaf3; border-color: #c4e6d0; color: #1e5a35; }

/* 我的回報 */
.fb-mine { gap: 7px; }
.pn-item.fb-it { align-items: flex-start; }
.pn-item.fb-it.bug { border-left: 3px solid var(--fb-bug); }
.pn-item.fb-it.idea { border-left: 3px solid var(--fb-idea); }
.fb-ava { background: #fff; }
.fb-ava img { position: static; width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; background: none; }
.fb-reply { margin-top: 5px; white-space: pre-wrap; }
.fb-reply b { display: block; font-size: 11px; color: var(--pn-acc-d); }
.fb-got { margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--pn-gold); }
.fb-rw { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; margin-top: 3px; }
.fb-pt { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #7a4bb0; color: #fff; font-weight: 900; font-size: 13px; }
.fb-pt.f { background: linear-gradient(180deg, #3fc08a, #17924f); }
.fb-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px; }
.fb-empty img { width: 48px; height: 48px; image-rendering: pixelated; opacity: .85; }
.fb-empty b { color: var(--pn-ink); }

/* 獎勵說明 */
.fb-flow { display: flex; align-items: center; gap: 4px; }
.fb-flow > div { flex: 1; min-width: 0; text-align: center; background: #fff; border: 1px solid var(--pn-line); border-radius: 10px; padding: 7px 4px; }
.fb-flow > div span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--pn-acc); color: #fff; font-weight: 900; font-size: 11px; }
.fb-flow > div b { display: block; font-size: 12.5px; margin-top: 2px; }
.fb-flow > div small { display: block; font-size: 11px; color: var(--pn-sub); }
.fb-flow > i { font-style: normal; color: #9aa3cc; font-weight: 900; }
.fb-sec-ic { width: 20px; height: 20px; image-rendering: pixelated; margin-right: -2px; }
.pn-sec:has(.fb-sec-ic)::before { display: none; }
.fb-tiers { display: flex; flex-direction: column; gap: 5px; }
.fb-tier { display: grid; grid-template-columns: 34px 1fr; gap: 3px 9px; align-items: center; background: #fff; border: 1px solid var(--pn-line); border-radius: 10px; padding: 7px 9px; }
.fb-tier > .fb-rw, .fb-tier > .sub { grid-column: 2; margin-top: 0; }
.fb-tier-m b { font-size: 13.5px; }
.fb-tier-m small { display: block; color: var(--pn-sub); font-size: 11.5px; line-height: 1.4; }
.fb-gem { width: 30px; height: 30px; transform: rotate(45deg); border-radius: 7px; display: grid; place-items: center; grid-row: span 2; justify-self: center;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .18); }
.fb-gem span { transform: rotate(-45deg); color: #fff; font-weight: 900; font-size: 13px; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.fb-tiers.bug .lv1 .fb-gem { background: linear-gradient(135deg, #9fd7a8, #3aa35a); }
.fb-tiers.bug .lv2 .fb-gem { background: linear-gradient(135deg, #ffe08a, #e2a10c); }
.fb-tiers.bug .lv3 .fb-gem { background: linear-gradient(135deg, #ffb27a, #e2621e); }
.fb-tiers.bug .lv4 .fb-gem { background: linear-gradient(135deg, #ff8c95, #c22234); }
.fb-tiers.idea .lv1 .fb-gem { background: linear-gradient(135deg, #a9d3ff, #3b82d6); }
.fb-tiers.idea .lv2 .fb-gem { background: linear-gradient(135deg, #d5b8ff, #7a4bb0); }
.fb-tiers.idea .lv3 .fb-gem, .fb-tiers.idea .lv4 .fb-gem { background: linear-gradient(135deg, #ffe08a, #c98a06); }
.fb-tiers.bug .lv4 { border-color: #f4bcbc; background: #fffafa; }
.fb-rules ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.5; }
.fb-rules li b { color: #2d3570; }

@media (max-width: 480px) {
  .fb-kinds { grid-template-columns: 1fr; }
  .pn button.fb-kc { min-height: 54px; }
  .fb-flow > div small { display: none; }
}

/* css/panels.css?v=8 */
/* 星夢物語 — 共用面板樣式（2026-11-21，user: 「重新設計排版當前組隊留言板 好友頁面 公會頁面 公會戰頁面 等各式陽春頁面
   兌換、購買道具頁面也一併處理」）。
   這些視窗的內容外面包一層 <div class="pn">（js/social.js、js/friends.js、js/exchange.js、js/game.js 的交換 / 組合 / VIP、
   js/items.js 的 NPC 商店），這裡的規則只作用在 .pn 裡，其他模組的視窗不受影響。
   零件：
     .pn-hero      頂端的橫幅（徽章 + 標題 + 小字 + 右邊的標籤），變化 .party .guild .war .shop .friend .swap
     .pn-stats     數值格（<div><span>名稱</span><b>值</b></div>…）
     .pn-list      一列一張卡片（.pn-item：.pn-ava 頭像、.pn-main 名稱與說明、.pn-side 右邊的數字或按鈕）
     .pn-chip      小標籤（.lv .on .off .gold .warn .acc）
     .pn-bar       HP / MP 細條
     .pn-tool      搜尋、篩選那一列；.pn-box 一般的卡片區塊（表單、說明）；.pn-sec 區塊標題
     .pn-cta       大按鈕兩三個並排；.pn-foot 底部的按鈕列；.pn-empty 沒有資料時；.pn-tip 說明小字；.pn-warn 警告
   按鈕：.pn 裡的 button 預設是藍色主要按鈕；.alt 次要（白底）；.danger 紅色（退出、刪除、解散…）；.mini 小按鈕。
   原本的 .so-tabs / .fr-tabs / .so-tab（表格）/ .so-kv / .so-form / details 在 .pn 裡也換成同一套樣子。 */

.pn {
  --pn-ink: #262a4d; --pn-sub: #666c90; --pn-line: #dfe4f5; --pn-soft: #f3f5fd; --pn-soft2: #e9edfb;
  --pn-acc: #4a6ae6; --pn-acc-d: #3552c4; --pn-good: #17924f; --pn-bad: #cf3b3b; --pn-gold: #c98a06;
  color: var(--pn-ink); font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; gap: 8px;
}
.pn p { margin: 0; }
.pn b { font-weight: 700; }
.pn .sub { color: var(--pn-sub); font-size: 12px; }
.pn .warn { color: var(--pn-bad); }

/* ---------- buttons, fields ---------- */
.pn button { font: inherit; font-weight: 700; font-size: 13px; line-height: 1.2; padding: 5px 12px; min-height: 28px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--pn-acc-d); background: var(--pn-acc); color: #fff; box-shadow: none;
  transition: filter .12s, transform .06s; white-space: nowrap; }
.pn button:hover { filter: brightness(1.08); }
.pn button:active { transform: translateY(1px); }
.pn button.alt { background: #fff; color: #33396a; border-color: #c4cbe6; box-shadow: none; }
.pn button.alt:hover { background: #f1f4ff; filter: none; }
.pn button.danger, .pn button.alt.danger { background: #fff; color: var(--pn-bad); border-color: #efb5b5; box-shadow: none; }
.pn button.danger:hover { background: #fff1f1; filter: none; }
.pn button.danger.solid { background: var(--pn-bad); color: #fff; border-color: #a92b2b; }
.pn button.good { background: var(--pn-good); border-color: #127a41; }
.pn button.gold { background: #e9a823; border-color: #b67f0c; color: #3a2600; }
.pn button.mini { padding: 2px 9px; min-height: 24px; font-size: 12px; border-radius: 6px; }
.pn button:disabled, .pn button:disabled:hover, .pn button.danger.solid:disabled, .pn button.good:disabled, .pn button.gold:disabled { background: #e6e8f1; color: #9a9fb8; border-color: #d6d9e6; box-shadow: none; cursor: default; filter: none; transform: none; }
.pn input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .pn select, .pn textarea {
  font: inherit; font-size: 13px; color: var(--pn-ink); background: #fff; border: 1px solid #c6cde8; border-radius: 8px; padding: 5px 9px; min-height: 30px;
  min-width: 0; outline: none; transition: border-color .12s, box-shadow .12s; }
.pn input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .pn select { height: 32px; box-sizing: border-box; }
.pn input:focus, .pn select:focus, .pn textarea:focus { border-color: var(--pn-acc); box-shadow: 0 0 0 3px rgba(74, 106, 230, .18); }
.pn input:disabled, .pn select:disabled { background: #f1f2f7; color: #9a9fb8; }
.pn input[type="checkbox"], .pn input[type="radio"] { accent-color: var(--pn-acc); width: 15px; height: 15px; vertical-align: -3px; margin: 0 3px 0 0; }
.pn label { color: var(--pn-ink); }

/* ---------- the header strip at the top (2026-11-22: calmer — the user found the saturated banners messy; now a light
   strip with a coloured left edge, the game's own pixel icon, dark text; one accent colour per kind of window) ---------- */
.pn-hero { --hacc: #4a6ae6; --hbg: #f3f6ff; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--pn-ink);
  background: var(--hbg); border: 1px solid #dde3f5; border-left: 4px solid var(--hacc); }
.pn-hero.guild { --hacc: #d29410; --hbg: #fffaee; border-color: #f0e2bf; }
.pn-hero.war { --hacc: #c0392b; --hbg: #fff6f5; border-color: #f2d6d2; }
.pn-hero.friend { --hacc: #cf4e8f; --hbg: #fff6fa; border-color: #f2d6e5; }
.pn-hero.shop { --hacc: #13927e; --hbg: #f2fbf8; border-color: #cfeae2; }
.pn-hero.swap { --hacc: #2f86c9; --hbg: #f2f8fd; border-color: #d3e5f4; }
.pn-hero.vip { --hacc: #7a4bb0; --hbg: #f8f4fd; border-color: #e4d8f3; }
.pn-hero.dim { --hacc: #8a90ab; --hbg: #f5f6fa; border-color: #e2e4ee; }
.pn-emb { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; font-weight: 900; color: var(--hacc);
  background: #fff; border: 1px solid #dde3f5; overflow: hidden; }
.pn-emb img { max-width: 28px; max-height: 28px; }
.pn-emb .it-ic { width: 28px !important; height: 28px !important; }
.pn-ht { flex: 1; min-width: 0; }
.pn-ht b { display: block; font-size: 14.5px; color: #262a4d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-ht small { display: block; font-size: 11.5px; color: var(--pn-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-hr { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 50%; }
.pn-hr .pn-chip.hot { background: var(--hacc); color: #fff; border-color: var(--hacc); }
.pn-hnum { text-align: right; line-height: 1.15; flex: none; }
.pn-hnum b { display: block; font-size: 16px; font-weight: 800; color: var(--hacc); font-variant-numeric: tabular-nums; }
.pn-hnum small { font-size: 11px; color: var(--pn-sub); }

/* ---------- chips, bars ---------- */
.pn-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 18px;
  background: var(--pn-soft2); color: #3d4472; border: 1px solid #d3d9f1; white-space: nowrap; vertical-align: middle; }
.pn-chip.lv { background: #e8eeff; color: #2f4fc0; border-color: #c5d2fb; }
.pn-chip.on { background: #e3f6ea; color: #13723e; border-color: #b7e3c7; }
.pn-chip.off { background: #eef0f5; color: #7b809b; border-color: #dcdfe9; }
.pn-chip.gold { background: #fff4d6; color: #8a5a00; border-color: #f0d48a; }
.pn-chip.warn { background: #ffe9e9; color: #b42828; border-color: #f4bcbc; }
.pn-chip.acc { background: var(--pn-acc); color: #fff; border-color: var(--pn-acc-d); }
.pn-chip.lead { background: #fff1c7; color: #8a5a00; border-color: #efcf6e; }
.pn-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b3b8cc; flex: none; }
.pn-dot.on { background: #22b45c; box-shadow: 0 0 0 3px rgba(34, 180, 92, .18); }
.pn-bar { display: block; height: 6px; border-radius: 4px; background: #e3e6f1; overflow: hidden; }
.pn-bar i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.pn-bar.hp i { background: linear-gradient(90deg, #ff6b6b, #e43d3d); }
.pn-bar.mp i { background: linear-gradient(90deg, #6fd3ff, #2fa8e8); }
.pn-bar.exp i { background: linear-gradient(90deg, #ffd35b, #f0a20b); }

/* ---------- numbers ---------- */
.pn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; background: var(--pn-line); border: 1px solid var(--pn-line); border-radius: 9px; overflow: hidden; }
.pn-stats > div { background: #fff; padding: 4px 10px; min-width: 0; }
.pn-stats span { display: block; font-size: 11px; color: var(--pn-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-stats b { display: block; font-size: 13px; color: var(--pn-ink); overflow-wrap: anywhere; }
.pn-stats b small { display: inline-block; font-weight: 400; color: var(--pn-sub); font-size: 11px; }
.pn-stats b.good { color: var(--pn-good); }
.pn-stats b.gold { color: var(--pn-gold); }
.pn-stats > div.wide { grid-column: 1 / -1; }

/* ---------- lists of cards ---------- */
.pn-list { display: flex; flex-direction: column; gap: 6px; }
.pn-list.scroll { max-height: min(46vh, 380px); overflow-y: auto; padding-right: 2px; }
.pn-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; background: #fff; border: 1px solid var(--pn-line); border-radius: 8px;
  transition: border-color .12s, background .12s; min-width: 0; }
.pn-item.click { cursor: pointer; }
.pn-item.click:hover { border-color: #aebcf2; background: #fafbff; }
.pn-item.sel { border-color: var(--pn-acc); background: #f2f5ff; }
.pn-item.me { background: #f6f8ff; border-color: #cfd8f7; }
.pn-item.off { background: #f7f8fb; }
.pn-item.off .pn-main, .pn-item.off .pn-ava { opacity: .6; }
.pn-item.hl { border-color: #f0c44a; background: #fffaf0; }
.pn-ava { position: relative; flex: none; width: 34px; height: 34px; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: #eef1fb; color: #4256b8; font-weight: 800; font-size: 14px; border: 1px solid #dbe1f5; }
.pn-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #eef1fb; }
.pn-ava.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
.pn-ava.big { width: 40px; height: 40px; border-radius: 9px; font-size: 17px; }
.pn-hero .pn-ava { background: #fff; }
.pn-vs { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 13px; font-weight: 700; min-width: 0; }
.pn-vs span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 8px; border-radius: 7px; }
.pn-vs .h { background: #e6eeff; color: #2b4fb8; }
.pn-vs .g { background: #ffe9e6; color: #b02a1f; }
.pn-vs .g.wait { background: #f1f2f6; color: #8a8fa8; font-weight: 600; font-style: italic; }
.pn-vs i { font-style: normal; font-weight: 900; font-size: 11px; color: #c0392b; }
.pn-ava.rank { background: #f1f3f9; color: #4a5180; font-size: 14px; }
.pn-ava.r1 { background: #f5c44a; color: #5a3a00; border-color: #e0a106; }
.pn-ava.r2 { background: #cfd5e2; color: #3e4560; border-color: #aab1c4; }
.pn-ava.r3 { background: #e4a670; color: #4d2400; border-color: #c27434; }
.pn-ava .pn-dot { position: absolute; right: 2px; bottom: 2px; border: 2px solid #fff; width: 10px; height: 10px; }
.pn-main { flex: 1; min-width: 0; }
.pn-name { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.pn-name > b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pn-line2 { font-size: 12px; color: var(--pn-sub); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-line2.wrap { white-space: normal; overflow-wrap: anywhere; }
.pn-msg { margin-top: 2px; font-size: 12.5px; color: #3a3f66; background: var(--pn-soft); border-radius: 6px; padding: 2px 8px; overflow-wrap: anywhere; }
.pn-side { flex: none; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; max-width: 50%; }
.pn-big { text-align: right; line-height: 1.1; flex: none; }
.pn-big b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.pn-big small { font-size: 11px; color: var(--pn-sub); }
.pn-hpw { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--pn-sub); }
.pn-hpw .pn-bar { flex: 1; max-width: 220px; }

/* ---------- blocks ---------- */
.pn-box { background: #fafbfe; border: 1px solid var(--pn-line); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.pn-box.white { background: #fff; }
.pn-sec { display: flex; align-items: center; gap: 6px; margin: 2px 0 -3px; font-size: 13px; font-weight: 700; color: #2d3570; }
.pn-sec::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--pn-acc); flex: none; }
.pn-sec .sub, .pn-sec small { font-weight: 400; }
.pn-sec .grow { flex: 1; }
.pn-sec.guild::before { background: #d99a0b; }
.pn-sec.war::before { background: #c0392b; }
.pn-tool { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pn-tool .grow { flex: 1 1 140px; }
.pn-tool .sp { flex: 1; }
.pn-search { position: relative; flex: 1 1 160px; min-width: 120px; display: flex; }
.pn-search input { flex: 1; }
.pn-check { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 8px; background: #fff; border: 1px solid #c6cde8; cursor: pointer; font-weight: 600; font-size: 12.5px; min-height: 30px; }
.pn-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; }
.pn-form > label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--pn-sub); font-weight: 600; min-width: 0; }
.pn-form > label.inline { flex-direction: row; align-items: center; gap: 5px; color: var(--pn-ink); font-size: 13px; min-height: 30px; }
.pn-form .so-ratio { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pn-form .so-ratio[hidden] { display: none; }
.pn-form .so-ratio > b { flex: 1 1 100%; font-size: 12.5px; }
.pn-form .so-ratio label { display: inline-flex; align-items: center; gap: 4px; }
.pn-form .so-ratio input { width: 4.6em; }
.pn-form .full { grid-column: 1 / -1; }
.pn-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pn-row .grow { flex: 1 1 150px; }
.pn-cta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pn-cta button { min-height: 44px; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 8px; white-space: normal; }
.pn-cta button small { font-weight: 500; font-size: 11px; opacity: .85; }
.pn-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
.pn-links button { display: flex; align-items: center; gap: 6px; justify-content: flex-start; white-space: normal; text-align: left; min-height: 38px; }
.pn-links button i { font-style: normal; font-size: 16px; }
.pn-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 2px; }
.pn-foot .sp { flex: 1; }
.pn-empty { text-align: center; padding: 12px 10px; color: var(--pn-sub); background: #fafbfe; border: 1px dashed #d3d9ee; border-radius: 9px; font-size: 12.5px; }
.pn-empty i { display: none; }
.pn-tip { font-size: 12px; color: var(--pn-sub); line-height: 1.5; padding: 0 2px; }
.pn-note { background: #eef4ff; border: 1px solid #cddbfb; border-left: 4px solid var(--pn-acc); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; color: #2f3a70; }
.pn-warn { background: #fff2f0; border: 1px solid #f6c7c0; border-left: 4px solid var(--pn-bad); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; color: #8f2121; }
.pn-ann { background: linear-gradient(90deg, #fff6dc, #fffbef); border: 1px solid #f1d98e; border-left: 4px solid #e0a106; border-radius: 9px; padding: 7px 10px; font-size: 13px; color: #4a3b10; }
.pn-ann b { color: #8a5a00; margin-right: 4px; }

/* collapsible blocks (settings, rules) */
.pn details { background: #fff; border: 1px solid var(--pn-line); border-radius: 11px; overflow: hidden; }
.pn details > summary { list-style: none; cursor: pointer; padding: 8px 12px; font-weight: 700; color: #2d3570; display: flex; align-items: center; gap: 6px; user-select: none; }
.pn details > summary::-webkit-details-marker { display: none; }
.pn details > summary::before { content: "▸"; font-size: 11px; color: var(--pn-acc); transition: transform .15s; }
.pn details[open] > summary::before { transform: rotate(90deg); }
.pn details > summary:hover { background: #f5f7ff; }
.pn details[open] > summary { border-bottom: 1px solid var(--pn-line); }
.pn details > :not(summary) { margin: 10px 12px; }
.pn details > p { line-height: 1.55; }

/* ---------- the older pieces inside a .pn window ---------- */
/* tabs: one segmented bar */
.pn .so-tabs, .pn .fr-tabs, .pn .pn-tabs { display: flex; flex-wrap: wrap; gap: 3px; margin: 0; padding: 3px; background: #e9edfa; border-radius: 11px; border: 1px solid #dbe1f5; }
.pn .so-tabs button, .pn .fr-tabs button, .pn .pn-tabs button { flex: 1 1 auto; background: transparent; color: #4b5280; border: 0; border-radius: 8px; box-shadow: none;
  padding: 6px 10px; min-height: 30px; font-weight: 700; }
.pn .so-tabs button:hover, .pn .fr-tabs button:hover, .pn .pn-tabs button:hover { background: rgba(255,255,255,.6); filter: none; }
.pn .so-tabs button.on, .pn .fr-tabs button.on, .pn .pn-tabs button.on { background: #fff; color: var(--pn-acc-d); box-shadow: 0 1px 3px rgba(40, 60, 140, .18); }
.pn-side.acts { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; }
.pn-side.acts button { justify-content: center; }
.pn .pn-tabs button i, .pn .so-tabs button i, .pn .fr-tabs button i { font-style: normal; margin-left: 4px; font-size: 11px; padding: 0 6px; border-radius: 9px; background: #d9e0f7; color: #3a4380; }
.pn .pn-tabs button.on i, .pn .so-tabs button.on i, .pn .fr-tabs button.on i { background: var(--pn-acc); color: #fff; }
.pn .pn-tabs.small button { flex: 0 1 auto; padding: 4px 10px; min-height: 26px; font-size: 12px; }
/* tables */
.pn .so-tabwrap, .pn .pn-tablewrap { overflow-x: auto; margin: 0; border: 1px solid var(--pn-line); border-radius: 11px; background: #fff; }
.pn .so-tab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; margin: 0; color: var(--pn-ink); background: #fff; }
.pn .so-tabwrap > .so-tab, .pn .pn-tablewrap > .so-tab { min-width: 520px; }
.pn > .so-tab { border: 1px solid var(--pn-line); border-radius: 11px; overflow: hidden; }
.pn .so-tab th { background: #f0f3fd; color: #4a5185; font-weight: 700; font-size: 12px; text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--pn-line); white-space: nowrap; }
.pn .so-tab th a { color: inherit; text-decoration: none; cursor: pointer; }
.pn .so-tab th a::after { content: " ⇅"; opacity: .35; font-size: 10px; }
.pn .so-tab th a.on { color: var(--pn-acc-d); }
.pn .so-tab th a.on::after { content: " ▼"; opacity: 1; }
.pn .so-tab td { padding: 7px 8px; border-bottom: 1px solid #edf0f8; vertical-align: middle; }
.pn .so-tab tr:last-child td { border-bottom: 0; }
.pn .so-tab tr:nth-child(even) td { background: #fafbff; }
.pn .so-tab tr[data-so] { cursor: pointer; }
.pn .so-tab tr[data-so]:hover td { background: #eef2ff; }
.pn .so-tab tr.sel td { background: #e3eaff !important; }
.pn .so-tab tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--pn-acc); }
.pn .so-tab tr.off td { opacity: .6; }
.pn .so-tab td.c, .pn .so-tab th.c { text-align: center; }
.pn .so-tab td.r, .pn .so-tab th.r { text-align: right; font-variant-numeric: tabular-nums; }
.pn .so-face { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; object-position: top; vertical-align: middle; margin-right: 6px; background: #e5eaff; }
/* old key / value grids and forms */
.pn .so-kv { margin: 0; background: var(--pn-soft); border: 1px solid var(--pn-line); border-radius: 10px; padding: 8px 12px; }
.pn .so-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.pn .so-form label { display: inline-flex; align-items: center; gap: 5px; }
.pn .so-ratio { background: #f3f6ff; border: 1px solid #d6def9; border-radius: 9px; padding: 7px 10px; }
.pn .so-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pn .so-list li { background: #fff; border: 1px solid var(--pn-line); border-radius: 8px; padding: 5px 9px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pn .so-list li small { color: var(--pn-sub); }
.pn .so-detail { background: #fff; border: 1px solid #cdd7f7; border-left: 4px solid var(--pn-acc); border-radius: 10px; padding: 8px 12px; margin: 0; }
.pn .so-detail p { margin: 4px 0; }

/* ---------- guild match room ---------- */
.pn .so-sides { display: flex; gap: 10px; align-items: stretch; }
.pn .so-side { flex: 1; background: #fff; border: 1px solid var(--pn-line); border-radius: 9px; padding: 8px 10px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pn .so-side.host { border-top: 3px solid #3d6fd6; }
.pn .so-side.guest { border-top: 3px solid #c0392b; }
.pn .so-side.win { border-color: #e0a106; background: #fffaeb; }
.pn .so-side h4 { margin: 0; font-size: 14px; color: #2d3570; overflow-wrap: anywhere; }
.pn .so-vs { align-self: center; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 12px; color: #fff;
  background: #c0392b; }
.pn .so-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; max-height: 180px; overflow: auto; }
.pn .so-picks label { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--pn-line); border-radius: 8px; padding: 4px 7px; cursor: pointer; }
.pn .so-picks label:has(input:checked) { border-color: var(--pn-acc); background: #f0f4ff; }

/* ---------- item flows: materials → result (exchange, compound, 道具兌換) ---------- */
.pn-xc { background: #fff; border: 1px solid var(--pn-line); border-radius: 9px; padding: 7px 9px; display: flex; flex-direction: column; gap: 6px; }
.pn-xc.ok { border-left: 3px solid #3cb371; }
.pn-xc.off { background: #fafbfd; }
.pn-xc.off .pn-flow { opacity: .75; }
.pn-xc[hidden], .pn-list.only-ok > .pn-xc.off { display: none; }
.pn-xc-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pn-xc-h > b { font-size: 14px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pn-flow { display: grid; grid-template-columns: 1fr 30px 1fr; gap: 6px; align-items: center; }
.pn-flow > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pn-arrow { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e6ebfb; color: var(--pn-acc); font-weight: 900; font-size: 13px; }
.pn-it { display: flex; align-items: center; gap: 6px; min-width: 0; background: var(--pn-soft); border: 1px solid var(--pn-line); border-radius: 9px; padding: 3px 7px 3px 3px; font-size: 12.5px; }
.pn-it .it-ic, .pn-it img { width: 28px !important; height: 28px !important; flex: none; object-fit: contain; }
.pn-it b { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-it em { font-style: normal; font-weight: 800; color: #3a4380; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn-it small { color: var(--pn-good); font-weight: 700; white-space: nowrap; }
.pn-it.short { background: #fff3f1; border-color: #f3c3bb; }
.pn-it.short small { color: var(--pn-bad); }
.pn-it.out { background: #f0f9f3; border-color: #c4e6d0; }
.pn-it.gold { background: #fff8e3; border-color: #f0d68e; }
.pn-it.gold .coin-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; font-size: 17px; }
/* 輸入序號 (js/coupon.js): the code box and what a code gave */
.cp-row { display: flex; gap: 6px; }
.cp-row input { flex: 1; font-family: Consolas, "Courier New", monospace !important; letter-spacing: 1px; text-transform: uppercase; }
.cp-row input::placeholder { text-transform: none; letter-spacing: 0; font-family: inherit; }
.cp-gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px; }
.cp-ok { border-left: 3px solid #3cb371; }
.cp-pt { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #7a4bb0; color: #fff; font-weight: 900; font-size: 13px; }
.tsd .cp-gifts { margin-bottom: 6px; min-width: min(360px, 80vw); }
.pn-xc-f { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pn-xc-f .why { margin-right: auto; color: var(--pn-bad); font-size: 12px; font-weight: 700; }
.pn-xc-f .okay { margin-right: auto; color: var(--pn-good); font-size: 12px; font-weight: 700; }
.pn-xc-f input[type="number"] { width: 70px; }
.pn-xc-f button.go { min-width: 84px; }
/* 道具兌換 one row per exchange (js/exchange.js row, 2026-11-22: 「每行精簡一點」) */
.pn-list.xr-list { gap: 4px; }
.pn-xr { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--pn-line); border-radius: 8px; padding: 3px 6px; min-width: 0; }
.pn-xr.ok { border-left: 3px solid #3cb371; }
.pn-xr.off { background: #fafbfd; }
.pn-xr.off .xr-flow { opacity: .7; }
.pn-xr[hidden], .xr-sec[hidden], .xr-tabs[hidden], .pn-list.only-ok > .pn-xr.off { display: none; }
.xr-flow { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.xr-ar { color: #8a93c0; font-weight: 900; padding: 0 1px; }
.xr-it { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 100%; border-radius: 7px; padding: 1px 5px 1px 1px; font-size: 12px; background: var(--pn-soft); border: 1px solid var(--pn-line); }
.xr-it .it-ic, .xr-it img { width: 22px !important; height: 22px !important; flex: none; object-fit: contain; }
.xr-it b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; }
.xr-it em { font-style: normal; font-weight: 800; color: #3a4380; white-space: nowrap; }
.xr-it small { color: var(--pn-good); font-weight: 700; font-size: 10.5px; }
.xr-it small::before { content: '有'; margin-right: 1px; font-weight: 400; }
.xr-it.short { background: #fff3f1; border-color: #f3c3bb; } .xr-it.short small { color: var(--pn-bad); }
.xr-it.out { background: #f0f9f3; border-color: #c4e6d0; }
.xr-it.gold { background: #fff8e3; border-color: #f0d68e; }
.xr-it.gold .coin-ic { width: 22px; height: 22px; display: grid; place-items: center; }
.xr-f { flex: none; display: flex; align-items: center; gap: 4px; }
.xr-f .why { color: var(--pn-bad); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.xr-f input[type="number"] { width: 54px; min-height: 26px; padding: 2px 4px; }
.xr-f button { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.xr-f button.go { min-width: 52px; }
.xr-sec { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding: 2px 2px 0; font-size: 12px; color: #5a6290; }
.xr-sec b { color: #2e3566; font-size: 13px; }
.xr-tabs { margin-bottom: 4px !important; }
@media (max-width: 560px) { .pn-xr { flex-wrap: wrap; } .xr-f { margin-left: auto; } }

/* ---------- shop-like rows (VIP SHOP) ---------- */
.pn-goods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.pn-good { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; border: 1px solid var(--pn-line); border-radius: 8px; min-width: 0; }
.pn-good.click { cursor: pointer; }
.pn-good.click:hover { border-color: #aebcf2; box-shadow: 0 2px 8px rgba(60, 80, 180, .14); }
.pn-good .it-ic, .pn-good > img { width: 36px !important; height: 36px !important; flex: none; object-fit: contain; background: var(--pn-soft); border-radius: 8px; padding: 2px; }
.pn-good .pn-main b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-price { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: #8a5a00; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pn-price.short { color: var(--pn-bad); }
/* 返利幣 = frame 0 of the client's own VIP shop art (data/UI_nori/RShop.nri → assets/ui/rshop_coin.png); item 63027's table
   icon is an earring picture (itm_ear_098_0, a blue gem), so the shop never uses the item icon for the coin */
.pn-coin { width: 14px; height: 16px; flex: none; image-rendering: pixelated; vertical-align: -3px; }

/* ---------- the NPC shop (js/items.js npcShopBody, wrapped in .pn.pn-shop; the trade box #shop-modal is unchanged) ---------- */
.pn-shop .it-tabs { display: flex; gap: 3px; margin: 0; padding: 3px; background: #e9edfa; border-radius: 11px; border: 1px solid #dbe1f5; }
.pn-shop .it-tabs b { flex: 1; text-align: center; padding: 7px 10px; border-radius: 8px; background: transparent; color: #4b5280; font-weight: 700; font-size: 13px; }
.pn-shop .it-tabs b:hover { background: rgba(255,255,255,.6); }
.pn-shop .it-tabs b.on { background: #fff; color: #0f7a6a; box-shadow: 0 1px 3px rgba(20, 90, 80, .2); }
.pn-shop .shop-filter { margin: 0; gap: 5px; }
.pn-shop .shop-filter b { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; background: #fff; border: 1px solid #cdd8e8; color: #3d4472; font-weight: 600; font-size: 12.5px; }
.pn-shop .shop-filter b:hover { border-color: #7fc8b6; }
.pn-shop .shop-filter b.on { background: #13927e; border-color: #0f7a6a; color: #fff; }
.pn-shop .shop-filter b i { font-style: normal; font-size: 10.5px; min-width: 16px; padding: 0 5px; border-radius: 8px; background: rgba(0, 0, 0, .07); text-align: center; }
.pn-shop .shop-filter b.on i { background: rgba(255, 255, 255, .28); }
.pn-shop .shop-cats { position: sticky; top: -12px; z-index: 2; margin: 0 -12px; padding: 6px 12px; background: rgba(247, 249, 255, .97); border-bottom: 1px solid var(--pn-line); }
.pn-shop .shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.pn-shop .shop-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin: 0; background: #fff; border: 1px solid var(--pn-line); border-radius: 8px; }
.pn-shop .shop-buyrow:hover { background: #fff; border-color: #7fc8b6; box-shadow: 0 2px 8px rgba(20, 120, 100, .16); }
.pn-shop .shop-row.on { background: #fff8e8; border-color: #efcf6e; }
.pn-shop .shop-row > img, .pn-shop .shop-row .it-ic { width: 36px !important; height: 36px !important; flex: none; object-fit: contain; background: var(--pn-soft); border-radius: 8px; padding: 2px; }
.pn-shop .shop-main b { font-size: 13px; }
.pn-shop .shop-main .sub { font-size: 11.5px; }
.pn-shop .shop-price { font-size: 11.5px; color: #8a6a10; }
.pn-shop .shop-price b { font-size: 14px; color: #b8650a; }
.pn-shop .shop-go { background: linear-gradient(#22b08f, #13927e); border: 1px solid #0f7a6a; border-radius: 8px; min-height: 32px; min-width: 56px; padding: 4px 10px; color: #fff; }
.pn-shop .shop-go small { font-size: 10.5px; }
.pn-shop .shop-go.big { background: linear-gradient(#f0a443, #e08a2a); border-color: #b86a14; }
.pn-shop .shop-go[disabled] { background: #d3d7e4; border-color: #c4c9d8; color: #8d93ac; }
/* the amount stepper keeps its compact look (the general .pn button / input rules would blow it up) */
.pn .shop-qty { border-color: #c6cde8; border-radius: 8px; }
.pn .shop-qty button { background: #eef1fb; color: var(--pn-ink); border: 0; border-radius: 0; box-shadow: none; padding: 0; min-height: 0; width: 26px; height: 28px; font-size: 14px; }
.pn .shop-qty button:hover { background: #dfe5fb; filter: none; }
.pn .shop-qty button.mx { width: auto; padding: 0 7px; font-size: 11px; border-left: 1px solid #c6cde8; }
.pn .shop-qty input:not([type="checkbox"]) { width: 48px; height: 28px; min-height: 0; border: 0; border-left: 1px solid #c6cde8; border-right: 1px solid #c6cde8; border-radius: 0; padding: 0; box-shadow: none; text-align: center; }
.pn-shop .shop-bar { position: sticky; bottom: -12px; z-index: 2; margin: 0 -12px -12px; padding: 9px 12px; background: rgba(247, 249, 255, .98); border-top: 1px solid var(--pn-line); border-radius: 0 0 6px 6px; }
.pn-shop .shop-bar > button:not(.shop-go) { min-height: 30px; padding: 4px 11px; border-radius: 8px; }

/* ---------- friends: notes ---------- */
.pn .fr-note { background: #fff; border: 1px solid var(--pn-line); border-radius: 10px; padding: 7px 10px; margin: 0; }
.pn .fr-note.new { border-left: 4px solid #d64fc8; background: #fff8fe; }
.pn .fr-note.sent { background: var(--pn-soft); opacity: .9; }
.pn .fr-nh { display: flex; align-items: center; gap: 6px; }
.pn .fr-nh b { flex: 1; }
.pn .fr-nt { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; color: #353a63; }
.pn .rp-reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.pn .rp-reasons label { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #c6cde8; border-radius: 9px; padding: 6px 9px; cursor: pointer; font-weight: 600; }
.pn .rp-reasons label:has(input:checked) { border-color: var(--pn-bad); background: #fff3f3; color: #8f2121; }
.pn #rp-detail { width: 100%; resize: vertical; }
.pn .pi-eqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px; max-height: min(40vh, 300px); overflow: auto; }
.pn .pi-eq { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--pn-line); border-radius: 9px; padding: 4px 7px; cursor: pointer; min-width: 0; font-size: 12.5px; }
.pn .pi-eq:hover { border-color: #aebcf2; background: #f5f7ff; }
.pn .pi-eq b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn .pi-slot { flex: none; font-size: 11px; font-weight: 700; color: #8a5a00; background: #fff4d6; border-radius: 6px; padding: 0 5px; }

/* ---------- window widths ---------- */
#windows .win:is(#win-party, #win-pboard, #win-friends) { width: min(600px, calc(100vw - 24px)); }
#windows .win:is(#win-guild, #win-glist, #win-gboard, #win-grank, #win-gglobby, #win-ggroom, #win-ggladder, #win-ggresult) { width: min(700px, calc(100vw - 24px)); }
#windows .win:is(#win-gmake, #win-pinfo, #win-report, #win-pvp) { width: min(480px, calc(100vw - 24px)); }
#windows .win:is(#win-swap, #win-exchange, #win-compound) { width: min(600px, calc(100vw - 24px)); }
#windows .win#win-vip { width: min(640px, calc(100vw - 24px)); }
#windows .win#win-npcshop { width: min(600px, calc(100vw - 24px)); }
.win:has(> .win-body > .pn) > .win-body { padding: 12px; max-height: min(74vh, 680px); }
#win-vip .win-body { max-height: min(74vh, 680px); }

/* ---------- phones ---------- */
/* landscape phones are wide but short (a 988 x 460 layout): keep rows side by side, cut the vertical padding, drop the
   header's sub line and the grey tips so the list itself is what fills the window */
@media (max-height: 540px) and (orientation: landscape) {
  .pn { gap: 6px; font-size: 12.5px; }
  .pn-hero { padding: 4px 8px; gap: 8px; }
  .pn-emb { width: 28px; height: 28px; }
  .pn-emb img, .pn-emb .it-ic { max-width: 24px; max-height: 24px; }
  .pn-ht b { font-size: 13.5px; }
  .pn-ht small, .pn-hnum small, .pn-tip { display: none; }
  .pn-hnum b { font-size: 14px; }
  .pn-stats { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
  .pn-stats > div { padding: 2px 8px; }
  .pn-item { padding: 4px 8px; }
  .pn-ava { width: 30px; height: 30px; }
  .pn-list.scroll { max-height: none; }
  .pn button { min-height: 30px; }
  .pn button.mini { min-height: 28px; }
  .pn-cta button { min-height: 38px; }
  .pn .so-tabs button, .pn .fr-tabs button, .pn .pn-tabs button { min-height: 28px; padding: 4px 8px; }
  .win:has(> .win-body > .pn) > .win-body { padding: 8px; max-height: calc(100dvh - 46px); }
}
/* phones (2026-11-22, user: 手機板上的介面都太大了 組隊 公會 等等 縮小 整理他): the windows narrower and shorter so the map
   stays in view (about half the screen), everything inside one step smaller, cards two lines (name / where + HP side
   by side), the header strip one thin line, the old tables tighter */
@media (max-height: 540px) and (orientation: landscape) {
  #windows .win:is(#win-party, #win-pboard, #win-friends) { width: min(450px, calc(100vw - 12px)); }
  #windows .win:is(#win-guild, #win-glist, #win-gboard, #win-grank, #win-gglobby, #win-ggroom, #win-ggladder, #win-ggresult) { width: min(540px, calc(100vw - 12px)); }
  #windows .win:is(#win-gmake, #win-pinfo, #win-report, #win-pvp) { width: min(400px, calc(100vw - 12px)); }
  #windows .win:is(#win-swap, #win-exchange, #win-compound) { width: min(480px, calc(100vw - 12px)); }
  #windows .win#win-vip, #windows .win#win-npcshop { width: min(500px, calc(100vw - 12px)); }
  .win:has(> .win-body > .pn) > .win-body { padding: 6px; max-height: min(calc(100dvh - 60px), 400px); }

  .pn { gap: 5px; font-size: 12px; line-height: 1.35; }
  .pn .sub { font-size: 11px; }
  .pn button { font-size: 12px; padding: 3px 9px; min-height: 26px; border-radius: 6px; }
  .pn button.mini { font-size: 11px; padding: 1px 7px; min-height: 22px; }
  .pn input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .pn select, .pn textarea { font-size: 12px; padding: 3px 7px; min-height: 26px; border-radius: 6px; }
  .pn input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .pn select { height: 26px; }
  .pn-check { min-height: 26px; padding: 2px 7px; font-size: 11.5px; }
  .pn-tool { gap: 4px; }
  .pn-search { flex: 1 1 100px; min-width: 90px; }

  /* header: one thin line */
  .pn-hero { padding: 2px 6px; gap: 6px; border-radius: 7px; border-left-width: 3px; }
  .pn-emb { width: 22px; height: 22px; border-radius: 5px; font-size: 12px; }
  .pn-emb img, .pn-emb .it-ic { max-width: 18px; max-height: 18px; width: 18px !important; height: 18px !important; }
  .pn-ht b { font-size: 12.5px; }
  .pn-hnum b { font-size: 12.5px; }
  .pn-hr { gap: 3px; max-width: 60%; }
  .pn-chip { font-size: 10.5px; line-height: 15px; padding: 0 6px; }

  /* numbers: label and value on one line */
  .pn-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-radius: 7px; }
  .pn-stats > div { padding: 2px 7px; display: flex; align-items: baseline; gap: 6px; }
  .pn-stats span { font-size: 10.5px; flex: none; }
  .pn-stats b { font-size: 12px; flex: 1; min-width: 0; text-align: right; }
  .pn-stats b small { font-size: 10px; }

  /* cards: name on the first line, where + HP / MP on the second */
  .pn-list { gap: 4px; }
  .pn-item { padding: 3px 6px; gap: 6px; border-radius: 7px; }
  .pn-ava, .pn-ava.sm { width: 26px; height: 26px; border-radius: 6px; font-size: 12px; }
  .pn-ava.big { width: 30px; height: 30px; }
  .pn-ava .pn-dot { width: 8px; height: 8px; right: 1px; bottom: 1px; }
  .pn-main { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
  .pn-main > * { flex: 1 1 100%; min-width: 0; }
  .pn-main > .pn-line2:has(+ .pn-hpw) { flex: 0 1 auto; max-width: 50%; }
  .pn-main > .pn-hpw { flex: 1 1 120px; margin-top: 1px; font-size: 10px; gap: 4px; }
  .pn-name { gap: 3px; }
  .pn-name > b { font-size: 12.5px; }
  .pn-line2 { font-size: 11px; margin-top: 0; }
  .pn-msg { font-size: 11.5px; padding: 1px 6px; }
  .pn-bar { height: 5px; }
  .pn-side { gap: 3px; }
  .pn-item.wrapm .pn-side { padding-left: 0; }
  .pn-big b { font-size: 13px; }

  /* blocks */
  .pn-box { padding: 5px 7px; gap: 4px; border-radius: 7px; }
  .pn-sec { font-size: 12px; margin: 0 0 -2px; }
  .pn-sec::before { height: 11px; }
  .pn-form { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 5px 8px; }
  .pn-form > label { font-size: 11px; gap: 2px; }
  .pn-form > label.inline { font-size: 12px; min-height: 24px; }
  .pn-cta { gap: 5px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .pn-cta button { min-height: 32px; font-size: 12.5px; }
  .pn-cta button small { display: none; }
  .pn-links { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .pn-links button { min-height: 26px; justify-content: center; text-align: center; font-size: 11.5px; padding: 2px 4px; }
  .pn-links button i { display: none; }
  .pn-foot { gap: 4px; padding-top: 0; }
  .pn-empty { padding: 6px; font-size: 11.5px; }
  .pn-note, .pn-warn, .pn-ann { padding: 3px 8px; font-size: 11.5px; border-left-width: 3px; border-radius: 7px; }
  .pn details { border-radius: 7px; }
  .pn details > summary { padding: 4px 9px; font-size: 12px; }
  .pn details > :not(summary) { margin: 6px 8px; }
  .pn details > .pn-tip { display: block; }

  /* tabs */
  .pn .so-tabs, .pn .fr-tabs, .pn .pn-tabs { padding: 2px; gap: 2px; border-radius: 8px; }
  .pn .so-tabs button, .pn .fr-tabs button, .pn .pn-tabs button { min-height: 24px; padding: 2px 6px; font-size: 11.5px; border-radius: 6px; }
  .pn .pn-tabs button i, .pn .so-tabs button i, .pn .fr-tabs button i { font-size: 10px; padding: 0 4px; margin-left: 2px; }

  /* tables */
  .pn .so-tabwrap, .pn .pn-tablewrap, .pn > .so-tab { border-radius: 7px; }
  .pn .so-tabwrap > .so-tab, .pn .pn-tablewrap > .so-tab { min-width: 440px; }
  .pn .so-tab { font-size: 11.5px; }
  .pn .so-tab th { font-size: 11px; padding: 3px 6px; }
  .pn .so-tab td { padding: 3px 6px; }
  .pn .so-face { width: 18px; height: 18px; margin-right: 4px; }
  .pn .so-kv, .pn .so-detail { padding: 4px 8px; }
  .pn .so-list li { padding: 3px 7px; }
  .pn .so-side { padding: 5px 7px; gap: 4px; }
  .pn .so-side h4 { font-size: 12.5px; }
  .pn .so-picks { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 120px; }
  .pn .so-picks label { padding: 2px 5px; }

  /* item flows, goods, shop */
  .pn-xc { padding: 4px 6px; gap: 4px; border-radius: 7px; }
  .pn-xc-h > b { font-size: 12.5px; }
  .pn-flow { grid-template-columns: 1fr 22px 1fr; gap: 4px; }
  .pn-arrow { width: 20px; height: 20px; font-size: 11px; }
  .pn-it { padding: 1px 5px 1px 2px; gap: 4px; font-size: 11.5px; border-radius: 7px; }
  .pn-it .it-ic, .pn-it img, .pn-it.gold .coin-ic { width: 22px !important; height: 22px !important; }
  .pn-xc-f input[type="number"] { width: 56px; }
  .pn-xc-f button.go { min-width: 64px; }
  .pn-goods { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; }
  .pn-good { padding: 3px 6px; gap: 6px; }
  .pn-good .it-ic, .pn-good > img { width: 28px !important; height: 28px !important; }
  .pn-good .pn-main b { font-size: 12px; }
  .pn-shop .it-tabs b { padding: 3px 6px; font-size: 12px; }
  .pn-shop .shop-filter b { padding: 1px 8px; font-size: 11.5px; }
  .pn-shop .shop-cats { top: -6px; margin: 0 -6px; padding: 4px 6px; }
  .pn-shop .shop-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; }
  .pn-shop .shop-row { padding: 3px 6px; gap: 6px; }
  .pn-shop .shop-row > img, .pn-shop .shop-row .it-ic { width: 28px !important; height: 28px !important; }
  .pn-shop .shop-main b { font-size: 12px; }
  .pn-shop .shop-price b { font-size: 12.5px; }
  .pn-shop .shop-go { min-height: 26px; min-width: 48px; padding: 2px 8px; }
  .pn-shop .shop-bar { bottom: -6px; margin: 0 -6px -6px; padding: 5px 6px; }

  /* friends */
  .pn .fr-note { padding: 4px 8px; }
  .pn .rp-reasons label { padding: 3px 7px; }
  .pn .pi-eqs { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 160px; }
  .pn .pi-eq { padding: 2px 5px; font-size: 11.5px; }
}
/* narrow screens (portrait / small windows): the actions go under the name, the two sides stack */
@media (max-width: 560px) {
  .pn-side { max-width: 100%; }
  .pn-item.wrapm { flex-wrap: wrap; }
  .pn-item.wrapm .pn-side { flex: 1 1 100%; justify-content: flex-start; padding-left: 42px; }
  .pn-hr { display: none; }
  .pn .rp-reasons { grid-template-columns: repeat(2, 1fr); }
  .pn .so-sides { flex-direction: column; }
  .pn-flow { grid-template-columns: 1fr; }
  .pn-arrow { justify-self: center; transform: rotate(90deg); }
}

/* css/powerlock.css?v=4 */
/* 鎖定省電畫面 (js/powerlock.js): black, a few dim lines, nothing animating */
html.ts-locked #game { visibility: hidden; }
#ts-lock { display: none; position: fixed; inset: 0; z-index: 2147483000; background: #000; color: #8a8f9c;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif; user-select: none; -webkit-user-select: none; touch-action: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#ts-lock.on { display: flex; }
#ts-lock .lk-box { width: min(420px, 90vw); text-align: center; }
#ts-lock .lk-time { font-size: 52px; line-height: 1; color: #c9ccd4; font-weight: 300; letter-spacing: 2px; }
#ts-lock .lk-date { font-size: 12px; margin-top: 6px; }
#ts-lock .lk-who { margin-top: 12px; font-size: 14px; color: #b7bac3; white-space: pre; }
#ts-lock .lk-bars { display: flex; gap: 8px; margin-top: 8px; }
#ts-lock .lk-bar { position: relative; flex: 1; height: 16px; background: #15161a; border-radius: 8px; overflow: hidden; }
#ts-lock .lk-bar i { position: absolute; inset: 0; transform-origin: left; }
#ts-lock .lk-bar.hp i { background: #6e2228; }
#ts-lock .lk-bar.mp i { background: #213f6e; }
#ts-lock .lk-bar span { position: relative; font-size: 11px; line-height: 16px; color: #c9ccd4; }
#ts-lock .lk-auto { margin-top: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
#ts-lock .lk-auto span { font-size: 12px; }
#ts-lock .ok { color: #3f9c62; }
#ts-lock .warn { color: #c08a2e; }
#ts-lock .bad { color: #c24848; }
#ts-lock .lk-stats { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; }
#ts-lock .lk-stats b { color: #c9ccd4; font-weight: normal; }
#ts-lock .lk-log { margin-top: 10px; font-size: 11px; line-height: 1.5; color: #5d616b; }
#ts-lock .lk-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* master volume row (2026-11-27): 🔊 | drag line | n% */
#ts-lock .lk-vol { display: flex; align-items: center; gap: 10px; width: min(300px, 80vw); }
#ts-lock .lk-vmute { flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid #23252b; background: #111215;
  color: #c9ccd4; font-size: 16px; line-height: 1; cursor: pointer; }
#ts-lock .lk-vmute:active { transform: scale(.94); }
#ts-lock .lk-vtrack { position: relative; flex: 1; height: 36px; cursor: pointer; touch-action: none; }
#ts-lock .lk-vline { position: absolute; left: 0; right: 0; top: 15px; height: 6px; border-radius: 3px; background: #1b1d22; overflow: hidden; }
#ts-lock .lk-vline i { position: absolute; inset: 0; background: #4c5566; transform-origin: left; }
#ts-lock .lk-vtrack b { position: absolute; top: 8px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #2a2d35;
  border: 1px solid #5b6170; box-sizing: border-box; pointer-events: none; }
#ts-lock .lk-vtrack.drag b { background: #3a3e49; border-color: #8a8f9c; }
#ts-lock .lk-vn { flex: none; width: 40px; text-align: right; font-size: 12px; color: #8a8f9c; }
#ts-lock .lk-slide { text-align: center; }
#ts-lock .lk-track { position: relative; width: min(300px, 80vw); height: 48px; border-radius: 24px; background: #111215; border: 1px solid #23252b; }
#ts-lock .lk-track span { position: absolute; inset: 0; line-height: 46px; font-size: 14px; color: #555963; padding-left: 30px; }
#ts-lock .lk-knob { position: absolute; left: 4px; top: 4px; width: 40px; height: 40px; border-radius: 50%; background: #2a2d35; color: #c9ccd4;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: normal; cursor: grab; transition: transform .2s; touch-action: none; }
#ts-lock .lk-knob.drag { transition: none; cursor: grabbing; }
#ts-lock .lk-slide small { display: block; margin-top: 8px; font-size: 11px; color: #4a4d56; }
/* phones in landscape are short: tighter */
@media (max-height: 460px) {
  #ts-lock { gap: 10px; }
  #ts-lock .lk-time { font-size: 40px; }
  #ts-lock .lk-who, #ts-lock .lk-bars, #ts-lock .lk-auto, #ts-lock .lk-stats, #ts-lock .lk-log { margin-top: 6px; }
}
/* the 🔒 button on the screen, over the chat button (js/powerlock.js places it from #chat-btn) */
#lock-btn { position: absolute; z-index: 6; display: none; place-items: center; padding: 0; border-radius: 50%; border: 2px solid #fff;
  background: rgba(40, 40, 60, .65); color: #fff; font-size: 15px; line-height: 1; box-shadow: var(--shadow); }
#lock-btn.show { display: grid; }
#lock-btn:active { transform: scale(.94); }

/* css/dialog.css?v=2 */
/* 遊戲內的確認 / 輸入 / 提示視窗（js/dialog.js，取代瀏覽器的 alert / confirm / prompt）。按鈕與文字用 css/panels.css 的 .pn。 */
#tsd-mask { position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 14, 30, .45); animation: tsd-in .12s ease-out; }
.tsd { width: min(380px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border: 2px solid #7f95e0;
  border-radius: 12px; box-shadow: 0 12px 36px rgba(0, 0, 0, .45); padding: 0 0 12px; gap: 10px; }
.tsd-head { padding: 8px 14px; font-weight: 700; font-size: 14px; color: #263066; border-radius: 10px 10px 0 0;
  background: linear-gradient(#e8edff, #cfd8fb); border-bottom: 1px solid #b9c5f0; }
.tsd-text { padding: 2px 16px; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55; }
.tsd-in { margin: 0 16px; padding: 7px 10px; font: inherit; font-size: 14px; border: 1px solid #b9c3e6; border-radius: 7px; outline: none; }
.tsd-in:focus { border-color: #4a6ae6; box-shadow: 0 0 0 3px rgba(74, 106, 230, .18); }
.tsd-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 2px 16px 0; }
.tsd-btns button { min-width: 84px; min-height: 34px; }
@keyframes tsd-in { from { opacity: 0; } }
/* in-game secret boxes (安全鎖, room / guild passwords): text drawn as dots, so the browser does not offer to save or
   update the account password (2026-11-25: Vivaldi kept asking 「要更新密碼嗎？」 with the 4-digit lock) */
.pw-mask { -webkit-text-security: disc; text-security: disc; font-family: inherit; letter-spacing: .12em; }

/* css/stall.css?v=6 */
/* 擺攤 (js/stall.js), 3rd look (2026-11-23, user: 太雜了 簡潔一點 手機板畫面沒那麼大): a slim head line, one row per
   item, a small bag strip, one bar with the total and the button */
#win-mystall { width: min(440px, calc(100vw - 12px)); }
#win-stall { width: min(400px, calc(100vw - 12px)); }
#win-mystall .win-body, #win-stall .win-body { padding: 8px 10px 0; max-height: min(74vh, 600px); }
.stall { display: flex; flex-direction: column; gap: 7px; color: #3a3550; font-size: 13px; }
.stall .coin { width: 12px; height: 12px; flex: none; }

.stall-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; padding: 2px 0 6px; border-bottom: 2px solid #f0dcb4; }
.stall-head b { font-size: 15px; color: #5a3000; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stall-head small { flex: 1 1 100%; font-size: 11px; color: #9a8a6e; }
.stall-open { padding: 1px 8px; border-radius: 999px; background: #2fa864; color: #fff; font-size: 11px; font-weight: 700; }
.stall-h { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 12px; color: #7a5a2a; }
.stall-h small { font-weight: 500; color: #a99a80; }
.stall-none { padding: 8px; text-align: center; color: #9a9bb2; font-size: 12px; }
.stall-warn { padding: 5px 8px; border-radius: 7px; background: #fff0ee; color: #b63a2a; font-size: 12px; font-weight: 700; }
.stall-warn[hidden] { display: none; }
.stall-sign { width: 100%; box-sizing: border-box; padding: 6px 9px; font-size: 13px; border: 1px solid #e6d6b4; border-radius: 8px; background: #fffaf0; }

.stall-gold { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: #9a5b0c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stall-gold.short { color: #c0392b; }
.stall-gold.plus::before { content: '+'; margin-right: -2px; }
.stall-rf { font-style: normal; margin-left: 4px; font-size: 11px; font-weight: 800; color: #c07a10; }

/* rows */
.stall-list { display: flex; flex-direction: column; gap: 4px; }
.stall-row { display: flex; align-items: center; gap: 7px; padding: 4px 6px; background: #fff; border: 1px solid #ece4d2; border-radius: 8px; min-width: 0; }
.stall-pic { position: relative; width: 32px; height: 32px; flex: none; display: grid; place-items: center; }
.stall-pic .it-ic { width: 30px !important; height: 30px !important; }
.stall-n { position: absolute; right: -3px; bottom: -3px; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: rgba(60, 40, 10, .82); border-radius: 6px; padding: 0 3px; line-height: 13px; }
.stall-ci { flex: 1; min-width: 0; }
.stall-ci b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stall-ci small { display: block; font-weight: 400; font-size: 10.5px; color: #8a8ea6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stall-in { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.stall-in input { width: 46px; padding: 3px 4px; font-size: 12px; border: 1px solid #e0d2b4; border-radius: 6px; }
.stall-in.p input { width: 78px; }
.stall-in input:disabled { background: #f4f1ea; color: #999; }
.stall-in i { font-style: normal; font-size: 11px; color: #a99a80; }
.stall-x { flex: none; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; font-size: 11px; background: transparent; border: 0; color: #b0a08a; }
.stall-x:hover { background: #ffe8e4; color: #c0392b; }
.stall-buy { flex: none; min-width: 44px; min-height: 30px; padding: 2px 10px; border-radius: 8px; font-weight: 700; color: #fff; background: #13927e; border: 1px solid #0f7a6a; }
.stall-buy[disabled] { background: #d6d8e2; border-color: #c4c8d6; color: #8d93ac; }

.stall-bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 3px; max-height: 128px; overflow-y: auto; padding: 4px; border-radius: 8px; background: #f4f5fa; }
.stall-bag .slot { position: relative; width: auto; height: 38px; cursor: pointer; }
.stall-bag .slot .it-ic { width: 30px !important; height: 30px !important; }
.stall-bag .slot small { position: absolute; right: 2px; bottom: 0; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.stall-bag .slot.stall-no { opacity: .3; filter: grayscale(1); cursor: not-allowed; }

.stall-log { display: flex; flex-direction: column; gap: 2px; max-height: 96px; overflow-y: auto; }
.stall-log-r { display: flex; align-items: center; gap: 6px; padding: 2px 6px; font-size: 12px; border-radius: 6px; background: #f2faf5; }
.stall-log-r b { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stall-log-r small { color: #7a9a88; }
.stall-log-r .stall-gold { color: #1f8a52; }

.stall-bar { position: sticky; bottom: 0; z-index: 2; margin: 0 -10px; padding: 7px 10px; display: flex; align-items: center; gap: 8px; background: var(--panel, #fffaf0); border-top: 1px solid #efe2c6; }
html.phone .stall-bar { margin: 0 -6px; padding: 7px 6px; }   /* phone body padding is 6px: -10px made 擺攤 scroll sideways */
.stall-bar > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #8a7a5e; }
.stall-bar > span b { font-size: 14px; }
.stall-go { margin-left: auto; min-width: 96px; min-height: 32px; padding: 4px 14px; border-radius: 8px; font-weight: 800; color: #fff; background: #e08a2a; border: 1px solid #b86a14; }
.stall-go.stop { background: #d9414f; border-color: #a82a36; }
.stall-go[disabled] { background: #d6d8e2; border-color: #c4c8d6; color: #8d93ac; }

.stall-menu .so-menu-h::before { content: '👤 '; }
.stall-menu button img { width: 18px; height: 18px; image-rendering: pixelated; vertical-align: -4px; margin-right: 5px; }
.stall .stall-x { box-shadow: none !important; background: transparent !important; border: 0 !important; }
.stall .stall-x:hover { background: #ffe8e4 !important; }

/* css/craft.css?v=1 */
/* NPC 交換商店 / 物品組合 (game.js craftBody), compact rows (2026-11-23, user: 太雜了 簡潔一點 手機板畫面沒那麼大) */
#win-exchange, #win-compound { width: min(460px, calc(100vw - 12px)); }
#win-exchange .win-body, #win-compound .win-body { padding: 8px 10px; max-height: min(74vh, 640px); }
.cxw { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cx-tool { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; position: sticky; top: -8px; z-index: 2; padding: 4px 0; background: var(--panel, #f7f9ff); }
.cx-tool > b { font-size: 14px; color: #0f7a6a; }
.cx-tool > small { color: #8a8ea6; font-size: 11.5px; }
.cx-tool input[data-pnfilter] { flex: 1 1 90px; min-width: 70px; padding: 4px 8px; font-size: 12.5px; border: 1px solid #d8dcea; border-radius: 7px; }
.cx-tool label { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: #5a5f7e; white-space: nowrap; }
.cx-list { display: flex; flex-direction: column; gap: 4px; }
.cx-list.only-ok > .cx.off, .cx[hidden] { display: none; }
.cx { display: flex; align-items: center; gap: 7px; padding: 4px 6px; background: #fff; border: 1px solid #e3e6f1; border-radius: 8px; min-width: 0; }
.cx.ok { border-left: 3px solid #3cb371; }
.cx.off { background: #fafbfd; }
.cx-out { position: relative; width: 34px; height: 34px; flex: none; display: grid; place-items: center; }
.cx-out .it-ic { width: 32px !important; height: 32px !important; }
.cx-out em { position: absolute; right: -3px; bottom: -3px; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: rgba(20, 60, 50, .85); border-radius: 6px; padding: 0 3px; line-height: 13px; }
.cx-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-mid > b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-p { font-size: 10.5px; font-weight: 700; color: #c07a10; }
.cx-need { display: flex; flex-wrap: wrap; gap: 3px 6px; }
.cx-m { display: inline-flex; align-items: center; gap: 1px; font-size: 10.5px; color: #4a7a5a; font-variant-numeric: tabular-nums; }
.cx-m .it-ic { width: 18px !important; height: 18px !important; }
.cx-m i { font-style: normal; }
.cx-m.short { color: #c0392b; font-weight: 700; }
.cx-m.gold { color: #9a5b0c; gap: 3px; }
.cx-m .coin { width: 11px; height: 11px; }
.cx-act { flex: none; display: flex; align-items: center; gap: 3px; }
.cx-act input { width: 46px; padding: 3px 4px; font-size: 12px; border: 1px solid #d8dcea; border-radius: 6px; }
.cx-max { min-height: 28px; padding: 1px 6px; font-size: 11px; border-radius: 6px; background: #eef0f8; border: 1px solid #d8dcea; color: #4b5280; }
.cx-go { min-width: 50px; min-height: 30px; padding: 2px 10px; border-radius: 8px; font-weight: 700; color: #fff; background: #13927e; border: 1px solid #0f7a6a; }
.cx-go[disabled] { background: #eceef4; border-color: #dde0ea; color: #a4a8bc; font-weight: 600; }
.cx-none { padding: 12px; text-align: center; color: #9a9bb2; font-size: 12px; }
.cx-tip { margin: 0; font-size: 11px; color: #9a9bb2; }

/* css/dummy.css?v=2 */
/* 傷害測試場的「傷害統計」小面板（js/dummy.js），只在 fd28f 出現；右側、小地圖下面。 */
#dmy-panel { position: fixed; right: 10px; top: 250px; z-index: 7; width: 300px; max-height: calc(100vh - 270px); overflow-y: auto;
  padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .94); box-shadow: 0 6px 20px rgba(10, 16, 40, .28); }
#dmy-panel .pn { gap: 6px; }
#dmy-panel .pn-hero { padding: 5px 8px; gap: 6px; }
#dmy-panel .pn-emb { width: 28px; height: 28px; }
#dmy-panel .pn-emb img { max-width: 22px; max-height: 22px; }
#dmy-panel .pn-stats { grid-template-columns: 1fr 1fr; }
#dmy-panel .pn-stats b.gold { font-size: 15px; }
/* each box: the label on top, the number under it, both one line (2026-11-23, user: big numbers broke into several lines,
   即時 DPS even one digit a line) */
#dmy-panel .pn-stats > div { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-width: 0; }
#dmy-panel .pn-stats > div > span, #dmy-panel .pn-stats > div > b { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums; }
#dmy-panel .pn-stats > div > span { font-size: 11px; line-height: 14px; }
#dmy-panel .pn-stats > div > b { font-size: 13.5px; line-height: 18px; text-align: left; }
#dmy-panel .pn-stats > div > b.gold { font-size: 15px; }
#dmy-panel .pn-side b, #dmy-panel .pn-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dmy-panel .pn-hero button { white-space: nowrap; }
#dmy-panel .dmy-kinds { gap: 4px; }
#dmy-panel .pn-item { padding: 4px 8px; }
#dmy-panel .pn-main { flex: 1; min-width: 0; }
#dmy-panel .pn-main b, #dmy-panel .pn-side b { display: block; font-size: 12.5px; }
#dmy-panel .pn-main small, #dmy-panel .pn-side small { display: block; font-size: 10.5px; color: var(--pn-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dmy-panel .pn-side { text-align: right; flex: none; }
#dmy-panel .pn-tip { font-size: 11px; color: var(--pn-sub); }
#dmy-panel.min { width: auto; padding: 0; background: none; box-shadow: none; overflow: visible; }
#dmy-panel .dmy-pill { display: flex; align-items: center; gap: 5px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer;
  padding: 5px 11px 5px 7px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(20, 26, 48, .8); }
#dmy-panel .dmy-pill img { width: 20px; height: 20px; }
#dmy-panel .dmy-pill b { color: #ffd35b; font-variant-numeric: tabular-nums; }
@media (max-height: 520px) {   /* landscape phones: smaller, higher up */
  #dmy-panel { top: 150px; width: 250px; max-height: calc(100vh - 160px); padding: 6px; }
  #dmy-panel .pn-tip, #dmy-panel .pn-main small { display: none; }
  #dmy-panel .pn-stats > div { padding: 2px 8px; }
}

/* css/balance.css?v=1 */
/* 場地職業平衡規則 (js/balance.js): the icon beside the map name, and its pop-up */
#bal-ic { flex: none; width: 18px; height: 18px; padding: 0; border: 1px solid #e0a040; border-radius: 4px; background: #fff4dc; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
#bal-ic img { width: 14px; height: 14px; display: block; }
#bal-ic:hover { background: #ffe3a8; }
.bal-pop p { margin: 0 0 8px; }
.bal-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 6px 8px; margin: 0 0 6px; border-radius: 6px; background: rgba(255, 200, 90, .14); border: 1px solid rgba(224, 160, 64, .45); }
.bal-row b { grid-row: span 2; align-self: center; }
.bal-row em { font-style: normal; font-weight: bold; color: #d0482a; }
.bal-sub { font-size: 12px; opacity: .8; }

/* css/ui.css?v=40 */
/* 卡巴拉島網頁版 — HUD layout, the 選單 window, the hotkey window and the phone layout (js/ui.js).
   Loaded after every other stylesheet: the rules here replace the older positions in style.css. */
:root { --tap: 44px; --gap: 12px; --kbd-bg: #fff; --kbd-ink: #4a5070; --kbd-edge: #b9c0d8; }
body { -webkit-tap-highlight-color: transparent; }
#game { touch-action: manipulation; }
#world { touch-action: none; }

/* every hotkey badge in the HUD */
.hud kbd { position: absolute; font: bold 9px/13px system-ui, sans-serif; min-width: 14px; padding: 0 3px; text-align: center; border-radius: 4px;
  background: var(--kbd-bg); color: var(--kbd-ink); border: 1px solid var(--kbd-edge); text-shadow: none; pointer-events: none; white-space: nowrap; }
.hud kbd:empty { display: none; }
#quick kbd, #hotbar kbd, #menu kbd { top: auto; left: auto; right: auto; bottom: auto; transform: none; }

/* ---------- top-left: status, then the rail ---------- */
#status { left: var(--gap); top: 10px; }
#side-buttons { left: var(--gap); top: 92px; gap: 20px; align-items: center; width: 46px; }
#side-buttons .round, #side-buttons .round.small { position: relative; width: 40px; height: 40px; margin: 0; font-size: 18px; flex: 0 0 auto; }
#side-buttons .round img { max-width: 28px; max-height: 28px; image-rendering: pixelated; }
#side-buttons .round::after { content: attr(data-cap); position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%); font-size: 10px; line-height: 12px;
  color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; white-space: nowrap; pointer-events: none; }
#side-buttons .round:hover { background: rgba(90, 123, 240, .75); }
#side-buttons .round.on { background: #e0a030; box-shadow: 0 0 10px #ffcc55; }
#side-buttons .round .pip { top: -3px; right: -3px; }
/* one order, whoever added the button first */
#toggle-tracker { order: 1; } #party-btn { order: 2; } #ap-btn { order: 3; }
/* sound and logout live in 選單; 信箱 on the top bar (js/ui.js TOP); 挖掘 on the shortcut bar */
#side-buttons #bgm-btn, #side-buttons #sfx-btn, #side-buttons #logout-btn, #side-buttons #mail-btn, #side-buttons #dig-btn { display: none; }
/* the top bar's buttons the player took off (js/ui.js TOP) */
#menu > button.top-off { display: none !important; }
/* 收起／展開 (js/ui.js #menu-fold): folds the top bar to 選單 alone, on every screen (user asked for it back on the PC) */
#menu > #menu-fold { display: flex; }
#menu.folded > button:not(#menu-fold):not(#menu-btn) { display: none; }
#tracker { left: 70px; top: 112px; }   /* under the state icons (#buffs) */

/* ---------- top: notice between the status and the menu ----------
   js/ui.js stackTop() lays out the top of the screen a few times a second (2026-11-21, user: 活動公告遮擋地圖、公會對戰
   倒數與怪物血量視窗重疊): the hint line (#notice) and the GM's notices (#gm-banner) in the row between the status
   block and the menu, the match bar (#so-hud), the target window (#target-frame) and invitations (#so-asks) one under
   the other below the menu, the event-rate tag (#gm-rate) under the minimap. It sets their top / left; the values
   here are only where they start. */
#notice { top: 12px; max-width: max(260px, calc(100vw - 800px)); }
@media (max-width: 1180px) { #notice { top: 66px; max-width: calc(100vw - 640px); } }
/* the GM's notices (js/gmnet.js, whose own style comes later in the page, hence "html body"): one slim line each,
   longer ones scroll through (js/ui.js runLong); they used to be big boxes 54 px from the top, over the map and the
   target window, three at a time */
html body #gm-banner { top: 8px; width: min(640px, calc(100vw - 32px)); gap: 4px; }
/* bigger and brighter (user 2026-11-26 「gm公告 稍微改大一點醒目一點」): 16 px bold, gold edge, a glow that pulses 3 times
   when it comes in, the [公告] tag as a dark pill */
html body #gm-banner .gmb { max-width: 100%; box-sizing: border-box; padding: 4px 16px; border-radius: 16px; font: 700 16px/26px "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; letter-spacing: .5px; text-shadow: 0 1px 2px #000b;
  border: 1px solid #ffe08acc; box-shadow: 0 0 0 1px #0007, 0 0 12px #ffd36a66, 0 3px 10px #0007;
  animation: gmb-in .35s ease-out, gmb-glow 1.2s ease-in-out .35s 3; }
@keyframes gmb-glow { 50% { box-shadow: 0 0 0 2px #ffe08a, 0 0 24px #ffd36acc, 0 3px 10px #0007; filter: brightness(1.18); } }
html body #gm-banner .gmb b { color: #ffe9a8; background: #0005; padding: 0 8px; border-radius: 10px; margin-right: 8px; }
html body #gm-banner .gmb.run { text-overflow: clip; text-align: left; }
html body #gm-banner .gmb:not(.run) { text-align: center; }   /* a notice that fits sits in the middle of its box */
html body #gm-banner .gmb .gmb-in { display: inline-block; }
/* .gmb.run .gmb-in: the marquee is run by js/ui.js mqPass (one way, right to left, again and again; 2026-11-27) */
/* the event-rate tag: under the minimap (js/ui.js), no longer over its picture */
html body #gm-rate { top: 260px; }
/* the total EXP / TM rates under the event tag, right of the status block (js/ui.js rateSum / stackTop) */
/* one line (2026-11-21, user: 不寫總加成 活動加成直接寫在一起 旁邊註明): 經驗 n% · TM n%, and while a GM event runs
   the line turns gold-edged with a small 「含…」 note at its end */
#rate-sum { position: fixed; top: 10px; left: 220px; z-index: 10;   /* under the windows (.win z 20+); user 2026-11-25 「其他視窗可以蓋掉她」 */
 pointer-events: none; white-space: nowrap; display: flex; align-items: center; gap: 8px;
  font: 600 12px/18px "Microsoft JhengHei", "Noto Sans TC", sans-serif; color: #fff; padding: 0 2px;
  /* 2026-11-27 (user: 「底色拿掉只留字 … 字可能要換色 要看得到」): no box, the letters carry a black outline instead so
     they read on any map */
  background: none; border: 0; box-shadow: none;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 3px #000, 0 0 3px #000; }
#rate-sum > span:not(:last-of-type)::after { content: ''; display: inline-block; width: 1px; height: 10px; margin-left: 8px; background: #ffffffa0; box-shadow: 0 0 2px #000; vertical-align: -1px; }
#rate-sum b { color: #ffe95a; font-size: 13px; }
#rate-sum.ev b { color: #ffd23a; }
#rate-sum i { font-style: normal; font-size: 11px; font-weight: 700; color: #ff9f2e; padding: 0; background: none; }
/* the menu row stays above it when they meet (user: 「不要蓋到選單列 壓到的話選單要在上面」); still under the windows (z 20+) */
#menu { z-index: 11; }
@media (max-width: 900px), (max-height: 540px) {
  html body #gm-banner .gmb { font-size: 14px; line-height: 22px; padding: 2px 12px; letter-spacing: 0; }
  html body #gm-banner .gmb b { padding: 0 6px; margin-right: 6px; }
  html body #gm-rate { font-size: 11px; padding: 2px 8px; }
  #rate-sum { font-size: 11px; gap: 6px; padding-left: 8px; }
  #rate-sum b { font-size: 12px; }
  #rate-sum i { font-size: 10px; padding: 0 6px; }
}

/* ---------- top-right menu ---------- */
#menu { right: 10px; top: 4px; gap: 2px; }
#menu button { width: 50px; height: 56px; padding-bottom: 2px; border-radius: 10px; }
/* readable on bright maps (2026-12-04 UI 檢查 第 2 項: white labels vanished on snow): a full 1 px dark edge, as the chat's */
#menu button span:not(.hamb), #rate-sum {
  text-shadow: 1px 0 0 rgba(6, 8, 18, .85), -1px 0 0 rgba(6, 8, 18, .85), 0 1px 0 rgba(6, 8, 18, .85), 0 -1px 0 rgba(6, 8, 18, .85), 0 1px 3px rgba(0, 0, 0, .55); }
#menu button:hover { background: rgba(255, 255, 255, .14); }
#menu button img { max-height: 36px; max-width: 40px; image-rendering: pixelated; }
#menu button kbd { top: 1px; right: 2px; }
#menu .pip { top: 0; right: auto; left: 4px; }
#menu .pip.red { left: 6px; top: 4px; }
#menu .hamb { font-size: 24px; line-height: 30px; }
#minimap { top: 64px; }

/* ---------- item quick bar: one row, bottom centre ---------- */
#hotbar { left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px 5px; border-radius: 10px;
  background: rgba(20, 26, 48, .45); box-shadow: var(--shadow); }
#hotbar .qs { position: relative; width: 46px; height: 46px; border-radius: 8px; font-size: 18px; background: rgba(180, 190, 215, .55); }
#hotbar .qs:hover { border-color: #ffe08a; }
#hotbar .qs img { max-width: 32px; max-height: 32px; }
#hotbar .qs kbd { top: -7px; left: 50%; transform: translateX(-50%); }
#hotbar .qs small { right: 2px; bottom: 1px; }
#hotbar .qs[data-key="F3"] { background: rgba(150, 200, 240, .55); }

/* ---------- action pad: attack in the corner, skills on an arc (radius 112 around its centre) ---------- */
#quick { right: 14px; bottom: 14px; width: 230px; height: 230px; transform: none; }
/* only its buttons take taps: the empty box itself used to cover the right end of the full shortcut bar */
#quick { pointer-events: none; }
#quick > * { pointer-events: auto; }
#quick .attack { right: 0; bottom: 0; top: auto; left: auto; width: 92px; height: 92px; }
#quick .attack img { width: 54px; }
#quick .attack kbd { bottom: 4px; left: 50%; transform: translateX(-50%); }
#quick .sk { width: 56px; height: 56px; top: auto; left: auto; }
#quick .sk img { max-width: 34px; }
#quick .sk kbd { right: -3px; bottom: -3px; font-size: 10px; }
#quick .sk.s1 { right: 130px; bottom: 18px; }
#quick .sk.s2 { right: 97px; bottom: 97px; }
#quick .sk.s3 { right: 18px; bottom: 130px; }
#quick .page { right: 4px; bottom: 194px; top: auto; height: 30px; padding: 0 2px 0 8px; gap: 4px; border-radius: 15px; background: rgba(20, 26, 48, .45); }
#quick .page span { display: inline-block; background: none; width: auto; height: auto; border-radius: 0; font-weight: bold; font-size: 11px; white-space: nowrap; }
#quick .page span::after { content: " / 2"; font-weight: normal; opacity: .8; }
.has-bar #quick .page span::after { content: " / 4"; }
#quick .page button { position: relative; width: 26px; height: 26px; font-size: 13px; }
#quick .page button kbd { top: -9px; right: -6px; }
#quick .sk:hover, #quick .attack:hover { filter: brightness(1.08); }

/* ---------- the shortcut bar (js/bar.js): slots that hold a skill, an item, a piece of equipment or an action ---------- */
.has-bar #quick .sk { display: none; }
.bs { position: relative; display: grid; place-items: center; padding: 0; color: #fff; border: 2px solid #fff; background: rgba(150, 165, 200, .55);
  box-shadow: var(--shadow); touch-action: none; -webkit-user-drag: element; }
.bs img { max-width: 32px; max-height: 32px; image-rendering: pixelated; pointer-events: none; }
.bs .g { font-size: 20px; line-height: 1; }
.bs .plus { font-size: 18px; opacity: .55; }
.bs small { position: absolute; right: 2px; bottom: 1px; font: bold 10px/12px system-ui, sans-serif; padding: 0 3px; border-radius: 3px; background: rgba(0, 0, 0, .55); color: #fff; }
/* 2026-12-02 「破圖了」: the round slots' gray text colour (css/fbtn.css) reached the count, gray on the dark box = a gray square */
.bs em { position: absolute; left: 1px; bottom: 1px; font: bold 9px/11px system-ui, sans-serif; font-style: normal; padding: 0 3px; border-radius: 3px; background: #2f9e55; color: #fff; }
.bs.empty { background: rgba(120, 130, 160, .35); border-style: dashed; }
.bs.off img { filter: grayscale(1); opacity: .55; }
.bs.worn { border-color: #6fe08f; }
.bs:hover { border-color: #ffe08a; }
.bs.drop { border-color: #ffb020; box-shadow: 0 0 0 3px rgba(255, 176, 32, .45); }
.bs:active { transform: scale(.94); }
.bs.cool::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); animation: cool var(--cool-ms, 1.2s) linear forwards; border-radius: inherit; }
.qs.cool::after { animation-duration: var(--cool-ms, 1.2s); }   /* game.js cool(el, ms): the sweep lasts as long as the button is off */
/* a skill's cool time on its slot (js/bar.js cdTick): --cd = share still to wait, 1 → 0 */
.bs.cd::after { content: attr(data-cd); position: absolute; inset: 0; border-radius: inherit; pointer-events: none; display: grid; place-items: center;
  background: conic-gradient(rgba(0, 0, 0, 0) calc((1 - var(--cd, 0)) * 360deg), rgba(0, 0, 0, .62) 0);
  color: #fff; font: bold 13px/1 system-ui, sans-serif; text-shadow: 0 0 3px #000, 0 0 2px #000; }
#quick .bs.arc.cd::after { font-size: 15px; }
/* a skill slot can also carry .cool (game.js cool, the top-down wipe): the round sweep alone shows (user 2026-11-22) */
.bs.cd.cool::after, .bs.cd::after { animation: none; clip-path: none; }
.bs.cd img { filter: saturate(.5); }
.bs.cd-ready { animation: cd-ready .45s ease-out; }
/* a ground skill held to aim (js/skills.js aimStart); dragged back onto its slot = letting go there cancels */
.bs.aiming { border-color: #ffd84a; box-shadow: 0 0 0 3px rgba(255, 216, 74, .55), var(--shadow); transform: scale(.94); }
.bs.aim-cancel { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 90, 90, .6), var(--shadow); }
.bs.aim-cancel::after { content: "✕"; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); color: #ff7a7a; font: bold 22px/1 system-ui, sans-serif; }
@keyframes cd-ready { 0% { box-shadow: 0 0 0 0 rgba(255, 236, 150, .95), var(--shadow); filter: brightness(1.6); } 100% { box-shadow: 0 0 0 10px rgba(255, 236, 150, 0), var(--shadow); filter: none; } }
.bs kbd { top: -7px; left: 50%; transform: translateX(-50%); }
#hotbar .bs kbd { top: -7px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); }
/* compact: three round slots on the arc around the attack button, seven square ones in the row */
#quick .bs.arc { position: absolute; width: 56px; height: 56px; border-radius: 50%; border-width: 3px; background: radial-gradient(circle at 40% 35%, #cfd8ef, #7c8db8); }
#quick .bs.arc img { max-width: 36px; max-height: 36px; }
#quick .bs.arc kbd { right: -3px; bottom: -3px; font-size: 10px; }
#quick .bs.arc small { right: 6px; bottom: 4px; }
#quick .bs.a1 { right: 130px; bottom: 18px; }
#quick .bs.a2 { right: 97px; bottom: 97px; }
#quick .bs.a3 { right: 18px; bottom: 130px; }
/* the outer arc above the attack button (main 4–6): radius 180 round its centre, at 20°, 50° and 80° */
#quick .bs.a4 { right: 187px; bottom: 80px; }
#quick .bs.a5 { right: 134px; bottom: 156px; }
#quick .bs.a6 { right: 49px; bottom: 195px; }
/* the page pill on top, 換目標 (css/target.css, js/target.js) under it (user: swap the two); 換目標 is a round picture
   button since 2026-11-21 (user: no text), right above the outer arc. Phones have their own places (css/mobile.css) */
.has-bar #quick .page { right: 0; bottom: 298px; }
.has-bar #quick .tgt-next { right: 6px; bottom: 254px; }
/* the full layout's six extra slots (25–30): two rows of three above the attack button, clear of the bar beside it */
#quick .bs.f1 { right: 0; bottom: 106px; } #quick .bs.f2 { right: 62px; bottom: 106px; } #quick .bs.f3 { right: 124px; bottom: 106px; }
#quick .bs.f4 { right: 0; bottom: 168px; } #quick .bs.f5 { right: 62px; bottom: 168px; } #quick .bs.f6 { right: 124px; bottom: 168px; }
#hotbar { align-items: center; }
#hotbar .bar-row { display: flex; gap: 6px; }
#hotbar .bar-rows { display: flex; flex-direction: column; gap: 9px; }
#hotbar .bs.sq { width: 46px; height: 46px; border-radius: 8px; }
.bar-full #hotbar { padding-top: 9px; left: max(50%, 584px); }   /* the full bar (≈ 586 px) clear of the EXP line on a narrow desktop */
.bar-full #hotbar .bs.sq { width: 42px; height: 42px; }
.bar-full #hotbar .bar-row { gap: 4px; }
.bar-full #chatlog { bottom: 124px; }
.bar-full #chat-input { bottom: 124px; }
.bar-full #chat-btn { bottom: 122px; }
#game:has(#chat-input.show) .bar-full #chatlog, .bar-full #game:has(#chat-input.show) #chatlog { bottom: 156px; }
.bar-tools { display: flex; flex-direction: column; justify-content: center; gap: 4px; margin-left: 0; }
.bar-tools button { width: 24px; height: 22px; padding: 0; border: 1px solid rgba(255, 255, 255, .8); border-radius: 6px; background: rgba(60, 70, 110, .6); color: #fff; font-size: 12px; }
.bar-tools button:hover { background: var(--accent); }
#hotbar.editing { box-shadow: 0 0 0 2px #ffb020, var(--shadow); }
#hotbar.editing .bs, .editing ~ #quick .bs, body.bar-editing #quick .bs { outline: 2px dashed #ffb020; outline-offset: 1px; }
#hotbar.editing [data-bartool="edit"] { background: #e08a2a; }
.bar-dragging #hotbar, .bar-dragging #quick .bs { box-shadow: 0 0 0 2px #ffb020, var(--shadow); }
/* the picker and the "which slot" windows */
#win-barpick, #win-barput { width: 470px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 5px; max-height: 46vh; overflow: auto; padding: 2px; }
.bp-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 3px 4px; min-height: 66px; border: 1px solid #d3daf3; border-radius: 8px;
  background: linear-gradient(#fff, #eef1fc); color: var(--ink); }
.bp-cell:hover { border-color: var(--accent); }
.bp-cell.on { border-color: #e08a2a; box-shadow: 0 0 0 2px rgba(224, 138, 42, .35); }
.bp-cell.dim { opacity: .55; }
.bp-cell img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.bp-cell .g { font-size: 22px; line-height: 32px; }
.bp-cell span { font-size: 11px; line-height: 1.2; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bp-cell small, .bp-cell em { position: absolute; top: 2px; right: 3px; font-size: 10px; font-style: normal; color: var(--sub); }
.bp-cell em { color: #2f9e55; }
.bp-what { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bp-what img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.bp-slots { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.bp-slot { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1px solid #c9d0ec; border-radius: 6px; background: #eef1fb; color: var(--sub); }
.bp-slot img { max-width: 80%; max-height: 80%; image-rendering: pixelated; }
.bp-slot.empty { border-style: dashed; background: #fff; }
.bp-slot:hover { border-color: #e08a2a; background: #fff6e0; }
.bp-slot kbd { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font: 9px/11px system-ui, sans-serif; padding: 0 2px; border-radius: 3px; background: #fff; border: 1px solid #c9d0ec; color: var(--sub); }

/* ---------- bottom-left: exp, buffs, chat ---------- */
#exp { left: var(--gap); bottom: 12px; }
/* states (skill icons, item effects) under the gold line of the status block, as on phones (user): pictures only — the
   EXP / TM bonus chips and the text-only state chips are not shown; one row, clipped */
#buffs { left: 84px; top: 86px; bottom: auto; flex-wrap: nowrap; max-width: 260px; overflow: hidden; gap: 3px; }
#buffs > .buff, #buffs > small, #buffs .buff:not(:has(img)), #ts-states > small { display: none; }
/* 卷軸 BUFF (js/useitems.js scrollRow, 2026-11-25 user: 「卷軸BUFF顯示在補助BUFF下方 上限使用五張」): its own row under the
   states; the tracker and the left buttons moved down to make room (user: 「左側任務UI也下移到貼齊任務框」) */
#scroll-buffs { position: absolute; left: 84px; top: 110px; display: flex; gap: 3px; z-index: 6; pointer-events: auto; }
#scroll-buffs .sc-ic { position: relative; display: inline-block; width: 20px; height: 20px; flex: none; border-radius: 4px; background: rgba(255, 246, 214, .9);
  box-shadow: 0 0 0 1px #ffd84a, 0 1px 3px rgba(0, 0, 0, .5); }
#scroll-buffs .sc-ic img { width: 20px !important; height: 20px !important; display: block; border-radius: 4px; object-fit: contain; margin: 0; }
#scroll-buffs .sc-ic small { position: absolute; right: -2px; bottom: -3px; font: bold 8px/9px system-ui, sans-serif; padding: 0 1px; border-radius: 3px;
  background: rgba(0, 0, 0, .7); color: #fff; }
#tracker { top: 136px; }
#side-buttons { top: 136px; }
#chatlog, #chat-input { left: 58px; width: min(420px, calc(50vw - 262px)); }   /* clear of the centred shortcut row (≈ 396 px) */
#chatlog { bottom: 46px; }
#chat-input { bottom: 46px; }
#chat-btn { left: var(--gap); bottom: 44px; width: 38px; height: 38px; font-size: 16px; }

/* ---------- windows ---------- */
.win { max-width: calc(100vw - 16px); }
.win-head { touch-action: none; user-select: none; }
.win-head button { width: 24px; height: 24px; border-radius: 6px; font-size: 13px; }
.win-head kbd { font: bold 10px/14px system-ui, sans-serif; padding: 0 4px; border-radius: 4px; background: #fff; color: var(--sub); border: 1px solid #c9d0ec; font-weight: normal; }

/* the 選單 window: every feature, by group */
#win-menu { width: 452px; }
.ui-group { margin: 2px 0 10px; }
.ui-group h4 { margin: 0 0 6px; font-size: 12px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.ui-group h4::after { content: ""; flex: 1; height: 1px; background: #dfe3f5; }
.ui-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ui-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 6px; min-height: 76px; border: 1px solid #d3daf3;
  border-radius: 10px; background: linear-gradient(#fff, #eef1fc); color: var(--ink); }
.ui-tile:hover { border-color: var(--accent); background: #fff; }
.ui-tile .ui-ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #e3e8fb; font-size: 19px; line-height: 1; }
.ui-tile .ui-ic img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
#win-menu .win-body { max-height: min(78vh, 640px); }
.ui-tile b { font-weight: normal; font-size: 12px; white-space: nowrap; }
.ui-tile kbd { position: absolute; top: 4px; right: 4px; font: 10px/14px system-ui, sans-serif; padding: 0 4px; border-radius: 4px; background: #fff; color: var(--sub); border: 1px solid #c9d0ec; }
.ui-tile .ui-st { font-size: 10px; padding: 0 6px; border-radius: 8px; background: #dfe3f5; color: var(--sub); }
.ui-tile.on .ui-st { background: #3fbf72; color: #fff; }
.ui-tile.on .ui-ic { background: #d8f5e2; }
.ui-tile[disabled] { opacity: .45; cursor: default; }
/* 選單 › 自訂: pin a tile to the top bar, hide it from the menu, order the top bar */
.ui-edit-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.ui-edit-bar .sub { margin: 0; flex: 1; min-width: 160px; }
.ui-edit-bar button { border: 1px solid #c9d0ec; background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.ui-edit-bar button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ui-top-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 8px; border: 1px dashed #c9d0ec; border-radius: 10px; min-height: 44px; }
.ui-top-item { display: flex; align-items: center; gap: 2px; padding: 2px 4px; border-radius: 8px; background: #eef1fc; font-size: 12px; }
.ui-top-item img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; }
.ui-top-item button { border: 0; background: none; cursor: pointer; padding: 2px 4px; font-size: 12px; color: var(--sub); border-radius: 4px; }
.ui-top-item button:hover { background: #dfe3f5; color: var(--accent); }
.ui-tile.editing { cursor: default; }
.ui-tile.hid { opacity: .45; }
/* 自訂 mode: the two flags share the tile's width (2026-11-27, user's phone photo: 「Ui介面各種重疊」 — with the phone
   button rules (min-height 34, nowrap, bevel padding) they grew wider than the tile and covered the next tiles) */
.ui-tile .ui-flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)); gap: 3px; width: 100%; min-width: 0; }
.ui-tile .ui-flags button { border: 1px solid #c9d0ec; background: #fff; border-radius: 6px; padding: 1px 2px; font-size: 11px; cursor: pointer; color: var(--sub);
  min-width: 0; min-height: 22px !important; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.ui-tile.editing { min-width: 0; overflow: hidden; }
.ui-tile .ui-flags button.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* the hotkey list (a section of 設定) */
.kb-tip { margin: 0 0 6px; }
.kb-group { margin: 10px 0 4px; font-weight: bold; color: var(--accent); }
.kb-row { display: grid; grid-template-columns: 1fr 86px 86px; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 6px; }
.kb-row:hover { background: #f3f5ff; }
.kb-row button { height: 28px; border: 1px solid #c9d0ec; border-radius: 6px; background: #fff; color: var(--ink); font: bold 12px system-ui, sans-serif; padding: 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-row button:hover { border-color: var(--accent); }
.kb-row button.none { color: #b4bad3; font-weight: normal; }
.kb-row button.wait { background: #fff4d6; border-color: #f0a830; color: #b06a00; animation: kbwait 1s infinite; }
.kb-row button.flash { background: #ffe1e1; border-color: #e05656; }
@keyframes kbwait { 50% { background: #ffe7a8; } }
.kb-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.kb-foot button, .ui-foot button { border: 2px solid #fff; background: var(--accent); color: #fff; border-radius: 14px; padding: 5px 16px; box-shadow: var(--shadow); }
.kb-foot button.alt { background: #fff; color: #3a4170; border-color: #c2c9e4; }

/* the 設定 page (js/ui.js settingsBody): section column on the left, one scrolling page on the right */
#win-settings { width: 560px; }
#win-settings > .win-body { padding: 0; max-height: none; overflow: hidden; }
/* .stg-* (設定), never a bare .st or status.css's .st-row / .st-l / .st-foot: .qrow .st is the 「前往 ›」 label of the teleport / quest / NPC lists (2026-11-22: a bare
   .st here made every such row 600 px tall — 「傳送功能變得空白一堆」) */
.stg-wrap { display: flex; height: min(76vh, 620px); color: var(--ink); font-size: 13px; }
.stg-wrap .stg-nav { flex: none; width: 104px; display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; background: #eef1fc; border-right: 1px solid #dfe3f5; }
.stg-wrap .stg-nav button { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--sub); cursor: pointer; text-align: left; }
.stg-wrap .stg-nav button img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; }
.stg-wrap .stg-nav button span { width: 20px; text-align: center; font-size: 15px; }
.stg-wrap .stg-nav button b { font-size: 13px; white-space: nowrap; }
.stg-wrap .stg-nav button:hover { background: #fff; color: var(--ink); }
.stg-wrap .stg-nav button.on { background: #fff; border-color: #c9d0ec; color: var(--accent); box-shadow: 0 1px 3px rgba(40, 50, 110, .12); }
.stg-wrap .stg-page { position: relative; flex: 1; min-width: 0; overflow-y: auto; padding: 4px 12px 10px; scroll-behavior: auto; }
.stg-wrap .stg-sec { padding: 8px 0 12px; border-bottom: 1px solid #e6e9f6; }
.stg-wrap .stg-sec:last-of-type { border-bottom: 0; }
.stg-wrap .stg-sec h4 { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; font-size: 14px; color: var(--accent); }
.stg-wrap .stg-sec h4 img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; }
.stg-wrap .stg-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 0 0 6px; border: 1px solid #dfe3f5; border-radius: 10px; background: linear-gradient(#fff, #f6f8ff); }
.stg-wrap .stg-l { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.stg-wrap .stg-l b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.stg-wrap .stg-l kbd { font: 10px/14px system-ui, sans-serif; padding: 0 4px; border-radius: 4px; background: #fff; color: var(--sub); border: 1px solid #c9d0ec; font-weight: normal; }
.stg-wrap .stg-l small { color: var(--sub); font-size: 11.5px; }
.stg-wrap .stg-c { flex: none; display: flex; align-items: center; }
.stg-wrap .stg-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: #e3e8fb; }
.stg-wrap .stg-seg button { min-width: 52px; height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--sub); font-size: 12.5px; cursor: pointer; }
.stg-wrap .stg-seg button.on { background: var(--accent); color: #fff; font-weight: bold; box-shadow: 0 1px 3px rgba(40, 50, 110, .25); }
.stg-wrap .stg-btn { height: 30px; padding: 0 10px 0 12px; border: 1px solid #c9d0ec; border-radius: 8px; background: #fff; color: var(--ink); font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.stg-wrap .stg-btn:hover { border-color: var(--accent); color: var(--accent); }
.stg-wrap .stg-btn i { font-style: normal; color: var(--sub); }
.stg-wrap .stg-sec .vol-list { margin-bottom: 4px; }
.stg-wrap .stg-sec .kb-tip { margin: 0 0 4px; }
.stg-wrap .stg-foot { margin: 8px 0 0; text-align: center; }
@media (max-width: 600px) {
  .stg-wrap { flex-direction: column; height: calc(100dvh - 60px); }
  .stg-wrap .stg-nav { width: auto; flex-direction: row; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid #dfe3f5; }
  .stg-wrap .stg-nav button { flex: none; }
}
@media (max-height: 540px) { .stg-wrap { height: calc(100dvh - 50px); } }

/* ---------- touch screens: bigger targets, no key badges ---------- */
@media (hover: none), (pointer: coarse) {
  .hud kbd, .ui-tile kbd, .win-head kbd { display: none; }
  .win-head { padding: 7px 10px; }
  .win-head button { width: 34px; height: 34px; font-size: 16px; }
  .qrow { min-height: var(--tap); }
  .win-body button, .win-body select, .win .search { min-height: 34px; }
  .sk-put button { width: 32px !important; height: 32px !important; }
  .it-quick button { min-width: 40px; }
  .tabs b, .it-tabs b { padding: 6px 12px; }
  .dlg-actions button { padding: 9px 18px; font-size: 14px; }
  .mm-btn { width: 32px; height: 32px; }
  #mm-tp, #mm-fold { min-width: 30px; min-height: 26px; font-size: 16px; }
  #page-next kbd { display: none; }
}
/* the same on every phone the game itself counts as one (js/mobile.js: touch + short side < 600 → html.phone), also
   when its browser reports hover / a fine pointer (2026-12-04 optimisation round, items 1–3: key badges at 7–9 px, a
   22 px window ✕ and 14–24 px HUD buttons were measured on such a phone) */
html.phone .hud kbd, html.phone .ui-tile kbd, html.phone .win-head kbd, html.phone #page-next kbd, html.phone #hotbar .qs kbd { display: none; }
/* small HUD buttons keep their (compact, chosen) look; an invisible ring around each makes it easier to hit: 4 px with a
   mouse (item 4: 任務追蹤 ◐ 🧭 ≡ 22×18, 小地圖 傳送 / 收合 18×16), 8 px on a phone (~34 px to a finger) */
/* (buttons side by side only grow up and down: a ring reaching into the neighbour would take its clicks) */
#mm-tp, #mm-fold, #tracker .trk-head button { position: relative; }
#mm-tp::after, #mm-fold::after, #tracker .trk-head button::after { content: ''; position: absolute; inset: -4px -1px; }
html.phone #mm-tp::after, html.phone #mm-fold::after, html.phone #tracker .trk-head button::after { inset: -9px -1px; }
html.phone #ts-cam::after { content: ''; position: absolute; inset: -8px; }
/* the window ✕ stays the compact 22 px of css/compact.css (the phone's chosen look); a ring makes it ~34 px to a finger
   (換頁 ⇅ needs none: its whole 40 px disc is its target, css/fbtn.css) */
html.phone .win-head button { position: relative; }
html.phone .win-head button::after { content: ''; position: absolute; inset: -6px; }
/* computers (js/mobile.js html.pc, 2026-12-04 user: 「電腦不顯示觸控按鈕」): the round touch pad is not shown — 攻擊 Space,
   AUTO G, 挖地 D, 換目標 Tab, 換頁 the wheel / keys; its skill slots are in the bottom bar (js/bar.js). The help angel stays. */
html.pc #quick > button, html.pc #quick > .page, html.pc #quick > .bs { display: none !important; }
/* the corner the pad used is free: the bar sits there (centred, 12 slots wide, it ran over the EXP line and 鏡頭) */
html.pc #hotbar, html.pc body.bar-full #hotbar, html.pc body.bar-compact #hotbar { left: auto; right: 12px; transform: none; margin-right: 0; }
html.pc #hotbar .bar-row3 { justify-content: flex-end; }
html.pc #hotbar .bar-sep { flex: none; width: 2px; align-self: stretch; margin: 4px 3px; border-radius: 1px; background: rgba(255, 255, 255, .45); }

/* ---------- small screens (phones, small tablets) ---------- */
@media (max-width: 900px), (max-height: 540px) {
  :root { --gap: 8px; }
  #status { top: 6px; }
  .portrait { width: 46px; height: 46px; }
  .badge.tm { top: 50px; }
  .bar { width: 120px; }
  .money { display: none; }
  #side-buttons { top: 80px; gap: 8px; }
  #side-buttons .round::after { display: none; }
  #tracker { display: block; left: 58px; top: 72px; width: 210px; font-size: 11px; }
  #notice, #buffs { display: none; }

  #menu { right: 4px; top: 2px; gap: 0; }
  #menu .m-wide { display: none; }
  #menu button { width: 46px; height: 48px; }
  #menu button span, #menu .chev { display: block; }
  #menu button span:not(.hamb) { font-size: 10px; line-height: 13px; }
  #menu .hamb { font-size: 22px; line-height: 26px; }
  #clock { display: none; }
  #menu button img { max-height: 26px; }
  #minimap { top: 52px; right: 6px; width: 156px; }
  .mm-body { height: 104px; }
  .mm-btn.tl, .mm-btn.br1 { display: none; }
  .mm-btn.br2 { right: 42px; }

  #exp { font-size: 10px; bottom: 6px; left: 6px; padding: 2px 8px; }
  #chatlog, #chat-input { left: 54px; width: max(140px, calc(50vw - 225px)); }
  #chatlog { bottom: 30px; max-height: 96px; }
  #chat-input { bottom: 30px; }
  #chat-btn { display: block; left: 8px; bottom: 30px; width: 40px; height: 40px; }

  #hotbar { bottom: 6px; gap: 4px; padding: 4px; }
  #hotbar .qs, #hotbar .bs.sq { width: 42px; height: 42px; }
  #hotbar .qs kbd { display: none; }
  #hotbar .bar-row { gap: 4px; }
  .bar-full #hotbar { left: calc(50% - 70px); padding-top: 4px; }
  .bar-full #hotbar .bs.sq { width: 34px; height: 34px; }
  .bar-full #hotbar .bs img { max-width: 26px; max-height: 26px; }
  .bar-full #hotbar .bar-rows { gap: 4px; }
  .bar-full #hotbar .bar-row { gap: 3px; }
  .bar-tools button { width: 32px; height: 30px; font-size: 14px; }
  .bp-slots { grid-template-columns: repeat(6, 1fr); }
  #quick { right: 6px; bottom: 6px; transform: scale(.86); transform-origin: right bottom; }

  /* a window keeps its own width and is placed / dragged by js/ui.js (phones play landscape); only its height follows the screen */
  .win { max-width: calc(100vw - 12px); }
  .win-body { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); }
  #win-menu .ui-tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .kb-row { grid-template-columns: 1fr 76px 76px; }
  #dialog { bottom: 6px; }
  .dlg-box { left: 0; max-height: 70vh; }
  #dlg-illu { display: none; }
}

/* narrow screens held upright (tablets, desktop windows; phones are landscape only): every window in the same full-width place */
@media (max-width: 900px) and (orientation: portrait) {
  .win { left: max(6px, calc(50vw - 280px)) !important; right: max(6px, calc(50vw - 280px)); top: 6px !important; width: auto !important; max-width: none; }
}
/* phones held upright: the item row goes above the pad, the chat above that */
@media (max-width: 700px) and (orientation: portrait) {
  #hotbar { left: auto; right: 6px; transform: none; bottom: 206px; }
  .bar-full #hotbar { left: auto; }
  .bar-full #hotbar .bar-row { display: grid; grid-template-columns: repeat(6, 34px); }
  .bar-full #chatlog { bottom: 390px; }
  #chatlog, #chat-input { width: calc(100vw - 16px); }
  #chatlog { bottom: 262px; max-height: 84px; }
  #chat-input { bottom: 262px; }
  #chat-btn { right: auto; left: 8px; bottom: 34px; }
  #tracker { width: calc(100vw - 230px); min-width: 150px; }
  #minimap { width: 132px; }
  .mm-body { height: 96px; }
}

/* very short landscape phones */
@media (max-height: 420px) {
  #quick { transform: scale(.78); }
  #side-buttons { gap: 6px; }
  #side-buttons .round, #side-buttons .round.small { width: 38px; height: 38px; }
}

/* the chat log moves up while the input line is open */
#game:has(#chat-input.show) #chatlog { bottom: 78px; }
@media (max-width: 900px), (max-height: 540px) { #game:has(#chat-input.show) #chatlog { bottom: 64px; } }
@media (max-width: 700px) and (orientation: portrait) { #game:has(#chat-input.show) #chatlog { bottom: 296px; } }

/* ---------- 音量設定 (js/volume.js) ---------- */
#win-volume { width: 340px; max-width: calc(100vw - 20px); }
.vol-list { display: grid; gap: 8px; }
.vol-row { display: grid; grid-template-columns: 32px 72px 1fr 44px; align-items: center; gap: 6px; }
.vol-row b { font-weight: 600; white-space: nowrap; }
.vol-row input[type=range] { width: 100%; min-width: 0; accent-color: #f0b84a; height: 22px; }
.vol-master { padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.15); }
.vol-master b { color: #ffd77a; }
.vol-mute { width: 30px; height: 28px; padding: 0; font-size: 16px; line-height: 1; }
.vol-n { text-align: right; font-variant-numeric: tabular-nums; }
.vol-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
/* the new menu icon set (2026-12-05, assets/ui/m_*.png, 64 px painted art from TESTSERVER/UI): drawn smoothly, not
   pixelated like the client's small pixel icons, wherever a rule above sets pixelated */
img[src*="assets/ui/m_"] { image-rendering: auto !important; }
/* 2026-12-05 (user: 「遊戲內許多圖片都被調到變形了 且很多圖鋸齒有點嚴重」):
   - 變形: many rules give a picture a square box (30×30, 20×20 …) while item / skill icons are not square (11×27, 23×26 …),
     so they were squeezed. Every picture now keeps its own shape inside the box it is given; the few pictures that ARE
     a frame or a bar filling their box keep filling it.
   - 鋸齒: `pixelated` only looks right at an exact whole multiple of the picture's size. With Windows display scaling
     (125 % / 150 %), the phone UI scale, and icons drawn smaller or larger than their file (28 px → 16 px, 32 → 48),
     it doubled some pixels and dropped others. All pictures are drawn smoothly now. */
img { object-fit: contain; }
.ssi-bg, .ssi-bar img, .tr-card .tr-frame, .cs-frame, .ci2 .ci-back img, .trd-card img, .sm-slot img,
.st-gg-mid > img:first-child, #ts-ep .ep-bandimg { object-fit: fill; }
*, *::before, *::after { image-rendering: auto !important; }

/* css/mobile.css?v=49 */
/* 卡巴拉島網頁版 — 手機（js/mobile.js 在 <html> 加上 .phone）。
   整個網頁的大小由 mobile.js 改寫 viewport 來縮放；這裡只處理全螢幕／主畫面開啟時的瀏海與圓角（safe-area），
   以及全螢幕提示。版面本身仍是 ui.css 的「small screens」規則。 */
/* phone browsers enlarge ("boost") the text of some blocks on their own on a page whose viewport is wider than the
   screen (js/mobile.js scales a ~1000 px page down): only some lines grew and wrapped, so windows looked uneven on a
   real phone but not in a desktop preview (2026-11-23, user: 有的字較長自動換行 / 道具兌換頁面也是). Text keeps its CSS size. */
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }
html.phone #status, html.phone #side-buttons, html.phone #tracker, html.phone #exp, html.phone #chat-btn,
html.phone #chatlog, html.phone #chat-input, html.phone #buffs { margin-left: env(safe-area-inset-left, 0px); }
html.phone #menu, html.phone #minimap, html.phone #quick { margin-right: env(safe-area-inset-right, 0px); }
html.phone #status, html.phone #side-buttons, html.phone #tracker, html.phone #menu, html.phone #minimap { margin-top: env(safe-area-inset-top, 0px); }
html.phone #quick, html.phone #hotbar, html.phone #exp, html.phone #chat-btn { margin-bottom: env(safe-area-inset-bottom, 0px); }
html.phone .win { margin-top: env(safe-area-inset-top, 0px); }
html.phone #dialog { margin-bottom: env(safe-area-inset-bottom, 0px); }
/* 任務次數／倒數 (2026-11-25): the last-minute bar at the very top (over the event pill / a window's title, not its rows) */
html.phone #tracker .trk-item .sub .q-clock { font-size: 12px; }
html.phone #win-quest .q-cnt { font-size: 11px; }
html.phone #q-timer { top: calc(2px + env(safe-area-inset-top, 0px)); max-width: calc(100vw - 260px); min-width: 170px; font-size: 12px; padding: 3px 10px; gap: 6px; }
html.phone #q-timer b { font-size: 18px; line-height: 22px; }

/* boxes centred in a scrolling overlay: centred while they fit, from the top when taller than the screen
   (plain place-items:center pushes their top above the screen, where it can't be scrolled to) */
#st-ask, #acct:not(.mk) { place-items: start center; }
.st-ask-card, #acct:not(.mk) > .acct-card { margin: auto 0; }

/* the creation screen on a short landscape screen (phones): smaller faces, the description kept below the faces
   (it used to cover the 魅力 row), the right column without the empty title space */
@media (max-height: 540px) and (orientation: landscape) {
  .mk-wrap { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(280px, 330px); }   /* (the picture's column no wider than it is given: account.css) */
  .mk-left { gap: 4px; padding-top: 6px; }
  .mk-row { padding: 2px 8px 2px 0; }
  .mk-type { width: 46px; } .mk-type b { font-size: 14px; }
  .mk-face { width: 48px; height: 48px; } .mk-face img { width: 44px; height: 44px; } .mk-face img.on { width: 48px; height: 48px; }
  .mk-info { width: min(380px, 42vw); margin: 0 0 8px 8px; max-height: calc(100vh - 252px); max-height: calc(100dvh - 252px); overflow-y: auto; }
  .mk-name { font-size: 20px; padding: 4px 10px; } .mk-name small { font-size: 13px; }
  .mk-tj { font-size: 13px; gap: 12px; padding: 4px 10px 2px; }
  .mk-info ul { font-size: 11.5px; line-height: 1.45; padding: 0 10px 0 24px; }
  .mk-title { min-height: 0; } .mk-title small { margin-top: 0; text-align: left; }
  .mk-right { padding: 8px 10px 64px 4px; gap: 6px; }
  .mk-prev { height: 72px; }
  .mk-btns { right: 10px; bottom: 8px; } .mk-btns button { min-width: 84px; padding: 7px 12px; font-size: 15px; }
  .mk-msg { bottom: 54px; }
}

/* windows on a short landscape screen (phones): as much of a window as possible without scrolling */
@media (max-height: 540px) and (orientation: landscape) {
  /* thinner title bar and padding */
  .win-head { padding: 3px 6px 3px 8px; }
  .win-head img { height: 18px; }
  .win-head button { width: 28px; height: 28px; font-size: 14px; }
  .win-body { padding: 6px 8px; max-height: calc(100vh - 46px); max-height: calc(100dvh - 46px); }
  .tabs b, .it-tabs b { padding: 3px 9px; }
  /* the mouse help lines mean nothing on a phone */
  html.phone #win-bag .win-body > p.sub:last-child, html.phone #win-menu .win-body > p.sub:last-child { display: none; }
  /* the bag: smaller tabs row, the grid takes the rest */
  #win-bag .it-tabs { margin-bottom: 4px; }
  #win-bag .it-foot { margin: 4px 0 0; }
  /* NPC workbenches (js/services.js): the lists of each section shorter, so ① and ② fit; beside the bag */
  .gw-list { height: 58px; }
  .gw-sec { padding: 4px 6px 6px; }
  .gw-h { margin-bottom: 4px; }
  .gw-low { min-height: 60px; }
  /* (#windows in front: a window's own width is set by its id, e.g. #win-growth 420px) */
  #windows .win:has(> .win-body > .gw), #windows .win:has(> .win-body > .sv-bench) { width: min(840px, calc(100vw - 12px)); }
  body:has(#win-bag) #windows .win:has(> .win-body > .gw), body:has(#win-bag) #windows .win:has(> .win-body > .sv-bench) { width: max(400px, calc(100vw - 370px)); }

  /* wider windows on a wide, short screen, laid out in two columns instead of one tall one */
  #win-equip { width: 580px; }
  #win-equip .win-body { max-height: calc(100vh - 46px); max-height: calc(100dvh - 46px); }
  #win-equip .eq-doll { float: left; margin-right: 10px; }
  #win-equip .win-body > :not(.eq-doll) { overflow: hidden; }   /* beside the paper doll, not under it */
  #win-skill { width: min(800px, calc(100vw - 12px)); }
  #win-skill .win-body { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; align-content: start; }
  #win-skill .win-body > :not(.skrow) { grid-column: 1 / -1; }
  #win-chars { width: min(760px, calc(100vw - 12px)); }
  #win-menu { width: min(860px, calc(100vw - 12px)); }
  #win-menu .win-body { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; align-items: start; }
  #win-menu .ui-tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 4px; }
  #win-menu .ui-tile { min-height: 56px; padding: 4px 2px; gap: 1px; }
  #win-menu .ui-tile .ui-ic { width: 40px; height: 40px; font-size: 16px; }
  #win-menu .ui-tile .ui-ic img { width: 38px; height: 38px; }
  #win-menu .ui-group { margin: 0 0 6px; }
  #win-quest { width: min(720px, calc(100vw - 12px)); }
  #win-quest .win-body { columns: 2; column-gap: 16px; }
  #win-quest .win-body > * { break-inside: avoid; }
  #win-quest .win-body > .q-sec { break-after: avoid; }
  #win-system { width: min(660px, calc(100vw - 12px)); }
  #win-system .statgrid { grid-template-columns: auto 1fr auto 1fr; }
  /* 自動戰鬥 / 自動挖地 lay out their own two columns (css/auto.css) */
  .win:has(> .win-body > .gw) > .win-body, .win:has(> .win-body > .sv-bench) > .win-body { container-type: inline-size; }
}
/* a wide workbench: the piece and its buttons on the left, the lists of materials on the right */
@container (min-width: 680px) {
  .win-body > .gw, .win-body > .sv-bench, .win-body > .sv-card, .win-body > .sv-head, .win-body > .sv-auto { float: left; clear: left; width: 400px; margin-right: 12px; box-sizing: border-box; }
  .win-body > .tp-group:first-of-type { margin-top: 0; }
}

/* the bottom of the HUD on a short landscape screen (phones): the chat log stops short of the shortcut bar; with the
   full (two-row) bar, the bar moves next to the action pad, so the EXP line, the chat button and the left buttons
   stay clear, and the chat log / input sit above it */
@media (max-height: 540px) and (orientation: landscape) {
  #chatlog, #chat-input { width: max(140px, calc(50vw - 248px)); }
  body.bar-full #hotbar { left: auto; right: 210px; transform: none; }
  body.bar-full #chatlog, body.bar-full #chat-input { bottom: 90px; }
  body.bar-full #chat-btn { bottom: 30px; }
  body.bar-full #game:has(#chat-input.show) #chatlog { bottom: 124px; max-height: min(96px, calc(100vh - 320px)); }
}

/* ---------- the phone HUD (touch phones; they are landscape only) ----------
   the virtual joystick (js/mobile.js) appears wherever a finger touches the map; right: the shortcut row against the
   action pad; top right: the minimap in the corner, the menu to its left (foldable, js/ui.js #menu-fold) */
#ts-stick, #menu-fold { display: none; }
/* the joystick appears where a finger touches the map (js/mobile.js sets left / top) and goes on release */
html.phone #ts-stick.held { display: block; }
html.phone #ts-stick { position: absolute; z-index: 6; width: 104px; height: 104px; pointer-events: none;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75); background: radial-gradient(circle, rgba(255, 255, 255, .22), rgba(30, 40, 70, .38) 70%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35); touch-action: none; user-select: none; -webkit-user-select: none; }
html.phone #ts-stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 40% 35%, #fff, #b9c3e0); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
html.phone #ts-stick.held { background: radial-gradient(circle, rgba(255, 255, 255, .32), rgba(60, 90, 170, .45) 70%); }
html.phone #ts-stick.held i { background: radial-gradient(circle at 40% 35%, #fff, #8fb0ff); }
html.phone #menu-fold { display: flex; }
html.phone #menu.folded > button:not(#menu-fold):not(#menu-btn) { display: none; }
html.phone #menu-fold .hamb { font-size: 22px; line-height: 26px; }
@media (max-height: 540px) and (orientation: landscape) {
  html.phone #minimap { top: 6px; right: 6px; }
  html.phone #menu { top: 2px; right: 170px; }
  html.phone #quick { transform: scale(.8); }
  /* the action pad a little in from the right edge (user: too far right), the shortcut bar beside it (2026-11-21, user:
     手機版放大技能欄位後，會覆蓋攻擊按鈕): compact: 8 px from 撿取 (254 of #quick's units × .8 + 20); full (two rows):
     14 px from the attack button (92 × .8 + 20), it used to touch it (6 px, the slots' touch areas 2 px) */
  html.phone #quick { right: 20px; }
  html.phone #hotbar { left: auto; right: 232px; transform: none; }
  html.phone body.bar-full #hotbar { left: auto; right: 128px; transform: none; }
  html.phone #exp { left: 6px; bottom: 4px; }
  /* under the gold line of the status block: only the states (small skill icons, item effects), one row, nothing
     covered; the EXP / TM bonus chips stay off on phones (user) */
  html.phone .money { display: flex; }
  html.phone #buffs { display: flex; left: 66px; top: 74px; bottom: auto; flex-wrap: nowrap; max-width: 200px; overflow: hidden; gap: 3px; }
  html.phone #buffs > .buff, html.phone #buffs > small { display: none; }
  /* pictures only (user): the text chips of states (攻擊力▲, 緩速 …) and their seconds go; skill and item icons stay */
  html.phone #buffs .buff:not(:has(img)), html.phone #ts-states > small { display: none; }
  /* under the state icons' row (top 82, 22 tall; 2026-11-21, user: 左上輔助狀態蓋到其他ui) */
  html.phone #tracker { top: 122px; }
  /* 卷軸 BUFF row under the states (js/useitems.js scrollRow, 2026-11-25); the left buttons level with the tracker */
  html.phone #scroll-buffs { left: 66px; top: 97px; }
  html.phone #side-buttons { top: 122px; }
  /* 成長組合: the entries of 組合內容 side by side when there are more than fit, and no list scrolls (user) */
  .gw-tab th { width: 1%; padding: 3px 4px; font-size: 11px; }   /* as narrow as its one-line text */
  /* at most three entries a row (fewer when the window is narrow), the box at least two rows tall (user) */
  .gw-tab tr:nth-child(2) .gw-list { height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(max(100px, calc((100% - 12px) / 3)), 1fr));
    grid-auto-rows: minmax(22px, auto); min-height: 48px; column-gap: 6px; row-gap: 4px; align-content: start; font-size: 11px; }
  .gw-tab tr:nth-child(2) .gw-list > div { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
  .gw-abl .gw-list { height: auto; }
  html.phone .win-body .gw-un { min-height: 0; height: 18px; line-height: 14px; padding: 0 6px; }
}
/* the controls bottom right: a touch in the gaps between the attack button and the slots round it does nothing (no
   joystick, no walking there). #quick's own quarter disc (radius 310 of its units round the bottom-right corner) takes
   such touches; the shortcut bar and the minimap stay above it. Every slot's touch area also reaches 4 px further. */
html.phone #quick::before { content: ""; position: absolute; right: -8px; bottom: -8px; width: 310px; height: 310px; border-top-left-radius: 100%; pointer-events: auto; }
html.phone #hotbar, html.phone #minimap { z-index: 6; }
html.phone .bs::before { content: ""; position: absolute; inset: -4px; }

/* ---------- the phone's action pad (2026-11-21) ----------
   In #quick's own units (scaled .8 on short screens), from its bottom-right corner; the attack button is 92 there.
   撿取 (#pick-btn, user: 手機版右側操作區新增獨立的拾取道具按鈕) is a smaller one of the attack button's kind; the page pill
   and 換目標 (a round picture button now) moved from the top of the right edge to the top left of the pad, the page
   pill still over 換目標, so the pad is lower and keeps clear of the minimap on a 382 px tall screen too.
     compact: inner arc 1–3 as before; 撿取 on the outer arc (radius 180 round the attack button's centre) at 0°, the
       outer arc's slots 4–6 at 30°, 55°, 80° (were 20°, 50°, 80°); the row of seven 8 px left of 撿取
     full: the six extra slots in two rows of three over the attack button; 撿取 left of the lower row, 換目標 left of
       the upper one, the page pill over it; the two-row bar 14 px left of the attack button
   Narrow phones (under 900 px, e.g. 844 × 382 at 100 %): the bar sits 24 px up, over the EXP line and the 鏡頭 button
   it used to cover, and everything above it goes up as much (--lift, in #quick's units). */
#quick .pick { display: none; }
html.phone #quick { --lift: 0px; }
html.phone #quick .pick { position: absolute; right: 198px; bottom: 18px; width: 56px; height: 56px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  border: 3px solid #fff; background: radial-gradient(circle at 40% 30%, #ffffff, #c6cbe0 60%, #8d96b8); box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
html.phone #quick .pick img { width: 38px; height: 38px; image-rendering: pixelated; pointer-events: none; }
html.phone #quick .pick:active { transform: scale(.94); }
/* compact: 撿取 up off the row's end (2026-11-21, user: 縮小的時候會擋到了 把拾取移上去／在上面那個凹槽裡): in the hollow
   over slot 5, between 換目標 and slot 6 */
html.phone body.bar-compact #quick .pick { right: 112px; bottom: 230px; }
/* compact: the page pill at the right edge over slot 6 (user: 切換分頁丟在右邊上面一點) */
html.phone body.bar-compact.has-bar #quick .page { right: 4px; bottom: 262px; }
html.phone #quick .bs.a4 { right: 174px; bottom: 108px; }
html.phone #quick .bs.a5 { right: 121px; bottom: 165px; }
html.phone #quick .bs.a6 { right: 49px; bottom: 195px; }
html.phone body.has-bar #quick .tgt-next { right: 188px; bottom: 200px; }
html.phone body.has-bar #quick .page { right: 176px; bottom: 248px; }
/* full (2026-11-21, user: 欄位放大後還是擋到攻擊鍵；切換目標跟拾取另外做、放上面一點；下方分頁欄少格一點):
   撿取 and 換目標 on their own row over the six slots (no longer beside them), the page pill to their left; the bar
   (8 a row on phones, js/bar.js PHONE_ROW) has its ▭ button on its left, away from the attack button */
html.phone body.bar-full #quick .pick { right: 64px; bottom: calc(236px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .tgt-next { right: 4px; bottom: calc(240px + var(--lift)); width: 48px; height: 48px; }
html.phone body.bar-full.has-bar #quick .tgt-next img { width: 34px; height: 34px; }
html.phone body.bar-full.has-bar #quick .page { right: 132px; bottom: calc(249px + var(--lift)); }
html.phone body.bar-full #hotbar .bar-tools { order: -1; }
html.phone #quick .bs.f1, html.phone #quick .bs.f2, html.phone #quick .bs.f3 { bottom: calc(106px + var(--lift)); }
html.phone #quick .bs.f4, html.phone #quick .bs.f5, html.phone #quick .bs.f6 { bottom: calc(168px + var(--lift)); }
@media (max-height: 540px) and (orientation: landscape) and (max-width: 899px) {
  html.phone #quick { --lift: 30px; }
  html.phone #hotbar, html.phone body.bar-full #hotbar { bottom: 30px; }
}
/* short screens (a phone at 100 %, ≤ 400 px tall): the page pill beside 換目標 instead of over it, so the pad stays under
   an unfolded minimap */
@media (max-height: 400px) and (orientation: landscape) {
  html.phone body.has-bar #quick .page { right: 232px; bottom: 205px; }
  html.phone body.bar-compact.has-bar #quick .page { right: 4px; bottom: 262px; }
  /* full: no room over the six slots under the minimap — 撿取 left of their upper row, 換目標 over it, the pill beside */
  html.phone body.bar-full #quick .pick { right: 196px; bottom: calc(168px + var(--lift)); }
  html.phone body.bar-full.has-bar #quick .tgt-next { right: 200px; bottom: calc(236px + var(--lift)); }
  html.phone body.bar-full.has-bar #quick .page { right: 260px; bottom: calc(245px + var(--lift)); }
}
/* very narrow (a 360 px tall phone at 100 %): the full bar's slots a little smaller, so it stays clear of the chat */
@media (max-height: 540px) and (orientation: landscape) and (max-width: 819px) {
  html.phone body.bar-full #hotbar .bs.sq { width: 30px; height: 30px; }
  html.phone body.bar-full #hotbar .bs img { max-width: 24px; max-height: 24px; }
  html.phone body.bar-compact #hotbar .bs.sq { width: 38px; height: 38px; }
}

/* 商城 (js/mall.js) on a phone: the whole screen (user). Landscape: three columns that fill it — the goods, the fitting
   room (full height, so the character is never cut), then the buy box over the cart (the cart's list scrolls inside);
   the side columns stay in view and fit the screen without scrolling (user: 不要超過整個畫面) */
html.phone #windows #win-shop { left: 0 !important; top: 0 !important; width: 100vw !important; max-width: none; height: 100vh; height: 100dvh;
  margin: 0; border-width: 0; border-radius: 0; display: flex; flex-direction: column; }
html.phone #win-shop .win-head { border-radius: 0; padding-left: calc(8px + env(safe-area-inset-left, 0px)); padding-right: calc(6px + env(safe-area-inset-right, 0px)); }
html.phone #win-shop .win-body { flex: 1; min-height: 0; max-height: none; padding-left: calc(8px + env(safe-area-inset-left, 0px)); padding-right: calc(8px + env(safe-area-inset-right, 0px)); }
html.phone #win-shop .mall-top { margin-bottom: 4px; }
@media (orientation: landscape) {
  /* the side's height: the screen minus the title bar (~34, the points are in it now) and the paddings */
  html.phone #win-shop { --side-h: calc(100dvh - 50px); }
  /* the right side, one column from top to bottom (user's pick): 試衣間 → the chosen item → 購物車 */
  html.phone #win-shop .mall-cols { grid-template-columns: minmax(0, 1fr) 290px; gap: 8px; }
  html.phone #win-shop .mall-side { position: sticky; top: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 6px;
    height: var(--side-h); max-height: none; overflow: hidden; }
  html.phone #win-shop .mall-fit, html.phone #win-shop .mall-buy, html.phone #win-shop .mall-cartbox { padding: 5px 7px; }
  /* 試衣間: the stage on the left (tall enough for the character with a hat), its title over it; on the right the tried
     pieces as small icons (✕ takes one off) and the buttons one under another */
  html.phone #win-shop .mall-fit { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 7px; }
  html.phone #win-shop .m-fit-head { position: absolute; left: 12px; top: 8px; z-index: 1; margin: 0; pointer-events: none; }
  html.phone #win-shop .m-stage { grid-column: 1; grid-row: 1 / 3; height: 116px; }
  html.phone #win-shop .m-turn { width: 22px; height: 22px; margin-top: -11px; font-size: 10px; }
  html.phone #win-shop .m-turn.l { left: 3px; } html.phone #win-shop .m-turn.r { right: 3px; }
  /* three a row (user) */
  html.phone #win-shop .m-tried { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin: 0 0 4px; max-height: 76px; overflow-y: auto; align-content: start; }
  html.phone #win-shop .m-tried .chip { font-size: 0; padding: 1px 1px 1px 2px; justify-content: center; gap: 0; min-width: 0; }   /* the icon and ✕ only; the name is its tooltip */
  html.phone #win-shop .m-tried .chip .ii { width: 20px; height: 20px; flex: none; }
  html.phone #win-shop .m-tried .chip button { font-size: 11px; padding: 0 1px; flex: none; }
  /* 全部脫下 and 復原 side by side under the tried pieces; 試穿的加入購物車 across the box under the stage (user) */
  html.phone #win-shop .m-fit-acts { grid-column: 2; grid-row: 2; align-self: end; display: flex; flex-direction: row; gap: 4px; margin: 0; }
  html.phone #win-shop .m-fit-acts button { flex: 1 1 0; font-size: 12px; padding: 4px 4px; white-space: nowrap; }
  html.phone #win-shop .mall-fit > .m-fitcart { grid-column: 1 / -1; grid-row: 3; margin-top: 5px; }
  /* the chosen item: icon, name and price on one line, its abilities on one line, then 加入購物車 / 購買 */
  html.phone #win-shop .mall-buy:not(.empty) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; row-gap: 3px; align-items: center; }
  html.phone #win-shop .mall-buy .m-head { grid-column: 1; min-width: 0; }
  html.phone #win-shop .mall-buy .m-head .m-icon { width: 30px; height: 30px; }
  html.phone #win-shop .mall-buy .m-head .m-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.phone #win-shop .mall-buy .m-head .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.phone #win-shop .mall-buy .m-row { grid-column: 2; grid-row: 1; margin: 0; gap: 6px; }
  html.phone #win-shop .mall-buy .m-stats { grid-column: 1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.phone #win-shop .mall-buy .m-warn { grid-column: 1 / -1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.phone #win-shop .mall-buy .m-gift { grid-column: 1 / -1; margin: 0; }
  html.phone #win-shop .mall-buy .m-head { grid-row: 1; }
  html.phone #win-shop .mall-buy .m-more { grid-column: 1 / -1; margin: 0; justify-self: end; }
  html.phone #win-shop .mall-buy:has(.m-stats) .m-more { grid-column: 2; grid-row: 2; }   /* on the abilities' line */
  html.phone #win-shop .mall-buy .m-to { grid-column: 1 / -1; margin: 0; }
  html.phone #win-shop .mall-buy .m-btns { grid-column: 1 / -1; margin: 0; }
  html.phone #win-shop .mall-buy .m-btns > button { min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
  html.phone #win-shop .mall-buy.empty { padding: 8px; }
  html.phone #win-shop .mall-buy.empty p { margin: 0; }
  /* 購物車: its title row also holds 合計 and 全部購買; the list under it takes the height that is left and scrolls */
  html.phone #win-shop .mall-cartbox { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 6px; align-items: center; min-height: 0; }
  html.phone #win-shop .m-cart-head { grid-column: 1; grid-row: 1; margin: 0; gap: 4px; }
  html.phone #win-shop .m-cart-head .m-link { margin-left: 4px; }
  html.phone #win-shop .m-cart-sum { grid-column: 2; grid-row: 1; margin: 0; justify-content: flex-end; gap: 4px; }
  html.phone #win-shop .m-cart-sum .sub { display: none; }   /* what is left after paying: in the 商城點數 at the top anyway */
  html.phone #win-shop .mall-cartbox .m-go.wide { grid-column: 3; grid-row: 1; width: auto; min-height: 0; margin: 0; padding: 4px 12px; }
  html.phone #win-shop .m-cart-list { grid-column: 1 / -1; grid-row: 2; align-self: stretch; min-height: 0; max-height: none; margin-top: 4px; }
  html.phone #win-shop .mall-cartbox > p.sub { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; align-self: start; }
  html.phone #win-shop .mall-cartbox .m-warn { grid-column: 1 / -1; grid-row: 3; }
}

/* ---------- one line per row (2026-11-23, user: 手機版許多介面不統一 有的字較長自動換行了) ----------
   In narrow phone windows a longer name, its chips or its gray line went to a second line while its neighbours did
   not, so rows of one list had different heights. On phones every such piece stays on one line and a longer text
   ends in … (the full text stays in the row's details / tooltip). Paragraph text (p.sub help, letters, NPC talk) wraps as before. */
html.phone .win .qrow > div:not(.qacts):not(.q-btns), html.phone .win .qrow .sub,
html.phone .win .sk-main > .sub, html.phone .win .xr-it b, html.phone .win .st-v,
html.phone .win .kb-row > span:first-child, html.phone .win .stg-l > b, html.phone .win .ap-row, html.phone .win .ap-sw {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* buttons, tabs, chips and tags: never two lines */
html.phone .win button, html.phone .win .tabs b, html.phone .win .it-tabs b, html.phone .win .chip, html.phone .win .tag,
html.phone .win .pn-tabs > *, html.phone .win label.full, html.phone .win .eq-slot {
  white-space: nowrap; }
html.phone .win .chip, html.phone .win .tag { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html.phone .win button:not(.ui-tile) { overflow: hidden; text-overflow: ellipsis; }
html.phone .win .qrow > div:not(.qacts):not(.q-btns) { flex: 1 1 auto; }
/* NPC 搜尋 (2026-12-04 UI sweep): an NPC with many functions (安德烈: 任務 移動 物品組合 結婚 變裝) had its last chips cut off
   with no "…". Still one line: the chips get a little smaller and never shrink, the name gives way (…) only if needed */
html.phone #win-npcs .qrow > div:first-child { display: flex; align-items: center; gap: 2px; }
html.phone #win-npcs .qrow > div:first-child > b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-right: 2px; }
html.phone #win-npcs .qrow > div:first-child > .chip { flex: none; font-size: 10px; padding: 0 3px; }
html.phone .win .qrow > .st, html.phone .win .qrow > img { flex: none; }
html.phone .win .sk-main { min-width: 0; flex: 1 1 auto; overflow: hidden; }
html.phone .win .skrow { min-width: 0; }
@media (max-height: 540px) and (orientation: landscape) {
  html.phone #win-skill .win-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* the slot names in the equipment window (臉, 裝飾1 …) a size smaller so they fit their 55 px boxes */
html.phone .win .eq-slot { font-size: 11px; letter-spacing: -.2px; }

/* 道具兌換 (js/exchange.js) on phones: materials ➜ result ＋ amount ＋ 兌換 always on one line; the item names give way (…) */
html.phone .win .pn-xr { flex-wrap: nowrap; }
html.phone .win .xr-flow { flex-wrap: nowrap; overflow: hidden; }
html.phone .win .xr-it { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
html.phone .win .xr-it.out { flex-shrink: 2; }
html.phone .win .xr-ar, html.phone .win .xr-it em, html.phone .win .xr-it small, html.phone .win .xr-f { flex: none; white-space: nowrap; }
html.phone .win .xr-sec { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* no image callout (iPhone's 儲存影像 / 拷貝) or text selection on a long press; text boxes stay selectable */
html.phone img, html.phone canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
html.phone body { -webkit-touch-callout: none; }
html.phone input, html.phone textarea { -webkit-touch-callout: default; -webkit-user-select: text; user-select: text; }

/* the state icons (js/monsters.js hud): a player skill's icon, 20 px, with its seconds left */
.st-ic { position: relative; display: inline-block; width: 20px; height: 20px; flex: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .8), 0 1px 3px rgba(0, 0, 0, .5); }
.st-ic img { width: 20px; height: 20px; display: block; border-radius: 4px; }
.st-ic small { position: absolute; right: -2px; bottom: -3px; font: bold 8px/9px system-ui, sans-serif; padding: 0 1px; border-radius: 3px; background: rgba(0, 0, 0, .7); color: #fff; text-shadow: none; }
.st-ic.bad { box-shadow: 0 0 0 1px #ff8a8a, 0 1px 3px rgba(0, 0, 0, .5); }
#ts-states { gap: 3px !important; }
/* 鏡頭: one button right beside the EXP / TM line, the same size and look (js/mobile.js places it); each tap 遠 → 中 → 近 */
/* every screen (2026-11-27: the computer lost it when it was phone-only); js places left / top / height after #exp */
.ts-cambtn { display: flex; align-items: center; gap: 4px; position: absolute; z-index: 5; left: 139px; bottom: 10px; padding: 2px 10px; border: 0; border-radius: 12px; background: #fff;
  color: #777; font-size: 11px; line-height: 13px; box-shadow: var(--shadow); white-space: nowrap; cursor: pointer; }
.ts-cambtn b { color: #333; }
.ts-cambtn:hover b { color: #2f5fc8; }
.ts-cambtn:active { transform: scale(.94); }
html.phone .ts-cambtn { bottom: 4px; padding: 2px 8px; font-size: 10px; }
@media (max-height: 540px) and (orientation: landscape) {
  html.phone body.bar-full #chat-btn { bottom: 30px; }
  html.phone body.bar-full #chatlog, html.phone body.bar-full #chat-input { bottom: 30px; }
  html.phone body.bar-full #game:has(#chat-input.show) #chatlog { bottom: 64px; max-height: min(96px, calc(100vh - 290px)); }
}

/* phones play landscape only (js/mobile.js locks it in full screen; elsewhere this note covers the game while upright) */
#ts-rotate { display: none; position: fixed; inset: 0; z-index: 200; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #1b1d2a; color: #fff; text-align: center; padding: 24px; font-size: 22px; line-height: 1.6; }
#ts-rotate b { font-size: 30px; }
#ts-rotate span { color: #b9c0d8; }
#ts-rotate .rot-ic { font-size: 72px; animation: ts-rot 2.2s ease-in-out infinite; }
@keyframes ts-rot { 0%, 25% { transform: rotate(0); } 55%, 100% { transform: rotate(-90deg); } }
html.portrait #ts-rotate { display: flex; }
/* 2026-11-27 開服檢測 G9: the login / registration / account screens and the server list fit an upright phone — the note
   waits until the character list (a wide row of cards) and the game itself. A phone whose browser would not turn (a chat
   app's built-in browser, the screen locked upright) could not even log in or register before. */
html.portrait body:has(#acct.ttl-login, #acct.ttl-reg, #acct.ttl-server) #ts-rotate { display: none; }

/* 2026-11-25 (user: 「手機版左側按鈕 介面太大了占位置 縮小一點」): the round buttons down the left (任務・組隊・自動), the chat
   button and the 🔒 over it (js/powerlock.js copies the chat button's size) 40 → 32 px; the chat log follows the narrower
   column */
html.phone #side-buttons { width: 36px; gap: 6px; }
html.phone #side-buttons .round, html.phone #side-buttons .round.small { width: 32px; height: 32px; font-size: 14px; border-width: 2px; }
html.phone #side-buttons .round img { max-width: 22px; max-height: 22px; }
html.phone #side-buttons .round .pip { top: -4px; right: -4px; transform: scale(.85); }
html.phone #chat-btn { width: 32px; height: 32px; font-size: 13px; }
html.phone #chatlog, html.phone #chat-input { left: 46px; }
/* the quest tracker right of the narrower column */
html.phone #tracker { left: 50px; }
/* the bottom shortcut row: empty slots were hidden on phones (2026-11-25, 「下方技能欄位空白又出現」); since 2026-11-26 the
   bar shows all its squares again — compact 8, full 2 × 8 (user: 「手機版的技能欄位縮小樣式應該是8格 放大一樣是16格」,
   「方格技能欄你沒調整」) */
/* (user: 「欄位上下空白太多」) compact bar: ✎ and ▤ side by side, as tall as the slots — stacked they were 64 px against
   42 px slots, so the bar stood taller than its slots with empty space over and under them */
html.phone body.bar-compact #hotbar .bar-tools { flex-direction: row; align-self: stretch; align-items: stretch; gap: 4px; }
/* (user: 「兩個切換按鈕 跟放大的時候一樣 放到左邊去」) on the left of the slots, as in the full bar */
html.phone body.bar-compact #hotbar .bar-tools { order: -1; }
/* the 放大／縮小 button shows + / − (js/bar.js), drawn a little bigger than the other glyphs */
#hotbar [data-bartool="mode"] { font-size: 18px; font-weight: bold; line-height: 1; }
html.phone body.bar-compact #hotbar .bar-tools button { width: 30px; height: auto; }
/* 2026-11-26 (user, picture of the two: 「縮小到可以塞進上下 且不要比技能欄位厚」): ✎ over ＋／− again, both small enough that
   the pair is exactly a slot's height (the column stretches to the row, each button half of it), so the bar is no thicker
   than its slots — compact and full alike */
html.phone #hotbar .bar-tools, html.phone body.bar-compact #hotbar .bar-tools { flex-direction: column; align-self: stretch; align-items: stretch; justify-content: stretch; gap: 2px; }
html.phone #hotbar .bar-tools button, html.phone body.bar-compact #hotbar .bar-tools button { flex: 1 1 0; width: 24px; height: auto; min-height: 0; padding: 0; border-radius: 5px; font-size: 11px; line-height: 1; display: grid; place-items: center; }
html.phone #hotbar [data-bartool="mode"] { font-size: 14px; }

/* the tip that explains "add to home screen" (iPhone) */
.ts-toast { position: fixed; z-index: 100; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: min(420px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 12px; background: rgba(20, 26, 48, .92); color: #fff; font-size: 14px; line-height: 1.6; text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45); border: 2px solid #fff; }
.ts-toast b { color: #ffd76a; }
/* the 安裝到主畫面 button in the full-screen note (js/mobile.js offerInstall, 2026-11-27) */
.ts-toast button { display: block; margin: 8px auto 0; padding: 5px 16px; border: 0; border-radius: 8px; background: #5b6ee1; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* css/hudlayout.css?v=2 */
/* 按鈕配置 (js/hudlayout.js): the edit mode over the bottom-right buttons */
body.hud-edit #quick > *:not(#angel):not(#angel-tip), body.hud-edit #hotbar { outline: 3px dashed #ffe27a; outline-offset: 1px; box-shadow: 0 0 0 5px rgba(20, 20, 40, .35); cursor: move; touch-action: none; }
body.hud-edit #quick .hud-sel, body.hud-edit #hotbar.hud-sel { outline: 3px solid #ffe27a; box-shadow: 0 0 14px rgba(255, 226, 122, .8); }
body.hud-edit #quick, body.hud-edit #hotbar { z-index: 40; }
#hud-panel { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 50; width: min(460px, calc(100vw - 16px)); box-sizing: border-box;
  padding: 8px 12px 10px; border-radius: 12px; background: rgba(16, 22, 44, .92); border: 2px solid #ffe27a; color: #eef2ff;
  font: 13px/1.4 system-ui, sans-serif; box-shadow: 0 4px 18px rgba(0, 0, 0, .5); }
#hud-panel .hp-t { font-weight: 700; color: #ffe27a; margin-bottom: 4px; }
#hud-panel .hp-t small { display: block; font-weight: 400; color: #c7cfe6; font-size: 11.5px; }
#hud-panel label { display: grid; grid-template-columns: 7em 1fr 3.2em; align-items: center; gap: 8px; margin: 4px 0; }
#hud-panel label.dim { opacity: .5; }
#hud-panel input[type=range] { width: 100%; height: 26px; }
#hud-panel b { text-align: right; font-variant-numeric: tabular-nums; }
#hud-panel .hp-b { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
#hud-panel button { min-height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid #8a93b8; background: #2b3458; color: #fff; font: inherit; cursor: pointer; }
#hud-panel button:disabled { opacity: .4; }
#hud-panel button.ok { background: #3a8f52; border-color: #8dff9a; font-weight: 700; }
@media (max-height: 400px) { #hud-panel { top: 4px; padding: 5px 10px 6px; } #hud-panel label { margin: 1px 0; } #hud-panel .hp-t small { display: none; } }

/* css/fbtn.css?v=35 */
/* The buttons at the bottom right, redone as one block (2026-11-26, user: 「整個區塊都重做 樣式要統一 然後整齊排序」,
   「只有自動 切換目標 跟拾取用那個外殼 另外的 另外統一」, 「攻擊鍵可以稍大 鑽地切換鈕小一點」, 「切換怪物跟拾取一樣大」).
   Two looks, each used alike:
     pearl  (.pearl)  AUTO, 換目標, 撿取 — the user's own button (its pearl disc, rim and four star notches; the hand taken out
                      → assets/ui/fb_shell.png; 撿取 keeps the user's picture with the hand, fb_pick_btn.png), all 56
     white  (.fbtn / the slots / the page) 攻擊 100, 挖地切換 64, the skill slots 52, 換頁 40 (only ⇅, no page number — user: 「切換分頁按鈕只要留上下的符號 不顯示數字了 且再縮小」) — a white disc with a thin
                      outer ring and four small diamonds
   Places: everything round the attack button's centre (50, 50 from the pad's corner):
     AUTO left of attack and the switch right of it, all three bottoms on one line (user: 「開啟自動戰鬥跟鑽地切換底部水平切齊攻擊 擺在攻擊左右兩側」)
     compact: the five slots on one ring round the attack button — exact places below
   (centre (x, y) → right = x − size/2, bottom = y − size/2.) The whole pad sits PAD (84) units further left so the switch
   has the corner: js/dig.js placePad sets --padx; the phone's shortcut row moves along. 選單 › 按鈕配置 still moves them. */
#quick { translate: calc(-1 * var(--padx, 0px)) 0; }
html.phone #hotbar { margin-right: var(--padx, 0px); }
:root { --fb-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45.5' fill='none' stroke='%23ffffff' stroke-opacity='.85' stroke-width='2'/%3E%3Cg fill='%23ffffff' stroke='%23b9c0cc' stroke-width='.8'%3E%3Cpath d='M0.6 50l4.4-4.4 4.4 4.4-4.4 4.4z'/%3E%3Cpath d='M90.6 50l4.4-4.4 4.4 4.4-4.4 4.4z'/%3E%3Cpath d='M50 0.6l4.4 4.4-4.4 4.4-4.4-4.4z'/%3E%3Cpath d='M50 90.6l4.4 4.4-4.4 4.4-4.4-4.4z'/%3E%3C/g%3E%3C/svg%3E"); }

/* ---------- the white look: 攻擊, 挖地切換, the skill slots, 換頁 ---------- */
#quick .fbtn, #quick .bs.arc, html body #quick .page { position: absolute; padding: 0; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid #ffffff; background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f3f4f7 58%, #e1e4ea 100%);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .34), inset 0 -3px 0 rgba(40, 50, 70, .06); color: #6c7380; }
#quick .fbtn::before, #quick .bs.arc::before, html body #quick .page::before { content: ""; position: absolute; inset: var(--ring, -4px); border-radius: 50%;
  pointer-events: none; background: var(--fb-ring) center / 100% 100% no-repeat; }
#quick .fbtn img { width: 70%; height: 70%; object-fit: contain; image-rendering: auto; pointer-events: none; }
#quick .fbtn:hover, #quick .bs.arc:hover { filter: brightness(1.04); }
#quick .fbtn:active { transform: scale(.94); }
#quick .fbtn kbd { z-index: 1; }
/* the skill slots: the same disc; an empty one a little see-through with a grey + */
#quick .bs.arc { width: 52px; height: 52px; }
#quick .bs.arc.empty { opacity: .92; border-style: solid; }
#quick .bs.arc .plus { color: #9aa1ad; opacity: 1; }
#quick .bs.arc img { max-width: 34px; max-height: 34px; }
/* 換頁: a small round button with only the arrows (the whole disc turns the page) */
html body #quick .page { width: 40px; height: 40px; gap: 0; grid-template-rows: none; align-content: center; }
html body #quick .page span { display: none; }
html body #quick .page button { position: static; width: auto; height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: #6c7380; font-size: 18px; font-weight: bold; line-height: 1; }
html body #quick .page button::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }   /* the whole disc is the button */
html body #quick .page button kbd { top: -12px; right: -12px; }
/* a running AUTO / the dig mode on: a green ring */
#quick .fbtn.on { border-color: #59c27a; box-shadow: 0 0 0 3px rgba(89, 194, 122, .55), 0 2px 7px rgba(0, 0, 0, .36); }
#quick .fbtn.on::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px; border-radius: 50%; background: #3cc36a; box-shadow: 0 0 0 2px #fff; }
#quick .fbtn .fb-set { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; background: url("../assets/ui/fb_sliders.png?v=8") center / contain no-repeat; pointer-events: none; }
/* sizes (user): 攻擊 a little bigger, the switch smaller */
#quick .attack.fbtn { width: 100px; height: 100px; border-width: 3px; --ring: -7px; }
#quick .attack.fbtn img { width: 64%; height: 64%; }
#quick .digtog { width: 64px; height: 64px; --ring: -5px; }

/* ---------- the pearl look: AUTO, 換目標, 撿取 (all 56) ---------- */
#quick .pearl.fbtn, html.phone #quick .pearl.fbtn, html body #quick .pearl.fbtn { width: 56px; height: 56px; border: 0; border-radius: 50%;
  background: url("../assets/ui/fb_shell.png?v=1") center / 100% 100% no-repeat; box-shadow: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
#quick .pearl.fbtn::before { display: none; }
#quick .pearl.fbtn img { width: 56%; height: 56%; }
#quick .pearl.fbtn.on { box-shadow: none; filter: drop-shadow(0 0 5px rgba(80, 210, 120, .95)) drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
#quick .pearl.own { background: none; }                 /* 撿取: the user's picture is the whole button */
#quick .pearl.own img, html.phone #quick .pearl.own img { width: 100%; height: 100%; max-width: none; filter: none; }

/* ---------- places (compact layout) ----------
   2026-11-26 (user: 「整體技能往右側移 直到切換分頁切齊鑽地切換最右邊」, 「放大縮小的版本都要向右切齊」, then 「縮小版本的
   手機 電腦版 五個圓形技能欄位 應該要 半圓大概45度繞著攻擊扭擺放」, 「不是叫你五個一起 是分兩層」, then the user's own sketch): two quarter
   arcs round the attack button's centre (50, 50), from its left up to straight over it (none over the switch):
   inner r 115 = slots 1–2 at 43°, 85°; outer r 190 = slots 3–5 at 27°, 59°, 90°.
   Top row (centres y 300): 換頁 (40, right edge −78), 撿取, 換目標, 68 apart — computers too (user: 「網頁版的拾取按鈕也
   不能少」). */
#quick .attack.fbtn { right: 0; bottom: 0; }
#quick .digtog { right: -78px; bottom: 0; }
#quick .autob { right: 110px; bottom: 0; }
html #quick .bs.a1, html.phone #quick .bs.a1 { right: 108px; bottom: 102px; }
html #quick .bs.a2, html.phone #quick .bs.a2 { right: 34px; bottom: 139px; }
html #quick .bs.a3, html.phone #quick .bs.a3 { right: 193px; bottom: 110px; }
html #quick .bs.a4, html.phone #quick .bs.a4 { right: 122px; bottom: 187px; }
html #quick .bs.a5, html.phone #quick .bs.a5 { right: 24px; bottom: 214px; }
html body #quick .pick.pearl { display: grid; }
html body.bar-compact.has-bar #quick .page, html.phone body.bar-compact.has-bar #quick .page { right: -78px; bottom: 280px; }
html body.bar-compact #quick .pick.pearl, html.phone body.bar-compact #quick .pick.pearl, html.phone body #quick .pick.pearl { right: -18px; bottom: 272px; }
html body.bar-compact.has-bar #quick .tgt-next, html.phone body.bar-compact.has-bar #quick .tgt-next { right: 50px; bottom: 272px; }
/* ---------- places (full layout) ----------
   AUTO / attack / switch as in compact; the six extra slots in two rows of three over the attack button, columns at
   x −52 / 14 / 80 (the first one's right edge = the switch's), rows at y 140 / 206; top row at y 276: 換頁 over the
   first column (right edge −78), 撿取 over the second, 換目標 over the third. Phones lift everything over the attack row
   by --lift (mobile.css: narrow phones raise the bar). */
html body.bar-full #quick .bs.f1 { right: -78px; bottom: 114px; }
html body.bar-full #quick .bs.f2 { right: -12px; bottom: 114px; }
html body.bar-full #quick .bs.f3 { right: 54px; bottom: 114px; }
html body.bar-full #quick .bs.f4 { right: -78px; bottom: 180px; }
html body.bar-full #quick .bs.f5 { right: -12px; bottom: 180px; }
html body.bar-full #quick .bs.f6 { right: 54px; bottom: 180px; }
html body.bar-full.has-bar #quick .page { right: -78px; bottom: 256px; }
html body.bar-full #quick .pick.pearl { right: -14px; bottom: 248px; }
html body.bar-full.has-bar #quick .tgt-next.pearl { right: 52px; bottom: 248px; }
html.phone body.bar-full.has-bar #quick .bs.f1 { right: -78px; bottom: calc(114px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .bs.f2 { right: -12px; bottom: calc(114px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .bs.f3 { right: 54px; bottom: calc(114px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .bs.f4 { right: -78px; bottom: calc(180px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .bs.f5 { right: -12px; bottom: calc(180px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .bs.f6 { right: 54px; bottom: calc(180px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .page { right: -78px; bottom: calc(256px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .pick.pearl { right: -14px; bottom: calc(248px + var(--lift)); }
html.phone body.bar-full.has-bar #quick .tgt-next.pearl { right: 52px; bottom: calc(248px + var(--lift)); width: 56px; height: 56px; }
html.phone body.bar-full.has-bar #quick .tgt-next.pearl img { width: 56%; height: 56%; }
/* the phone's shortcut row right beside AUTO (user: 「靠近自動戰鬥一點」), compact 8 slots / full 2 × 8 (js/bar.js) */
html.phone body.bar-compact #hotbar, html.phone body.bar-full #hotbar { right: 158px; }

/* 2026-11-26 (user: 「右下角 攻擊 鑽地 三個圖示都太小了 不是按鈕大小 是圖示 放大一點 且自動戰鬥按下去 按鈕應該變成填滿綠色」):
   the pictures inside 攻擊, 挖地切換 and AUTO bigger (the buttons keep their size); a running AUTO is a filled green disc
   with its picture in white (no glow / dot) */
#quick .attack.fbtn img { width: 80%; height: 80%; }
#quick .digtog img { width: 90%; height: 90%; }
#quick .autob.pearl.fbtn img { width: 78%; height: 78%; }
#quick .autob.pearl.fbtn.on { background: radial-gradient(circle at 50% 35%, #8ff0a2 0%, #46c463 55%, #279343 100%); border: 2px solid #ffffff;
  filter: drop-shadow(0 0 4px rgba(70, 200, 100, .8)) drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
#quick .autob.pearl.fbtn.on img { filter: brightness(0) invert(1); }
#quick .autob.pearl.fbtn.on::after { display: none; }/* AUTO's picture a size up, the button stays 56 (2026-11-26, user: 「自動扭可以的話再大一點」 → 「我說的是 圖示不要把按鈕放大」) */
#quick .autob.pearl.fbtn img { width: 94%; height: 94%; }/* 換目標's own picture (tools/flaticons.py target_switch, fb_target.png: the crosshair + turning arrows, 2026-11-26 「仿照其他按鈕」),
   as big inside its pearl as AUTO's */
#quick .tgt-next.pearl.fbtn img, html.phone body.bar-full.has-bar #quick .tgt-next.pearl img { width: 74%; height: 74%; image-rendering: auto; }/* the phone's shortcut bar always hugs AUTO, whatever the 介面大小 (2026-11-26, user: 「技能欄的黑底怎麼那麼長」): at a small
   size the screen is taller than 540 px, mobile.css's landscape rules drop out and the bar was centred with left 50% +
   translateX — stretched between that and right 158, its slots running past the dark background */
html.phone #hotbar, html.phone body.bar-full #hotbar, html.phone body.bar-compact #hotbar { left: auto; transform: none; }html.phone #quick { transform: scale(.8); transform-origin: right bottom; right: 20px; }   /* the same pad size at every 介面大小 */
/* css/purse.css?v=1 */
/* the Gold line of the status block: 負重 % and the 算命 icon with its pop-up (js/purse.js) */
.money { gap: 5px; }
.money .wt { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; cursor: default; }
.money .wt img, .money .fortune img { width: 18px; height: 18px; display: block; pointer-events: none; }
.money .wt b { min-width: 26px; }
.money .wt.warn b { color: #ffb347; }
.money .wt.over b { color: #ff6b6b; }
.money .fortune { position: relative; padding: 2px; margin: -2px 0 -2px 2px; border: 0; border-radius: 50%; background: none; line-height: 0;
  filter: grayscale(1) brightness(.85); opacity: .7; transition: transform .15s, filter .2s, opacity .2s; }
.money .fortune.on { filter: drop-shadow(0 0 3px #d9b8ff) drop-shadow(0 0 1px #fff); opacity: 1; animation: pu-glow 2.4s ease-in-out infinite; }
.money .fortune:hover { transform: scale(1.15); opacity: 1; }
@keyframes pu-glow { 50% { filter: drop-shadow(0 0 6px #c99cff) drop-shadow(0 0 1px #fff); } }

#purse-pop { position: absolute; z-index: 40; width: 230px; padding: 0 0 8px; font-size: 12px; color: var(--ink); }
#purse-pop .pu-head { display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 8px; font-weight: bold; border-bottom: 1px solid var(--panel-edge); }
#purse-pop .pu-head img { width: 20px; height: 20px; }
#purse-pop .pu-x { margin-left: auto; border: 0; background: none; color: var(--sub); font-size: 13px; padding: 2px 6px; }
#purse-pop .pu-mods { list-style: none; margin: 6px 10px 4px; padding: 0; }
#purse-pop .pu-mods li { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px dashed #e2e6f6; }
#purse-pop .pu-mods b { color: #2f9e44; }
#purse-pop .pu-mods b.neg { color: #d9480f; }
#purse-pop .pu-left { margin: 4px 10px; }
#purse-pop .pu-left b { color: #7c48cc; font-size: 14px; font-variant-numeric: tabular-nums; }
#purse-pop .pu-left small { color: var(--sub); margin-left: 4px; }
#purse-pop .pu-cards { margin: 6px 10px 0; display: flex; flex-direction: column; gap: 2px; }
#purse-pop .pu-cards div { display: flex; align-items: center; gap: 4px; }
#purse-pop .pu-cards span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#purse-pop .pu-cards small, #purse-pop .pu-sub { color: var(--sub); }
#purse-pop .pu-sub { margin: 6px 10px 0; font-size: 11px; }
#purse-pop .pu-none { margin: 8px 10px 0; }
/* phones: a bigger touch area round the small icon */
html.phone .money .fortune { padding: 7px; margin: -7px -5px -7px -3px; }

/* css/hud.css?v=7 */
/* The top-left status block and the bottom-left level bar (index.html #status, #exp; js/game.js setPortrait / showJob).
   Loaded after css/mobile.css: the phone sizes are set here too. --tc = the character type's colour. */

/* ---------- top left: portrait, job ribbon, name, HP / MP, gold ---------- */
#status { --tc: #4f78c8; align-items: flex-start; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 40px 14px 14px 40px;
  background: linear-gradient(100deg, rgba(20, 28, 70, .62), rgba(20, 28, 70, .28) 75%, transparent); }
.pwrap { position: relative; flex: 0 0 auto; padding-bottom: 6px; }
#status .portrait { width: 60px; height: 60px; border: 0; padding: 0; box-sizing: border-box; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #fff 0, #eef3ff 45%, color-mix(in srgb, var(--tc) 35%, #dfe6ff) 100%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--tc), 0 0 0 6px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .45); transition: transform .12s, filter .12s; }
#status .portrait:hover { transform: scale(1.05); filter: brightness(1.06); }
#status .portrait:active { transform: scale(.97); }
#status .portrait .face { position: absolute; inset: 0; background: none; }
#status .portrait .face img { position: absolute; display: block; max-width: none; height: auto; image-rendering: pixelated; pointer-events: none; }
.pjob { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); max-width: 84px; padding: 1px 8px; border-radius: 9px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: var(--tc); border: 1.5px solid #fff; color: #fff; font-size: 10.5px; font-weight: bold; line-height: 14px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35); box-shadow: 0 2px 4px rgba(0, 0, 0, .35); pointer-events: none; }
.pjob[hidden] { display: none; }
#status .bars { padding-top: 3px; }
#status .name { font-size: 14px; font-weight: bold; letter-spacing: .5px; margin-bottom: 3px; }

/* ---------- bottom left: Lv · TM · 經驗 % · TM % ---------- */
#exp { align-items: center; gap: 10px; padding: 3px 12px 3px 4px; }
#exp .xp-chip { position: static; transform: none; display: inline-flex; align-items: baseline; gap: 3px; padding: 1px 9px; border-radius: 10px; border: 1.5px solid #fff;
  color: #fff; font-size: 11px; font-weight: bold; line-height: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
#exp .xp-lv { background: linear-gradient(#ffb347, #f08a12); }
#exp .xp-lv b { color: #fff; font-size: 13px; }
#exp .xp-tm { background: linear-gradient(#5a8cf0, #2f5fc8); }
#exp .xp-pc:first-of-type { margin-left: 8px; }   /* the percentages pushed a little to the right of the two levels */
#exp .xp-pc { white-space: nowrap; }
/* the state icons (#buffs) sit under the gold line on desktops too, as on phones (user: 電腦版的增益狀態跑到左下了,
   手機版的是正確): css/ui.css places them (left 84, top 86); no bottom-left position here any more */
/* phones: the state icons under the status block, which is a little taller now */
/* (2026-11-25, user: 「上方技能跟卷軸欄位下移了 狀態欄位可以從更左邊開始排列了」) both rows are under the whole block, the
   portrait too, so they start at the left edge (were indented past the portrait at 66) and may run wider */
@media (max-height: 540px) and (orientation: landscape) { html.phone #buffs { top: 82px; left: 8px; max-width: 260px; } html.phone #scroll-buffs { top: 105px; left: 8px; }
  html.phone #tracker, html.phone #side-buttons { top: 130px; } }

/* ---------- small screens / phones ---------- */
@media (max-width: 900px), (max-height: 540px) {
  #status { padding: 3px 8px 3px 3px; gap: 6px; }
  #status .portrait { width: 48px; height: 48px; }
  .pjob { font-size: 9.5px; line-height: 12px; padding: 0 6px; max-width: 70px; }
  #status .name { font-size: 12px; }
  #exp { gap: 6px; padding: 2px 8px 2px 3px; }
  #exp .xp-chip { font-size: 10px; line-height: 14px; padding: 0 7px; }
  #exp .xp-lv b { font-size: 11px; }
  #exp .xp-pc:first-of-type { margin-left: 4px; }
}
/* the head picture (face_chrNNN, game.js faceSrc) fills the ring as drawn art, not pixel-doubled */
#status .portrait .face img.head { image-rendering: auto; object-fit: cover; }

/* the minimap's head as thin as its text (2026-11-26, user: 「小地圖上方表頭縮窄一點 太厚了 圖示可縮小到跟字上下一樣高」) */
html #minimap .mm-head { min-height: 0; padding: 1px 4px; line-height: 16px; }
html #minimap .mm-head #mm-tp, html #minimap .mm-head #mm-fold { display: inline-grid; place-items: center; min-width: 18px; min-height: 0; height: 16px; padding: 0 2px; font-size: 13px; line-height: 1; }
html #minimap .mm-head #mm-fold { font-size: 10px; }
/* the state row (心眼, 守護者, skill states …) starts at the far left on computers too, under the portrait — as on phones
   (2026-11-26, user: 「心眼 守護者 不是應該都是從最左側開始嗎」); the scroll buffs' row under it, both clear of the round
   buttons below (they start at 136) */
html:not(.phone) #buffs { left: 12px; top: 88px; max-width: 320px; }
html:not(.phone) #buffs #ts-states { margin-left: 0 !important; }
html:not(.phone) #scroll-buffs { left: 12px; top: 112px; }
html.phone #buffs #ts-states { margin-left: 0 !important; }
/* css/bevel.css?v=1 */
/* Embossed buttons (2026-11-22, user: 「各介面按紐做一點浮雕感覺 不然都看不出他是按紐」).
   Loaded last. Only box-shadow + a light sheen are added, so every button keeps its own colours:
   a light top edge, a darker bottom lip and a small drop shadow; pressed = the lip goes, the button sinks 1px.
   The sheen is an inset shadow, not a gradient, so buttons with a picture of their own keep it. */
:root {
  --bv-up: inset 0 1px 0 rgba(255,255,255,.95), inset 0 10px 10px -6px rgba(255,255,255,.55);
  --bv-lip: inset 0 -3px 0 rgba(30,35,80,.22), inset 0 -10px 10px -8px rgba(30,35,80,.18), 0 2px 3px rgba(20,25,60,.35);
  --bv-in: inset 0 2px 4px rgba(20,25,60,.35), inset 0 -1px 0 rgba(255,255,255,.3);
}

/* window, dialog and panel buttons, the window tabs (.tabs b) */
.win button:not(:disabled), .pn button:not(:disabled),
.dlg-actions button, #dlg button:not(:disabled),
.tabs b, .it-tabs b {
  box-shadow: var(--bv-up), var(--bv-lip);
  border-bottom-color: rgba(30,35,80,.4);
  transition: box-shadow .08s, transform .06s, filter .12s;
}
.win button:not(:disabled):hover, .pn button:not(:disabled):hover,
.dlg-actions button:hover, #dlg button:not(:disabled):hover,
.tabs b:hover, .it-tabs b:hover { filter: brightness(1.06); }
.win button:not(:disabled):active, .pn button:not(:disabled):active,
.dlg-actions button:active, #dlg button:not(:disabled):active,
.tabs b:active, .it-tabs b:active { box-shadow: var(--bv-in); transform: translateY(1px); }

/* the chosen tab reads as pressed in */
.tabs b.on, .it-tabs b.on, .win button.on, .pn button.on { box-shadow: var(--bv-in); }

/* the window's ✕ */
.win-head button { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.3); }

/* css/cosm.css?v=2 */
/* 外觀收藏 (2026-12-04, js/cosm.js): the .pn window look (css/panels.css); prefix cz- (cs- is the character select's) */
.pn.cosm { min-width: 0; }
.pn .cz-tabs { display: flex; flex-wrap: nowrap; gap: 4px; }
.pn .cz-tabs button { flex: 1 1 0; min-width: 0; white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.cz-stage { position: relative; height: 112px; border-radius: 10px; margin: 8px 0; overflow: hidden;
  background: linear-gradient(180deg, #5a7a52 0%, #48663f 58%, #3c5636 100%); box-shadow: inset 0 0 0 1px rgba(20, 30, 20, .35); }
.cz-stage canvas { position: absolute; left: 0; top: 0; width: 100%; height: 76px; }
.cz-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 10px; background: rgba(12, 16, 30, .62); color: #eef2ff;
  display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.35; }
.cz-cap b { white-space: nowrap; color: #ffe9a6; }
.cz-cap span { color: #d4dcf4; }
.cz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.cz-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 7px; border-radius: 9px; cursor: pointer;
  background: #fff; border: 1px solid #d7ddf1; box-shadow: 0 1px 2px rgba(40, 60, 140, .12); }
.cz-card:hover { border-color: #9fb0e8; }
.cz-card.sel { border-color: var(--pn-acc, #5b6fd8); box-shadow: 0 0 0 2px rgba(91, 111, 216, .28); }
.cz-card.wearing { background: #fffaf0; }
.cz-card canvas { width: 100%; height: 40px; border-radius: 6px; background: #4f6e48; }
.cz-card.locked canvas { filter: saturate(.55) brightness(.85); }
.cz-card b { font-size: 12px; color: #2e3560; }
.cz-chip { font-size: 10px; padding: 0 7px; border-radius: 8px; background: #e4e9f8; color: #4b5280; }
.cz-chip.on { background: #ffd76e; color: #3a2400; font-weight: 700; }
.cz-chip.off { background: #eeeeee; color: #8a8f9a; }
.cz-card button { font-size: 11px; padding: 2px 10px; margin-top: 1px; }
html.phone .cz-grid { max-height: 220px; }
html.phone .cz-stage { height: 96px; }
html.phone .cz-stage canvas { height: 62px; }
/* css/chat.css?v=8 */
/* 星夢物語 — the chat log's look and size (js/chat.js). 2026-11-26.
   user: 「聊天對話 字體調整 目前看起來很花 費眼睛」「聊天視窗 要可以自訂大小」

   What made it tiring to read: 12 px lines with a blurred glow, a bright pill (green / blue / orange) in front of every
   line — the pale channel-coloured name on it could not be read — and another loud colour on every line. Now:
   - a whole line is one size (--chat-fs: the player's choice, 設定 › 介面 or the ◐ in the chat box) at 1.45 line height,
     with a thin dark edge round the strokes instead of the glow, so they stay sharp on any map;
   - the speaker is plain bold text with 「：」 after it, no pill; a system line has no label, its softer colour says it
     (the 「⚙ 系統」 text stays in the page: ambience.js / powerlock.js / awaken.js read the lines);
   - calmer channel colours of about the same lightness.
   Size: body.chat-w / body.chat-h + --chat-w / --chat-h (the ⤡ handle on the open log's top-right corner, or the sliders
   of the ◐ pop-up); without them the widths and heights of ui.css / mobile.css stay.
   Loaded after ui.css / mobile.css / items.css: this file replaces what they say about the log's text. */

/* ---------- the lines ---------- */
#chatlog { --chat-edge: rgba(6, 8, 18, .86); gap: 1px; }
/* 聊天閒置淡出 (js/chat.js setupFade, 2026-12-04): no new line for a while → the shut log fades; a new line brings it back */
#chatlog { transition: opacity .6s; }
body.chat-idle #chatlog:not(.scroll) { opacity: .28; }
#chatlog .msg { font-size: var(--chat-fs, 13px); line-height: 1.45; font-weight: 400; color: #eef1f8; overflow-wrap: anywhere;
  text-shadow: 1px 0 0 var(--chat-edge), -1px 0 0 var(--chat-edge), 0 1px 0 var(--chat-edge), 0 -1px 0 var(--chat-edge), 0 1px 3px rgba(0, 0, 0, .5);
  animation: chat-in .16s ease-out; }
/* phones lay the page out larger and show it smaller (js/mobile.js): one size up keeps it readable */
html.phone #chatlog .msg { font-size: var(--chat-fs, 14px); }
@keyframes chat-in { from { opacity: 0; } }
/* who speaks: the name, then 「：」 */
#chatlog .msg .tag { background: none; border-radius: 0; padding: 0; margin: 0; font-size: inherit; font-weight: 700; color: #f6cd8b; text-shadow: inherit; }
#chatlog .msg .tag::after { content: '：'; font-weight: 400; }
#chatlog .msg .tag:empty { display: none; }
#chatlog .msg .tag.me { color: #9bd0fc; }
#chatlog .msg.sys { color: #e6dfc0; }
/* 2026-11-26 (user: 「系統訊息標註系統訊息」): a system line starts with a plain 「[系統]」 in a muted blue (no pill) */
#chatlog .msg.sys .tag { display: inline; font-weight: 600; color: #9fb0dc; }
#chatlog .msg.sys .tag::before { content: '['; }
#chatlog .msg.sys .tag::after { content: '] '; font-weight: 600; }
/* lines folded into one (js/chat.js fold): ×n after the text */
#chatlog .msg .cnt { color: #9fb0dc; font-weight: 600; font-variant-numeric: tabular-nums; }
/* 顯示的訊息: the kinds the player unticked (js/chat.js, trickster.chatshow) */
#chatlog.hide-map .msg[data-cat="map"], #chatlog.hide-p .msg[data-cat="p"], #chatlog.hide-g .msg[data-cat="g"],
#chatlog.hide-all .msg[data-cat="all"], #chatlog.hide-bc .msg[data-cat="bc"], #chatlog.hide-w .msg[data-cat="w"],
#chatlog.hide-fight .msg[data-cat="fight"], #chatlog.hide-loot .msg[data-cat="loot"], #chatlog.hide-state .msg[data-cat="state"],
#chatlog.hide-hint .msg[data-cat="hint"], #chatlog.hide-sys .msg[data-cat="sys"] { display: none !important; }
/* one colour per channel (the name and the text) */
#chatlog .msg.ch-p, #chatlog .msg.ch-p .tag { color: #a9e8b4; }
#chatlog .msg.ch-g, #chatlog .msg.ch-g .tag { color: #f3cb82; }
#chatlog .msg.ch-all, #chatlog .msg.ch-all .tag { color: #a3d7f6; }
#chatlog .msg.ch-bc, #chatlog .msg.ch-bc .tag { color: #ffb693; }
#chatlog .msg.ch-bc { font-weight: 600; }
#chatlog .msg.ch-w, #chatlog .msg.ch-w .tag { color: #f2b6ee; }
/* the pictures of the items a system line names follow the text size */
#chatlog .ii { width: 1.4em; height: 1.4em; margin: -.3em 2px -.2em 1px; }
/* what is typed: the game's font, the log's size (the box itself stays 28 px tall). The box stands on the Lv / EXP line
   while it is open (js/chat.js keeps the log where it is and puts the box under it): dark enough to cover that text */
#chat-input { font-family: inherit; font-size: clamp(13px, var(--chat-fs, 13px), 16px); background: rgba(16, 20, 38, .95); }
html.phone #chat-input { font-size: clamp(13px, var(--chat-fs, 14px), 16px); }
#chat-input::placeholder { color: rgba(255, 255, 255, .55); }

/* ---------- the height the layout gives (the player's own: below). A little more than before (150 / 96 / 84 px): the
   lines are taller, and as many of them should show — seven on a desktop, five on a phone ---------- */
#chatlog { max-height: 160px; }
@media (max-width: 900px), (max-height: 540px) { #chatlog { max-height: 122px; } }
@media (max-width: 700px) and (orientation: portrait) { #chatlog { max-height: 104px; } }
/* ---------- shut: the newest lines that fit the height; the oldest one fades out at the top instead of being cut ---------- */
#chatlog:not(.scroll) { padding-top: 14px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px); mask-image: linear-gradient(to bottom, transparent 0, #000 14px); }
#chatlog:not(.scroll) > .msg { flex: none; }
#chatlog:not(.scroll) > .msg:nth-last-child(n+41) { display: none; }
/* ---------- open (the chat box shown): a window of the full height (as tall as max-height lets it be), every kept
   line, the newest at the bottom ---------- */
#chatlog.scroll { display: flex; flex-direction: column; justify-content: flex-start; height: var(--chat-h, 999px); border: 1px solid rgba(255, 255, 255, .16); }
#chatlog.scroll > .msg { flex: none; margin: 0; }
#chatlog.scroll > .msg:first-child { margin-top: auto; }

/* ---------- the player's own size ---------- */
body.chat-w #chatlog, body.chat-w #chat-input { width: min(var(--chat-w), calc(100vw - var(--chat-x, 8px) - 8px)) !important; }
body.chat-h #chatlog { max-height: min(var(--chat-h), calc(100vh - var(--chat-y, 46px) - 42px)) !important; }
/* the ⤡ handle on the open log's top-right corner (js/chat.js setupSize): drag = width and height, double click = default */
#ch-size { position: fixed; z-index: 31; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(30, 36, 60, .92); color: #fff; font-size: 12px; line-height: 20px; cursor: nesw-resize; touch-action: none; }
html.phone #ch-size { width: 28px; height: 28px; font-size: 14px; line-height: 26px; }
body.npc-talk #ch-size, body.npc-talk #ch-size-tip { display: none !important; }
body.chat-sizing #chatlog { outline: 1px dashed rgba(255, 255, 255, .75); outline-offset: 0; }
#ch-size-tip { position: fixed; z-index: 32; padding: 1px 7px; border-radius: 9px; background: rgba(20, 24, 44, .92); border: 1px solid rgba(255, 255, 255, .35);
  color: #fff; font-size: 12px; line-height: 18px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }

/* ---------- the ◐ pop-up: 聊天視窗設定 (size, font, see-through) ---------- */
#ch-alpha { width: 260px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; }
#ch-alpha .ca-g { margin: 8px 0 2px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12px; color: #aebbe6; }
#ch-alpha .ca-g:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
#ch-alpha label { margin: 4px 0; }
#ch-alpha label b { width: 3.4em; }
#ch-alpha .ca-tip { margin: 4px 0 0; font-size: 11.5px; line-height: 1.4; color: #aebbe6; }
/* 設定 › 介面 › 聊天頻道／系統訊息: several may be on at once; they wrap on a narrow window */
.stg-wrap .stg-seg.stg-multi { flex-wrap: wrap; gap: 2px; max-width: 100%; }
.stg-wrap .stg-seg.stg-multi button { min-width: 0; padding: 0 9px; }
.stg-wrap .stg-seg.stg-multi button:not(.on) { text-decoration: line-through; opacity: .7; }
/* 顯示的訊息: tick boxes, three a row */
#ch-alpha .ca-sub { margin: 4px 0 2px; font-size: 11.5px; color: #8e9bc4; }
#ch-alpha .ca-cks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 6px; }
#ch-alpha label.ca-ck { display: flex; align-items: center; gap: 5px; margin: 0; min-height: 26px; cursor: pointer; font-size: 12.5px; }
#ch-alpha label.ca-ck span { width: auto; flex: 1; min-width: 0; white-space: nowrap; }
#ch-alpha label.ca-ck input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: #8fb4ff; }
html.phone #ch-alpha label.ca-ck { min-height: 32px; font-size: 13.5px; }
html.phone #ch-alpha label.ca-ck input { width: 18px; height: 18px; }
#ch-alpha .ca-f { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
#ch-alpha .ca-f button.ok { background: #4f74e6; border-color: #7f9bf5; }

/* ---------- 2026-12-04 聊天功能 (js/chat.js): the name menu, 貼圖, 提到我 ---------- */
/* a name in the log opens the menu: the hand says so */
#chatlog .msg .tag[data-name] { cursor: pointer; }
#chatlog .msg .tag[data-name]:hover { text-decoration: underline; text-underline-offset: 2px; }
/* the name menu: the player menu's look (css/social.css #so-menu) */
#ch-menu { position: fixed; z-index: 9100; min-width: 150px; background: #1e2540; border: 1px solid #6d86c8; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5); padding: 4px; color: #eef2ff; }
#ch-menu .ch-menu-h { padding: 4px 8px 6px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 3px; }
#ch-menu .ch-menu-h .so-fr { color: #ff9bf5; font-weight: 600; }
#ch-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 6px 8px;
  border-radius: 5px; cursor: pointer; font-size: 13px; }
#ch-menu button:hover { background: rgba(120, 170, 255, .2); }
#ch-menu button.ch-rep { color: #ffb3b3; }
/* the ☺ button beside ◐ (same round button), a small drawn face — no emoji */
#ch-st-btn { position: fixed; z-index: 30; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(30, 36, 60, .92); cursor: pointer; display: grid; place-items: center; }
#ch-st-btn i { width: 13px; height: 13px; border-radius: 50%; background: #ffd76e; position: relative;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); }
#ch-st-btn i::before { content: ''; position: absolute; left: 3px; top: 4px; width: 2px; height: 2px; background: #3a2400; box-shadow: 5px 0 0 #3a2400; }
#ch-st-btn i::after { content: ''; position: absolute; left: 3px; top: 6px; width: 7px; height: 4px; border-bottom: 2px solid #3a2400; border-radius: 0 0 5px 5px; box-sizing: border-box; }
body.npc-talk #ch-st-btn, body.npc-talk #ch-st-pop, body.npc-talk #ch-menu { display: none !important; }
/* the picker over the chat box */
#ch-st-pop { position: fixed; z-index: 31; width: 292px; max-height: 236px; overflow-y: auto; overscroll-behavior: contain;
  background: #1e2540; border: 1px solid #6d86c8; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); padding: 6px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; scrollbar-width: thin; }
#ch-st-pop .ch-st-h { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; color: #eef2ff; font-size: 13px; padding: 0 2px 2px; }
#ch-st-pop .ch-st-h span { color: #aab6d8; font-size: 11px; }
#ch-st-pop button { height: 42px; padding: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .06);
  border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
#ch-st-pop button:hover, #ch-st-pop button:focus-visible { background: rgba(120, 170, 255, .2); border-color: #8aa0e8; outline: none; }
#ch-st-pop button i { display: block; image-rendering: pixelated; }
html.phone #ch-st-pop { width: 330px; }
html.phone #ch-st-pop button { height: 48px; }
/* a sticker line: the name, then the picture (no frame or background in the log) */
#chatlog .msg canvas.ch-st { display: inline-block; vertical-align: bottom; margin: 1px 0 1px 2px; image-rendering: pixelated; }
/* a line that names this character: a thin gold edge on the left, the text as it was */
#chatlog .msg.ch-at { box-shadow: inset 2px 0 0 #ffd76e; padding-left: 5px; }
/* css/compact.css?v=3 */
/* 星夢物語 網頁版 — 手機視窗精簡（2026-11-27，user: 「把所有介面內的留白都縮小 不需要留那麼多白 且把字全都精簡
   可以拿掉的字就拿掉 看得懂就好」）。只作用在手機（html.phone，js/mobile.js），最後載入，蓋過各模組的留白。
   長的說明文字由 js/ui.js markHints() 標上 .ts-hint，這裡藏起來。 */

html.phone .ts-hint { display: none !important; }

/* 視窗標題列與內距 */
html.phone .win-head { padding: 2px 6px 2px 8px; gap: 4px; font-size: 13px; }
html.phone .win-head img { height: 18px; }
html.phone .win-head button { width: 22px; height: 22px; }
html.phone .win:not(#win-tarot):not(#win-settings):not(#win-shop) > .win-body { padding: 4px 6px !important; }
html.phone .win h4 { margin-top: 0; margin-bottom: 3px !important; }
html.phone .win p { margin-top: 2px; margin-bottom: 2px; }
/* 觸控按鈕原本至少 34 高，改 28 */
html.phone .win-body button, html.phone .win-body select, html.phone .win .search { min-height: 28px; }

/* 選單：「自訂」放一整列最上面，不再佔掉半邊 */
html.phone #win-menu .ui-edit-bar { grid-column: 1 / -1; margin: 0 0 2px; justify-content: flex-end; gap: 6px; }
html.phone #win-menu .ui-edit-bar .sub { flex: 1; min-width: 0; }
html.phone #win-menu .ui-edit-bar .sub:empty { display: none; }
html.phone #win-menu .ui-edit-bar button { min-height: 24px; padding: 2px 10px; }
html.phone #win-menu .ui-group { margin: 0 0 3px; }
html.phone #win-menu .ui-group h4 { margin: 0 0 2px !important; }
html.phone #win-menu .ui-tiles { gap: 3px; }
html.phone #win-menu .ui-tile { min-height: 48px; padding: 3px 2px; }

/* 商店／兌換／工作台的大標題列：圖示和重複視窗標題的大字拿掉，只留一行小字 */
html.phone .win .pn-hero { padding: 3px 8px !important; min-height: 0 !important; margin-bottom: 4px !important; gap: 6px; }
html.phone .win .pn-hero .pn-emb, html.phone .win .pn-hero .pn-ht > b { display: none; }
html.phone .win .pn-hero small:empty, html.phone .win .pn-tip { display: none; }

/* 自動戰鬥／自動挖地 */
html.phone .ap-wrap { gap: 5px; }
html.phone .ap-tabs { width: 52px; gap: 4px; }
html.phone .ap-tab { padding: 3px 2px; font-size: 10.5px; gap: 1px; }
html.phone .ap-tab img { width: 22px; height: 22px; }
html.phone .ap-top { margin-bottom: 4px; gap: 4px 6px; }
html.phone .ap-go { min-width: 0; padding: 4px 14px; }
html.phone .ap-state { padding: 3px 7px; flex-basis: 80px; }
html.phone .ap-state span:empty { display: none; }
html.phone .ap-cols, html.phone #win-autoplay .ap-p-fight .ap-cols { gap: 4px 6px; }
html.phone .ap-col { gap: 4px; }
html.phone .ap-sec { padding: 3px 6px !important; }
html.phone .ap-sup { padding: 2px 0 !important; gap: 2px 6px; }
html.phone .ap-slot { padding: 1px 0; gap: 2px 4px; }
html.phone .ap-sel { min-height: 26px; padding: 2px 6px; }
html.phone .ap-gap button { width: 26px; height: 26px; min-height: 0; }
html.phone .ap-gap input { height: 26px; min-height: 0; width: 40px; }
html.phone .ap-line { margin: 2px 0; gap: 4px; }
html.phone .ap-row { padding: 1px 0; }
html.phone .ap-pct input[type="range"] { height: 22px; }
/* 守護者技能 under 輔助技能 (the middle column), not left alone at the bottom with a gap above it */
html.phone #win-autoplay .ap-p-fight .ap-s-buff { grid-row: 1; }
html.phone #win-autoplay .ap-p-fight .ap-s-awk { grid-column: 2; grid-row: 2; }
