/* v2.3: single compact mobile header, complete expandable navigation. */
.sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.sidebar-head .brand{min-width:0;flex:1}.sidebar-head .brand>span:last-child{min-width:0;overflow-wrap:anywhere}.menu-toggle{display:none}.sidebar{overflow-y:auto}.sidebar #navigation-panel{display:flex;flex-direction:column;flex:1;min-height:0}.sidebar #navigation-panel[hidden]{display:none!important}.sidebar .sidebar-bottom{position:static;margin-top:auto;padding-top:24px;display:block;font-size:12px}.world-status{display:flex;align-items:center;gap:7px;color:#8494ad;line-height:1.5}.sidebar-bottom>small{display:block;margin:8px 0 12px}.sidebar-bottom>button{width:100%;text-align:left}.menu-preferences{margin-top:22px;border-top:1px solid #283850;padding-top:15px}.menu-preferences .nav-label{margin:0 0 10px}.sidebar .languages{display:flex;flex-wrap:wrap;gap:5px;padding:0;justify-content:flex-start;margin:0;overflow:visible}.sidebar .languages a{font-size:11px!important;min-height:40px;padding:7px 8px;gap:0}.sidebar .languages .motion-toggle{width:100%;margin:8px 0 0;order:2;min-height:40px;text-align:left;font-size:11px!important}.sidebar .nav-label{font-size:10px}.sidebar #nav [hidden]{display:none!important}
@media(max-width:720px){
 .sidebar{position:relative;height:auto;overflow:visible;padding:13px 16px;background:#0b1321;border-bottom:1px solid #27374e}
 .sidebar-head{min-height:45px;gap:14px}.sidebar-head .brand{font-size:16px;letter-spacing:.3px}.sidebar-head .brand-mark{width:36px;min-width:36px;height:39px;font-size:23px;border-radius:10px}.sidebar-head .brand small{display:none}
 .menu-toggle{display:flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-height:42px;padding:9px 12px;background:#18253c;border:1px solid #3a4d70;border-radius:10px;font-size:13px!important;color:#d7e2f7}.menu-toggle[aria-expanded=true]{border-color:#9aaff1;background:#273856}.menu-toggle>span{font-size:17px}
 .sidebar #navigation-panel{padding-top:19px;margin-top:13px;border-top:1px solid #29394f}.sidebar .nav-label{display:block;margin:0 0 10px;font-size:10px;letter-spacing:1.7px;color:#8495b1}
 .sidebar #nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0;overflow:visible}.sidebar #nav button,.sidebar #nav a{width:100%;min-width:0;min-height:46px;padding:10px 11px;font-size:16px!important;gap:9px;text-align:left;background:#111e31;border:1px solid #263850}.sidebar #nav button span,.sidebar #nav a span{font-size:13px;overflow-wrap:anywhere}.sidebar #nav button.active{background:#263b63;border-color:#7e9bd6;color:#e3ecff}
 .sidebar .menu-preferences{margin-top:18px;padding-top:15px}.sidebar nav.languages{display:flex;flex-wrap:wrap;margin:0;gap:8px;overflow:visible;justify-content:flex-start}.sidebar nav.languages a{flex:1;justify-content:center;min-height:43px;padding:9px;font-size:12px!important;border:1px solid #354967}.sidebar .languages .motion-toggle{margin-top:2px;min-height:43px;text-align:center;font-size:12px!important}
 .sidebar .sidebar-bottom{margin:16px 0 0;padding:14px 0 0;border-top:1px solid #283850;position:static;font-size:12px}.sidebar .world-status,.sidebar .sidebar-bottom>small{display:none}.sidebar .sidebar-bottom>button{width:100%;min-height:44px;font-size:13px!important;text-align:center;background:#172137;border-color:#34415a}
 .topbar{padding:14px 17px;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}.topbar>div:first-child{min-width:0}.topbar .eyebrow{font-size:9px;letter-spacing:.6px}.topbar strong{font-size:13px;overflow-wrap:anywhere;max-width:none}.currencies{gap:8px;margin:0;white-space:nowrap}.currencies b{font-size:12px}.currencies small{font-size:8px!important}.currency-art{width:23px;height:23px}.level-pill{font-size:10px;padding:5px}.main-column{min-width:0}
}
@media(max-width:360px){.topbar{grid-template-columns:1fr}.currencies{justify-content:flex-end}.sidebar-head .brand{font-size:14px}.menu-toggle{padding:8px 10px}.sidebar #nav button span{font-size:12px}}

.auto-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.auto-summary button{margin-left:auto}.auto-history{display:grid;gap:9px;margin-top:16px;max-height:350px;overflow:auto;overscroll-behavior:contain}.auto-result{padding:12px 14px;border:1px solid #2f4c51;border-left:3px solid #72ddc1;border-radius:9px;background:#101d2c;display:grid;gap:3px}.auto-result.lost{border-left-color:#ff92a1}.auto-result>b{color:#91e1bc;font-size:13px}.auto-result.lost>b{color:#ff92a1}.auto-result>span{font-size:14px}.auto-result>small{color:#b6c5dd}

/* v2.4: utility panels precede content on compact screens; footer is last. */
.app-shell>.sidebar{grid-column:1;grid-row:1 / 3}.app-shell>.main-column{grid-column:2;grid-row:1}.app-shell>.rightbar{grid-column:3;grid-row:1;overflow-y:auto}.app-shell>footer{grid-column:2 / -1;grid-row:2;gap:16px;flex-wrap:wrap}
.utility-panel{min-width:0}.utility-panel>summary{display:none}.chat-disclosure{flex:1;min-height:220px}.chat-disclosure .chat-panel{height:100%}
.auto-arena{position:relative;isolation:isolate;overflow:hidden;border:1px solid #52699a;border-radius:18px;padding:24px;background:#101b30;margin-bottom:20px}.auto-arena-backdrop{position:absolute;inset:0;z-index:-2;opacity:.35}.auto-arena-backdrop>.game-art{width:100%;height:100%;aspect-ratio:auto;background-size:400% 277.041%}.auto-arena:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#0b1425 5%,#0b142540 90%)}.auto-arena-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;color:#c1b3ff}.auto-arena-top button{font-size:12px!important}.auto-duel{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px;margin:32px 0 24px}.auto-duel>div{min-width:0;text-align:center;display:grid;gap:10px}.auto-duel b{overflow-wrap:anywhere;font-size:14px}.auto-duel progress{height:10px}.auto-duel .versus{color:#cbb5ff;font-size:23px}#auto-enemy-hp{accent-color:#e17683}#auto-fight-log{height:180px;overflow:auto;overscroll-behavior:contain;background:#080f1bd9;border:1px solid #33435f;border-radius:12px;padding:15px;font-size:13px}#auto-fight-log p{margin:0 0 9px;animation:log-in .25s ease-out}#auto-fight-log .hero{color:#a7c5ff}#auto-fight-log .enemy{color:#f4a2b8}#auto-fight-reward{color:#e7ca8e;margin:18px 0 0;min-height:25px}
@media(max-width:1250px){
 .app-shell>.sidebar{grid-row:1 / 4}.app-shell>.rightbar{grid-column:2;grid-row:1;position:static;height:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;padding:14px 24px;border-bottom:1px solid var(--line);overflow:visible}.app-shell>.main-column{grid-column:2;grid-row:2}.app-shell>footer{grid-column:2;grid-row:3}.utility-panel{background:#111e32;border:1px solid #34476a;border-radius:12px;overflow:hidden}.utility-panel>summary{display:list-item;cursor:pointer;min-height:46px;padding:12px 15px;color:#cbd8f6;font-size:13px}.utility-panel>summary:focus-visible{outline:2px solid #a5b9ff;outline-offset:-3px}.utility-panel[open]>summary{border-bottom:1px solid #34476a}.utility-panel>section{padding:15px}.chat-disclosure{min-height:0}.chat-disclosure .chat-panel{margin:0;height:300px;border:0}.chat-disclosure .section-title{display:none}.app-shell>.rightbar>.small{display:none}.utility-panel #chat{height:210px;max-height:210px}
}
@media(max-width:720px){
 .app-shell{display:flex;flex-direction:column}.app-shell>.sidebar{order:0}.app-shell>.rightbar{order:1;padding:10px 16px;gap:8px;border-left:0}.app-shell>.main-column{order:2}.app-shell>footer{order:3}.utility-panel[open]{grid-column:1 / -1}.utility-panel>summary{font-size:12px;padding:12px}.auto-arena{padding:16px}.auto-duel{gap:10px;margin-top:25px}.auto-duel b{font-size:12px}.auto-duel .duel-icon{width:105px;height:120px}.auto-duel .versus{font-size:16px}#auto-fight-log{height:160px;font-size:12px}
}

/* v2.5 inventory, equipment and forge */
.item-filters{display:flex;flex-wrap:wrap;gap:7px;margin:22px 0}.item-filters button{min-height:42px;padding:8px 13px;font-size:12px!important}.item-filters .active{background:#344c78;border-color:#9fb9ff;color:#fff}.equipment-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.equipment-slot{min-height:125px;border:1px solid #324263;border-radius:12px;background:radial-gradient(at top,#223254,#0e1829);padding:10px;display:flex;align-items:center;flex-direction:column;text-align:center;gap:7px}.equipment-slot>small{color:#96aacb;font-size:10px}.equipment-slot>b{font-size:10px;overflow-wrap:anywhere}.equipment-slot>span:not(.game-art){font-size:36px;color:#3b4f71}.equipment-slot.filled{border-color:#758dbb;box-shadow:inset 0 0 22px #81a4d311}.slot-art{width:58px!important;height:62px!important;border-radius:8px}.crafted-art{object-fit:contain}.item-requirements{display:block;color:#a9b8d7;margin:8px 0}.item-grid .item-picture{max-width:155px}.forge-card{border-color:#8063ad;background:linear-gradient(125deg,#2b2041,#101c2f)}.item-grid .card h3{font-size:18px}.item-grid .item-actions{align-items:stretch}.item-grid .item-actions button{min-height:40px}.item-grid .card p{min-height:0}
@media(max-width:720px){.equipment-board{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.equipment-slot{min-height:110px}.item-filters{gap:6px}.item-filters button{padding:8px 10px}.item-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.item-grid .card{padding:12px}.item-grid .card h3{font-size:14px;letter-spacing:0}.item-grid .card p{font-size:12px}.item-grid .badge{font-size:8px!important}.item-grid .item-actions{display:grid}.item-grid .item-picture{max-width:120px}.item-grid .card button{font-size:11px!important;padding:8px}}
@media(max-width:350px){.item-grid{grid-template-columns:1fr}}

.security-notice{flex-basis:100%;font-size:10px;color:#8999b3;letter-spacing:0}

.bestiary-art{width:100%;max-width:170px;border-radius:12px;margin:auto;display:block}.monster-card h3{font-size:18px}.bestiary-grid{margin-bottom:28px}

/* v2.7 clean header and compact-screen chat drawer */
body[data-auth=no] .login-layout{min-height:0;margin:clamp(25px,6vh,70px) auto;padding-top:25px;padding-bottom:35px;align-items:center}
.auth-card .languages{position:static;display:flex;justify-content:flex-end;gap:7px;padding:0 0 20px;margin:0 0 20px;border-bottom:1px solid #30405e}.auth-card .languages a{font-size:12px!important;min-height:36px;padding:7px 11px}.chat-close{display:none}.messages-layout{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:18px;margin-top:20px}.thread{display:grid;width:100%;grid-template-columns:1fr auto;text-align:left;margin-bottom:8px}.thread small{grid-column:1/-1;overflow-wrap:anywhere;color:#a3b3d1}.private-message{padding:12px 15px;background:#17253c;border:1px solid #344768;border-radius:12px;margin:12px 20% 12px 0;overflow-wrap:anywhere}.private-message.sent{margin:12px 0 12px 20%;background:#28365b}.private-message p{white-space:pre-wrap;margin:0 0 5px;min-height:0}.private-message small{font-size:10px;color:#8e9fbd}#private-log{max-height:420px;min-height:150px;overflow:auto}#private-form textarea{width:100%;background:#0e182a;color:#e4ebff;border:1px solid #415579;border-radius:10px;padding:12px;font:inherit}#player-results .list-row{flex-wrap:wrap}
@media(max-width:1250px){.app-shell>.rightbar{display:none}.app-shell>.main-column{grid-row:1}.app-shell>footer{grid-row:2}.app-shell>.sidebar{grid-row:1/3}.chat-open .app-shell>.rightbar{display:block;position:fixed;z-index:50;inset:20px 20px 20px auto;width:min(420px,calc(100vw - 40px));height:auto;border:1px solid #6684b9;border-radius:16px;background:#0e182a;box-shadow:0 0 0 100vmax #030812bc;overflow:auto;padding:20px}.chat-open .player-panel{display:none}.chat-open .chat-close{display:block;margin:0 0 15px auto}.chat-open .chat-disclosure{display:block;border:0}.chat-open .chat-disclosure>summary{display:none}.chat-open .chat-disclosure .chat-panel{height:calc(100dvh - 160px);padding:0}.chat-open .chat-disclosure #chat{max-height:none;height:auto}.chat-open .rightbar>.small{display:none}}
@media(max-width:720px){.messages-layout{grid-template-columns:1fr}.auth-card .languages{justify-content:center}.auth-card .languages a{flex:1;justify-content:center}body[data-auth=no] .login-layout{margin:0 auto}.private-message{margin-right:8%}.private-message.sent{margin-left:8%}}

/* v2.9 monster cards are accessible full-card buttons. */
button.monster-card{display:block;width:100%;text-align:left;white-space:normal;font:inherit;color:inherit;transition:transform .2s,border-color .2s}button.monster-card:not(:disabled):hover{transform:translateY(-3px);border-color:#a5b4fc}button.monster-card:focus-visible{outline:3px solid #a5b4fc;outline-offset:3px}.monster-cta{display:block;padding:12px;border-radius:10px;background:#a5b4fc;color:#10182c;text-align:center;margin-top:16px}.faq-card{margin-bottom:12px}.faq-card summary{cursor:pointer;font-weight:600;padding:4px}.faq-card p{line-height:1.8}

/* v2.10 responsive world map */
.realm-map{position:relative;isolation:isolate;width:100%;max-width:900px;margin:0 auto 32px;aspect-ratio:800/960;border:1px solid #52657a;border-radius:22px;overflow:hidden;box-shadow:0 20px 70px #0005;background:#102331}.realm-map-art{width:100%;height:100%;display:block}.map-location{position:absolute;left:50%;top:50%;z-index:1;transform:translate(-50%,-50%);width:25%;max-width:180px;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 3px;background:transparent;border:0;color:#e9edff;white-space:normal;text-shadow:0 2px 4px #000;font:inherit}.map-location b{background:#08121de8;border:1px solid #708da5;border-radius:7px;padding:5px 8px;font-size:clamp(11px,2vw,18px);max-width:100%;overflow-wrap:anywhere}.map-location small{background:#091420e8;padding:2px 7px;border-radius:8px;font-size:clamp(10px,1.6vw,13px)}.map-castle{display:grid;place-items:center;width:clamp(34px,6vw,58px);aspect-ratio:1;border-radius:50%;background:radial-gradient(#415d84,#122238);border:1px solid #acbee6;color:#dce5ff;font-size:clamp(22px,4vw,36px);box-shadow:0 0 22px #abc2ff50;animation:map-beacon 3s ease-in-out infinite}.map-locked .map-castle{filter:saturate(.3);box-shadow:none;animation:none}.map-location:hover,.map-location:focus-visible{background:transparent;z-index:2;outline:2px solid #c3d0ff;outline-offset:4px;border-radius:10px}.map-location:hover .map-castle{box-shadow:0 0 32px #b6c6ff}.city-banner{position:relative;isolation:isolate;overflow:hidden;min-height:280px;border:1px solid #586987;border-radius:20px;margin:20px 0 28px;background:#0e1a2a}.city-scenery{position:absolute;inset:0;z-index:-2}.city-scenery .game-art{width:100%;height:100%;display:block;opacity:.7}.city-banner:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0c1429ee,#0c142966);z-index:-1}.city-caption{padding:32px;max-width:650px}.city-caption h1{margin:12px 0}.city-caption p{line-height:1.7;color:#d0d6e5}@keyframes map-beacon{50%{box-shadow:0 0 32px #b1c7ff90}}@media(prefers-reduced-motion:reduce){.map-castle{animation:none}}@media(max-width:480px){.city-caption{padding:24px}.realm-map{border-radius:14px}.map-location{width:27%}}

/* v2.10.1: external coordinates comply with style-src self. */
.realm-map-art{pointer-events:none;user-select:none}
.realm-map .map-location[data-city="0"]{left:21%;top:43%}
.realm-map .map-location[data-city="1"]{left:21%;top:19%}
.realm-map .map-location[data-city="2"]{left:49%;top:57%}
.realm-map .map-location[data-city="3"]{left:49%;top:32%}
.realm-map .map-location[data-city="4"]{left:74%;top:41%}
.realm-map .map-location[data-city="5"]{left:78%;top:68%}
.realm-map .map-location[data-city="6"]{left:21%;top:75%}
.realm-map .map-location[data-city="7"]{left:50%;top:84%}
.realm-map .map-location[data-city="8"]{left:76%;top:18%}

/* Feedback form and stable claimed-gift notice. */
#feedback-form{display:grid;gap:16px}#feedback-form label{display:grid;gap:8px}#feedback-form textarea{width:100%;resize:vertical;min-height:150px}#feedback-result:empty{display:none}.daily-claimed{min-height:48px;display:flex;align-items:center;color:var(--muted,#a6b0c7)}

/* v2.13: drawer menu and a compact, persistent player/navigation shell. */
body[data-auth=yes] .app-shell{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto 1fr auto;padding-bottom:100px}
body[data-auth=yes] .app-shell>.sidebar{grid-column:1/-1;grid-row:1;position:relative;height:auto;padding:12px 24px;overflow:visible;border-right:0;border-bottom:1px solid #2d3d57}
body[data-auth=yes] .app-shell>.main-column{grid-column:1;grid-row:2}
body[data-auth=yes] .app-shell>.rightbar{grid-column:2;grid-row:2;position:sticky;top:0;height:calc(100dvh - 90px)}
body[data-auth=yes] .app-shell>footer{grid-column:1/-1;grid-row:3}
.sidebar-head .brand{margin:0;font-size:18px}.sidebar-head .brand small{display:none}.sidebar-head .brand-mark{width:38px;height:40px;font-size:26px}.sidebar-head .menu-toggle{display:flex;min-height:44px;align-items:center;gap:9px}
.sidebar #navigation-panel{position:fixed;inset:0 auto 0 0;width:min(340px,90vw);height:100dvh;z-index:121;margin:0;padding:20px 18px max(22px,env(safe-area-inset-bottom));background:#101a2b;border:0;border-right:1px solid #536585;overflow-y:auto;overscroll-behavior:contain;box-shadow:12px 0 30px #0006}
.sidebar #nav{display:grid;grid-template-columns:1fr;gap:5px;overflow:visible;margin:15px 0}.sidebar #nav button,.sidebar #nav a{min-height:44px;width:100%;text-align:left;gap:12px;padding:10px 12px;font-size:14px!important}.sidebar #nav button span,.sidebar #nav a span{font-size:14px}.sidebar #navigation-panel .drawer-close{margin:0 0 20px auto;min-height:44px;display:flex;align-items:center;gap:7px}.menu-backdrop{position:fixed;inset:0;z-index:120;width:100%;height:100%;border:0;border-radius:0;background:#030812bb;padding:0}.menu-backdrop:hover,.menu-backdrop:active{transform:none;background:#030812bb}.menu-open{overflow:hidden}
.topbar{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-height:0;padding:16px 24px}.page-context{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.page-context #welcome{font-size:12px;color:#95a7c4}.player-strip{display:flex;align-items:center;gap:16px;min-width:0}.player-strip .strip-name{display:flex;align-items:center;gap:6px;min-width:0;max-width:40%;padding:0;border:0;background:none}.strip-name b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.strip-resource{display:grid;grid-template-columns:22px auto;column-gap:5px;align-items:center}.strip-resource .ui-icon{grid-row:1/3}.strip-resource b{font-size:13px}.strip-resource small{font-size:8px;color:#91a4c4;letter-spacing:.5px}.player-strip .level-pill{font-size:11px;padding:5px;white-space:nowrap}
.quick-nav{position:fixed;z-index:60;bottom:max(8px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(680px,calc(100% - 16px));display:flex;overflow-x:auto;overscroll-behavior-x:contain;gap:4px;margin:0;padding:7px;background:#101b2bf5;border:1px solid #42577b;border-radius:15px;box-shadow:0 5px 25px #0008;scrollbar-width:none;touch-action:pan-x pan-y}.quick-nav button{display:flex;flex:1 0 68px;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 8px;min-height:52px;border:0;background:transparent}.quick-nav button span{font-size:10px;white-space:nowrap}.quick-nav button .ui-icon{width:22px;height:22px}.quick-nav button.active{background:#2e4265;color:#e8efff}.quick-nav button:hover,.quick-nav button:active{transform:none}
@media(max-width:1250px){body[data-auth=yes] .app-shell{grid-template-columns:minmax(0,1fr)}body[data-auth=yes] .app-shell>.rightbar{display:none}.chat-open[data-auth=yes] .app-shell>.rightbar{display:block;position:fixed;grid-column:auto;grid-row:auto;height:auto;inset:16px 16px 96px auto;z-index:80}.chat-open .chat-disclosure .chat-panel{height:calc(100dvh - 230px)}}
@media(max-width:720px){body[data-auth=yes] .app-shell>.sidebar{padding:10px 16px}.topbar{padding:12px 16px}.player-strip{gap:10px;justify-content:space-between}.player-strip .strip-name{max-width:34%}.strip-name b,.strip-resource b{font-size:12px}.player-strip .ui-icon{width:18px;height:18px}.strip-resource{grid-template-columns:18px auto;column-gap:3px}.page-context .eyebrow{font-size:9px}.quick-nav{gap:1px}.quick-nav button{flex-basis:62px}.sidebar #nav{grid-template-columns:1fr}}
@media(max-width:360px){.player-strip{gap:5px}.player-strip .strip-name .ui-icon{display:none}.player-strip .strip-name{max-width:28%}.strip-name b,.strip-resource b{font-size:11px}}
/* Fixed map anchors: global hover/press transforms must never move pins. */
.realm-map button.map-location,.realm-map button.map-location:hover,.realm-map button.map-location:active,.realm-map button.map-location:focus{transform:translate(-50%,-50%);transition:background-color .15s;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.realm-map .map-castle{animation:none;box-shadow:0 0 12px #abc2ff30}.realm-map button.map-location:hover .map-castle{box-shadow:0 0 12px #abc2ff30}.realm-map img{-webkit-user-drag:none}.realm-map button.map-location:not(:focus-visible){outline:none}
/* Battle controls, legible resource bars, and no nested scroll traps. */
.battle-heading>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.battle-heading button{display:flex;align-items:center;gap:7px;min-height:42px;font-size:12px}.battle-heading h2{font-size:24px}.battle-energy{margin-bottom:14px}.battle-meter{position:relative;height:26px;border-radius:7px;overflow:hidden;background:#0c1422;border:1px solid #5a6981}.battle-meter progress,.auto-duel .battle-meter progress{display:block;width:100%;height:100%;border:0;border-radius:0;appearance:none;background:#1c2636}.battle-meter progress::-webkit-progress-bar{background:#1c2636}.battle-meter progress::-webkit-progress-value{background:#9d4057}.battle-meter progress::-moz-progress-bar{background:#9d4057}.battle-energy progress::-webkit-progress-value{background:#285e86}.battle-energy progress::-moz-progress-bar{background:#285e86}.battle-meter>span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:white;text-shadow:0 1px 3px #000;font-size:11px;font-weight:700;pointer-events:none}.auto-duel{margin:20px 0}.auto-duel .duel-icon{animation:none}.duel-icon.defeated>.game-art{filter:grayscale(1) brightness(.35)}.duel-icon.defeated:after{content:'';position:absolute;inset:25%;background:url('icons/defeated.svg') center/contain no-repeat;filter:drop-shadow(0 0 7px #ff394b);pointer-events:none}#auto-controls{padding:14px 0;border-top:1px solid #3b4d69}#auto-controls button{min-height:44px}#auto-controls p{margin:10px 0 0}#auto-fight-log{height:auto;min-height:110px;max-height:none;overflow:visible;overscroll-behavior:auto;touch-action:pan-y}.auto-history{max-height:none;overflow:visible;overscroll-behavior:auto;touch-action:pan-y}.auto-result{padding:10px 12px}.auto-result small{font-size:11px}.auto-status h3{font-size:17px}.battle-result{position:fixed;z-index:100;left:50%;top:45%;transform:translate(-50%,-50%);width:max-content;max-width:calc(100vw - 40px);padding:18px 24px;border-radius:14px;border:1px solid #89bfa7;background:#142b27f5;color:#d2ffe5;text-align:center;box-shadow:0 12px 30px #0008;pointer-events:none;animation:rise .2s ease-out}.battle-result.lost{border-color:#e18091;background:#381a28f5;color:#ffbdc7}
/* Ready rewards first, claimed rewards last; compact enough to scan. */
.achievement-list{display:grid;gap:10px}.card.achievement-row{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px;margin:0}.achievement-thumb{display:block;width:48px;height:52px;border-radius:9px}.achievement-info h3{font-size:16px!important;margin:0 0 4px}.achievement-info p{font-size:11px;min-height:0;margin:0 0 7px}.achievement-info .meter-label{font-size:10px;margin-top:5px}.achievement-row button{min-height:42px;font-size:11px!important;padding:8px 12px}.achievement-row.claim-ready{border-color:#bea063}.achievement-row.claim-ready .bar{box-shadow:0 0 10px #e4c67c88;accent-color:#e4c67c}.achievement-row.claimed{border-color:#345c4d;background:#12231f}.achievement-row.claimed .bar{accent-color:#77bfa0}.achievement-row.claimed h3{color:#91c7aa}
@media(max-width:720px){.card.achievement-row{grid-template-columns:38px minmax(0,1fr) 82px;gap:9px;padding:12px 10px}.achievement-thumb{width:36px;height:40px}.achievement-info h3{font-size:13px!important}.achievement-info p{font-size:10px;line-height:1.4}.achievement-row button{font-size:10px!important;padding:7px 5px;white-space:normal}.battle-heading h2{font-size:20px}.battle-heading>div{gap:7px}.battle-result{font-size:13px;padding:15px}}
@media(hover:none),(pointer:coarse){.ambient:before,.ambient:after{animation:none}.map-location,.achievement-row{backdrop-filter:none}.cinematic-banner .banner-art{animation:none}}

/* v2.13.1: a blurred ancestor must not trap a fixed drawer behind the backdrop. */
body[data-auth=yes] .app-shell>.sidebar{backdrop-filter:none;-webkit-backdrop-filter:none}
body[data-auth=yes].menu-open .app-shell>.sidebar{z-index:121}
.sidebar #navigation-panel{z-index:122;flex-shrink:0}
.sidebar #navigation-panel>*{flex-shrink:0}
.header-admin{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid #465b7e;border-radius:10px;text-decoration:none;font-size:12px;white-space:nowrap}
@media(max-width:400px){.sidebar-head{gap:8px}.sidebar-head .brand{font-size:13px}.header-admin{padding:7px;font-size:11px}.sidebar-head .menu-toggle{padding:8px}.sidebar-head .brand-mark{min-width:30px;width:30px;height:34px;font-size:22px}}

/* Hide the quick-navigation scrollbar without disabling scrolling. */
.quick-nav{-ms-overflow-style:none}
.quick-nav::-webkit-scrollbar{display:none;width:0;height:0}

/* v2.14 location hub and selected map destination. */
.location-home{margin-top:0}.location-actions{margin-bottom:18px}.location-action{display:block;text-align:left;white-space:normal;font:inherit;color:inherit;width:100%}.location-action>.ui-icon{width:34px;height:34px}.location-action h3{font-size:19px!important}.location-action p{min-height:0}.location-services{margin-bottom:20px}.location-services h3{font-size:17px!important}.realm-map .map-selected b{border-color:#e8c782;background:#263347}.location-home button{display:inline-flex;align-items:center;gap:8px}

/* v2.14.1: body-level drawer escapes every app-shell stacking context. */
body[data-auth=yes]>.menu-layer{position:fixed;inset:0;z-index:1001;width:100%;height:100dvh;margin:0;padding:0;border:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;transform:none;filter:none;isolation:isolate;overflow:visible;pointer-events:none}
body[data-auth=yes]>.menu-layer>#navigation-panel{position:fixed;inset:0 auto 0 0;z-index:1;width:min(340px,90vw);height:100dvh;pointer-events:auto;overflow-y:auto;touch-action:pan-y;background:#101a2b}
body[data-auth=yes]>#menu-backdrop{z-index:1000;pointer-events:auto}
body[data-auth=yes]>.menu-layer[hidden],body[data-auth=yes]>#menu-backdrop[hidden]{display:none!important}

/* v2.15: compact live events and readable conversation bubbles. */
.live-event-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:16px}.card.live-event{padding:20px;background:linear-gradient(145deg,#1b2b46,#101a2d);border-color:#405778}.event-heading{display:flex;align-items:center;gap:12px}.event-heading>div{flex:1;min-width:0}.event-heading h3{font-size:19px!important;margin:2px 0;overflow-wrap:anywhere}.event-emblem{width:44px;height:44px;display:grid;place-items:center;flex-shrink:0;border-radius:13px;border:1px solid #55769c;background:#283e60}.event-emblem .ui-icon{width:27px;height:27px}.event-live{font-size:10px;color:#8ce0bd;letter-spacing:1px}.live-event .event-task{min-height:0;margin:14px 0;color:#bfcee4;font-size:13px}.event-clock{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12px;color:#bbcae1}.event-clock small{font-size:11px!important;color:#8fa2c1}.event-progress{margin:16px 0}.event-progress>div{display:flex;justify-content:space-between;font-size:11px;color:#aabbd7;margin-bottom:7px}.event-progress .bar{height:8px}.event-loot{padding:12px;border:1px solid #3b4e6c;background:#0c1729;border-radius:10px;font-size:13px;color:#efd49b}.live-event footer.event-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:14px 0 0;border:0;margin:0}.event-actions button{min-height:42px;padding:8px 16px;font-size:12px!important}.event-done{color:#8ad5b4;font-size:12px}.event-rewards{margin:0 0 20px;padding:18px;border:1px solid #9d875b;border-radius:14px;background:#26251e}.event-rewards h3{margin:0;font-size:18px}.event-reward-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid #7f725244}.event-reward-row b{font-size:14px}.event-reward-row p{margin:4px 0;font-size:12px}.event-reward-row button{font-size:11px!important}.event-empty{text-align:center;padding:30px!important}.event-empty>.ui-icon{width:40px;height:40px}.event-empty p{min-height:0}.event-intro{font-size:13px}
#chat{padding:12px 4px;scrollbar-width:thin;overflow-x:hidden}.chat-message{display:flex;gap:8px;align-items:flex-start;margin:0 0 14px;border:0;padding:0}.chat-avatar{width:30px;height:30px;flex-shrink:0;display:grid;place-items:center;border-radius:10px;background:#2c4266;border:1px solid #506d96;color:#c6d7f8;font-size:13px;font-weight:700}.chat-bubble{min-width:0;max-width:calc(100% - 38px);padding:10px 12px;border:1px solid #304666;border-radius:3px 13px 13px;background:#17263c;flex:1}.chat-bubble header{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.chat-bubble strong{font-size:12px;overflow-wrap:anywhere}.chat-bubble time{margin-left:auto;font-size:10px;color:#8fa3c2;float:none}.chat-bubble .admin-label{font-size:8px;padding:1px 4px;border-radius:4px;background:#3e355f;color:#d3befa}.chat-bubble p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;color:#e2e9f6;font-size:13px;line-height:1.6;min-height:0}.chat-own{flex-direction:row-reverse}.chat-own .chat-bubble{border-radius:13px 3px 13px 13px;background:#26395b;border-color:#4b6390}.chat-own .chat-avatar{background:#414b7c}.chat-empty{text-align:center;margin:auto;color:#99abc7;padding:30px 10px}.chat-empty>.ui-icon{width:36px;height:36px}.chat-panel #chat-form{display:flex;gap:8px;padding:12px 0 0;border-top:1px solid #30415e;flex-shrink:0}.chat-panel #chat-form input{min-width:0;flex:1;font-size:13px;min-height:46px;border-radius:12px}.chat-panel #chat-form button{width:46px;min-width:46px;padding:9px;border-radius:12px;background:#829ce0;color:#0d1a30}.chat-disclosure .section-title{margin:0;padding-bottom:12px;border-bottom:1px solid #30415e}.chat-disclosure .section-title h3{font-size:16px!important}.chat-close{font-size:12px!important;min-height:38px;padding:7px 11px}.private-message{border-radius:4px 15px 15px;background:#17263c}.private-message.sent{border-radius:15px 4px 15px 15px;background:#293e63}.private-message small{color:#a1b3cf}.thread{border:1px solid #304565;background:#132139;border-radius:12px}.thread:hover{background:#243756}
@media(max-width:1250px){.chat-open .chat-disclosure .section-title{display:flex}.chat-open[data-auth=yes] .app-shell>.rightbar{padding:16px;background:#101b2d;border-color:#4f6a94;border-radius:18px}.chat-open .chat-disclosure .chat-panel{display:flex;flex-direction:column;height:calc(100dvh - 222px);min-height:160px}.chat-open .chat-disclosure #chat{flex:1;min-height:0;margin:0;overflow-y:auto}.chat-open .chat-close{margin-bottom:8px}.chat-open .chat-disclosure{overflow:visible}}
@media(max-width:480px){.card.live-event{padding:16px}.event-heading h3{font-size:17px!important}.event-reward-row{flex-wrap:wrap}.event-reward-row button{width:100%}.chat-bubble{padding:9px 10px}.chat-avatar{width:26px;height:26px}.chat-bubble{max-width:calc(100% - 34px)}}

/* v2.15.1: both notification types remain centered throughout their lifetime.
   Do not reuse rise: its transform overrides the centering translation. */
#toast,#toast.show,#battle-result{
 position:fixed;top:50%;left:50%;right:auto;bottom:auto;
 transform:translate(-50%,-50%);margin:0;z-index:1100;
 width:max-content;max-width:min(600px,calc(100vw - 32px));
 text-align:center;overflow-wrap:anywhere;pointer-events:none;
 transition:opacity .2s ease;animation:none;
}
#battle-result:not([hidden]){animation:reward-center-fade .2s ease-out}
@keyframes reward-center-fade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){
 #toast,#toast.show,#battle-result{animation:none;transition:none}
}

/* v2.15.2: structured, centered battle rewards. */
#battle-result{width:320px;padding:24px;border-radius:20px;border-color:#c6aa68;background:radial-gradient(ellipse at top,#51432e 0,transparent 65%),#101b2bf5;box-shadow:0 18px 60px #000a,0 0 24px #c6aa6822;color:#eef1ff}
#battle-result h2{margin:10px 0 18px;font-size:25px;letter-spacing:0;color:#f3d798}
.reward-emblem{display:grid;place-items:center;margin:auto;width:56px;height:56px;border-radius:50%;border:1px solid #b99a56;background:#bb934c20}
.reward-emblem img{width:34px;height:34px}
.reward-details{display:grid;gap:8px}
.reward-line{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 12px;background:#080f1d88;border:1px solid #8298bb25;border-radius:10px;text-align:left;font-size:14px}
.reward-line>span{display:flex;align-items:center;gap:9px;min-width:0;overflow-wrap:anywhere;color:#c5cfe2}
.reward-line img{width:21px;height:21px;flex-shrink:0}
.reward-line strong{color:#f2d899;white-space:nowrap;font-size:16px}
.reward-summary{margin:0;font-size:14px}
#battle-result.lost{border-color:#b26273;background:#271725f5}
#battle-result.lost h2{color:#ffb9c8}

/* v2.15.3: readable equipment eligibility, with text as well as color. */
.item-requirements{display:grid;gap:7px;margin:12px 0;padding:12px;border:1px solid #647c9b40;border-radius:10px;background:#08101c88;font-size:12px}
.item-requirements .requirement{display:flex;align-items:center;gap:7px;line-height:1.5}
.item-requirements .met{color:#91e6b5}.item-requirements .unmet{color:#ffa3ad}
.item-requirements img{width:15px;height:15px;flex-shrink:0}
.item-requirements strong{font-size:12px}

/* v2.15.4: item inspection dialog, native top layer and keyboard focus. */
.item-inspect{display:inline-flex;padding:0;border:0;background:none;max-width:100%;border-radius:12px;cursor:zoom-in}
.item-inspect:hover{background:#c5aa6320;transform:none}.item-inspect .game-art{pointer-events:none}
.item-title-info{padding:0;border:0;background:none;text-align:left;font:inherit;color:inherit;cursor:zoom-in}
.item-title-info:hover{transform:none;background:none;color:#f1d598}
#item-detail-dialog{width:min(460px,calc(100vw - 28px));max-height:85vh;max-height:85dvh;padding:24px;border:1px solid #9a865e;border-radius:18px;background:linear-gradient(145deg,#202431,#101622);color:#e4eaf6;box-shadow:0 25px 80px #000b;overflow-y:auto}
#item-detail-dialog::backdrop{background:#030711b8}
.item-detail-header{display:flex;gap:16px;align-items:center;border-bottom:1px solid #9a865e66;padding-bottom:16px;margin-bottom:18px}
.item-detail-header>.game-art{width:82px;height:92px;flex-shrink:0}.item-detail-header h2{font-size:22px;color:#e9ce93;margin:0 0 9px;overflow-wrap:anywhere}.item-detail-header p{margin:8px 0 0;color:#abb7ce;font-size:13px}
#item-detail-dialog h3{font-size:13px;color:#d4bf94;margin:12px 0}
.item-detail-row{display:flex;justify-content:space-between;gap:15px;padding:10px 0;border-bottom:1px solid #8294ad30;font-size:14px}.item-detail-row b{color:#d7e5fa;text-align:right}
.item-detail-note{background:#ffffff06;border-left:3px solid #9a865e;padding:10px 12px;margin:14px 0;font-size:13px;color:#b9c7db}
.item-detail-close{display:block;margin:22px auto 0;min-width:150px;min-height:44px}

.inventory-bulk-sale{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px;border:1px solid #8e7446;border-radius:14px;background:#30271a55;margin:20px 0}.inventory-bulk-sale p{margin:5px 0;color:#ecd098}.inventory-bulk-sale small{color:#aab8ce}.inventory-bulk-sale button{min-height:44px}@media(max-width:600px){.inventory-bulk-sale button{width:100%}}

/* v2.15.6: desktop chat stays in normal flow; never grows through its notes/footer. */
@media(min-width:1251px){
 body[data-auth=yes] .app-shell>.rightbar{
  display:flex;flex-direction:column;align-self:start;min-width:0;
  height:auto;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);
  overflow-y:auto;overflow-x:hidden;gap:18px;padding-bottom:24px;
 }
 body[data-auth=yes] .rightbar>.utility-panel,
 body[data-auth=yes] .rightbar>.small{flex:0 0 auto;min-width:0;min-height:0;margin:0}
 body[data-auth=yes] .rightbar .chat-disclosure .chat-panel{
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;
  height:auto;min-height:0;margin:0;gap:12px;
 }
 body[data-auth=yes] .rightbar .chat-disclosure .section-title{margin:0;min-width:0;flex-wrap:wrap}
 body[data-auth=yes] .rightbar #chat{
  height:clamp(160px,30vh,340px);max-height:none;min-height:0;min-width:0;
  overflow-y:auto;overflow-x:hidden;margin:0;
 }
 body[data-auth=yes] .rightbar #chat-form{position:static;margin:0;min-width:0;align-items:center}
 body[data-auth=yes] .rightbar>.small{padding-top:14px;border-top:1px solid #30415e;line-height:1.7;overflow-wrap:anywhere}
 body[data-auth=yes] .app-shell>footer{position:static;min-width:0;align-self:end}
}

/* v2.15.7: bottom shortcuts are for phone layouts only. */
@media(min-width:721px){
 body[data-auth=yes]>.quick-nav{display:none}
 body[data-auth=yes] .app-shell{padding-bottom:0}
}

/* Inventory copies share a card; keep the quantity clear of its controls. */
.inventory-stack{position:relative}
.inventory-stack .card-top{padding-right:0;gap:12px;flex-wrap:wrap}
.inventory-art-wrap{position:relative;display:inline-flex;flex:0 0 auto}
.inventory-stack .card-top>.badge{position:static;flex:0 0 auto;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.inventory-count{position:absolute;bottom:0;top:auto;right:0;z-index:1;display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:5px 9px;border:1px solid #c7a866;border-radius:10px;background:#182338;color:#f1d598;font-size:14px;font-weight:750;line-height:1.25;font-variant-numeric:tabular-nums;pointer-events:none;box-shadow:0 3px 12px #0004}

.brand-mark img{display:block;width:100%;height:100%;object-fit:contain;padding:2px}

/* Fixed art dimensions prevent sprite-only buttons from collapsing. */
.item-inspect{width:120px;height:120px;flex:0 0 auto;align-items:center;justify-content:center}
.item-inspect>.item-picture{width:100%;height:100%;max-width:none;margin:0;animation:none}
.equipment-slot .item-inspect{width:58px;height:62px}
.item-grid .card:has(.item-picture) .card-top{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;padding-top:32px;margin-bottom:16px}
.item-grid .card:has(.item-picture) .card-top>.badge{position:absolute;top:0;right:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}
.inventory-art-wrap{width:120px;height:120px}
.inventory-art-wrap .item-inspect{width:100%;height:100%}
.inventory-count{bottom:4px;right:4px;padding:3px 7px;min-width:28px;border-radius:7px;font-size:12px}
.item-grid .card>.item-inspect{display:flex;margin:0 auto 14px}
.item-detail-header>.item-picture{width:96px;height:96px;flex:0 0 96px;animation:none}
@media(max-width:720px){
 .item-grid .item-inspect{padding:0!important}
 .item-grid .item-inspect,.inventory-art-wrap{width:96px;height:96px}
 .inventory-art-wrap .item-inspect{width:100%;height:100%}
 .item-grid .card:has(.item-picture) .card-top{gap:8px;margin-bottom:12px}
}

.set-collection{margin:24px 0}.set-card{margin:9px 0;padding:14px;border:1px solid #384b70;border-radius:12px;background:linear-gradient(120deg,#19253b,#101929)}
.set-card summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.set-card summary small{display:block;color:#a5b4cd;margin-top:4px;font-size:12px}.set-status{color:#d9bf7c;white-space:nowrap;font-weight:700}.set-complete{border-color:#b49a59;box-shadow:inset 0 0 24px #d9b85112}
.set-parts{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;margin:16px 0}.set-piece{display:flex;align-items:center;gap:9px;text-align:left;font-size:12px;padding:8px}.set-piece-art{width:48px;height:48px;flex:0 0 48px}.set-piece-art>.game-art{width:100%;height:100%;object-fit:contain;border-radius:7px}.set-piece small{display:block;color:#a5b4cd}.set-piece.worn{border-color:#72cbaa}.set-piece.owned{border-color:#8fa6eb}.set-piece.missing .set-piece-art{filter:grayscale(.8);opacity:.5}
.set-bonuses{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.set-bonuses span{padding:5px 8px;background:#0c1422;border-radius:6px;color:#8795ac}.set-bonuses .active{color:#86e2bb;background:#163329}.set-card>small{color:#a5b4cd;display:block}


.system-unread{display:inline-flex;align-items:center;justify-content:center;background:#b54464;color:#fff;border-radius:20px;min-width:20px;padding:1px 5px;font-size:11px;line-height:18px;margin-left:5px}.system-unread[hidden]{display:none}
