/* Cooldowns sweep clockwise from twelve o'clock without changing the slot size. */
.r-slot-cooldown{position:absolute;inset:1px;z-index:1;border-radius:2px;pointer-events:none;background:conic-gradient(from 0deg,transparent 0deg var(--cooldown-angle,0deg),#06121edb var(--cooldown-angle,0deg) 360deg)}
.r-slot small{z-index:2}.r-slot-tip{z-index:3}
.r-damage-meter{position:absolute;top:94px;left:10px;width:172px;z-index:7;padding:7px 9px;border:1px solid #4662708c;border-radius:6px;background:#0c202be6;color:#cadde7;box-sizing:border-box;max-height:220px;overflow:auto;font-size:10px;line-height:1.4;pointer-events:auto}
.r-damage-meter summary{display:flex;justify-content:space-between;gap:12px;cursor:pointer;color:#a5cbd9;font-size:11px;font-variant-numeric:tabular-nums}
.r-damage-meter summary:before{content:'▾';font-size:9px}.r-damage-meter:not([open]) summary:before{content:'▸'}
#r-damage-total{margin-left:auto;color:#e7f5fa}#r-damage-rows{display:grid;gap:6px;margin-top:8px}#r-damage-rows p{margin:0;font-size:10px}
.r-damage-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px;min-width:0;font-variant-numeric:tabular-nums}.r-damage-row span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.r-damage-row b{font-weight:600;color:#eef8ff}.r-damage-row i{height:2px;grid-column:1/-1;max-width:100%;background:#78c7d8;border-radius:2px}
#rogue-panel[data-mode=upgrade]:has(#r-screen:not([hidden]))>.r-bottom,#rogue-panel[data-mode=evolution]:has(#r-screen:not([hidden]))>.r-bottom{visibility:visible;z-index:55}
#rogue-panel[data-mode=upgrade]:has(#r-screen:not([hidden])) .r-bottom .r-slot,#rogue-panel[data-mode=evolution]:has(#r-screen:not([hidden])) .r-bottom .r-slot{pointer-events:auto}
#r-screen:has(.r-cards),#rogue-panel[data-mode=evolution] #r-screen{bottom:108px;padding:14px 16px;box-sizing:border-box}
#r-screen .r-resource-help summary{cursor:pointer;font-size:11px}#r-screen .r-resource-help p{margin:6px 0 0;font-size:11px;line-height:1.5}
@media(max-width:700px),(max-height:500px) and (max-width:1000px){
 #rogue-panel #r-screen .r-desktop-hint{display:none}
 #rogue-panel #r-screen{font-size:11px;padding:10px 8px}
 #rogue-panel #r-screen .r-title,#rogue-panel #r-screen .r-launch .r-title{font-size:16px;line-height:1.25;margin:5px 0}
 #rogue-panel #r-screen .r-copy,#rogue-panel #r-screen .r-launch .r-copy,#rogue-panel #r-screen .r-meta{font-size:10px;line-height:1.45}
 #rogue-panel #r-screen .r-overline{font-size:9px;line-height:14px;letter-spacing:1px}
 #rogue-panel #r-screen .r-btn,#rogue-panel #r-screen .r-launch .r-btn,#rogue-panel #r-screen .r-launch .r-start{font-size:11px;min-height:28px;height:28px;padding:0 6px}
 #rogue-panel #r-screen .r-stage-detail{font-size:10px;line-height:1.5;padding:7px}
 #rogue-panel #r-screen .r-launch-grid{gap:8px}.r-launch-head{margin-bottom:8px;padding-bottom:8px}
 #rogue-panel #r-screen .r-character-starter{padding:6px;min-height:48px;height:auto;font-size:11px}.r-character-starter img{width:28px;height:28px}
 #rogue-panel #r-screen .r-character-starter small,#rogue-panel #r-screen .r-character-starter em{font-size:10px}
 #rogue-panel[data-mode] .r-combat-top{grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);gap:4px;top:5px;left:5px;right:5px;height:54px;min-height:54px;padding:0}
 #rogue-panel .r-status-block{height:54px;padding:4px 6px}#rogue-panel .r-clock-block{height:34px;padding:3px}
 #rogue-panel .r-status-name{font-size:8px;height:11px;line-height:11px}#rogue-panel #r-health-label,#rogue-panel #r-gold,#rogue-panel #r-round{font-size:9px;line-height:12px;height:12px}
 #rogue-panel #r-time{font-size:10px;line-height:12px;height:12px}
 #rogue-panel .r-stats-block{height:44px;min-height:44px;grid-template-rows:11px 22px;padding:4px;gap:3px}
 #rogue-panel .r-stats-block>div:first-child{font-size:9px;line-height:11px;gap:2px;flex-basis:56px}#rogue-panel .r-hud-actions .r-btn{width:25px;height:23px;min-height:23px;font-size:10px}
 #rogue-panel .r-minimap{top:64px;width:56px;right:6px}
 #rogue-panel .r-bottom{bottom:max(5px,env(safe-area-inset-bottom));padding:5px 6px;gap:3px;width:calc(100% - 10px);height:auto;min-height:0}
 #rogue-panel .r-bottom #r-message{font-size:9px;height:13px;min-height:13px;line-height:13px}
 #rogue-panel #r-build{gap:7px;height:auto;max-width:100%;flex-wrap:wrap}.r-slot-group{gap:3px}.r-slot-label{width:36px;font-size:9px;line-height:12px}
 #rogue-panel .r-slot{width:25px;height:25px}#rogue-panel .r-slot img{width:21px;height:21px}.r-slot-row{gap:3px}.r-slot small{font-size:8px;line-height:11px;min-width:10px}
 #rogue-panel .r-equipment-bar{height:auto;min-height:25px}#rogue-panel .r-xp-row{font-size:9px;height:12px;min-height:12px;line-height:12px}#rogue-panel #r-xp-label{font-size:9px;width:100px}
 #rogue-panel #r-dash{bottom:84px;min-height:30px;height:30px;min-width:52px;font-size:10px;padding:4px 7px}
 #rogue-panel .r-damage-meter{top:64px;left:5px;width:135px;padding:5px 6px;font-size:9px;max-height:158px}.r-damage-meter summary{font-size:10px}.r-damage-row{gap:2px}#r-damage-rows{gap:4px;margin-top:5px}
 #rogue-panel #r-screen:has(.r-cards),#rogue-panel[data-mode=evolution] #r-screen{position:absolute;inset:5px 4px 100px;z-index:50;border:1px solid #3d5a68;border-radius:7px;background:#0d202cdd;justify-content:center;gap:5px;padding:9px 6px;overflow:auto;backdrop-filter:blur(2px)}
 #rogue-panel #r-screen:has(.r-cards)>.r-copy{margin:0;line-height:1.4;font-size:9px}
 #rogue-panel #r-screen .r-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:54px 28px 32px 17px minmax(56px,auto) minmax(56px,auto) 27px;gap:5px;width:100%;max-width:none;margin:4px 0}
 #rogue-panel #r-screen .r-choice-slot{display:grid;grid-template-rows:subgrid;grid-row:span 7;min-width:0}
 #rogue-panel #r-screen .r-card{display:grid;grid-template-rows:subgrid;grid-row:span 6;padding:0 6px 6px;border-radius:6px;min-width:0;min-height:0;height:auto;font-size:10px;gap:5px;overflow:hidden}
 #rogue-panel #r-screen .r-card .r-card-top{height:54px;margin:0 -6px;padding:17px 0 0!important;display:flex;align-items:center;justify-content:center;box-sizing:border-box}
 #rogue-panel #r-screen .r-ability-art{width:32px;height:32px;object-fit:contain}
 #rogue-panel #r-screen .r-card b{font-size:11px;line-height:15px;min-height:0;height:auto;text-align:left;overflow-wrap:anywhere;word-break:keep-all}
 #rogue-panel #r-screen .r-card span,#rogue-panel #r-screen .r-card .r-ability-category,#rogue-panel #r-screen .r-card .r-upgrade-level{font-size:9px;line-height:1.4;letter-spacing:0;height:auto;min-height:0}
 #rogue-panel #r-screen .r-card .r-ability-category{max-height:28px;overflow:hidden;word-break:keep-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 #rogue-panel #r-screen .r-card .r-ability-description,#rogue-panel #r-screen .r-card .r-synergy-hint{margin:0;padding:0;font-size:9px;line-height:1.4;min-width:0;max-height:88px;word-break:keep-all;overflow-wrap:anywhere;overflow:auto}
 #rogue-panel #r-screen .r-card .r-synergy-hint{padding-top:5px;border-top:1px solid #416071}
 #rogue-panel #r-screen .r-card b .r-weapon-name{display:flex;align-items:center;justify-content:flex-start;gap:3px;font-size:11px;line-height:15px;white-space:normal;text-align:left}#rogue-panel #r-screen .r-card b img.r-element-icon{width:11px;height:11px;min-width:11px;max-width:11px;flex:0 0 11px}
 #rogue-panel #r-screen .r-card .r-evolution-extra{font-size:8px;line-height:1.4}
 #rogue-panel #r-screen .r-card .r-pick-rate{font-size:8px;line-height:12px;top:3px;left:5px;right:16px;white-space:nowrap}.r-choice-key{width:15px!important;height:15px!important;top:3px!important;right:3px!important;font-size:8px!important}
 #rogue-panel #r-screen .r-banish{font-size:9px;min-height:27px;height:27px;padding:0 2px;border-radius:4px;white-space:normal;line-height:12px}
 #rogue-panel #r-screen .r-upgrade-tools{height:28px;min-height:28px;gap:5px;font-size:9px;margin:3px 0}.r-upgrade-tools span{font-size:9px}
 #rogue-panel #r-screen .r-resource-help{margin:0;padding:5px 7px;font-size:9px;line-height:1.4}.r-resource-help summary{font-size:9px!important}
 #rogue-panel #r-screen .r-adventure-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#rogue-panel #r-screen .r-adventure-card{padding:10px 7px;min-height:140px;font-size:10px}#rogue-panel #r-screen .r-adventure-card strong{font-size:12px}
}
@media(max-height:500px){#rogue-panel #r-screen:has(.r-cards),#rogue-panel[data-mode=evolution] #r-screen{inset:3px 4px 68px;justify-content:flex-start;padding:5px}#rogue-panel #r-screen .r-cards{grid-template-rows:28px 20px 24px 12px 36px 36px 23px;gap:3px}#rogue-panel #r-screen .r-card .r-card-top{height:28px;padding-top:8px!important}#rogue-panel #r-screen .r-ability-art{width:20px;height:20px}#rogue-panel #r-screen .r-ability-description,#rogue-panel #r-screen .r-synergy-hint{overflow:auto}#rogue-panel #r-screen:has(.r-cards)>.r-overline,#rogue-panel #r-screen:has(.r-cards)>.r-copy,#rogue-panel #r-screen .r-resource-help{display:none}#rogue-panel .r-damage-meter{top:60px;max-height:106px}#rogue-panel .r-bottom{width:calc(100% - 120px)}#rogue-panel #r-dash{bottom:12px}}
@media(max-height:500px){
 #rogue-panel #r-screen:has(.r-cards){gap:3px;padding:4px}
 #rogue-panel #r-screen:has(.r-cards)>.r-title{margin:0}
 #rogue-panel #r-screen .r-upgrade-tools,#rogue-panel #r-screen .r-cards{margin:0}
 #rogue-panel #r-screen .r-card .r-ability-category{max-height:20px;-webkit-line-clamp:1}
}
@media(max-width:700px) and (max-height:650px) and (min-height:501px){
 #rogue-panel #r-screen .r-cards{grid-template-rows:42px 24px 30px 15px 52px 64px 24px;gap:4px}
 #rogue-panel #r-screen .r-card .r-card-top{height:42px;padding-top:11px!important}
 #rogue-panel #r-screen .r-ability-art{width:28px;height:28px}
 #rogue-panel #r-screen .r-card .r-ability-description{max-height:52px}
 #rogue-panel #r-screen .r-card .r-synergy-hint{max-height:64px}
 #rogue-panel #r-screen:has(.r-cards)>.r-overline,#rogue-panel #r-screen .r-resource-help{display:none}
}
/* The immersive exit remains reachable above choices and other game menus. */
.arcade-immersive #rogue-panel:has(#r-screen:not([hidden]))>.r-combat-top{z-index:60}

/* Wrap additional administrator-configured slots within the floating HUD. */
.r-slot-row{flex-wrap:wrap;min-width:0}.r-slot-group{min-width:0;max-width:100%}
.r-vault-icons>.r-copy{grid-column:1/-1}
