/* Original jade-and-bronze HUD: lighter chrome, clear controls, existing layout. */
.game-window{border:1px solid #b79c68;border-radius:10px;background:linear-gradient(135deg,#f7f2e3,#eae8d8);box-shadow:0 14px 38px #0b1d24aa,inset 0 0 0 3px #fff9e355;scrollbar-color:#9a997c transparent}
.game-window-heading{background:linear-gradient(125deg,#274b43,#16392f 70%,#29443b);border-bottom:1px solid #ccb579;box-shadow:0 3px 7px #223c3024;color:#f6e6b8}
.game-window-heading h2{font-weight:600;letter-spacing:2px;font-size:18px;text-shadow:0 1px 2px #051d18}
.game-window-heading button{display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #cfb57c80;border-radius:50%;background:radial-gradient(circle at 30% 20%,#ecdbac22,transparent 65%);color:#f5e4b4}
.game-window-heading button:hover{background:#e5cb8733;color:#fff9df}
.game-window-heading button:focus-visible,.canvas-wrap>.martial-skills button:focus-visible{outline:2px solid #fff0ad;outline-offset:3px}
.game-window .section-label{color:#355648;letter-spacing:1px}
.game-window .section-label>span{color:#657363}
.game-window .character-card{border-color:#c4b58b;border-radius:7px}
.player-vitals{color:#fff0d1;text-shadow:0 1px 2px #062119,0 0 3px #092419;background:transparent}
.player-vitals .vital span{font-weight:600;letter-spacing:.2px}
.player-vitals .vital i{height:4px;border:1px solid #c9b37c99;border-radius:3px;background:#10251a77;box-shadow:0 1px 2px #10251a99;overflow:hidden}
.player-vitals .vital.hp em{background:linear-gradient(180deg,#ffb4a4,#d95044 48%,#8a2729);box-shadow:inset 0 1px #fff0d377}
.player-vitals .vital.mp em{background:linear-gradient(180deg,#a9dbf7,#4f9cc5 48%,#205774);box-shadow:inset 0 1px #edffff77}
.canvas-wrap>.martial-skills{gap:10px}
.canvas-wrap>.martial-skills .martial-skill{width:40px;height:40px;border-width:1px;border-color:#e2c990 #8c6a43 #64482e #c4a169;box-shadow:0 1px 3px #071d1855;overflow:hidden}
.canvas-wrap>.martial-skills #afkBtn{width:44px;height:44px;border-width:1px}
.canvas-wrap>.martial-skills .skill-icon{transform:scale(1.02)}
.canvas-wrap>.martial-skills .martial-skill::after{box-shadow:inset 0 1px 0 #fff3d4cc,inset 1px 0 2px #f8dba377,inset 0 -3px 4px #061510aa;background:linear-gradient(140deg,#fff4cc22,transparent 42%,transparent 76%,#00000022)}
.canvas-wrap>.martial-skills .martial-skill[aria-pressed="true"]{outline-offset:1px;box-shadow:0 2px 0 #263629,0 4px 5px #061d17aa,0 0 8px rgba(var(--armed-glow),.38)}
.canvas-wrap>.martial-skills .clean-screen-btn{font-size:18px;background:radial-gradient(circle at 32% 24%,#e8d7a7,#b49b63 38%,#5a593c 80%)}
.game-toolbar{border-color:#b59b65;border-radius:11px;background:linear-gradient(180deg,#49614b,#193c32 42%,#17332c 68%,#304932);box-shadow:inset 0 1px 0 #eddbac88,inset 0 0 0 3px #112f25,0 4px 12px #071f1c88}
.game-toolbar button{border-color:#b69c66;border-radius:7px;background:linear-gradient(180deg,#557356,#304d3d 48%,#1a382f 51%,#3b5740);color:#f5e5bc;box-shadow:inset 0 1px 0 #f8e4af55,inset 0 -2px 1px #09231aaa,0 2px 3px #071d1988}
.game-toolbar button::before{border-radius:50%;border-color:#d9bc7c;background:radial-gradient(circle at 32% 26%,#8a7847,#364c34 70%);box-shadow:inset 0 1px 1px #fff1c399,inset 0 -2px 2px #09261999;color:#fff0c7}
.game-toolbar button::after{border-radius:5px;inset:3px;border-color:#ead29422}
.game-toolbar button:hover,.game-toolbar button[aria-expanded="true"]{background:linear-gradient(#73845c,#3c5c43 48%,#264333 51%,#496444);border-color:#f3d995;color:#fff4cd}
.beginner-tracker button{border-radius:7px;background:linear-gradient(125deg,#234237ee,#162f26e6);border-color:#bca16c;color:#f4e6c0;box-shadow:inset 0 1px #f2dfb333,0 3px 7px #0c261b44}
@media(pointer:coarse){.canvas-wrap>.martial-skills{gap:9px}.canvas-wrap>.martial-skills .martial-skill{width:40px;height:40px}.canvas-wrap>.martial-skills #afkBtn{width:44px;height:44px}.game-window-heading button{width:40px;height:40px}}
@media(max-height:430px){.canvas-wrap>.martial-skills{gap:6px;bottom:78px}.canvas-wrap>.martial-skills .martial-skill,.canvas-wrap>.martial-skills #afkBtn{width:33px;height:33px}.game-window-heading h2{font-size:16px}.game-window-heading button{width:34px;height:34px}}
@media(prefers-reduced-motion:reduce){.canvas-wrap>.martial-skills .martial-skill{transition:none}.canvas-wrap>.martial-skills .martial-skill::before{animation:none!important}}

/* Leave room for the minimap while retaining the requested vertical action column. */
@media(max-height:350px){.canvas-wrap>.martial-skills{gap:5px;bottom:64px}.canvas-wrap>.martial-skills .martial-skill,.canvas-wrap>.martial-skills #afkBtn{width:27px;height:27px}}
@media(max-height:430px){.canvas-wrap>.martial-skills{padding:0;overflow:visible}}

/* Fine medallion rims in the classic website fallback. */
.canvas-wrap>.martial-skills .martial-skill .utility-skill-depth{border-width:.65px;box-shadow:inset 0 1px 1px #ffebbb55;background:linear-gradient(145deg,#fff4cc18,transparent 44%)}

/* Compact compose: letter and bag remain visible together; only the bag scrolls. */
#mailWindow[data-mail-compose="true"]{overflow:hidden}
.game-window:has(#mailWindow[data-mail-compose="true"]):not([hidden]),.game-window:has(#merchantWindow[data-material-sale="true"]):not([hidden]){width:min(940px,calc(100vw - 40px));max-width:calc(100vw - 40px);overflow:hidden}
.mail-compose-letter,.mail-compose-bag,.material-sale-selected,.material-sale-bag{padding:9px;border:1px solid #a59b72;background:#fff4cd44;border-radius:4px;box-sizing:border-box}
#mailWindow>section:first-child{display:flex;gap:6px;margin-bottom:8px}
#mailWindow>section:first-child>button{flex:1;padding:6px;min-height:32px}
#mailWindow button[aria-pressed="true"]{background:#365b43;color:#fff0c7}
.material-sale-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:14px;height:min(62vh,460px);min-height:190px}
.material-sale-selected,.material-sale-bag{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0}
.material-sale-slot{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.material-sale-slot input{width:100%;box-sizing:border-box;text-align:center}.material-sale-slot small{font-size:12px}
.material-sale-selected>[data-sale-confirm]{margin-top:auto}
.material-sale-grid{overflow-y:auto;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:5px;align-content:start}
.material-sale-item{display:flex;flex-direction:column;align-items:center;min-width:0;padding:5px!important;font-size:11px!important}.material-sale-item>span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.material-sale-item>.item-icon{width:34px;height:34px}
.material-sale-item[aria-pressed="true"]{outline:2px solid #678258;background:#dce2bd}
@media(max-height:420px){.material-sale-layout{height:calc(100vh - 140px);min-height:160px}.material-sale-slot{gap:3px}.material-sale-slot>.item-icon{width:30px;height:30px}}
.mail-compose-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:14px;height:min(65vh,520px);min-height:260px}
.mail-compose-letter,.mail-compose-bag{min-width:0;min-height:0;display:flex;flex-direction:column;gap:7px}
.mail-compose-letter>label{display:grid;grid-template-columns:1fr;gap:3px;font-size:12px}
.mail-compose-letter input{min-width:0;width:100%;box-sizing:border-box;padding:6px}
.mail-attachment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(56px,1fr));gap:4px;flex:1;min-height:0;overflow-y:auto}
.mail-attachment-slot{position:relative;min-width:0;min-height:0;border:1px solid #a7b697;border-radius:5px;background:#eef0e0;display:flex;flex-direction:column;align-items:center;overflow:hidden;font-size:11px}
.mail-attachment-slot>.item-icon{max-width:30px;max-height:30px}.mail-attachment-slot>span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-attachment-slot>label{font-size:0;width:100%;margin-top:auto}.mail-attachment-slot input{padding:2px;font-size:12px;height:24px;text-align:center}
.mail-attachment-slot>button{position:absolute;right:0;top:0;padding:0;width:20px;height:20px;min-height:0;border:0;background:#eef0e0cc}
.mail-backpack-grid{overflow-y:auto;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:5px;align-content:start}
.mail-backpack-item{min-width:0;display:flex;flex-direction:column;align-items:center;padding:5px!important;font-size:11px!important;min-height:74px}.mail-backpack-item>span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-backpack-item .item-icon{width:34px;height:34px}
.merchant-row{padding:6px 8px!important;gap:8px!important;min-height:44px!important}.merchant-row small{font-size:11px;line-height:1.3}.merchant-purchase{display:flex;align-items:center;gap:6px}.merchant-purchase input{width:72px!important;padding:5px!important}.merchant-purchase button{padding:6px 10px!important;min-height:34px!important;font-size:12px!important}
@media(max-height:420px){.mail-compose-layout{height:calc(100vh - 135px);min-height:170px}.mail-attachment-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(44px,1fr))}.mail-attachment-slot>.item-icon{display:none}}
/* Game material windows: carved wood, bronze fasteners and inset controls. */
.game-window,.dialog,.modal-card,.material-help-panel{border:7px solid #58452f!important;border-radius:4px!important;outline:1px solid #bda36c;background:repeating-linear-gradient(2deg,#94795708 0 1px,transparent 1px 13px),linear-gradient(130deg,#e9dfbe,#f4ebcc 38%,#d9d5b3)!important;box-shadow:inset 0 0 0 1px #bda36c,inset 0 0 20px #5a48282b,0 6px 14px #10181088!important}
.game-window button:not(.item-icon),.dialog button,.modal-card button{border:1px solid #9c8959;border-radius:3px;background:linear-gradient(#d5d5b5,#ece3c4 48%,#b8c4a3);box-shadow:inset 0 1px 0 #fff1ce99,0 1px 2px #26332633;color:#364d3b}
.game-window input,.dialog input,.modal-card input{border:1px solid #9c926e;border-radius:3px;background:#f4ebce;box-shadow:inset 0 2px 3px #3a342124;color:#354d40}

/* Thin game panels and readable NPC navigation in the classic fallback. */
.game-window,.game-dialog,#modal>div{border-width:1px;box-shadow:0 2px 8px #142b242d}
.merchant-tabs button[aria-pressed="true"],.merchant-tabs button:disabled{background:#ece3c4;color:#364d3b;opacity:1;border-width:1px}
[data-market-item]{display:flex;flex-wrap:wrap;gap:4px;align-items:center;min-width:0;padding:5px;border:1px solid #bea15f;border-radius:3px}
[data-market-item] b{flex:1;min-width:60px}[data-market-item] input{width:70px;min-width:0}[data-market-item] img{width:36px;height:36px;object-fit:contain}
/* Initial equipment: named choices at left, one selected-item purchase at right. */
.leather-shop-panes{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:14px;align-items:start}
.leather-shop-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:360px;overflow-y:auto}
.leather-shop-list button{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;min-height:70px;padding:7px 3px;border:1px solid #b6b394;background:#f0eedc;color:#405b43;font:13px serif}
.leather-shop-list button[aria-pressed="true"]{background:#e6e4c8;border-color:#8e9f78}
.leather-shop-list .item-icon{width:34px;height:34px;margin:0}
.leather-shop-detail{min-width:0;padding:10px;border:1px solid #b6b394;background:#f6f0dc55;text-align:center}
.leather-shop-detail h3{margin:0 0 10px;font-size:17px}.leather-shop-detail>.item-icon{width:64px;height:64px;margin:0 auto}
.leather-shop-detail p{font-size:12px;line-height:1.6;white-space:pre-line}.leather-shop-detail button{max-width:100%;min-height:36px;padding:6px 12px;border:1px solid #a59b72;background:#e5dcc0;color:#465e44}
@media(max-width:500px){.leather-shop-list{grid-template-columns:repeat(2,minmax(0,1fr))}.leather-shop-panes{gap:9px}.leather-shop-detail{padding:7px}}
