@media (min-width:901px), (orientation:landscape) and (max-height:600px) and (max-width:1100px){
body.r2-desktop-immersive{margin:0!important;padding:0!important;overflow:hidden!important;background:#121910!important}
body.r2-desktop-immersive .page,body.r2-desktop-immersive main.layout{margin:0!important;padding:0!important;max-width:none!important;width:100vw!important;height:100dvh!important;background:none!important;border:0!important}
body.r2-desktop-immersive .top-bar,body.r2-desktop-immersive #locLandscapeLeftHead,body.r2-desktop-immersive #locMainPanel>.loc-map-head,body.r2-desktop-immersive #locPlaceHint{display:none!important}
body.r2-desktop-immersive #locMainPanel{display:contents!important}
body.r2-desktop-immersive #locMainPanel .location-map-stage{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;display:block!important;padding:0!important;margin:0!important;z-index:0!important}
body.r2-desktop-immersive #locMainPanel #locationMapWrap{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;min-height:0!important;aspect-ratio:auto!important;border:0!important;border-radius:0!important;margin:0!important;background:#192314!important}
body.r2-desktop-immersive #locationMapImage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;max-height:none!important;border-radius:0!important}
body.r2-desktop-immersive #locationMapMarkers{position:absolute!important;inset:0!important}body.r2-desktop-immersive #locationMapMarkers:after{display:none!important}
body.r2-desktop-immersive #locationsSidePanel,body.r2-desktop-immersive #monstersSidePanel{position:fixed!important;top:74px!important;z-index:100!important;width:210px!important;max-height:32vh!important;overflow:auto!important;padding:12px!important;background:#0a100ec2!important;border:1px solid #b8ad7255!important;box-shadow:0 4px 20px #0005;border-radius:5px!important;box-sizing:border-box}
body.r2-desktop-immersive #locationsSidePanel{left:12px!important}body.r2-desktop-immersive #monstersSidePanel{right:12px!important}
body.r2-desktop-immersive #historySection{position:fixed!important;left:12px!important;bottom:74px!important;top:auto!important;width:clamp(260px,27vw,370px)!important;height:220px!important;padding:7px!important;margin:0!important;display:flex!important;flex-direction:column!important;z-index:100!important;background:#0a100eb8!important;border:1px solid #b8ad7255!important;border-radius:5px!important;box-sizing:border-box}
body.r2-desktop-immersive #historySection .loc-social-links,body.r2-desktop-immersive #historySection>h2,body.r2-desktop-immersive .chat-window-bg{display:none!important}
body.r2-desktop-immersive .loc-chat-head{position:static!important;order:2!important;margin:4px 0 0!important;display:flex!important}
body.r2-desktop-immersive .loc-chat-tabs{display:flex!important;width:100%;gap:4px}
body.r2-desktop-immersive .loc-chat-tab{background:#242b20cc!important;color:#e6e4d4!important;border:1px solid #91885f66!important;border-radius:3px!important;min-height:27px!important;padding:4px!important;flex:1;font-size:11px!important}
body.r2-desktop-immersive .loc-chat-tab.is-active{background:#6b613bba!important}
body.r2-desktop-immersive .loc-chat-panels{flex:1;min-height:0!important;height:auto!important}
body.r2-desktop-immersive #chatWindow,body.r2-desktop-immersive .loc-chat-panel{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;background:transparent!important;border:0!important}
body.r2-desktop-immersive #chatWindowOverlay{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
body.r2-desktop-immersive #historyList{position:absolute!important;inset:4px!important;width:auto!important;height:auto!important;margin:0!important;overflow:auto!important;font:12px/1.5 Arial!important;color:#ece9a0!important}
body.r2-desktop-immersive #locMainPanel .loc-stack-side{position:fixed!important;bottom:14px!important;left:50%!important;transform:translateX(-50%);width:clamp(350px,37vw,520px)!important;max-width:none!important;margin:0!important;padding:9px!important;background:#0b110dcc!important;border:1px solid #b8ad7277!important;border-radius:5px!important;z-index:110!important;box-sizing:border-box}
body.r2-desktop-immersive .loc-vital-bars{width:100%!important;max-width:none!important;margin:0 0 5px!important;gap:3px!important}
body.r2-desktop-immersive .loc-vital-bar{height:16px!important;border-radius:2px!important;font-size:11px!important}
body.r2-desktop-immersive .loc-hotbar-wrap,body.r2-desktop-immersive #locHotbar{width:100%!important;max-width:none!important;margin:0!important}
body.r2-desktop-immersive .immersive-nav{position:fixed;top:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;z-index:100;background:#0c120dda;border:1px solid #b8ad7277;border-radius:5px;padding:5px 8px;color:#eee7cf}
body.r2-desktop-immersive .immersive-nav #locationFieldLabel{position:static!important;margin:0!important;color:inherit!important;min-width:125px;font-size:12px!important}
body.r2-desktop-immersive .immersive-nav .loc-field-arrow{position:static!important;inset:auto!important;transform:none!important;height:30px!important;min-height:30px!important;width:34px!important;min-width:34px!important;border-radius:3px!important;background:#4d4b36!important}
}

body.r2-desktop-immersive #historySection h2{display:none!important}

/* Preview revision: separate vitals and hotbar, anchored independently. */
body.r2-desktop-immersive #locMainPanel .loc-stack-side{display:contents!important;position:static!important;transform:none!important;background:none!important;border:0!important;padding:0!important}
body.r2-desktop-immersive #locMainPanel .loc-vital-bars{position:fixed!important;left:50%!important;bottom:8px!important;transform:translateX(-50%)!important;width:min(300px,30vw)!important;padding:7px!important;margin:0!important;z-index:110!important;background:linear-gradient(#303226ec,#101910ec)!important;border:1px solid #9b9266!important;border-radius:4px!important;box-shadow:0 3px 12px #0009;box-sizing:border-box}
body.r2-desktop-immersive #locMainPanel .loc-hotbar-wrap{position:fixed!important;left:calc(50% + min(150px,15vw) + 10px)!important;bottom:8px!important;right:auto!important;transform:none!important;width:min(420px,calc(50vw - min(150px,15vw) - 22px))!important;margin:0!important;padding:4px!important;z-index:110!important;background:#11190fe6!important;border:1px solid #9b9266!important;border-radius:4px!important;box-sizing:border-box}
.preview-chat-plus{margin-left:4px;flex:0 0 28px;width:28px;height:28px;background:#474b31;color:#eee5be;border:1px solid #9b9266;border-radius:3px;font:20px Arial;cursor:pointer}
.preview-extra-chat{position:fixed;z-index:120;width:340px;max-width:calc(100vw - 16px);height:235px;max-height:calc(100dvh - 16px);display:flex;flex-direction:column;background:#08110dd9;border:1px solid #9b9266;border-radius:5px;box-shadow:0 5px 22px #0007;color:#e8e3cb;font:12px Arial;overflow:hidden;box-sizing:border-box}
body:not(.r2-desktop-immersive) .preview-extra-chat,body:not(.r2-desktop-immersive) .preview-chat-plus{display:none!important}
.preview-extra-chat header{display:flex;align-items:center;justify-content:space-between;flex:none;padding:6px 8px;background:linear-gradient(#50503dd9,#242b1ecc);cursor:grab;touch-action:none;user-select:none;min-height:32px}.preview-extra-chat header:active{cursor:grabbing}.preview-extra-chat header span{opacity:.6;font-size:15px;margin-right:6px}.preview-extra-chat button{color:#e8e3cb;border:1px solid #a09262;background:#303827;border-radius:3px;cursor:pointer;min-width:25px;min-height:25px}.preview-chat-filters{display:flex;gap:10px;padding:8px;border-bottom:1px solid #8e895144;flex-wrap:wrap}.preview-chat-filters label{display:flex;align-items:center;gap:4px;cursor:pointer}.preview-chat-filters input{accent-color:#b8a966;margin:0}.preview-extra-messages{overflow:auto;flex:1;min-height:0;padding:8px;line-height:1.6}.preview-extra-messages p{margin:0 0 5px}.preview-extra-empty{color:#aaa58e}.preview-extra-chat:focus-within{border-color:#dacc8d}
body.r2-desktop-immersive #historySection .loc-chat-head{display:flex!important;flex-direction:row!important;align-items:center!important;gap:3px!important}body.r2-desktop-immersive #historySection .loc-chat-tabs{flex:1!important;min-width:0!important;width:auto!important}


body.r2-desktop-immersive .npc-village-shop-scene,body.r2-desktop-immersive .npc-travel-scene{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;margin:0!important}body.r2-desktop-immersive .npc-travel-bg{width:100%!important;height:100%!important;object-fit:cover!important}body.r2-desktop-immersive .immersive-nav[hidden]{display:none!important}
/* Desktop revision: edge navigation, optional bestiary, original image framing. */
body.r2-desktop-immersive .immersive-nav{position:static!important;transform:none!important;padding:0!important;border:0!important;background:none!important;display:contents!important}
body.r2-desktop-immersive #locationFieldLabel{display:none!important}
body.r2-desktop-immersive .immersive-nav .loc-field-arrow{position:fixed!important;top:48%!important;bottom:auto!important;transform:translateY(-50%)!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;width:56px!important;height:76px!important;font:48px Georgia!important;color:#fff!important;opacity:.45;z-index:115;text-shadow:0 2px 5px #000;cursor:pointer}
body.r2-desktop-immersive .immersive-nav .loc-field-arrow:hover,body.r2-desktop-immersive .immersive-nav .loc-field-arrow:focus-visible{opacity:1}
body.r2-desktop-immersive .immersive-nav #locFieldPrev{left:8px!important;right:auto!important}
body.r2-desktop-immersive .immersive-nav #locFieldNext{right:8px!important;left:auto!important}
body.r2-desktop-immersive #locBtnBackDomains{position:fixed!important;top:14px!important;left:14px!important;z-index:115}
.immersive-monster-help{display:none}.immersive-monster-close{display:none}
body.r2-desktop-immersive .immersive-monster-help:not([hidden]){display:block;position:fixed;right:18px;top:18px;width:38px;height:38px;border-radius:50%;border:2px solid #a99961;background:radial-gradient(circle at 35% 25%,#696449,#211f17 75%);box-shadow:0 2px 8px #0009,inset 0 0 0 2px #25251b;color:#f4e7bb;font:bold 26px Georgia;cursor:pointer;z-index:125}
body.r2-desktop-immersive #monstersSidePanel{visibility:hidden!important;pointer-events:none!important;top:64px!important;right:18px!important;width:340px!important;max-height:calc(100vh - 180px)!important;padding-top:35px!important;z-index:124!important}
body.r2-desktop-immersive.immersive-monsters-open #monstersSidePanel{visibility:visible!important;pointer-events:auto!important}
body.r2-desktop-immersive .immersive-monster-close{display:block;position:absolute;right:8px;top:5px;background:transparent;border:0;color:#e9dba6;font-size:23px;cursor:pointer}
body.r2-desktop-immersive #locationMapImage,body.r2-desktop-immersive .npc-travel-bg{object-fit:scale-down!important;object-position:center!important}
body.r2-desktop-immersive #locationMapMarkers{inset:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:var(--original-map-width,100%)!important;height:var(--original-map-height,100%)!important}
body.r2-desktop-immersive .domains-pick-grid,body.r2-desktop-immersive .npc-travel-dialog-host,body.r2-desktop-immersive .npc-village-dialog-host{position:fixed!important;left:clamp(230px,12vw,260px)!important;top:38px!important;right:auto!important;width:328px!important;height:min(520px,calc(100vh - 170px))!important;max-width:calc(100vw - 260px)!important;z-index:120!important}
body.r2-desktop-immersive .npc-travel-dialog{width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;font-size:12px!important}
body.r2-desktop-immersive #locationMapImage{background:#11170f!important}
body.r2-desktop-immersive #monstersSidePanel{background:#10150ff5!important}
/* Fill the desktop viewport; retain image proportions. */
body.r2-desktop-immersive #locationMapImage,body.r2-desktop-immersive .npc-travel-bg{object-fit:cover!important;object-position:center!important}
body.r2-desktop-immersive #locationMapMarkers{inset:0!important;left:0!important;top:0!important;transform:none!important;width:100%!important;height:100%!important}

/* NPC dialogs can be dragged by their title within the desktop viewport. */
body.r2-desktop-immersive .npc-travel-dialog-host,body.r2-desktop-immersive .npc-village-dialog-host{left:clamp(0px,var(--npc-dialog-x,clamp(230px,12vw,260px)),calc(100vw - 328px))!important;top:clamp(0px,var(--npc-dialog-y,38px),calc(100vh - min(520px,100vh - 170px)))!important}
body.r2-desktop-immersive .npc-travel-dialog__title{cursor:grab;touch-action:none;user-select:none}
body.r2-desktop-immersive .npc-travel-dialog__title.is-dragging{cursor:grabbing}


/* Test server: existing authenticated location editor above the scene. */
body.r2-desktop-immersive #locAdminBar.is-visible:not([hidden]){display:flex!important;position:fixed!important;top:10px!important;left:50%!important;transform:translateX(-50%);z-index:180!important;gap:6px;padding:8px;max-width:calc(100vw - 250px);flex-wrap:wrap;background:#171b13ed;border:1px solid #a99961;border-radius:5px}
body.r2-desktop-immersive #locEditorPanel{position:fixed!important;right:12px!important;top:76px!important;bottom:auto!important;left:auto!important;width:360px!important;max-width:calc(100vw - 24px)!important;max-height:calc(100vh - 200px)!important;overflow:auto!important;z-index:170!important;box-sizing:border-box;background:#12180ff5!important;padding:12px!important;border:1px solid #a99961!important}
body.r2-desktop-immersive #locEditorPanel input:not([type=checkbox]),body.r2-desktop-immersive #locEditorPanel select{max-width:100%;box-sizing:border-box}
body.r2-desktop-immersive #locationMapMarkers .loc-marker{height:clamp(160px,32vh,380px)!important;width:auto!important;min-width:0!important;aspect-ratio:1 / 1.15!important}


/* Keep channel tabs outside the bounded, scrollable message area. */
body.r2-desktop-immersive #historySection{overflow:hidden!important}
body.r2-desktop-immersive #historySection .loc-chat-head{flex:0 0 30px!important;position:relative!important;z-index:3!important;min-height:30px!important}
body.r2-desktop-immersive #historySection .loc-chat-panels{flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
body.r2-desktop-immersive #historySection .loc-chat-panel[hidden]{display:none!important}
body.r2-desktop-immersive #historySection .loc-global-chat,body.r2-desktop-immersive #historySection .loc-private-chat{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;margin:0!important;padding:0!important}
body.r2-desktop-immersive #historySection .global-chat-messages{flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important}
body.r2-desktop-immersive #historySection .global-chat-input-container,body.r2-desktop-immersive #historySection .global-chat-pinned,body.r2-desktop-immersive #historySection .loc-private-chat-peer{flex:0 0 auto!important}
body.r2-desktop-immersive #historySection .global-chat-input{min-width:0!important;width:100%!important}
/* Independent bestiary window; browsing never starts an attack. */
body.r2-desktop-immersive #monstersSidePanel{left:50%!important;right:auto!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(820px,calc(100vw - 60px))!important;height:min(590px,calc(100vh - 120px))!important;max-height:none!important;display:grid!important;grid-template-columns:190px minmax(0,1fr);grid-template-rows:30px 24px minmax(0,1fr);gap:8px 16px;padding:18px!important;overflow:hidden!important;background:linear-gradient(135deg,#28291ff7,#10150ffb)!important;box-shadow:0 12px 55px #000c!important;border:1px solid #a99961!important;z-index:190!important}
body.r2-desktop-immersive #monstersSidePanel>.panel-title{grid-column:1 / -1;font-size:18px;color:#e8d59f;padding-right:30px}
body.r2-desktop-immersive #monstersSubtitle{grid-column:1 / -1}
body.r2-desktop-immersive #monstersList{grid-column:1;grid-row:3;overflow:auto!important;max-height:none!important;margin:0!important;min-height:0}
body.r2-desktop-immersive #monsterDetail,body.r2-desktop-immersive #monsterDetailEmpty{grid-column:2;grid-row:3;overflow:auto!important;min-height:0!important;margin:0!important}
body.r2-desktop-immersive #monsterName{font-size:19px!important;color:#f3e1b2}
body.r2-desktop-immersive #monsterSpriteBox{height:160px!important;min-height:160px!important;margin:8px 0!important;background:radial-gradient(ellipse,#626a3938,transparent 70%)}
body.r2-desktop-immersive #monsterSprite{max-height:160px!important;height:160px!important;max-width:100%!important;object-fit:contain}
body.r2-desktop-immersive #monstersSidePanel #monsterStats,body.r2-desktop-immersive #monstersSidePanel #locCombatControls{display:none!important}
body.r2-desktop-immersive #monsterDropIcons{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:9px!important}
body.r2-desktop-immersive .monster-drop-icon{display:flex!important;flex-direction:column!important;align-items:center!important;width:auto!important;height:auto!important;min-height:110px;padding:8px!important;border:2px solid var(--drop-color,#aaa)!important;border-radius:6px;background:#10160f!important;box-sizing:border-box}
[data-frequency=high]{--drop-color:#65bb79}[data-frequency=medium]{--drop-color:#6daee0}[data-frequency=low]{--drop-color:#b18ad6}[data-frequency=very-low]{--drop-color:#e5b260}
body.r2-desktop-immersive .monster-drop-icon-img{order:-1;width:42px!important;height:42px!important;margin-bottom:6px}
.drop-item-label{text-align:center;font-size:11px;line-height:1.35;color:#ece8dc}.drop-frequency-label{font-size:10px;color:var(--drop-color);margin-top:5px}.drop-frequency-legend{font-size:11px;line-height:1.6;color:#cbc7b7;margin:8px 0 12px}
body.r2-desktop-immersive #monstersList{align-content:start;grid-auto-rows:min-content}
body.r2-desktop-immersive #monsterDrop{flex:0 0 auto}
body.r2-desktop-immersive #monsterDropIcons{max-height:none!important;overflow:visible!important}

body.r2-desktop-immersive #locationsSidePanel.preview-hide-field-players{display:none!important}

/* Original 32px R2 cursors, with built-in hotspots and native fallbacks. */
@media (hover:hover) and (pointer:fine){
body.r2-desktop-immersive{cursor:url('/images/cursors/normal.cur'),default}
body.r2-desktop-immersive button,body.r2-desktop-immersive a[href],body.r2-desktop-immersive select,body.r2-desktop-immersive summary,body.r2-desktop-immersive [role=button],body.r2-desktop-immersive [role=tab],body.r2-desktop-immersive input[type=button],body.r2-desktop-immersive input[type=submit],body.r2-desktop-immersive input[type=checkbox],body.r2-desktop-immersive input[type=radio]{cursor:url('/images/cursors/gui_act.cur'),pointer!important}
body.r2-desktop-immersive button *,body.r2-desktop-immersive a[href] *,body.r2-desktop-immersive [role=button] *,body.r2-desktop-immersive [role=tab] *{cursor:inherit!important}
body.r2-desktop-immersive .loc-field-arrow,body.r2-desktop-immersive #locBtnBackDomains{cursor:url('/images/cursors/normal.cur'),default!important}
body.r2-desktop-immersive .loc-field-arrow.is-dungeon-portal{cursor:url('/images/cursors/portal.cur'),pointer!important}
body.r2-desktop-immersive .inventory-cell.empty,body.r2-desktop-immersive .inventory-cell.empty *{cursor:url('/images/cursors/normal.cur'),default!important}
body.r2-desktop-immersive #monstersList .monster-card,body.r2-desktop-immersive #monstersList .monster-card *{cursor:url('/images/cursors/gui_act.cur'),pointer!important}
body.r2-desktop-immersive #locationMapWrap:not(.is-edit) .loc-marker{cursor:url('/images/cursors/attack.cur'),crosshair!important}
body.r2-desktop-immersive #locationMapWrap:not(.is-edit) .loc-marker *{cursor:inherit!important}
body.r2-desktop-immersive input:not([type]),body.r2-desktop-immersive input[type=text],body.r2-desktop-immersive input[type=password],body.r2-desktop-immersive input[type=search],body.r2-desktop-immersive input[type=email],body.r2-desktop-immersive input[type=number],body.r2-desktop-immersive textarea,body.r2-desktop-immersive [contenteditable=true]{cursor:text!important}
body.r2-desktop-immersive button:disabled,body.r2-desktop-immersive input:disabled,body.r2-desktop-immersive select:disabled{cursor:not-allowed!important}
}

body:not(.r2-desktop-immersive) .drop-frequency-legend,body:not(.r2-desktop-immersive) .drop-item-label,body:not(.r2-desktop-immersive) .drop-frequency-label{display:none!important}
picture.r2-desktop-npc-picture{display:contents}

/* Desktop: bestiary on the left, effects on the right. */
body.r2-desktop-immersive:not(.r2-phone-immersive) #locBuffBar{position:fixed!important;top:18px!important;right:18px!important;left:auto!important;max-width:min(280px,40vw)!important;flex-wrap:wrap!important;justify-content:flex-end!important}

body.r2-desktop-immersive:not(.r2-phone-immersive) #locBtnBackDomains{display:none!important}
body.r2-desktop-immersive:not(.r2-phone-immersive) .immersive-monster-help{left:14px!important;right:auto!important;top:14px!important}
body.r2-desktop-immersive:not(.r2-phone-immersive) #locQuestHud{top:64px!important}

body.r2-desktop-immersive #monstersSidePanel .immersive-monster-close{z-index:5;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;display:flex;align-items:center;justify-content:center;line-height:1;touch-action:manipulation}
body.r2-desktop-immersive #monstersSidePanel>.panel-title{padding-right:48px}
