/* ── HUD (§7 / §15 / §17.2) ── */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: env(safe-area-inset-top, 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 17px;
  padding-right: 17px;
  height: 44px;
  z-index: 10;
  pointer-events: auto;
}

.hud::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 112px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5, 8, 15, 0.46), rgba(5, 8, 15, 0.20) 52%, transparent 100%);
}

/* Glass HUD icon button — §7 / §15.1 / §17.2 */
.hud-glass-icon {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(247, 249, 252, 0.08), transparent 66%),
    linear-gradient(to bottom, rgba(15, 24, 39, 0.34), rgba(15, 24, 39, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(0.92);
  clip-path: var(--clip-cut-sm);
}

/* Glass HUD title chip — §7 / §15.1 / §17.2: to right gradient + center line */
.hud-glass-title {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(to bottom, transparent 0 46%, rgba(247, 249, 252, 0.12) 47% 53%, transparent 54%),
    linear-gradient(to right, rgba(15, 24, 39, 0.30), rgba(15, 24, 39, 0.12) 78%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(0.92);
  clip-path: var(--clip-cut-sm);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Title chip */
.hud-scene-title {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--parchment-88);
  padding: 7px 18px;
  height: 34px;
  line-height: 20px;
  letter-spacing: 0.02em;
  width: clamp(156px, 46vw, 230px);
  max-width: calc(100vw - 196px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  text-shadow: 0 2px 14px var(--black-48);
}

/* Icon buttons — §7: 36×36, icon 18×18 */
.hud-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 249, 252, 0.94);
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.42));
  transition: opacity var(--duration-fast);
  cursor: pointer;
  padding: 0;
}

.hud-btn svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.64)) drop-shadow(0 0 8px rgba(247, 249, 252, 0.20));
}

.hud-btn:hover {
  opacity: 0.9;
}

.hud-btn.active {
  color: var(--success-special);
}

/* Action chip (skip section / next chapter) — §17.2 */
.hud-action-chip {
  position: absolute;
  right: 18px;
  top: calc(44px + env(safe-area-inset-top, 14px) + 14px);
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  color: rgba(244, 241, 234, 0.90);
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.42));
  line-height: 34px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity var(--duration-fast);
}

.hud-action-chip:hover {
  opacity: 0.8;
}
