/* colorc.cc · 矮人锻炉 × 美漫 RPG 皮肤（第三版）
 * 框体：skin/rpg/art2/ui/ 下的矢量件。edge = 轻边框（面板/按钮/页签/输入框/进度条/说明框通用），frame = 主窗口重框 + 四角符文饰，
 * plate = 标题铭牌（标题按量出的铭面位置对齐，见 ui/metrics.json）。美术全部由莉刻出图后描摹成 SVG；立绘与背景保留压缩位图。
 * 注意：colorc.cc 的 /assets/（除 /assets/works/）被卫戍协议的 nginx 规则转走，本站素材都放 skin/ 下。 */

:root {
  --ink: #101113;
  --iron-0: #121418;
  --iron-1: #1a1d22;
  --iron-2: #23272d;
  --iron-3: #2f343b;
  --iron-4: #434a53;
  --steel: #7d8794;
  --brass: #d6a33b;
  --brass-hi: #f4cf6a;
  --brass-lo: #8f5f1c;
  --teal: #3fe0cc;
  --forge: #f07a28;
  --blood: #d2452e;
  --paper: #efe3c4;
  --paper-ink: #2a1f15;
  --text: #f1e8d6;
  --text-dim: #b9ae9a;
  --text-faint: #7f7768;
  --unique: #f2903a;
  --magic: #8fa8ff;
  --font-title: 'Germania One', 'Noto Sans SC', sans-serif;
  --font-cn: 'Germania One', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --hud-h: 122px;
  --font-ui: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html.rpg { background: var(--iron-0); font-synthesis: none; }
body.rpg-page {
  margin: 0; min-height: 100vh;
  color: var(--text); font: 400 15.5px/1.75 var(--font-body);
  background: var(--iron-0) url(art2/ui/pattern.svg) 0 0 / 64px;
  -webkit-font-smoothing: antialiased;
}
body.rpg-page.has-hud { padding-bottom: calc(var(--hud-h) + 24px); }
a { color: var(--brass-hi); text-decoration: none; }
a:hover { color: #fff1c2; }
::selection { background: rgba(214, 163, 59, .4); color: #fff; }

/* 背景：深色铁灰 + 菱格纹 + 柔和暗角（干净，不用斑驳贴图） */
.rpg-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(240, 122, 40, .07), transparent 55%), radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0, 0, 0, .55) 100%); }

/* ── 轻边框（通用）：切角 + 黑墨描边 + 黄铜内线 + 角铆钉 ── */
.edge {
  border: 3px solid transparent;
  border-image: url(art2/ui/edge.svg) 10 / 10px / 0 stretch;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}

/* ── 主窗口：重框 + 四角符文饰 ── */
.rpg-window {
  position: relative;
  padding: 46px 34px 30px;
  background: var(--iron-2) url(art2/ui/pattern.svg) 0 0 / 64px;
  border: 18px solid transparent;
  border-image: url(art2/ui/frame.svg) 22 / 18px / 0 stretch;
  background-clip: padding-box;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6));
}
.rpg-window::after {
  content: ""; position: absolute; inset: -24px; pointer-events: none; z-index: 3;
  background:
    url(art2/ui/corner.svg) 0 0 / 54px auto no-repeat,
    url(art2/ui/corner-tr.svg) 100% 0 / 54px auto no-repeat,
    url(art2/ui/corner-bl.svg) 0 100% / 54px auto no-repeat,
    url(art2/ui/corner-br.svg) 100% 100% / 54px auto no-repeat;
}

/* ── 标题铭牌：标题放在量出的铭面里，水平垂直都居中 ── */
.rpg-plate {
  position: absolute; left: 50%; top: -40px; z-index: 4; transform: translateX(-50%);
  width: min(400px, 82%); aspect-ratio: 976 / 194;
  background: url(art2/ui/plate.svg) center / 100% 100% no-repeat;
  pointer-events: none;
}
.rpg-plate > h1, .rpg-plate > h2 {
  position: absolute; left: 16.1%; right: 16.3%; top: 24.2%; bottom: 18%;
  display: flex; align-items: center; justify-content: center; margin: 0; padding-top: .06em;
  font: 700 clamp(17px, 2vw, 23px)/1 var(--font-cn); letter-spacing: .3em; text-indent: .3em; white-space: nowrap;
  color: var(--brass-hi); text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(244, 207, 106, .25);
}

.rpg-heading { margin: 0 0 .5em; font: 700 21px/1.3 var(--font-cn); letter-spacing: .08em; color: var(--brass-hi); text-shadow: 0 2px 0 var(--ink); }
.rpg-eyebrow { margin: 0; color: var(--text-faint); font: 400 13px/1.4 var(--font-title); letter-spacing: .24em; text-transform: uppercase; }
.gold-text { color: var(--brass-hi); text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(244, 207, 106, .2); }

/* 面板：凹进去的铁槽，带轻边框 */
.rpg-panel { background: var(--iron-1); box-shadow: inset 0 2px 10px rgba(0, 0, 0, .45); }
.rpg-panel__title {
  margin: 0; padding: 7px 12px 5px; text-align: center;
  font: 700 15px/1.3 var(--font-ui); letter-spacing: .2em; color: var(--brass-hi);
  border-bottom: 2px solid var(--ink); box-shadow: 0 1px 0 rgba(214, 163, 59, .35);
}

.rpg-divider { height: 22px; margin: 16px auto; max-width: 380px; background: url(art2/ui/divider.svg) center / contain no-repeat; }

/* ── 按钮：黄铜边带 + 铁面 + 角铆钉 ── */
.rpg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 38px; padding: 2px 16px;
  font: 700 14.5px/1.2 var(--font-ui); letter-spacing: .06em; color: #fff3d6;
  text-shadow: 0 2px 0 var(--ink);
  background: none;
  border: 12px solid transparent; border-image: url(art2/ui/btn.svg) 12 fill / 12px / 0 stretch;
  cursor: pointer; transition: filter .12s, transform .08s;
}
.rpg-btn:hover { border-image-source: url(art2/ui/btn-hot.svg); color: #fff; }
.rpg-btn:active { transform: translateY(1px); }
.rpg-btn--ember { border-image-source: url(art2/ui/btn-ember.svg); }
.rpg-btn--ember:hover { border-image-source: url(art2/ui/btn-hot.svg); }
.rpg-btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; }

/* 输入框 */
.rpg-input {
  width: 100%; padding: 6px 10px 6px 30px;
  font: 400 15px/1.4 var(--font-body); color: var(--text);
  background: #0c0d10 url(art2/ui/search.svg) 8px 50% / 15px no-repeat;
  border: 3px solid transparent; border-image: url(art2/ui/edge.svg) 10 / 10px / 0 stretch; outline: none;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.rpg-input:focus { border-image-source: url(art2/ui/edge-hot.svg); }
.rpg-input::placeholder { color: var(--text-faint); }

/* 页签 */
.rpg-tabs { display: flex; gap: 4px; }
.rpg-tab {
  flex: 1 1 0; min-width: 0; padding: 5px 8px 3px;
  font: 700 14.5px/1.3 var(--font-ui); letter-spacing: .1em; color: var(--text-dim); cursor: pointer;
  background: none; border: 8px solid transparent; border-bottom: 0;
  border-image: url(art2/ui/tab.svg) 8 8 0 fill / 8px 8px 0 / 0 stretch;
}
.rpg-tab:hover { color: #fff1c2; }
.rpg-tab[aria-selected="true"] { color: var(--brass-hi); border-image-source: url(art2/ui/tab-on.svg); text-shadow: 0 2px 0 var(--ink); }

/* 进度条 */
.rpg-bar { position: relative; height: 18px; border: 7px solid transparent; border-image: url(art2/ui/bar.svg) 7 fill / 7px / 0 stretch; }
.rpg-bar > i { position: absolute; left: -2px; top: -2px; bottom: -2px; display: block; background: linear-gradient(180deg, #ffe08a, #e4a43a 55%, #a8661c); border-radius: 2px; }
.rpg-bar > span { position: absolute; inset: -6px -6px; display: flex; align-items: center; justify-content: center; font: 700 11px/1 var(--font-body); color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; letter-spacing: .08em; }

/* ── 说明框（物品 / 天赋 / 术语） ── */
.rpg-tip {
  --tip: var(--brass); --tip-name: var(--brass-hi);
  position: fixed; z-index: 1000; left: 0; top: 0;
  width: max-content; max-width: min(400px, calc(100vw - 24px)); min-width: 220px;
  background: #121418; color: var(--text-dim); text-align: center;
  font: 400 14px/1.6 var(--font-body);
  border: 3px solid transparent; border-image: url(art2/ui/edge.svg) 10 / 10px / 0 stretch;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .7));
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .1s, transform .1s;
}
.rpg-tip.is-on { opacity: 1; transform: none; }
.rpg-tip__head { padding: 8px 18px 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--tip) 34%, #15171b), #15171b); border-bottom: 2px solid var(--ink); box-shadow: 0 1px 0 color-mix(in srgb, var(--tip) 60%, transparent); }
.rpg-tip__name { font: 700 16.5px/1.35 var(--font-ui); color: var(--tip-name); text-shadow: 0 2px 0 var(--ink); letter-spacing: .04em; }
.rpg-tip__type { font-size: 12.5px; color: #c9c2b4; }
.rpg-tip__body { padding: 8px 16px 11px; }
.rpg-tip__sep { height: 2px; margin: 7px 16%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tip) 70%, transparent), transparent); }
.rpg-tip__prop { color: #8f887b; }
.rpg-tip__prop b { color: #eee6d6; font-weight: 400; }
.rpg-tip__mod { color: var(--magic); }
.rpg-tip__desc { color: #d9cfbd; text-align: left; white-space: pre-line; }
.rpg-tip__flavour { color: var(--unique); font-style: italic; }
.rpg-tip__hint { margin-top: 5px; color: #8f887b; font-size: 12px; }
.rpg-tip--unique { --tip: #f2903a; --tip-name: #ffb05c; }
.rpg-tip--theme { --tip: #d6a33b; --tip-name: #f4cf6a; }
.rpg-tip--hub { --tip: #f07a28; --tip-name: #ffd27a; }
.rpg-tip--small { --tip: #8f5f1c; --tip-name: #f1e2bd; }
.rpg-tip--dim { --tip: #4a5561; --tip-name: #aeb9c6; }
.rpg-tip--northstar { --tip: #4f6fb0; --tip-name: #b9cdf5; }
.rpg-tip--start { --tip: #f07a28; --tip-name: #ffe1a0; }
.rpg-tip--term { --tip: #1fa596; --tip-name: #7ff0e2; text-align: left; }

/* ── 左上角玩家框 ── */
.rpg-player { position: fixed; left: 12px; top: 10px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; }
.rpg-player__face { width: 64px; height: 64px; flex: none; border-radius: 50%; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); }
.rpg-player__face img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.rpg-player__name { font: 400 22px/1.1 var(--font-title); color: var(--brass-hi); text-shadow: 0 2px 0 var(--ink); letter-spacing: .06em; }
.rpg-player__sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; text-shadow: 0 1px 2px #000; }
.rpg-player__lv { display: inline-block; margin-right: 6px; padding: 0 6px; font: 700 11px/1.7 var(--font-body); color: var(--ink); background: var(--brass-hi); box-shadow: 0 0 0 2px var(--ink); }

/* ── 底部 HUD：左球（点亮的天赋）· 技能栏（导航）· 右球（作品） ── */
.rpg-hud { position: fixed; left: 50%; bottom: 0; z-index: 50; transform: translateX(-50%); width: min(640px, 100vw); height: var(--hud-h);
  display: grid; grid-template-columns: 112px 1fr 112px; align-items: end; pointer-events: none; }
.rpg-hud > * { pointer-events: auto; }
.rpg-hud__bar { align-self: end; height: 96px; margin: 0 -22px; padding: 8px 34px 0;
  background: var(--iron-2) url(art2/ui/pattern.svg) 0 0 / 48px;
  border: 10px solid transparent; border-bottom: 0; border-image: url(art2/ui/edge.svg) 10 10 0 fill / 10px 10px 0 / 0 stretch; }
.rpg-hud__xp { margin: 0 4px 8px; }
.rpg-hud__skills { display: flex; justify-content: center; gap: 10px; }
.rpg-skill { position: relative; display: block; width: 48px; height: 48px; flex: none; padding: 4px; background: url(art2/ui/slot-small.svg) center / 100% 100% no-repeat; }
.rpg-skill svg { width: 100%; height: 100%; display: block; filter: saturate(.8) brightness(.88); transition: filter .12s, transform .12s; }
.rpg-skill:hover svg, .rpg-skill.is-current svg { filter: none; transform: scale(1.06); }
.rpg-skill.is-current::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--brass-hi); box-shadow: 0 0 10px rgba(244, 207, 106, .55); }
.rpg-skill .key { position: absolute; right: 1px; bottom: -3px; font: 700 11px/1.2 var(--font-body); color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; }
.rpg-skill .lbl { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 1px 8px; white-space: nowrap;
  font: 700 12.5px/1.6 var(--font-ui); color: var(--brass-hi); background: #121418; box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--brass-lo); opacity: 0; transition: opacity .12s; pointer-events: none; }
.rpg-skill:hover .lbl, .rpg-skill:focus-visible .lbl { opacity: 1; }

.rpg-orb { position: relative; width: 112px; height: 112px; align-self: end; z-index: 2; display: block; text-align: center; color: #fff; }
.rpg-orb__liquid { position: absolute; left: 21%; top: 19%; width: 58%; height: 58%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 110%, #ff7e4a 0%, #c42a14 45%, #5a0b04 100%); box-shadow: inset 0 -8px 14px rgba(0, 0, 0, .45); }
.rpg-orb__liquid::after { content: ""; position: absolute; left: 18%; top: 10%; width: 44%; height: 26%; border-radius: 50%; background: rgba(255, 255, 255, .38); }
.rpg-orb--mana .rpg-orb__liquid { background: radial-gradient(circle at 50% 110%, #7cc6ff 0%, #2a5fd0 45%, #0b1a5c 100%); }
.rpg-orb__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rpg-orb--mana .rpg-orb__frame { transform: scaleX(-1); }
.rpg-orb__val { position: absolute; left: 0; right: 0; top: 33%; font: 400 25px/1 var(--font-title); text-shadow: 0 2px 0 var(--ink), 0 0 4px #000; }
.rpg-orb__lbl { position: absolute; left: 0; right: 0; top: 58%; font: 700 11px/1 var(--font-ui); letter-spacing: .12em; text-shadow: 0 1px 0 var(--ink), 0 0 3px #000; }

.rpg-scroll { scrollbar-width: thin; scrollbar-color: var(--brass-lo) var(--iron-0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rpg-muted { color: var(--text-faint); }
.rpg-source { font-size: 12px; color: var(--text-faint); }

@media (max-width: 720px) {
  :root { --hud-h: 98px; }
  .rpg-window { padding: 40px 14px 20px; border-width: 14px; border-image-width: 14px; }
  .rpg-window::after { inset: -18px; background-size: 40px auto, 40px auto, 40px auto, 40px auto; }
  .rpg-plate { top: -34px; width: 88%; }
  .rpg-hud { grid-template-columns: 78px 1fr 78px; }
  .rpg-hud__bar { height: 80px; margin: 0 -14px; padding: 6px 16px 0; }
  .rpg-orb { width: 78px; height: 78px; }
  .rpg-orb__val { font-size: 18px; }
  .rpg-orb__lbl { font-size: 9.5px; letter-spacing: .04em; }
  .rpg-skill { width: 40px; height: 40px; }
  .rpg-skill .key { display: none; }
  .rpg-player__face { width: 50px; height: 50px; }
  .rpg-player__name { font-size: 18px; }
  .rpg-player__sub { font-size: 11px; }
}
