/* 应用外壳补充：弹层容器、登录页、验收面板内容样式、升级弹窗 */
.overlay-layer { position: absolute; inset: 0; isolation: isolate; }
.overlay-layer:has(.closing) { pointer-events: none; }

/* ---------------------------------------------------------------- 登录 */
.login-screen { background: linear-gradient(180deg, #BFE6F7 0%, #E9F3E2 46%, #EFE8D8 100%); }
.login-sky { position: absolute; inset: 0 0 auto 0; height: 360px; overflow: hidden; pointer-events: none; }
.login-sun { position: absolute; top: 52px; left: 34px; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFF6C9, #FFD447 60%, rgba(255,212,71,0) 72%); filter: blur(.3px); animation: float 6s var(--ease-in-out) infinite; }
.login-hills { position: absolute; left: 0; right: 0; bottom: 0; height: 260px; }
.login-hills svg { width: 100%; height: 100%; }
.login-brand { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 12px 0; color: #23201A; }
.login-mark { position: relative; width: 104px; height: 104px; margin-bottom: 14px; }
.login-mark svg { width: 104px; height: 104px; border-radius: 30px; box-shadow: 0 0 0 4px rgba(255,255,255,.78), 0 18px 40px rgba(40,70,20,.26); }
.login-hat { position: absolute; left: -10px; top: -30px; width: 124px; filter: drop-shadow(0 6px 8px rgba(60,40,10,.25)); transform: rotate(-8deg); }
.login-title { font: 800 2.125rem/2.5625rem var(--font-ui); letter-spacing: -.03em; margin: 6px 0 4px; }
.login-sub { margin: 0; color: rgba(35,32,26,.72); font-size: 0.9375rem; line-height: 1.375rem; max-width: 280px; }
.login-panel { position: relative; margin: 92px 0 0; padding: 18px 16px 16px; border-radius: 28px; background: rgba(255,252,245,.9);
  border: 1px solid rgba(58,48,30,.10); box-shadow: 0 20px 50px rgba(60,40,10,.16), inset 0 1px 0 #fff; backdrop-filter: blur(16px); color: #23201A; }
.login-acc { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 18px; background: #FFFDF8;
  border: 1.5px solid rgba(58,48,30,.08); transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.login-acc:active { transform: scale(.99); }
.login-acc.on { border-color: var(--leaf-400); box-shadow: 0 0 0 4px rgba(92,193,100,.16); }
.login-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.login-name-row .lr-title { white-space: nowrap; margin-right: 2px; }
.login-acc .lr-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.7812rem; line-height: 1.0625rem; color: rgba(35,32,26,.62); }
.login-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(58,48,30,.2); flex: none; transition: all var(--t-fast); }
.login-acc.on .login-radio { border: 7px solid var(--leaf-500); }

/* ---------------------------------------------------------------- 验收面板 */
.dd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dd-head .dd-logo { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #2EE6D6, #3EA44E); display: flex; align-items: center; justify-content: center; color: #08221F; }
.dd-title { font: 700 1rem/1.25rem var(--font-ui); }
.dd-sub { font-size: 0.75rem; color: #A79F8C; }
.dd-head .grow { min-width: 0; }
.dd-close { position: relative; width: 36px; height: 36px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: #EDE7D8; }
.dd-close::after { content: ""; position: absolute; inset: -4px; }
.dd-close:active { transform: scale(.94); }
.dd-sec { margin: 16px 0 8px; font: 700 0.75rem/0.9375rem var(--font-ui); letter-spacing: .04em; color: #8E8674; display: flex; justify-content: space-between; align-items: center; }
.dd-sec > span { font-weight: 600; letter-spacing: 0; }
.dd-clock { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.dd-clock b { font: 700 1.375rem/1.625rem var(--font-ui); font-variant-numeric: tabular-nums; color: #fff; }
.dd-clock b small { font: 600 0.8125rem/1 var(--font-ui); color: #CFC7B4; }
.dd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dd-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dd-btn { height: 34px; padding: 0 8px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); color: #EDE7D8;
  font: 600 0.7812rem/1 var(--font-ui); transition: background var(--t-fast), transform var(--t-fast); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn:hover { background: rgba(255,255,255,.12); }
.dd-btn:active { transform: scale(.97); }
.dd-btn.accent { background: rgba(46,230,214,.16); border-color: rgba(46,230,214,.3); color: #9AF7EF; }
.dd-btn.warn { background: rgba(229,86,107,.14); border-color: rgba(229,86,107,.3); color: #FFB1BD; }
.dd-btn.on { background: rgba(92,193,100,.22); border-color: rgba(92,193,100,.45); color: #C9F2C4; }
.dd-btn:disabled { opacity: .45; cursor: progress; transform: none; }
.dd-note.dd-busy { color: #FFE27A; padding: 6px 8px; border-radius: 10px; background: rgba(255,212,71,.10); border: 1px solid rgba(255,212,71,.28); }
.dd-acc { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px; min-height: 48px; border-radius: 14px; cursor: pointer; transition: background var(--t-fast); color: inherit; }
.dd-acc:hover { background: rgba(255,255,255,.06); }
.dd-acc:focus-visible, .dd-btn:focus-visible { outline: 2px solid #2EE6D6; outline-offset: 1px; }
.dd-acc-name { font: 600 0.8438rem/1.125rem var(--font-ui); color: #fff; }
.dd-wallet { color: #FFE9A6; font: 700 0.875rem var(--font-ui); }
.dd-acc.on { background: rgba(92,193,100,.14); box-shadow: inset 0 0 0 1px rgba(92,193,100,.35); }
.dd-acc .avatar { width: 34px; height: 34px; border-radius: 11px; }
.dd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.7812rem; color: #CFC7B4; padding: 6px 0; }
.dd-note { font-size: 0.75rem; line-height: 1.0625rem; color: #A79F8C; margin-top: 8px; }
.dd-log { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); font: 0.75rem/1.0625rem var(--font-mono); color: #BFE8C4; max-height: 160px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
/* 窄屏（≤860px，桌面右侧停靠面板放不下）时的验收面板入口，只在本地验收版出现。
 * 不再贴在右侧半腰（会盖住列表行尾、筛选、工坊状态）：
 * - 有底栏的页：底栏右侧让出 52px，按钮并进底栏这一行，不压任何页面内容；
 * - 没有底栏的二级页：44×44 停在右下角（页面底部本来就留了 96px 空白），有底部输入栏 / 操作栏的页抬到栏上方。 */
.dev-fab { position: absolute; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 55; width: 44px; height: 44px; border-radius: 15px; display: none; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2EE6D6, #3EA44E); color: #08221F; box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255,255,255,.35); }
.dev-fab:active { transform: scale(.95); }
@media (max-width: 860px) {
  .dev-fab { display: flex; }
  .device[data-local="1"] .app-root:has(> .tabbar) > .tabbar { right: 64px; }
  .device[data-local="1"] .app-root:has(> .tabbar) > .dev-fab { top: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 44px; height: 66px; border-radius: 20px; }
  .device[data-local="1"] .app-root:has(.gc-composer) > .dev-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .device[data-local="1"] .app-root:has(.ward-dock) > .dev-fab { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .device[data-local="1"] .app-root:has(.vis-bar) > .dev-fab { bottom: calc(222px + env(safe-area-inset-bottom)); }
}
.dev-sheet { background: #1C1A15 !important; color: #EDE7D8; }
.dev-sheet .sheet-handle { background: rgba(255,255,255,.22); }
.dev-sheet .sheet-body { padding-top: 6px; }

/* ---------------------------------------------------------------- 攻击演示结果卡 */
.atk-hero { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: rgba(62,164,78,.10); border: 1px solid rgba(62,164,78,.25); }
.atk-hero.bad { background: rgba(229,86,107,.10); border-color: rgba(229,86,107,.3); }
.atk-hero-icon { width: 46px; height: 46px; flex: none; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(180deg, #5CC164, #2B8540); box-shadow: 0 6px 16px rgba(62,164,78,.3); }
.atk-hero.bad .atk-hero-icon { background: linear-gradient(180deg, #F07385, #C23A50); }
.atk-hero-title { font: 750 1rem/1.375rem var(--font-ui); }
.atk-hero-sub { margin-top: 3px; font-size: 0.8125rem; line-height: 1.1875rem; color: var(--ink-2); text-wrap: pretty; }
.atk-sec { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 2px 8px; font: 700 0.875rem/1.125rem var(--font-ui); }
.atk-sec > span { font: 600 0.75rem/1 var(--font-ui); color: var(--muted); }
.atk .check-detail.ok { color: var(--muted); }
.atk-table, .atk-ledger, .atk-inv { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; }
.atk-tr { display: flex; align-items: center; gap: 8px; padding: 9px 0; font-size: 0.8125rem; line-height: 1.125rem; }
.atk-tr + .atk-tr, .atk-lg + .atk-lg { border-top: 1px solid var(--line); }
.atk-tr .num { font: 600 0.7812rem/1 var(--font-ui); color: var(--ink-2); white-space: nowrap; }
.atk-d { min-width: 52px; text-align: right; font: 700 0.75rem/1 var(--font-ui); white-space: nowrap; }
.atk-d.zero { color: var(--muted); font-weight: 600; }
.atk-d.up { color: var(--leaf-600); } .atk-d.down { color: #C23A50; }
.device[data-theme="night"] .atk-d.up { color: var(--leaf-300); } .device[data-theme="night"] .atk-d.down { color: #FF9AA9; }
.atk-lg { padding: 9px 0; font-size: 0.8125rem; line-height: 1.125rem; }
.atk-lg b { font: 650 0.8438rem/1.125rem var(--font-ui); }
.atk-lg .num { font: 650 0.8125rem/1.125rem var(--font-ui); }
.atk-inv { padding: 6px 12px; }
.atk-inv-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 0.7812rem; line-height: 1.0625rem; color: var(--ink-2); }
.atk-inv-row > span:first-child { width: 18px; height: 18px; flex: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: rgba(62,164,78,.16); color: var(--leaf-600); }
.atk-inv-row.bad > span:first-child { background: rgba(229,86,107,.16); color: #C23A50; }
.device[data-theme="night"] .atk-inv-row > span:first-child { color: var(--leaf-300); }

/* ---------------------------------------------------------------- 升级弹窗 */
.levelup { padding: 26px 22px 20px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
/* 柔光：用遮罩让边缘自然消失（没有硬边） */
.levelup::before { content: ""; position: absolute; left: 50%; top: -70px; width: 380px; height: 380px; margin-left: -190px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,212,71,.55), rgba(255,212,71,.18) 55%, transparent);
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent); mask-image: radial-gradient(closest-side, #000 60%, transparent);
  animation: lu-glow 3.2s var(--ease-in-out) infinite; }
/* 放射光 */
.levelup-rays { position: absolute; left: 50%; top: 80px; width: 420px; height: 420px; margin: -210px 0 0 -210px; z-index: -1; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255,226,122,.55) 0deg 7deg, transparent 7deg 22.5deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 72%); mask-image: radial-gradient(closest-side, #000 18%, transparent 72%);
  animation: lu-spin 18s linear infinite; }
.device[data-theme="night"] .levelup::before { background: radial-gradient(closest-side, rgba(255,212,71,.32), rgba(46,230,214,.12) 55%, transparent); }
.device[data-theme="night"] .levelup-rays { opacity: .35; }
@keyframes lu-spin { to { transform: rotate(360deg); } }
@keyframes lu-glow { 50% { transform: scale(1.06); opacity: .85; } }
.levelup-badge { position: relative; width: 108px; height: 108px; margin: 0 auto 6px; filter: drop-shadow(0 10px 18px rgba(217,154,6,.35)); }
.levelup-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 2.5rem/1 var(--font-ui); color: #3A2A00; }
.levelup-eb { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; background: rgba(245,190,30,.18); color: #8A6200; font: 700 0.75rem/1 var(--font-ui); letter-spacing: .08em; }
.device[data-theme="night"] .levelup-eb { color: var(--banana-300); }
.levelup h2 { font: 800 1.5rem/1.875rem var(--font-ui); margin: 8px 0 4px; letter-spacing: -.02em; position: relative; }
.levelup-unlocks { margin: 14px 0 18px; }
.levelup-ul-title { font: 650 0.75rem/1 var(--font-ui); color: var(--muted); margin-bottom: 10px; }
.levelup ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; position: relative; }
/* 弹窗不超出屏幕：整体限高，解锁列表在中间滚动，徽章 / 标题 / 「好的」固定可见（连跳多级会合并出二三十项） */
/* 限高时让出顶部安全区（设备框的模拟状态栏 50px / 刘海屏 env(safe-area-inset-top)），弹窗在安全区以下居中，顶边不压在状态栏和灵动岛下面 */
.modal.levelup-modal { top: calc(50% + var(--safe-top) / 2); max-height: calc(100% - var(--safe-top) - 24px); display: flex; flex-direction: column; }
.levelup-modal .levelup { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.levelup-modal .levelup > * { flex: none; }
.levelup-modal .levelup-unlocks, .levelup-modal .levelup-foot { align-self: stretch; }
.levelup-modal .levelup > .levelup-unlocks { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.levelup-modal .levelup-ul { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: 14px; padding: 2px 2px 4px; }
.levelup-many .levelup-unlocks { margin: 10px 0 14px; }
.levelup-many .levelup-ul { padding: 2px 2px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); }
.levelup-many .levelup li { min-height: 36px; }
/* 升级弹窗几乎占满全屏时，提示条回到顶部（默认有弹窗时提示在底部，会压住「好的」） */
.device:has(.levelup-many:not(.closing)) .toast-root { top: calc(var(--safe-top) + 6px); bottom: auto; flex-direction: column; }
/* 长项（如「自选村子（…）」「+18 块地（分 6 次开垦…）」）会折成两行：高度随内容，行距放松，不顶边 */
.levelup li { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; max-width: 100%; padding: 4px 12px 4px 6px; border-radius: 14px; text-align: left;
  background: var(--surface-solid); border: 1px solid rgba(245,190,30,.32); box-shadow: 0 2px 0 rgba(245,190,30,.18), var(--shadow-1);
  font: 650 0.8438rem/1.2 var(--font-ui); color: var(--ink); }
.levelup li .lu-art { width: 28px; height: 28px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(245,190,30,.16); color: #8A6200; }
.levelup li .lu-art svg { max-width: 26px; max-height: 26px; }
.device[data-theme="night"] .levelup li .lu-art { color: var(--banana-300); }

/* ---------------------------------------------------------------- 启动 / 切换账号 */
.boot-splash { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; color: var(--muted);
  background: radial-gradient(420px 320px at 50% 42%, rgba(92,193,100,.16), transparent 70%), var(--bg-0); }
.device[data-theme="night"] .boot-splash { background: radial-gradient(420px 320px at 50% 42%, rgba(46,230,214,.12), transparent 70%), var(--bg-0); }
.boot-mark { position: relative; width: 84px; height: 84px; }
.boot-mark::before { content: ""; position: absolute; inset: -14px; border-radius: 34px; background: radial-gradient(closest-side, rgba(245,190,30,.35), transparent); animation: lu-glow 1.8s var(--ease-in-out) infinite; }
.boot-splash img { position: relative; width: 84px; height: 84px; border-radius: 26px; box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 14px 34px rgba(60,40,10,.25); animation: pulse 1.6s var(--ease-in-out) infinite; }
.device[data-theme="night"] .boot-splash img { box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 0 30px rgba(46,230,214,.25); }
.boot-dots { display: flex; gap: 7px; margin-top: 8px; }
.boot-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-500); animation: bootdot 1s var(--ease-in-out) infinite; }
.boot-dots i:nth-child(2) { animation-delay: .15s; background: var(--banana-500); }
.boot-dots i:nth-child(3) { animation-delay: .3s; background: var(--cyan-500); }
@keyframes bootdot { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-7px); opacity: 1; } }
.boot-text { font: 600 0.875rem/1.25rem var(--font-ui); color: var(--ink-2); }
.app-root { position: absolute; inset: 0; }
.screen-host { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- 登录页井架与升级数字（原美术代理的覆盖，已由主会话接手）
 * 下面几条覆盖的是别的区域的元素（登录页 login.js + app.css、升级弹窗 app.js + app.css，属主会话），
 * 只改外观、不动结构；主会话接手后可以删掉这一段，改成直接用 art/cards.js 的 brandAppIconSvg()。
 */
/* 登录页品牌标：本作原创 App 图标（草帽矿猿 + 叶片 + 香蕉 + 青色能源环），替换前作机甲猴图 + 斜贴的草帽 */
/* 远处的井架：换成和农场远景同款的井架线稿（原来是一个灰色上箭头形剪影） */
.login-hills > svg > g[opacity=".55"] { display: none; }
.login-hills::before { content: ""; position: absolute; left: 73.4%; top: 30px; width: 32px; height: 56px; opacity: .78; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%224 -10 50 86%22%3E%3Cpath d=%22M6 74L17 8H23L34 74%22 fill=%22none%22 stroke=%22%238C6A55%22 stroke-width=%222.4%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M9 60L29 44M31 60L11 44M12 44L26 28M28 44L14 28M9 60H31M12 44H28M15 28H25%22 stroke=%22%23A88A70%22 stroke-width=%221.1%22 fill=%22none%22/%3E%3Ccircle cx=%2220%22 cy=%224%22 r=%229%22 fill=%22none%22 stroke=%22%236E7884%22 stroke-width=%222%22/%3E%3Cpath d=%22M11 4H29M20 -5V13M13.6 -2.4L26.4 10.4M26.4 -2.4L13.6 10.4%22 stroke=%22%236E7884%22 stroke-width=%22.8%22/%3E%3Ccircle cx=%2220%22 cy=%224%22 r=%222%22 fill=%22%234A535E%22/%3E%3Ccircle cx=%2220%22 cy=%22-8%22 r=%221.8%22 fill=%22%232EE6D6%22/%3E%3Cpath d=%22M30 74V58H50V74Z%22 fill=%22%23D8C9AE%22 stroke=%22%238C6A55%22 stroke-width=%221%22/%3E%3Cpath d=%22M28 58L40 50L52 58Z%22 fill=%22%23C2765A%22 stroke=%22%238C6A55%22 stroke-width=%221%22 stroke-linejoin=%22round%22/%3E%3Crect x=%2234%22 y=%2262%22 width=%225%22 height=%225%22 fill=%22%239ED8F5%22/%3E%3C/svg%3E") center / contain no-repeat; }
/* 升级弹窗：绿色经验星上的等级数字改成白字 + 深绿描边（原来是深色字压在深绿星上） */
.levelup .levelup-num { color: #FFFFFF; padding-top: 6px; font-size: 2.1875rem; letter-spacing: -.02em;
  text-shadow: 0 2px 0 #1F6532, 2px 0 0 #1F6532, -2px 0 0 #1F6532, 0 -2px 0 #1F6532, 1.5px 1.5px 0 #1F6532, -1.5px 1.5px 0 #1F6532, 1.5px -1.5px 0 #1F6532, -1.5px -1.5px 0 #1F6532, 0 4px 8px rgba(20,60,20,.35); }


/* ---------------------------------------------------------------- 验收面板 v0.5a：反馈日志 / 无障碍与标识自检（devdock.js） */
.dev-panel .dd4-box.dd-ok { box-shadow: inset 3px 0 0 rgba(92,193,100,.7); }
.dev-panel .dd4-box.dd-warn { box-shadow: inset 3px 0 0 rgba(245,190,30,.8); }
.dev-panel .dd-row.dd-ok b { color: #C9F2C4; }
.dev-panel .dd-row.dd-warn b { color: #FFD98A; }
.dev-panel .dd-row .ellipsis { min-width: 0; }

/* v0.5b（W2-FE-CORE-ECON）：升级解锁列表里「下一个版本开放」的项（UNLOCK_RELEASE 晚于 V05_RELEASE）：淡一档 + 时钟标签（形状 + 颜色双编码） */
.levelup li.lu-later > span:nth-child(2) { color: var(--muted); }
.levelup li .lu-later-tag, .f2-road-later .lu-later-tag { margin-left: auto; flex: none; font-size: var(--fs-cap); }
.f2-road-later { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
