/* Live implementation of the October 2026 image concepts.
   Dynamic labels, values, sprites and interactions stay in HTML/Canvas. */
:root {
  --ink:#f0e5cb; --muted:#a6b1b4; --gold:#d9b775;
  --brass:#9e7b46; --brass-dim:#785e396b; --slate:#111e27;
  --theme-panel:radial-gradient(ellipse at 10% 0%,#29404a38,transparent 65%),repeating-linear-gradient(125deg,#ffffff02 0 1px,transparent 1px 5px),linear-gradient(135deg,#14232cfb,#0b141bfa);
  --theme-button:linear-gradient(135deg,#25343c,#111d25);
  --theme-active:radial-gradient(ellipse at top,#b3924833,transparent 80%),linear-gradient(#5b492d,#30291f);
  font-family:Tahoma,'Segoe UI',sans-serif;
}
.ui-icon{display:inline-block;width:23px;height:23px;flex:none;vertical-align:middle;color:var(--gold);filter:drop-shadow(0 1px 1px #0008);pointer-events:none}
button{transition:background .15s,border-color .15s,box-shadow .15s}
button:focus-visible{outline:2px solid #f5d48e;outline-offset:3px}
button:disabled{opacity:.4}
body :is(.hero-hud,.hud-core,.map-widget,.training-card,.hotbar,#status,#inventory,.original-window,dialog){
  color:var(--ink);background:var(--theme-panel);border:1px solid var(--brass);
  border-radius:3px;box-shadow:inset 0 0 0 3px #0a131a,inset 0 0 0 4px #c1a66a55,0 12px 36px #0007;
}
body :is(.hero-hud,.hud-core,.map-widget,.training-card,.hotbar){border-radius:7px}
body :is(.hero-hud,.hud-core,.map-widget,.training-card,.hotbar,#status,#inventory,.original-window,dialog,.slot){border-image:url('frame.svg') 24 / 19px / 0 stretch}
body :is(#status,#inventory,.original-window,dialog){scrollbar-width:thin;scrollbar-color:#977844 #121e26;scroll-padding-block:80px}
body :is(#status,#inventory,.original-window) .panel-heading{
  background:linear-gradient(110deg,#1c2e39,#0e1921);border:0;border-bottom:1px solid var(--brass);
  min-height:76px;padding:14px 18px;gap:14px;position:sticky;top:0;z-index:3;
}
body :is(#status,#inventory,.original-window) .panel-heading h2{
  display:block;font:700 23px Tahoma,sans-serif;color:var(--ink);letter-spacing:1px;text-shadow:0 2px 3px #0008;margin:0;
}
body :is(#status,#inventory) .panel-heading .eyebrow{display:block;color:var(--gold);font-size:8px;letter-spacing:2.5px;margin-bottom:5px}
#inventory .panel-heading h2:after{display:none}
body :is(.panel-heading button,#close-aux,#close-help){
  width:42px;height:42px;min-width:42px;padding:0;background:var(--theme-button);color:#e0bd7e;
  border:1px solid #b7995d;box-shadow:inset 0 0 0 3px #0a141c,inset 0 0 0 4px #b7995d55;font:28px Georgia;
}
body :is(.primary-button,.status-actions button,.inventory-actions button,.create-actions button,.party-share button,.system-options button){
  border:1px solid var(--brass);border-radius:2px!important;color:var(--ink);background:var(--theme-button);
  box-shadow:inset 0 0 0 2px #0a141c,inset 0 0 0 3px #c9a56433;min-height:44px;font-size:12px;
}
body :is(.primary-button,#bag-done,#create-confirm,#nation-confirm){background:var(--theme-active);color:#fbe4ad;border-color:#ceac65}
body button:hover:not(:disabled){border-color:#e8c786;box-shadow:inset 0 0 12px #c6a56020,0 0 8px #c6a56018}
body .primary-button.danger{background:linear-gradient(#6d3630,#38201e);border-color:#bd7762}
body .hero-hud{padding:13px;width:306px;border-color:#ac8a50}
.hero-portrait{border-radius:2px;background:radial-gradient(ellipse at bottom,#53615870,#0c171f);box-shadow:inset 0 0 0 3px #0a141c,inset 0 0 0 4px #b7995d33}
.hero-heading>b{font-family:Georgia,Tahoma,serif;font-size:18px;color:#f4e4bc}
body .training-card #hud-tactics{border:0;border-top:1px solid #a3865044;background:none;margin-top:9px;padding:7px 0 0}
body .training-card #hud-tactics>div{border:0;padding:3px 0;color:#b6c3b6;font:9px Tahoma;gap:7px}
body .training-card #hud-tactics small{color:#c6ae73;font:8px Tahoma}
.hero-hud .orb{border-radius:2px;box-shadow:inset 0 1px 3px #0008}
.hero-hud .orb.health>div{background:linear-gradient(#d15560,#922c3c)}
.hero-hud .orb.mana>div{background:linear-gradient(#4698b9,#235a82)}
.hero-hud .orb.divine>div{background:linear-gradient(#80b474,#346342)}
.hero-experience .bar{height:5px;border:1px solid #9b835b66;background:#080e13}
.hero-experience .bar>div{background:linear-gradient(#ffe0a4,#b1843a)}
.hud-windows .ui-icon{width:27px;height:27px}
body .hud-windows button,body .quick-items button,body .hud-utilities button,body .top-actions button{
  background:var(--theme-button);border:1px solid #a1844b88;border-radius:2px!important;box-shadow:inset 0 0 0 2px #0a141c;
}
body .hud-windows button[aria-expanded=true]{background:var(--theme-active);border-color:#f0cb7b}
body .quick-items button{border-color:#6d7a7955;color:#788184;background:#09141c}
body .hud-utilities button{color:#e6cf9e}
body .action-button{border:1px solid #bc985b;border-radius:3px!important;background:var(--theme-button);box-shadow:inset 0 0 0 3px #09141c,inset 0 0 0 4px #ac8a5055}
body .action-button.skill{background:linear-gradient(#244353,#101e2a);border-color:#b39c65}
body #map-banner{border:1px solid #aa8a50;background:#101b24ee;color:#ead7ac}
body #toast{background:var(--theme-panel);border:1px solid #c7a35e;color:#f6e4bf;box-shadow:0 8px 24px #0005}
body .target-controls button{background:var(--theme-button);border:1px solid #9d804a88;color:#e8d4ab;border-radius:2px!important}
/* Character record: gold fields, thin separators, and persistent navigation. */
body #status{top:18px;left:18px;width:550px;max-height:calc(100% - 120px)}
#status-body{padding:16px;flex:1 0 auto}
.status-identity{gap:10px;margin-bottom:10px}
.status-identity>*{background:linear-gradient(110deg,#172832,#0c161e);border:1px solid var(--brass-dim);padding:10px;color:#e9d7ad;font:16px Georgia,Tahoma,serif}
.exp-record{border:1px solid var(--brass-dim);background:#0c171f;padding:9px 11px;margin-bottom:16px;font-size:11px;color:#d8c79d}
.exp-record>span:first-child{font:700 15px Georgia;color:#f1cc83}
.status-fields{gap:9px 12px}
.stone-field{background:linear-gradient(110deg,#19293288,#0b151c88);border:1px solid #8e74434d;min-height:43px;color:var(--ink)}
.stone-field dt{display:flex;align-items:center;gap:7px;padding:6px 8px;white-space:normal;font-size:11px}
.stone-field dt .ui-icon{width:19px;height:19px}
.stone-field dd{border-left:1px solid #9e814550;min-width:30%;padding:7px 8px;font-size:12px;color:#f0e0b7;white-space:nowrap}
body #status-tabs{background:#0f1b24;border-top:1px solid var(--brass);padding:7px;gap:5px;flex-shrink:0}
#status-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:61px;border:1px solid #92744388;background:var(--theme-button);color:#cdbb94;font-size:10px;text-shadow:none}
#status-tabs button .ui-icon{width:22px;height:22px}
#status-tabs button[aria-pressed=true]{background:var(--theme-active);color:#f5d899;border-color:#e0b968;box-shadow:inset 0 0 0 2px #362e1d,0 0 9px #d1ad5920}
.ability-layout{gap:15px;grid-template-columns:1.05fr 1fr}
.stat-rows li{grid-template-columns:1fr 64px 36px;gap:4px;padding:3px 0;min-height:41px}
.sid,.sval{border:1px solid #94774470;background:#0e1b24;height:35px;padding:9px 6px;font-size:11px;color:#e8d6af}
.sid{border-right:0;margin-right:-5px;font-weight:700}.sval{padding:8px 2px;color:#f0e4c9}.sval small{color:#8e9d9e;font-size:9px}
.stat-rows button{height:35px;border:1px solid #d18c5f;background:linear-gradient(#9e5035,#542a24);box-shadow:inset 0 0 0 2px #4b2922;color:#f3d398;font-size:22px}
.resists{margin:3px 0 14px;gap:6px}.resists .stone-field{min-height:35px}.resists .stone-field dt{font-size:10px;padding-left:7px}.resists .stone-field dd{padding:5px 7px}
.points{margin:16px 0 0;border:1px solid #b18d4d;background:#1d2424;padding:10px;font-size:12px;color:#ebd59f}
.points strong{font:30px Georgia;color:#f5d79a}
.status-note{font:10px/1.8 Tahoma;color:#9cabad;margin-top:12px}
.status-actions{margin-top:14px}.status-actions button{font-size:11px}
.tactics-table{background:#0e1b24;font:12px Tahoma;color:#e7dcc2}
.tactics-table th,.tactics-table td{border:1px solid #92754266;padding:9px 8px}
.tactics-table thead{background:linear-gradient(#223640,#14232c)}.tactics-table thead th{font-size:10px;color:#e8c98d}
.tactics-table tbody tr:nth-child(even){background:#25363c33}.tactics-table tbody tr:hover{background:#b79a5220}
/* All 12 equipment slots surround the real animated character, without a baked-in portrait. */
body #inventory{inset:18px 18px auto auto;width:650px;max-width:calc(100% - 36px);max-height:calc(100% - 36px);overflow:auto}
.inventory-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:12px;padding:14px 14px 10px}
body #inventory .equipment-stage{margin:0;min-height:352px;background:radial-gradient(ellipse,#6e795b2b,transparent 65%),#0d1922;border:1px solid var(--brass-dim);padding:10px}
#equipment-slots{inset:10px;display:grid;grid-template-columns:48px 1fr 48px;grid-template-rows:repeat(6,44px);gap:12px 0}
.equipment-slot{position:relative;inset:auto!important;width:48px}
.equipment-slot:nth-child(-n+6){grid-column:1}.equipment-slot:nth-child(n+7){grid-column:3}
.equipment-slot:nth-child(1),.equipment-slot:nth-child(7){grid-row:1}.equipment-slot:nth-child(2),.equipment-slot:nth-child(8){grid-row:2}.equipment-slot:nth-child(3),.equipment-slot:nth-child(9){grid-row:3}.equipment-slot:nth-child(4),.equipment-slot:nth-child(10){grid-row:4}.equipment-slot:nth-child(5),.equipment-slot:nth-child(11){grid-row:5}.equipment-slot:nth-child(6),.equipment-slot:nth-child(12){grid-row:6}
.equipment-slot .item-cell{width:48px;height:44px}
body #inventory .character-summary{height:330px;margin:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;pointer-events:none}
body #inventory .paperdoll{width:140px;height:182px;opacity:1;background:none}
body #inventory .paperdoll canvas{width:140px;height:170px}
body #inventory .paperdoll>span{display:block;position:static;text-align:center;font-size:9px;color:#c9b782}
.stat-list{display:grid;grid-template-columns:1fr;gap:5px;width:120px;font-size:9px;color:#a0adae}.stat-list>div{display:flex;justify-content:space-between}.stat-list strong{color:#e4d3a9;font:12px Georgia}
.item-cell{height:48px;background:#0a141d;border:1px solid #877044;box-shadow:inset 0 0 0 2px #182831}
.item-cell.equipped{background:radial-gradient(#60765b44,#101c24)}
.item-cell.selected{border:1px solid #efd091;outline:1px solid #a48a4f;outline-offset:2px;box-shadow:inset 0 0 12px #e6c87933}
.item-cell .slot-name{font-size:8px;color:#b8b9a8;bottom:-12px}
#inventory .tabs{padding:0 14px;gap:6px;border:0}
#inventory .tabs button{padding:10px 16px;border:1px solid #9c7e4c77;color:#c9b998;background:var(--theme-button);min-height:44px;font-size:11px}
#inventory .tabs button[aria-selected=true]{background:var(--theme-active);color:#f5d99f;border-color:#bb9757}
.inventory-content{padding:10px 14px 0}.section-caption{color:#c2ba9f;font-size:10px}.section-caption small{color:#c3d0cb}
#item-grid{background:#0a141d;border:1px solid var(--brass-dim);padding:7px;gap:5px;grid-template-columns:repeat(8,minmax(0,1fr))}
#item-grid .gear{margin-bottom:13px}#item-grid:has(.gear){grid-template-columns:repeat(6,minmax(0,1fr))}
.inventory-hint{font-size:9px;color:#97a8ac;margin:8px 0}
body #item-detail{margin:0;padding:14px;background:#101c24;border:1px solid var(--brass-dim);display:flex;flex-direction:column;gap:10px;min-width:0}
.detail-title{gap:10px}.detail-title img{width:45px;height:45px;border:1px solid #ac8a50;padding:4px;background:#08121a}.detail-title h3{font-size:14px;color:#f0dab0;line-height:1.6}.detail-title small{font-size:9px;color:#a5b0ae}
.detail-stats{display:flex;flex-direction:column;gap:7px;margin:4px 0}.detail-stats span{border:0;border-bottom:1px solid #9a805644;border-radius:0;background:none;color:#ddcca5;padding:7px 0;font-size:12px}
.detail-description{display:block;font-size:11px;line-height:1.8;color:#b1b9b5;margin:0}
#item-detail .primary-button{margin-top:auto;width:100%}
body #inventory .inventory-actions{background:#101b23;border-top:1px solid var(--brass);padding:10px 14px;margin:10px 0 0;gap:10px}
.inventory-actions button{flex:1}
/* Auxiliary windows and unavailable-feature states. */
body .original-window{top:18px;right:18px;width:420px;max-height:calc(100% - 120px)}
#aux-body{padding:16px}.party-share{gap:6px}.party-share button{min-width:0;font:11px Tahoma}
.party-leader{gap:14px;margin:18px 0}.party-leader dl{gap:8px;margin:0}.party-seal{width:67px;height:76px;border:1px solid #8c7546;color:#d0b87e;flex:none}
.party-members{background:#0d1922;border:1px solid var(--brass-dim);gap:9px;padding:10px;margin-bottom:14px}
.party-members button{background:linear-gradient(#0e1a2255,#0e1a2299),url('../ui/party-slot.png') center no-repeat;border:1px solid #9f8555;color:#dfc994;height:86px}
.system-options{padding:5px;gap:12px}.system-options button{display:flex;align-items:center;gap:18px;text-align:left;padding:14px 18px;min-height:68px;font:16px Tahoma}.system-options button .ui-icon{width:30px;height:30px}.system-options button .ui-icon:last-child{margin-left:auto;width:18px}
.empty-state{min-height:250px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;padding:28px 12px}
.empty-emblem{width:120px;height:120px;display:grid;place-items:center;border:1px solid #ac8b4b55;outline:1px solid #ac8b4b22;outline-offset:10px;border-radius:50%;background:radial-gradient(#a58a4022,transparent)}
.empty-emblem .ui-icon{width:68px;height:68px;stroke-width:.9;filter:drop-shadow(0 3px 2px #000)}
.empty-state strong{font:20px Tahoma;color:#efd9a6;margin-top:10px}.empty-state>span{font:13px Georgia;letter-spacing:2px;color:#ac996e}
/* Character selection uses a text-free generated environment plate. */
body #select{border:0;padding:30px 24px;background:linear-gradient(#07121a33,#07121a66),url('character-hall.png') center/cover fixed;image-rendering:auto}
.select-inner{width:min(960px,100%);border:0;background:none;padding:12px 0;box-shadow:none}
.select-brand{font:40px Georgia,serif;text-align:center;letter-spacing:4px;color:#ead3a1;text-shadow:0 3px 4px #000;margin-bottom:15px}
.select-brand>span{font-size:43px;color:#b9985d;vertical-align:middle}
.select-inner>.eyebrow{font-size:8px;color:#bda575;letter-spacing:4px}
body #select h2{font:700 30px Tahoma;margin:10px 0;color:#efdfb9;letter-spacing:1px;text-shadow:0 2px 3px #000}
.select-note{color:#b7c0be;font-size:10px;line-height:1.9;max-width:850px;margin:10px auto 22px;text-shadow:0 2px 2px #000}
#slot-list{gap:20px;margin-bottom:20px}.slot{border:1px solid #a38650;background:var(--theme-panel);border-radius:2px;box-shadow:inset 0 0 0 4px #0b151d,inset 0 0 0 5px #b9975a55,0 6px 18px #0004;padding:22px;min-height:190px}
.slot.last{border-color:#d7b26c;box-shadow:inset 0 0 0 4px #111c23,inset 0 0 0 5px #b9975a99,0 0 20px #b9975a20}
.slot.empty{border-style:solid;padding:12px}.slot.empty button{border:0;box-shadow:none;min-height:164px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#ead9b4;font:15px Tahoma}
.slot.empty button:hover{background:#b99b5910}
.create-sigil{font:42px Georgia;color:#d8b775;width:64px;height:64px;display:grid;place-items:center;border:1px solid #a1824f88;outline:1px solid #a1824f33;outline-offset:4px;border-radius:50%;margin:3px 0 8px}
.slot.empty button b{font-weight:400}.slot.empty button small{font-size:10px;color:#c2a66c}
.slot h3{display:flex;align-items:center;gap:10px;color:#ecd9b1;font:22px Georgia,Tahoma}.slot h3 .ui-icon{width:28px;height:28px}
.slot .slot-no{font-size:20px;color:#a78c57;top:16px;right:20px}.slot .slot-meta{font-size:11px;color:#c2cecc}.slot .slot-where{color:#95a8b0}.slot .slot-actions{margin-top:12px}.slot .nation-badge{margin-left:0;font-size:10px}.slot .slot-delete{background:#2e1e1b;border-color:#835442;color:#d8a294}
.select-inner>.help-note{font-size:10px;color:#c5c5af;text-shadow:0 1px 3px #000;text-align:center}
/* Creation, nation, help and destructive confirmation share the same frame. */
body dialog{padding:26px;max-height:calc(100dvh - 32px);overflow:auto;color:var(--ink)}
/* Portal menu follows the dark dialog theme (style.css keeps the older parchment base). */
body .portal-menu{max-width:620px;width:calc(100% - 30px)}
body .portal-menu h2{color:var(--gold);text-shadow:0 2px 3px #000}
body .portal-menu .portal-table{background:#0e1b24;border:1px solid var(--brass)}
body .portal-menu table{min-width:0}
body .portal-menu th{background:linear-gradient(#223640,#14232c);color:#e8c98d;font-size:12px}
body .portal-menu th,body .portal-menu td{border-bottom:1px solid #92754266;padding:8px 10px}
body .portal-menu tbody tr{color:#e7dcc2}body .portal-menu tbody tr:nth-child(even){background:#25363c33}
body .portal-menu tbody tr:not(.unavailable):hover{background:#b79a5226}
body .portal-menu tbody tr.selected,body .portal-menu tbody tr.selected:hover{background:#8a6a35;color:#fff3c8}
body .portal-menu tbody tr.unavailable{color:#7e8a8c;background:#0a131a}
body .portal-menu td button{color:inherit}
body .portal-menu nav span{color:var(--ink)}
dialog::backdrop{background:#030a10c9;backdrop-filter:blur(4px)}
body #create{width:min(860px,calc(100% - 32px));max-width:860px;min-height:0;border:1px solid var(--brass);padding:25px 28px}
body #create>.eyebrow{font:11px Georgia;color:#c7a569;letter-spacing:4px;text-shadow:none}
body #create h2{font:700 26px Tahoma;color:#efddb8;margin:9px 0 20px}
body #create-name{border:1px solid #9b7e4b;background:#09141c;color:#f1dfb7;padding:12px;font-size:15px;min-height:44px;box-shadow:inset 0 2px 5px #0006}
.name-field{color:#c6bda6;font-size:11px}.name-field small{font-size:10px;color:#8fa1a6}
body .create-sub{color:#bfc9c7!important;font-size:11px!important;margin:18px 0 10px!important}
#class-grid{gap:8px;grid-template-columns:repeat(5,minmax(0,1fr))}
body #class-grid button{background:var(--theme-button);border:1px solid #957b4c88;padding:12px 4px;gap:6px;min-height:96px;color:#ead7b0}
#class-grid button .ui-icon{width:30px;height:30px}#class-grid b{font-size:11px}#class-grid small{font-size:9px;color:#aa9b7e}
body #class-grid [aria-checked=true]{background:var(--theme-active);border-color:#e5be72;box-shadow:inset 0 0 0 2px #ad8b4944,0 0 12px #c5a15920}
.record-heading{font:15px Georgia;color:#c3a369;letter-spacing:5px;margin:20px 0 10px;text-shadow:none;display:flex;align-items:center;gap:18px;justify-content:center}
.record-heading:before,.record-heading:after{content:'';height:1px;background:#ad8b4944;flex:1}
body #class-preview{background:#0c1821;border:1px solid var(--brass-dim);padding:15px;color:var(--ink);margin:0 0 16px;box-shadow:none}
.preview-head{color:#e0c58f;border-bottom:1px solid #9b804444;padding-bottom:10px;margin-bottom:12px;font-size:13px}
#class-preview ul{gap:7px 14px}
body #class-preview li{display:grid;grid-template-columns:52px 1fr auto auto;gap:8px;background:#15232c;border:1px solid #8e76434d;padding:6px 9px;color:#e9debf;font-size:12px}
body #class-preview li span{color:#d3bd8e;font-size:10px}#class-preview li small{font-size:9px;color:#8f9b9d}#class-preview li em{color:#b2cb8b}
body #class-preview p{color:#c7bd9f;font-size:11px;margin-top:12px}body #class-preview .help-note{color:#93a3a5!important;font-size:9px}
.create-actions{gap:10px;margin-top:14px}.create-actions button{padding:10px}
body #nation{max-width:650px}#nation h2,#delete-confirm h2,#help h2{color:#f0d8a4;font-size:24px}
#nation-grid button{background:var(--theme-button);border:1px solid #9b7f4f77;border-top:3px solid var(--nation);min-height:124px}#nation-grid small{color:#a6b7bd}
#nation-grid button:has(.nation-crest){position:relative;padding-inline-end:46px}
#nation-grid .nation-crest{position:absolute;inset-inline-end:8px;top:50%;width:32px;height:auto;transform:translateY(-50%);pointer-events:none}
@media(max-width:600px){
 #nation-grid button:has(.nation-crest){padding-inline-end:62px}
 #nation-grid .nation-crest{inset-inline-end:14px;width:40px}
}
#nation-grid [aria-checked=true]{background:var(--theme-active)}
#help p,#help dd{color:#b1c0c1}#help dt{color:#e0bd7e}#help .help-note{color:#82979c}#help .eyebrow,#delete-confirm .eyebrow,#nation .eyebrow{color:#c2a265}
/* Full-width scrollable windows on small screens; close and Done remain reachable. */
@media(max-width:700px){
 body .hero-hud{width:230px;max-width:calc(100% - 102px);padding:9px}.hero-heading>b{font-size:14px}
 body #status,body #inventory,body .original-window{position:fixed;inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:1px solid var(--brass);z-index:25}
 body :is(#status,#inventory,.original-window) .panel-heading{min-height:74px;padding:12px 14px}
 body :is(#status,#inventory,.original-window) .panel-heading h2{font-size:21px}
 body :is(.panel-heading button,#close-aux){width:44px;height:44px}
 #status-body{padding:14px 10px}.status-identity{gap:8px}.status-identity>*{font-size:14px;padding:9px}.exp-record{padding:8px;font-size:10px}
 .status-fields{gap:10px 8px}.stone-field{min-height:46px}.stone-field dt{font-size:10px;padding:5px;gap:4px}.stone-field dt .ui-icon{width:15px;height:15px}.stone-field dd{font-size:10px;padding:5px;min-width:27%}
 #status-tabs{padding:6px 5px!important;gap:3px!important}#status-tabs button{min-height:62px;font-size:9px;gap:5px}#status-tabs button .ui-icon{width:22px;height:22px}
 .ability-layout{gap:9px;grid-template-columns:1.05fr 1fr}.stat-rows li{grid-template-columns:1fr 50px 40px;gap:3px;min-height:48px}.sid,.sval{height:42px;font-size:10px;padding:12px 4px}.sval{padding:7px 1px}.sval small{display:block;font-size:8px}.stat-rows button{height:44px;font-size:22px}
 .resists{gap:9px}.resists .stone-field{min-height:39px}.resists .stone-field dt{font-size:9px;padding-left:5px}.resists .stone-field dd{font-size:10px;padding:5px}.points{padding:9px 6px;font-size:10px}.points strong{font-size:27px}.status-note{font-size:9px;line-height:1.9}
 .tactics-table{font-size:10px}.tactics-table th,.tactics-table td{padding:11px 5px}.tactics-table thead th{font-size:9px}
 .inventory-layout{grid-template-columns:1fr;gap:10px;padding:12px 10px}
 body #inventory .equipment-stage{min-height:354px}.inventory-layout #item-detail{padding:12px;gap:8px}
 .detail-title img{width:40px;height:40px}.detail-title h3{font-size:13px}.detail-stats{flex-direction:row;flex-wrap:wrap;gap:6px;margin:0}.detail-stats span{font-size:11px;padding:4px 7px;border:1px solid #9e814555}
 .detail-description{font-size:10px}#item-detail .primary-button{margin-top:4px}
 #inventory .tabs{padding:0 10px}.inventory-content{padding:10px 10px 0}#item-grid{gap:3px;padding:5px}
 .item-cell{height:44px}.item-cell img,.item-cell.gear img{width:28px;height:28px}.equipment-slot .item-cell{width:48px;height:44px}
 body #inventory .inventory-actions{padding:10px;margin-top:10px}.inventory-actions button{min-height:44px}
 #aux-body{padding:16px 12px}.party-members{gap:9px}.party-members button{height:100px}.party-share button{min-height:44px;font-size:11px}.party-leader .stone-field dt,.party-leader .stone-field dd{font-size:11px}
 .empty-state{min-height:350px;gap:24px}.empty-state strong{font-size:21px}.system-options{padding:8px 0}.system-options button{min-height:76px;font-size:17px}
 body #select{padding:22px 14px;background-position:center}.select-inner{padding:0}.select-brand{font-size:28px;letter-spacing:2px;margin-bottom:14px}.select-brand>span{font-size:30px}
 body #select h2{font-size:25px}.select-note{font-size:10px;margin:12px auto 20px}#slot-list{grid-template-columns:1fr;gap:13px}.slot{min-height:162px;padding:18px}.slot.empty button{min-height:144px}.create-sigil{width:48px;height:48px;font-size:34px;margin-bottom:6px}.slot h3{font-size:20px}
 body dialog{width:calc(100% - 20px);padding:20px 16px;max-height:calc(100dvh - 20px)}
 body #create{width:100%;max-width:100%;min-height:100dvh;max-height:100dvh;margin:0;padding:22px 14px;border-width:1px}
 body #create>.eyebrow{font-size:9px;letter-spacing:3px}body #create h2{font-size:24px;margin:10px 0 22px}
 #class-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}body #class-grid button{min-height:92px}#class-grid b{font-size:11px}
 body #class-preview{padding:12px 9px}#class-preview ul{gap:7px}body #class-preview li{grid-template-columns:37px 1fr auto;gap:4px;padding:7px 5px;font-size:11px}#class-preview li small{display:none}body #class-preview li span{font-size:9px}
 .record-heading{margin-top:24px}.create-actions button{min-height:48px}#nation-grid{grid-template-columns:1fr}#nation-grid button{min-height:92px}
}
@media(min-width:701px){
 body #inventory .panel-heading{min-height:64px;padding:9px 16px}
 .inventory-layout{padding-top:12px;padding-bottom:8px}
 body #inventory .equipment-stage{min-height:286px}
 #equipment-slots{grid-template-rows:repeat(6,36px);gap:9px 0;inset:10px}
 .equipment-slot .item-cell{height:36px;width:44px}.equipment-slot .item-cell img{width:28px;height:28px}.equipment-slot .item-cell .slot-name{font-size:7px;bottom:-10px}
 body #inventory .character-summary{height:264px;gap:6px}
 body #inventory .paperdoll{height:174px}
 .stat-list{gap:4px}
 #inventory .tabs button{min-height:38px;padding:8px 16px}
 #inventory #item-grid .item-cell{height:42px}
 body #create{padding:20px 26px}
 body #create h2{margin:7px 0 15px;font-size:24px}
 body #class-grid button{min-height:83px;padding:8px 4px;gap:4px}
 body #create .create-sub{margin:12px 0 8px!important}
 #create .record-heading{margin:14px 0 8px}
 body #class-preview{padding:12px;margin-bottom:12px}
 #class-preview .preview-head{padding-bottom:7px;margin-bottom:9px}
 #class-preview ul{gap:5px 14px}
 body #class-preview li{padding:5px 9px}
 body #class-preview p{margin-top:9px;font-size:10px}
}
@media(max-height:500px) and (min-width:701px){body #status,body #inventory,body .original-window{top:8px;bottom:8px;max-height:calc(100% - 16px)}body #create{max-height:calc(100dvh - 16px)}body #select{padding:20px}.select-brand{font-size:28px}.slot{min-height:150px}.slot.empty button{min-height:124px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
/* Keep the ornament after border shorthands used by responsive panel rules. */
body :is(.hero-hud,.hud-core,.map-widget,.training-card,.hotbar,#status,#inventory,.original-window,dialog,.slot){border-image:url('frame.svg') 24 / 19px / 0 stretch}
@media(max-width:700px){body .training-card{left:auto;right:12px;top:184px;bottom:auto;width:148px;padding:10px}.training-card #combat-log{font-size:9px}.training-card .target-controls{gap:4px}.training-card .target-controls button{padding:5px;font-size:8px;min-height:32px}.training-card #hud-tactics>div{font-size:8px!important}}
@media(max-width:700px){body #toast{top:auto;bottom:222px;left:50%;transform:translate(-50%,8px);width:max-content;max-width:calc(100% - 28px);pointer-events:none}body #toast.visible{transform:translate(-50%,0)}}
@media(max-width:350px){body .map-widget{top:132px}body .training-card{top:228px}}
@media(min-width:701px) and (max-width:1000px) and (min-height:501px){body #toast{top:216px}}
