/* Libera Glass appearance layer. Geometry, safe areas and gesture ownership stay in their modules. */

body:not([data-layout-editing="true"]) .window-resize-grip{opacity:0!important;pointer-events:none!important}
body:not([data-layout-editing="true"]) .map-move,
body:not([data-layout-editing="true"]) .map-resize{opacity:0!important}
body[data-layout-editing="true"] .window-dock:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;min-width:28px;min-height:28px;pointer-events:auto!important}
body[data-layout-editing="true"] .window-resize-grip,
body[data-layout-editing="true"] .map-move,
body[data-layout-editing="true"] .map-resize{opacity:1!important;pointer-events:auto!important}
body[data-layout-editing="true"] .client-window:not([data-window=quests]):not([data-window=services]) > summary.libera-window-title,
body[data-layout-editing="true"] .mobile-sheet-header,
body[data-layout-editing="true"] #architect > header,
body[data-layout-editing="true"] #worldAtlas > header,
body[data-layout-editing="true"] #spawnEditor > header{cursor:grab;box-shadow:inset 0 0 0 1px rgba(229,194,124,.75)}
#layoutModeBar[hidden]{display:none!important}
#layoutModeBar{position:fixed;z-index:80;left:8px;top:8px;right:auto;bottom:auto;transform:none;display:flex;flex-flow:row nowrap;gap:8px;align-items:center;width:max-content;max-width:calc(100vw - 16px);padding:6px;pointer-events:auto;touch-action:manipulation;background:rgba(8,22,32,.94);border:1px solid rgba(229,194,124,.5);border-radius:999px;box-shadow:0 8px 18px rgba(0,8,16,.4)}
#layoutModeBar.layout-bar-stacked{flex-flow:column nowrap;align-items:stretch;border-radius:16px}
#layoutModeBar.layout-bar-tight{gap:4px;padding:3px}
#layoutModeBar.layout-bar-tight button{min-height:32px;padding:4px 7px;font-size:12px;line-height:1.1}
#layoutModeBar button,#finishControlLayout{min-height:36px;padding:6px 10px;border-radius:999px;background:#17323c;color:#f6edd4;border:1px solid #e5c27c;white-space:nowrap;font-size:13px}
#layoutModeBar #finishControlLayout{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important}

:root[data-ui-theme="glass"],
:root[data-ui-theme="reduced"]{
  --glass-fill:rgba(12,29,39,.46);
  --glass-text-fill:rgba(10,24,34,.67);
  --glass-raised:rgba(29,52,64,.46);
  --glass-edge:rgba(167,205,211,.28);
  --glass-gold:#e5c27c;
  --glass-cyan:#8adbe5;
  --glass-ink:#f2f5f2;
  --glass-muted:#bacbd0;
  --glass-hp-start:#a94743;
  --glass-hp-end:#db8770;
  --glass-mana-start:#285e83;
  --glass-mana-end:#71b9d1;
  --glass-radius-panel:16px;
  --glass-radius-control:12px;
  --glass-shadow:0 10px 28px rgba(0,8,15,.38);
  --glass-duration:120ms;
  --ui-surface:rgba(12,29,39,.46);
  --ui-raised:rgba(29,52,64,.46);
  --ui-edge:rgba(186,214,218,.55);
  --ui-ink:#f2f5f2;
  --ui-muted:#bacbd0;
  --ui-accent:#e5c27c;
  color-scheme:dark;
}
:root[data-ui-theme="reduced"],
:root[data-ui-motion="reduced"]{--glass-duration:0ms}
:root[data-ui-theme="glass"] body,
:root[data-ui-theme="reduced"] body{color:var(--glass-ink);background:#091820}
:root[data-ui-theme="glass"] body,
:root[data-ui-theme="glass"] button,
:root[data-ui-theme="glass"] input,
:root[data-ui-theme="glass"] select,
:root[data-ui-theme="glass"] textarea,
:root[data-ui-theme="reduced"] body,
:root[data-ui-theme="reduced"] button,
:root[data-ui-theme="reduced"] input,
:root[data-ui-theme="reduced"] select,
:root[data-ui-theme="reduced"] textarea{font-family:"Segoe UI","Avenir Next",ui-sans-serif,system-ui,-apple-system,sans-serif}

:root[data-ui-theme="glass"][data-ui-motion="full"] .mobile-sheet,
:root[data-ui-theme="glass"][data-ui-motion="full"] #conversationPanel,
:root[data-ui-theme="glass"][data-ui-motion="full"] #questJournalPanel,
:root[data-ui-theme="glass"][data-ui-motion="full"] #godConsole,
:root[data-ui-theme="glass"][data-ui-motion="full"] #architect,
:root[data-ui-theme="glass"][data-ui-motion="full"] #spawnEditor{
  -webkit-backdrop-filter:blur(8px) saturate(1.12);
  backdrop-filter:blur(8px) saturate(1.12);
}

:root[data-ui-theme="glass"] .topbar,
:root[data-ui-theme="reduced"] .topbar{
  background:linear-gradient(180deg,rgba(10,28,40,.62),rgba(8,20,30,.48))!important;
  border-bottom:1px solid rgba(229,194,124,.28)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
}
:root[data-ui-theme="glass"] .libera-brand img,
:root[data-ui-theme="reduced"] .libera-brand img{border-radius:50%;box-shadow:0 0 0 2px rgba(229,194,124,.7),0 0 0 5px rgba(8,22,32,.65)}
:root[data-ui-theme="glass"] .eyebrow,
:root[data-ui-theme="reduced"] .eyebrow,
:root[data-ui-theme="glass"] h1,
:root[data-ui-theme="reduced"] h1{color:var(--glass-gold);letter-spacing:.08em}
:root[data-ui-theme="glass"] .top-actions .ghost,
:root[data-ui-theme="reduced"] .top-actions .ghost,
:root[data-ui-theme="glass"] #connection,
:root[data-ui-theme="reduced"] #connection{border-radius:999px;background:rgba(8,24,34,.72);border:1px solid var(--glass-edge);color:var(--glass-ink)}

:root[data-ui-theme="glass"] .card,
:root[data-ui-theme="reduced"] .card,
:root[data-ui-theme="glass"] .account-form,
:root[data-ui-theme="reduced"] .account-form,
:root[data-ui-theme="glass"] .account-art,
:root[data-ui-theme="reduced"] .account-art,
:root[data-ui-theme="glass"] .roster,
:root[data-ui-theme="reduced"] .roster{
  background:
    radial-gradient(120% 80% at 0% 0%,rgba(138,219,229,.16),transparent 42%),
    linear-gradient(165deg,rgba(18,42,56,.78),rgba(8,20,30,.82))!important;
  border:1px solid rgba(229,194,124,.28)!important;
  border-radius:22px!important;
  box-shadow:var(--glass-shadow),inset 0 1px 0 rgba(255,255,255,.14)!important;
  color:var(--glass-ink);
}
:root[data-ui-theme="glass"] .account h2,
:root[data-ui-theme="reduced"] .account h2,
:root[data-ui-theme="glass"] .roster h2,
:root[data-ui-theme="reduced"] .roster h2{color:var(--glass-gold);font-weight:620}
:root[data-ui-theme="glass"] button.primary,
:root[data-ui-theme="reduced"] button.primary,
:root[data-ui-theme="glass"] .primary,
:root[data-ui-theme="reduced"] .primary{
  background:linear-gradient(180deg,#f0d7a2,#c49a55)!important;
  color:#1b140c!important;
  border:1px solid #f6e7c4!important;
  border-radius:999px!important;
  font-weight:680;
}
:root[data-ui-theme="glass"] button.secondary,
:root[data-ui-theme="reduced"] button.secondary{
  background:transparent!important;
  color:var(--glass-cyan)!important;
  border:1px solid rgba(138,219,229,.45)!important;
  border-radius:999px!important;
}
:root[data-ui-theme="glass"] input:not([type=range]):not([type=color]):not([type=checkbox]),
:root[data-ui-theme="glass"] select,
:root[data-ui-theme="glass"] textarea,
:root[data-ui-theme="reduced"] input:not([type=range]):not([type=color]):not([type=checkbox]),
:root[data-ui-theme="reduced"] select,
:root[data-ui-theme="reduced"] textarea{
  font-size:16px;
  color:var(--glass-ink);
  background:rgba(6,18,26,.88);
  border:1px solid rgba(167,205,211,.32);
  border-radius:12px;
}

:root[data-ui-theme="glass"] body.mobile-layout.in-realm #mobileVitals,
:root[data-ui-theme="reduced"] body.mobile-layout.in-realm #mobileVitals{
  background:
    linear-gradient(180deg,rgba(22,48,62,.78),rgba(8,22,32,.7))!important;
  border:1px solid rgba(229,194,124,.42)!important;
  border-radius:14px!important;
  box-shadow:0 8px 18px rgba(0,8,16,.35),inset 0 1px 0 rgba(255,255,255,.16)!important;
  color:var(--glass-ink);
}
:root[data-ui-theme="glass"] #mobileHeroName,
:root[data-ui-theme="reduced"] #mobileHeroName,
:root[data-ui-theme="glass"] #heroName,
:root[data-ui-theme="reduced"] #heroName{color:var(--glass-gold)!important}
:root[data-ui-theme="glass"] #mobileHeroCoordinates,
:root[data-ui-theme="reduced"] #mobileHeroCoordinates,
:root[data-ui-theme="glass"] #mobileHp,
:root[data-ui-theme="reduced"] #mobileHp,
:root[data-ui-theme="glass"] #mobileMana,
:root[data-ui-theme="reduced"] #mobileMana{font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:0}
:root[data-ui-theme="glass"] .mobile-meter,
:root[data-ui-theme="reduced"] .mobile-meter,
:root[data-ui-theme="glass"] .bar,
:root[data-ui-theme="reduced"] .bar{background:rgba(4,12,18,.72)!important;border:1px solid rgba(167,205,211,.2)!important;border-radius:999px!important;overflow:hidden}
:root[data-ui-theme="glass"] .mobile-meter.hp > i,
:root[data-ui-theme="reduced"] .mobile-meter.hp > i,
:root[data-ui-theme="glass"] #hpBar,
:root[data-ui-theme="reduced"] #hpBar,
:root[data-ui-theme="glass"] #targetHpBar,
:root[data-ui-theme="reduced"] #targetHpBar{background:linear-gradient(90deg,var(--glass-hp-start),var(--glass-hp-end))!important}
:root[data-ui-theme="glass"] .mobile-meter.mana > i,
:root[data-ui-theme="reduced"] .mobile-meter.mana > i,
:root[data-ui-theme="glass"] #manaBar,
:root[data-ui-theme="reduced"] #manaBar{background:linear-gradient(90deg,var(--glass-mana-start),var(--glass-mana-end))!important}

:root[data-ui-theme="glass"] body.mobile-layout .mobile-actions button,
:root[data-ui-theme="glass"] body.mobile-layout .mobile-actions .custom-hotkey,
:root[data-ui-theme="reduced"] body.mobile-layout .mobile-actions button,
:root[data-ui-theme="reduced"] body.mobile-layout .mobile-actions .custom-hotkey{
  border-radius:50%!important;
  color:#f7f1df!important;
  border:1px solid rgba(229,194,124,.55)!important;
  background:
    radial-gradient(circle at 32% 28%,rgba(210,236,240,.34),transparent 36%),
    linear-gradient(180deg,rgba(42,78,92,.94),rgba(10,28,38,.96))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 14px rgba(0,8,16,.35)!important;
}
:root[data-ui-theme="glass"] body.mobile-layout .mobile-actions #mobileAttack,
:root[data-ui-theme="reduced"] body.mobile-layout .mobile-actions #mobileAttack{border-color:#f0d7a2!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 8px 14px rgba(0,8,16,.32)!important}
:root[data-ui-theme="glass"] body.mobile-layout .mobile-actions #mobileAttack.attacking,
:root[data-ui-theme="reduced"] body.mobile-layout .mobile-actions #mobileAttack.attacking{background:linear-gradient(180deg,rgba(168,84,68,.95),rgba(78,32,32,.96))!important}
:root[data-ui-theme="glass"] body.mobile-layout .mobile-actions #mobileHeal,
:root[data-ui-theme="reduced"] body.mobile-layout .mobile-actions #mobileHeal{border-color:rgba(219,135,112,.7)!important}
:root[data-ui-theme="glass"] body.mobile-layout .mobile-actions #mobileInteract,
:root[data-ui-theme="reduced"] body.mobile-layout .mobile-actions #mobileInteract{border-color:rgba(138,219,229,.7)!important}
:root[data-ui-theme="glass"] #mobileChase,
:root[data-ui-theme="reduced"] #mobileChase,
:root[data-ui-theme="glass"] #chaseButton,
:root[data-ui-theme="reduced"] #chaseButton{border-radius:999px!important;border:1px solid rgba(138,219,229,.4)!important;background:rgba(12,32,42,.62)!important}
:root[data-ui-theme="glass"] #mobileJoystick,
:root[data-ui-theme="reduced"] #mobileJoystick{
  background:radial-gradient(circle,rgba(18,46,58,.42),rgba(8,18,26,.12) 68%,transparent 70%)!important;
  border:1px solid rgba(138,219,229,.38)!important;
  box-shadow:inset 0 0 0 8px rgba(8,20,28,.18);
}
:root[data-ui-theme="glass"] .joystick-thumb,
:root[data-ui-theme="reduced"] .joystick-thumb{background:radial-gradient(circle at 35% 30%,#f3e2bc,#c7a15d)!important;border:0!important}
:root[data-ui-theme="glass"] .compass-track,
:root[data-ui-theme="reduced"] .compass-track{stroke:rgba(138,219,229,.55);fill:none}
:root[data-ui-theme="glass"] .compass-north,
:root[data-ui-theme="reduced"] .compass-north{fill:var(--glass-gold)}
:root[data-ui-theme="glass"] #questBearingHint,
:root[data-ui-theme="reduced"] #questBearingHint{background:var(--glass-text-fill);color:var(--glass-gold);border:1px solid rgba(229,194,124,.4);border-radius:999px}

:root[data-ui-theme="glass"] body.mobile-layout.in-realm #mobileNavigation,
:root[data-ui-theme="reduced"] body.mobile-layout.in-realm #mobileNavigation{
  background:rgba(8,22,32,.5)!important;
  border:0!important;
  border-top:1px solid rgba(167,205,211,.28)!important;
  border-radius:0!important;
  box-shadow:0 -8px 24px rgba(0,0,0,.28);
}
:root[data-ui-theme="glass"] body.mobile-layout.in-realm #mobileNavigation button.selected,
:root[data-ui-theme="reduced"] body.mobile-layout.in-realm #mobileNavigation button.selected{background:rgba(229,194,124,.16)!important;color:var(--glass-gold)!important;box-shadow:inset 0 -2px 0 var(--glass-gold)}

:root[data-ui-theme="glass"] .client-window,
:root[data-ui-theme="reduced"] .client-window,
:root[data-ui-theme="glass"] .mobile-sheet,
:root[data-ui-theme="reduced"] .mobile-sheet,
:root[data-ui-theme="glass"] .sidebar,
:root[data-ui-theme="reduced"] .sidebar{
  background:var(--glass-fill)!important;
  border:1px solid var(--glass-edge)!important;
  border-radius:var(--glass-radius-panel)!important;
  box-shadow:var(--glass-shadow)!important;
  color:var(--glass-ink);
}
:root[data-ui-theme="glass"] .client-window > summary,
:root[data-ui-theme="reduced"] .client-window > summary,
:root[data-ui-theme="glass"] .mobile-sheet-header,
:root[data-ui-theme="reduced"] .mobile-sheet-header{
  background:linear-gradient(180deg,rgba(46,78,90,.7),rgba(16,36,48,.58))!important;
  color:var(--glass-ink)!important;
  border-bottom:1px solid rgba(229,194,124,.24)!important;
}
:root[data-ui-theme="glass"] .window-body,
:root[data-ui-theme="reduced"] .window-body{background:transparent}
:root[data-ui-theme="glass"] .inventory .bag-item,
:root[data-ui-theme="reduced"] .inventory .bag-item,
:root[data-ui-theme="glass"] .equipment .slot,
:root[data-ui-theme="reduced"] .equipment .slot{
  background:
    radial-gradient(circle at 50% 38%,rgba(54,92,104,.4),rgba(7,18,26,.58) 72%)!important;
  border:1px solid rgba(138,219,229,.24)!important;
  border-radius:12px!important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.35);
}
:root[data-ui-theme="glass"] .inventory .bag-item:focus,
:root[data-ui-theme="reduced"] .inventory .bag-item:focus,
:root[data-ui-theme="glass"] .equipment .slot:focus,
:root[data-ui-theme="reduced"] .equipment .slot:focus,
:root[data-ui-theme="glass"] .bag-item.drag-valid,
:root[data-ui-theme="reduced"] .bag-item.drag-valid{border-color:var(--glass-gold)!important;box-shadow:0 0 0 1px var(--glass-gold)}
:root[data-ui-theme="glass"] .item-quantity,
:root[data-ui-theme="reduced"] .item-quantity{color:#1b140c;background:var(--glass-gold);border-radius:999px;padding:0 4px;font-variant-numeric:tabular-nums}
:root[data-ui-theme="glass"] .item-icon,
:root[data-ui-theme="reduced"] .item-icon{image-rendering:pixelated}
:root[data-ui-theme="glass"] .paperdoll,
:root[data-ui-theme="reduced"] .paperdoll{background:radial-gradient(circle at 50% 40%,rgba(138,219,229,.12),transparent 60%);border-radius:16px}

:root[data-ui-theme="glass"] #conversationPanel,
:root[data-ui-theme="reduced"] #conversationPanel{
  background:var(--glass-text-fill)!important;
  border:1px solid rgba(229,194,124,.32)!important;
  border-radius:18px!important;
  box-shadow:var(--glass-shadow)!important;
}
:root[data-ui-theme="glass"] #conversationPanel > summary,
:root[data-ui-theme="reduced"] #conversationPanel > summary{background:transparent!important;border-bottom:1px solid rgba(229,194,124,.22)!important}
:root[data-ui-theme="glass"] #conversationTitle,
:root[data-ui-theme="reduced"] #conversationTitle{color:var(--glass-gold)}
:root[data-ui-theme="glass"] #dialogueText,
:root[data-ui-theme="reduced"] #dialogueText{color:var(--glass-ink)!important}
:root[data-ui-theme="glass"] #dialogueActions button,
:root[data-ui-theme="reduced"] #dialogueActions button,
:root[data-ui-theme="glass"] #npcTrade .trade-row,
:root[data-ui-theme="reduced"] #npcTrade .trade-row{border-radius:12px!important;background:rgba(20,44,56,.66)!important;border:1px solid rgba(138,219,229,.22)!important;color:var(--glass-ink)}
:root[data-ui-theme="glass"] #npcTrade .trade-row[aria-selected=true],
:root[data-ui-theme="reduced"] #npcTrade .trade-row[aria-selected=true],
:root[data-ui-theme="glass"] #dialogueActions button[aria-pressed=true],
:root[data-ui-theme="reduced"] #dialogueActions button[aria-pressed=true]{border-color:var(--glass-gold)!important}

:root[data-ui-theme="glass"] #questJournalPanel,
:root[data-ui-theme="reduced"] #questJournalPanel,
:root[data-ui-theme="glass"] body.mobile-layout #questJournalPanel,
:root[data-ui-theme="reduced"] body.mobile-layout #questJournalPanel{
  background:var(--glass-text-fill)!important;
  border:1px solid rgba(229,194,124,.34)!important;
  border-radius:18px!important;
  box-shadow:var(--glass-shadow)!important;
}
:root[data-ui-theme="glass"] #pinnedQuest,
:root[data-ui-theme="reduced"] #pinnedQuest{
  background:
    linear-gradient(180deg,rgba(229,194,124,.12),rgba(12,28,38,.4))!important;
  border:1px solid rgba(229,194,124,.4)!important;
  border-radius:14px!important;
}
:root[data-ui-theme="glass"] .pinned-label,
:root[data-ui-theme="reduced"] .pinned-label,
:root[data-ui-theme="glass"] .quest-next,
:root[data-ui-theme="reduced"] .quest-next{color:var(--glass-gold)!important}
:root[data-ui-theme="glass"] #questGroups > nav button[aria-pressed=true],
:root[data-ui-theme="reduced"] #questGroups > nav button[aria-pressed=true]{background:rgba(229,194,124,.16)!important;border-color:var(--glass-gold)!important;color:var(--glass-gold)}

:root[data-ui-theme="glass"] #miniMapWindow,
:root[data-ui-theme="reduced"] #miniMapWindow,
:root[data-ui-theme="glass"] #worldAtlas,
:root[data-ui-theme="reduced"] #worldAtlas{
  background:rgba(8,20,28,.78)!important;
  border:1px solid rgba(138,219,229,.28)!important;
  border-radius:16px!important;
  box-shadow:var(--glass-shadow)!important;
}
:root[data-ui-theme="glass"] .map-move,
:root[data-ui-theme="glass"] .map-resize,
:root[data-ui-theme="glass"] .map-expand,
:root[data-ui-theme="glass"] .map-close,
:root[data-ui-theme="glass"] .map-center,
:root[data-ui-theme="reduced"] .map-move,
:root[data-ui-theme="reduced"] .map-resize,
:root[data-ui-theme="reduced"] .map-expand,
:root[data-ui-theme="reduced"] .map-close,
:root[data-ui-theme="reduced"] .map-center{border-radius:999px;background:rgba(10,26,36,.9);color:var(--glass-gold);border:1px solid rgba(229,194,124,.35)}
:root[data-ui-theme="glass"] .chat-log,
:root[data-ui-theme="reduced"] .chat-log{background:rgba(6,16,24,.72)!important;border:1px solid rgba(167,205,211,.18);border-radius:12px;color:var(--glass-ink)}
:root[data-ui-theme="glass"] #chatForm input,
:root[data-ui-theme="reduced"] #chatForm input{font-size:16px}

:root[data-ui-theme="glass"] .more-grid button,
:root[data-ui-theme="glass"] .more-grid a,
:root[data-ui-theme="reduced"] .more-grid button,
:root[data-ui-theme="reduced"] .more-grid a{
  background:linear-gradient(160deg,rgba(36,68,80,.62),rgba(12,28,38,.5))!important;
  border:1px solid rgba(138,219,229,.22)!important;
  border-radius:16px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
:root[data-ui-theme="glass"] .more-icon,
:root[data-ui-theme="reduced"] .more-icon,
:root[data-ui-theme="glass"] .more-copy strong,
:root[data-ui-theme="reduced"] .more-copy strong{color:var(--glass-gold)!important}
:root[data-ui-theme="glass"] #toast,
:root[data-ui-theme="reduced"] #toast,
:root[data-ui-theme="glass"] #activeEffects span,
:root[data-ui-theme="reduced"] #activeEffects span{background:var(--glass-text-fill)!important;color:var(--glass-gold)!important;border:1px solid rgba(229,194,124,.35);border-radius:999px}
:root[data-ui-theme="glass"] .party-hud,
:root[data-ui-theme="reduced"] .party-hud,
:root[data-ui-theme="glass"] #hotkeyEditor,
:root[data-ui-theme="reduced"] #hotkeyEditor,
:root[data-ui-theme="glass"] #accountMenu,
:root[data-ui-theme="reduced"] #accountMenu,
:root[data-ui-theme="glass"] #godConsole,
:root[data-ui-theme="reduced"] #godConsole,
:root[data-ui-theme="glass"] #architect,
:root[data-ui-theme="reduced"] #architect,
:root[data-ui-theme="glass"] #spawnEditor,
:root[data-ui-theme="reduced"] #spawnEditor{
  background:var(--glass-fill)!important;
  color:var(--glass-ink)!important;
  border:1px solid rgba(229,194,124,.28)!important;
  border-radius:16px!important;
  box-shadow:var(--glass-shadow)!important;
}
:root[data-ui-theme="glass"] #architect header,
:root[data-ui-theme="reduced"] #architect header,
:root[data-ui-theme="glass"] #spawnEditor header,
:root[data-ui-theme="reduced"] #spawnEditor header,
:root[data-ui-theme="glass"] #worldAtlas header,
:root[data-ui-theme="reduced"] #worldAtlas header{background:linear-gradient(180deg,rgba(46,78,90,.7),rgba(16,36,48,.58))!important;color:var(--glass-gold)}
:root[data-ui-theme="glass"] #playerDeath,
:root[data-ui-theme="reduced"] #playerDeath{background:rgba(10,22,32,.96);border-color:var(--glass-gold);color:var(--glass-ink)}

/* Shared material. Fills stay readable when backdrop-filter is missing. No geometry, overflow, or pointer changes. */
:root[data-ui-theme="glass"] .inventory .bag-item,
:root[data-ui-theme="reduced"] .inventory .bag-item,
:root[data-ui-theme="glass"] #inventory .bag-item,
:root[data-ui-theme="reduced"] #inventory .bag-item{
  position:relative;
  background:
    linear-gradient(180deg,rgba(255,255,255,.07),transparent 28%),
    radial-gradient(circle at 50% 36%,rgba(72,118,132,.36),rgba(6,16,24,.58) 74%)!important;
  border:1px solid rgba(138,219,229,.32)!important;
  border-radius:14px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -10px 16px rgba(0,0,0,.28)!important;
  color:var(--glass-ink)!important;
}
:root[data-ui-theme="glass"] .equipment .slot,
:root[data-ui-theme="reduced"] .equipment .slot,
:root[data-ui-theme="glass"] #equipment .slot,
:root[data-ui-theme="reduced"] #equipment .slot{
  position:relative;
  background:
    linear-gradient(180deg,rgba(255,255,255,.05),transparent 30%),
    radial-gradient(circle at 50% 42%,rgba(48,78,90,.4),rgba(7,18,26,.58) 72%)!important;
  border:1px solid rgba(167,205,211,.28)!important;
  border-radius:14px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 0 0 1px rgba(0,0,0,.35)!important;
  color:var(--glass-muted)!important;
}
:root[data-ui-theme="glass"] #equipment .slot.equipped,
:root[data-ui-theme="reduced"] #equipment .slot.equipped{
  border-color:rgba(229,194,124,.72)!important;
  color:var(--glass-ink)!important;
  background:
    linear-gradient(180deg,rgba(229,194,124,.14),transparent 36%),
    radial-gradient(circle at 50% 40%,rgba(92,78,48,.4),rgba(10,22,32,.62) 74%)!important;
}
:root[data-ui-theme="glass"] .bag-item[data-rarity="uncommon"],
:root[data-ui-theme="reduced"] .bag-item[data-rarity="uncommon"]{border-color:#8fbf9a!important}
:root[data-ui-theme="glass"] .bag-item[data-rarity="rare"],
:root[data-ui-theme="reduced"] .bag-item[data-rarity="rare"]{border-color:#8adbe5!important}
:root[data-ui-theme="glass"] .bag-item[data-rarity="legendary"],
:root[data-ui-theme="reduced"] .bag-item[data-rarity="legendary"]{border-color:#e5c27c!important}
:root[data-ui-theme="glass"] .inventory .bag-item small,
:root[data-ui-theme="reduced"] .inventory .bag-item small,
:root[data-ui-theme="glass"] #equipment .equipped-name,
:root[data-ui-theme="reduced"] #equipment .equipped-name{color:var(--glass-ink)!important}
:root[data-ui-theme="glass"] .item-stat,
:root[data-ui-theme="reduced"] .item-stat{color:var(--glass-gold)!important}
:root[data-ui-theme="glass"] .inventory .item-quantity,
:root[data-ui-theme="reduced"] .inventory .item-quantity{
  position:absolute;
  top:4px;
  right:4px;
  min-width:1.35em;
  padding:0 5px;
  text-align:center;
  line-height:1.45;
  font-size:11px;
  z-index:1;
}
:root[data-ui-theme="glass"] .item-quantity:empty,
:root[data-ui-theme="reduced"] .item-quantity:empty{display:none}
:root[data-ui-theme="glass"] .paperdoll,
:root[data-ui-theme="reduced"] .paperdoll{
  background:
    radial-gradient(ellipse at 50% 42%,rgba(138,219,229,.16),transparent 58%),
    linear-gradient(180deg,rgba(16,36,48,.35),rgba(6,16,24,.2))!important;
  box-shadow:inset 0 0 0 1px rgba(229,194,124,.22);
  border-radius:18px;
}
:root[data-ui-theme="glass"] #fillAmmoSlot,
:root[data-ui-theme="reduced"] #fillAmmoSlot{
  background:rgba(16,40,52,.68)!important;
  color:var(--glass-ink)!important;
  border:1px solid rgba(138,219,229,.35)!important;
  border-radius:999px!important;
}
:root[data-ui-theme="glass"] .mobile-sheet-tabs,
:root[data-ui-theme="reduced"] .mobile-sheet-tabs{
  background:rgba(6,16,24,.55);
  border-radius:999px;
}
:root[data-ui-theme="glass"] .mobile-sheet-tabs button,
:root[data-ui-theme="reduced"] .mobile-sheet-tabs button{
  background:transparent!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  color:var(--glass-muted)!important;
}
:root[data-ui-theme="glass"] .mobile-sheet-tabs button.selected,
:root[data-ui-theme="reduced"] .mobile-sheet-tabs button.selected{
  background:linear-gradient(180deg,#f0d7a2,#c49a55)!important;
  color:#1b140c!important;
  border-color:#f6e7c4!important;
}
:root[data-ui-theme="glass"] #chatLog .chat-line,
:root[data-ui-theme="reduced"] #chatLog .chat-line{
  margin:0 0 4px;
  padding:6px 8px 6px 10px;
  border-radius:10px;
  background:rgba(16,36,48,.62);
  box-shadow:inset 3px 0 0 #e5c27c;
  color:var(--glass-ink);
}
:root[data-ui-theme="glass"] #chatLog .chat-line strong,
:root[data-ui-theme="reduced"] #chatLog .chat-line strong{color:var(--glass-gold);font-weight:650}
:root[data-ui-theme="glass"] #dialogueActions button,
:root[data-ui-theme="reduced"] #dialogueActions button,
:root[data-ui-theme="glass"] #spells button,
:root[data-ui-theme="reduced"] #spells button,
:root[data-ui-theme="glass"] #godMenu button,
:root[data-ui-theme="reduced"] #godMenu button,
:root[data-ui-theme="glass"] #hotkeyEditor button,
:root[data-ui-theme="reduced"] #hotkeyEditor button{
  background:linear-gradient(180deg,rgba(36,68,80,.96),rgba(12,28,38,.96))!important;
  color:var(--glass-ink)!important;
  border:1px solid rgba(138,219,229,.28)!important;
  border-radius:12px!important;
  box-shadow:inset 3px 0 0 rgba(229,194,124,.85);
  text-align:left;
}
:root[data-ui-theme="glass"] #godMenu select,
:root[data-ui-theme="reduced"] #godMenu select,
:root[data-ui-theme="glass"] #hotkeyEditor select,
:root[data-ui-theme="reduced"] #hotkeyEditor select{background:rgba(6,18,26,.92)!important;color:var(--glass-ink)!important;border:1px solid rgba(167,205,211,.32)!important;border-radius:12px}
:root[data-ui-theme="glass"] #pinnedQuest,
:root[data-ui-theme="reduced"] #pinnedQuest{box-shadow:inset 3px 0 0 #e5c27c,0 8px 16px rgba(0,8,16,.18)!important}
:root[data-ui-theme="glass"] .quest-row,
:root[data-ui-theme="reduced"] .quest-row{border-bottom:1px solid rgba(167,205,211,.16)}
:root[data-ui-theme="glass"] .quest-row>summary,
:root[data-ui-theme="reduced"] .quest-row>summary{color:var(--glass-ink)}
:root[data-ui-theme="glass"] .interface-preferences,
:root[data-ui-theme="reduced"] .interface-preferences{
  background:rgba(6,18,26,.45);
  border:1px solid rgba(167,205,211,.2);
  border-radius:14px;
}
:root[data-ui-theme="glass"] .interface-preferences .preference-actions button,
:root[data-ui-theme="reduced"] .interface-preferences .preference-actions button{
  background:rgba(16,40,52,.92);
  color:var(--glass-ink);
  border:1px solid rgba(229,194,124,.4);
  border-radius:999px;
}
:root[data-ui-theme="glass"] #miniMapWindow,
:root[data-ui-theme="reduced"] #miniMapWindow{box-shadow:var(--glass-shadow),inset 0 0 0 1px rgba(229,194,124,.35)!important}
:root[data-ui-theme="glass"] #mobileHeroName,
:root[data-ui-theme="reduced"] #mobileHeroName{letter-spacing:.04em}
:root[data-ui-theme="glass"] .mobile-meter>span,
:root[data-ui-theme="reduced"] .mobile-meter>span,
:root[data-ui-theme="glass"] #mobileHp,
:root[data-ui-theme="reduced"] #mobileHp,
:root[data-ui-theme="glass"] #mobileMana,
:root[data-ui-theme="reduced"] #mobileMana{color:#f7f1df!important;text-shadow:none}

:root[data-ui-contrast="more"][data-ui-theme="glass"] .client-window,
:root[data-ui-contrast="more"][data-ui-theme="reduced"] .client-window,
:root[data-ui-theme="glass"] body.high-contrast-ui .client-window,
:root[data-ui-theme="reduced"] body.high-contrast-ui .client-window,
:root[data-ui-theme="glass"] body.high-contrast-ui #conversationPanel,
:root[data-ui-theme="glass"] body.high-contrast-ui #questJournalPanel{background:rgba(3,10,16,.98)!important;border-color:#f3d48a!important;color:#fff}
:root[data-ui-motion="reduced"] button,
:root[data-ui-theme="reduced"] button,
:root[data-ui-motion="reduced"] .chase-glyph{animation:none!important;transition:none!important}
:root[data-ui-theme="glass"] button,
:root[data-ui-theme="reduced"] button{transition:background var(--glass-duration) ease,border-color var(--glass-duration) ease,transform var(--glass-duration) ease}

@media (prefers-reduced-motion:reduce){
  :root[data-ui-theme="glass"] button,
  :root[data-ui-theme="reduced"] button,
  :root[data-ui-theme="glass"] .chase-glyph{animation:none!important;transition:none!important}
}
:root[data-ui-theme="glass"] .mobile-sheet-backdrop,
:root[data-ui-theme="reduced"] .mobile-sheet-backdrop{background:rgba(4,10,16,.18)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
:root[data-ui-theme="glass"] #hudOverflow,
:root[data-ui-theme="reduced"] #hudOverflow,
:root[data-ui-theme="glass"] #itemActionMenu,
:root[data-ui-theme="reduced"] #itemActionMenu,
:root[data-ui-theme="glass"] #throwAimBanner,
:root[data-ui-theme="reduced"] #throwAimBanner,
:root[data-ui-theme="glass"] #accountMenu,
:root[data-ui-theme="reduced"] #accountMenu{background:var(--glass-text-fill);color:var(--glass-ink);border-color:rgba(229,194,124,.45)}
:root[data-ui-theme="glass"] .item-icon,
:root[data-ui-theme="reduced"] .item-icon,
:root[data-ui-theme="glass"] .item-icon img,
:root[data-ui-theme="reduced"] .item-icon img{opacity:1!important}

/* Polish: frost only the outer surface, never every control or item. */
:root[data-ui-theme="glass"] :is(#accountMenu,#mobileSheet,#questJournalPanel,#conversationPanel,#godConsole){background:var(--glass-fill)!important;border-color:rgba(184,219,224,.42)!important;box-shadow:inset 0 1px 0 #e4faff30,var(--glass-shadow)!important}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 :root[data-ui-theme="glass"][data-ui-motion="full"] :is(#accountMenu,#mobileSheet,#questJournalPanel,#conversationPanel){backdrop-filter:blur(6px) saturate(1.08);-webkit-backdrop-filter:blur(6px) saturate(1.08)}
}
:root[data-ui-theme="glass"] :is(#accountMenu .account-menu-items>button,.god-command-grid>button){background:rgba(24,47,60,.38)!important;color:#f5f7f2!important;text-shadow:0 1px 2px #000b}
:root[data-ui-theme="glass"] :is(#accountMenu>header,#questJournalPanel>summary,#conversationPanel>summary){background:rgba(22,43,56,.42)!important}
:root[data-ui-theme="reduced"] :is(#accountMenu,#mobileSheet,#questJournalPanel,#conversationPanel,#godConsole){background:rgba(12,29,39,.78)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#godMenu{min-width:0}
#godMenu .god-tool-links,#godMenu .god-form-actions{display:flex;gap:6px;flex-wrap:wrap}
#godMenu .god-tool-links>button{flex:1;min-width:110px}
#godMenu #godSearch,#godMenu #godCategory{width:100%;min-height:40px;box-sizing:border-box;margin:5px 0}
#godMenu #godCommandCount{margin:5px 0;font:12px/1.4 system-ui;color:var(--ui-muted,#b5c9c8)}
#godMenu .god-command-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#godMenu .god-command-grid>button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;min-width:0;min-height:64px;padding:9px!important;text-align:left;white-space:normal;line-height:1.3}
#godMenu .god-command-grid>button strong{font:600 13px/1.3 system-ui}
#godMenu .god-command-grid>button small{font:11px/1.3 system-ui;color:var(--ui-muted,#b5c9c8)}
#godMenu .god-command-fields{padding:8px;border:1px solid #8db8be55;border-radius:10px;margin:6px 0;background:#142b3540}
#godMenu .god-command-fields[hidden]{display:none!important}
#godMenu .god-command-fields>strong{display:block;margin-bottom:8px}
#godMenuResult{font:12px/1.45 system-ui;max-height:150px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border-top:1px solid #8db8be40;padding-top:8px}
:root[data-ui-theme="glass"] body.high-contrast-ui :is(#accountMenu,#mobileSheet,#questJournalPanel,#conversationPanel,#godConsole){background:rgba(3,10,16,.96)!important}

:root[data-ui-theme="glass"] #mobileSheet :is(#rightSidebar,.client-window){background:transparent!important;box-shadow:none!important;backdrop-filter:none;-webkit-backdrop-filter:none}

/* Completed Glass: one translucent outer surface, readable content, no stacked blur. */
:root[data-ui-theme="glass"] :is(#mobileSheet .window-body,#mobileSheet .sidebar,#mobileSheet .client-window,#godConsole .window-body,#questJournalPanel .window-body,#conversationPanel .window-body){background:transparent!important;box-shadow:none!important}
:root[data-ui-theme="reduced"] :is(#mobileSheet .window-body,#mobileSheet .sidebar,#mobileSheet .client-window){background:transparent!important;box-shadow:none!important}
:root[data-ui-theme="glass"] :is(#accountSafety,#itemActionMenu){background:var(--glass-text-fill)!important;border-color:var(--glass-edge)!important;box-shadow:var(--glass-shadow)!important;color:var(--glass-ink)!important}
:root[data-ui-theme="glass"] :is(#inventory .bag-item,#equipment .slot){background:linear-gradient(160deg,#d8f4fa14,#0a1b262e)!important}
:root[data-ui-theme="glass"] #equipment .slot.equipped{background:linear-gradient(160deg,#e5c27c25,#0a1b263b)!important}
:root[data-ui-theme="glass"] :is(#dialogueText,#questText .quest-navigation,#godMenuResult){text-shadow:0 1px 2px #07151fee}
:root[data-ui-theme="glass"] :is(#accountMenu .account-menu-items>button,#dialogueActions button,#godMenu .god-command-grid>button){background:rgba(12,30,42,.26)!important;border-color:#b5dfe738!important}
:root[data-ui-theme="glass"] :is(#accountMenu .account-menu-items>button,#godMenu .god-command-grid>button):hover{background:rgba(45,80,94,.55)!important;border-color:#e5c27c88!important}
:root[data-ui-theme="glass"] :is(.interface-preferences,.god-command-fields){background:rgba(8,23,33,.16)!important}
:root[data-ui-theme="glass"] #mobileSheet :is(.client-window,#godConsole){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-color:transparent!important}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 :root[data-ui-theme="glass"][data-ui-motion="full"] :is(#accountMenu,#accountSafety,#conversationPanel,#questJournalPanel,#mobileSheet),
 :root[data-ui-theme="glass"][data-ui-motion="full"] body:not(.mobile-layout) .libera-free-window{backdrop-filter:blur(6px) saturate(1.08);-webkit-backdrop-filter:blur(6px) saturate(1.08)}
}
:root:is([data-ui-theme="reduced"],[data-ui-motion="reduced"]) :is(.client-window,#mobileSheet,#accountMenu,#accountSafety,#conversationPanel,#questJournalPanel,#architect,#spawnEditor){backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
:root[data-ui-theme="reduced"] #accountSafety{background:rgba(12,29,39,.9)!important;color:#f2f5f2}
:root[data-ui-contrast="more"]:is([data-ui-theme="glass"],[data-ui-theme="reduced"]) :is(.client-window,#mobileSheet,#accountMenu,#accountSafety,#conversationPanel,#questJournalPanel){background:rgba(3,10,16,.97)!important;color:#fff!important}
#godMenu .god-parameter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#godMenu .god-parameter-grid label{display:flex;flex-direction:column;gap:4px;min-width:0;font:12px/1.4 system-ui}
#godMenu .god-parameter-grid :is(input,select){box-sizing:border-box;min-width:0;width:100%;min-height:40px;font-size:16px;padding:6px}
#godMenu .god-command-fields>p{font:12px/1.45 system-ui;margin:5px 0 10px}
#godMenu .god-form-actions{margin-top:10px}
#godMenu .god-form-actions button,#godMenu .god-result-actions button,#godUseSelection{min-height:40px;padding:7px 10px;margin-top:6px}
#godMenu .god-command-grid>button:focus-visible,#godMenu :is(input,select,button):focus-visible{outline:2px solid #e5c27c;outline-offset:2px}
#godMenu :is(button,input,select):disabled{opacity:.55;cursor:wait}
#godMenu .god-tool-links button:disabled{pointer-events:none}
#godMenu details{font:12px/1.45 system-ui;margin-top:8px}
#godMenu #godMenuResult{max-height:120px;margin:8px 0 4px}
#godMenu #godCommandCount{font-variant-numeric:tabular-nums}
#godMenu :is(.god-command-fields,#godUseSelection)[hidden]{display:none!important}
@media(max-width:360px){#godMenu .god-command-grid>button{padding:7px!important;min-height:60px}#godMenu .god-command-grid>button strong{font-size:12px}}

/* Keep the parameter form touchable on narrow phones without changing other panels. */
body.mobile-layout[data-mobile-panel="god"] #mobileSheet{min-width:min(300px,calc(100vw - 16px))}

/* Reserve one line for identity and a second for level and location. */
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileVitals {
  border-radius: 9px !important;
  padding: 2px 5px !important;
  box-shadow: inset 0 1px 0 rgba(219, 239, 242, .12) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileVitals > div:first-child {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 18px 14px;
  align-items: center;
  justify-content: start;
  column-gap: 6px !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileHeroName {
  grid-column: 1 / -1;
  font: 650 14px/18px system-ui, sans-serif !important;
  letter-spacing: 0;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileVitals > div:first-child > span {
  font: 500 10px/14px system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
  color: var(--glass-ink);
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileVitals .mobile-meter {
  height: 100% !important;
  border-radius: 5px !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileVitals .mobile-meter > span {
  font: 650 11px/1 system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
  color: white !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) #mobileHpBar {
  background: linear-gradient(90deg, #793e40, #9e4745) !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) #mobileManaBar {
  background: linear-gradient(90deg, #244b64, #326380) !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout #mobileSheet .mobile-sheet-header {
  height: 44px !important;
  min-height: 44px !important;
  max-height: none !important;
  padding-inline: 9px 3px !important;
  background: rgba(13, 32, 39, .92);
  border-bottom: 1px solid var(--glass-edge);
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout #mobileSheet .mobile-sheet-header h2 {
  font: 650 15px/1.2 system-ui, sans-serif !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout #mobileSheet .mobile-sheet-header > button {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileVitals > div:has(.long-name) {
  grid-template-rows: 22px 12px;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm #mobileHeroName.long-name {
  white-space: normal;
  overflow-wrap: anywhere;
  font: 650 11px/11px system-ui, sans-serif !important;
}
:root:is([data-ui-theme="glass"], [data-ui-theme="reduced"]) body.mobile-layout.in-realm.mobile-sheet-minimized #mobileSheet.libera-free-window {
  height: 48px !important;
}


/* Keep guidance readable over bright paving while retaining the Glass material. */
:root[data-ui-theme="glass"]:not([data-ui-contrast="more"]) body.mobile-layout:not(.high-contrast-ui)[data-mobile-panel="controls"] #mobileSheet {
  background: rgba(12, 29, 39, .74) !important;
}

/* Keep the tinted glass surface while avoiding live blur over the moving mobile canvas. */
:root[data-ui-theme="glass"] body.mobile-layout.in-realm :is(#accountMenu,#mobileSheet,#questJournalPanel,#conversationPanel,#godConsole,#architect,#spawnEditor){
  background:linear-gradient(160deg,#183745f2,#0b202cf5)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

body.mobile-layout.in-realm #world{
  transform:translateZ(0);
}
:root[data-ui-theme="glass"] body.mobile-layout.in-realm :is(#mobileVitals,#mobileNavigation,#mobileJoystick,.mobile-actions){
  box-shadow:inset 0 1px 0 #b9d6dc20!important;
}
