﻿/* ==========================================================================
   火王小镇 · Millbrook Edition
   深色奇幻工坊主题，纯 CSS / 无外部依赖
   ========================================================================== */
:root {
    --bg: #070b11;
    --bg-2: #0b111a;
    --surface: rgba(17, 25, 36, .88);
    --surface-2: rgba(23, 34, 48, .92);
    --surface-3: rgba(30, 43, 60, .66);
    --line: #243247;
    --line-soft: rgba(120, 150, 185, .14);
    --text: #e8eef7;
    --muted: #9db3c9;
    --muted-2: #7d95ae;
    --gold: #e7b75f;
    --gold-2: #f7dda4;
    --gold-dim: rgba(231, 183, 95, .14);
    --teal: #5eead4;
    --teal-dim: rgba(94, 234, 212, .12);
    --blue: #7dd3fc;
    --red: #f87171;
    --green: #86efac;
    --purple: #c4b5fd;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .42);
    --font-head: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
    --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-2); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2b3b52; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(231, 183, 95, .25); color: #fff; }

/* ------------------------------ 背景 ------------------------------ */
#bg-art {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 72% 18%, rgba(60, 96, 140, .22), transparent 55%),
        radial-gradient(ellipse at 20% 82%, rgba(190, 118, 48, .10), transparent 50%),
        linear-gradient(180deg, rgba(6, 10, 16, .30), rgba(6, 10, 16, .78) 62%, #070b11 100%),
        url("../assets/town.svg") center 34% / cover no-repeat,
        #070b11;
    filter: saturate(.88);
}
#bg-art::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 11, 17, .82), transparent 32%, transparent 70%, rgba(7, 11, 17, .7)),
        radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, .7), transparent 60%);
}
#bg-embers { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#bg-embers span {
    position: absolute; width: 3px; height: 3px; border-radius: 50%;
    background: #ffb45e; box-shadow: 0 0 10px 2px rgba(255, 160, 70, .35);
    opacity: 0; animation: ember-rise linear infinite;
}
@keyframes ember-rise {
    0% { transform: translate3d(0, 30px, 0) scale(.7); opacity: 0; }
    12% { opacity: .8; }
    80% { opacity: .35; }
    100% { transform: translate3d(40px, -68vh, 0) scale(1.1); opacity: 0; }
}

/* ------------------------------ 通用 ------------------------------ */
.card {
    position: relative;
    background: linear-gradient(155deg, rgba(23, 34, 48, .92), rgba(12, 18, 27, .94));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, .035), transparent 28%);
}
.eyebrow { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.gold { color: var(--gold-2); }
.teal { color: var(--teal); }
.red { color: var(--red); }
.green { color: var(--green); }
.serif { font-family: var(--font-head); }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-18 { margin-top: 18px; }
.hidden { display: none !important; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: .015em; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--line);
    background: rgba(31, 44, 60, .7);
    color: var(--text);
    padding: 9px 16px;
    border-radius: 9px;
    font-weight: 650;
    font-size: 13px;
    transition: .18s ease;
    white-space: nowrap;
}
.btn:hover { border-color: #425a76; background: rgba(42, 59, 80, .9); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, #1d6fa5, #15557f); border-color: #3e96c9; color: #eaf7ff; box-shadow: 0 6px 20px rgba(30, 120, 180, .22); }
.btn-primary:hover { background: linear-gradient(135deg, #2584c2, #1a6495); border-color: #67c4f4; }
.btn-gold { background: linear-gradient(135deg, #c6913c, #9b6a22); border-color: #e7b75f; color: #1b1206; box-shadow: 0 6px 20px rgba(231, 183, 95, .18); }
.btn-gold:hover { background: linear-gradient(135deg, #e0ab55, #b37b2b); border-color: #f7dda4; }
.btn-teal { background: linear-gradient(135deg, #227f72, #155b52); border-color: #5eead4; color: #eafffb; }
.btn-danger { background: rgba(90, 30, 34, .7); border-color: #7f3138; color: #fecaca; }
.btn-danger:hover { background: rgba(120, 38, 44, .85); border-color: #c45a63; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: #425a76; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 6px; }
.btn-wide { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; }

.icon-btn {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
    background: rgba(17, 25, 36, .7); color: var(--muted); font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; transition: .18s;
}
.icon-btn:hover { color: var(--gold-2); border-color: var(--gold); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.field span { letter-spacing: .04em; }
.field input, .field select, .field textarea, .input, .select {
    width: 100%; background: rgba(8, 13, 20, .72); border: 1px solid var(--line);
    border-radius: 9px; padding: 11px 13px; color: var(--text); outline: none;
    transition: .18s; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus {
    border-color: #4c769c; box-shadow: 0 0 0 3px rgba(80, 140, 190, .12);
}
.field input::placeholder { color: #516579; }
.select { padding: 9px 11px; }
textarea.input { resize: vertical; min-height: 80px; }

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 650;
    background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line-soft);
}
.chip.gold { color: var(--gold-2); background: var(--gold-dim); border-color: rgba(231,183,95,.25); }
.chip.teal { color: var(--teal); background: var(--teal-dim); border-color: rgba(94,234,212,.2); }
.chip.red { color: #fecaca; background: rgba(180, 50, 60, .15); border-color: rgba(200,80,80,.25); }

.bar { height: 7px; background: rgba(3, 8, 14, .8); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82c4, #7dd3fc); transition: width .35s ease; }
.bar.gold > i { background: linear-gradient(90deg, #a97724, #f7dda4); }
.bar.teal > i { background: linear-gradient(90deg, #1f8a7c, #5eead4); }
.bar.red > i { background: linear-gradient(90deg, #9f3a3a, #f87171); }
.good { color: #86efac; }
.warn { color: #f7dda4; }
.bad { color: #fca5a5; }
.bar.good > i { background: linear-gradient(90deg, #3f9b63, #86efac); }
.bar.warn > i { background: linear-gradient(90deg, #a97724, #f7dda4); }
.bar.bad > i { background: linear-gradient(90deg, #9f3a3a, #f87171); }
.bar.lg { height: 10px; }

.form-error {
    background: rgba(120, 30, 36, .25); border: 1px solid rgba(200, 80, 80, .35);
    color: #fecaca; padding: 8px 11px; border-radius: 8px; font-size: 12px;
}
.form-note { color: var(--muted-2); font-size: 11px; line-height: 1.55; }

/* ==========================================================================
   登录
   ========================================================================== */
.auth-screen {
    position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 34px 28px 20px;
}
.auth-wrap {
    width: min(1180px, 100%);
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px);
    gap: 64px; align-items: center;
}
.auth-intro { padding: 18px 0; }
.brand-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 46px; }
.brand-mark { width: 46px; height: 46px; filter: drop-shadow(0 0 18px rgba(231,183,95,.25)); }
.brand-mark.small { width: 34px; height: 34px; }
.brand-name { font-family: var(--font-head); font-size: 22px; letter-spacing: .12em; color: #f6ead5; }
.brand-sub { font-size: 8px; letter-spacing: .28em; color: var(--gold); margin-top: 2px; }
.auth-intro h1 {
    font-size: clamp(40px, 5.2vw, 64px); line-height: 1.18; letter-spacing: .02em;
    color: #f4f7fb; text-shadow: 0 12px 50px rgba(0,0,0,.6);
}
.auth-intro h1 em { font-style: normal; color: var(--gold-2); text-shadow: 0 0 38px rgba(231,183,95,.25); }
.auth-lead { max-width: 520px; color: #b3c2d3; line-height: 1.85; font-size: 15px; margin: 24px 0 30px; }
.auth-features { display: flex; gap: 12px; flex-wrap: wrap; }
.auth-feature {
    background: rgba(17, 26, 38, .62); border: 1px solid var(--line);
    border-radius: 12px; padding: 13px 15px; min-width: 138px; backdrop-filter: blur(8px);
}
.auth-feature span { display: block; font-size: 20px; margin-bottom: 5px; }
.auth-feature b { display: block; font-size: 12px; color: #e4edf7; }
.auth-feature small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.auth-foot { margin-top: 34px; display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 11px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(94,234,212,.12); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(94,234,212,.02); opacity: .7; } }

.auth-panel { padding: 30px; backdrop-filter: blur(18px); }
.auth-panel-head h2 { font-size: 26px; margin: 7px 0 6px; }
.auth-panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; background: rgba(5, 10, 16, .55); padding: 4px; border-radius: 10px; margin: 22px 0 18px; }
.auth-tab { border: 0; background: transparent; color: var(--muted); padding: 9px; border-radius: 7px; font-weight: 650; font-size: 13px; }
.auth-tab.active { background: #1c2a3b; color: var(--gold-2); box-shadow: inset 0 0 0 1px #34465e; }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 10px; letter-spacing: .15em; margin: 18px 0 14px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-note { color: var(--muted-2); font-size: 10px; line-height: 1.6; text-align: center; margin: 12px 0 0; }
.auth-bottom { width: min(1180px, 100%); display: flex; justify-content: space-between; color: #4e6278; font-size: 10px; margin-top: 38px; letter-spacing: .04em; }

/* ==========================================================================
   主框架
   ========================================================================== */
.app { position: relative; z-index: 2; display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar {
    width: 232px; flex: 0 0 232px; padding: 22px 14px 16px;
    background: linear-gradient(180deg, rgba(11, 17, 25, .94), rgba(7, 11, 17, .96));
    border-right: 1px solid var(--line); backdrop-filter: blur(16px);
    display: flex; flex-direction: column; z-index: 20;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.side-brand .brand-name { font-size: 17px; }
.side-brand .brand-sub { font-size: 7px; }
.nav { flex: 1; overflow-y: auto; padding-right: 2px; padding-bottom: 12px; }
.nav-group { margin-bottom: 11px; }
.nav-label { font-size: 9px; letter-spacing: .22em; color: #4d647c; padding: 0 10px 5px; text-transform: uppercase; }
.nav-item {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border: 1px solid transparent; border-radius: 9px;
    background: transparent; color: #91a6bc; font-size: 13px; font-weight: 550; text-align: left;
    transition: .16s; margin-bottom: 2px; position: relative;
}
.nav-item .ni { width: 20px; text-align: center; font-size: 15px; filter: grayscale(.25); }
.nav-item .nb {
    margin-left: auto; font-size: 10px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--gold); color: #1d1405; display: inline-flex;
    align-items: center; justify-content: center; font-weight: 800;
}
.nav-item .nb.alert { background: #ef4444; color: #fff; box-shadow: 0 0 9px rgba(239,68,68,.55); }
.mn-item { position: relative; }
.mn-badge { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 9px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: #ef4444; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.nav-item:hover { background: rgba(255,255,255,.04); color: #dbe7f3; }
.nav-item.active { background: linear-gradient(90deg, rgba(231,183,95,.13), rgba(231,183,95,.02)); color: var(--gold-2); border-color: rgba(231,183,95,.16); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 14px rgba(231,183,95,.5); }
.side-foot { padding: 12px 8px 0; border-top: 1px solid var(--line-soft); }
.server-pill { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted-2); }
.side-version { font-size: 9px; color: #3e536a; margin-top: 5px; letter-spacing: .12em; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    min-height: 76px; height: auto; flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
    padding: 10px 22px; border-bottom: 1px solid var(--line);
    background: rgba(8, 13, 20, .72); backdrop-filter: blur(16px); z-index: 15;
}
.top-title { min-width: 150px; } .top-actions { margin-left: auto; }
.news-ticker { flex: 0 0 32px; display: flex; align-items: center; gap: 10px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(5, 10, 16, .82); overflow: hidden; }
.news-ticker[hidden] { display: none; }
.news-label { flex: 0 0 auto; color: var(--gold); border: 1px solid rgba(231,183,95,.35); background: rgba(231,183,95,.08); border-radius: 4px; padding: 2px 7px; font-size: 9px; letter-spacing: .12em; }
.news-viewport { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.news-track { display: inline-block; padding-left: 100%; white-space: nowrap; font-size: 11px; color: #dbe7f3; animation: ticker-scroll 22s linear infinite; will-change: transform; }
.news-track .ticker-link { color: #8be9d4; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.news-track .ticker-sep { color: #64748b; padding: 0 12px; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (max-width: 880px) {
    .news-ticker { flex-basis: 30px; padding: 0 12px; gap: 7px; }
    .news-track { font-size: 10px; }
}
.top-title h1 { font-size: 21px; margin-top: 2px; white-space: nowrap; }
.resource-rail { display: flex; align-items: center; align-content: center; flex-wrap: wrap; gap: 6px 7px; flex: 1 1 520px; min-width: 0; max-height: 96px; overflow-x: hidden; overflow-y: auto; justify-content: flex-end; padding: 1px 2px; }
.res-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px;
    background: rgba(15, 23, 34, .7); border: 1px solid var(--line); border-radius: 8px;
    font-size: 10.5px; white-space: nowrap;
}
.res-chip i { font-style: normal; font-size: 13px; filter: saturate(.9); }
.res-chip b { font-weight: 700; color: #e8eef7; font-variant-numeric: tabular-nums; }
.res-chip.gold b { color: var(--gold-2); }
.res-more { border-style: dashed; color: var(--gold-2); background: rgba(231,183,95,.06); cursor: pointer; }
.res-more:hover { border-color: var(--gold); background: rgba(231,183,95,.12); }
.res-more b { color: var(--gold); }
.res-drawer-groups { display: flex; flex-direction: column; gap: 16px; max-height: 58vh; overflow-y: auto; padding-right: 4px; }
.res-group-title { font-size: 9px; letter-spacing: .18em; color: var(--gold); margin-bottom: 7px; text-transform: uppercase; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 7px; }
.res-tile { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.16); color: var(--text); transition: .15s; }
.res-tile:hover { border-color: #47617e; background: rgba(255,255,255,.035); }
.res-tile.pinned { border-color: rgba(231,183,95,.35); background: rgba(231,183,95,.06); }
.res-tile .ri { font-size: 17px; width: 20px; text-align: center; }
.res-tile .rn { flex: 1; min-width: 0; }
.res-tile .rn b { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-tile .rn small { display: block; color: var(--muted-2); font-size: 9px; margin-top: 1px; }
.res-tile .rp { font-size: 11px; color: var(--gold); }
@media (max-width: 880px) {
    .hunger-mini { display: none; }
    .res-drawer-groups { max-height: 52vh; }
    .res-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.top-actions { display: flex; align-items: center; gap: 9px; }
.hunger-chip { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); color: var(--text); }
.hunger-chip:hover { border-color: #425a76; background: rgba(255,255,255,.05); }
.hunger-ico { font-size: 13px; }
.hunger-mini { width: 38px; height: 5px; border-radius: 999px; background: rgba(0,0,0,.55); overflow: hidden; }
.hunger-mini i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg,#3f9b63,#86efac); transition: width .3s; }
.hunger-chip b { font-size: 10px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 28px; text-align: right; }
.hunger-chip.warn .hunger-mini i { background: linear-gradient(90deg,#a97724,#f7dda4); }
.hunger-chip.warn b { color: var(--gold-2); }
.hunger-chip.bad .hunger-mini i { background: linear-gradient(90deg,#9f3a3a,#f87171); }
.hunger-chip.bad b { color: #fca5a5; }
.hunger-block { padding: 9px 0 2px; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.profile-chip { display: flex; align-items: center; gap: 9px; background: transparent; border: 1px solid var(--line); padding: 5px 10px 5px 5px; border-radius: 10px; color: var(--text); }
.profile-chip:hover { border-color: #425a76; background: rgba(255,255,255,.03); }
.avatar {
    width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, #31577a, #1a2b3e); border: 1px solid #486b8f;
    font-family: var(--font-head); font-weight: 700; color: #dff1ff; font-size: 14px;
}
.profile-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.profile-meta b { font-size: 12px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-meta small { font-size: 9px; color: var(--gold); }

.layout {
    flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px; padding: 18px 22px 28px; max-width: 1580px; width: 100%; margin: 0 auto;
    overflow: hidden;
}
.view { min-width: 0; overflow-y: auto; padding-right: 3px; scroll-behavior: smooth; }
.rail { min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; padding-bottom: 10px; scrollbar-gutter: stable; }
.rail-card { padding: 16px; }
.rail-card h3 { font-size: 14px; margin-bottom: 10px; }
#rail-activity { min-height: 176px; }
.rail-gain-line { min-height: 26px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   页面通用
   ========================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 2px 0 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 28px; }
.page-head .sub { color: var(--muted); margin-top: 5px; font-size: 12px; max-width: 620px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section { margin-bottom: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-head h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.section-head h3::before { content: ""; width: 18px; height: 2px; background: var(--gold); border-radius: 2px; opacity: .8; }
.section-head .hint { color: var(--muted-2); font-size: 11px; }
.grid { display: grid; gap: 12px; }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: 16px; align-items: start; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted-2); font-size: 12px; border: 1px dashed var(--line); border-radius: 12px; }

/* 概览 */
.hero {
    position: relative; overflow: hidden; padding: 26px 28px;
    background:
        radial-gradient(ellipse at 88% 10%, rgba(231,183,95,.14), transparent 48%),
        radial-gradient(ellipse at 8% 100%, rgba(94,234,212,.08), transparent 50%),
        linear-gradient(145deg, rgba(26, 39, 55, .96), rgba(11, 17, 26, .96));
}
.hero::after { content: "⚒"; position: absolute; right: 22px; bottom: -38px; font-size: 190px; color: rgba(231,183,95,.045); transform: rotate(-12deg); pointer-events: none; }
.hero h2 { font-size: 32px; margin: 5px 0 6px; }
.hero p { color: var(--muted); font-size: 13px; margin: 0; max-width: 580px; }
.hero-stats { display: flex; gap: 26px; margin-top: 22px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 21px; font-family: var(--font-head); color: #f4f7fb; }
.hero-stat small { display: block; font-size: 10px; color: var(--muted-2); letter-spacing: .06em; margin-top: 2px; }

.activity-card {
    position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 13px;
    background: linear-gradient(155deg, rgba(23,34,48,.72), rgba(11,17,25,.8));
    transition: .18s; overflow: hidden;
}
.activity-card:hover { border-color: #3b5370; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.activity-card.active { border-color: rgba(94,234,212,.55); box-shadow: 0 0 0 1px rgba(94,234,212,.12), 0 12px 30px rgba(0,0,0,.25); }
.activity-card.active::after { content: "进行中"; position: absolute; top: 10px; right: 10px; font-size: 9px; color: #04221d; background: var(--teal); border-radius: 999px; padding: 2px 7px; font-weight: 800; }
.ac-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ac-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(255,255,255,.045); border: 1px solid var(--line-soft); }
.ac-title b { display: block; font-size: 13px; }
.ac-title small { color: var(--muted-2); font-size: 10px; }
.ac-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; margin-top: 10px; }
.ac-rate { font-size: 12px; color: var(--gold-2); margin-top: 6px; }
.ac-tool { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted-2); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.ac-tool b { color: var(--muted); font-weight: 600; }

.stat-tile { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16,24,35,.55); }
.stat-tile small { color: var(--muted-2); font-size: 10px; letter-spacing: .06em; }
.stat-tile b { display: block; font-size: 22px; margin-top: 4px; font-family: var(--font-head); }
.stat-tile .sub { font-size: 10px; color: var(--muted); margin-top: 3px; }

.task { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.task:last-child { border-bottom: 0; }
.task-icon { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.04); font-size: 15px; }
.task-main { flex: 1; min-width: 0; }
.task-main b { display: block; font-size: 12px; font-weight: 600; }
.task-main small { color: var(--muted-2); font-size: 10px; }
.task-progress { width: 110px; flex: 0 0 110px; }
.task-progress small { display: block; text-align: right; font-size: 9px; color: var(--muted-2); margin-top: 3px; }
.task.done .task-main b { color: var(--green); }

.log-list { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; }
.log-line { display: flex; gap: 8px; padding: 6px 2px; font-size: 11px; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.025); }
.log-line time { color: #4e6278; flex: 0 0 42px; font-variant-numeric: tabular-nums; }
.log-line.rare { color: var(--gold-2); }
.log-line.level { color: var(--teal); }
.log-line.warning { color: #fbbf24; }

/* 采集卡 */
.gather-card { padding: 17px; }
.gather-card .skill-line { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 10px; color: var(--muted-2); }
.gather-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.gather-stat { background: rgba(0,0,0,.18); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 8px; }
.gather-stat small { display: block; font-size: 9px; color: var(--muted-2); }
.gather-stat b { font-size: 12px; color: #dce8f4; }
.rare-line { font-size: 10px; color: var(--purple); margin-top: 8px; display: flex; align-items: center; gap: 5px; }

/* 精炼 */
.refine-flow { display: flex; align-items: center; gap: 10px; margin: 11px 0; }
.refine-node { flex: 1; text-align: center; background: rgba(0,0,0,.2); border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px; }
.refine-node b { display: block; font-size: 12px; }
.refine-node small { font-size: 9px; color: var(--muted-2); }
.refine-arrow { color: var(--gold); font-size: 15px; }

/* 制作 */
.craft-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.craft-list { padding: 11px; max-height: calc(100vh - 210px); overflow-y: auto; }
.craft-group-label { font-size: 9px; color: var(--muted-2); letter-spacing: .18em; padding: 10px 8px 5px; }
.craft-item {
    display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px;
    background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted); text-align: left;
}
.craft-item:hover { background: rgba(255,255,255,.035); color: var(--text); }
.craft-item.active { background: rgba(231,183,95,.08); border-color: rgba(231,183,95,.25); color: var(--gold-2); }
.craft-item .ci { font-size: 17px; width: 22px; text-align: center; }
.craft-item b { font-size: 12px; font-weight: 600; }
.craft-item small { display: block; color: var(--muted-2); font-size: 9px; }
.craft-detail { padding: 22px; }
.craft-hero { display: flex; gap: 15px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.craft-hero .big-icon { width: 64px; height: 64px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 32px; background: radial-gradient(circle, rgba(231,183,95,.16), rgba(255,255,255,.02)); border: 1px solid rgba(231,183,95,.22); }
.craft-hero h3 { font-size: 22px; }
.craft-hero p { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 5px 0 0; }
.cost-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.glyph-list { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.cost-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: rgba(0,0,0,.16); font-size: 11px; }
.cost-row.lack { border-color: rgba(248,113,113,.35); color: #fecaca; }
.cost-row .cr-name { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.cost-row b { font-variant-numeric: tabular-nums; }
.craft-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: stretch; margin-top: 16px; }
.craft-controls .field {
  min-width: 0; padding: 10px 12px; border: 1px solid var(--line-soft);
  border-radius: 10px; background: rgba(0,0,0,.16);
}
.craft-controls .field > span { font-size: 10px; letter-spacing: .05em; }
.craft-controls .field input, .craft-controls .field select { padding: 9px 10px; font-size: 13px; }
.craft-controls .btn-gold { grid-column: 1 / -1; min-height: 42px; }
.quality-odds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.quality-pill { font-size: 9px; padding: 3px 7px; border-radius: 999px; border: 1px solid currentColor; opacity: .9; }
.job-box { margin-top: 15px; padding: 13px; border-radius: 10px; background: rgba(94,234,212,.06); border: 1px solid rgba(94,234,212,.22); }
.job-box .job-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; margin-bottom: 8px; }

/* 背包 */
.equip-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.equip-slot { min-height: 102px; border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: rgba(0,0,0,.16); position: relative; }
.equip-slot.filled { background: linear-gradient(160deg, rgba(28,42,58,.8), rgba(12,19,28,.8)); }
.equip-slot .slot-label { font-size: 9px; color: var(--muted-2); letter-spacing: .08em; }
.equip-slot .slot-item { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.equip-slot .slot-item b { font-size: 11px; line-height: 1.35; }
.equip-slot .slot-item small { font-size: 9px; color: var(--muted); }
.equip-slot .empty-slot { color: #445a70; font-size: 10px; margin-top: 20px; text-align: center; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 9px; }
.item-card {
    position: relative; padding: 11px; border: 1px solid var(--line); border-radius: 10px;
    background: linear-gradient(160deg, rgba(23,34,48,.72), rgba(11,17,25,.82));
    cursor: pointer; transition: .16s; overflow: hidden;
}
.item-card:hover { border-color: #47617e; transform: translateY(-1px); }
.item-card .ic-icon { font-size: 21px; }
.item-card .ic-name { font-size: 11px; font-weight: 650; margin-top: 6px; line-height: 1.35; }
.item-card .ic-meta { font-size: 9px; color: var(--muted-2); margin-top: 3px; display: flex; justify-content: space-between; }
.item-card .ic-badge { position: absolute; top: 8px; right: 8px; font-size: 8px; padding: 2px 5px; border-radius: 999px; border: 1px solid currentColor; }
.item-card.type-tool::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, rgba(125,211,252,.08), transparent 55%); pointer-events: none; }
.item-card.type-food::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, rgba(134,239,172,.07), transparent 55%); pointer-events: none; }
.durability { height: 3px; border-radius: 3px; background: rgba(0,0,0,.45); margin-top: 6px; overflow: hidden; }
.durability i { display: block; height: 100%; background: var(--green); }

/* 表格 / 集市 */
.tabs { display: flex; gap: 4px; background: rgba(5,10,16,.5); padding: 4px; border-radius: 10px; border: 1px solid var(--line-soft); width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { padding: 7px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: #1d2b3d; color: var(--gold-2); box-shadow: inset 0 0 0 1px #354861; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; }
table.data th { text-align: left; font-size: 9px; letter-spacing: .1em; color: var(--muted-2); font-weight: 650; padding: 10px 12px; background: rgba(5,10,16,.5); border-bottom: 1px solid var(--line); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255,255,255,.018); }
table.data .it { display: flex; align-items: center; gap: 7px; color: #dce8f4; }
table.data .price { color: var(--gold-2); font-weight: 700; }
table.data .qty { font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* 建筑 */
.building-card { padding: 15px; }
.building-card .bc-head { display: flex; align-items: flex-start; gap: 10px; }
.building-card .bc-icon { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); }
.building-card .bc-name { font-size: 13px; font-weight: 700; }
.building-card .bc-level { font-size: 10px; color: var(--gold); margin-top: 2px; }
.building-card .bc-desc { color: var(--muted); font-size: 10px; line-height: 1.65; margin: 10px 0; min-height: 32px; }
.building-cost { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cost-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; padding: 3px 6px; border-radius: 5px; background: rgba(0,0,0,.2); border: 1px solid var(--line-soft); color: var(--muted); cursor: help; }
.cost-chip .cc-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cost-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.cost-chip.lack { color: #fca5a5; border-color: rgba(248,113,113,.3); }

/* 农场 */
.plot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
.plot { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, rgba(28,44,34,.5), rgba(11,18,15,.7)); min-height: 148px; display: flex; flex-direction: column; }
.plot.ready { border-color: rgba(134,239,172,.5); box-shadow: 0 0 0 1px rgba(134,239,172,.1); }
.plot .plot-num { font-size: 9px; color: var(--muted-2); letter-spacing: .1em; }
.plot .plot-crop { font-size: 30px; margin: 7px 0 3px; }
.plot .plot-name { font-size: 12px; font-weight: 700; }
.plot .plot-timer { font-size: 10px; color: var(--muted); margin-top: 2px; }
.plot .plot-actions { margin-top: auto; padding-top: 9px; }

/* 副本 / 首领 */
.boss-panel { padding: 20px; background: radial-gradient(ellipse at 80% 0%, rgba(190,60,60,.14), transparent 55%), linear-gradient(160deg, rgba(38,24,28,.78), rgba(15,12,18,.9)); border-color: rgba(190,80,80,.3); }
.boss-name { font-size: 20px; color: #fecaca; }
.boss-title { font-size: 10px; color: #c88f8f; letter-spacing: .12em; }
.boss-hp { margin: 14px 0 8px; }
.boss-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: #d6a5a5; }
.boss-leader { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.boss-leader .bl-row { display: flex; justify-content: space-between; font-size: 10px; color: #e8caca; }

.dungeon-panel { padding: 18px; }
.dungeon-floor { display: flex; align-items: center; gap: 15px; }
.dungeon-monster { font-size: 48px; filter: drop-shadow(0 0 20px rgba(248,113,113,.22)); }
.dungeon-log { margin-top: 14px; max-height: 220px; overflow-y: auto; background: rgba(0,0,0,.25); border: 1px solid var(--line-soft); border-radius: 9px; padding: 10px; font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.member-list { display: flex; flex-wrap: wrap; gap: 6px; }
.member { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); font-size: 10px; }

/* 公会 */
.guild-banner { padding: 20px; background: radial-gradient(ellipse at 15% 0%, rgba(231,183,95,.14), transparent 50%), linear-gradient(155deg, rgba(34,30,24,.8), rgba(13,16,21,.92)); }
.guild-list { display: flex; flex-direction: column; gap: 8px; }
.guild-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.14); }
.guild-row .gi { font-size: 21px; width: 32px; text-align: center; }
.guild-row .gm { flex: 1; min-width: 0; }
.guild-row .gm b { font-size: 12px; display: block; }
.guild-row .gm small { font-size: 9px; color: var(--muted-2); }
.member-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.member-row:last-child { border-bottom: 0; }
.member-row .rank { margin-left: auto; font-size: 9px; color: var(--gold); }
.member-row .online { width: 6px; height: 6px; border-radius: 50%; background: #3d5167; }
.member-row .online.on { background: var(--teal); box-shadow: 0 0 8px rgba(94,234,212,.6); }

/* 排行榜 */
.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 27px; font-family: var(--font-head); font-size: 14px; color: var(--muted-2); text-align: center; }
.rank-row:nth-child(1) .rank-no { color: #f7dda4; }
.rank-row:nth-child(2) .rank-no { color: #d7e3ef; }
.rank-row:nth-child(3) .rank-no { color: #d9a47d; }
.rank-name { flex: 1; min-width: 0; font-size: 12px; color: #dce8f4; }
.rank-name small { display: block; color: var(--muted-2); font-size: 9px; }
.rank-score { font-family: var(--font-head); color: var(--gold-2); font-size: 14px; }

/* 聊天 */
.chat-card { display: flex; flex-direction: column; height: 300px; min-height: 240px; padding: 0; overflow: hidden; }
#rail-chat.chat-card { flex: 1 1 auto; height: auto; min-height: min(72vh, 680px); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.chat-head h3 { margin: 0; font-size: 13px; }
.chat-tabs { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.chat-tab { border: 0; background: transparent; color: var(--muted-2); font-size: 10px; padding: 4px 7px; border-radius: 5px; }
.chat-tab.active { color: var(--gold-2); background: rgba(231,183,95,.09); }
.chat-messages { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; line-height: 1.45; }
.chat-msg { color: var(--muted); word-break: break-word; }
.chat-msg time { color: #40566d; font-size: 9px; margin-right: 4px; }
.chat-msg b { color: var(--blue); font-weight: 650; }
.chat-msg.sys { color: var(--gold); }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 11px; outline: none; }
.chat-form button { border: 0; background: var(--gold); color: #1b1305; border-radius: 7px; padding: 0 11px; font-size: 11px; font-weight: 800; }

/* 右栏角色 */
.character-head { display: flex; align-items: center; gap: 11px; }
.character-avatar { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 20px; background: linear-gradient(145deg, #345c7d, #17283a); border: 1px solid #4e779d; color: #e9f6ff; }
.character-name { font-family: var(--font-head); font-size: 17px; }
.character-title { font-size: 9px; color: var(--gold); letter-spacing: .05em; }
.char-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 13px; }
.char-stat { text-align: center; background: rgba(0,0,0,.18); border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 4px; }
.char-stat b { display: block; font-size: 14px; font-family: var(--font-head); }
.char-stat small { font-size: 8px; color: var(--muted-2); }
.skill-mini { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.skill-mini-row { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.skill-mini-row .sm-name { width: 62px; color: var(--muted); font-size: 9px; }
.skill-mini-row .bar { flex: 1; height: 5px; }
.skill-mini-row b { width: 24px; text-align: right; color: var(--muted); font-size: 9px; }

/* 移动端底栏 */
.mobile-nav { display: none; }
.mobile-only { display: none !important; }

/* ==========================================================================
   模态 / 通知
   ========================================================================== */
.modal-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 5, 9, .72); backdrop-filter: blur(6px); }
.modal { width: min(520px, 100%); max-height: 88vh; overflow-y: auto; padding: 24px; border-radius: 16px; background: linear-gradient(160deg, #192534, #0c131d); border: 1px solid #33475f; box-shadow: 0 30px 100px rgba(0,0,0,.65); animation: modal-in .22s ease; }
.modal.wide { width: min(720px, 100%); }
.modal h3 { font-size: 21px; margin-bottom: 4px; }
.modal .modal-sub { color: var(--muted); font-size: 11px; margin-bottom: 18px; line-height: 1.6; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal .item-preview { display: flex; gap: 13px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.2); margin-bottom: 15px; }
.modal .item-preview .ic { font-size: 32px; }
.modal .item-preview b { display: block; font-size: 15px; }
.modal .item-preview small { color: var(--muted); font-size: 10px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
@keyframes modal-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }

.toast-root { position: fixed; right: 20px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
    min-width: 220px; max-width: 370px; padding: 11px 14px; border-radius: 10px;
    background: rgba(18, 28, 40, .96); border: 1px solid #354b64; color: #dce8f4;
    box-shadow: 0 14px 40px rgba(0,0,0,.45); font-size: 12px; animation: toast-in .25s ease;
    display: flex; align-items: flex-start; gap: 8px; pointer-events: auto;
}
.toast.ok { border-color: rgba(94,234,212,.4); }
.toast.err { border-color: rgba(248,113,113,.45); }
.toast .ti { font-size: 15px; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* 空状态 / 加载 */
.loading-panel { padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1240px) {
    .layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; padding: 14px 16px 24px; }
    .sidebar { width: 212px; flex-basis: 212px; }
    .auth-wrap { gap: 38px; }
}
@media (max-width: 1040px) {
    .sidebar { width: 76px; flex-basis: 76px; padding: 20px 9px 12px; align-items: center; }
    .side-brand { padding: 0 0 20px; }
    .side-brand > div { display: none; }
    .nav { width: 100%; }
    .nav-label { display: none; }
    .nav-item { justify-content: center; padding: 11px 0; }
    .nav-item span:not(.ni):not(.nb) { display: none; }
    .nav-item .nb { position: absolute; top: 3px; right: 4px; margin: 0; }
    .nav-item.active::before { left: -9px; }
    .side-foot { display: none; }
    .layout { grid-template-columns: 1fr; }
    .rail { display: none; }
    .top-title { min-width: 120px; }
}
@media (max-width: 880px) {
    body { overflow: auto; }
    .auth-screen { padding: 22px 14px; justify-content: flex-start; }
    .auth-wrap { grid-template-columns: 1fr; gap: 24px; }
    .auth-intro { padding: 12px 2px 0; }
    .brand-lockup { margin-bottom: 24px; }
    .auth-intro h1 { font-size: 36px; }
    .auth-lead { font-size: 13px; margin: 16px 0 20px; }
    .auth-features { display: none; }
    .auth-foot { margin-top: 18px; }
    .auth-panel { padding: 22px; }
    .auth-bottom { display: none; }

    .app { height: auto; min-height: 100dvh; flex-direction: column; overflow: visible; }
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; width: 250px; flex-basis: 250px;
        transform: translateX(-102%); transition: transform .24s ease; z-index: 60;
        padding: 22px 14px; align-items: stretch;
    }
    .sidebar.open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.55); }
    .side-brand > div, .side-foot, .nav-label { display: block; }
    .nav-item { justify-content: flex-start; padding: 9px 10px; }
    .nav-item span:not(.ni):not(.nb) { display: inline; }
    .nav-item .nb { position: static; margin-left: auto; }
    .side-brand { padding: 0 8px 22px; }
    .mobile-only { display: inline-flex !important; }
    .topbar { height: auto; min-height: 68px; flex-wrap: wrap; padding: 10px 12px; gap: 8px; position: sticky; top: 0; }
    .top-title { order: 1; flex: 1; min-width: 0; }
    .top-title h1 { font-size: 18px; }
    .top-actions { order: 2; }
    .profile-meta { display: none; }
    .resource-rail { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
    .res-chip { padding: 5px 7px; font-size: 10px; }
    .layout { display: block; padding: 10px 10px 82px; overflow: visible; }
    .view { overflow: visible; padding-right: 0; }
    .page-head h2 { font-size: 23px; }
    .hero { padding: 20px; }
    .hero h2 { font-size: 26px; }
    .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; }
    .split, .craft-layout { grid-template-columns: 1fr; }
    .craft-list { max-height: 260px; }
    .equip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mobile-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: rgba(8, 13, 20, .96); border-top: 1px solid var(--line);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around;
    }
    .mn-item { flex: 1; border: 0; background: transparent; color: var(--muted-2); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; font-size: 9px; border-radius: 7px; }
    .mn-item span { font-size: 17px; }
    .mn-item.active { color: var(--gold-2); background: rgba(231,183,95,.07); }
    .modal { padding: 20px; max-height: 92vh; }
    .modal-actions { grid-template-columns: 1fr; }
    .toast-root { left: 12px; right: 12px; bottom: 76px; align-items: stretch; }
    .toast { max-width: none; }
}
@media (max-width: 420px) {
    .top-title h1 { font-size: 16px; }
    .icon-btn { width: 31px; height: 31px; }
    .auth-intro h1 { font-size: 30px; }
    .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
    .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-tile { padding: 12px; }
    .stat-tile b { font-size: 19px; }
}

body.compact-ui .member-row,body.compact-ui .rank-row,body.compact-ui .guild-row{padding-top:4px!important;padding-bottom:4px!important}
body.compact-ui .card{padding-top:12px!important;padding-bottom:12px!important}


.log-line.gather { color: #8fd3ff; }
.log-line.refine { color: #ffb27a; }


.nav { scrollbar-width: thin; scrollbar-color: #2d435a transparent; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: #2d435a; border-radius: 4px; }
.rail { scrollbar-width: thin; scrollbar-color: #2d435a transparent; }
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-thumb { background: #2d435a; border-radius: 4px; }


/* 数值单位：千 / 万 / 亿 使用不同颜色 */
.unit { font-weight: 700; letter-spacing: .02em; }
.unit-qian { color: #67e8f9; }
.unit-wan { color: #fbbf24; }
.unit-yi { color: #f0abfc; }

/* 仓库已满：数量红色、轻微闪动 */
.res-chip.is-full { border-color: rgba(248, 113, 113, .45); }
.res-chip.is-full b,
.res-chip.is-full b .unit {
    color: #f87171 !important;
    animation: capacityPulse 1.25s ease-in-out infinite;
}
@keyframes capacityPulse {
    0%, 100% { opacity: .5; text-shadow: 0 0 0 rgba(248,113,113,0); }
    50% { opacity: 1; text-shadow: 0 0 6px rgba(248,113,113,.65); }
}

/* 盗贼巢穴：BOSS 级红色强调 */
.thieves-den-row {
    border-left: 3px solid #f87171;
    background: linear-gradient(90deg, rgba(248,113,113,.13), rgba(248,113,113,.02));
}
.thieves-den-row b { color: #fca5a5; }
.thieves-den-title {
    color: #f87171;
    text-shadow: 0 0 10px rgba(248,113,113,.45);
}
.thieves-panel { border-color: rgba(248,113,113,.38); }

/* 缺少的升级材料：名称、数字、图标全部红色 */
.cost-chip.lack,
.cost-chip.lack .cc-name,
.cost-chip.lack b {
    color: #f87171 !important;
}
.cost-chip.lack {
    border-color: rgba(248,113,113,.55);
    background: rgba(248,113,113,.08);
}

/* 同行维修市场 */
.repair-market-head, .repair-market-row {
    display: grid;
    grid-template-columns: 1.2fr 1.15fr .75fr .8fr 1.05fr .9fr;
    gap: 8px;
    align-items: center;
    font-size: 10px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--line-soft);
}
.repair-market-head {
    color: var(--muted);
    background: rgba(255,255,255,.025);
    border-radius: 5px;
}
.repair-market-row:last-child { border-bottom: 0; }
.repair-market-row b { font-size: 11px; }
.repair-market-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
    .repair-market-head { display: none; }
    .repair-market-row { grid-template-columns: 1fr 1fr; }
}

/* 耐久颜色连续渐变 */
.durability i { transition: width .25s ease, background .25s ease; }

/* 游戏指南 */
.guide-entry { padding: 0; overflow: hidden; }
.guide-entry summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.guide-entry summary::-webkit-details-marker { display: none; }
.guide-entry[open] summary { border-bottom: 1px solid var(--line-soft); }
.guide-icon { font-size: 20px; width: 26px; text-align: center; flex: 0 0 auto; }
.guide-title { flex: 1; min-width: 0; }
.guide-title b { display: block; font-size: 12px; }
.guide-title small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; line-height: 1.45; }
.guide-body { padding: 10px 14px 14px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.guide-sec { margin-top: 8px; }
.guide-sec:first-child { margin-top: 0; }
.guide-sec h4 { margin: 0 0 3px; color: var(--gold-2); font-size: 11px; }

/* 地牢战斗高亮 */
.dungeon-action { margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; border: 1px solid var(--line); }
.dungeon-action b { font-size: 14px; }
.dungeon-action.hit { color: #fecaca; background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.42); }
.dungeon-action.act { color: #bfdbfe; background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.35); }
.dungeon-action.stun, .dungeon-action.evade { color: #fde68a; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.38); }
.dungeon-log .monster-hit { color: #fca5a5; font-weight: 700; background: rgba(239,68,68,.10); border-left: 3px solid #ef4444; padding: 3px 6px; border-radius: 4px; }
.dungeon-log .player-hit { color: #bfdbfe; font-weight: 600; }
.dungeon-log .skill-line { color: #fcd34d; }
.dm-name { font-size: 12px; color: #e5eef8; }
.dm-damage { color: #fbbf24; font-size: 11px; }

/* 背包管理 */
.item-card .item-select { position: absolute; left: 6px; top: 6px; z-index: 2; accent-color: var(--teal); }
.item-card .item-lock { position: absolute; right: 5px; top: 4px; z-index: 2; border: 0; background: rgba(0,0,0,.35); color: #fbbf24; cursor: pointer; border-radius: 5px; padding: 1px 4px; font-size: 11px; }
.item-card.locked { border-color: rgba(251,191,36,.55); }
.item-card.selected { outline: 2px solid var(--teal); outline-offset: 1px; }


/* 统一页面层级与交互细节 */
.page-head { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; }
.page-head .sub { max-width: 700px; }
.card { transition: border-color .16s ease, background .16s ease; }
.card:hover { border-color: rgba(231, 183, 95, .20); }
.btn, .nav-item, .tab { transition: color .14s ease, background .14s ease, border-color .14s ease, opacity .14s ease; }
.btn:focus-visible, .nav-item:focus-visible, .tab:focus-visible, .input:focus-visible, select:focus-visible, input:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}
.empty { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 22px; text-align: center; color: var(--muted-2); }
.toolbar { gap: 10px; }
@media (max-width: 880px) {
    .page-head { align-items: flex-start; padding-bottom: 11px; margin-bottom: 14px; }
    .page-actions { width: 100%; }
    .page-actions > .chip { font-size: 10px; }
    .toolbar { align-items: stretch; }
    .toolbar .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .toolbar .tabs .tab { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.split.single { grid-template-columns: minmax(0, 1fr); }

.crop-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 100%; }
.crop-picker .btn { display: flex; align-items: center; justify-content: flex-start; gap: 5px; padding: 6px 7px; font-size: 10px; }
.crop-picker .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* 2K/大屏：内容随视口放大，避免固定 1580px 导致两侧空、字偏小 */
@media (min-width: 1700px) {
    body { font-size: 16px; }
    .layout {
        max-width: clamp(1700px, 86vw, 2520px);
        grid-template-columns: minmax(0, 1fr) 370px;
        gap: 22px;
        padding: 22px 28px 30px;
    }
    .sidebar { width: 252px; flex-basis: 252px; }
    .page-head h2 { font-size: 34px; }
    .page-head .sub { font-size: 13px; max-width: 780px; }
    .nav-item { font-size: 14px; padding: 9px 11px; }
    .nav-label { font-size: 10px; }
    .chip { font-size: 12px; }
    .form-note { font-size: 12px; }
    .field { font-size: 13px; }
    .input, .select, .field input, .field select, .field textarea { font-size: 15px; }
    .btn { font-size: 14px; }
    .btn-sm { font-size: 13px; }
    .btn-xs { font-size: 12px; }
    .modal-sub, .modal .item-preview small { font-size: 12px; }
    table.data th { font-size: 10px; }
    table.data td { font-size: 13px; }
    .res-chip { font-size: 11.5px; }
    .stat-tile b { font-size: 28px; }
    .plot { min-height: 170px; }
    .plot-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .item-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

/* 手机：至少 16px 输入防止 iOS 自动放大；按钮提供可点面积 */
@media (max-width: 880px) {
    .input, .select, .field input, .field select, .field textarea, textarea.input { font-size: 16px; }
    .btn { min-height: 40px; padding: 9px 14px; }
    .btn-sm { min-height: 36px; padding: 7px 11px; }
    .btn-xs { min-height: 30px; padding: 5px 9px; }
    .icon-btn { width: 38px; height: 38px; }
    .nav-item { padding: 11px 12px; font-size: 14px; }
    .page-actions .input, .page-actions .select { min-height: 40px; }
    .member-row { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
    .member-row > .row { width: 100%; justify-content: flex-end; }
    .crop-picker .btn { min-height: 36px; }
    .modal { width: 100%; max-height: 96dvh; border-radius: 14px; }
    .modal-root { padding: 10px; align-items: flex-end; }
    table.data { min-width: 680px; }
}

/* 极窄屏：避免按钮文字被挤成竖排 */
@media (max-width: 420px) {
    .page-actions { gap: 6px; }
    .page-actions .btn { flex: 0 1 auto; }
    .top-actions { gap: 6px; }
    .profile-chip { padding-right: 7px; }
    .hero h2 { font-size: 23px; }
    .page-head h2 { font-size: 21px; }
}

@media (max-width: 880px) {
    .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
    .hero-stat b { font-size: 24px; }
    .hero-stat small { font-size: 11px; }
}

.password-wrap { position: relative; width: 100%; }
.password-wrap input { width: 100%; padding-right: 58px; }
.password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--gold-2);
    font-size: 11px; font-weight: 700; padding: 7px 8px; border-radius: 6px;
}
.password-toggle:hover { background: rgba(231,183,95,.10); }
.password-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 880px) { .password-toggle { font-size: 12px; padding: 9px 8px; } }

.companion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 9px; }
.companion-card { border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: rgba(0,0,0,.14); }
.companion-card.is-active { border-color: rgba(94,234,212,.38); background: rgba(94,234,212,.045); }
.companion-head { display: flex; align-items: center; gap: 8px; }
.companion-head .grow { min-width: 0; }
.companion-head b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.companion-head small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 1px; }
.companion-icon { font-size: 24px; width: 30px; text-align: center; }
.companion-effect { font-size: 11px; color: var(--gold-2); margin-top: 8px; }
.companion-meta { font-size: 10px; color: var(--muted-2); margin-top: 4px; }
.companion-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
@media (max-width: 880px) { .companion-grid { grid-template-columns: 1fr; } .companion-actions .btn { min-height: 34px; } }

.mail-preview { font-size: 11px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail-subject { cursor: pointer; }
.mail-subject:hover { color: var(--gold-2); }
.mail-detail-body { white-space: pre-wrap; line-height: 1.75; font-size: 13px; color: var(--text); background: rgba(0,0,0,.16); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px; }
.mail-row .row { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 880px) {
    .mail-row { align-items: flex-start; flex-wrap: wrap; }
    .mail-row .row { width: 100%; justify-content: flex-end; margin-top: 6px; }
}

.settings-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.settings-grid > section:nth-child(3) { grid-column: 1 / -1; }
@media (max-width: 880px) { .settings-grid { grid-template-columns: 1fr; } .settings-grid > section:nth-child(3) { grid-column: auto; } }

@media (min-width: 1041px) { .boss-home-card { display: none; } }

@media (min-width: 1041px) { .event-home-card { display: none; } }

/* 可折叠的专精/委托卡片 */
.fold-card { padding: 0; overflow: hidden; }
.fold-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; cursor: pointer; list-style: none; user-select: none; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head h3 { margin: 0; font-size: 14px; }
.fold-head .fold-tip { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 400; }
.fold-body { padding: 0 16px 14px; }
.fold-card[open] > .fold-head { border-bottom: 1px solid var(--line-soft); }
.fold-card[open] > .fold-head .fold-tip { color: var(--teal); }
@media (max-width: 880px) { .fold-head { padding: 12px 13px; } .fold-body { padding: 0 13px 12px; } }

.fold-inline { margin-top: 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255,255,255,.018); }
.fold-sub { display: flex; align-items: center; gap: 8px; padding: 9px 10px; cursor: pointer; list-style: none; font-size: 10px; color: var(--muted); }
.fold-sub::-webkit-details-marker { display: none; }
.fold-sub .fold-tip { margin-left: auto; }
.fold-inline .fold-body { padding: 0 10px 10px; }

/* 背包筛选：单行横向，空间不足时横向滚动，不换行堆高 */
.inv-filter-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: 100%; overflow-x: auto; overflow-y: hidden; padding: 1px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.inv-filter-bar > * { flex: 0 0 auto; }
.inv-filter-bar > .inv-search { flex: 1 1 180px; min-width: 160px; }
.inv-filter-bar > select.input { width: auto; min-width: 92px; padding-left: 9px; padding-right: 26px; font-size: 12px; }
.inv-filter-bar > .inv-filter-btn { white-space: nowrap; font-size: 10px; }
.inv-filter-bar::-webkit-scrollbar { height: 5px; }
.inv-filter-bar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }
@media (max-width: 880px) { .inv-filter-bar { margin: 0 -4px; padding: 1px 4px 7px; } .inv-filter-bar > select.input { min-width: 86px; font-size: 11px; } .inv-filter-bar > .inv-search { min-width: 145px; flex-basis: 145px; } }

/* 通用筛选栏：所有页面的筛选都保持单行横向，超出时横向滚动 */
.filter-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: 100%; overflow-x: auto; overflow-y: hidden; padding: 1px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.filter-bar > * { flex: 0 0 auto; }
.filter-bar > .grow, .filter-bar > .inv-search { flex: 1 1 180px; min-width: 160px; }
.filter-bar > select.input, .filter-bar > .select { width: auto; min-width: 96px; padding-left: 9px; padding-right: 26px; font-size: 12px; }
.filter-bar > input.input { width: auto; }
.filter-bar > .chip { white-space: nowrap; }
.filter-bar > label.field { flex: 0 0 120px; min-width: 120px; }
.filter-bar > label.field .input { width: 100%; }
.filter-bar::-webkit-scrollbar { height: 5px; }
.filter-bar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }
@media (max-width: 880px) { .filter-bar { margin: 0 -4px; padding: 1px 4px 7px; } .filter-bar > select.input, .filter-bar > .select { min-width: 88px; font-size: 11px; } .filter-bar > .grow, .filter-bar > .inv-search { min-width: 145px; flex-basis: 145px; } .filter-bar > label.field { flex-basis: 108px; min-width: 108px; } }

/* 安全许可：摘要 + 背景卡片 + 可分配卡片 */
.clearance-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.clearance-panel { padding: 18px; }
.clearance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin-top: 10px; }
.clearance-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.clearance-card.allocated { border-color: rgba(45,212,191,.45); background: rgba(45,212,191,.045); }
.clearance-card.locked { opacity: .58; }
.clearance-card-head { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.clearance-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.045); font-size: 18px; }
.clearance-name { flex: 1; min-width: 0; }
.clearance-name b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clearance-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.clearance-card .chip { flex: 0 0 auto; font-size: 9px; }
.clearance-focus { border-top: 1px solid var(--line-soft); padding-top: 8px; color: var(--muted); font-size: 9px; }
.clearance-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 10px; }
.clearance-foot .dim { white-space: nowrap; }
.clearance-empty { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,.012); }
.clearance-empty > span { font-size: 28px; opacity: .8; }
.clearance-empty b { display: block; font-size: 12px; }
.clearance-empty small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.clearance-panel .form-note.mb-0 { margin-bottom: 0; }
@media (max-width: 880px) { .clearance-panel { padding: 13px; } .clearance-grid { grid-template-columns: 1fr; } .clearance-card { padding: 11px; } }

/* 锦标赛完整积分榜 */
.tour-ranking { max-height: 320px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 4px; background: rgba(5,10,16,.22); }
.tour-ranking .row-between { border-bottom: 1px solid rgba(255,255,255,.035); }
.tour-ranking .row-between:last-child { border-bottom: 0; }
.tour-self { background: rgba(45,212,191,.12); box-shadow: inset 0 0 0 1px rgba(45,212,191,.35); }
@media (max-width: 880px) { .tour-ranking { max-height: 260px; } }

/* 世界首领 / 活动 / 锦标赛 / 矮妖：统一紧凑卡片结构 */
#rail-event.world-card { min-height: 210px; display: flex; flex-direction: column; }
.world-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.world-eyebrow { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.world-card-title { margin-top: 6px; font-size: 17px; line-height: 1.25; font-weight: 750; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-card-sub { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.world-card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; margin-top: 8px; min-height: 0; justify-content: center; }
.world-card-progress { display: flex; flex-direction: column; gap: 3px; }
.world-card-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; min-width: 0; }
.world-card-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-card-line b { color: var(--text); flex: 0 0 auto; }
.world-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; padding-top: 9px; }
.world-card-actions .btn { flex: 0 1 auto; }
@media (max-width: 880px) { #rail-event.world-card { min-height: 0; } .world-card-title { font-size: 16px; } }

/* 技能有新专精时的醒目提示；鼠标移入后标记已读 */
.skill-card.skill-alert { border-color: rgba(251,191,36,.75) !important; background: linear-gradient(135deg, rgba(251,191,36,.10), rgba(251,191,36,.025)) !important; box-shadow: 0 0 0 1px rgba(251,191,36,.18) inset, 0 8px 26px rgba(0,0,0,.12); }
.skill-card.skill-alert .chip.gold { box-shadow: 0 0 0 1px rgba(251,191,36,.35) inset; }

/* 精炼缺基础原料：卡片红色警示 */
.activity-card.no-stock { border-color: rgba(248,113,113,.65) !important; background: linear-gradient(145deg, rgba(127,29,29,.20), rgba(127,29,29,.04)) !important; }
.activity-card.no-stock .ac-icon { background: rgba(248,113,113,.12); }
.activity-card.no-stock .refine-flow { opacity: .82; }
.activity-card.no-stock .ac-meta { color: #fca5a5; }

/* 加成明细：跟随鼠标的暗色设计提示，不使用浏览器白色原生 tooltip */
.bonus-tooltip { position: fixed; z-index: 9999; width: min(360px, calc(100vw - 24px)); max-height: min(420px, calc(100vh - 24px)); overflow-y: auto; pointer-events: none; padding: 13px 14px; border-radius: 13px; border: 1px solid rgba(251,191,36,.38); background: radial-gradient(ellipse at 10% 0%, rgba(251,191,36,.13), transparent 48%), linear-gradient(155deg, rgba(26,34,45,.98), rgba(10,15,23,.98)); box-shadow: 0 18px 54px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.025); backdrop-filter: blur(10px); opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.bonus-tooltip.show { opacity: 1; transform: translateY(0); }
.bonus-tooltip::-webkit-scrollbar { width: 5px; }
.bonus-tooltip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }
.bt-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--gold-2); font-size: 12px; font-weight: 750; letter-spacing: .03em; }
.bt-head::before { content: "✦"; color: var(--gold); font-size: 13px; }
.bt-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 10px; line-height: 1.45; }
.bt-row .bt-label { color: var(--muted); }
.bt-row .bt-value { color: var(--text); font-weight: 650; text-align: right; white-space: nowrap; }
.bt-row.bt-warn .bt-label { color: #fca5a5; }
.bt-row.bt-warn .bt-value { color: #f87171; font-weight: 800; }
.enh-tag { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 4px; color: #fbbf24; background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.35); font-size: .82em; font-weight: 800; line-height: 1.35; vertical-align: 1px; }
.bt-note { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.07); color: var(--muted-2); font-size: 9px; line-height: 1.5; }
@media (max-width: 880px) { .bonus-tooltip { width: calc(100vw - 22px); max-height: min(360px, calc(100vh - 30px)); } }

/* 指南专用名词着色 */
.gt { font-weight: 650; border-radius: 4px; padding: 0 3px; background: rgba(255,255,255,.035); }
.gt-quality { background: rgba(255,255,255,.04); }
.gt-quality-legend { background: linear-gradient(90deg, #9ca3af, #e5e7eb, #6ee7b7, #60a5fa, #c084fc, #e6cc80, #fbbf24, #fb7185) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; }
.gt-trait { color: #c084fc; background: rgba(192,132,252,.10); }
.gt-attr { color: #67e8f9; background: rgba(103,232,249,.08); }
.gt-resource { color: #fbbf24; background: rgba(251,191,36,.09); }
.gt-system { color: #a78bfa; background: rgba(167,139,250,.09); }
.guide-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(255,255,255,.015); }
.guide-legend .gt { font-size: 9px; }
@media (max-width: 880px) { .guide-legend { gap: 4px; } .guide-legend .gt { font-size: 8px; } }

/* 游客体验提示 */
.guest-notice { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; margin-bottom: 14px; border-color: rgba(251,191,36,.32); background: linear-gradient(120deg, rgba(251,191,36,.08), rgba(255,255,255,.012)); }
.guest-notice-icon { font-size: 20px; line-height: 1.1; }
.guest-notice b { display: block; color: var(--gold-2); font-size: 12px; margin-bottom: 2px; }
.guest-notice .form-note { margin: 0; line-height: 1.55; }
.guest-lock { margin-top: 8px; padding: 9px 10px; border: 1px solid rgba(251,191,36,.22); border-radius: 8px; color: var(--muted); background: rgba(251,191,36,.045); font-size: 10px; text-align: center; }
@media (max-width: 880px) { .guest-notice { padding: 11px 12px; } }

/* 缺料资源跳转 */
.res-link { cursor: pointer; }
.res-link:hover { color: var(--gold-2); }
.res-link:focus-visible { outline: 2px solid rgba(251,191,36,.55); outline-offset: 2px; border-radius: 4px; }
.cost-chip.clickable { cursor: pointer; }
.cost-chip.clickable:hover { border-color: rgba(251,191,36,.55); background: rgba(251,191,36,.07); }
.cost-chip .res-go { margin-left: 3px; color: var(--gold-2); font-size: 8px; font-weight: 700; }
.res-go { margin-left: 4px; color: var(--gold-2); font-size: 8px; font-weight: 700; white-space: nowrap; }
.cost-row.lack .res-link { border-bottom: 1px dashed rgba(251,191,36,.45); }
.resource-focus { animation: resource-focus 1.2s ease-in-out 2; }
@keyframes resource-focus { 0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } 50% { box-shadow: 0 0 0 2px rgba(251,191,36,.75), 0 0 22px rgba(251,191,36,.18); } }

/* 缺料框整体可点击 */
.cost-row.lack[onclick], .cost-row[role="button"] { cursor: pointer; }
.cost-row.lack[onclick]:hover, .cost-row[role="button"]:hover { background: rgba(251,191,36,.055); border-color: rgba(251,191,36,.35); }
.cost-row.lack[onclick]:active, .cost-row[role="button"]:active { transform: translateY(1px); }

/* 精炼原料框可直接点击 */
.refine-node.res-node-link { cursor: pointer; border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.045); }
.refine-node.res-node-link:hover { border-color: rgba(251,191,36,.7); background: rgba(251,191,36,.10); }
.refine-node.res-node-link:active { transform: translateY(1px); }

/* 跳转后目标采集/精炼卡片：只保留金色边框，鼠标移入即清除 */
.activity-card.resource-target { border-color: #fbbf24 !important; border-width: 2px; box-shadow: 0 0 0 1px rgba(251,191,36,.42) inset, 0 0 24px rgba(251,191,36,.20); }

/* 集市补货与特价 */
table.data tr.system-row td { background: rgba(255,255,255,.012); }
table.data tr.deal-row td { background: linear-gradient(90deg, rgba(251,191,36,.08), rgba(251,191,36,.018)); }
table.data tr.deal-row td:first-child { box-shadow: inset 3px 0 0 #fbbf24; }
table.data tr.deal-row .price { color: var(--gold-2); font-weight: 750; }

table.data tr.deal-row:hover td { background: rgba(251,191,36,.12); }

/* 工人性格悬浮说明 */
.trait-help { cursor: help; border-bottom: 1px dotted rgba(192,132,252,.55); }
.trait-help:hover { color: #d8b4fe; }

/* 工人工具选择 */
.worker-tool-equipped, .worker-tool-picker { margin-top: 5px; padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: rgba(255,255,255,.018); }
.worker-tool-equipped.broken { border-color: rgba(248,113,113,.5); background: rgba(127,29,29,.10); }
.worker-tool-equipped .form-note, .worker-tool-picker .form-note { margin-top: 3px; }
.worker-tool-rec { margin-bottom: 6px; color: var(--muted); font-size: 10px; }

/* 制作专精：与页面标题/卡片字号一致，不再用小号灰字 */
.craft-spec-fold { margin-top: 12px; }
.craft-spec-head { padding: 10px 12px; color: var(--text); font-size: 12px; }
.craft-spec-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.craft-spec-head .chip { margin-left: 2px; }
.craft-spec-head .fold-tip { margin-left: auto; }

/* 精炼页：标签式布局，减少纵向堆叠 */
.refine-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.refine-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10,16,24,.55); overflow-x: auto; max-width: 100%; }
.refine-tab { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 9px; font-size: 11px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.refine-tab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.refine-tab.active { color: #04221d; background: var(--teal); }
.refine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1180px) { .refine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.refine-overview { background: linear-gradient(155deg, rgba(23,34,48,.78), rgba(11,17,25,.82)); }
.refine-status { display: flex; align-items: center; gap: 8px; min-width: 0; }
.refine-status b { font-size: 12px; color: var(--gold-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refine-settings { display: flex; gap: 12px; align-items: flex-end; margin-top: 11px; flex-wrap: wrap; }
.refine-settings .field { margin: 0; }
.refine-settings .field:first-child { flex: 1 1 220px; }
.refine-settings .field:last-child { flex: 0 1 180px; }
@media (max-width: 760px) {
    .refine-grid { grid-template-columns: 1fr; }
    .refine-settings { gap: 8px; }
    .refine-settings .field:first-child, .refine-settings .field:last-child { flex: 1 1 100%; }
    .refine-tab { padding: 7px 11px; }
}

/* 采集页工具栏：避免“下一步”被挤断 */
.gather-actions { flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gather-actions label { white-space: nowrap; }
.gather-actions select { min-width: 132px; max-width: 190px; }

.data tr.selected-row{background:rgba(251,191,36,.08)}

.pin-btn{margin-left:auto;flex:0 0 auto;padding:2px 7px;min-width:0}


/* ==========================================================================
   UI 布局修正：移动端节标题换行、采集卡片工具信息不拆字
   ========================================================================== */
.section-head { flex-wrap: wrap; row-gap: 8px; }
.section-head > h3 { flex: 0 0 auto; white-space: nowrap; }
.gather-card .row-between { flex-wrap: wrap; gap: 4px 8px; }
.gather-card .row-between > span,
.gather-card .row-between > b { white-space: nowrap; }
.item-card .ic-meta { flex-wrap: wrap; gap: 2px 6px; }
.item-card small { line-height: 1.35; }

@media (max-width: 880px) {
    .section-head { align-items: flex-start; }
    .section-head > h3 { flex: 1 1 100%; }
}


/* 采集卡片工具信息：两行必须纵向铺满，否则 flex 会把中文挤成单字换行 */
.ac-tool { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.ac-tool > div { width: 100%; }
.ac-tool .row-between { gap: 4px 8px; flex-wrap: wrap; }
.ac-tool .row-between > span,
.ac-tool .row-between > b { white-space: nowrap; }


/* 平板宽度：标题与操作同一行，资源另起一行横向滚动，避免顶栏过高 */
@media (min-width: 881px) and (max-width: 1040px) {
    .topbar { padding: 9px 14px; gap: 8px 12px; }
    .top-actions { order: 2; margin-left: auto; }
    .resource-rail { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; justify-content: flex-start; }
    .res-chip { flex: 0 0 auto; }
}


/* 空状态卡片：拍卖/熔炉/无工人等页面 */
.empty-state {
    padding: 34px 20px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(23,34,48,.42), rgba(11,17,25,.26));
    color: var(--muted);
}
.empty-state .empty-icon { font-size: 34px; line-height: 1.2; margin-bottom: 8px; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.empty-state p { margin: 0; font-size: 12px; color: var(--muted-2); }


/* 置顶按钮在紧凑卡片里保持可点击高度 */
.pin-btn { min-width: 30px; min-height: 26px; padding: 2px 5px; }


/* 统一小号按钮的最小点击高度，避免不同页面 xs 按钮大小不一 */
.btn-xs { min-height: 26px; }
