/* 夜雨断锋 · 界面样式（theme tokens + 共享组件）。
   外壳图一律按槽位九宫格（border-image）铺设，文字放在工具实测的内框安全区内。 */
:root {
  --ink: #0b0e14;
  --ink-2: #1c2430;
  --moon: #c9d3e0;
  --mute: #7f8a99;
  --cinnabar: #c8321e;
  --bronze: #8a6a3c;
  --danger: #ff4b2e;
  --jade: #5fb6a0;
  --shadow: 0 8px 30px rgba(0, 0, 0, .6);
  --ease-in: cubic-bezier(.2, .9, .2, 1);
  --t-enter: 220ms;
  --t-press: 80ms;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  /* 随视口缩放的基准字号：短横屏/窄竖屏收紧但不低于可读下限 */
  --fs: clamp(13px, min(1.25vw, 2.3vh), 18px);
  --bh: clamp(44px, 7.4vmin, 58px);          /* 按钮高度 */
  --b: clamp(52px, 16vmin, 84px);            /* 触屏技能钮直径 */
  --barh: clamp(22px, 4.4vmin, 32px);        /* 计量条高度 */
  --edge: clamp(10px, 2.4vmin, 28px);        /* 贴边留白 */
}

#stage { position: fixed; inset: 0; z-index: 0; touch-action: none; }
#stage canvas { width: 100%; height: 100%; outline: none; }

#ui {
  position: fixed; inset: 0; z-index: 10;
  pointer-events: none;            /* 只有具体控件接收点击 */
  color: var(--moon);
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-size: var(--fs);
  line-height: 1.5;
}
/* 低优先级重置：组件类（border-image 外壳等）必须能覆盖它 */
:where(#ui) button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; }
#ui .hidden { display: none !important; }

/* ---------- 加载页 ---------- */
.boot {
  position: absolute; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(90% 70% at 50% 36%, #1b2433 0%, #0b0e14 60%, #05070a 100%);
  pointer-events: auto; overflow: hidden;
  transition: opacity 900ms ease;
}
/* 加载页的雨：两层不同疏密、不同速度的细雨丝（纯绘制，不依赖任何图片） */
.boot::before {
  content: ""; position: absolute; inset: -10% -10%; pointer-events: none; transform: skewX(-7deg);
  --rain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cpath stroke='%23c9d3e0' stroke-opacity='.17' stroke-width='1' stroke-linecap='round' d='M20 10v46M77 120v60M131 40v38M190 170v52M222 80v30M55 196v32M160 228v12M160 0v26M104 214v18'/%3E%3C/svg%3E");
  background-image: var(--rain), var(--rain);
  background-repeat: repeat;
  background-size: 240px 240px, 380px 380px;
  animation: bootRain 620ms linear infinite;
}
.boot > * { position: relative; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-title {
  font-size: clamp(40px, 9vmin, 96px); letter-spacing: .14em; text-indent: .14em; color: var(--moon); line-height: 1.1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .8), 0 0 36px rgba(200, 50, 30, .35);
}
.boot-seal { padding: 3px 12px; background: var(--cinnabar); color: #fff; font-size: clamp(12px, 2vmin, 16px); letter-spacing: .4em; text-indent: .4em; margin-top: -6px; }
/* 字体到位前不露字，避免先出默认字体再跳一下 */
.boot-title, .boot-seal, .boot-text { opacity: 0; transform: translateY(6px); transition: opacity 600ms ease, transform 600ms ease; }
.fonts-ready .boot-title, .fonts-ready .boot-seal, .fonts-ready .boot-text { opacity: 1; transform: none; }
.boot-bar { width: min(320px, 56vw); height: 2px; margin-top: 10px; background: rgba(201, 211, 224, .12); }
.boot-bar > i {
  display: block; position: relative; height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(200, 50, 30, .15), var(--cinnabar));
  box-shadow: 0 0 12px rgba(200, 50, 30, .8); transition: width 260ms ease-out;
}
.boot-bar > i::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ffd9c8; filter: blur(2px); }
.boot-text { font-size: 13px; color: var(--mute); letter-spacing: .5em; text-indent: .5em; min-height: 1.5em; text-align: center; }
@keyframes bootRain { from { background-position: 0 0, 90px 0; } to { background-position: 0 240px, 90px 380px; } }
@media (prefers-reduced-motion: reduce) { .boot::before { animation: none; } }
.boot-retry {
  pointer-events: auto; min-width: 160px; min-height: 48px; padding: 0 28px;
  background: var(--cinnabar) !important; color: #fff !important; letter-spacing: .2em;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

/* 画面暗角（纯装饰，不拦截输入） */
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 62%, rgba(4, 6, 10, .3) 100%);
}

/* ======================================================================
   共享组件
   ====================================================================== */
/* ink-btn：朱漆牌匾按钮（UI-BTN-BRUSH，源图 1536×335，九宫格 116/322） */
.ink-btn {
  pointer-events: auto; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  height: var(--bh); min-width: calc(var(--bh) * 3.7);
  padding: 0 calc(var(--bh) * .58);            /* 实测安全区：左右 ≥ .49bh，上下 12.5%–86.5% */
  color: #fff3e6; letter-spacing: .16em; white-space: nowrap;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
  transition: transform var(--t-press) ease, filter var(--t-press) ease;
}
.ink-btn::before {
  content: ""; position: absolute; inset: 0; box-sizing: border-box; pointer-events: none;
  border-style: solid; border-color: transparent;
  border-width: calc(var(--bh) * .346) calc(var(--bh) * .8);
  border-image: url("assets/ui_btn_brush.webp") 116 322 fill;
}
.ink-btn .lbl { position: relative; z-index: 1; display: block; line-height: 1.3; font-size: calc(var(--bh) * .34); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); text-indent: .16em; }
.ink-btn.has-ico { gap: calc(var(--bh) * .16); }
.ink-btn.has-ico .lbl { text-indent: 0; }
.ink-btn .lico { position: relative; z-index: 1; width: calc(var(--bh) * .4); height: calc(var(--bh) * .4); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.ink-btn .ico { z-index: 1; --is: calc(var(--bh) * .52); }

/* ---------- 图标：彩绘圆章（图集按格取用）、线性小图标、层数菱点 ---------- */
.ico {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--is, 2.6em); height: var(--is, 2.6em); border-radius: 50%; font-style: normal; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #2c3442, #0b0e14 72%); color: #f0d9b0;
  box-shadow: inset 0 0 0 1px rgba(138, 106, 60, .8);
}
.ico::before { content: attr(data-g); font-size: .9em; }        /* 图集取不到时露出的字形 */
.ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--sheet, none) var(--bp, 50% 50%) / var(--bs, 300%) no-repeat; }
.ico.s-art { --sheet: url("assets/icons_arts.webp"); }
.ico.has-line { color: var(--c-ico, #f0d9b0); }
.ico.has-line .lico { width: 62%; height: 62%; }
.ico.li-jade { color: #7fd0b8; }
.ico.li-kills { color: #e9705a; }
.ico.mini { --is: 1.75em; }
.ico.mini::before { font-size: .7em; }
.ico.blank { visibility: hidden; }
.lico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pips { display: inline-flex; align-items: center; gap: .42em; padding: 0 .2em; }
.pips i { width: .5em; height: .5em; transform: rotate(45deg); box-shadow: inset 0 0 0 1px var(--pip, rgba(240, 217, 176, .75)); }
.pips i.on { background: var(--pip-on, #e2492f); box-shadow: 0 0 7px rgba(226, 73, 47, .85); }
.ink-btn:hover { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)) brightness(1.12); }
.ink-btn:active { transform: translateY(2px) scale(.98); filter: brightness(.9); }
.ink-btn:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
.ink-btn.secondary { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)) saturate(.18) brightness(.82); }
.ink-btn.secondary:hover { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)) saturate(.3) brightness(.98); }
.ink-btn.gold { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)) hue-rotate(28deg) saturate(.8) brightness(1.05); }
.ink-btn.compact { --bh: clamp(40px, 6.2vmin, 46px); min-width: calc(var(--bh) * 3.1); }
.ink-btn:disabled { opacity: .45; cursor: default; pointer-events: none; }

/* ink-panel：黑漆铜框弹窗（UI-PANEL-INK，源图 1018×940，九宫格 140） */
.overlay {
  position: absolute; inset: 0; z-index: 40; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  padding: calc(8px + var(--safe-t)) calc(8px + var(--safe-r)) calc(8px + var(--safe-b)) calc(8px + var(--safe-l));
  /* 压暗并向四周加深：弹窗像被一束光单独照亮，背后的庭院退成景深 */
  background: radial-gradient(110% 85% at 50% 46%, rgba(9, 12, 18, .58) 0%, rgba(3, 4, 7, .9) 100%);
  opacity: 0; transition: opacity 260ms ease;
}
body:not(.touch) .overlay { -webkit-backdrop-filter: blur(7px) saturate(.75); backdrop-filter: blur(7px) saturate(.75); }
.overlay.show { opacity: 1; }
.overlay:has(.ink-panel.win) { background: radial-gradient(110% 85% at 50% 46%, rgba(46, 26, 12, .5) 0%, rgba(4, 4, 6, .9) 100%); }
.overlay:has(.ink-panel.lose) { background: radial-gradient(110% 85% at 50% 46%, rgba(34, 9, 8, .55) 0%, rgba(3, 3, 5, .93) 100%); }
.ink-panel {
  --pb: clamp(34px, 6.4vmin, 60px);
  box-sizing: border-box; position: relative;
  display: flex; flex-direction: column;
  width: min(100%, 620px); max-height: 100%;
  border-style: solid; border-color: transparent; border-width: var(--pb);
  border-image: url("assets/ui_panel_ink.webp") 140 fill;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .8)) drop-shadow(0 0 22px rgba(138, 106, 60, .12));
  opacity: 0; transform: translateY(20px) scale(.96);
  transition: transform 340ms var(--ease-in), opacity 220ms ease;
}
/* 面板内的顶光：漆面上一层很淡的月色，让大面积黑漆不发闷 */
.ink-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(85% 60% at 50% 0%, rgba(201, 211, 224, .075), transparent 72%);
}
.overlay.show .ink-panel { opacity: 1; transform: none; }
.ink-panel.small { width: min(100%, 480px); }
.ink-panel.wide { width: min(100%, 860px); }
.dlg-head { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: .7em; padding-bottom: .5em; }
/* 标题下的一笔：起笔朱砂、行笔铜色、收笔渐隐 */
.dlg-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; transform-origin: left center;
  background: linear-gradient(90deg, var(--cinnabar) 0, var(--cinnabar) 2.4em, rgba(138, 106, 60, .8) 2.4em, rgba(138, 106, 60, .18) 72%, transparent);
}
.overlay:not(.settled) .dlg-head::after { animation: strokeIn 460ms var(--ease-in) 120ms backwards; }
.dlg-title {
  margin: 0; font-size: clamp(22px, 4.6vmin, 36px); font-weight: 400; letter-spacing: .12em; color: var(--moon); line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8), 0 0 22px rgba(201, 211, 224, .18);
}
.dlg-title::before {
  content: ""; display: inline-block; width: .4em; height: .4em; margin-right: .5em; vertical-align: .2em;
  background: var(--cinnabar); transform: rotate(45deg); box-shadow: 0 0 10px rgba(200, 50, 30, .85);
}
.dlg-close {
  pointer-events: auto; flex: none; position: relative; width: 44px; height: 44px; margin: -6px -6px -6px 0;
  background: rgba(11, 14, 20, .5); box-shadow: inset 0 0 0 1px rgba(138, 106, 60, .6);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: background 140ms ease, transform var(--t-press) ease;
}
.dlg-close i, .dlg-close i::after { position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; background: var(--moon); content: ""; transition: background 140ms ease; }
.dlg-close i { transform: translate(-50%, -50%) rotate(45deg); }
.dlg-close i::after { transform: translate(-50%, -50%) rotate(90deg); }
.dlg-close:hover { background: rgba(200, 50, 30, .28); }
.dlg-close:hover i, .dlg-close:hover i::after { background: #fff; }
.dlg-close:active { transform: scale(.92); }
.dlg-close:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
/* 内容分批入场（只在弹窗刚打开时播一次） */
.overlay:not(.settled) .dlg-body > *, .overlay:not(.settled) .dlg-actions > * { animation: riseIn 380ms var(--ease-in) 140ms backwards; }
.overlay:not(.settled) .dlg-body > :nth-child(2) { animation-delay: 200ms; }
.overlay:not(.settled) .dlg-body > :nth-child(n+3) { animation-delay: 260ms; }
.overlay:not(.settled) .dlg-actions > * { animation-delay: 320ms; }
.overlay:not(.settled) .dlg-actions > :nth-child(2) { animation-delay: 380ms; }
.overlay:not(.settled) .dlg-actions > :nth-child(n+3) { animation-delay: 440ms; }
.overlay:not(.settled) .card-row > * { animation: dealIn 460ms var(--ease-in) 200ms backwards; }
.overlay:not(.settled) .card-row > :nth-child(2) { animation-delay: 290ms; }
.overlay:not(.settled) .card-row > :nth-child(3) { animation-delay: 380ms; }
.dlg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.dlg-actions { flex: none; display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; margin-top: .9em; }
.dlg-actions:empty { display: none; }
.dlg-actions.stack { flex-direction: column; align-items: center; }
.tip { margin: .5em 0; color: var(--mute); font-size: .95em; line-height: 1.6; }
.tip.center { text-align: center; }

/* ink-bar：铜鞘计量条（UI-BAR-FRAME，源图 1528×270，九宫格 101/196；槽内安全区实测） */
.ink-bar {
  --h: var(--barh); --inl: 1.375; --inr: .83;
  position: relative; height: var(--h); width: calc(var(--h) * 8.75); flex: none;
}
.ink-bar::before {
  content: ""; position: absolute; inset: 0; box-sizing: border-box;
  border-style: solid; border-color: transparent;
  border-width: calc(var(--h) * .375) calc(var(--h) * 1.125);
  border-image: url("assets/ui_bar_frame.webp") 101 196 fill;
}
.ink-bar > .fill, .ink-bar > .lag {
  position: absolute; left: calc(var(--h) * var(--inl)); right: calc(var(--h) * var(--inr));
  top: calc(var(--h) * .27); bottom: calc(var(--h) * .35);
  transform-origin: left center; transform: scaleX(1);
}
.ink-bar > .lag { background: #e9d9c0; opacity: .75; }
.ink-bar > .fill { background: linear-gradient(180deg, #e85a3c, var(--cinnabar) 55%, #8f1f12); }
.ink-bar > .num {
  position: absolute; left: calc(var(--h) * var(--inl)); right: calc(var(--h) * var(--inr)); top: 0; bottom: calc(var(--h) * .08);
  display: flex; align-items: center; justify-content: center;
  font-size: max(11px, calc(var(--h) * .4)); line-height: 1; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; white-space: nowrap;
}
.ink-bar.intent { --h: calc(var(--barh) * .8); }
.ink-bar.intent > .fill { background: linear-gradient(180deg, #dfe8f5, #8fa3c2 60%, #4c5d7a); }
.ink-bar.intent > .lag { display: none; }
.ink-bar.intent.full > .fill { background: linear-gradient(180deg, #ffd9a0, #e0903c 60%, #a34a12); animation: pulse 900ms ease-in-out infinite; }
.ink-bar.boss { --h: clamp(24px, 4.8vmin, 36px); --inl: 1.62; width: min(calc(var(--h) * 15), 100%); }
.ink-bar.boss > .num { display: none; }

/* skill-btn：铜环圆钮（UI-SKILL-RING，contain） */
.skill-btn {
  position: relative; pointer-events: auto; box-sizing: border-box;
  width: var(--b); height: var(--b); flex: none;
  background: url("assets/ui_skill_ring.webp") center / contain no-repeat !important;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-press) ease, filter 160ms ease;
  touch-action: none;
}
.skill-btn .sk-ico { width: 66%; height: 66%; font-size: calc(var(--b) * .4); box-shadow: none; }
/* 字形退到右下角做小印：图标表意，字形保留招式的名号 */
.skill-btn .glyph {
  position: absolute; right: 1%; bottom: 1%; width: 36%; height: 36%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--b) * .2); line-height: 1; color: #f0d9b0;
  background: #0b0e14; box-shadow: inset 0 0 0 1px rgba(138, 106, 60, .9), 0 1px 3px rgba(0, 0, 0, .7);
}
.skill-btn .cd {
  --cd: 0; position: absolute; inset: 17%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(4, 6, 10, .78) calc(var(--cd) * 360deg), transparent 0);
}
.skill-btn { --cd: 0; }
.skill-btn kbd {
  position: absolute; left: 50%; bottom: -1.5em; transform: translateX(-50%);
  font: inherit; font-size: 12px; line-height: 1; color: var(--mute); white-space: nowrap;
}
.skill-btn:active { transform: scale(.92); filter: brightness(1.25); }
.skill-btn.off { filter: saturate(.2) brightness(.6); }
.skill-btn.ready { filter: drop-shadow(0 0 10px rgba(255, 110, 50, .9)); animation: pulse 900ms ease-in-out infinite; }
.skill-btn.ready .glyph { color: #ffd9a0; }
.pause-ico, .pause-ico::after { display: block; width: 4px; height: 34%; background: var(--moon); content: ""; }
.pause-ico { position: relative; transform: translateX(-5px); height: 34%; }
.pause-ico::after { position: absolute; left: 10px; top: 0; height: 100%; }

/* art-card：绢轴选择卡（UI-CARD-SCROLL，源图 995×1518，九宫格 290/213） */
.art-card {
  --cbh: clamp(22px, 3.6vmin, 32px); --cbv: calc(var(--cbh) * 1.4);
  pointer-events: auto; box-sizing: border-box; position: relative;
  flex: 1 1 0; min-width: 150px; max-width: 250px; min-height: clamp(210px, 44vmin, 330px);
  padding: calc(var(--cbv) * .62) calc(var(--cbh) * .8);   /* 实测安全区：上下 ≥ .43cbv，左右 ≥ .62cbh */
  display: flex; text-align: center; color: var(--moon);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6));
  transition: transform 140ms var(--ease-in), filter 140ms ease;
}
.art-card::before {
  content: ""; position: absolute; inset: 0; box-sizing: border-box; pointer-events: none;
  border-style: solid; border-color: transparent; border-width: var(--cbv) var(--cbh);
  border-image: url("assets/ui_card_scroll.webp") 290 213 fill;
}
/* 卡面：上图标圆章、下名称 + 层数菱点 + 说明；右上角一枚淡印（字形） */
.art-card .card-in {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; min-width: 0;
}
.card-ico {
  --is: clamp(68px, 15vmin, 112px); font-size: clamp(30px, 7vmin, 52px);
  box-shadow: 0 0 0 3px rgba(11, 14, 20, .55), 0 6px 16px rgba(0, 0, 0, .6), 0 0 28px rgba(200, 50, 30, .38);
  transition: transform 180ms var(--ease-in), box-shadow 180ms ease;
}
.card-txt { display: flex; flex-direction: column; align-items: center; gap: .3em; min-width: 0; }
.card-head { display: flex; flex-direction: column; align-items: center; gap: .4em; }
.art-card .name { font-size: 1.4em; letter-spacing: .18em; text-indent: .18em; line-height: 1.2; color: var(--c-name, #f4e7cc); }
.art-card .lv { font-size: .82em; color: var(--c-sub, #c9a15c); letter-spacing: .06em; }
.art-card .desc { font-size: .95em; color: var(--c-desc, #aeb7c4); line-height: 1.45; }
.art-card .desc b { font-weight: 500; color: var(--c-gain, #7fd0b8); }
.art-card .desc .arrow { display: inline-block; width: 0; height: 0; margin: 0 .45em; vertical-align: .08em; border: .3em solid transparent; border-left-color: var(--c-sub, #c9a15c); border-right-width: 0; }
.card-seal { position: absolute; right: 0; top: -.15em; font-size: 1.5em; line-height: 1; opacity: .16; pointer-events: none; color: var(--c-name, #f4e7cc); }
.art-card .ink-btn { margin-top: .2em; }
button.art-card:hover { transform: translateY(-6px); filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .75)) drop-shadow(0 0 14px rgba(200, 50, 30, .45)) brightness(1.1); }
button.art-card:hover .card-ico { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(11, 14, 20, .55), 0 6px 16px rgba(0, 0, 0, .6), 0 0 36px rgba(255, 110, 50, .7); }
button.art-card:active { transform: scale(.97); }
button.art-card:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
.art-card.maxed .pips i.on { background: var(--jade); box-shadow: 0 0 7px rgba(95, 182, 160, .85); }
.art-card.maxed .lv { color: var(--jade); }
.card-row { display: flex; gap: clamp(8px, 2vmin, 18px); justify-content: center; align-items: stretch; }
.jade-line { display: flex; align-items: center; justify-content: center; gap: .5em; color: var(--c-sub, #f0d9b0); letter-spacing: .12em; margin-bottom: .7em; }
.jade-line b { font-size: 1.25em; font-weight: 500; color: var(--c-name, #f4e7cc); font-variant-numeric: tabular-nums; }

/* 分段选择（代码绘制） */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: .55em 0; border-bottom: 1px solid rgba(138, 106, 60, .22); }
.set-row:last-child { border-bottom: 0; }
.set-label { display: inline-flex; align-items: center; gap: .6em; letter-spacing: .2em; color: var(--c-label, var(--moon)); white-space: nowrap; }
.set-label .lico { color: var(--c-sub, #c9a15c); }
.seg { display: flex; gap: 6px; }
.seg-btn {
  pointer-events: auto; min-width: 56px; min-height: 44px; padding: 0 14px !important;
  background: linear-gradient(180deg, rgba(201, 211, 224, .11), rgba(201, 211, 224, .04)) !important; color: var(--mute) !important;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: color 140ms ease, filter 140ms ease, transform var(--t-press) ease;
}
.seg-btn:hover { color: var(--moon) !important; filter: brightness(1.25); }
.seg-btn:active { transform: translateY(1px); }
.seg-btn:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
.seg-btn.on { background: linear-gradient(180deg, #e2492f, var(--cinnabar) 55%, #8f1f12) !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.help-table { display: grid; grid-template-columns: auto 1fr auto; gap: .5em 1.2em; align-items: center; }
.help-table > b { color: var(--c-sub, #c9a15c); font-weight: 500; }
.help-table > span { color: var(--c-desc, var(--mute)); }
.help-table > .help-act { display: inline-flex; align-items: center; gap: .6em; color: var(--c-label, var(--moon)); }

/* 载入提示 */
.toast {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 50;
  padding: 14px 34px; background: linear-gradient(90deg, rgba(11, 14, 20, .96), rgba(28, 36, 48, .9)); border-left: 3px solid var(--cinnabar);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(138, 106, 60, .35);
  letter-spacing: .4em; text-indent: .4em; pointer-events: auto;
}

/* ======================================================================
   标题：左侧字标 + 纵向按钮栈，右侧留给实时庭院
   ====================================================================== */
.title-screen {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: clamp(8px, 2.2vh, 22px);
  padding: calc(var(--edge) + var(--safe-t)) calc(var(--edge) + var(--safe-r)) calc(var(--edge) + var(--safe-b)) calc(6vw + var(--safe-l));
  box-sizing: border-box;
  background: linear-gradient(90deg, rgba(6, 8, 12, .82) 0%, rgba(6, 8, 12, .5) 32%, transparent 58%);
  opacity: 0; transition: opacity 600ms ease;
}
.title-screen.show { opacity: 1; }
.title-lockup h1 {
  margin: 0; font-size: clamp(44px, min(11vmin, 17vh), 128px); line-height: 1.05; letter-spacing: .08em;
  color: var(--moon); text-shadow: 0 4px 30px rgba(0, 0, 0, .8), 0 0 40px rgba(200, 50, 30, .25);
  font-weight: 400;
}
.title-lockup .seal {
  display: inline-block; margin-top: clamp(4px, 1.4vh, 14px); padding: 4px 12px;
  background: var(--cinnabar); color: #fff; font-size: clamp(13px, 2.2vmin, 18px); letter-spacing: .4em; text-indent: .4em;
}
.title-menu { display: flex; flex-direction: column; gap: clamp(4px, 1.3vh, 12px); align-items: flex-start; }
.title-menu .ink-btn { min-width: calc(var(--bh) * 4.4); }
.depth-row { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.depth-label { min-width: 11em; text-align: center; color: #f0d9b0; letter-spacing: .1em; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 10px rgba(0,0,0,.85), 0 0 18px rgba(0,0,0,.6); }
.depth-arrow { position: relative; width: 44px; height: 44px; pointer-events: auto; }
.depth-arrow i { position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-left: 2px solid var(--moon); border-bottom: 2px solid var(--moon); transform: translate(-30%, -50%) rotate(45deg); }
.depth-arrow.next i { transform: translate(-70%, -50%) rotate(-135deg); }
.depth-arrow:disabled { opacity: .3; cursor: default; }
.title-foot { position: absolute; left: calc(6vw + var(--safe-l)); bottom: calc(var(--edge) + var(--safe-b)); display: flex; align-items: center; gap: 1.3em; color: var(--mute); letter-spacing: .08em; font-size: .95em; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.foot-item { display: inline-flex; align-items: center; gap: .45em; white-space: nowrap; }
.foot-item b { color: #f0d9b0; font-weight: 500; font-variant-numeric: tabular-nums; }
/* 界面风格选择：标题页右下角（竖屏在按钮栈下方居中） */
.skin-pick { position: absolute; right: calc(var(--edge) + var(--safe-r)); bottom: calc(var(--edge) + var(--safe-b)); display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.skin-cap { margin-right: 4px; color: var(--mute); font-size: .88em; letter-spacing: .16em; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.skin-opt {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 13px; font-size: .92em; white-space: nowrap;
  color: var(--moon); background: rgba(11, 14, 20, .6); box-shadow: inset 0 0 0 1px rgba(201, 211, 224, .22);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background 140ms ease, transform var(--t-press) ease;
}
.skin-opt i { width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .45); }
.skin-opt.sw-steel i { background: linear-gradient(135deg, #d9b86c 50%, #1b212c 50%); }
.skin-opt.sw-lacquer i { background: linear-gradient(135deg, #c8321e 50%, #8a6a3c 50%); }
.skin-opt.sw-paper i { background: linear-gradient(135deg, #e8dfca 50%, #1c1915 50%); }
.skin-opt:hover { background: rgba(40, 50, 66, .75); }
.skin-opt:active { transform: translateY(1px); }
.skin-opt:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
.skin-opt.on { background: linear-gradient(180deg, rgba(226, 73, 47, .85), rgba(143, 31, 18, .85)); color: #fff; box-shadow: inset 0 0 0 1px rgba(240, 217, 176, .7); }

/* 手机横屏（矮屏）：按钮改两列，保证首屏完整可见 */
@media (orientation: landscape) and (max-height: 520px) {
  .title-screen { gap: 6px; }
  .title-menu { display: grid; grid-template-columns: auto auto; gap: 6px 10px; }
  .title-menu .ink-btn { min-width: calc(var(--bh) * 3.7); }
  .depth-row { margin: -4px 0; }
}
@media (orientation: portrait) {
  .title-screen { align-items: center; justify-content: flex-start; padding-left: calc(var(--edge) + var(--safe-l)); padding-top: calc(9vh + var(--safe-t));
    background: linear-gradient(180deg, rgba(6, 8, 12, .78) 0%, transparent 38%, transparent 52%, rgba(6, 8, 12, .86) 100%); }
  .title-lockup { text-align: center; }
  .title-menu { margin-top: auto; align-items: center; margin-bottom: calc(2.6em + 2vh); }
  .depth-row:not(.hidden) { margin-top: auto; }
  .depth-row:not(.hidden) + .title-menu { margin-top: 0; }
  .stage-row:not(.hidden) ~ .depth-row { margin-top: 0; }
  .stage-row:not(.hidden) ~ .title-menu { margin-top: 0; }
  .title-foot { left: 0; right: 0; text-align: center; }
}

/* ======================================================================
   HUD：左上双条 / 上中波次或 Boss / 右中连斩 / 左下摇杆 / 右下技能簇 / 右上暂停
   ====================================================================== */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud-tl { position: absolute; left: calc(var(--edge) + var(--safe-l)); top: calc(var(--edge) + var(--safe-t)); display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: flex; align-items: center; gap: .45em; }
.bar-ico { --is: calc(var(--barh) * 1.2); font-size: calc(var(--barh) * .6); box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.bar-row:nth-child(2) .bar-ico { --is: calc(var(--barh) * .96); margin: 0 calc(var(--barh) * .12); }
.arts-row { display: flex; flex-wrap: wrap; gap: 4px 6px; color: var(--moon); font-size: .8em; letter-spacing: .04em; max-width: calc(var(--barh) * 11); min-height: 1.2em; margin-top: 2px; }
.art-chip { display: inline-flex; align-items: center; gap: .35em; padding: 1px .6em 1px 1px; border-radius: 1em; background: rgba(8, 10, 14, .62); box-shadow: inset 0 0 0 1px rgba(138, 106, 60, .45); white-space: nowrap; }
.art-chip .ico { --is: 1.6em; }
.hud-top {
  position: absolute; left: 50%; top: calc(var(--edge) + var(--safe-t)); transform: translateX(-50%);
  width: min(46vw, 560px); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.wave-tag { padding: 3px 16px; background: rgba(11, 14, 20, .6); border-bottom: 2px solid var(--cinnabar); letter-spacing: .14em; white-space: nowrap; }
.boss-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.boss-name { font-size: clamp(16px, 3vmin, 24px); letter-spacing: .2em; color: #f0d9b0; text-shadow: 0 2px 6px #000; white-space: nowrap; }
.armor-line { width: 62%; height: 5px; background: rgba(0, 0, 0, .6); overflow: hidden; }
.armor-line i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a3c, #e7c88a); transform-origin: left center; transition: transform 140ms ease; }
.armor-line.broken { background: rgba(255, 75, 46, .5); }
.pause-btn { position: absolute; right: calc(var(--edge) + var(--safe-r)); top: calc(var(--edge) + var(--safe-t)); --b: clamp(46px, 9vmin, 58px); }

.combo {
  position: absolute; right: calc(var(--edge) + var(--safe-r) + 1vw); top: 30%;
  display: flex; align-items: baseline; gap: 6px; opacity: 0; transition: opacity 200ms ease;
  color: var(--moon); text-shadow: 0 3px 10px #000;
}
.combo.show { opacity: 1; }
.combo b { font-size: clamp(40px, 10vmin, 84px); line-height: 1; font-weight: 400; color: #fff; text-shadow: 0 0 22px rgba(200, 50, 30, .8), 0 3px 8px #000; display: inline-block; min-width: 1.2em; text-align: right; }
.combo span { font-size: clamp(14px, 3vmin, 24px); color: var(--cinnabar); filter: brightness(1.5); letter-spacing: .1em; }
.combo.bump b { animation: bump 140ms ease-out; }

.wave-banner {
  position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; opacity: 0; white-space: nowrap;
}
.wave-banner .main { font-size: clamp(30px, 8vmin, 72px); letter-spacing: .2em; text-indent: .2em; color: var(--moon); text-shadow: 0 4px 22px #000, 0 0 30px rgba(200, 50, 30, .5); line-height: 1.15; }
.wave-banner .main::after { content: ""; display: block; height: 4px; margin: 4px auto 0; width: 70%; background: linear-gradient(90deg, transparent, var(--cinnabar) 18%, var(--cinnabar) 70%, transparent); }
.wave-banner .sub { margin-top: 4px; color: var(--mute); letter-spacing: .2em; }
.wave-banner.show { animation: banner 2200ms ease forwards; }

.floats { position: absolute; inset: 0; overflow: hidden; }
.float { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: clamp(16px, 3.4vmin, 26px); color: #fff; text-shadow: 0 2px 4px #000, 0 0 6px #000; animation: floatUp 700ms ease-out forwards; }
.float.crit { color: #ffb38a; font-size: clamp(20px, 4.4vmin, 34px); }
.float.armor { color: #e7c88a; }
.float.hurt { color: var(--danger); }
.float.heal { color: var(--jade); }
.float.break, .float.perfect { color: #fff; font-size: clamp(24px, 5.4vmin, 42px); letter-spacing: .2em; text-shadow: 0 0 16px var(--cinnabar), 0 2px 4px #000; animation-duration: 1000ms; }
.float.perfect { text-shadow: 0 0 16px #8fa3c2, 0 2px 4px #000; }

.inkfx, .hurtfx { position: absolute; inset: 0; opacity: 0; transition: opacity 240ms ease; }
.inkfx { background: radial-gradient(ellipse at 50% 50%, rgba(20, 30, 50, 0) 35%, rgba(8, 12, 22, .78) 100%); }
.hurtfx { background: radial-gradient(ellipse at 50% 50%, rgba(200, 50, 30, 0) 50%, rgba(200, 50, 30, .42) 100%); }
.hud.ink .inkfx { opacity: 1; }
.hud.low .hurtfx { opacity: 1; animation: pulse 1100ms ease-in-out infinite; }

/* 摇杆（代码绘制，仅触屏） */
.stick {
  display: none; position: absolute; left: calc(var(--edge) + var(--safe-l) + 6px); bottom: calc(var(--edge) + var(--safe-b) + 6px);
  width: calc(var(--b) * 2.1); height: calc(var(--b) * 2.1); border-radius: 50%; pointer-events: auto;
  background: radial-gradient(circle, rgba(201, 211, 224, .05) 55%, rgba(201, 211, 224, .14) 100%);
  box-shadow: inset 0 0 0 2px rgba(138, 106, 60, .7);
}
.stick i { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a4558, #141a24); box-shadow: 0 0 0 2px var(--bronze), 0 4px 10px rgba(0, 0, 0, .6); will-change: transform; }

/* 技能簇：桌面 = 带键位的小图标排（只显示冷却，不接点击）；触屏 = 右下弧形排布 */
.cluster {
  position: absolute; right: calc(var(--edge) + var(--safe-r)); bottom: calc(var(--edge) + var(--safe-b) + 1.6em);
  display: flex; gap: 10px; --b: clamp(44px, 7vmin, 58px);
}
.cluster .skill-btn { pointer-events: none; }
body.touch .stick { display: block; }
body.touch .cluster { display: block; bottom: calc(var(--edge) + var(--safe-b)); width: calc(var(--b) * 3.5); height: calc(var(--b) * 2.7); --b: clamp(52px, 16vmin, 84px); }
body.touch .cluster .skill-btn { position: absolute; pointer-events: auto; }
body.touch .cluster kbd { display: none; }
body.touch .cluster .act-light { right: 0; bottom: 0; width: calc(var(--b) * 1.4); height: calc(var(--b) * 1.4); }
body.touch .cluster .act-light .glyph { font-size: calc(var(--b) * .28); }
body.touch .cluster .act-heavy { right: calc(var(--b) * 1.55); bottom: calc(var(--b) * .05); }
body.touch .cluster .act-dash { right: calc(var(--b) * 1.25); bottom: calc(var(--b) * 1.2); }
body.touch .cluster .act-skill { right: calc(var(--b) * .1); bottom: calc(var(--b) * 1.55); }
body.touch .cluster .act-ult { right: calc(var(--b) * 2.4); bottom: calc(var(--b) * 1.25); }

@media (orientation: portrait) {
  :root { --b: clamp(48px, 13.5vmin, 72px); }
  body.touch .cluster { --b: clamp(48px, 13.5vmin, 72px); }
  .hud-top { top: calc(var(--edge) + var(--safe-t) + var(--barh) * 2.7 + 4.2em); width: min(88vw, 520px); }   /* 让出左上的双条与心法图标条（最多两行） */
  .arts-row { max-width: min(72vw, 330px); }
  .combo { top: 26%; }
  .card-row { flex-direction: column; align-items: center; }
  /* 竖屏卡片改横排：左图标、右文字左对齐；修行卡的按钮独占一行 */
  .art-card { flex: none; width: min(100%, 360px); max-width: none; min-height: 0; text-align: left; }
  .art-card .card-in { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: .5em .9em; padding: .25em 0; }
  .card-ico { --is: clamp(54px, 16vmin, 70px); font-size: clamp(24px, 7vmin, 32px); }
  .card-txt { flex: 1 1 0; align-items: flex-start; }
  .card-head { flex-direction: row; align-items: center; gap: .7em; }
  .art-card .name { font-size: 1.25em; text-indent: 0; }
  .art-card .ink-btn { flex: 1 1 100%; margin-top: 0; }
  .card-seal { font-size: 1.2em; }
  .skin-pick { left: 0; right: 0; bottom: calc(var(--edge) + var(--safe-b) + 2.3em); justify-content: center; }
  .title-menu { margin-bottom: calc(2.6em + 2vh + 54px) !important; }
  .title-foot { justify-content: center; }
}
/* 手机横屏（矮屏）：收紧弹窗与卡片，保证按钮行始终可见 */
@media (orientation: landscape) and (max-height: 520px) {
  .ink-panel { --pb: clamp(26px, 8vh, 40px); }
  .dlg-title { font-size: clamp(18px, 6vh, 26px); }
  .dlg-head { margin-bottom: .2em; padding-bottom: .25em; }
  .dlg-actions { margin-top: .4em; }
  .dlg-actions.stack { flex-direction: row; }
  .art-card { min-height: clamp(150px, 46vh, 220px); }
  .art-card .card-in { gap: .3em; }
  .card-ico { --is: clamp(44px, 17vh, 68px); font-size: clamp(20px, 8vh, 30px); }
  .art-card .name { font-size: 1.15em; }
  .card-head { flex-direction: row; gap: .6em; }
  .hud-top { width: min(40vw, 420px); }
  .skin-cap { display: none; }
}

/* 结算：左评价印章 + 右指标 */
.result-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(14px, 4vmin, 40px); align-items: center; }
.rating {
  position: relative; width: clamp(96px, 24vmin, 170px); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: url("assets/fx_ink_splat.webp") center / 118% no-repeat;
}
.rating b { font-size: clamp(52px, 14vmin, 104px); line-height: 1; font-weight: 400; color: #fff; text-shadow: 0 0 24px var(--cinnabar), 0 3px 8px #000; }
.rating span { font-size: .85em; color: #f0d9b0; letter-spacing: .4em; text-indent: .4em; text-shadow: 0 1px 3px #000; }
.ink-panel.lose .rating b { text-shadow: 0 0 24px #44506a, 0 3px 8px #000; color: var(--moon); }
.metrics { display: flex; flex-direction: column; gap: .35em; min-width: 0; }
.metric { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; border-bottom: 1px solid rgba(138, 106, 60, .35); padding-bottom: .2em; }
.metric { align-items: center; }
.metric-k { display: inline-flex; align-items: center; gap: .6em; color: var(--c-desc, var(--mute)); letter-spacing: .1em; }
.metric b { font-size: 1.25em; font-weight: 500; color: var(--c-label, var(--moon)); font-variant-numeric: tabular-nums; }
.revive-note { color: var(--danger); }
/* 结算的气氛：胜 = 暖金，败 = 冷灰；评价像印章一样盖下来，指标逐行滑入 */
.ink-panel.win .dlg-title { color: #f4dfb8; text-shadow: 0 2px 10px rgba(0, 0, 0, .8), 0 0 26px rgba(255, 170, 70, .45); }
.ink-panel.win .rating b { color: #fff1d6; text-shadow: 0 0 26px rgba(255, 160, 60, .9), 0 0 60px rgba(200, 50, 30, .65), 0 3px 8px #000; }
.ink-panel.lose .dlg-title { color: #b9c2d0; }
.ink-panel.lose .rating { filter: saturate(.35) brightness(.9); }
.overlay.show .rating { animation: stamp 560ms cubic-bezier(.2, 1.35, .35, 1) 240ms backwards; }
.overlay:not(.settled) .metric { animation: slideIn 380ms var(--ease-in) 420ms backwards; }
.overlay:not(.settled) .metric:nth-child(2) { animation-delay: 500ms; }
.overlay:not(.settled) .metric:nth-child(3) { animation-delay: 580ms; }
.overlay:not(.settled) .metric:nth-child(4) { animation-delay: 660ms; }
.metric { border-bottom-color: rgba(138, 106, 60, .4); }
.metric:last-child b { color: #f0d9b0; }
@media (orientation: portrait) {
  .result-grid { grid-template-columns: 1fr; justify-items: center; }
  .metrics { width: 100%; }
  /* 竖屏结算是单列居中：标题与评价印章共用同一条中轴，关闭钮留在右上角 */
  .ink-panel.result .dlg-head { justify-content: center; }
  .ink-panel.result .dlg-head::after { background: linear-gradient(90deg, transparent, rgba(138, 106, 60, .8) 30%, var(--cinnabar) 50%, rgba(138, 106, 60, .8) 70%, transparent); transform-origin: center; }
  .ink-panel.result .dlg-title { text-indent: .12em; }
  .ink-panel.result .dlg-title::before { display: none; }
  .ink-panel.result .dlg-close { position: absolute; right: 0; top: 50%; margin: -28px -6px 0 0; }
}

@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dealIn { from { opacity: 0; transform: translateY(26px) rotate(-2deg) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes strokeIn { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.3) rotate(-14deg); } 60% { opacity: 1; transform: scale(.94) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes bump { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(1.5); } 18% { opacity: 1; transform: translate(-50%, -60%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(.9); } }
@keyframes banner { 0% { opacity: 0; transform: translateX(-50%) scale(1.25); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 78% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
  .overlay .dlg-body > *, .overlay .dlg-actions > *, .overlay .card-row > *, .overlay .metric, .overlay .rating, .overlay .dlg-head::after { animation: none !important; }
  .skill-btn.ready, .ink-bar.intent.full > .fill, .hud.low .hurtfx { animation: none; }
}

/* ======================================================================
   界面风格（#ui[data-skin]）：同一套布局、图标与交互，三套外观。
   · lacquer 朱漆：上面的默认规则（黑漆铜框图片外壳）
   · steel   玄铁：墨玻璃 + 鎏金细线 + 切角刀形，全部代码绘制（默认）
   · paper   素笺：宣纸底 + 墨字 + 朱砂印，弹窗为浅色
   只覆盖「画法」，不动尺寸与排布；外壳图在这两套里不使用。
   ====================================================================== */

/* ---------------------------------------------------------------- 玄铁 */
#ui[data-skin="steel"] {
  --moon: #e4e9f1; --mute: #909bab; --gold: #d9b86c; --c-sub: #d9b86c; --c-name: #f6ead2; --c-desc: #aab4c2;
}
/* 切角 / 刀形轮廓要在各自元素上定义（依赖该元素自己的 --cut），伪元素继承使用 */
#ui[data-skin="steel"] .ink-panel, #ui[data-skin="steel"] .art-card {
  --chamfer: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
/* 按钮：斜切刀形，鎏金描边 + 朱砂 / 墨玻璃填充 */
#ui[data-skin="steel"] .ink-btn {
  --cut: calc(var(--bh) * .28); --blade: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  padding: 0 calc(var(--bh) * .66); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6));
}
#ui[data-skin="steel"] .ink-btn::before {
  border: 0; border-image: none; clip-path: var(--blade);
  background: linear-gradient(180deg, #ffe7b0 0%, #c79a4f 38%, #6a4718 100%);
}
#ui[data-skin="steel"] .ink-btn::after {
  content: ""; position: absolute; inset: 1.5px; pointer-events: none; clip-path: var(--blade);
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 46%), linear-gradient(180deg, #e9553a 0%, #c8321e 48%, #7a160c 100%);
}
#ui[data-skin="steel"] .ink-btn:hover { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)) drop-shadow(0 0 10px rgba(233, 85, 58, .55)) brightness(1.1); }
#ui[data-skin="steel"] .ink-btn:active { filter: brightness(.9); }
#ui[data-skin="steel"] .ink-btn.secondary { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)); color: #e9dcc0; }
#ui[data-skin="steel"] .ink-btn.secondary::before { background: linear-gradient(180deg, rgba(217, 184, 108, .95), rgba(217, 184, 108, .28) 55%, rgba(217, 184, 108, .6)); }
#ui[data-skin="steel"] .ink-btn.secondary::after { background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 46%), linear-gradient(180deg, #2a3342 0%, #161b25 55%, #0c0f15 100%); }
#ui[data-skin="steel"] .ink-btn.secondary:hover { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)) drop-shadow(0 0 9px rgba(217, 184, 108, .4)) brightness(1.15); }
#ui[data-skin="steel"] .ink-btn.gold { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)); color: #2a1c06; }
#ui[data-skin="steel"] .ink-btn.gold::after { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 46%), linear-gradient(180deg, #f6dc9c 0%, #d9b05a 50%, #9a6f25 100%); }
#ui[data-skin="steel"] .ink-btn.gold .lbl { text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
#ui[data-skin="steel"] .ink-btn.gold .lico { filter: none; }
/* 弹窗：切角墨玻璃板，鎏金描边，四角折线饰 */
#ui[data-skin="steel"] .ink-panel {
  --cut: clamp(12px, 2.4vmin, 20px);
  border: 0; border-image: none; padding: clamp(18px, 3.8vmin, 34px) clamp(18px, 4.2vmin, 40px) clamp(16px, 3.4vmin, 30px);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, .85)) drop-shadow(0 0 26px rgba(217, 184, 108, .1));
}
#ui[data-skin="steel"] .ink-panel::before {
  inset: 0; z-index: -1; clip-path: var(--chamfer);
  background: linear-gradient(155deg, #f2d998 0%, #8a6630 16%, #2b3140 46%, #2b3140 58%, #8a6630 86%, #e2c47e 100%);
}
#ui[data-skin="steel"] .ink-panel::after {
  content: ""; position: absolute; inset: 1.5px; z-index: -1; pointer-events: none; clip-path: var(--chamfer);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' fill='none' stroke='%23d9b86c'%3E%3Cpath stroke-width='1.4' d='M5 29V13l8-8h16'/%3E%3Cpath stroke-opacity='.4' d='M10 29V15l5-5h14'/%3E%3C/svg%3E") left 4px top 4px / 30px 30px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' fill='none' stroke='%23d9b86c'%3E%3Cpath stroke-width='1.4' d='M25 29V13l-8-8H1'/%3E%3Cpath stroke-opacity='.4' d='M20 29V15l-5-5H1'/%3E%3C/svg%3E") right 4px top 4px / 30px 30px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' fill='none' stroke='%23d9b86c'%3E%3Cpath stroke-width='1.4' d='M5 1v16l8 8h16'/%3E%3Cpath stroke-opacity='.4' d='M10 1v14l5 5h14'/%3E%3C/svg%3E") left 4px bottom 4px / 30px 30px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' fill='none' stroke='%23d9b86c'%3E%3Cpath stroke-width='1.4' d='M25 1v16l-8 8H1'/%3E%3Cpath stroke-opacity='.4' d='M20 1v14l-5 5H1'/%3E%3C/svg%3E") right 4px bottom 4px / 30px 30px no-repeat,
    radial-gradient(80% 46% at 50% 0%, rgba(217, 184, 108, .13), transparent 72%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .014) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, rgba(30, 37, 49, .97) 0%, rgba(14, 18, 25, .98) 60%, rgba(9, 11, 16, .98) 100%);
}
#ui[data-skin="steel"] .ink-panel.win::after { box-shadow: inset 0 60px 80px -40px rgba(255, 170, 70, .16); }
#ui[data-skin="steel"] .ink-panel.lose::after { box-shadow: inset 0 60px 80px -40px rgba(200, 50, 30, .18); }
#ui[data-skin="steel"] .dlg-head::after { background: linear-gradient(90deg, var(--cinnabar) 0, var(--cinnabar) 2.4em, rgba(217, 184, 108, .9) 2.4em, rgba(217, 184, 108, .2) 74%, transparent); height: 1.5px; }
#ui[data-skin="steel"] .dlg-title { color: #f6ead2; }
#ui[data-skin="steel"] .dlg-close { box-shadow: inset 0 0 0 1px rgba(217, 184, 108, .7); background: rgba(8, 10, 14, .6); }
#ui[data-skin="steel"] .set-row { border-bottom-color: rgba(217, 184, 108, .18); }
#ui[data-skin="steel"] .seg-btn.on { box-shadow: inset 0 0 0 1px rgba(255, 231, 176, .65); }
/* 卡片：切角墨玻璃，顶部一团朱砂光托住图标 */
#ui[data-skin="steel"] .art-card { --cut: clamp(10px, 1.8vmin, 14px); padding: clamp(16px, 3vmin, 26px) clamp(12px, 2.2vmin, 18px) clamp(14px, 2.6vmin, 22px); }
#ui[data-skin="steel"] .art-card::before {
  border: 0; border-image: none; clip-path: var(--chamfer);
  background: linear-gradient(180deg, rgba(240, 214, 150, .95) 0%, rgba(217, 184, 108, .22) 42%, rgba(217, 184, 108, .22) 70%, rgba(217, 184, 108, .7) 100%);
}
#ui[data-skin="steel"] .art-card::after {
  content: ""; position: absolute; inset: 1.5px; pointer-events: none; clip-path: var(--chamfer);
  background:
    radial-gradient(74% 40% at 50% 16%, rgba(200, 50, 30, .3), transparent 72%),
    linear-gradient(180deg, transparent 62%, rgba(4, 6, 9, .55) 100%),
    linear-gradient(180deg, #222a37 0%, #121720 58%, #0c0f15 100%);
}
#ui[data-skin="steel"] button.art-card:hover::before { background: linear-gradient(180deg, #fff0c6 0%, #e9553a 60%, #f0d696 100%); }
#ui[data-skin="steel"] .art-card.static::after { background: radial-gradient(74% 40% at 50% 16%, rgba(217, 184, 108, .16), transparent 72%), linear-gradient(180deg, #222a37 0%, #121720 58%, #0c0f15 100%); }
#ui[data-skin="steel"] .art-card.maxed::after { background: radial-gradient(74% 40% at 50% 16%, rgba(95, 182, 160, .22), transparent 72%), linear-gradient(180deg, #222a37 0%, #121720 58%, #0c0f15 100%); }
/* 计量条：斜切细条 */
#ui[data-skin="steel"] .ink-bar { --h: calc(var(--barh) * .72); --inl: .2; --inr: .2; width: calc(var(--h) * 11.5); transform: skewX(-20deg); }
#ui[data-skin="steel"] .ink-bar.intent { --h: calc(var(--barh) * .5); width: calc(var(--barh) * .5 * 13.5); }
#ui[data-skin="steel"] .ink-bar.boss { --h: clamp(14px, 2.8vmin, 20px); --inl: .2; width: 100%; }
#ui[data-skin="steel"] .ink-bar::before {
  border: 0; border-image: none;
  background: linear-gradient(180deg, rgba(6, 8, 12, .9), rgba(24, 30, 40, .82));
  box-shadow: inset 0 0 0 1px rgba(217, 184, 108, .6), 0 3px 8px rgba(0, 0, 0, .55);
}
#ui[data-skin="steel"] .ink-bar > .fill, #ui[data-skin="steel"] .ink-bar > .lag { top: calc(var(--h) * .2); bottom: calc(var(--h) * .2); }
#ui[data-skin="steel"] .ink-bar > .fill { background: linear-gradient(180deg, #ff7a5c, #d8392a 50%, #8a1a10); box-shadow: 0 0 8px rgba(216, 57, 42, .55); }
#ui[data-skin="steel"] .ink-bar.intent > .fill { background: linear-gradient(180deg, #f1f5fb, #9db1cf 55%, #53658a); box-shadow: none; }
#ui[data-skin="steel"] .ink-bar.intent.full > .fill { background: linear-gradient(180deg, #ffe2a8, #e6a044 55%, #a85312); box-shadow: 0 0 10px rgba(230, 160, 68, .7); }
#ui[data-skin="steel"] .ink-bar > .num { bottom: 0; transform: skewX(20deg); }
#ui[data-skin="steel"] .ink-bar.intent > .num { font-size: max(10px, calc(var(--h) * .7)); }
#ui[data-skin="steel"] .armor-line { transform: skewX(-20deg); box-shadow: inset 0 0 0 1px rgba(217, 184, 108, .35); }
/* 技能钮：墨玻璃圆盘 + 鎏金环 */
#ui[data-skin="steel"] .skill-btn {
  border-radius: 50%; background: radial-gradient(circle at 50% 32%, #2f3949 0%, #10141c 68%) !important;
  box-shadow: inset 0 0 0 2px rgba(226, 196, 126, .9), inset 0 0 0 4.5px rgba(6, 8, 12, .92), inset 0 0 0 5.5px rgba(217, 184, 108, .35), 0 6px 14px rgba(0, 0, 0, .6);
}
#ui[data-skin="steel"] .skill-btn .sk-ico { width: 78%; height: 78%; }
#ui[data-skin="steel"] .skill-btn .cd { inset: 11%; }
#ui[data-skin="steel"] .skill-btn .glyph { box-shadow: inset 0 0 0 1px rgba(226, 196, 126, .95), 0 1px 3px rgba(0, 0, 0, .7); }
#ui[data-skin="steel"] .skill-btn.ready { box-shadow: inset 0 0 0 2px #ffd9a0, inset 0 0 0 4.5px rgba(6, 8, 12, .92), 0 0 18px rgba(255, 130, 60, .85); }
#ui[data-skin="steel"] .stick { box-shadow: inset 0 0 0 1.5px rgba(217, 184, 108, .75), inset 0 0 0 6px rgba(6, 8, 12, .35); }
#ui[data-skin="steel"] .stick i { box-shadow: 0 0 0 1.5px #d9b86c, 0 4px 10px rgba(0, 0, 0, .6); }
#ui[data-skin="steel"] .wave-tag {
  padding: 4px 42px; border-bottom: 0;
  background:
    linear-gradient(90deg, transparent, #d9b86c 30%, #d9b86c 70%, transparent) bottom / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(8, 10, 14, .78) 22%, rgba(8, 10, 14, .78) 78%, transparent);
}
#ui[data-skin="steel"] .art-chip { box-shadow: inset 0 0 0 1px rgba(217, 184, 108, .5); }
#ui[data-skin="steel"] .title-lockup h1 { color: #eef2f8; text-shadow: 0 4px 30px rgba(0, 0, 0, .85), 0 0 46px rgba(217, 184, 108, .22); }
#ui[data-skin="steel"] .title-lockup .seal { background: linear-gradient(180deg, #e2492f, #9c2213); box-shadow: inset 0 0 0 1px rgba(255, 231, 176, .45); }
#ui[data-skin="steel"] .toast { border-left-color: #d9b86c; }

/* ---------------------------------------------------------------- 素笺 */
#ui[data-skin="paper"] {
  --paper: #ebe2cd; --paper-2: #d9cdb2; --sumi: #1c1915; --sumi-2: #5a5143;
  --paper-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .28 0 0 0 0 .16 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 按钮：主 = 朱砂刷块；次 = 纸签；金 = 墨块 */
#ui[data-skin="paper"] .ink-btn { padding: 0 calc(var(--bh) * .6); filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)); color: #fff6ea; }
#ui[data-skin="paper"] .ink-btn::before {
  border: 0; border-image: none;
  background: linear-gradient(180deg, #d8402a 0%, #b92a18 60%, #8f1f12 100%);
  clip-path: polygon(0 9%, 2.5% 0, 30% 4%, 62% 0, 97% 5%, 100% 0, 99% 46%, 100% 92%, 96% 100%, 60% 96%, 28% 100%, 3% 95%, 0 100%, 1% 52%);
}
#ui[data-skin="paper"] .ink-btn:hover { filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)) brightness(1.1); }
#ui[data-skin="paper"] .ink-btn:active { filter: brightness(.9); }
#ui[data-skin="paper"] .ink-btn.secondary { filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)); color: var(--sumi); }
#ui[data-skin="paper"] .ink-btn.secondary::before {
  clip-path: none; border-radius: 2px;
  background: var(--paper-tex), linear-gradient(180deg, #f3ecda, #ddd1b6);
  box-shadow: inset 0 0 0 1.5px rgba(28, 25, 21, .8), inset 0 0 0 4px rgba(235, 226, 205, .9), inset 0 0 0 5px rgba(28, 25, 21, .25);
}
#ui[data-skin="paper"] .ink-btn.secondary .lbl { text-shadow: none; font-weight: 500; }
#ui[data-skin="paper"] .ink-btn.secondary .lico { filter: none; }
#ui[data-skin="paper"] .ink-btn.secondary:hover { filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)) brightness(1.06); }
#ui[data-skin="paper"] .ink-btn.gold { filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)); color: #f0d9b0; }
#ui[data-skin="paper"] .ink-btn.gold::before { background: linear-gradient(180deg, #2e2a24, #14110e); }
/* 弹窗：宣纸，双线墨框 */
#ui[data-skin="paper"] .ink-panel {
  border: 0; border-image: none; padding: clamp(20px, 4vmin, 38px) clamp(20px, 4.4vmin, 42px) clamp(18px, 3.6vmin, 32px);
  color: var(--sumi); filter: drop-shadow(0 22px 46px rgba(0, 0, 0, .8));
  --c-sub: #a3301c; --c-name: #1c1915; --c-desc: #554c3f; --c-label: #1c1915; --c-gain: #1f7a62; --pip: rgba(28, 25, 21, .6); --pip-on: #c8321e; --mute: #6a6052; --jade: #1f7a62;
}
#ui[data-skin="paper"] .ink-panel::before {
  inset: 0; z-index: -1; border-radius: 3px;
  background: var(--paper-tex), radial-gradient(120% 90% at 50% 0%, #f5eedd 0%, #e4d9c0 62%, #d2c5a6 100%);
  box-shadow: inset 0 0 0 1.5px rgba(28, 25, 21, .75), inset 0 0 0 6px rgba(235, 226, 205, .0), inset 0 0 0 7px rgba(28, 25, 21, .28), inset 0 0 70px rgba(122, 96, 56, .28);
}
#ui[data-skin="paper"] .ink-panel.win::before { box-shadow: inset 0 0 0 1.5px rgba(28, 25, 21, .75), inset 0 0 0 7px rgba(200, 50, 30, .35), inset 0 0 90px rgba(200, 120, 40, .3); }
#ui[data-skin="paper"] .ink-panel.lose::before { filter: saturate(.5) brightness(.93); }
#ui[data-skin="paper"] .dlg-title, #ui[data-skin="paper"] .ink-panel.win .dlg-title, #ui[data-skin="paper"] .ink-panel.lose .dlg-title { color: var(--sumi); text-shadow: none; }
#ui[data-skin="paper"] .ink-panel.win .dlg-title { color: #8f1f12; }
#ui[data-skin="paper"] .dlg-title::before { box-shadow: none; }
#ui[data-skin="paper"] .dlg-head::after { height: 2px; background: linear-gradient(90deg, var(--cinnabar) 0, var(--cinnabar) 2.4em, rgba(28, 25, 21, .8) 2.4em, rgba(28, 25, 21, .15) 78%, transparent); }
#ui[data-skin="paper"] .dlg-close { background: rgba(28, 25, 21, .07); box-shadow: inset 0 0 0 1.5px rgba(28, 25, 21, .6); }
#ui[data-skin="paper"] .dlg-close i, #ui[data-skin="paper"] .dlg-close i::after { background: var(--sumi); }
#ui[data-skin="paper"] .dlg-close:hover { background: var(--cinnabar); }
#ui[data-skin="paper"] .dlg-close:hover i, #ui[data-skin="paper"] .dlg-close:hover i::after { background: #fff; }
#ui[data-skin="paper"] .dlg-close:focus-visible, #ui[data-skin="paper"] .ink-panel .ink-btn:focus-visible, #ui[data-skin="paper"] .seg-btn:focus-visible, #ui[data-skin="paper"] button.art-card:focus-visible { outline-color: var(--sumi); }
#ui[data-skin="paper"] .set-row { border-bottom-color: rgba(28, 25, 21, .2); }
#ui[data-skin="paper"] .seg-btn { background: rgba(28, 25, 21, .08) !important; color: var(--sumi-2) !important; box-shadow: inset 0 0 0 1px rgba(28, 25, 21, .3); }
#ui[data-skin="paper"] .seg-btn:hover { color: var(--sumi) !important; filter: none; background: rgba(28, 25, 21, .15) !important; }
#ui[data-skin="paper"] .seg-btn.on { background: linear-gradient(180deg, #d8402a, #9c2213) !important; color: #fff !important; box-shadow: none; }
#ui[data-skin="paper"] .metric { border-bottom-color: rgba(28, 25, 21, .25); }
#ui[data-skin="paper"] .metric:last-child b { color: #a3301c; }
#ui[data-skin="paper"] .revive-note { color: #a3301c; }
#ui[data-skin="paper"] .ink-panel.lose .rating b { color: #f1ead9; }
/* 卡片：纸签，墨线框；图标圆章压在纸上 */
#ui[data-skin="paper"] .art-card { padding: clamp(16px, 3vmin, 26px) clamp(12px, 2.2vmin, 18px) clamp(14px, 2.6vmin, 22px); color: var(--sumi); filter: drop-shadow(0 5px 10px rgba(60, 44, 20, .35)); }
#ui[data-skin="paper"] .art-card::before {
  border: 0; border-image: none; border-radius: 2px;
  background: var(--paper-tex), linear-gradient(180deg, #faf4e4 0%, #ece2ca 100%);
  box-shadow: inset 0 0 0 1.5px rgba(28, 25, 21, .7), inset 0 0 0 5px rgba(250, 244, 228, 0), inset 0 0 0 6px rgba(28, 25, 21, .2);
}
#ui[data-skin="paper"] .card-ico { box-shadow: 0 0 0 3px rgba(28, 25, 21, .85), 0 5px 12px rgba(60, 44, 20, .45); }
#ui[data-skin="paper"] .card-seal { opacity: .9; color: #fff; background: var(--cinnabar); font-size: 1em; padding: .22em .2em; border-radius: 2px; top: -.2em; right: -.1em; transform: rotate(4deg); }
#ui[data-skin="paper"] button.art-card:hover { filter: drop-shadow(0 12px 18px rgba(60, 44, 20, .5)); }
#ui[data-skin="paper"] button.art-card:hover::before { box-shadow: inset 0 0 0 2px var(--cinnabar), inset 0 0 0 6px rgba(200, 50, 30, .18); }
#ui[data-skin="paper"] button.art-card:hover .card-ico { box-shadow: 0 0 0 3px var(--cinnabar), 0 5px 14px rgba(200, 50, 30, .5); }
/* HUD：压在实景上，仍用深底保证对比；外框换成纸白细线 */
#ui[data-skin="paper"] .ink-bar { --h: calc(var(--barh) * .78); --inl: .16; --inr: .16; width: calc(var(--h) * 10.6); }
#ui[data-skin="paper"] .ink-bar.intent { --h: calc(var(--barh) * .56); width: calc(var(--barh) * .56 * 12); }
#ui[data-skin="paper"] .ink-bar.boss { --h: clamp(16px, 3vmin, 22px); --inl: .16; width: 100%; }
#ui[data-skin="paper"] .ink-bar::before {
  border: 0; border-image: none; border-radius: 2px;
  background: rgba(20, 18, 15, .84); box-shadow: inset 0 0 0 1.5px rgba(235, 226, 205, .85), 0 3px 8px rgba(0, 0, 0, .5);
}
#ui[data-skin="paper"] .ink-bar > .fill, #ui[data-skin="paper"] .ink-bar > .lag { top: calc(var(--h) * .2); bottom: calc(var(--h) * .2); }
#ui[data-skin="paper"] .ink-bar > .fill { background: linear-gradient(180deg, #e0452e, #b92a18); }
#ui[data-skin="paper"] .ink-bar.intent > .fill { background: linear-gradient(180deg, #f5eedd, #b9ad93); }
#ui[data-skin="paper"] .ink-bar.intent > .num { color: #1c1915; text-shadow: 0 0 3px #f5eedd, 0 0 2px #f5eedd; font-size: max(10px, calc(var(--h) * .7)); }
#ui[data-skin="paper"] .ink-bar.intent.full > .num { color: #fff; text-shadow: 0 1px 2px #000; }
#ui[data-skin="paper"] .ink-bar > .num { bottom: 0; }
#ui[data-skin="paper"] .skill-btn {
  border-radius: 50%; background: radial-gradient(circle at 50% 32%, #2e2a24 0%, #14110e 70%) !important;
  box-shadow: inset 0 0 0 2px #ebe2cd, inset 0 0 0 4px #1c1915, 0 6px 14px rgba(0, 0, 0, .55);
}
#ui[data-skin="paper"] .skill-btn .sk-ico { width: 80%; height: 80%; }
#ui[data-skin="paper"] .skill-btn .cd { inset: 10%; }
#ui[data-skin="paper"] .skill-btn .glyph { background: var(--cinnabar); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .6); border-radius: 2px; }
#ui[data-skin="paper"] .stick { box-shadow: inset 0 0 0 2px rgba(235, 226, 205, .8); }
#ui[data-skin="paper"] .stick i { background: radial-gradient(circle at 40% 35%, #f5eedd, #cfc2a4); box-shadow: 0 0 0 2px #1c1915, 0 4px 10px rgba(0, 0, 0, .6); }
#ui[data-skin="paper"] .wave-tag { background: var(--paper-tex), linear-gradient(180deg, #f3ecda, #ddd1b6); color: var(--sumi); border-bottom: 2px solid var(--cinnabar); box-shadow: 0 3px 8px rgba(0, 0, 0, .45); font-weight: 500; }
#ui[data-skin="paper"] .art-chip { background: rgba(235, 226, 205, .92); color: var(--sumi); box-shadow: 0 2px 5px rgba(0, 0, 0, .4); }
#ui[data-skin="paper"] .toast { background: var(--paper-tex), linear-gradient(180deg, #f3ecda, #ddd1b6); color: var(--sumi); box-shadow: 0 10px 34px rgba(0, 0, 0, .7), inset 0 0 0 1.5px rgba(28, 25, 21, .6); }
#ui[data-skin="paper"] .title-lockup h1 { color: #f5eedd; }
#ui[data-skin="paper"] .skin-opt.on { background: linear-gradient(180deg, #f3ecda, #ddd1b6); color: #1c1915; box-shadow: inset 0 0 0 1.5px #1c1915; }

/* 朱漆：铜鞘条左端自带护手，图标圆章略收小 */
#ui[data-skin="lacquer"] .bar-ico { --is: calc(var(--barh) * 1.05); }
#ui[data-skin="lacquer"] .art-card .name { letter-spacing: .14em; text-indent: .14em; }

/* ======================================================================
   语言切换钮（标题页右上角）与英文排版（#ui[data-lang="en"]）
   英文单词比汉字宽得多：只收字号与字距，不动布局与尺寸。
   ====================================================================== */
.lang-btn { position: absolute; right: calc(var(--edge) + var(--safe-r)); top: calc(var(--edge) + var(--safe-t)); pointer-events: auto; cursor: pointer; }
.lang-btn .lico { width: 17px; height: 17px; flex: none; }

#ui[data-lang="en"] .boot-title {
  font-size: clamp(28px, 6.4vmin, 68px); letter-spacing: .06em; text-indent: .06em; line-height: 1.02;
  white-space: pre-line; text-align: center; text-transform: uppercase;
}
#ui[data-lang="en"] .boot-seal { letter-spacing: .22em; text-indent: .22em; margin-top: 0; text-transform: uppercase; }
#ui[data-lang="en"] .title-lockup h1 {
  font-size: clamp(30px, min(7.4vmin, 11.5vh), 86px); letter-spacing: .05em; line-height: 1.02;
  white-space: pre-line; text-transform: uppercase;
}
#ui[data-lang="en"] .title-lockup .seal { letter-spacing: .22em; text-indent: .22em; text-transform: uppercase; }
#ui[data-lang="en"] .ink-btn .lbl { text-indent: 0; white-space: nowrap; }
#ui[data-lang="en"] .set-label { letter-spacing: .06em; }
#ui[data-lang="en"] .seg-btn { min-width: 48px; padding: 0 11px !important; white-space: nowrap; }
#ui[data-lang="en"] .skin-cap { letter-spacing: .08em; }
#ui[data-lang="en"] .skin-opt { padding: 0 11px; }
#ui[data-lang="en"] .depth-label { letter-spacing: .04em; min-width: 12.5em; }
#ui[data-lang="en"] .art-card .name { font-size: 1.2em; letter-spacing: .03em; text-indent: 0; }
#ui[data-lang="en"] .rating span { letter-spacing: .28em; text-indent: .28em; }
#ui[data-lang="en"] .boss-name { letter-spacing: .08em; }
#ui[data-lang="en"] .combo span { font-size: clamp(11px, 2.2vmin, 18px); letter-spacing: .05em; }
#ui[data-lang="en"] .wave-tag { letter-spacing: .06em; }
#ui[data-lang="en"] .metric-k { letter-spacing: .03em; }
#ui[data-lang="en"] .help-table { gap: .5em .9em; font-size: .94em; }
@media (orientation: portrait) {
  #ui[data-lang="en"] .skin-cap { display: none; }
  #ui[data-lang="en"] .seg-btn { min-width: 44px; padding: 0 8px !important; font-size: .92em; }
  #ui[data-lang="en"] .set-row { gap: 8px; }
  #ui[data-lang="en"] .help-table { gap: .5em .6em; font-size: .88em; }
}
