/* v99.1 gameplay chrome — compact HUD, no tap stealers */

/* Slim one-line target bar under the unit frame, never over the minimap */
.v97 #target-card{
  position:fixed!important;
  top:calc(96px + var(--st))!important;
  left:calc(10px + var(--sl))!important;
  right:auto!important;
  transform:none!important;
  width:min(240px, calc(100vw - 132px))!important;
  max-width:min(240px, calc(100vw - 132px))!important;
  z-index:26!important;
  padding:4px 8px 5px!important;
  pointer-events:auto!important;
  display:flex!important;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 8px;
}
.v97 #target-card.hidden{display:none!important}
.v97 #target-card .target-toggle93,
.v97 #target-card .target-state,
.v97 #target-card .target-actions93{display:none!important}
.v97 #target-card .target-head{
  display:flex!important;align-items:center;gap:6px;flex:1 1 auto;min-width:0;
  padding:0!important;
}
.v97 #target-card .target-name{
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  line-height:1.2!important;font-size:12px!important;flex:1;min-width:0;
}
.v97 #target-card .target-hp{
  flex:1 1 100%;height:8px!important;margin:0!important;border-radius:2px!important;
}
.v97 #target-card [data-target="clear"]{
  width:22px;height:22px;min-width:22px;padding:0;border:0;background:none;
  color:#f0d48a;font-size:16px;line-height:1;
}
@media (max-width:430px){
  .v97 #target-card{
    top:calc(96px + var(--st))!important;
    width:min(220px, calc(100vw - 118px))!important;
    max-width:calc(100vw - 118px)!important;
    left:calc(8px + var(--sl))!important;
  }
  /* Keep party frame from stacking on the slim target bar */
  .v97 #wow-party.on{top:auto!important;bottom:calc(168px + var(--sb))!important;left:calc(8px + var(--sl))!important}
}
@media (orientation:landscape) and (max-height:450px){
  .v97 #target-card{
    top:calc(72px + var(--st))!important;
    left:calc(8px + var(--sl))!important;
    width:min(220px, 40vw)!important;
    transform:none!important;
  }
}

/* Floating combat numbers */
.hs{position:fixed;z-index:40;pointer-events:none;font:800 22px/1 Verdana,sans-serif;
  text-shadow:0 1px 2px #000,0 0 6px #000;transform:translate(-50%,-50%)}
.hs.r{color:#ffe8a0}
.hs.miss,.hs.b{color:#c9d4ee;font-size:16px;font-weight:700}
.hs.pop{animation:hsPop99 .85s ease-out forwards}
@keyframes hsPop99{0%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}
  100%{opacity:0;transform:translate(-50%,-120%) scale(.9)}}

/* Context menu: below minimap / bottom-center, not over the map */
#menu, #menu.stone, .v97 #menu{
  position:fixed!important;
  right:calc(8px + var(--sr))!important;
  left:auto!important;
  top:auto!important;
  bottom:calc(150px + var(--sb))!important;
  z-index:30!important;
  max-width:min(240px, calc(100vw - 24px));
}
@media (min-width:800px){
  #menu, .v97 #menu{bottom:calc(120px + var(--sb))!important}
}

/* Settings: title and description on separate lines */
.v97 .tog93 span, .v97 .slide93 span, .tog93 span, .slide93 span{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  gap:2px!important;min-width:0;flex:1;
}
.v97 .tog93 b, .v97 .slide93 b, .tog93 b, .slide93 b{display:block;font:700 14px var(--wow-serif),Georgia,serif;color:var(--wow-gold2,#f0d48a)}
.v97 .tog93 small, .v97 .slide93 small, .tog93 small, .slide93 small{
  display:block!important;font:12px/1.3 var(--wow-ui),system-ui,sans-serif!important;
  color:#cbb88a!important;white-space:normal!important;margin-top:1px;
}

/* Unify bottom nav: hide the alternate sheet strip; keep #nav87 */
.sheet93-tabs{display:none!important}
#sheet93[open] ~ #hud #nav87, body:has(#sheet93[open]) #nav87,
#nav87{z-index:36!important}
#sheet93 .sheet93-inner, #sheet93{padding-bottom:calc(64px + var(--sb))!important}

/* Safe-area mobile controls */
@media (max-width:430px){
  .v97 #move-stick{bottom:calc(118px + var(--sb))!important;left:calc(8px + var(--sl))!important}
  .v97 #epic-actions{bottom:calc(118px + var(--sb))!important;right:calc(8px + var(--sr))!important}
  #wow-bar{bottom:calc(64px + var(--sb))!important}
  #wow-xp{bottom:calc(50px + var(--sb))!important}
}

/* 8-slot action bar only; hide the side Attack / Specials stack.
   Interact is a context button and only appears when something is nearby. */
.v97 #epic-actions .action-attack,
.v97 #epic-actions .action-specials,
#epic-actions .action-attack,
#epic-actions .action-specials{display:none!important}
.v97 #epic-actions .action-interact,
#epic-actions .action-interact{display:none!important}
body.near99 .v97 #epic-actions .action-interact,
body.near99 #epic-actions .action-interact{display:flex!important}
#wow-bar{max-width:96vw;overflow:visible}
#wow-bar button:nth-child(n+9){display:none!important}

/* Compact quest pill — top right, under the minimap, like an ambient status */
#qpill99{
  position:fixed;z-index:27;pointer-events:auto;cursor:pointer;
  right:calc(8px + var(--sr));top:calc(128px + var(--st));
  max-width:min(168px, 46vw);
  display:none;align-items:center;gap:6px;
  padding:4px 8px 4px 7px;border-radius:999px;
  background:#14110ef2;border:1px solid #c9a44a99;color:#f3ead2;
  box-shadow:0 2px 10px #0008;user-select:none;
}
#qpill99.on{display:inline-flex}
#qpill99 .dot{width:7px;height:7px;border-radius:50%;background:#7dff8a;box-shadow:0 0 6px #6dff7a;flex:0 0 auto}
#qpill99 .line{font:700 11px/1.2 var(--wow-ui),system-ui,sans-serif;color:#ffe9a0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
#qpill99 .prog{font:700 10px/1 var(--wow-ui),system-ui,sans-serif;color:#cbb88a;flex:0 0 auto}
#qtoast99{
  position:fixed;z-index:28;pointer-events:none;
  right:calc(8px + var(--sr));top:calc(158px + var(--st));
  max-width:min(180px, 50vw);
  padding:5px 8px;border-radius:8px;
  background:#1a1408f0;border:1px solid #d4b046;color:#ffe9a0;
  font:700 11px/1.3 var(--wow-ui),system-ui,sans-serif;
  display:none;opacity:0;transition:opacity .2s;
}
#qtoast99.on{display:block;opacity:1}
@media (max-width:430px){
  #qpill99{top:calc(118px + var(--st));max-width:min(150px, 42vw);padding:3px 7px}
  #qtoast99{top:calc(146px + var(--st))}
}

/* Hide the bulky quest panel on all layouts — the pill replaces it */
.v97 #quests95, #quests95, .v97 #quests95.open, #quests95.open,
.v97 #quests95-tab, #quests95-tab{display:none!important}

/* Quest / gather / door chrome */
#qarrow99{position:fixed;z-index:22;pointer-events:none;width:0;height:0;display:none;
  border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:18px solid #ffd24a;
  filter:drop-shadow(0 1px 2px #000)}
#qarrow99 .lab{position:absolute;top:20px;left:50%;transform:translateX(-50%);
  font:700 10px/1 var(--wow-ui),system-ui;color:#ffe9a0;white-space:nowrap;text-shadow:0 1px 2px #000;
  pointer-events:none}
#qdetail99{position:fixed;inset:auto 12px 90px 12px;max-width:420px;margin:auto;z-index:40;
  background:linear-gradient(180deg,#2a2620f8,#12100cf8);border:1px solid #d4b046;border-radius:8px;
  padding:12px 14px 14px;color:#f3ead2;display:none;box-shadow:0 8px 28px #000c;pointer-events:auto}
#qdetail99.on{display:block}
#qdetail99 h3{margin:0 0 6px;font:700 16px Georgia,serif;color:#f0d48a}
#qdetail99 p,#qdetail99 li{font:13px/1.4 system-ui;margin:4px 0}
#qdetail99 .x{position:absolute;right:8px;top:6px;background:none;border:0;color:#f0d48a;font-size:20px}
#gathlab99{position:fixed;z-index:27;display:none;pointer-events:auto;cursor:pointer;
  transform:translate(-50%,-120%);
  background:#1a1408ee;border:1px solid #d4b046;color:#ffe9a0;padding:5px 10px;border-radius:12px;
  font:700 12px var(--wow-ui),system-ui;text-shadow:0 1px 2px #000;white-space:nowrap}
#doorprompt99{position:fixed;z-index:27;display:none;transform:translate(-50%,-130%);
  background:#1a1408ee;border:1px solid #e8c56a;color:#ffe9a0;padding:8px 14px;border-radius:14px;
  font:700 13px Georgia,serif;pointer-events:auto;cursor:pointer;min-width:96px}
#interior99-veil{position:fixed;inset:0;display:none;pointer-events:none;
  background:radial-gradient(ellipse at center,#0000 45%,#0008 100%);z-index:2}

#chaos-notice{left:50%;transform:translateX(-50%);top:calc(8px + var(--st));width:min(420px,92vw);
  text-align:center;z-index:29;pointer-events:none;font:700 14px/1.3 Georgia,serif;color:#ffe0a0;
  text-shadow:0 1px 3px #000,0 0 8px #400;background:#1a0808cc;border:1px solid #e05030;border-radius:8px;
  padding:6px 10px;box-sizing:border-box}
#chaos-notice:empty{display:none!important}

/* Decorative / leftover layers must never eat taps */
#qarrow99, #interior99-veil, #chaos-notice, #qtoast99, #safe87, #bwbuild, #mbadge, #fps93{
  pointer-events:none!important;
}

/* Don't let the pill sit on top of sheets or the world map */
body:has(#sheet93[open]) #qpill99,
body:has(#wmap:not(.hidden)) #qpill99,
body:has(#qdetail99.on) #qarrow99{visibility:hidden;pointer-events:none!important}
body:has(#sheet93[open]) #qpill99, body:has(#wmap:not(.hidden)) #qpill99{display:none!important}
