/* A quiet unread count reuses the Journal button; no additional HUD panel. */
#journal[data-pending-memories] { position: relative; }
#journal[data-pending-memories]::after {
  content: attr(data-pending-memories);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;
  border-radius: 7px;
  background: #e4c785;
  color: #19282c;
  font: 600 10px/14px sans-serif;
  text-align: center;
  pointer-events: none;
}
#recovered-story {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
/* Geometry follows the real header and panel sizes, including host labels. */
@media (max-width: 760px) {
  #hud.hud-compact .quest-panel {
    top: var(--hud-guide-top, 98px);
    max-height: var(--hud-guide-max-height, calc(100dvh - 350px));
  }
  #hud.hud-compact .minimap-panel {
    top: var(--hud-guide-top, 98px);
  }
  #hud.hud-compact .coop-panel {
    --coop-panel-top: var(--hud-party-top, 174px);
    max-height: var(--hud-party-max-height, calc(100dvh - 430px));
  }
}

/* The roster already marks your courier. Connected play needs no repeated
   role/status paragraph; waiting, away and error states remain visible. */
#hud.hud-compact:not(.party-expanded) .coop-panel:not(.party-expanded) #coop-you,
#hud.hud-compact:not(.party-expanded) .coop-panel:not(.party-expanded) #coop-connection.is-live:not(.problem) {
  display: none;
}

/* Keep a promise's counter and unit together instead of orphaning the unit
   after a narrow title row. The complete native progress text is retained. */
#hud.hud-compact .tracked-quest > #tracked-progress {
  display: block;
  margin: 3px 0 0;
}

/* Coaching occupies a measured free side column, without moving other cards. */
#hud #parry-practice {
  box-sizing: border-box;
  left: var(--practice-left, auto);
  top: var(--practice-top, 250px);
  right: auto;
  width: var(--practice-width, 270px);
}
@media (max-width: 760px) {
  #hud #parry-practice { width: var(--practice-width, min(176px, calc(50vw - 36px))); }
}
#hud #parry-practice.practice-compact { padding: 4px 6px; }
#hud #parry-practice.practice-compact #practice-title { font-size: 10px; line-height: 1.25; }
#hud #parry-practice.practice-compact #practice-status,
#hud #parry-practice.practice-compact #practice-hint,
#hud #parry-practice.practice-compact #practice-countdown {
  font-size: 9px;
  line-height: 1.3;
  margin-top: 3px;
}
#hud #parry-practice.practice-compact #practice-progress:not([hidden]) { display: block; height: 4px; margin-top: 3px; }

/* Compact coaching retains the instruction, timing and progress. The repeated
   E action is already shown by the native-priority interaction prompt. */
#hud #parry-practice.practice-compact #practice-hint { display: none; }
