/* [PL] Królestwo Polskie – panel gracza (wersja 3). Korzysta z style.css (kolory, czcionki, pasek górny, przyciski, kbd)
   i dokłada ciemny pulpit postaci w stylu strony: baner z grafiką KCD II, karty z cienkim obramowaniem, sloty jak w ekwipunku
   gry, karmazynowe paski postępu, jakość przedmiotów I–IV. Klasy i identyfikatory zgodne z panel.js. */

.pn-body { display: flex; flex-direction: column; min-height: 100vh; background: radial-gradient(90% 50% at 50% 0%, #1f1813 0%, var(--bg) 70%); }
.pn-body .bar-act { margin-left: auto; }
.pn { flex: 1; width: min(1320px, 100% - 2 * var(--g)); margin: 0 auto; padding: calc(var(--bar-h) + 36px) 0 64px; }
.pn-live { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border-radius: 999px; font: 500 14px/1 var(--f-ui); white-space: nowrap; color: var(--on); background: rgba(14, 11, 9, 0.6); box-shadow: inset 0 0 0 1px var(--line-2); }
.pn-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--steel); }
.pn-live.on i { background: #67c35f; }
.pn-live.off i { background: var(--red-lt); }
.pn-foot { padding: 22px var(--g) 28px; font-size: 13.5px; line-height: 1.5; text-align: center; color: var(--on-3); border-top: 1px solid var(--line); }

/* ================================================================ logowanie */
.pn-login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); width: min(1080px, 100%); margin: clamp(0px, 3vh, 32px) auto 0; overflow: hidden; border-radius: 20px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line), 0 50px 100px -40px rgba(0, 0, 0, 0.9); }
.pn-login-art { position: relative; display: flex; align-items: flex-end; min-height: 560px; overflow: hidden; isolation: isolate; }
.pn-login-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 48% 30%; }
.pn-login-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(14, 11, 9, 0.95) 0%, rgba(14, 11, 9, 0.6) 40%, rgba(14, 11, 9, 0.05) 75%); }
.pn-login-brand { padding: clamp(24px, 3vw, 40px); }
.pn-crest { width: 92px; height: auto; margin-bottom: 14px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
.pn-title { font: 700 clamp(42px, 4.6vw, 64px)/0.92 var(--f-d); letter-spacing: -0.025em; color: #f6efe3; }
.pn-tag { max-width: 36ch; margin-top: 14px; font-size: 16px; line-height: 1.5; color: var(--on-2); }
.pn-card { position: relative; padding: clamp(28px, 3.4vw, 48px); }
.pn-login .pn-card { align-self: center; }
.pn-h { font: 700 clamp(28px, 2.6vw, 36px)/1.05 var(--f-d); letter-spacing: -0.015em; }
.pn-lead { margin-top: 10px; font-size: 16.5px; line-height: 1.55; color: var(--on-2); }
.form { display: grid; gap: 16px; margin-top: 26px; }
.field { display: grid; gap: 7px; }
.field > span:first-child { font-size: 14px; font-weight: 600; color: var(--on-2); }
.field input { width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 10px; font: 500 17px/1 var(--f-ui); color: var(--on); background: #120e0b; box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 0.2s; }
.field input:hover { box-shadow: inset 0 0 0 1px rgba(239, 230, 214, 0.35); }
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--red-lt); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--red-lt); }
.secret { position: relative; display: block; }
.secret input { padding-right: 52px; }
.eye { position: absolute; right: 6px; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; color: var(--on-3); background: none; transform: translateY(-50%); cursor: pointer; }
.eye:hover { color: var(--on); background: rgba(239, 230, 214, 0.06); }
.eye .i { width: 20px; height: 20px; }
.error { min-height: 22px; font-size: 15px; line-height: 1.4; color: #f08a7e; }
.btn.wide { width: 100%; }
.pn-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 14px 16px; border-radius: 12px; background: rgba(239, 230, 214, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.pn-note .i { width: 22px; height: 22px; margin-top: 1px; color: var(--red-lt); }
.pn-note p { font-size: 15px; line-height: 1.5; color: var(--on-2); }
.pn-fine { margin-top: 18px; font-size: 14.5px; color: var(--on-3); }
.pn-fine a { color: var(--on); text-decoration-color: var(--red-lt); text-underline-offset: 3px; }
.pn-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* ================================================================ stany */
.pn-state { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 14vh 0; text-align: center; }
.pn-gear { width: 64px; height: 64px; color: var(--red-lt); }
.pn-gear .i { width: 100%; height: 100%; stroke-width: 1.2; animation: turn 3s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.pn-state-t { font-size: 17px; color: var(--on-2); }
.pn-down { padding: 8vh 0; }
.pn-down .pn-card { width: min(560px, 100%); padding-top: 62px; border-radius: 20px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.pn-card.center { text-align: center; }

/* wosk (span.wax z panel.js i stan „niedostępny”) */
span.wax, div.wax { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; color: #f6dccf; background: radial-gradient(circle at 36% 30%, #d54a3c, #9d1f18 55%, #5c0f0b); box-shadow: inset 0 0 0 3px rgba(60, 8, 4, 0.35), 0 4px 8px rgba(40, 6, 2, 0.4); filter: none; }
span.wax .i, div.wax .i { width: 22px; height: 22px; stroke-width: 1.6; }
.wax.broken { position: absolute; left: 50%; top: -30px; width: 62px; height: 62px; transform: translateX(-50%); }
.wax.broken .i { width: 28px; height: 28px; }
.wax.broken::after { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 3px; margin-left: -1px; background: linear-gradient(180deg, transparent, rgba(20, 4, 2, 0.95) 20%, rgba(20, 4, 2, 0.95) 80%, transparent); transform: rotate(18deg); }

/* slot jak w ekwipunku gry (span.seal > span.seal-in > svg z panel.js) */
.seal { --s: 48px; display: grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 10px; color: #eadfc9; background: linear-gradient(180deg, #2d241c, #17110d); box-shadow: inset 0 0 0 1px rgba(239, 230, 214, 0.16), inset 0 0 0 4px #17110d, inset 0 0 0 5px rgba(239, 230, 214, 0.07); }
.seal-in { display: contents; }
.seal .i { width: calc(var(--s) * 0.48); height: calc(var(--s) * 0.48); stroke-width: 1.5; }
.cap { font-size: 13.5px; font-weight: 500; color: var(--on-3); }
.nowrap { white-space: nowrap; }
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(239, 230, 214, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.ri { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 8px; color: var(--red-lt); background: rgba(166, 31, 26, 0.14); }
.ri .i { width: 18px; height: 18px; }
.rt b { display: block; font-weight: 600; line-height: 1.3; }
.rt small { display: block; font-size: 13.5px; line-height: 1.35; color: var(--on-3); }

/* ================================================================ karta postaci */
.sheet { display: grid; gap: 18px; }
.demo-ribbon { padding: 12px 18px; border-radius: 12px; font-size: 15px; line-height: 1.45; color: #fff; background: linear-gradient(90deg, var(--red-dk), var(--red)); }
.demo-ribbon b { font-weight: 700; }
.demo-ribbon a { color: #fff; text-underline-offset: 3px; }
.sheet-top { position: relative; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); overflow: hidden; isolation: isolate; padding: clamp(24px, 3vw, 40px); border-radius: 20px; background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line); }
.sheet-top::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(img/tlo-kcd.jpg) 100% 42% / max(140%, 1500px) auto no-repeat; }
.sheet-top::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18, 14, 11, 0.97) 0%, rgba(18, 14, 11, 0.86) 45%, rgba(18, 14, 11, 0.55) 100%); }
.sheet-seal { display: grid; place-items: center; flex: none; width: 96px; height: 112px; color: #fff; background: var(--red); clip-path: path("M0 0H96V56C96 87 73 105 48 112C23 105 0 87 0 56Z"); }
.sheet-seal > span { padding-bottom: 10px; font: 700 34px/1 var(--f-d); letter-spacing: -0.02em; }
.sheet-id { flex: 1; min-width: 0; }
.sheet-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; font-weight: 500; color: var(--on-3); }
.online { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.online.on { color: #cfe8c4; background: rgba(63, 122, 58, 0.3); box-shadow: inset 0 0 0 1px rgba(120, 190, 110, 0.45); }
.online.on::before { background: #67c35f; }
.online.off { color: var(--on-2); background: rgba(239, 230, 214, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); }
.online.off::before { background: var(--steel); }
.sheet-name { margin-top: 6px; font: 700 clamp(34px, 4.4vw, 60px)/1 var(--f-d); letter-spacing: -0.025em; color: #f6efe3; overflow-wrap: anywhere; }
.sheet-sub { margin-top: 10px; font-size: 15.5px; color: var(--on-3); }
.sheet-sub b { font-weight: 600; color: var(--on); }
.money { display: flex; flex: none; margin: 0; }
.money > div { padding: 6px 0 6px 26px; text-align: right; }
.money > div + div { margin-left: 26px; border-left: 1px solid var(--line-2); }
.money dt { font-size: 14px; font-weight: 500; color: var(--on-3); }
.money dd { margin: 4px 0 0; font: 700 clamp(30px, 3vw, 42px)/1 var(--f-d); color: #fff; white-space: nowrap; }
.money dd i { font-style: normal; font-variant-numeric: tabular-nums; }
.money dd small { margin-left: 6px; font: 500 16px var(--f-ui); color: var(--on-3); }

.sheet-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; padding: clamp(18px, 1.8vw, 26px); border-radius: 18px; background: linear-gradient(180deg, #211913 0%, #1a1410 100%); box-shadow: inset 0 0 0 1px var(--line); }
.pc-cond, .pc-town, .pc-tools, .pc-stats { grid-column: span 4; }
.pc-jobs, .pc-crafts { grid-column: span 6; }
.pc-skills { grid-column: span 8; }
.pc-vault { grid-column: span 5; }
.pc-market { grid-column: span 7; }
.pc-inv { grid-column: 1 / -1; }
.p-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.p-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; color: var(--red-lt); background: rgba(166, 31, 26, 0.14); }
.p-ico .i { width: 19px; height: 19px; }
.p-title { flex: 1; min-width: 0; font: 700 23px/1.1 var(--f-d); letter-spacing: -0.01em; }
.p-badge { flex: none; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--on-2); background: rgba(239, 230, 214, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); }
.p-badge:empty { display: none; }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 4px 4px 0; font-size: 14.5px; color: var(--on-3); }
.sheet-foot b { font-weight: 600; color: var(--on-2); }
.sheet code.cmd { color: var(--on); }

/* ---- paski ---- */
.meters { display: grid; gap: 14px; }
.m-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; }
.m-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.m-name small { margin-left: 6px; font-size: 13.5px; font-weight: 400; color: var(--on-3); }
.m-val { font: 700 18px/1.1 var(--f-d); white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-val small { margin-left: 3px; font: 500 13px var(--f-ui); color: var(--on-3); }
.track2 { position: relative; grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 4px; background: rgba(239, 230, 214, 0.09); }
.track2 > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); border-radius: 4px; background: var(--red-hi); }
.motion .track2 > i { animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes grow { from { width: 0; } }
.track2.green > i { background: #5aa152; }
.track2.red > i { background: #e0503f; }
.track2.max > i { background: linear-gradient(90deg, var(--steel-2), var(--red-hi)); }
.m-xp { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--on-3); font-variant-numeric: tabular-nums; }
.cond-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.cond-box { padding: 12px 14px; border-radius: 12px; background: rgba(239, 230, 214, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.cond-box dt { font-size: 13px; font-weight: 500; color: var(--on-3); }
.cond-box dd { margin: 5px 0 0; font: 700 24px/1.1 var(--f-d); font-variant-numeric: tabular-nums; }
.cond-box dd small { margin-left: 4px; font: 500 13.5px var(--f-ui); color: var(--on-3); }

/* ---- fachy, rzemiosła, narzędzia ---- */
.trades { display: grid; gap: 10px; }
.trade { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 14px; border-radius: 14px; background: rgba(239, 230, 214, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.trade .seal { --s: 52px; grid-row: span 3; align-self: start; }
.trade-hd { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.trade-hd b { font: 700 20px/1.2 var(--f-d); }
.trade-hd .lv { font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--on-2); }
.trade-title { font-size: 14px; font-weight: 600; color: var(--red-txt); }
.trade .track2, .trade .m-xp { grid-column: 2; }
.trade .track2 { margin-top: 4px; }
.sheet .tools { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 8px; }
.tool { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(239, 230, 214, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.tool .seal { --s: 46px; }
.tool b { display: block; font: 700 17px/1.2 var(--f-d); }
.tool small { display: block; font-size: 13.5px; color: var(--on-3); }
.pips { display: flex; gap: 5px; }
.pips i { width: 10px; height: 18px; border-radius: 2px; background: rgba(239, 230, 214, 0.12); }
.pips i.on { background: var(--red-hi); }

/* ---- miasto ---- */
.town-name { font: 700 26px/1.1 var(--f-d); }
.town-rank { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--red-txt); }
.town-rep { margin-top: 16px; }
.town-doc { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(239, 230, 214, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.town-doc b { display: block; font-weight: 600; line-height: 1.3; }
.town-doc small { display: block; font-size: 13.5px; color: var(--on-3); }
.town-doc.late small { color: #f08a7e; }

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }

/* ---- ekwipunek ---- */
.inv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 10px; }
.inv-search { position: relative; display: block; flex: 1 1 240px; }
.inv-search .i { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; color: var(--on-3); transform: translateY(-50%); pointer-events: none; }
.inv-search input, .inv-sel select { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 10px; font: 500 15.5px/1 var(--f-ui); color: var(--on); background: #120e0b; box-shadow: inset 0 0 0 1px var(--line-2); }
.inv-search input { padding-left: 40px; }
.inv-search input:focus, .inv-sel select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--red-lt); }
.inv-sel { display: block; flex: 0 1 210px; }
.inv-sel select { cursor: pointer; color-scheme: dark; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; color: var(--on-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.inv-wrap { position: relative; }
.inv { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.inv th, .inv td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.inv thead th { position: sticky; top: var(--bar-h); z-index: 1; font-size: 13px; font-weight: 600; color: var(--on-3); background: #1d1611; border-bottom: 1px solid var(--line-2); }
.inv .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv tbody tr:not(.cat-row):hover { background: rgba(239, 230, 214, 0.035); }
.inv tbody tr.cat-row td { padding: 18px 12px 8px; font: 700 16px/1.2 var(--f-d); color: var(--on-2); background: none; border-bottom: 1px solid var(--line-2); }
.it-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.it-name b { font-weight: 600; }
.it-name small { font-size: 13px; color: var(--on-3); }
.worn { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--red); white-space: nowrap; }
.worn .i { width: 13px; height: 13px; }
.hp { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.hp .track2 { flex: 1; max-width: 110px; height: 6px; }
.hp span { min-width: 3.2em; font-size: 14px; color: var(--on-2); font-variant-numeric: tabular-nums; }
.q { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: 6px; font: 700 14px/1 var(--f-d); color: var(--on-2); background: rgba(239, 230, 214, 0.07); box-shadow: inset 0 0 0 1px var(--line-2); }
.q.q2 { color: #b9e3ad; background: rgba(90, 161, 82, 0.2); box-shadow: inset 0 0 0 1px rgba(120, 190, 110, 0.45); }
.q.q3 { color: #b8d6f5; background: rgba(70, 130, 190, 0.22); box-shadow: inset 0 0 0 1px rgba(120, 170, 220, 0.45); }
.q.q4 { color: #fff; background: var(--red); box-shadow: none; }
.dash { color: var(--on-3); }
.inv-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 14px; font-size: 15px; color: var(--on-2); }
.inv-sum b { font: 700 17px var(--f-d); color: var(--on); }
.empty { padding: 28px 10px; font-size: 16px; text-align: center; color: var(--on-3); }
.empty-note { padding: 4px 2px; font-size: 15.5px; line-height: 1.5; color: var(--on-3); }

/* ================================================================ Skarbiec i Market */
.vt, .mk { display: grid; align-content: start; gap: 14px; }
.vt-bank { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(239, 230, 214, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.vt-bank .seal { --s: 58px; }
.vt-sum { margin-top: 2px; font: 700 36px/1.05 var(--f-d); font-variant-numeric: lining-nums tabular-nums; }
.vt-sum small { margin-left: 7px; font: 500 16px var(--f-ui); color: var(--on-3); }
.vt-hint { margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--on-3); }
.vt-lock { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(166, 31, 26, 0.1); box-shadow: inset 0 0 0 1px rgba(220, 74, 61, 0.3); }
.vt-lock p { font-size: 15px; line-height: 1.45; color: var(--on-2); }
.vt-list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); scrollbar-width: thin; scrollbar-color: rgba(239, 230, 214, 0.25) transparent; }
.vt-list.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 40px), rgba(0, 0, 0, 0.2)); mask-image: linear-gradient(180deg, #000 calc(100% - 40px), rgba(0, 0, 0, 0.2)); }
.vt-list li { display: grid; grid-template-columns: minmax(0, 1fr) 36px 60px; align-items: center; gap: 10px; padding: 8px 6px 8px 4px; border-bottom: 1px solid var(--line); }
.vt-list li:last-child { border-bottom: 0; }
.vt-list li:hover { background: rgba(239, 230, 214, 0.035); }
.vt-it { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
.vt-it b { font-weight: 600; overflow-wrap: anywhere; }
.vt-it small { font-size: 13px; color: var(--on-3); }
.vt-list .q { min-width: 34px; height: 22px; font-size: 13px; }
.vt-amt { font: 700 16px var(--f-d); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.mk-offer { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 18px 26px; }
.mk-title { font: 700 27px/1.1 var(--f-d); }
.mk-lead { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--on-2); }
.mk-feats { gap: 6px; margin-top: 14px; }
.mk-feats .row { padding: 4px 0; background: none; box-shadow: none; }
.mk-feats .ri { width: 32px; height: 32px; }
.mk-feats .ri .i { width: 16px; height: 16px; }
.mk-feats .rt b { font-weight: 500; font-size: 15.5px; }
.mk-plaque { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 18px; border-radius: 14px; background: var(--leather); box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-plaque::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(239, 230, 214, 0.12); border-radius: 10px; pointer-events: none; }
.mk-plaque .wax { position: absolute; right: 16px; top: -18px; width: 50px; height: 50px; }
.mk-price { font: 700 52px/1 var(--f-d); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.mk-price small { margin-left: 8px; font: 500 20px var(--f-ui); color: var(--on-3); }
.mk-note { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--on-2); }
.mk-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.mk-bar > .mk-msg { flex: 1 1 100%; }
.mk-bank { flex: 1 1 260px; font-size: 15.5px; line-height: 1.45; color: var(--on-2); }
.mk-bank b { font: 700 18px var(--f-d); color: var(--on); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-enough, .mk-short { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.mk-enough { color: #8fd187; }
.mk-enough .i { width: 16px; height: 16px; stroke-width: 2.2; }
.mk-short { color: #f08a7e; }
.mk-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.mk-q { flex: 1 1 100%; font-size: 15.5px; font-weight: 600; text-align: right; color: var(--on); }
.mk-wait { display: flex; flex: 1 1 100%; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 12px; background: rgba(239, 230, 214, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-spin { flex: none; width: 30px; height: 30px; color: var(--red-lt); }
.mk-spin .i { width: 100%; height: 100%; stroke-width: 1.3; animation: turn 4s linear infinite; }
.mk-wait b { display: block; font-weight: 600; }
.mk-wait small { display: block; font-size: 13.5px; color: var(--on-3); }
.mk-msg { padding: 11px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.mk-msg.ok { color: #cfe8c4; background: rgba(63, 122, 58, 0.22); box-shadow: inset 0 0 0 1px rgba(120, 190, 110, 0.4); }
.mk-msg.err { color: #f6c3bb; background: rgba(166, 31, 26, 0.18); box-shadow: inset 0 0 0 1px rgba(220, 74, 61, 0.45); }
.mk-msg.wait { flex: 1 1 280px; color: var(--on-2); background: rgba(239, 230, 214, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-own { display: grid; gap: 14px; }
.mk-own-hd { display: flex; align-items: center; gap: 14px; }
.mk-own-hd .seal { --s: 58px; }
.mk-name { margin-top: 2px; font: 700 25px/1.15 var(--f-d); overflow-wrap: anywhere; }
.mk-where { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 15.5px; line-height: 1.45; color: var(--on-2); background: rgba(239, 230, 214, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.mk-where .i { width: 20px; height: 20px; margin-top: 1px; color: var(--red-lt); }
.mk-where b { font-weight: 600; color: var(--on); }
.mk-where.off { background: rgba(166, 31, 26, 0.1); box-shadow: inset 0 0 0 1px rgba(220, 74, 61, 0.35); }
.mk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.mk-sub { display: block; margin-top: 3px; font: 500 12.5px/1.3 var(--f-ui); color: var(--on-3); }
.mk-team, .mk-cmds, .mk-also { display: grid; gap: 8px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.mk-chips li { padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(239, 230, 214, 0.07); box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-hint { font-size: 14.5px; line-height: 1.5; color: var(--on-3); }
.mk-cmds ul { display: grid; gap: 6px; }
.mk-cmds li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 14.5px; color: var(--on-3); }
.mk-cmds code.cmd { min-width: 10em; text-align: center; }
.mk-also { padding-top: 14px; border-top: 1px solid var(--line); }
.mk-ret { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(239, 230, 214, 0.04); box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-ret > .i { width: 22px; height: 22px; margin-top: 1px; color: var(--red-lt); }
.mk-ret p { font-size: 15px; line-height: 1.45; color: var(--on-2); }

/* ================================================================ RWD */
@media (max-width: 1240px) {
  .mk-offer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .pc-cond, .pc-town, .pc-tools, .pc-stats { grid-column: span 6; }
  .pc-skills { grid-column: 1 / -1; }
  .pc-vault, .pc-market { grid-column: 1 / -1; order: 1; }
  .pc-crafts, .pc-stats, .pc-skills, .pc-inv { order: 2; }
  .mk-offer { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .vt.has-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; }
  .vt.has-list > .vt-list { grid-column: 2; grid-row: 1 / span 3; }
}
@media (max-width: 860px) {
  .pn-login { grid-template-columns: minmax(0, 1fr); }
  .pn-login-art { min-height: 260px; }
  .pn-crest { width: 70px; }
  .sheet-top { flex-wrap: wrap; }
  .money { width: 100%; padding-top: 14px; border-top: 1px solid var(--line-2); }
  .money > div { padding: 0 20px 0 0; text-align: left; }
  .money > div + div { margin-left: 0; padding-left: 20px; }
  .pc-cond, .pc-town, .pc-tools, .pc-stats, .pc-jobs, .pc-crafts, .pc-vault, .pc-market { grid-column: 1 / -1; }
  .pc-vault, .pc-market, .pc-crafts, .pc-stats, .pc-skills, .pc-inv { order: 0; }
  .vt.has-list { grid-template-columns: minmax(0, 1fr); }
  .vt.has-list > .vt-list { grid-column: auto; grid-row: auto; }
  .skills { grid-template-columns: minmax(0, 1fr); }
  .inv thead { display: none; }
  .inv, .inv tbody, .inv tr, .inv td { display: block; width: 100%; }
  .inv tbody tr:not(.cat-row) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .inv td { width: auto; padding: 0; border: 0; }
  .inv td.c-name { grid-column: 1 / -1; }
  .inv td.c-amt { text-align: left; color: var(--on-2); }
  .inv td.c-q, .inv td.c-wt { text-align: right; }
  .hp { min-width: 0; }
  .hp .track2 { max-width: none; }
}
@media (max-width: 720px) {
  .pn-body .bar-panel { display: inline-flex; justify-content: center; width: 38px; padding: 0; }
  .pn-body .bar-panel span, .pn-live span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pn-live { width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 560px) {
  .pn { padding-top: calc(var(--bar-h) + 18px); }
  .pn-login { border-radius: 16px; }
  .pn-card { padding: 24px 20px; }
  .sheet-top { padding: 22px 18px; border-radius: 16px; }
  .sheet-seal { width: 64px; height: 75px; clip-path: path("M0 0H64V37C64 58 49 70 32 75C15 70 0 58 0 37Z"); }
  .sheet-seal > span { padding-bottom: 6px; font-size: 24px; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .cond-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .inv-sel { flex: 1 1 45%; }
  .mk-offer { grid-template-columns: minmax(0, 1fr); }
  .mk-price { font-size: 44px; }
  .mk-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mk-stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .mk-bar .btn, .mk-confirm .btn { flex: 1 1 100%; white-space: normal; }
  .mk-q { text-align: left; }
  .vt-sum { font-size: 30px; }
  .bar .brand-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .pn-gear .i, .mk-spin .i { animation: none !important; } }
