
:root{color-scheme:dark;--bg:#0a1013;--line:#ffffff20;--gold:#d1b77c;--muted:#89989d}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#e9e9df;font:14px/1.6 system-ui,Segoe UI,sans-serif}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button{color:inherit}header{height:90px;padding:20px 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);position:relative;z-index:2;background:#0a1013}.brand{text-decoration:none;color:#e6d7b6;font:bold 34px/1 Georgia;letter-spacing:9px}.brand span{display:block;font:9px/1.6 system-ui;letter-spacing:3px;margin-top:8px}.build{font-size:10px;letter-spacing:2px;color:var(--muted)}i{display:inline-block;width:5px;height:5px;background:var(--gold);border-radius:50%;margin:0 10px}#selection{max-width:1400px;margin:auto;padding:45px 5% 20px;display:grid;grid-template-columns:30% 70%;align-items:center}.eyebrow{color:var(--gold);font-size:10px;letter-spacing:2px;font-weight:600}h1{font:normal clamp(35px,4vw,60px)/1.12 Georgia;margin:23px 0}h1 em{color:var(--gold);font-weight:normal}p{color:#a6b0b3}.intro{padding-right:22px}.intro p{font-size:15px}.nation-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.nation{position:relative;height:470px;background:#141c21;padding:0;overflow:hidden;text-align:left;border:1px solid #ffffff22;transition:border-color .15s,transform .15s}.nation:hover{transform:translateY(-3px);border-color:#a5b5bc}.nation.selected{border-color:var(--gold)}.nation-art{position:absolute;inset:0;background-image:url('assets/wolf-selection.png');background-size:225% auto;background-repeat:no-repeat;background-position:7% 18%;opacity:.85}.brown .nation-art{background-position:94% 18%}.nation:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#0b1117 2%,#0b1117dc 23%,transparent 60%)}.nation-copy{position:absolute;z-index:1;bottom:24px;left:24px;right:18px;display:flex;flex-direction:column}.nation-copy small{font-size:9px;letter-spacing:2px;color:#bcced5}.brown small{color:#cba688}.nation-copy strong{font:28px Georgia;letter-spacing:3px;margin:7px 0}.nation-copy>span{color:#aebac0;font-size:12px}.nation-copy b{color:var(--gold);font-size:10px;letter-spacing:2px;margin-top:19px}.nation:not(.selected) b{color:#8b979b}#enter{grid-column:2;display:flex;gap:20px;align-items:end;margin-top:23px}label{font-size:10px;letter-spacing:1px;color:#adb9bd}#enter label{flex:1}input:not([type=checkbox]){width:100%;display:block;background:#121b20;border:1px solid #344047;color:white;padding:12px 16px;margin-top:5px}button.primary{border:1px solid #d1b77c;background:#cfb680;color:#182026;font-weight:700;font-size:11px;letter-spacing:1px;padding:15px 22px}.primary span{margin-left:25px}#enter button{height:49px}.preview-note{grid-column:2;font-size:10px;color:#78878c;margin-top:20px}.world-top{position:absolute;top:115px;left:4%;right:4%;display:flex;justify-content:space-between;pointer-events:none}.identity{display:flex;flex-direction:column;background:#0d151cdd;border-left:2px solid var(--gold);padding:12px 20px;max-width:340px}.identity small{color:var(--gold);font-size:10px;letter-spacing:2px}.identity strong{font-size:22px}.identity span{color:var(--muted);font-size:11px}.location{text-align:right;text-shadow:0 2px 10px black}.location span{color:var(--gold);letter-spacing:3px;font-size:10px}.location h2{font:32px Georgia;margin:3px 0}.location small{color:#aeb8b9}#map{display:block;width:100%;height:calc(100dvh - 90px);touch-action:none}.world-help{position:absolute;bottom:110px;left:4%;padding:18px;background:#0b141bcc;max-width:330px;border:1px solid var(--line);pointer-events:none}.world-help p{font-size:12px;margin:8px 0}.world-help small{font-size:10px;color:#899899}.world-bar{position:absolute;bottom:0;left:0;right:0;padding:15px 4%;background:#0b1219ee;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.world-bar>span{font-size:11px;color:#9aa8ad}.world-bar div{display:flex;gap:10px}.world-bar button:not(.primary){background:none;border:1px solid #394449;padding:10px;color:#aab8ba;font-size:12px}kbd{padding:3px 6px;border:1px solid #6f787c;border-radius:3px;margin:0 5px;font:10px system-ui}dialog{background:#0d171e;color:#e5e8e6;border:1px solid #526169;padding:26px 30px 15px;width:min(1030px,94vw);max-height:86dvh;box-shadow:0 30px 100px #000a}dialog::backdrop{background:#050b10bb;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center}.dialog-top h2{font:32px Georgia;margin:4px 0 18px}.dialog-top button{background:none;border:1px solid var(--line);width:34px;height:34px}.camp-summary{display:flex;gap:20px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px 0;color:#98aab5;font-size:11px}.camp-summary span:first-child{color:var(--gold)}.camp-tools{display:flex;align-items:center;gap:20px;margin:14px 0}.camp-tools>input{max-width:310px}.camp-tools label{display:flex;align-items:center;gap:8px;letter-spacing:0}.camp-tools>span{margin-left:auto;font-size:10px;color:#81929b}.camp-columns,.camp-row{display:grid;grid-template-columns:minmax(230px,1fr) 100px 100px 75px 120px;gap:10px;align-items:center}.camp-columns{font-size:9px;letter-spacing:1px;color:#80929c;padding:10px 12px}.camp-row{border-top:1px solid #ffffff0d;padding:14px 12px}.camp-row:hover{background:#ffffff04}.camp-label{display:flex;gap:15px;align-items:center}.plate{width:35px;height:39px;border:1px solid #50606b;color:var(--gold);display:grid;place-items:center;font:16px Georgia;flex-shrink:0}.camp-label strong{font-size:13px;font-weight:500}.camp-label small{display:block;color:#83929b;font-size:10px}.camp-row .count{font-size:12px;color:#c0dce9}.camp-row .count.brown-count{color:#c89b77}.camp-row .total{font-size:12px}.camp-row button{background:#24312f;border:1px solid #7c7654;color:#d9c898;padding:8px 9px;font-size:10px}.camp-row.current{background:#c6ad7310}#camp-list{max-height:43dvh;overflow:auto;scrollbar-color:#53615d #0d171e}.dialog-foot{padding-top:13px;color:#75878e;font-size:10px}.empty{padding:40px;text-align:center;color:#8da0aa}#toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%);z-index:100;background:#202c30;border:1px solid #9b865d;color:#f0e4c5;padding:13px 24px;max-width:90vw;box-shadow:0 10px 40px #0008}body:has(dialog[open]) #toast{bottom:auto;top:8px} [hidden]{display:none!important}@media(max-width:800px){header{height:75px;padding:16px 5%}.build{font-size:8px;letter-spacing:0}.brand{font-size:26px}#selection{display:block;padding-top:24px}.intro h1 br{display:none}.intro h1{font-size:35px;margin:12px 0}.intro p{font-size:12px}.nation{height:360px}.nation-copy{left:15px;bottom:18px}.nation-copy strong{font-size:20px;letter-spacing:1px}.nation-copy small{font-size:8px;letter-spacing:1px}.nation-art{background-size:260% auto}.white .nation-art{background-position:10% 10%}.brown .nation-art{background-position:86% 10%}#enter{gap:12px}.primary span{display:none}#enter button{padding:12px;font-size:9px}.camp-columns{display:none}.camp-row{grid-template-columns:1fr 1fr 1fr}.camp-label{grid-column:1/-1}.camp-row button{grid-column:3;grid-row:2/4}.camp-row .total{grid-column:1/3}.camp-tools{flex-wrap:wrap;gap:9px}.camp-summary{gap:10px;font-size:9px}dialog{padding:20px 15px}.camp-tools>input{max-width:none}.world-top{top:95px}.identity{max-width:180px;padding:8px}.identity span{font-size:9px}.location h2{font-size:20px}.location small{max-width:150px;display:block}.world-bar{flex-wrap:wrap}.world-help{bottom:150px;max-width:260px}#map{height:calc(100dvh - 75px)}}

/* Desktop and touch share the same settings and HUD. */
#settings-button{margin-left:auto;margin-right:24px;background:#18232a;border:1px solid #596057;color:#dcc895;min-height:44px;padding:8px 16px;font-size:11px;letter-spacing:1px}
#map-announcement{position:fixed;top:38%;left:50%;transform:translate(-50%,-50%);z-index:8;pointer-events:none;text-align:center;width:min(90vw,850px);padding:32px 15px;background:radial-gradient(ellipse,#071016b8,transparent 72%);opacity:1;transition:opacity .9s ease}
#map-announcement small{font-size:10px;letter-spacing:4px;color:#d3bd8c}#map-announcement strong{display:block;font:clamp(22px,3.1vw,44px)/1.3 Georgia;color:#f4ead4;letter-spacing:3px;text-shadow:0 2px 12px #000;margin:15px 0}#map-announcement>span{display:block;height:1px;width:180px;margin:auto;background:linear-gradient(90deg,transparent,#d2b475,transparent)}#map-announcement.fading{opacity:0}
#settings-dialog{width:min(820px,94vw)}#settings-tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);overflow:auto}#settings-tabs button,.preset-buttons button,.settings-actions button,#settings-body>button{min-height:44px;background:#16232b;border:1px solid #35474e;padding:9px 16px;color:#cad3d3;white-space:nowrap}#settings-tabs button[aria-pressed=true],.preset-buttons button[aria-pressed=true]{border-color:var(--gold);color:var(--gold);background:#6d5a2928}#settings-body{height:min(440px,48dvh);overflow:auto;padding:16px 3px;scrollbar-color:#63726c #10191f}.preset-buttons{display:flex;gap:10px}.preset-buttons button{flex:1}.setting-note{font-size:12px;color:#93a4ac;line-height:1.6}.setting-row{display:flex;align-items:center;gap:15px;min-height:49px;border-bottom:1px solid #ffffff09;letter-spacing:0;color:#d0d7d8;font-size:12px;padding:6px 2px}.setting-row>span,.setting-row>select{flex:1}.setting-row input[type=range]{width:35%;padding:0;min-height:44px;accent-color:#cfb680}.setting-row input[type=checkbox]{height:22px;width:22px;accent-color:#cfb680}.setting-row output{min-width:60px;text-align:right;color:#d8bd85}.setting-row select{max-width:130px;margin-left:auto;background:#18252b;color:white;padding:9px}.settings-actions{display:flex;gap:10px;padding-top:16px;border-top:1px solid var(--line)}.settings-actions button:first-child{margin-right:auto}.settings-actions button.primary{background:#cfb680;color:#15212a}#joystick{position:fixed;bottom:calc(125px + env(safe-area-inset-bottom));left:24px;width:112px;height:112px;border:1px solid #c7d6cb70;border-radius:50%;background:#101e2480;z-index:5;touch-action:none;display:grid;place-items:center}#joystick span{display:block;width:44px;height:44px;background:#bfcabe80;border:1px solid #d9d2b0;border-radius:50%;pointer-events:none}#performance{position:fixed;top:96px;left:50%;transform:translateX(-50%);font:11px monospace;background:#000a;color:#b4d6bd;padding:4px 9px;pointer-events:none;z-index:5}.high-contrast{--muted:#bdcbd1;--line:#ffffff66}.high-contrast .setting-note,.high-contrast .preview-note{color:#cbd6dc}.large-text{font-size:16px}.large-text .setting-row,.large-text .camp-label strong{font-size:15px}.reduced-motion *{transition:none!important;animation:none!important}
@media(pointer:coarse){button{min-height:44px}.world-help{left:auto;right:12px;max-width:220px;bottom:125px}.world-help small{display:none}.world-help p{font-size:11px}.world-bar{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.world-bar>span{display:none}.world-bar div{width:100%;justify-content:space-between}.world-bar button{min-height:48px}.world-top{top:100px}.identity span{display:none}}
@media(max-width:600px){.build{display:none}#settings-button{margin-right:0}#settings-tabs button{padding:8px 12px;font-size:11px}.setting-row{font-size:11px;gap:8px}.setting-row input[type=range]{width:32%}.setting-row output{min-width:45px}.preset-buttons button{padding:9px}.settings-actions{gap:5px}.settings-actions button{padding:8px 10px;font-size:11px}#map-announcement strong{letter-spacing:1px}#map-announcement small{letter-spacing:2px;font-size:8px}.location h2{max-width:150px}.world-help{max-width:170px;padding:10px}.world-bar div{flex-wrap:wrap}.world-bar button.primary{padding:10px}#performance{top:80px;width:max-content}}

.hub-picker{grid-column:1/-1;margin-top:42px;min-width:0}.hub-heading{display:flex;justify-content:space-between;align-items:center}.hub-heading h2{font:36px Georgia;margin:7px 0 24px}.hub-heading>span{font-size:11px;color:var(--muted)}.hub-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px}#hub-list{display:flex;flex-direction:column;gap:8px}.hub-option{display:flex;text-align:left;gap:12px;align-items:center;min-height:76px;background:linear-gradient(110deg,#1c292d,#10191e);border:1px solid #394749;padding:12px;color:#d9e0db}.hub-option[aria-pressed=true]{border-color:var(--gold);background:linear-gradient(110deg,#594a2a55,#192b2e);box-shadow:inset 3px 0 var(--gold)}.hub-option .hub-num{font:24px Georgia;color:var(--gold);width:28px}.hub-option strong{display:block;font-size:14px}.hub-option small{display:block;color:#aab8b9;font-size:11px}.hub-option .hub-count{margin-left:auto;font-size:11px;white-space:nowrap;color:#c9d9b5}.hub-preview{margin:0;position:relative;min-height:412px;border:1px solid #8a7952;overflow:hidden;background:#15232a}.hub-preview img{width:100%;height:100%;position:absolute;object-fit:cover}.hub-preview figcaption{position:absolute;bottom:0;left:0;right:0;padding:58px 25px 20px;background:linear-gradient(transparent,#071217f5)}.hub-preview h3{font:32px Georgia;margin:6px 0;color:#f2e5c8}.hub-preview small{font-size:9px;letter-spacing:2px;color:#e0c995}.hub-preview p{margin:5px 0;color:#cfdbd8;font-size:12px}.concept-label{font-size:8px;letter-spacing:2px;color:#99aaa8}.hub-invitation{padding:20px;margin-top:18px;text-align:center;border:1px solid #897343;background:linear-gradient(90deg,#182327,#3b352322,#182327);color:#e1cea4;font:16px/1.6 Georgia}.hub-disclaimer{font-size:10px;color:#899a9d}#enter{grid-column:1/-1;justify-content:flex-end}#enter label{max-width:300px}.preview-note{grid-column:1/-1}.nation{height:360px}
@media(max-width:800px){.hub-layout{grid-template-columns:1fr}.hub-preview{min-height:290px;order:-1}.hub-heading>span{display:none}.hub-option{min-height:65px}.hub-preview h3{font-size:26px}.hub-heading h2{font-size:30px}.hub-invitation{font-size:15px}.hub-picker{margin-top:30px}.hub-preview figcaption{padding:50px 16px 16px}}

#world{position:relative}#world .world-top{top:22px}#map3d{display:block;width:100%;height:calc(100dvh - 90px);touch-action:none}#scene-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:22px;background:#101d24ed;z-index:12}#scene-loading strong{font:28px Georgia;color:#d4bd86}#scene-tools{position:absolute;bottom:92px;left:50%;transform:translateX(-50%);max-width:94%;display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:9px;background:#101c23d9;border:1px solid #ad966666}#scene-tools>span{width:100%;text-align:center;font-size:8px;color:#d5be8b;letter-spacing:2px}#scene-tools button{background:#253238;border:1px solid #657065;color:#eadcc0;padding:9px;font-size:10px;min-height:38px}#world:has(#map3d:not([hidden])) .world-help{bottom:auto;top:100px;max-width:220px;padding:10px;background:#15232b88}#world:has(#map3d:not([hidden])) .world-help p{display:none}
@media(max-width:800px){#map3d{height:calc(100dvh - 75px)}#scene-tools{bottom:112px;width:95%}#scene-tools button{min-height:44px}#world:has(#map3d:not([hidden])) .world-help{top:100px;max-width:170px;font-size:10px}}

#performance{max-width:94vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:600px){#world .world-bar>span{display:none}#world .world-help{max-width:145px!important}.location h2{font-size:18px}#scene-tools{bottom:85px}}

#wolf-tools{position:absolute;right:12px;top:110px;display:flex;flex-wrap:wrap;gap:5px;max-width:330px;z-index:6;padding:8px;background:#101a17e8;border:1px solid #8c7852;border-radius:8px}#wolf-tools[hidden]{display:none}#wolf-tools span{width:100%;font-size:10px;color:#d7c59d}#wolf-tools button{min-height:44px;font-size:12px;padding:6px 10px}@media(max-width:600px){#wolf-tools{top:126px;right:6px;max-width:210px;padding:4px;gap:3px}#wolf-tools button{font-size:11px;padding:4px 6px}}

#wolf-tools{display:block}#wolf-tools>div{display:flex;flex-wrap:wrap;gap:5px}#wolf-tools summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:11px;color:#d7c59d}#wolf-tools summary::after{content:" −";margin-left:auto}#wolf-tools:not([open]) summary::after{content:" +"}@media(max-width:600px){#wolf-tools>div{gap:3px}}

#wolf-animation-list{display:grid;gap:5px;width:100%;max-height:32dvh;overflow:auto;overscroll-behavior:contain}#wolf-animation-list button{text-align:left;overflow-wrap:anywhere;min-height:44px}#wolf-animation-list small{display:block;font-size:9px;color:#b4c1be}#wolf-tools{right:max(12px,env(safe-area-inset-right));max-height:60dvh;overflow:auto}#wolf-current{overflow-wrap:anywhere}

/* Ergenekon: quiet framing around the world, with touch-accessible controls. */
body:has(#world:not([hidden])) header{height:64px;padding:10px 28px;background:#0b1318;border-bottom:1px solid #c0a77938}
body:has(#world:not([hidden])) header .brand{font-size:27px;letter-spacing:7px}
body:has(#world:not([hidden])) header .build{font-size:9px;letter-spacing:1.5px}
body:has(#world:not([hidden])) #map3d{height:calc(100dvh - 64px)}
#world .world-top{top:18px;left:22px;right:22px;pointer-events:none;align-items:start}
#world .identity{background:linear-gradient(110deg,#0a1824df,#0a182444);border-left:2px solid #9eb7bd;padding:12px 18px;min-width:160px}
#world .identity strong{font:24px Georgia;letter-spacing:2px;color:#f1e8d5}
#world .identity small{font-size:9px;letter-spacing:3px;color:#93becb}
#world .identity span{font-size:10px;color:#a1b1b7}
#world .location{background:linear-gradient(270deg,#0a1824b8,transparent);padding:10px 16px;text-align:right}
#world .location h2{font:22px Georgia;color:#f1e8d5;text-shadow:0 2px 8px #071018;letter-spacing:1px;margin:4px 0}
#world .location>span{font-size:9px;letter-spacing:3px;color:#a2c3c9}
#world .location small{font-size:10px;color:#bbcbce}
#wolf-tools{top:112px;right:max(18px,env(safe-area-inset-right));border:1px solid #c8b07944;border-radius:3px;background:#0b1720ed;padding:0 10px;width:290px;max-width:calc(100% - 32px)}
#wolf-tools:not([open]){width:180px}#wolf-tools summary{letter-spacing:1.5px;color:#d9c59c}
#wolf-tools>div{padding:0 0 10px}#wolf-tools button{background:#1a2c35;border:1px solid #6c899344;border-radius:3px;color:#dce6e3}
#wolf-tools button:hover,#wolf-tools button:focus-visible{background:#29434c;border-color:#bda36b}
#scene-tools{bottom:84px;background:#0b1720df;border:1px solid #c8b07944;border-radius:4px;padding:6px 10px;gap:4px;width:auto}
#scene-tools>span{display:none}#scene-tools button{min-width:44px;min-height:44px;background:transparent;border:1px solid transparent;color:#c9d7d7;font-size:10px;border-radius:2px}
#scene-tools button:hover,#scene-tools button:focus-visible{background:#29434c;border-color:#bda36b}
#world:has(#map3d:not([hidden])) .world-help{top:auto;bottom:145px;left:22px;background:#0b172099;border-left:1px solid #bda36b66;max-width:185px;font-size:9px;pointer-events:none}
#world .world-bar{background:#0b1318f2;border-top:1px solid #bda36b44;padding:12px 22px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
#world .world-bar button{min-height:44px;border-radius:2px;letter-spacing:1px;font-size:10px}
#world .world-bar>span{color:#8fa4ad;font-size:10px}#performance{font:10px monospace;background:#09131cbb;color:#a2c3c9}
@media(max-width:600px){
 body:has(#world:not([hidden])) header{padding:8px 14px;height:58px}
 body:has(#world:not([hidden])) header .build{display:none}
 body:has(#world:not([hidden])) #map3d{height:calc(100dvh - 58px)}
 #world .world-top{top:12px;left:10px;right:10px}#world .identity{min-width:90px;padding:8px 10px}#world .identity strong{font-size:20px}#world .identity span{max-width:110px;font-size:8px}
 #world .location{max-width:53%;padding:8px}#world .location h2{font-size:15px;line-height:1.3}#world .location small{font-size:9px}
 #wolf-tools{top:110px;right:10px;width:235px}#wolf-tools:not([open]){width:158px}
 #scene-tools{bottom:84px;max-width:calc(100% - 16px);width:calc(100% - 16px);padding:4px;gap:0}#scene-tools button{flex:1 0 auto;font-size:9px;padding:5px}
 #world:has(#map3d:not([hidden])) .world-help{display:none}
 #world .world-bar{padding:8px 10px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
}

@media(min-width:801px){#scene-tools{width:670px;max-width:calc(100% - 40px);flex-wrap:nowrap}#scene-tools button{flex:1;padding:6px}}

#wolf-sprint{min-height:44px;border:1px solid #91bdc6;background:#173847;color:#d6eef2}#wolf-sprint:disabled{opacity:1;background:#294550;color:#b9ccd1}@media(max-width:600px){#world .world-bar>div{display:flex;gap:5px;width:100%}#world .world-bar button{padding:7px;flex:1;font-size:9px}}

#skill-bar{position:absolute;z-index:4;left:50%;transform:translateX(-50%);bottom:calc(150px + env(safe-area-inset-bottom));padding:8px 12px;background:linear-gradient(#152b35f2,#09131bf5);border:1px solid #bda36b88;border-radius:5px;box-shadow:0 5px 18px #0008;max-width:calc(100% - 16px)}
#skill-hint{text-align:center;height:23px;font-size:11px;color:#ead4a1;white-space:nowrap}
#skill-slots{display:grid;grid-template-columns:repeat(8,54px);gap:6px}
.skill-slot{position:relative;width:54px;height:54px;padding:6px;border:1px solid #879e9f;background:radial-gradient(circle at 50% 30%,#345466,#10222f);color:#d6edf0;border-radius:4px;overflow:hidden;touch-action:manipulation}
.skill-slot:hover,.skill-slot:focus-visible{border-color:#efd397;box-shadow:inset 0 0 10px #cbb47b55}.skill-slot svg{width:100%;height:100%}.skill-right svg{transform:scaleX(-1)}.skill-combo1,.skill-combo2,.skill-combo3{color:#f4d6a1;background:radial-gradient(circle at 50% 30%,#6a4531,#241b23)}.skill-combo3{color:#ffc4ab}.skill-sprint{color:#a4edd4}.skill-escape{color:#cdbaff}.skill-badge{position:absolute;bottom:1px;right:4px;font:bold 12px Georgia;text-shadow:0 1px 3px #000;z-index:3}.skill-shade{display:none;position:absolute;inset:0;background:conic-gradient(#02080dda var(--cooldown),transparent 0)}.cooling .skill-shade{display:block}.skill-seconds{position:absolute;inset:0;display:grid;place-items:center;font:bold 18px system-ui;color:white;text-shadow:0 2px 4px black;z-index:2}.skill-active{border-color:#85f6bf;box-shadow:0 0 8px #59e3a755}
#wolf-sprint{display:none!important}
@media(max-width:800px){#skill-bar{bottom:calc(190px + env(safe-area-inset-bottom));padding:6px}#skill-slots{grid-template-columns:repeat(8,44px);gap:2px}.skill-slot{width:44px;height:48px;padding:4px}#skill-hint{font-size:10px}}
@media(max-width:380px){#skill-slots{grid-template-columns:repeat(4,48px);gap:4px}.skill-slot{width:48px}#skill-hint{font-size:9px}}

#load-test{position:absolute;z-index:5;top:125px;left:18px;width:290px;max-width:calc(100% - 36px);background:#0b1720ef;border:1px solid #bda36b88;border-radius:4px;padding:0 10px}#load-test summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#e4cf9b;font-size:11px;letter-spacing:1px}#load-test p{font-size:11px;margin:0 0 8px}#load-test button{min-height:44px;background:#203640;border:1px solid #607e86;padding:6px;margin:0 3px 6px 0;font-size:11px}#load-test output{display:block;white-space:pre-line;overflow-wrap:anywhere;font:11px/1.6 monospace;color:#d6e9ea;padding:5px 0}#load-results{color:#ead4a1!important}@media(max-width:600px){#load-test{top:158px;left:10px;width:260px;max-height:min(38dvh,calc(100dvh - 420px));overflow:auto}#load-test:not([open]){width:175px}}

#world .identity{pointer-events:auto;min-width:260px;padding:8px 12px}.identity-head{display:flex;align-items:center;gap:7px}.identity-head strong{font-size:18px!important}.identity-head small{font-size:9px!important;letter-spacing:1px!important}#level-button{min-width:44px;min-height:44px;padding:3px;background:transparent;border:1px solid #bfa57355;color:#f1d898;font-size:12px}.status-bar{position:relative;height:19px;min-width:0;width:100%;background:#080d14;border:1px solid #64707766;margin:3px 0;overflow:hidden}.status-bar>span{position:absolute;inset:0 auto 0 0;width:100%;background:linear-gradient(90deg,#8a2330,#cf5354);max-width:none!important}.status-bar b{position:relative;display:block;text-align:center;font:600 11px/17px system-ui;color:#fff;text-shadow:0 1px 2px #000}.status-bar.exp>span{width:0;background:linear-gradient(90deg,#34528a,#699fdb)}.status-bar.online>span{width:0;background:linear-gradient(90deg,#805723,#c49a4e)}
#combat-tools{position:absolute;z-index:5;right:18px;top:170px;width:290px;max-width:calc(100% - 36px);background:#0b1720f2;border:1px solid #bda36b88;border-radius:4px;padding:0 10px}#combat-tools summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#e4cf9b;font-size:11px}#combat-tools p{font-size:10px;color:#a5bac3}#combat-tools button{min-height:44px;background:#203640;border:1px solid #607e86;padding:6px;margin:0 3px 6px 0;font-size:11px}#combat-tools output{display:block;min-height:34px;font-size:11px;color:#e5d1a4;padding:6px 0}#enemy-name{font-size:11px}#load-test{top:245px}#level-dialog{max-width:640px}#level-dialog h2{font-size:22px}#level-dialog li{margin-bottom:10px}#level-close{min-width:44px;min-height:44px}
@media(max-width:600px){#world .identity{min-width:0;width:205px;padding:5px 8px}#world .identity-head{gap:4px;flex-wrap:wrap}.identity-head strong{font-size:16px!important}.identity-head small{font-size:8px!important}#world .location{max-width:40%}#world .location h2{font-size:12px}#world .identity span{max-width:none}#wolf-tools{top:168px}#combat-tools{top:218px;right:10px;width:250px;max-height:min(37dvh,calc(100dvh - 430px));overflow:auto}#combat-tools:not([open]){width:175px}#load-test{top:218px;left:10px;width:145px}#load-test[open]{width:260px;z-index:6}#load-test summary{font-size:9px}#level-dialog{padding:16px}#level-dialog h2{font-size:18px}}

@media(max-width:600px){#load-test{top:168px}#load-test[open]{top:218px}}

#skill-row{display:flex;align-items:center;gap:12px}#utility-slots{display:flex;gap:6px;border-left:1px solid #bda36b66;padding-left:12px}.skill-slot[data-shortcut]:before{content:attr(data-shortcut);position:absolute;top:1px;left:4px;color:#fff8df;font:10px system-ui;z-index:3}#skill-bar{bottom:calc(84px + env(safe-area-inset-bottom))}#health-potion{background:radial-gradient(circle,#5e1d2c,#1d1823)}#square-home{background:radial-gradient(circle,#455345,#15232c)}#damage-screen{position:absolute;inset:0;pointer-events:none;z-index:3;opacity:0;background:radial-gradient(ellipse at 8% 15%,#9d001a 0 1%,transparent 1.8%),radial-gradient(ellipse at 92% 30%,#8b061a 0 1.2%,transparent 2%),radial-gradient(ellipse at 12% 78%,#a00c21 0 1.8%,transparent 2.5%),radial-gradient(ellipse at 87% 85%,#a00c21 0 1%,transparent 2%),radial-gradient(ellipse,transparent 48%,#78001dbb 100%)}
@media(max-width:650px){#skill-slots{grid-template-columns:repeat(4,44px);gap:3px}#skill-row{gap:8px}#utility-slots{gap:4px;padding-left:8px}.utility-slot{width:44px;height:48px}#skill-bar{bottom:calc(76px + env(safe-area-inset-bottom));padding:6px}#skill-hint{white-space:normal;height:auto;min-height:23px;max-width:300px;line-height:1.3;font-size:10px}#combat-tools{max-height:32dvh}}
/* Full-screen play HUD */
body:has(#world:not([hidden])){overflow:hidden}
body:has(#world:not([hidden]))>header{display:none}
#world:not([hidden]){position:fixed;inset:0;width:100%;height:100dvh;overflow:hidden}
#world #map3d,#world #map{width:100%;height:100dvh}
#world .world-bar,#world .world-help{display:none}
#world .world-top{top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
#skill-bar{bottom:max(14px,env(safe-area-inset-bottom))}
#utility-slots{border-left:0;padding-left:0;border-right:1px solid #71858560;padding-right:12px}
.skill-slot.right-selected{border-color:#83ff95!important;box-shadow:0 0 0 2px #3bc65a,0 0 16px #38df6866,inset 0 0 12px #38df6833}
#game-rail{position:absolute;right:max(12px,env(safe-area-inset-right));top:25%;z-index:6;display:flex;flex-direction:column;gap:9px;align-items:center}
#game-rail .rail-button,#game-rail #square-home{width:48px;height:48px;min-height:44px;padding:7px;border:1px solid #80918a88;background:#0c2029e8;color:#ecd5a6;border-radius:8px;font-size:26px;box-shadow:0 3px 14px #0006;touch-action:manipulation}
#game-rail #home{max-width:96px;font-size:11px;min-height:44px}
#test-drawer{position:absolute;right:76px;top:23%;width:min(310px,calc(100vw - 92px));max-height:65dvh;overflow:auto;z-index:7;background:#091b24f5;border:1px solid #6e8787;border-radius:8px}
#test-drawer[hidden]{display:none}
#test-drawer #combat-tools,#test-drawer #load-test,#test-drawer #wolf-tools{position:static;width:auto;max-width:none;margin:0;border:0;border-bottom:1px solid #516268;border-radius:0}
#world #enemy-status{position:absolute;top:112px;left:50%;transform:translateX(-50%);width:240px;padding:8px 12px;background:#0c1c25db;border:1px solid #aa686866;border-radius:6px;z-index:4;text-align:center;pointer-events:none}
#enemy-name{display:block;font:700 17px Georgia,serif;letter-spacing:1px;color:#ff7b7b;margin-bottom:6px}
#nameplates{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.world-name{position:absolute;left:0;top:0;white-space:nowrap;font:700 16px Georgia,serif;letter-spacing:.7px;color:#72baff;text-shadow:0 2px 2px #000,1px 0 2px #000,-1px 0 2px #000;will-change:transform}
.world-name.enemy{color:#ff6565}
#world:has(#map3d[hidden]) #nameplates{display:none}
#world .identity-head #player-name{color:#72baff}
@media(max-width:650px){
 #skill-bar{bottom:max(10px,env(safe-area-inset-bottom));max-width:calc(100vw - 20px)}
 #utility-slots{padding-right:7px;padding-left:0;border-left:0}
 #game-rail{right:max(8px,env(safe-area-inset-right));gap:7px}
 #game-rail .rail-button,#game-rail #square-home{width:44px;height:44px;font-size:24px}
 #world #enemy-status{top:174px;width:200px;padding:5px 10px}
 #enemy-name{font-size:14px;margin-bottom:3px}
 #world .location{max-width:125px}
 #world .location h2{font-size:17px}
 #world .location small{display:none}
 .world-name{font-size:13px}
 #test-drawer{right:60px;width:calc(100vw - 76px)}
}
@media(max-height:500px){#game-rail{top:16%;gap:4px}#game-rail .rail-button,#game-rail #square-home{width:44px;height:44px}#world #enemy-status{top:75px}#world .location{display:none}}
#test-drawer .world-help:not([hidden]){display:block;position:static;width:auto;margin:0;max-width:none}
body:has(#world:not([hidden])) #world #map3d,body:has(#world:not([hidden])) #world #map{height:100dvh}
#test-drawer #combat-tools,#test-drawer #load-test,#test-drawer #wolf-tools{max-height:none}
.skill-slot{touch-action:manipulation;-webkit-touch-callout:none;user-select:none}
/* Forged command medallions: vector artwork, no animated texture cost. */
#combat-actions{position:absolute;bottom:calc(100% + 18px);left:50%;transform:translateX(-50%);display:flex;gap:22px;pointer-events:auto}
.combat-medallion{position:relative;isolation:isolate;width:68px;height:68px;min-width:44px;min-height:44px;padding:10px;border-radius:50%;border:2px solid #bb9562;background:radial-gradient(circle at 38% 25%,#46515a 0,#1c2932 47%,#0a1118 72%);color:#edc68f;box-shadow:0 0 0 3px #101820,0 0 0 4px #80623f,inset 0 0 0 3px #b4935d40,inset 0 -5px 9px #0009,0 5px 15px #0009;touch-action:manipulation;user-select:none}
.combat-medallion:before{content:'';position:absolute;inset:5px;border:1px solid #d7b77745;border-radius:50%;pointer-events:none}
.combat-medallion svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 2px #0009)}
.target-medallion{border-color:#ca7772;background:radial-gradient(circle at 40% 25%,#693d45,#2e1823 55%,#100e17 80%);box-shadow:0 0 0 3px #15151b,0 0 0 4px #82564b,inset 0 0 0 3px #bb645540,0 5px 15px #0009}
.combat-medallion .action-key{position:absolute;right:-6px;top:-6px;width:24px;height:24px;display:grid;place-items:center;border:1px solid #c9a36a;border-radius:7px;background:linear-gradient(#34404b,#0d1822);color:#fff0ce;font:700 13px Georgia,serif;box-shadow:0 2px 5px #0009}
.action-caption{position:absolute;bottom:-12px;left:50%;transform:translateX(-50%);padding:1px 9px;background:#111b23;border:1px solid #8b704e;border-radius:3px;font:700 9px/15px Georgia,serif;letter-spacing:1.5px;color:#f0dbb5;white-space:nowrap}
.target-medallion[aria-pressed=true]{border-color:#ffaaa0;box-shadow:0 0 0 3px #441d29,0 0 0 4px #bd6057,0 0 18px #ed3b4466,inset 0 0 14px #a32f4244}
.follow-medallion[aria-pressed=true]{border-color:#f9db93;box-shadow:0 0 0 3px #342f22,0 0 0 4px #c29d56,0 0 18px #eab44c66,inset 0 0 14px #dcac4244}
.combat-medallion:hover{filter:brightness(1.16)}
#game-rail{gap:15px;right:max(16px,env(safe-area-inset-right))}
#game-rail .rail-button,#game-rail #square-home{position:relative;width:54px;height:58px;padding:10px;border:1px solid #b69a68;border-radius:13px 4px 13px 4px;color:#e5c387;background:linear-gradient(145deg,#48545a 0,#25343d 12%,#101e28 55%,#28343a 100%);box-shadow:0 0 0 3px #0b141bd9,0 0 0 4px #74634588,inset 0 0 0 3px #b5955c25,inset 0 -3px 6px #0008,0 5px 14px #0008;overflow:visible}
#game-rail button:before{content:'';position:absolute;top:3px;left:9px;right:9px;height:1px;background:linear-gradient(90deg,transparent,#efdca0,transparent);pointer-events:none}
#game-rail svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 2px #000b)}
#game-rail button:hover{border-color:#f2d6a0;filter:brightness(1.18)}
#game-rail #square-home .skill-shade{border-radius:12px 4px}
#game-rail #square-home .skill-seconds{z-index:3;text-shadow:0 1px 4px #000}
@media(max-width:650px){#combat-actions{gap:20px;bottom:calc(100% + 20px)}.combat-medallion{width:60px;height:60px;padding:8px}#game-rail{right:max(12px,env(safe-area-inset-right));gap:12px}#game-rail .rail-button,#game-rail #square-home{width:46px;height:49px;padding:8px}}
@media(max-height:500px){#combat-actions{bottom:calc(100% + 14px);gap:17px}.combat-medallion{width:50px;height:50px;padding:6px}#game-rail{gap:9px}#game-rail .rail-button,#game-rail #square-home{width:44px;height:44px;padding:6px}.action-caption{font-size:8px;line-height:12px;bottom:-10px}}
.combat-float{position:absolute;left:0;top:0;display:flex;gap:4px;align-items:center;color:#fff;font:700 21px/1 Georgia,serif;text-shadow:0 2px 3px #000,1px 0 2px #000,-1px 0 2px #000;white-space:nowrap;pointer-events:none}
.combat-float[hidden]{display:none}.combat-float svg{width:21px;height:21px;color:#f2ddba;display:block}.combat-float.exp-gain{color:#80baff;font-size:18px}
.lock-medallion{border-color:#c4a0d5;background:radial-gradient(circle at 35% 20%,#684d7c,#2c203a 60%,#12111e);color:#e5cafa}
#lock-enemy .skill-shade{border-radius:50%;pointer-events:none}#lock-enemy .skill-seconds{position:absolute;inset:0;display:grid;place-items:center;font:bold 20px Georgia;color:#fff;pointer-events:none;text-shadow:0 2px 4px #000}#lock-enemy .action-key,#lock-enemy .action-caption{z-index:3}#lock-enemy.cooling svg{opacity:.35}
#death-smoke{position:fixed;inset:0;z-index:90;pointer-events:none;opacity:0;background:radial-gradient(ellipse at 15% 75%,#000 5%,transparent 70%),radial-gradient(ellipse at 90% 20%,#000 10%,transparent 70%),radial-gradient(ellipse at 35% 10%,#000 5%,transparent 80%),#08090c88;transition:opacity 3s ease}
#death-smoke.covered{opacity:.5}#death-smoke.clearing{opacity:0}#death-smoke.plain{background:#000}
#death-dialog{width:min(420px,calc(100vw - 32px));padding:30px 24px;text-align:center;background:linear-gradient(145deg,#283039ed,#0e1721f5 55%);border:1px solid #ad9065;outline:3px solid #121a23;box-shadow:inset 0 0 0 5px #b6996540,0 20px 70px #000a;border-radius:15px 4px;transition:opacity 3s ease}
#death-dialog::backdrop{background:transparent;backdrop-filter:none}#death-dialog .death-sigil{color:#af8e64;font-size:38px}#death-dialog small{font:9px Georgia;letter-spacing:2px;color:#baa98e}#death-title{font:36px Georgia;color:#f1d7b0;margin:12px 0}#death-countdown{font-size:14px;min-height:23px;color:#ccc5bb}#death-revive{min-height:48px;padding:10px 28px;border:1px solid #d3af75;background:linear-gradient(#a98b59,#6f5636);color:#fff2d4;border-radius:5px;font-weight:bold}#death-revive:disabled{opacity:.35}#death-dialog.recovering{opacity:0;pointer-events:none}
.reduced-motion #death-dialog,.reduced-motion #death-smoke{transition:none}
@media(max-width:650px){#combat-actions{gap:16px}.combat-medallion{width:56px;height:56px}#death-dialog{padding:24px 18px}}
#enemy-effect{display:block;color:#d8bcf0;font-size:11px;line-height:1.5}#enemy-effect:empty{display:none}
.lock-bubble{position:absolute;left:0;top:0;padding:4px 9px;border:1px solid #a5d7ecaa;border-radius:9px 9px 9px 2px;background:linear-gradient(135deg,#213746ed,#101d2af5);color:#d5f1fc;box-shadow:0 2px 7px #0007;font:600 11px/1.2 system-ui;white-space:nowrap;pointer-events:none;text-shadow:0 1px 2px #000}
.lock-bubble.protected{color:#e5d5a8;border-color:#ac986caa;background:linear-gradient(135deg,#393527ed,#1d211ff5)}
.lock-bubble[hidden]{display:none}.combat-float.heal-gain{color:#79f39c;font-size:18px}
@media(max-width:650px){.lock-bubble{font-size:10px;padding:3px 7px}}

/* Adana camp: bounded HUD and touch scoreboard. */
#arena-hud{position:absolute;z-index:12;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(590px,48vw);padding:10px 14px;border:1px solid #b99d66;background:linear-gradient(135deg,#172c34ef,#0e1923ed);border-radius:4px 4px 14px 14px;text-align:center;pointer-events:none;box-shadow:0 5px 20px #0006}#arena-hud>div{display:flex;justify-content:space-between;align-items:center;gap:12px}#arena-hud b{font:700 11px Georgia;white-space:nowrap}#arena-gok{color:#a4d4ef}#arena-kara{color:#dfa77e}#arena-clock{color:#fff;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}#arena-hud small{display:block;font-size:10px;margin-top:7px;color:#c2b99f}.urgent{color:#ff6d74!important}
#kill-feed{position:absolute;z-index:11;left:max(14px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));max-width:360px;pointer-events:none;font:12px/1.8 system-ui;text-shadow:0 1px 3px #000,0 0 5px #000}#kill-feed>div{padding:1px 7px;background:linear-gradient(90deg,#101a26c9,transparent);border-left:2px solid #9d885a;color:#ddd}.feed-killer{color:#7ec8ff}.feed-victim{color:#ff8284}
.score-key{position:absolute;right:0;bottom:-4px;font:bold 11px Georgia;padding:2px 5px;background:#13232f;border:1px solid #b99d66;border-radius:4px}#score-dialog{width:min(800px,calc(100vw - 24px));max-height:88dvh;overflow:auto;padding:22px;background:linear-gradient(135deg,#192d38,#0c151e);border:1px solid #bfa475;border-radius:12px;color:#eee}#score-dialog h2{font:26px Georgia;margin:4px 0}#score-dialog small,#last-round{font-size:12px;color:#c2b59d}#score-clock{text-align:center;color:white;font-variant-numeric:tabular-nums}.score-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.score-columns h3{color:#9bd0f3;font:700 15px Georgia;border-bottom:1px solid #668091;padding-bottom:10px}.score-columns section+section h3{color:#e8ae8c;border-color:#8c6955}.score-columns table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.score-columns th,.score-columns td{text-align:left;padding:8px 4px;border-bottom:1px solid #ffffff12;overflow-wrap:anywhere}.score-columns th:first-child,.score-columns td:first-child{width:26px}.score-columns th:last-child,.score-columns td:last-child{width:38px;text-align:right}.self-score{background:#d0b06a22;color:#ffe4a9}#score-close,#arena-fast-reset{min-width:44px;min-height:44px}#last-results summary{min-height:44px;cursor:pointer;padding:10px 0}#arena-test{padding:12px;color:#e2d4b9}#arena-test p{font-size:12px;line-height:1.6}#arena-test button{width:100%;border:1px solid #a68d61;background:#24333e;color:#ead7b5}
body:has(#arena-hud:not([hidden])) #enemy-status{top:155px}body:has(#arena-hud:not([hidden])) .location{display:none}
@media(max-width:900px){#arena-hud{top:140px;width:calc(100% - 24px);max-width:550px;padding:7px 9px}body:has(#arena-hud:not([hidden])) #enemy-status{top:208px}#kill-feed{font-size:10px;line-height:1.5;max-width:260px;bottom:240px}#arena-hud b{font-size:10px}#arena-clock{font-size:11px}#arena-hud>div{gap:4px}#arena-hud small{font-size:9px;margin-top:4px}.score-columns{gap:12px}.score-columns table{font-size:11px}.score-columns h3{font-size:12px}#score-dialog{padding:14px}}
@media(max-height:500px){#arena-hud{top:6px;width:49vw;left:58%;padding:5px}#arena-hud b{font-size:9px}#arena-clock{font-size:10px}#arena-hud small{font-size:8px}body:has(#arena-hud:not([hidden])) #enemy-status{top:65px}#kill-feed{bottom:12px;max-width:230px;font-size:9px}body:has(#arena-hud:not([hidden])) #game-rail{top:60px;gap:7px;max-height:calc(100dvh - 70px);overflow:auto;padding:5px}}

#arena-stats{display:block;font:11px/1.6 monospace;overflow-wrap:anywhere;margin-top:10px;color:#bbd1d7}

@media(max-width:900px) and (min-height:501px){#arena-hud{top:180px}body:has(#arena-hud:not([hidden])) #enemy-status{top:244px}}

@media(max-width:900px) and (min-height:501px){body:has(#arena-hud:not([hidden])) #game-rail{top:244px;gap:8px}body:has(#arena-hud:not([hidden])) #game-rail .rail-button,body:has(#arena-hud:not([hidden])) #game-rail #square-home{width:44px;height:44px;padding:7px}}

.combat-float.level-gain{color:#8dff9e;font:bold 25px/1.2 Georgia;text-shadow:0 0 10px #2b9f58,0 2px 3px #000;letter-spacing:1px}#afk-warning{position:absolute;z-index:25;left:50%;top:85px;transform:translateX(-50%);padding:9px 16px;border:1px solid #c9ab6e;border-radius:6px;background:#31251cf2;color:#ffe0ac;font:600 12px system-ui;text-align:center;pointer-events:none}#test-level-up{min-height:44px;margin-top:8px}@media(max-width:900px){#afk-warning{top:238px;width:85%;font-size:11px}}

/* Five touch-accessible special actions, independent of numbered skill slots. */
#combat-actions{gap:16px}.jump-medallion .action-key{width:38px;font-size:9px}.howl-medallion{color:#bbe6ef;border-color:#86b9ce}.special-time{position:absolute;left:0;right:0;bottom:6px;color:#e5fff3;font:bold 11px Georgia;text-shadow:0 1px 3px #000}.howl-medallion.skill-active{box-shadow:0 0 0 3px #102a2d,0 0 0 4px #8edfc9,inset 0 0 13px #78dfb65c}
#howl-notice{position:absolute;z-index:12;top:28%;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:12px 18px;border:1px solid #9cced3;border-radius:12px;background:#10262def;color:#d9fff5;text-align:center;font:700 14px Georgia,serif;pointer-events:none;box-shadow:0 5px 20px #0008}
@media(max-width:650px){#combat-actions{gap:12px}.combat-medallion{width:48px;height:48px;padding:6px}.combat-medallion .action-caption{font-size:9px}.combat-medallion .action-key{width:20px;height:20px;font-size:11px}.jump-medallion .action-key{width:34px;font-size:8px}#howl-notice{font-size:12px;top:32%}}

#howl-notice{display:flex;align-items:center;gap:16px;width:460px;max-width:calc(100% - 32px);padding:16px 20px;border:1px solid #8fbfc5;border-radius:3px;background:linear-gradient(110deg,#102c39f5,#0b1924f5 65%,#24404af5);box-shadow:0 0 0 3px #08131bd9,0 0 0 4px #a8c8c42e,0 10px 30px #0009,inset 0 1px #e0cf9d77;text-align:left;font-family:system-ui,Segoe UI,sans-serif}
#howl-notice:before,#howl-notice:after{content:'';position:absolute;left:22%;right:22%;height:2px;background:linear-gradient(90deg,transparent,#d8bd7f,transparent)}#howl-notice:before{top:-2px}#howl-notice:after{bottom:-2px}.howl-crest{width:52px;height:60px;flex:none}.howl-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.howl-kicker{font-size:9px;font-weight:600;letter-spacing:2px;color:#d5bd8b}.howl-copy strong{font:750 21px/1.3 system-ui;letter-spacing:1px;color:#f0fbff;text-shadow:0 2px 4px #0006}.howl-detail{font:500 11px/1.5 system-ui;color:#b4ced7}.howl-duration{margin-left:auto;padding-left:15px;border-left:1px solid #a4cbd344;display:flex;flex-direction:column;align-items:center;color:#dfc48f}.howl-duration b{font:700 28px/1.1 system-ui}.howl-duration span{font-size:8px;letter-spacing:1px;margin-top:4px}
@media(max-width:650px){#howl-notice{gap:10px;padding:12px;top:31%}.howl-crest{width:38px;height:48px}.howl-copy strong{font-size:17px}.howl-kicker{font-size:8px;letter-spacing:1px}.howl-detail{font-size:10px}.howl-duration{padding-left:10px}.howl-duration b{font-size:24px}}

/* Browser-drawn faction cursor stays visible without a per-frame JS follower. */
html,html body,html body *{cursor:var(--wolf-cursor,auto)!important}
#touch-cursor{position:fixed;inset:0;z-index:2147483647;pointer-events:none;overflow:hidden;margin:0;padding:0;border:0;background:none}#touch-cursor span{position:absolute;left:0;top:0;width:36px;height:42px;pointer-events:none}#touch-cursor svg{display:block;width:36px;height:42px}
#quick-settings{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:9;display:flex;align-items:center;gap:4px;padding:4px 6px;border:1px solid #a88d60;border-radius:10px 3px;background:linear-gradient(150deg,#34434ceF,#0b1822f5 65%);box-shadow:0 0 0 2px #0b141bd9,inset 0 0 0 2px #c2a66a18,0 4px 12px #0007}
#quick-settings button{position:relative;width:44px;height:44px;min-width:44px;min-height:44px;padding:11px;border:0;border-radius:6px;background:transparent;color:#e6ce9b;touch-action:manipulation}#quick-settings button+button{border-left:1px solid #c6a9752b}#quick-settings button:hover{background:#c4ad7620;color:#fff0cd}#quick-settings svg{display:block;width:22px;height:22px}#quick-settings #game-settings{padding:10px}#quick-settings #game-settings svg{width:24px;height:24px}
#world .location{margin-top:62px}#fullscreen-button .collapse-mark{display:none}.game-fullscreen #fullscreen-button .expand-mark{display:none}.game-fullscreen #fullscreen-button .collapse-mark{display:block}
.interface-motion:not(.game-fullscreen) #fullscreen-button svg{animation:fullscreen-invite 2.8s ease-in-out infinite}.page-hidden #fullscreen-button svg{animation-play-state:paused!important}@keyframes fullscreen-invite{0%,100%{transform:scale(.92)}50%{transform:scale(1.12)}}
@media(prefers-reduced-motion:reduce){#fullscreen-button svg{animation:none!important}}
@media(max-width:650px){#quick-settings{right:max(10px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));gap:1px;padding:3px}#quick-settings button{padding:12px}#quick-settings svg{width:20px;height:20px}#world .location{margin-top:60px}}

#orientation-gate{position:fixed;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));border:0;background:radial-gradient(ellipse at 50% 35%,#25414c,#0a141d 70%);color:#ebdfbd;text-align:center;z-index:2147483646}#orientation-gate[open]{display:grid;place-items:center}#orientation-gate::backdrop{background:#0a141d}.orientation-card{max-width:330px}.orientation-brand{font:700 28px Georgia;letter-spacing:8px}.orientation-card svg{display:block;width:110px;height:88px;margin:26px auto 18px;color:#a4cfdb}.orientation-card h1{font:700 23px/1.25 system-ui;margin:15px 0}.orientation-card p{font:14px/1.6 system-ui}.orientation-card button{min-height:48px;padding:10px 18px;border:1px solid #b9a272;border-radius:5px;background:linear-gradient(#526069,#192d39);color:#f3e8cd;font:700 12px system-ui;letter-spacing:1px}.orientation-card small{display:block;margin:18px 0;color:#99adb7;font:12px/1.5 system-ui}
@media(orientation:portrait) and (max-width:700px),(orientation:portrait) and (pointer:coarse){#orientation-gate:not([open]){display:grid;place-items:center}}
/* Compact landscape presentation; controls retain 44px touch targets. */
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){
 body{font-size:11px}header{height:48px;padding:5px max(16px,env(safe-area-inset-right)) 5px max(16px,env(safe-area-inset-left))}.brand{font-size:22px;letter-spacing:6px}.brand span{font-size:7px;letter-spacing:2px;margin-top:2px}.build{font-size:8px}#settings-button{min-height:44px;font-size:10px}
 #selection{max-width:1050px;padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));grid-template-columns:28% 72%;gap:0}.intro{padding-right:18px}.intro h1{font-size:26px;line-height:1.1;margin:12px 0}.intro p{font-size:11px}.eyebrow{font-size:8px}.nation-grid{gap:12px}.nation{height:180px}.nation-copy{padding:12px}.nation-copy strong{font-size:22px}.nation-copy small{font-size:8px}.nation-copy span{font-size:10px}.nation-copy b{font-size:9px}.nation-art{background-size:190% auto}.hub-picker{margin-top:16px;padding-top:10px}.hub-heading h2{font-size:20px;margin:3px 0}.hub-heading>span{font-size:9px}.hub-layout{grid-template-columns:48% 52%;gap:12px}#hub-list{gap:3px}#hub-list button{min-height:44px;padding:5px 9px;font-size:10px}.hub-preview{min-height:220px;max-height:260px}.hub-preview img{height:100%;object-fit:cover}.hub-preview figcaption{padding:12px}.hub-preview h3{font-size:19px}.hub-preview p{font-size:10px}.hub-invitation,.hub-disclaimer,.preview-note{font-size:9px}#enter{gap:12px;margin-top:10px}#enter input{min-height:44px;padding:8px;font-size:16px}#enter .primary{min-height:44px;padding:9px 18px;font-size:11px}
 #world .world-top{inset:6px max(8px,env(safe-area-inset-right)) auto max(8px,env(safe-area-inset-left))}#world .identity{width:158px;min-width:0;padding:5px 7px}#world .identity-head{gap:5px}#world #player-name{font-size:14px}#world #nation-name{font-size:7px}#world #level-button{font-size:9px;min-height:44px;padding:0 5px}.status-bar{height:12px;margin:2px 0}.status-bar b{font-size:8px;line-height:10px}#union-name{font-size:8px}#world .location{display:none}
 #quick-settings{top:max(5px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));padding:0 3px;gap:0}#quick-settings button{padding:13px}#quick-settings svg{width:18px;height:18px}#quick-settings #game-settings{padding:12px}#quick-settings #game-settings svg{width:20px;height:20px}
 #skill-bar{bottom:max(5px,env(safe-area-inset-bottom));padding:4px 6px;max-width:calc(100vw - 190px);width:auto}#skill-row{gap:5px}#skill-slots{display:flex;gap:3px}#utility-slots{padding:0 5px 0 0;gap:0}#skill-bar .skill-slot{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px}#skill-hint{font-size:8px;line-height:12px;margin-bottom:3px}#combat-actions{gap:7px;bottom:calc(100% + 14px)}.combat-medallion{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;box-shadow:0 0 0 2px #101820,0 0 0 3px #80623f}.combat-medallion .action-caption{font-size:7px;line-height:10px;bottom:-10px}.combat-medallion .action-key{width:17px;height:17px;font-size:9px;top:-3px;right:-3px}.jump-medallion .action-key{width:30px;font-size:7px}.special-time{font-size:9px;bottom:3px}
 #game-rail,body:has(#arena-hud:not([hidden])) #game-rail{right:max(8px,env(safe-area-inset-right));top:58px;gap:3px;max-height:calc(100dvh - 65px);overflow:auto;padding:3px}#game-rail .rail-button,#game-rail #square-home{width:44px;height:44px;min-height:44px;padding:12px;box-shadow:inset 0 0 0 2px #b5955c25,0 2px 5px #0007;border-radius:8px 3px}#game-rail #home{width:44px;height:44px}
 #world #enemy-status,body:has(#arena-hud:not([hidden])) #enemy-status{top:64px;width:160px;padding:3px 6px}#enemy-name{font-size:11px}#arena-hud{top:6px;left:50%;width:calc(100% - 330px);max-width:350px;padding:5px}#arena-hud b{font-size:8px}#arena-clock{font-size:9px}#arena-hud small{font-size:7px;margin-top:3px}#arena-hud>div{gap:3px}#kill-feed{bottom:8px;left:8px;font-size:8px;max-width:170px;line-height:1.35}#joystick{width:88px;height:88px;left:max(16px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom))}
 #howl-notice{top:30%;width:330px;padding:8px 12px;gap:9px}.howl-crest{width:32px;height:38px}.howl-copy strong{font-size:15px}.howl-kicker{font-size:7px}.howl-detail{font-size:9px}.howl-duration b{font-size:21px}.howl-duration span{font-size:7px}#performance{top:125px;font-size:8px}#test-drawer{top:55px;max-height:calc(100dvh - 65px);font-size:10px;width:270px;overflow:auto}
 dialog:not(#orientation-gate){max-height:calc(100dvh - 16px);padding:12px 18px;font-size:11px}dialog h2{font-size:20px}dialog button{min-height:44px}#settings-tabs button{padding:6px 10px;font-size:10px}.setting-row{padding:6px 0;font-size:11px}.setting-note{font-size:10px}#map-announcement h2{font-size:26px}
}

body:has(#orientation-gate[open]){overflow:hidden}
@media(orientation:landscape) and (max-width:650px) and (max-height:500px){#skill-slots{display:grid;grid-template-columns:repeat(4,44px);gap:3px}#skill-bar{max-width:calc(100vw - 150px)}#arena-hud{width:calc(100% - 350px)}#arena-hud b{font-size:7px}#arena-clock{font-size:8px}#arena-hud small{display:none}}

/* HUD fills must remain visible under the coarse-pointer identity rule. */
#world .identity .status-bar>span{display:block;max-width:none}
#world .status-bar.hp{background-color:#481521}#world .status-bar.exp{background-color:#122e50}#world .status-bar.online{background-color:#173c32}
#combat-actions{z-index:5;bottom:112px}body:has(#skill-bar[hidden]) #combat-actions{display:none}
@media(pointer:coarse){html,html body,html body *{cursor:none!important}#touch-cursor{display:none!important}}
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){
 #combat-actions{position:fixed;left:auto;right:max(67px,env(safe-area-inset-right));bottom:max(82px,env(safe-area-inset-bottom));transform:none;width:112px;display:grid;grid-template-columns:44px 44px;justify-content:center;gap:13px 7px;padding:10px 5px 18px;border:1px solid #ad9268aa;border-radius:48px 48px 25px 25px;background:radial-gradient(ellipse at top,#38505bc9,#0b1825df);box-shadow:inset 0 0 0 3px #c6aa6920,0 3px 10px #0006}
 #combat-actions #target-enemy{grid-column:1/-1;justify-self:center;padding:10px}#combat-actions .combat-medallion:not(#target-enemy){padding:12px;background-size:80%;box-shadow:inset 0 0 0 4px #0d1d29,0 0 0 1px #9d8059}.combat-medallion .action-key{display:none}
 #kill-feed{left:max(16px,env(safe-area-inset-left));bottom:calc(max(18px,env(safe-area-inset-bottom)) + 98px);max-width:190px;font-size:8px}
 #skill-bar{padding:2px 3px;border-radius:4px}#skill-row{gap:1px}#skill-slots{gap:0}#utility-slots{padding-right:1px}#skill-bar .skill-slot{padding:11px}#skill-hint{min-height:0;margin:0;font-size:7px;line-height:10px}
}

@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){#combat-actions{bottom:max(5px,env(safe-area-inset-bottom))}}

/* Target docks over slot eight without participating in skill-bar layout. */
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){
 #skill-bar>#target-enemy{position:absolute;right:3px;top:-34px;width:44px;height:44px;z-index:6;padding:10px}
 #skill-bar>#target-enemy .action-caption{display:block}
 #combat-actions{border-radius:25px;padding-top:12px}
 #combat-actions .action-caption{transform:translateX(-50%) scale(.8);transform-origin:center top}
}

#hub-list{max-height:450px;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#a38a5d #111e26}#hub-list .hub-option{flex-shrink:0;min-height:64px}.hub-preview{max-height:450px}
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){#hub-list{max-height:260px}#hub-list .hub-option{min-height:48px}.hub-option strong{font-size:11px}.hub-option small,.hub-option .hub-count{font-size:9px}.hub-option .hub-num{font-size:18px}}
/* Preserve the entire concept image, including its title plaque, at every size. */
.hub-layout{align-items:start}
.hub-preview{min-height:0;max-height:none;align-self:start}
.hub-preview img{position:static;display:block;width:100%;height:auto;aspect-ratio:1672 / 941;object-fit:contain;object-position:center;background:#101b23}
.hub-preview figcaption{position:static;padding:14px 20px;background:linear-gradient(110deg,#172a32,#0b171f);border-top:1px solid #8a795255}
.hub-preview h3{font-size:25px;margin:4px 0}
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){
 .hub-layout{grid-template-columns:minmax(0,48fr) minmax(0,52fr)}
 .hub-preview{min-height:0;max-height:none}
 .hub-preview img{height:auto;object-fit:contain}
 .hub-preview figcaption{padding:8px 10px}
 .hub-preview h3{font-size:17px}.hub-preview p{font-size:9px}
}

/* Three-point arena: compact, readable on both landscape touch and desktop. */
.team-points{display:block;text-align:center;color:#f5dfae;font-size:12px;letter-spacing:.06em;font-variant-numeric:tabular-nums}
#arena-hud .team-balance,.team-balance{display:block;height:7px;border:1px solid #b9a16c88;background:linear-gradient(to right,#63bbde 0 var(--gok,50%),#bd7951 var(--gok,50%) 100%);border-radius:4px;margin:5px 0;box-shadow:0 1px 7px #0008}
#arena-hud .objective-status{display:flex;gap:5px;justify-content:space-between;margin:5px 0;font-size:9px}.objective-status span{flex:1;padding:4px 3px;border:1px solid #a38c5666;background:#101e24;color:#dacdab;white-space:nowrap}.objective-status [data-owner="2"]{color:#9dddff;border-color:#63bbde}.objective-status [data-owner="1"]{color:#f0b48d;border-color:#bd7951}
#score-dialog .team-points{font-size:19px}#score-dialog .team-balance{height:10px}.score-rules{font-size:12px;color:#b9c8c7;line-height:1.6}#score-dialog td:last-child{font-weight:bold;color:#edcf89}#world:has(#arena-hud:not([hidden])) #enemy-status{top:132px}
@media(max-height:550px) and (orientation:landscape){#arena-hud .team-points{font-size:9px}#arena-hud .objective-status{gap:2px;font-size:8px;margin:2px 0;flex-wrap:wrap}.objective-status span{padding:2px}#arena-hud .team-balance{margin:3px 0;height:5px}#arena-note{display:none}#world:has(#arena-hud:not([hidden])) #enemy-status{top:104px}#score-dialog .score-rules{font-size:11px}#score-dialog{max-height:94dvh;overflow:auto}}

.score-columns th:nth-child(3),.score-columns td:nth-child(3){width:45px;text-align:right;white-space:nowrap}.score-columns th:last-child,.score-columns td:last-child{width:56px;white-space:nowrap;overflow-wrap:normal}

.score-rules summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#e3ca94}.score-rules summary::before{content:"＋";margin-right:8px}.score-rules[open] summary::before{content:"−"}@media(max-height:550px) and (orientation:landscape){#score-dialog h2{font-size:21px}#score-clock{margin:6px 0}#score-dialog .team-points{font-size:15px}.score-columns th,.score-columns td{padding:4px;line-height:18px}.score-columns h3{margin:8px 0}}

.combat-float.points-gain{color:#fff;text-shadow:0 2px 3px #000,0 0 5px #000;font-size:18px}#round-summary{padding:12px 16px;border:1px solid #b89b62;background:linear-gradient(110deg,#1d3841,#16252c);border-radius:8px;margin-top:14px}#round-summary p{margin:5px 0}#round-personal{display:block;color:#f0d399;font-size:20px}#round-summary small{font-size:11px}#death-smoke{will-change:opacity;contain:strict}#death-dialog{transition:none}#score-dialog::backdrop{backdrop-filter:none;background:#040a10aa}

#arena-market-view{min-height:44px}

/* Fixed six scratch marks; no filter, layout animation or input capture. */
#damage-claws{position:absolute;left:28%;top:20%;width:44%;height:58%;pointer-events:none}#damage-claws i{position:absolute;left:25%;top:0;width:2%;height:100%;background:linear-gradient(90deg,#520915,#ce3447 60%,#4b0613);clip-path:polygon(42% 0,100% 35%,45% 66%,12% 100%,26% 56%,0 23%)}#damage-claws i:nth-child(2){left:42%;top:5%;height:88%}#damage-claws i:nth-child(3){left:60%;top:10%;height:80%}#damage-claws i:nth-child(n+4){display:none}#damage-claws[data-heavy="true"] i:nth-child(n+4){display:block;transform:rotate(70deg);height:75%;top:10%}#damage-claws i:nth-child(4){left:32%}#damage-claws i:nth-child(5){left:48%}#damage-claws i:nth-child(6){left:64%}


/* Compact inventory: one cached portrait, four equipment slots, framed icons. */
dialog#inventory-dialog{box-sizing:border-box;position:fixed;inset:0 max(8px,env(safe-area-inset-right)) 0 auto;transform:none;margin:auto 0;width:min(402px,96vw);height:min(680px,calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-width:96vw;padding:12px 14px;border:1px solid #9d845a;border-radius:8px;background:radial-gradient(ellipse at 35% 18%,#293f48,#101c25 56%,#080f16);box-shadow:0 18px 50px #0009;color:#dbe5e7;overflow:visible}
dialog#inventory-dialog[open]{display:grid;grid-template-rows:48px minmax(0,1fr);gap:8px}dialog#inventory-dialog::backdrop{background:#03090c40;backdrop-filter:none}
dialog#inventory-dialog .inventory-header{display:flex;align-items:center;justify-content:space-between;padding:0 0 6px;border:0;border-bottom:1px solid #aa8f5555;background:none;box-shadow:none}.inventory-header small{font-size:8px;letter-spacing:2px;color:#b6a47c}dialog#inventory-dialog h2{font:24px Georgia;margin:2px 0;color:#efd7a8}#inventory-close{width:44px;height:44px;border:1px solid #ad946c66;border-radius:4px;background:#101d26;color:#e1c998;font-size:25px}
.inventory-scroll{min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#8c7958 #101e26}.inventory-loadout{display:grid;grid-template-columns:minmax(0,1fr) 50px;gap:10px;min-height:218px}.inventory-portrait{min-width:0;position:relative;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 85%,#91b8c219,transparent 65%)}.inventory-portrait canvas{display:block;height:218px;width:100%;object-fit:contain}.inventory-rotation{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between}.inventory-rotation button{width:44px;height:44px;border:1px solid #ad946c55;border-radius:50%;background:#101d26d9;color:#e1c998;font-size:25px;touch-action:manipulation}
#inventory-equipment{display:grid;grid-template-columns:50px;gap:5px;align-content:center}.inventory-slot{box-sizing:border-box;padding:0;min-width:44px;min-height:44px;height:50px;border:1px solid #65757666;background:linear-gradient(145deg,#26343f,#0a121b);color:#9fb0b9;position:relative;touch-action:manipulation;user-select:none;border-radius:5px}.inventory-slot svg{display:block;width:100%;height:100%;max-height:none}.inventory-slot.occupied{border-color:#9d8755}.inventory-slot:hover,.inventory-slot:focus-visible{outline:2px solid #d8c08a;outline-offset:1px}.inventory-slot .equipment-placeholder{height:34px;width:100%}.inventory-slot small{display:block;text-align:center;font:8px Arial;letter-spacing:.2px;line-height:10px;color:#c3b58f}.empty-slot-mark{font-size:18px;color:#63717b66}
.inventory-summary{display:flex;justify-content:space-between;padding:5px 0;border-bottom:1px solid #ad915333;font-size:9px;color:#b1bdc3}.inventory-summary strong{color:#dfb9a6}.inventory-bag-heading{display:flex;align-items:center;justify-content:space-between;color:#baa77e;font-size:10px}.inventory-bag-heading h3{font:15px Georgia;margin:9px 0 7px}#inventory-bag{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:4px}#inventory-bag .inventory-slot{height:48px}#inventory-bag .inventory-slot svg{max-width:58px;margin:auto}
.inventory-trash-row{display:flex;gap:6px;margin-top:8px}.inventory-trash-row button{flex:1;min-height:44px;border:1px solid #80715166;border-radius:4px;background:#172832;color:#cbbd9d;font-size:10px;padding:4px}.inventory-trash-row button:disabled{opacity:.4}.inventory-trash-row svg{vertical-align:middle}#inventory-trash{color:#dba797}.inventory-note{display:none}
#inventory-detail{box-sizing:border-box;position:fixed;z-index:20;width:min(258px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;padding:16px;border:1px solid #b99b64;border-radius:7px;background:linear-gradient(145deg,#20343f,#0c1721 65%);box-shadow:0 10px 28px #000b;color:#c3d0d7;font:11px/1.65 Arial;text-align:left;transform:none}#inventory-detail[hidden]{display:none}#inventory-detail small{display:block;font-size:8px;letter-spacing:1.6px;color:#998c70;padding-right:32px}#inventory-detail strong{display:block;font:19px Georgia;color:#f0d6a0;margin:6px 30px 12px 0}#inventory-detail ul{padding:10px 0 10px 14px;margin:0;border-top:1px solid #b3955933;border-bottom:1px solid #b3955933}#inventory-detail li{margin:4px 0}#inventory-detail li::marker{color:#76b9c3}#inventory-detail p{font-size:10px;color:#b6a585;margin:10px 0}#inventory-detail button{min-width:44px;min-height:44px;border:1px solid #a98e59;border-radius:4px;color:#ead3a3;background:#243843;touch-action:manipulation}#inventory-detail .item-tooltip-close{position:absolute;right:4px;top:4px;font-size:22px;border:0;background:transparent}#inventory-detail .item-tooltip-action{width:100%}
@media(max-height:650px) and (orientation:landscape){dialog#inventory-dialog{width:min(550px,94vw);height:min(354px,calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));padding:8px 10px}dialog#inventory-dialog[open]{grid-template-rows:44px minmax(0,1fr);gap:4px}dialog#inventory-dialog h2{font-size:20px}.inventory-header small{font-size:7px}.inventory-scroll{display:grid;grid-template-columns:minmax(150px,1fr) minmax(236px,1.15fr);grid-template-rows:22px minmax(176px,1fr) 44px;gap:5px 12px;align-content:start}.inventory-loadout{grid-column:1;grid-row:1/4;grid-template-columns:minmax(0,1fr) 44px;gap:3px;min-height:0}.inventory-portrait canvas{height:225px;max-height:100%}#inventory-equipment{grid-template-columns:44px;gap:5px}#inventory-equipment .inventory-slot{height:46px}.inventory-slot .equipment-placeholder{height:31px}.inventory-summary{display:none}.inventory-bag-heading{grid-column:2;grid-row:1}.inventory-bag-heading h3{margin:0}#inventory-bag{grid-column:2;grid-row:2;gap:3px;align-content:start;grid-template-columns:repeat(5,minmax(44px,1fr))}#inventory-bag .inventory-slot{height:44px}.inventory-trash-row{grid-column:2;grid-row:3;margin:0}#inventory-detail{font-size:10px;padding:12px;width:240px}#inventory-detail strong{font-size:17px;margin-bottom:7px}#inventory-detail ul{padding-top:6px;padding-bottom:6px}#inventory-detail li{margin:2px 0}}
#game-rail{max-height:70dvh;overflow-y:auto;scrollbar-width:thin}

body dialog#inventory-dialog header.inventory-header{height:44px;min-height:0;padding:0;background:none;box-shadow:none}

/* Shared HUD tooltip and dismissible combat notices. No blur or frame-loop layout. */
#skill-hint{visibility:hidden;pointer-events:none}
#hud-information{position:fixed;z-index:90;box-sizing:border-box;width:min(270px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:hidden;padding:15px 17px;border:1px solid #b99b64;border-radius:7px;background:linear-gradient(145deg,#20343f,#0c1721 65%);box-shadow:0 8px 24px #0009;color:#c3d0d7;font:11px/1.65 Arial;pointer-events:none}
#hud-information small{display:block;font-size:8px;letter-spacing:1.6px;color:#998c70}#hud-information strong{display:block;font:19px Georgia;color:#f0d6a0;margin:6px 0 10px}#hud-information ul{padding:9px 0 0 14px;margin:0;border-top:1px solid #b3955933}#hud-information li{margin:4px 0}#hud-information li::marker{color:#76b9c3}
body #toast,body:has(dialog[open]) #toast{position:fixed;bottom:auto;transform:none;z-index:100;min-height:44px;width:max-content;max-width:min(420px,calc(100vw - 24px));padding:11px 34px 11px 16px;border:1px solid #ae925e;border-radius:6px;background:linear-gradient(120deg,#253b44,#101d28);color:#ead9b4;box-shadow:0 5px 18px #0007;font:12px/1.5 Arial;cursor:pointer;touch-action:manipulation}#toast::after{content:'×';position:absolute;right:12px;top:10px;font-size:18px;color:#bda67e}
@media(orientation:landscape) and (max-height:500px){#hud-information{width:235px;padding:10px 13px;font-size:10px}#hud-information strong{font-size:16px;margin:4px 0 6px}#hud-information li{margin:2px 0}body #toast{font-size:10px;max-width:min(330px,calc(100vw - 24px))}}



/* Shared-world connection status: visible without opening developer tools. */



#invisible-skill{color:#bceaff;background:radial-gradient(circle at 35% 22%,#35647b,#102332 70%);border-color:#79aabd}#invisible-skill.skill-active{box-shadow:0 0 15px #92dbed88,inset 0 0 12px #b8efff44}#invisible-skill .action-caption{font-size:9px}#invisible-skill.cooling::after{border-color:#86bcce}

#online-bonus-info{display:block;width:100%;min-height:44px;padding:0;text-align:center;cursor:help;font:inherit;color:inherit}#online-bonus-info:focus-visible{outline:2px solid #bfe6ed;outline-offset:2px}#server-level-guide table{width:100%;border-collapse:collapse}#server-level-guide td{padding:7px;border-bottom:1px solid #bfa46b33}#server-level-guide td:last-child{text-align:right}
/* Compact identity crest: fixed portrait and flexible, clipped information column. */
#world .world-top .identity{display:grid;grid-template-columns:88px minmax(0,1fr);gap:10px;width:350px;max-width:calc(100vw - 28px);min-width:0;padding:8px 10px 8px 4px;overflow:hidden;border:1px solid #a78c58;border-left:3px solid #8ebdd4;border-radius:3px 14px 3px 14px;background:linear-gradient(115deg,#1d3545f2,#0b161ff5 55%,#101a21f2);box-shadow:inset 0 0 0 3px #081119,0 5px 20px #0005}
#world .world-top .identity[data-nation="1"]{border-left-color:#c59165;background:linear-gradient(115deg,#483326f2,#1b1717f5 55%,#101a21f2)}
#identity-portrait{align-self:center;display:block;width:88px;height:132px;object-fit:cover;object-position:center;filter:drop-shadow(0 2px 5px #0008);pointer-events:none}
.identity-details{min-width:0;overflow:hidden}
#world .identity .identity-head{display:flex;gap:4px;min-width:0;height:44px}
#world .identity .identity-head #player-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:600 15px/1.2 system-ui!important;letter-spacing:.15px;color:#edf5f8}
#world .identity #level-button{flex:0 0 44px;min-width:44px;min-height:44px;font:600 12px system-ui;letter-spacing:0;color:#e5c88b}
#world .identity #nation-name{display:none!important}
#world .identity .status-bar{min-width:0;max-width:100%;box-sizing:border-box;border-radius:3px}
#world .identity #online-bonus-info{min-height:44px}
#world .identity .status-bar b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;box-sizing:border-box}
#world .identity #union-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:10px/1.5 system-ui;letter-spacing:0;max-width:100%;color:#9eb1bd}

@media (pointer:coarse) and (orientation:landscape),(max-width:600px){
 #world .world-top .identity{grid-template-columns:60px minmax(0,1fr);width:260px;max-width:44vw;gap:5px;padding:2px 6px 3px 1px}
 #identity-portrait{width:60px;height:110px}
 #world .identity .identity-head #player-name{font-size:12px!important}
 #world .identity #union-name{font-size:8px}
 #world .identity #level-button{font-size:10px}
 #world .identity #online-bonus-info b{font-size:9px}
}

#world .identity #player-name{height:44px;min-height:44px;border:0;background:none;padding:0;text-align:left;box-shadow:none;border-radius:0}
#hud-information strong{overflow-wrap:anywhere;white-space:normal}

/* Online fill has the same visual height as EXP. Its accessible information
   target is the portrait frame, avoiding a tiny mobile-only button. */
#world .identity #online-status{height:19px;min-height:0;margin-top:4px}
#world .identity #online-bonus-info.identity-portrait-frame{position:relative;align-self:center;width:88px;height:124px;min-height:44px;padding:3px;margin:0;overflow:hidden;border:1px solid #bba36c;border-radius:14px 3px 14px 3px;background:radial-gradient(ellipse at 50% 35%,#35536a,#101c29 70%);box-shadow:inset 0 0 0 2px #0c151f,inset 0 0 0 3px #7594a340,0 3px 8px #0005;cursor:help}
#world .identity[data-nation="1"] #online-bonus-info.identity-portrait-frame{background:radial-gradient(ellipse at 50% 35%,#674735,#251c17 70%);border-color:#c79d73}
#world .identity #identity-portrait{display:block;width:100%;height:100%;object-fit:contain;filter:none}
.portrait-info{position:absolute;bottom:4px;right:5px;display:grid;place-items:center;width:16px;height:16px;border:1px solid #c1a979;border-radius:50%;background:#0c1827;color:#e7d2aa;font:italic 12px Georgia;pointer-events:none}
@media (pointer:coarse) and (orientation:landscape),(max-width:600px){
 #world .identity #online-bonus-info.identity-portrait-frame{width:60px;height:94px}
 #world .identity #online-status{height:12px;min-height:0;margin-top:3px}
 #world .identity #online-status b{font-size:8px;line-height:12px}
}
#battle-reward{position:fixed;z-index:1400;left:50%;top:22%;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));box-sizing:border-box;padding:24px;border:1px solid #b89a5a;border-radius:14px;background:linear-gradient(135deg,#152c32f5,#0b151df7 65%);box-shadow:0 16px 60px #0009,inset 0 0 0 5px #d5b7720b;text-align:center;color:#eee2c9;font-family:inherit}#battle-reward[hidden]{display:none}.reward-kicker{display:block;color:#c4a66b;font-size:10px;letter-spacing:2px;margin-bottom:12px}#battle-reward strong{display:block;font-size:24px;color:#f0d7a2}#battle-reward p{font-size:15px;line-height:1.6;margin:16px 0 8px}#battle-reward small{display:block;color:#aec7cf}#battle-reward button{margin-top:18px;min-height:44px;min-width:130px;border:1px solid #bca06a;border-radius:6px;background:#263a3d;color:#f5dfb7;font:inherit;cursor:pointer}#battle-reward button:focus-visible{outline:2px solid #e3d5ae;outline-offset:3px}@media(max-height:500px){#battle-reward{top:10%;padding:14px;width:min(380px,calc(100vw - 32px))}#battle-reward strong{font-size:20px}#battle-reward p{margin:8px 0}#battle-reward button{margin-top:10px}}

/* Shared cooldown presentation and compact gameplay HUD. */
#combat-actions .combat-medallion .skill-shade{border-radius:50%;pointer-events:none;z-index:1}
#combat-actions .combat-medallion .special-time,#combat-actions .combat-medallion .skill-seconds{inset:0;display:grid;place-items:center;font:700 18px system-ui;color:#fff;z-index:2;pointer-events:none;text-shadow:0 2px 4px #000}
#combat-actions .combat-medallion .action-caption,#combat-actions .combat-medallion .action-key{z-index:3}
#combat-actions .combat-medallion.cooling svg{opacity:.4}
#world #nameplates .world-name{font-size:calc(var(--name-base,16px) * var(--name-scale,.5));letter-spacing:calc(.7px * var(--name-scale,.5))}
@media(max-width:650px){#world #nameplates{--name-base:13px}}
body #toast[data-kind="skill"]{border:0;background:none;box-shadow:none;padding:0 5px;min-height:44px;display:flex;align-items:center;justify-content:center;text-align:center;color:#ffe2a6;font:600 12px/1.3 system-ui;text-shadow:0 1px 3px #000,0 0 5px #000;white-space:normal}
body #toast[data-kind="skill"]::after{display:none}
body #toast[hidden]{display:none}
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){
 #world .world-top .identity{width:174px;max-width:44vw;grid-template-columns:44px minmax(0,1fr);gap:3px;padding:1px 4px 2px 1px;border-radius:3px 9px}
 #world .identity #online-bonus-info.identity-portrait-frame{width:44px;height:64px;padding:2px;border-radius:9px 3px}
 #world .identity .identity-head{height:44px;gap:1px}
 #world .identity .identity-head #player-name{font-size:9px!important;letter-spacing:0}
 #world .identity #level-button{font-size:9px}
 #world .identity .status-bar,#world .identity #online-status{height:9px;margin:2px 0;min-height:0}
 #world .identity .status-bar b,#world .identity #online-status b{font-size:7px;line-height:8px}
 #world .identity #union-name{font-size:6px;line-height:1.2}
 body:has(#arena-hud:not([hidden])) #world #enemy-status,#world #enemy-status{width:107px;padding:2px 4px;border-radius:4px}
 #enemy-name{font-size:8px;margin-bottom:2px;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #enemy-status .status-bar{height:10px;margin:1px 0}#enemy-status .status-bar b{font-size:7px;line-height:8px}
 #arena-hud{width:min(234px,33vw);left:50%;padding:4px}#arena-hud b{font-size:7px}#arena-clock{font-size:8px}#arena-hud small{font-size:7px;margin-top:3px}#arena-hud>div{gap:3px}
 #arena-hud .team-points{font-size:9px}#arena-hud .objective-status{font-size:7px}
 #score-dialog{width:min(534px,calc(100vw - 20px));padding:10px;max-height:88dvh}
 #score-dialog h2{font-size:17px}#score-dialog small,#last-round{font-size:9px}#score-dialog .team-points{font-size:10px}
 #score-clock{font-size:10px;margin:3px 0}.score-columns{gap:10px}.score-columns h3{font-size:10px;padding-bottom:4px;margin:4px 0}.score-columns table{font-size:9px}.score-columns th,.score-columns td{padding:2px 3px;line-height:14px}
 #score-dialog .score-rules{font-size:10px}#round-summary{padding:6px 9px;margin-top:7px}#round-personal{font-size:13px}
 #death-dialog{width:210px;padding:10px 12px;border-radius:8px 3px}#death-dialog .death-sigil{font-size:18px;line-height:1}#death-dialog small{font-size:7px;letter-spacing:1px}#death-title{font-size:20px;margin:4px 0}#death-countdown{font-size:10px;line-height:1.3;margin:5px 0;min-height:13px}#death-revive{min-height:44px;padding:5px 14px;font-size:11px}
 #battle-reward{width:254px;padding:10px;top:10%;border-radius:9px}#battle-reward strong{font-size:14px}#battle-reward .reward-kicker{font-size:7px;letter-spacing:1px;margin-bottom:7px}#battle-reward p{font-size:10px;line-height:1.4;margin:6px 0}#battle-reward small{font-size:9px}#battle-reward button{min-height:44px;min-width:100px;font-size:10px;margin-top:7px}
 body #toast[data-kind="skill"]{font-size:9px}body #toast{padding:6px 25px 6px 9px;font-size:10px}
 #combat-actions .combat-medallion .special-time,#combat-actions .combat-medallion .skill-seconds{font-size:13px}
}

/* Preserve 44px controls on narrower landscape phones without HUD overlap. */
@media(orientation:landscape) and (max-width:740px){
 #combat-actions{right:max(8px,env(safe-area-inset-right))}
 #skill-bar{left:max(112px,calc(env(safe-area-inset-left) + 104px));transform:none}
 body:has(#arena-hud:not([hidden])) #game-rail{top:104px;right:max(8px,env(safe-area-inset-right));flex-direction:row;gap:3px;padding:3px;max-height:none;overflow:visible}
}
@media(orientation:landscape) and (max-width:620px){
 #skill-bar{left:50%;transform:translateX(-50%)}
 #combat-actions{bottom:calc(5px + env(safe-area-inset-bottom))}
 #joystick{bottom:calc(18px + env(safe-area-inset-bottom))}
 #kill-feed{bottom:calc(116px + env(safe-area-inset-bottom));max-width:165px}
 #game-rail,body:has(#arena-hud:not([hidden])) #game-rail{top:58px;max-width:100px;display:grid;grid-template-columns:44px 44px;gap:3px;padding:2px;max-height:140px;overflow:auto}
}

/* Desktop labels are 1.5x the compact baseline; preserve mobile sizing. */
#game-rail .rail-button{position:relative}
#game-rail .rail-key{position:absolute;bottom:2px;right:3px;font:700 10px system-ui;color:#ffe1a5;background:#0c1923;border:1px solid #8c7651;border-radius:3px;padding:0 3px;pointer-events:none}
.character-alert{position:absolute;top:-3px;right:-3px;width:20px;height:20px;display:grid;place-items:center;border-radius:50%;background:#9e2028;color:#fff2d9;border:1px solid #e8ba86;font:bold 14px system-ui;box-shadow:0 0 9px #c7494466;pointer-events:none}
.character-alert[hidden]{display:none}.interface-motion .character-alert{animation:character-alert-pulse 1.5s ease-in-out infinite}
@keyframes character-alert-pulse{50%{transform:scale(1.15);box-shadow:0 0 14px #d43c3c88}}
dialog#character-dialog{inset:0 auto 0 max(8px,env(safe-area-inset-left));margin:auto 0;width:min(510px,96vw);height:min(490px,96dvh);max-height:96dvh;padding:14px;box-sizing:border-box;overflow:hidden;border:1px solid #ac9160;border-radius:4px 16px;background:radial-gradient(ellipse at 20% 35%,#304955,#111e29 62%,#090f16);color:#dde5e5;box-shadow:0 16px 50px #0009}
dialog#character-dialog[open]{display:grid;grid-template-rows:48px minmax(0,1fr);gap:10px}
#character-dialog::backdrop{background:#03090c40;backdrop-filter:none}
.character-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #a28b5c66;padding-bottom:6px}
.character-header small{font:8px system-ui;letter-spacing:2px;color:#b7a47f}.character-header h2{font:25px Georgia;margin:2px 0;color:#efd7a8}
#character-close{width:44px;height:44px;background:#0c1a24;border:1px solid #ad946c66;border-radius:4px;color:#efd7a8;font-size:25px}
.character-content{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:12px;min-height:0}
.character-portrait{min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:radial-gradient(ellipse,#28465333,transparent 70%)}
#character-name{max-width:100%;font:600 14px Georgia;color:#b8dceb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#character-preview{width:100%;height:auto;max-height:280px;object-fit:contain}
.character-rotation{display:flex;gap:16px}.character-rotation button{width:44px;height:44px;color:#ddc393;background:#142630;border:1px solid #8d795566;border-radius:50%;font-size:23px}
.character-values{overflow:auto;min-width:0;scrollbar-width:thin;scrollbar-color:#9a8254 #0e1b24}
.character-values dl{margin:0}.character-stat{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;min-height:27px;border-bottom:1px solid #7d8c9222;gap:5px;font:12px system-ui}
.character-stat dt{color:#abbec6}.character-stat dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums;color:#f0e5ce}.character-stat.allocatable{min-height:44px}
.character-stat button{width:44px;height:44px;background:radial-gradient(circle,#354a38,#11251e);color:#d5edac;border:1px solid #c4aa7055;border-radius:6px;font:bold 20px system-ui}.character-stat button:disabled{opacity:.35;cursor:default}.character-stat button:hover:not(:disabled){border-color:#ddc38b}
.character-amount{display:flex;align-items:center;justify-content:space-between;gap:8px;font:11px system-ui;color:#cbbd99;margin-top:8px}.character-amount input{width:65px;min-height:44px;box-sizing:border-box;background:#0d1b24;border:1px solid #7a7156;border-radius:4px;color:#f0dfbb;padding:6px;font:16px system-ui}
#character-state{font:11px/1.4 system-ui;color:#c0d4dc;min-height:31px;margin:8px 0}.character-note{font:10px/1.4 system-ui;color:#8198a3;display:block}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse) and (orientation:landscape){
 dialog#character-dialog{width:min(470px,94vw);height:94dvh;padding:7px 10px}dialog#character-dialog[open]{grid-template-rows:44px minmax(0,1fr);gap:5px}.character-header h2{font-size:19px}.character-content{grid-template-columns:minmax(110px,.8fr) minmax(0,1.2fr);gap:10px}#character-preview{max-height:calc(94dvh - 118px);width:100%}#character-name{font-size:11px}.character-stat{font-size:10px;min-height:24px}.character-note,#character-state{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.interface-motion .character-alert{animation:none}}
@media(pointer:fine) and (min-width:1101px), (pointer:fine) and (min-height:501px) and (min-width:651px){#world #nameplates{--name-base:24px}}
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse){
 #world .identity #level-button{position:relative;isolation:isolate;background:none;border:0;box-shadow:none;padding:0 5px;min-width:44px;min-height:44px;color:#efd59c}
 #world .identity #level-button::before{content:"";position:absolute;inset:11px 2px;border:1px solid #99805b;border-radius:4px;background:linear-gradient(#28383c,#101a21);z-index:-1}
}
/* Connection recovery shares the respawn dialog scale, without blur or smoke. */
#connection-dialog{box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:24px;text-align:center;color:#e5d7be;background:radial-gradient(ellipse at 50% 0,#34434b,#101b27 65%);border:1px solid #b69a69;outline:3px solid #121a23;box-shadow:inset 0 0 0 5px #b699652b,0 16px 50px #0009;border-radius:15px 4px;overflow:auto}
#connection-dialog::backdrop{background:#070d164f;backdrop-filter:none}
.connection-crest{width:48px;height:48px;margin:0 auto 7px;color:#cfb17b}.connection-crest svg{width:100%;height:100%}
#connection-dialog small{font:9px system-ui;letter-spacing:2px;color:#bdaa88}
#connection-title{font:26px Georgia;margin:10px 0 8px;color:#f2dbb4}
#connection-seconds{font:600 36px/1.1 system-ui;font-variant-numeric:tabular-nums;color:#e6c589;min-height:40px}
#connection-countdown{font:13px/1.4 system-ui;min-height:19px;margin:6px 0 9px;color:#ede2ce}
#connection-progress{display:block;appearance:none;width:120px;height:3px;margin:0 auto 12px;border:0;border-radius:3px;overflow:hidden;background:#39424a;color:#bca06c}
#connection-progress::-webkit-progress-bar{background:#39424a}#connection-progress::-webkit-progress-value{background:#bca06c}#connection-progress::-moz-progress-bar{background:#bca06c}
#connection-help{font:11px/1.5 system-ui;color:#aabcc4;max-width:275px;margin:0 auto 14px}
#connection-leave{min-height:44px;padding:8px 20px;font:600 12px system-ui;border:1px solid #a38b61;border-radius:5px;color:#ead7b7;background:linear-gradient(#304047,#1b2933);cursor:pointer}
#connection-leave:focus-visible{outline:2px solid #e8c88e;outline-offset:3px}
@media(orientation:landscape) and (max-height:500px) and (max-width:1100px),(orientation:landscape) and (pointer:coarse),(max-width:500px){
 #connection-dialog{width:210px;padding:10px 12px;border-radius:8px 3px}
 .connection-crest{width:18px;height:18px;margin-bottom:2px}
 #connection-dialog small{font-size:7px;letter-spacing:1px}
 #connection-title{font-size:17px;margin:6px 0}
 #connection-seconds{display:none}
 #connection-countdown{font-size:10px;min-height:14px;margin:3px 0 6px}
 #connection-progress{width:85px;margin-bottom:7px}
 #connection-help{display:none}
 #connection-leave{font-size:10px;padding:5px 12px}
}
/* Character allocation and currencies share the established panel theme. */
.character-remaining{background:#c6a36b12;border-top:1px solid #ad92574d}.character-remaining dt,.character-remaining dd{color:#f3d69c;font-weight:700}
#character-battle{color:#9fd4f1}#character-wolf{color:#e39398}
.character-stat:has(#character-wolf){grid-template-columns:minmax(0,1fr) auto 52px;min-height:44px}
#character-dialog #wolf-purchase-open{width:52px;height:44px;font:11px system-ui;background:none;border:0;color:#e39398;padding:0}
#character-dialog #wolf-purchase-open:hover{text-decoration:underline}
#character-reset-open{display:block;min-height:44px;width:100%;padding:7px 9px;color:#e8c48b;font:11px system-ui;background:linear-gradient(#2c343b,#18232b);border:1px solid #aa8b585e;border-radius:5px}
#character-dialog [data-stat]{touch-action:none;user-select:none;-webkit-user-select:none}
#character-dialog [data-stat][aria-disabled="true"]{opacity:.55}
#game-rail #character-button{padding:5px}#game-rail #character-button svg{width:100%;height:100%;display:block}
.character-subdialog{box-sizing:border-box;width:min(390px,calc(100vw - 28px));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;padding:22px;border:1px solid #ae9368;border-radius:12px 4px;background:linear-gradient(145deg,#283b43,#101b26);color:#e8d7b5;box-shadow:inset 0 0 0 4px #ac8f5322,0 14px 45px #0008;text-align:center}
.character-subdialog::backdrop{background:#050b1460;backdrop-filter:none}.character-subdialog h2{font:24px Georgia;margin:7px 0 15px}.character-subdialog small{font:9px system-ui;letter-spacing:2px;color:#b6a078}.character-subdialog p{font:12px/1.6 system-ui;color:#c4d1d6}
.character-subdialog button{min-height:44px;padding:8px 15px;background:linear-gradient(#334650,#182a36);color:#ead4ad;border:1px solid #b295615e;border-radius:5px;font:12px system-ui}
.reset-header{display:flex;align-items:center;gap:8px;justify-content:space-between}.reset-header h2{margin:0;text-align:left;font-size:22px}#character-reset-close{width:44px;height:44px;padding:0;font-size:24px;flex-shrink:0}
.reset-options{display:grid;gap:10px}#reset-with-battle{color:#a7d9f4;border-color:#7fa9c255}#reset-with-wolf{color:#f0a6ac;border-color:#bd798255}
#character-reset-state{min-height:38px;margin-bottom:0}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse) and (orientation:landscape){.character-subdialog{width:min(320px,92vw);padding:12px}.character-subdialog h2{font-size:19px;margin:4px 0 9px}.character-subdialog p{font-size:10px;margin:8px 0}.reset-options{gap:6px}.character-subdialog button{font-size:11px}#character-reset-open{font-size:10px}}
.character-remaining-block{margin:10px 0 0!important}.character-remaining-block .character-stat{grid-template-columns:minmax(0,1fr) auto;padding:5px 7px}
#character-dialog .character-spent{color:#8ed5a2;font-weight:600;white-space:nowrap;margin-right:3px;font-variant-numeric:tabular-nums}
#character-dialog .allocatable dt{display:flex;align-items:center;flex-wrap:wrap;gap:1px}

/* Polish v5: one compact menu frame; never a scrollable icon rail. */
#world #game-rail{top:22%;right:max(9px,env(safe-area-inset-right));display:grid;grid-template-columns:49px;gap:6px;padding:8px;max-height:none;overflow:visible;border:1px solid #a68b5d;border-radius:12px 4px;background:linear-gradient(145deg,#273b43ed,#091720f2);box-shadow:inset 0 0 0 3px #09141d,0 6px 18px #0008}
#world #game-rail .rail-button,#world #game-rail #square-home{width:49px;height:52px;min-height:44px;padding:6px;border:0;border-radius:7px;background:radial-gradient(ellipse at 40% 25%,#4c5f65,#152730 72%);box-shadow:inset 0 0 0 1px #b59b6244}
#world #game-rail button:before{display:none}#world #game-rail .score-key{right:0;bottom:0;font-size:10px;line-height:16px;min-width:16px}
@media(max-height:650px){#world #game-rail{top:18%;grid-template-columns:repeat(2,44px);gap:4px;padding:6px}#world #game-rail .rail-button,#world #game-rail #square-home{width:44px;height:44px;padding:5px}}
.inventory-portrait canvas{width:100%;height:auto;max-height:280px;object-fit:contain}.character-portrait canvas{width:100%;height:auto;max-height:300px;object-fit:contain}
dialog#character-dialog{width:min(580px,96vw)}.character-content{grid-template-columns:minmax(220px,1.15fr) minmax(220px,1fr)}.character-record{border:1px solid #a68b5d77;border-radius:6px;padding:8px;background:#142630;display:grid;gap:7px;font-size:11px}.character-record>div{display:flex;justify-content:space-between;gap:8px}.character-record strong{color:#d9c394;font-variant-numeric:tabular-nums}
#character-reset-open{transition:background .15s,border-color .15s;animation:none}#character-reset-open[aria-disabled="true"]{cursor:default}
#inventory-bag .inventory-slot{touch-action:none}.inventory-slot.dragging{opacity:.4}.inventory-slot.drop-target,#inventory-trash.drop-target{outline:2px solid #8ed5a2;outline-offset:1px}
.inventory-subdialog{width:min(430px,94vw);max-height:85dvh;overflow:auto;padding:22px;border:1px solid #ae915d;border-radius:10px;background:linear-gradient(145deg,#20343f,#0b1822);color:#d7c9ad;box-shadow:0 15px 50px #000b}.inventory-subdialog h2{font:20px Georgia;margin:0 35px 16px 0}.inventory-subdialog p{font:12px/1.6 Arial}.inventory-subdialog button{min-width:44px;min-height:44px;margin:4px;border:1px solid #ad915c;background:#243b45;color:#ead3a3;border-radius:5px}.inventory-subdialog .subdialog-close{position:absolute;right:5px;top:5px;font-size:22px;border:0}.trash-entry{display:grid;grid-template-columns:44px minmax(0,1fr) 80px;gap:8px;align-items:center;border-top:1px solid #a68b5d44;padding:6px 0;font-size:11px}.trash-entry svg{width:44px;height:44px}.inventory-trash-row button{font-size:10px}
@media(orientation:landscape) and (max-height:500px){dialog#character-dialog{width:min(580px,94vw)}.character-content{grid-template-columns:minmax(180px,1fr) minmax(200px,1fr);gap:10px}.character-portrait canvas{height:160px;max-height:160px}.character-record{padding:5px;gap:4px;font-size:9px}.inventory-portrait canvas{height:220px;max-height:100%}.inventory-subdialog{padding:14px;max-height:92dvh}}
/* Keep the menu clear of the four combat controls on short landscape screens. */
@media(orientation:landscape) and (max-height:500px){#world #game-rail{top:calc(56px + env(safe-area-inset-top));grid-template-columns:repeat(3,44px);gap:3px;padding:5px}}
#world #game-rail{width:max-content;max-width:calc(100vw - 18px)}
@media(orientation:landscape) and (max-height:350px){#world #game-rail{grid-template-columns:repeat(4,44px)}}

/* Inventory height polish: fit content before hiding the decorative scrollbar. */
#inventory-dialog .inventory-scroll{scrollbar-width:none}
#inventory-dialog .inventory-scroll::-webkit-scrollbar{display:none}
@media(orientation:landscape) and (max-height:350px){
 dialog#inventory-dialog{height:calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:5px 8px}
 dialog#inventory-dialog[open]{gap:2px}
 #inventory-dialog .inventory-scroll{grid-template-rows:18px minmax(185px,1fr) 44px;row-gap:3px}
}

/* One touch-accessible menu column. Short screens may scroll the column. */
@media(orientation:landscape) and (max-height:500px),(orientation:landscape) and (pointer:coarse){
 #world #game-rail{top:calc(56px + env(safe-area-inset-top));right:max(6px,env(safe-area-inset-right));grid-template-columns:44px;gap:2px;padding:4px;max-height:calc(100dvh - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain}
 #world #game-rail .rail-button,#world #game-rail #square-home{width:44px;height:44px;min-height:44px;padding:7px}
 #world #combat-actions{right:calc(64px + env(safe-area-inset-right))}
}

@media(orientation:landscape) and (max-width:620px){#world #skill-bar{left:calc(50% - 18px)}}
/* Input v2: smaller button faces retain 44px touch targets. */
#character-dialog [data-stat]{display:grid;place-items:center;padding:0;background:none;border:0;box-shadow:none;opacity:1;transition:none}
#character-dialog [data-stat] .point-face{display:grid;place-items:center;width:29px;height:29px;border:1px solid #c4aa7055;border-radius:4px;background:radial-gradient(circle,#354a38,#11251e);color:#d5edac;font:700 14px system-ui;box-sizing:border-box;transition:background .08s,border-color .08s}
#character-dialog [data-stat]:disabled .point-face{opacity:.35}
#character-dialog [data-stat].point-pending .point-face,#character-dialog [data-stat].point-held .point-face{background:#516b42;border-color:#e6d39f;box-shadow:inset 0 2px 4px #07150c88}
#character-dialog [data-stat].point-held .point-face{transform:translateY(1px);transition:none}
@media(orientation:landscape) and (pointer:coarse){
 #world #game-rail .score-key,#world #health-potion .skill-badge{display:none}
 #world #invisible-skill .action-caption{padding:1px 3px;letter-spacing:.2px;font-size:8px;max-width:56px;box-sizing:border-box}
 #world #skill-bar>#target-enemy{width:66px;height:66px;top:-56px;right:-8px;padding:13px}
 dialog#character-dialog{width:min(760px,96vw);height:calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:5px 8px}
 #character-dialog[open]{grid-template-rows:44px minmax(0,1fr);gap:3px}
 #character-dialog .character-content{grid-template-columns:minmax(105px,.7fr) minmax(340px,2fr);gap:8px}
 #character-dialog .character-values{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);grid-template-rows:22px repeat(3,44px) minmax(18px,auto) 44px;gap:2px 8px;align-content:center;scrollbar-width:none}
 #character-dialog .character-values>dl:first-child{display:contents}
 #character-dialog .character-stat{min-height:0;font-size:10px;grid-template-columns:minmax(0,1fr) auto;gap:3px}
 #character-dialog .character-stat.allocatable{grid-column:1;grid-template-columns:minmax(0,1fr) auto 44px}
 #character-dialog .character-stat:nth-child(1){grid-column:1;grid-row:1}
 #character-dialog .character-stat:nth-child(2){grid-column:2;grid-row:1}
 #character-dialog .character-stat:nth-child(3){grid-row:2}
 #character-dialog .character-stat:nth-child(4){grid-row:3}
 #character-dialog .character-stat:nth-child(5){grid-row:4}
 #character-dialog .character-stat:nth-child(6){grid-column:2;grid-row:2}
 #character-dialog .character-stat:nth-child(7){grid-column:2;grid-row:3;grid-template-columns:minmax(0,1fr) auto 47px}
 #character-dialog .character-remaining-block{grid-column:2;grid-row:4;margin:0!important;align-self:stretch;display:grid}
 #character-dialog .character-remaining{padding:3px}
 #character-dialog #character-state{grid-column:1/-1;grid-row:5;min-height:0;margin:0;font-size:9px;line-height:16px}
 #character-dialog #character-reset-open{grid-column:1/-1;grid-row:6}
 #character-dialog .character-portrait{justify-content:center;gap:4px}
 #character-dialog #character-name{width:100%;text-align:center;margin:0;font-size:11px}
 #character-dialog #character-preview{height:auto;width:100%;max-height:165px;flex:0 1 auto}
 #character-dialog .character-record{align-self:stretch;font-size:9px;padding:4px}
 #character-dialog .currency-icon{width:16px;height:16px}
}
/* Single-action help has a compact face and an independent 44px touch target. */
#one-tap-info{position:absolute;z-index:7;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;background:none;display:flex;align-items:flex-end;justify-content:center;touch-action:manipulation;color:#c9f5c6;cursor:help}
#one-tap-info span{display:block;padding:3px 4px;margin-bottom:3px;white-space:nowrap;border:1px solid #80b881;border-radius:4px;background:linear-gradient(#2c4939,#10241c);box-shadow:0 2px 5px #0008;font:700 8px/12px system-ui;letter-spacing:.3px}
#one-tap-info:focus-visible{outline:1px solid #c5e7b2;border-radius:5px}
#one-tap-info:hover span{border-color:#d1efb2;color:#f1ffe6}
@media(orientation:landscape) and (pointer:coarse){body #toast[data-kind="skill"]{align-items:flex-end;padding-bottom:3px;box-sizing:border-box}}
/* Input v4: fit the panel to its content without shrinking text or controls. */
@media(orientation:landscape) and (pointer:coarse){
 dialog#character-dialog{width:min(620px,96vw);height:auto}
 #character-dialog[open]{grid-template-rows:44px auto}
 #character-dialog .character-content{grid-template-columns:clamp(105px,calc((min(760px,96vw) - 26px)*.259259),192px) minmax(0,1fr)}
 #character-dialog .character-values{align-content:start}
}
#character-dialog [data-stat],#character-dialog [data-stat] *{-webkit-touch-callout:none;touch-action:none}
/* One small composited opacity layer, behind the existing battle-camp artwork. */
#world #camps-button{position:relative;isolation:isolate}
#camps-button .camp-call-glow{display:none;position:absolute;inset:3px;border-radius:6px;background:radial-gradient(ellipse,#ff3a35 0%,#c3212988 48%,#7d122400 76%);pointer-events:none;opacity:.18;z-index:0}
#camps-button>svg{position:relative;z-index:1}
.interface-motion #camps-button .camp-call-glow{display:block;animation:camp-call 2.4s ease-in-out infinite}
.page-hidden #camps-button .camp-call-glow{animation-play-state:paused!important}
@keyframes camp-call{0%,100%{opacity:.12}50%{opacity:.8}}
@media(prefers-reduced-motion:reduce){#camps-button .camp-call-glow{animation:none!important;opacity:.18}}
@media(orientation:landscape) and (pointer:coarse){dialog#character-dialog{top:50%;bottom:auto;transform:translateY(-50%);margin-top:0;margin-bottom:0}}
/* Smaller mobile menu artwork; retain separate 44px touch targets. */
@media(orientation:landscape) and (pointer:coarse){
 #world #game-rail{gap:0;padding:2px;overflow:visible;max-height:none;grid-template-columns:44px}
 #world #game-rail .rail-button,#world #game-rail #square-home{padding:10px;background-size:35px 35px;background-repeat:no-repeat;background-position:center;box-shadow:none}
 #world #game-rail .camp-call-glow{inset:7px}
 #world #game-rail:has(#score-button:not([hidden])){grid-template-columns:repeat(2,44px)}
 #world:has(#score-button:not([hidden])) #combat-actions{right:calc(100px + env(safe-area-inset-right))}
 #world:has(#score-button:not([hidden])) #skill-bar{left:calc(50% - 34px)}
}
@media(orientation:landscape) and (pointer:coarse) and (max-height:370px){
 #world #game-rail{grid-template-columns:repeat(2,44px)}
 #world #combat-actions{right:calc(100px + env(safe-area-inset-right))}
 #world #skill-bar{left:calc(50% - 34px)}
}
@media(orientation:landscape) and (pointer:coarse) and (max-width:620px){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{left:calc(50% - 50px)}
}
@media(orientation:landscape) and (pointer:coarse){
 #world #game-rail:has(#score-button:not([hidden])){grid-auto-flow:column;grid-template-rows:repeat(4,44px)}
}
@media(orientation:landscape) and (pointer:coarse) and (max-height:370px){
 #world #game-rail{grid-auto-flow:column;grid-template-rows:repeat(4,44px)}
}

/* Combat v2: one bar, ten stable input targets, no duplicate special-action tray. */
#world #combat-actions{display:none!important}
#world #skill-bar{left:50%;transform:translateX(-50%);bottom:max(12px,env(safe-area-inset-bottom));padding:38px 10px 10px;max-width:calc(100% - 24px);border:1px solid #c6ac70;border-radius:12px;background:linear-gradient(135deg,#102b38f5,#07121ef5);box-shadow:0 6px 28px #0009,inset 0 0 0 3px #152d37}
#world #skill-row{display:block}#world #utility-slots{display:none}
#world #skill-slots{display:grid;grid-template-columns:repeat(10,54px);gap:6px}
#world #skill-hint{position:absolute;top:8px;left:10px;right:10px;margin:0;font:10px system-ui;letter-spacing:1px;opacity:.7}
#world #skill-bar .skill-slot{position:relative;width:54px;height:54px;min-width:44px;min-height:44px;box-sizing:border-box;padding:7px;border-radius:5px;overflow:hidden;box-shadow:inset 0 0 12px #0005;touch-action:manipulation}
#world #skill-bar .skill-slot .action-caption,#world #skill-bar .skill-slot .action-key{display:none}
#world #skill-bar .skill-slot .special-time{position:absolute;inset:0;display:grid;place-items:center;font:bold 17px system-ui;z-index:3}
#world #skill-bar .right-selected{border:2px solid #67ee96;box-shadow:inset 0 0 12px #42db7940,0 0 7px #4adc7650}
#world #skill-bar .skill-slot:active{transform:translateY(1px);filter:brightness(1.35)}
#world #skill-bar>#target-enemy{position:absolute;right:-78px;top:20px;width:66px;height:66px;padding:11px}
#world #skill-bar>#target-enemy[hidden]{display:none!important}
#world #skill-bar>#target-enemy .action-caption{display:block}#world #skill-bar>#target-enemy .action-key{display:none}
#world #skill-bar .skill-slot:before{display:block;content:attr(data-shortcut);position:absolute;top:2px;left:3px;font:bold 9px system-ui;color:#fff1c8;z-index:4}
#world #health-potion .skill-badge{display:none}
@media (orientation:landscape) and (max-height:500px), (pointer:coarse){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{left:calc(50% - 20px);bottom:max(5px,env(safe-area-inset-bottom));padding:32px 6px 6px;max-width:none}
 #world #skill-slots{grid-template-columns:repeat(10,44px);gap:2px}
 #world #skill-bar .skill-slot{width:44px;height:44px;padding:5px}
 #world #skill-bar .skill-slot:before{font-size:8px}#world #skill-hint{font-size:8px;letter-spacing:0;top:5px}
 #world #skill-bar>#target-enemy{top:12px;right:-76px}
}
@media (orientation:landscape) and (max-width:720px){
 #world #skill-slots{grid-template-columns:repeat(5,44px);gap:3px}
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{left:calc(50% - 16px)}
 #world #skill-bar>#target-enemy{top:28px}
}

#world:has(#toast:not([hidden])[data-kind="skill"]) #skill-hint{visibility:hidden}

#world #skill-bar .skill-slot:before{display:none}#world #skill-bar .combat-shortcut{position:absolute;top:2px;left:3px;font:bold 9px system-ui;color:#fff1c8;z-index:6;pointer-events:none}#world #skill-bar .skill-shade{border-radius:4px;pointer-events:none;z-index:2}#world #skill-bar .special-time{pointer-events:none}
/* Combat v3: captions belong to each square input, on desktop and touch. */
#world #skill-bar{padding-bottom:29px}
#world #skill-bar .skill-slot{overflow:visible}
#world #skill-bar .skill-slot .combat-name{display:grid;place-items:center;position:absolute;top:calc(100% + 3px);left:-1px;right:-1px;height:16px;border:1px solid #83734f;border-radius:2px;background:#10212bf5;color:#ead9af;font:600 8px system-ui;letter-spacing:.3px;white-space:nowrap;pointer-events:none;box-sizing:border-box}
#world #skill-bar .skill-slot svg{width:100%;height:100%;border-radius:3px}
#world #skill-bar>#target-enemy{border-radius:6px;background:linear-gradient(145deg,#5d2635,#142834);border:1px solid #c09263;box-shadow:inset 0 0 0 3px #172a32,0 3px 14px #0008}
#world #skill-bar>#target-enemy .action-caption{top:calc(100% + 3px);bottom:auto;left:-7px;right:-7px;width:auto;font:600 9px system-ui;white-space:nowrap;transform:none}
@media (orientation:landscape) and (max-height:500px), (pointer:coarse){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{padding-bottom:24px}
 #world #skill-bar .skill-slot .combat-name{font-size:7px;letter-spacing:0;height:15px}
 #world #skill-bar>#target-enemy{width:60px;height:60px;right:-69px;top:15px}
 #world #skill-bar>#target-enemy .action-caption{font-size:8px;left:-6px;right:-6px}
}
@media (orientation:landscape) and (max-width:720px){#world #skill-slots{row-gap:22px}#world #skill-bar>#target-enemy{top:41px}}

/* Combat v4: touch captions and desktop target visibility. */
#world #skill-bar .skill-slot .combat-name{display:grid!important;visibility:visible;opacity:1;z-index:7;border:1px solid #b39a65;background:linear-gradient(#20323c,#0a151e);box-shadow:inset 0 0 0 1px #ffffff0c,0 2px 3px #0008;color:#fff0ce;text-shadow:0 1px 2px #000;height:18px;font-size:9px}
#world #skill-bar #health-potion .combat-name{display:grid!important}
#world #skill-bar>#target-enemy[hidden]{display:none!important}
@media (orientation:landscape) and (max-height:500px),(pointer:coarse){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{padding-bottom:28px}
 #world #skill-bar .skill-slot .combat-name{height:18px;font-size:8px;left:-1px;right:-1px;line-height:16px}
 #world #skill-bar>#target-enemy .action-caption{left:-12px;right:-12px;font-size:8px;letter-spacing:0;line-height:14px;text-align:center}
}
@media (orientation:landscape) and (max-width:720px){#world #skill-slots{row-gap:25px}}

/* Skill UI v1: independent label cells; no caption shares cooldown clipping. */
#world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{padding-top:50px;padding-bottom:9px}
#world #skill-slots{align-items:start;row-gap:7px}
#world #skill-slots .combat-cell{display:grid;grid-template-rows:auto 18px;gap:3px;min-width:0}
#world #skill-slots .combat-cell>.combat-name{position:static;display:grid;place-items:center;height:18px;width:100%;box-sizing:border-box;border:1px solid #aa9367;border-radius:2px;background:linear-gradient(#233741,#0a171e);color:#fff0ce;font:600 8px/1 system-ui;letter-spacing:0;white-space:nowrap;text-shadow:0 1px 2px #000;pointer-events:none}
#world #skill-hint{right:91px;top:15px}
#world #edit-skill-layout{position:absolute;right:6px;top:3px;width:78px;min-width:44px;height:44px;min-height:44px;padding:0;border:1px solid #a58a53;border-radius:4px;background:linear-gradient(145deg,#263f49,#10222b);color:#ead6a7;font:700 10px system-ui;letter-spacing:.5px;touch-action:manipulation}
#world #edit-skill-layout:hover{border-color:#e9c77a}#world #edit-skill-layout:active{background:#375465}
#skill-layout-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:20px;border:1px solid #b59861;border-radius:8px;color:#eedebc;background:linear-gradient(145deg,#182e39,#091820);box-shadow:inset 0 0 0 4px #bda26912,0 18px 70px #000b;overflow:auto;font-family:system-ui}
#skill-layout-dialog::backdrop{background:#030b13bd}
#skill-layout-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}
#skill-layout-dialog header small{color:#c6aa73;font-size:10px;letter-spacing:2px}
#skill-layout-dialog h2{font-size:22px;line-height:1.2;margin:5px 0}
#skill-layout-dialog p{font-size:12px;line-height:1.5;color:#b9cbd0;margin:12px 0}
#skill-layout-dialog button{box-sizing:border-box;min-width:44px;min-height:44px;border:1px solid #718b96;border-radius:4px;background:#172c36;color:#f4e6c5;touch-action:manipulation;font:600 12px system-ui;cursor:pointer}
#skill-layout-dialog button:disabled{opacity:.45;cursor:wait}
#skill-layout-dialog button:focus-visible{outline:2px solid #f1ca79;outline-offset:2px}
#skill-layout-dialog .layout-slots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
#skill-layout-dialog .layout-slots button{position:relative;display:flex;flex-direction:column;align-items:center;padding:8px 3px 6px;gap:5px;background:linear-gradient(150deg,#25414e,#10212a)}
#skill-layout-dialog .layout-slots svg{width:40px;height:40px;color:#d1e7e9;fill:none;stroke:currentColor;stroke-width:1.7}
#skill-layout-dialog .layout-slots strong{font-size:10px;white-space:nowrap}
#skill-layout-dialog .layout-slots small{position:absolute;top:3px;right:4px;color:#d9b97e;font-size:9px}
#skill-layout-dialog .layout-slots [aria-pressed=true]{border-color:#f4c675;background:#36505a;box-shadow:inset 0 0 0 1px #f4c675}
#skill-layout-dialog .layout-status{min-height:18px;color:#e1c58d}
#skill-layout-dialog footer{display:flex;justify-content:space-between;gap:12px}
#skill-layout-dialog footer button{padding:7px 18px}#skill-layout-dialog [data-save]{border-color:#c8a968;background:linear-gradient(#625333,#342c20)}
.lock-bubble{width:34px;height:38px;padding:0!important;border:0;border-radius:0;background:none!important;box-shadow:none;filter:drop-shadow(0 1px 3px #000);color:#e2b7fa}
.lock-bubble svg{width:100%;height:100%;fill:#352146;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.lock-bubble .status-ring{fill:#21152ee8;stroke-opacity:.65;stroke-width:1}
.lock-bubble .status-lock rect{fill:#765184}.lock-bubble .status-lock path:last-child{stroke:#ffe7b5;stroke-width:2.5}
.lock-bubble .status-shield{display:none}.lock-bubble.protected{color:#b8e7f2}.lock-bubble.protected .status-ring{fill:#142d3be8}.lock-bubble.protected .status-lock{display:none}.lock-bubble.protected .status-shield{display:block;fill:#2a6074}.lock-bubble.protected .status-shield path:last-child{fill:none;stroke:#edf9dc;stroke-width:2.4}
.interface-motion .lock-bubble svg{animation:status-emblem-glow 2.8s ease-in-out infinite}
@keyframes status-emblem-glow{0%,100%{opacity:.8}50%{opacity:1;filter:drop-shadow(0 0 3px currentColor)}}
.reduced-motion .lock-bubble svg{animation:none}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{padding-top:48px;padding-bottom:7px}
 #world #skill-slots .combat-cell>.combat-name{font-size:7px}
 #world #skill-hint{top:15px;font-size:8px}
 #skill-layout-dialog{width:min(570px,calc(100vw - 20px));padding:10px 14px}
 #skill-layout-dialog h2{font-size:17px}#skill-layout-dialog header small{font-size:9px}
 #skill-layout-dialog p{font-size:11px;margin:6px 0}
 #skill-layout-dialog .layout-slots{gap:5px}#skill-layout-dialog .layout-slots button{padding:4px 2px;gap:2px}
 #skill-layout-dialog .layout-slots svg{width:30px;height:30px}#skill-layout-dialog .layout-slots strong{font-size:9px}
 #skill-layout-dialog .layout-status{margin:5px 0}
 .lock-bubble{width:28px;height:32px}
}
@media(prefers-reduced-motion:reduce){.lock-bubble svg{animation:none!important}}

#skill-layout-dialog header{height:auto;min-height:44px;padding:0 0 8px;background:none}
#skill-layout-dialog::backdrop{backdrop-filter:none}
@media(orientation:landscape) and (max-height:340px){
 #skill-layout-dialog{padding:7px 12px}
 #skill-layout-dialog header{padding-bottom:3px}
 #skill-layout-dialog header small{display:none}
 #skill-layout-dialog p{margin:4px 0;line-height:1.35}
 #skill-layout-dialog .layout-status{margin:3px 0}
}

/* Skill UI v2: retain bar dimensions; compact edit art with a full touch target. */
#world #edit-skill-layout{width:44px;right:6px;top:3px;border:0;background:none;box-shadow:none;display:grid;place-items:center;padding:5px;color:#e3c58c}
#world #edit-skill-layout svg{width:34px;height:34px;filter:drop-shadow(0 2px 2px #0008)}
#world #edit-skill-layout:hover,#world #edit-skill-layout:active{background:none}
#world #edit-skill-layout:hover svg{filter:drop-shadow(0 0 3px #bc985955)}
#world #edit-skill-layout:active svg{transform:scale(.94)}
#world #skill-bar>#target-enemy .action-caption{left:0;right:0;width:auto;padding:2px 0;font-size:7px;letter-spacing:0;white-space:nowrap;text-align:center}

/* Small unframed edit glyph; transparent hit area preserves touch access. */
#world #edit-skill-layout{place-items:center end;padding:0 1px 0 0}
#world #edit-skill-layout svg{width:14px;height:14px;filter:none}
#world #edit-skill-layout:hover svg{filter:brightness(1.2)}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse){#world #edit-skill-layout svg{width:11px;height:11px}}

/* Compact header: small visible art, independent 44px hit targets above the slots. */
#world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{--skill-header:34px;padding-top:var(--skill-header)}
#world #skill-hint{display:none}
#world #edit-skill-layout{top:calc(var(--skill-header) - 47px)!important;align-items:end!important;padding-bottom:6px!important}
body #toast[data-kind="skill"]{align-items:flex-end;padding:0 3px 5px;box-sizing:border-box;font-size:10px;line-height:1.2}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{--skill-header:32px}
 body #toast[data-kind="skill"]{font-size:9px;padding-bottom:5px}
}

/* HUD polish v2: anchored visual scaling, no renderer or gameplay changes. */
#world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{transform:translateX(-50%) scale(.8);transform-origin:center bottom}
#world .world-top .identity{scale:.8;transform-origin:left top}
#world #quick-settings,#world #game-rail{scale:.8;transform-origin:right top}
#world #arena-hud{transform:translateX(-50%) scale(.8);transform-origin:center top}
#one-tap-info span{scale:.8;transform-origin:center bottom}
#world #edit-skill-layout{min-width:55px!important;width:55px!important;min-height:55px!important;height:55px!important;top:calc(var(--skill-header) - 58px)!important}
body #toast[data-kind="skill"]{font-size:8px;min-height:0}
#arena-balance{position:relative;overflow:visible}
#arena-balance::after{content:"";position:absolute;width:24px;height:24px;left:var(--gok,50%);top:50%;transform:translate(-50%,-50%);background:url('./assets/kurt-favicon-v1.png') center/contain no-repeat;filter:drop-shadow(0 1px 2px #000);pointer-events:none}
#world #kill-feed>div.feed-own{color:#7ec8ff;border-left-color:#7ec8ff}
#world #kill-feed>div.feed-enemy{color:#ff8284;border-left-color:#ff8284}
#world #kill-feed .feed-killer,#world #kill-feed .feed-victim{color:inherit}
.lock-bubble{width:17px;height:19px}
#world #score-button{position:relative;isolation:isolate}
#score-button>svg{position:relative;z-index:1}
#world #camps-button .camp-call-glow,#world #score-button .score-call-glow{display:none;position:absolute;inset:2px;border-radius:6px;pointer-events:none;z-index:0;opacity:.36;background:radial-gradient(ellipse,#ff6256 0%,#e52b36cc 52%,#ad142900 90%)}
#world #score-button .score-call-glow{background:radial-gradient(ellipse,#65ff93 0%,#25cf70cc 52%,#159e4900 90%)}
.interface-motion #world #camps-button .camp-call-glow,.interface-motion #world #score-button .score-call-glow{display:block;animation:war-call-strong 2.4s ease-in-out infinite}
@keyframes war-call-strong{0%,100%{opacity:.24}50%{opacity:1}}
.page-hidden #score-button .score-call-glow{animation-play-state:paused!important}
.reduced-motion #score-button .score-call-glow{animation:none!important}
@media(prefers-reduced-motion:reduce){#world #camps-button .camp-call-glow,#world #score-button .score-call-glow{animation:none!important;opacity:.36}}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse){
 #world #kill-feed{font-size:6.4px;bottom:calc(133px + env(safe-area-inset-bottom))}
 body #joystick{scale:1.25;transform-origin:left bottom}
 .lock-bubble{width:14px;height:16px}
 .combat-float{font-size:14px;gap:2.67px}
 .combat-float svg{width:14px;height:14px}
 .combat-float.exp-gain,.combat-float.heal-gain,.combat-float.points-gain{font-size:12px}
 .combat-float.level-gain{font-size:16.666667px}
 body #toast[data-kind="skill"]{font-size:7.2px;padding-bottom:4px}
}

/* Round emphasis and PC-only size refinement. */
#world:has(#arena-hud:not([hidden])) #camps-button{display:none!important}
.round-restart{position:absolute;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);z-index:20;pointer-events:none;text-align:center;color:#ff363e;font:800 29px/1.2 system-ui;letter-spacing:.6px;text-shadow:0 2px 4px #000,0 0 10px #b90022;}
.round-restart.pickup-spawn{color:#83d9ff;text-shadow:0 2px 4px #071722,0 0 12px #008fe2}
.interface-motion .round-restart,.interface-motion #score-clock.round-restart-clock{animation:round-restart-pulse 1.3s ease-in-out infinite}
#score-clock.round-restart-clock{color:#ff363e;font:800 29px/1.2 system-ui;text-shadow:0 1px 3px #000;margin:12px 0}
@keyframes round-restart-pulse{0%,100%{opacity:.45}50%{opacity:1}}
.page-hidden .round-restart,.page-hidden #score-clock.round-restart-clock{animation-play-state:paused!important}
.reduced-motion .round-restart,.reduced-motion #score-clock.round-restart-clock{animation:none!important}
@media(prefers-reduced-motion:reduce){.round-restart,#score-clock.round-restart-clock{animation:none!important}}
@media(pointer:fine) and (min-height:501px){
 #world #skill-bar,#world:has(#score-button:not([hidden])) #skill-bar{transform:translateX(-50%) scale(.88)}
 #arena-balance::after{width:48px;height:48px}
 #world #arena-balance{margin-top:23px;margin-bottom:23px}
 #world:has(#arena-hud:not([hidden])) #enemy-status{top:162px}
 #one-tap-info span{scale:.88}
 body #toast[data-kind="skill"]{font-size:8.8px}
}
@media(orientation:landscape) and (max-height:500px),(pointer:coarse){.round-restart,#score-clock.round-restart-clock{font-size:22px;letter-spacing:.2px}}

/* HUD care v4: each name follows the viewer's nation independently. */
#world #kill-feed .feed-own{color:#7ec8ff}
#world #kill-feed .feed-enemy{color:#ff8284}
.layout-quick-help{margin:10px 0;padding:8px 10px;border:1px solid #8d795355;border-radius:6px;background:#10262e;color:#cfdfdf;font:12px/1.5 system-ui}
.layout-quick-help>b{color:#b9edb1}
@media(pointer:coarse){
 #world #game-rail,#world #game-rail:has(#score-button:not([hidden])){scale:1;top:calc(52px + env(safe-area-inset-top));grid-template-columns:44px;grid-template-rows:none;grid-auto-flow:row;grid-auto-rows:44px;gap:0;padding:2px;max-height:calc(100dvh - 60px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;scrollbar-width:none}
 #world #game-rail .rail-button,#world #game-rail #square-home{width:44px;height:44px;min-height:44px}
 .layout-quick-help{font-size:11px;margin:6px 0;padding:6px 8px}
 #connection-report{font-size:10px!important;padding:4px 7px!important}
}

#video-dialog{box-sizing:border-box;width:min(450px,94vw);max-height:94dvh;overflow:auto;padding:16px;border:1px solid #aa8c58;border-radius:12px 4px;color:#e8ebdf;background:linear-gradient(150deg,#263d46,#0c1f2a 65%);box-shadow:0 12px 48px #0009}
#video-dialog header{display:flex;justify-content:space-between;align-items:center}#video-title{color:#edd197;font:700 23px Georgia;margin:0}
#video-options{border:0;padding:0;margin:8px 0 0;display:grid;grid-template-columns:3fr 2fr;gap:10px;min-width:0}
#video-dialog [hidden]{display:none!important}
.video-settings{display:grid;gap:4px}.video-settings label{display:flex;gap:6px;align-items:center;min-height:32px}.video-settings select{margin-left:auto;max-width:62%;color:#f4e1b5;background:#122630;border:1px solid #856f49;padding:6px}.video-crop{background:#091820;display:grid;place-items:center;border:1px solid #7a6d4b;border-radius:4px}
#video-preview{max-width:100%;max-height:150px;object-fit:contain}#video-options small,#video-start{grid-column:1/-1}#video-dialog small{color:#c0cece;line-height:1.4}#video-message:empty{display:none}#video-dialog button,#video-download{min-height:44px;color:#efdaaa;background:#152b34;border:1px solid #8e794e;border-radius:5px;padding:6px 12px}#video-close{min-width:44px}#video-start{font-weight:bold;background:#384435!important}#video-download{display:inline-flex;align-items:center;box-sizing:border-box;text-decoration:none}
#video-time:not(:empty){position:absolute;top:100%;right:0;padding:3px 6px;background:#341b22;color:#ffe1d0;border-radius:3px;font:700 12px system-ui}#video-button[data-recording] svg{color:#ff615d}#video-button[data-recording]::after{content:"";position:absolute;top:5px;right:4px;width:7px;height:7px;border-radius:50%;background:#ff5157}
@media(pointer:coarse){.video-settings label,.video-settings select{min-height:44px}#video-dialog{padding:10px 14px}#world #quick-settings #video-button{min-width:55px;min-height:55px}}
@media(orientation:landscape) and (max-height:500px){
 #video-dialog{width:min(660px,96vw);padding:8px 12px}
 #video-dialog header{padding:0 8px;background:transparent}#video-title{font-size:18px}
 #video-options{grid-template-columns:minmax(0,1fr) 120px;gap:6px 12px}
 .video-settings{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 10px;align-content:start}
 #video-location{grid-column:1/-1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .video-settings label{letter-spacing:0;line-height:1.2;font-size:12px}
 #video-preview{max-height:140px}
}

#scroll-section{padding:6px 8px;background:#142831;border:1px solid #705c3c;border-radius:5px}
#scroll-use{min-height:44px;min-width:64px;color:#ffedbe;background:#253e47;border:1px solid #92774e;touch-action:manipulation}#scroll-pouch button{touch-action:manipulation}
#scroll-section h3,#scroll-hint{margin:3px 0;color:#e7d2a8}#scroll-hint{font:12px/1.35 system-ui}
#scroll-pouch{display:flex;gap:6px}#scroll-pouch .scroll-slot{position:relative;width:48px;height:48px;min-width:44px;min-height:44px}
.scroll-slot b,.scroll-pot-count{position:absolute;right:2px;bottom:1px;color:#fff1d5;font:bold 12px/1 system-ui;text-shadow:1px 1px 2px #000;background:#182530d9;border-radius:2px;padding:1px 2px;z-index:3}
#health-potion .scroll-pot-art{position:absolute;inset:4px;pointer-events:none}#health-potion .scroll-pot-art svg{width:100%;height:100%}
#scroll-product-art{display:none}#shop-purchase.scroll-order #scroll-product-art{display:grid;place-items:center;height:100%;min-height:90px}#scroll-product-art svg{width:min(75%,160px);height:auto}
#shop-purchase.scroll-order :is(#shop-preview,.shop-turn,.shop-days,.shop-order h3:first-of-type,.shop-duration-note){display:none}
#scroll-section[hidden],#scroll-pouch [hidden],#health-potion [hidden]{display:none!important}
.effect-badge[data-skill^="scroll-"] b{font-size:10px}
/* Active skill durations sit directly on the world. Only the grip takes input. */
#effect-plane{position:absolute;inset:max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));pointer-events:none;z-index:10}
#active-effects{--effect-size:34px;position:absolute;display:flex;align-items:center;gap:4px;pointer-events:none;user-select:none}
#active-effects[hidden],.effect-badge[hidden]{display:none!important}
#effect-handle{position:relative;width:44px;height:44px;flex:none;display:grid;place-items:center;pointer-events:auto;touch-action:none;cursor:grab;border:0;padding:0;margin-right:-1px;background:transparent;color:#fff0cc;box-shadow:none}
#effect-handle::before{content:"";position:absolute;right:5px;height:var(--effect-size);width:4px;border-radius:4px;background:linear-gradient(#f7e5ae,#b18c54);box-shadow:0 0 0 1px #202b2c,0 1px 4px #0009}
#effect-handle svg{width:21px;height:21px;opacity:0;filter:drop-shadow(0 1px 2px #000);margin-right:4px}
#effect-handle:is(:hover,:focus-visible,[data-dragging]) svg{opacity:1}
#effect-handle[data-dragging]{cursor:grabbing}
.effect-badge{width:var(--effect-size);height:var(--effect-size);display:grid;place-items:center;position:relative;background:linear-gradient(145deg,#385353e0,#182d36e8);border-radius:5px;box-shadow:0 1px 3px #0009;overflow:hidden}
.effect-badge>svg{width:84%;height:84%;filter:drop-shadow(0 1px 1px #182222)}
.effect-badge::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:2px;background:conic-gradient(from 0deg,#fff2bb var(--remaining,100%),#a7ae9a44 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude}
.effect-badge b{position:absolute;right:3px;bottom:1px;font:700 13px/1 system-ui;color:#fff9dc;text-shadow:-1px -1px 1px #172626,1px 1px 1px #172626,0 0 3px #000;font-variant-numeric:tabular-nums}
@media(pointer:coarse),(max-width:700px){#active-effects{--effect-size:28px;gap:3px}.effect-badge b{font-size:11px}}

#enemy-effects{--effect-size:23px;display:flex;align-items:center;justify-content:flex-start;gap:3px;margin-top:3px;pointer-events:none}
#enemy-effects[hidden]{display:none}
@media(pointer:coarse),(max-width:700px){#enemy-effects{--effect-size:19px;gap:2px;margin-top:2px}}
