/* heroone.art · 3nity Auracle player deck
   Tokens from the 333Bi Tech system (ink, gold, teal; Syne / DM Sans / IBM Plex Mono).
   HEAD rig + DivineTouch field are ports of 333Bi Tech globals.css, scoped to #hx-persist. */
@font-face { font-family: "Syne"; src: url("/assets/fonts/syne-latin-wght.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-latin-wght.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

#hx-persist {
  --ink: #06080f; --ink-deep: #04050a;
  --glass: rgb(8 10 18 / .84);
  --text: #f0f2f8; --muted: rgb(196 201 216 / .78); --dim: rgb(140 146 166 / .95);
  --line: rgb(255 255 255 / .08); --line-strong: rgb(255 255 255 / .15);
  --gold: #c9a84c; --gold-rgb: 201 168 76; --gold-bright: #ecd28a; --gold-deep: #8e6d27;
  --teal: #4ff0e0; --amber: #ffb347; --red: #ff665f;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Syne", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --hx-level: 0;
  position: relative; z-index: 150;
  font-family: var(--body); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
#hx-persist *, #hx-persist *::before, #hx-persist *::after { box-sizing: border-box; }
#hx-persist button { font: inherit; color: inherit; }
#hx-persist [hidden] { display: none !important; }
html.hx-has-dock body { padding-bottom: 108px; }
html.hx-deck-open { overflow: hidden; }

/* ─────────────────────────── Dock ─────────────────────────── */
.hx-dock {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 980px);
  transform: translateX(-50%);
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: 52px minmax(120px, 210px) minmax(0, 1fr) auto auto auto auto 40px 34px;
  padding: 10px 12px 10px 10px;
  background: linear-gradient(180deg, rgb(255 255 255 / .045), transparent 60%), var(--glass);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 30px 70px -28px rgb(0 0 0 / .85), inset 0 1px 0 rgb(255 255 255 / .06);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  transition: transform .5s var(--ease), opacity .35s;
}
.hx-dock::before {           /* gold hairline that brightens with the signal */
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(var(--gold-rgb) / calc(.25 + var(--hx-level) * .6)), transparent);
}
#hx-persist.is-min .hx-dock { transform: translate(-50%, 150%); opacity: 0; pointer-events: none; }

.hx-art { position: relative; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 11px; overflow: hidden; cursor: pointer; background: rgb(255 255 255 / .06); box-shadow: 0 8px 20px -8px rgb(0 0 0 / .8); }
.hx-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hx-art:hover img { transform: scale(1.06); }
.hx-meta { display: grid; min-width: 0; line-height: 1.2; }
.hx-title { font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-sub { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; }
.hx-led { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 0 transparent; transition: background .3s; }
[data-state="playing"] .hx-led { background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: hx-led 1.8s ease-in-out infinite; }
[data-state="loading"] .hx-led { background: var(--amber); }
[data-state="error"] .hx-led { background: var(--red); }
@keyframes hx-led { 50% { opacity: .45; } }

.hx-wave { position: relative; height: 40px; cursor: pointer; touch-action: none; border-radius: 8px; outline: none; }
.hx-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hx-wave:focus-visible { box-shadow: 0 0 0 2px rgb(var(--gold-rgb) / .6); }
.hx-wave-tip {
  position: absolute; bottom: calc(100% + 6px); left: calc(var(--hx-hover, 0) * 100%); transform: translateX(-50%);
  padding: 3px 7px; border-radius: 6px; background: #151925; border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--gold-bright); line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap;
}
.hx-wave.is-hover .hx-wave-tip { opacity: 1; }
.hx-time { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 82px; text-align: right; }


.hx-controls { display: flex; align-items: center; gap: 2px; }
.hx-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; color: var(--text);
  transition: background .2s, transform .2s var(--spring), color .2s;
}
.hx-btn svg { width: 19px; height: 19px; }
.hx-btn:hover { background: rgb(255 255 255 / .08); }
.hx-btn:active { transform: scale(.92); }
#hx-persist .hx-btn:focus-visible, #hx-persist .hx-art:focus-visible, #hx-persist .hx-face:focus-visible, #hx-persist .hx-pill:focus-visible, #hx-persist .hx-q button:focus-visible, #hx-persist .hx-np-links a:focus-visible, #hx-persist .hx-tool:focus-visible, #hx-persist .hx-np-dur:focus-visible, #hx-persist .hx-ly-scroll:focus-visible, #hx-persist .hx-vol-range:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hx-play { width: 46px; height: 46px; color: var(--ink); background: linear-gradient(145deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep)); box-shadow: 0 10px 26px -10px rgb(var(--gold-rgb) / .8), inset 0 1px 0 rgb(255 255 255 / .45); }
.hx-play:hover { background: linear-gradient(145deg, #f5e2a6, var(--gold-bright) 55%, var(--gold)); }
.hx-play svg { width: 21px; height: 21px; }
.hx-spin { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--teal); opacity: 0; pointer-events: none; }
[data-state="loading"] .hx-spin { opacity: 1; animation: hx-spin .8s linear infinite; }
@keyframes hx-spin { to { transform: rotate(360deg); } }

.hx-vu { display: flex; align-items: flex-end; gap: 3px; height: 22px; width: 27px; }
.hx-vu i { flex: 1; height: 100%; border-radius: 2px; background: linear-gradient(0deg, var(--gold-deep), var(--gold) 50%, var(--teal)); transform-origin: 50% 100%; transform: scaleY(.12); transition: transform .08s linear; }
.hx-face { position: relative; width: 40px; height: 40px; padding: 0; border-radius: 50%; overflow: hidden; cursor: pointer; border: 1px solid rgb(var(--gold-rgb) / .45); background: var(--ink); box-shadow: 0 0 0 0 rgb(79 240 224 / 0); transition: box-shadow .3s, transform .3s var(--spring); }
.hx-face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.hx-face:hover { transform: scale(1.06); }
[data-state="playing"] .hx-face { box-shadow: 0 0 calc(6px + var(--hx-level) * 18px) rgb(79 240 224 / calc(.1 + var(--hx-level) * .45)); }
.hx-min { width: 34px; height: 34px; color: var(--dim); }

/* ─────────────────────────── Pill (minimised) ─────────────────────────── */
.hx-pill {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 64px; height: 64px; padding: 2px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ink); box-shadow: 0 20px 40px -16px rgb(0 0 0 / .85);
  opacity: 0; transform: scale(.6); pointer-events: none;
  transition: opacity .3s, transform .4s var(--spring);
}
.hx-pill img { position: absolute; inset: 4px; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.hx-ring { position: absolute; inset: 0; width: 64px; height: 64px; transform: rotate(-90deg); }
.hx-ring circle { fill: none; stroke: rgb(255 255 255 / .1); stroke-width: 2.5; }
.hx-ring .hx-ring-p { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 188.5; stroke-dashoffset: 188.5; transition: stroke-dashoffset .3s linear; }
.hx-pill-icon { position: absolute; inset: 4px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgb(4 5 10 / .45); opacity: 0; transition: opacity .2s; }
.hx-pill:hover .hx-pill-icon, .hx-pill:focus-visible .hx-pill-icon, #hx-persist:not([data-state="playing"]) .hx-pill-icon { opacity: 1; }
.hx-pill-icon svg { width: 22px; height: 22px; }
#hx-persist.is-min .hx-pill { opacity: 1; transform: scale(1); pointer-events: auto; }
#hx-persist.is-min[data-state="playing"] .hx-pill { box-shadow: 0 20px 40px -16px rgb(0 0 0 / .85), 0 0 0 calc(var(--hx-level) * 7px) rgb(79 240 224 / .14); }

/* ─────────────────────────── Deck (expanded) ─────────────────────────── */
.hx-deck {
  position: fixed; inset: 0; z-index: 2; display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgb(2 3 7 / .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .28s var(--ease);
}
.hx-deck.is-open { opacity: 1; }
.hx-deck-amb { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hx-deck-amb img { position: absolute; left: 50%; top: 50%; width: 110vmax; height: 110vmax; transform: translate(-50%, -50%); object-fit: cover; filter: blur(90px) saturate(1.3); opacity: .22; }
.hx-deck-panel {
  position: relative; width: min(1100px, 100%); max-height: 100%; overflow: hidden auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
  border-radius: 28px; border: 1px solid var(--line-strong);
  background:
    radial-gradient(60% 70% at 28% 52%, rgb(var(--gold-rgb) / .14), rgb(43 159 224 / .05) 45%, transparent 70%),
    linear-gradient(180deg, #0b0e18, var(--ink-deep));
  box-shadow: 0 60px 120px -40px rgb(0 0 0 / .9), inset 0 1px 0 rgb(255 255 255 / .06);
  transform: translateY(18px) scale(.985); transition: transform .45s var(--ease);
}
.hx-deck.is-open .hx-deck-panel { transform: none; }
.hx-deck-panel::before { /* secure-channel grid, as in the boot sequence */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / .028) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .028) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask: radial-gradient(ellipse at 28% 50%, #000 15%, transparent 65%); mask: radial-gradient(ellipse at 28% 50%, #000 15%, transparent 65%);
}
.hx-deck-head { grid-column: 1 / -1; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 0 26px; }
.hx-kicker { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--gold-rgb) / .85); }
.hx-kicker b { color: var(--dim); font-weight: 400; }
.hx-close { color: var(--muted); }

.hx-stage { position: relative; display: grid; place-items: center; min-height: 460px; padding: 10px 20px 64px; }
.hx-stage .dtf { position: absolute; width: min(470px, 92%); left: 50%; top: 46%; transform: translate(-50%, -50%); }
.hx-head { position: relative; width: min(300px, 62%); z-index: 1; filter: drop-shadow(0 0 calc(var(--hx-level) * 34px) rgb(255 179 71 / calc(var(--hx-level) * .35))); }
.hx-readout { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 22px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.hx-readout b { font-weight: 500; color: var(--gold-bright); margin-left: 6px; font-variant-numeric: tabular-nums; }
[data-state="playing"] .ro-state { color: var(--teal); }
[data-state="error"] .ro-state { color: var(--red); }

.hx-np { position: relative; padding: 18px 34px 30px 10px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hx-np-top { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px; align-items: end; }
.hx-np-art { width: 168px; height: 168px; border-radius: 16px; object-fit: cover; box-shadow: 0 30px 60px -24px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .08); }
.hx-np-no { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--gold); }
.hx-np-title { margin: 10px 0 6px; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 38px); line-height: 1.02; letter-spacing: -.03em; color: var(--text); overflow-wrap: anywhere; }
.hx-np-sub { margin: 0 0 8px; font-family: var(--body); font-size: 15px; font-style: italic; color: var(--muted); }
.hx-np-artist { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.hx-wave--deck { height: 72px; margin-top: 8px; }
.hx-np-times { display: flex; justify-content: space-between; margin-top: -8px; font-family: var(--mono); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.hx-np-ctl { display: flex; align-items: center; justify-content: center; gap: 22px; }
.hx-np-ctl .hx-btn:not(.hx-play) { width: 48px; height: 48px; }
.hx-np-ctl .hx-btn:not(.hx-play) svg { width: 22px; height: 22px; }
.hx-play--xl { width: 70px; height: 70px; }
.hx-play--xl svg { width: 28px; height: 28px; }
.hx-np-links { display: flex; justify-content: center; gap: 10px; }
.hx-np-links a { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--text); text-decoration: none; transition: border-color .2s, background .2s; }
.hx-np-links a:hover { border-color: rgb(var(--gold-rgb) / .6); background: rgb(var(--gold-rgb) / .08); }
.hx-q { list-style: none; margin: 4px 0 0; padding: 6px 0 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.hx-q button { width: 100%; display: grid; grid-template-columns: 6px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; transition: background .2s; }
.hx-q button:hover { background: rgb(255 255 255 / .05); }
.hx-q-no, .hx-q-d { font-family: var(--mono); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.hx-q img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.hx-q strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-q em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.hx-q-no { width: 6px; height: 6px; border-radius: 50%; }
.hx-q .is-current strong { color: var(--gold-bright); }
.hx-q .is-current .hx-q-no { background: var(--gold); box-shadow: 0 0 8px rgb(var(--gold-rgb) / .8); }

/* ─────────────── Lyrics, repeat, volume ───────────────
   The lyric files have no timestamps. The sheet is a reading view, not a
   bouncing-ball: a guessed highlight would land on the wrong line. */
.hx-stage.is-lyrics {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  min-height: 480px; padding: 4px 22px 22px 28px;
}
.hx-stage.is-lyrics .dtf,
.hx-stage.is-lyrics .hx-head,
.hx-stage.is-lyrics .hx-readout { display: none; }
.hx-lyrics { display: flex; flex-direction: column; width: 100%; min-height: 0; flex: 1; }
.hx-ly-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 2px 12px; }
.hx-ly-kicker { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.hx-ly-tools { display: flex; gap: 8px; flex: none; }
.hx-ly-scroll {
  flex: 1; min-height: 240px; max-height: min(64vh, 620px); overflow: auto;
  padding: 6px 8px 18px 2px; border-radius: 16px;
  scrollbar-width: thin; scrollbar-color: rgb(var(--gold-rgb) / .5) transparent;
}
.hx-ly-scroll:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgb(var(--gold-rgb) / .55); }
.hx-ly-stanza {
  margin: 0 auto 1.35em; max-width: 28rem; text-align: center;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(18px, 2vw, 26px); line-height: 1.45; letter-spacing: -.02em;
  text-wrap: balance;
}
.hx-ly-line { transition: color .2s ease, opacity .2s ease; }
.hx-ly-scroll.is-timed .hx-ly-line {
  color: var(--dim); opacity: .72; cursor: pointer;
}
.hx-ly-scroll.is-timed .hx-ly-line:hover { color: var(--text); opacity: .95; }
.hx-ly-scroll.is-timed .hx-ly-line.is-active {
  color: var(--gold-bright); opacity: 1;
}
.hx-ly-scroll.is-timed .hx-ly-line:focus-visible {
  outline: none; box-shadow: 0 0 0 2px rgb(var(--gold-rgb) / .55); border-radius: 4px;
}
.hx-ly-empty, .hx-ly-loading { margin: 2.2rem auto; max-width: 24rem; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; }
.hx-np-tools { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.hx-tool {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent;
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  transition: border-color .2s, background .2s, color .2s;
}
.hx-tool svg { width: 15px; height: 15px; }
.hx-tool:hover { border-color: rgb(var(--gold-rgb) / .55); background: rgb(var(--gold-rgb) / .08); }
.hx-tool[aria-pressed="true"] { color: var(--gold-bright); border-color: rgb(var(--gold-rgb) / .75); background: rgb(var(--gold-rgb) / .12); }
.hx-tool:disabled { opacity: .4; cursor: default; }
.hx-np-dur {
  padding: 2px 0; border: 0; background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums;
}
.hx-np-dur:hover { color: var(--gold-bright); }
.hx-vol { display: flex; align-items: center; gap: 0; }
.hx-mute { width: 36px; height: 36px; }
.hx-vol-range {
  -webkit-appearance: none; appearance: none; width: 88px; height: 22px;
  margin: 0; background: transparent; cursor: pointer;
}
.hx-vol-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) var(--hx-vol, 100%), rgb(255 255 255 / .16) var(--hx-vol, 100%));
}
.hx-vol-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px;
  border: 0; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 0 1px rgb(0 0 0 / .4);
}
.hx-vol-range::-moz-range-track {
  height: 4px; border: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) var(--hx-vol, 100%), rgb(255 255 255 / .16) var(--hx-vol, 100%));
}
.hx-vol-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--gold-bright); }
.hx-q-label { margin: 10px 2px 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* ─────────────── HEAD rig (port of 333Bi Tech AuracleHead) ─────────────── */
#hx-persist .ah { position: relative; display: block; aspect-ratio: 1; line-height: 0; }
#hx-persist .ah-rig { --tilt-x: 0deg; --tilt-y: 0deg; --look-x: 0px; --look-y: 0px; position: absolute; inset: 0; perspective: 900px; perspective-origin: 52% 46%; }
#hx-persist .ah-stage { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: transform .6s var(--ease); }
#hx-persist .ah-body { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform, filter; }
#hx-persist .ah-body > * { position: absolute; inset: 0; width: 100%; height: 100%; }
#hx-persist .ah-base { object-fit: contain; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .55)); }
#hx-persist .ah-visor { object-fit: contain; transform: translateZ(10px) translate(var(--look-x), var(--look-y)); transition: transform .6s var(--ease), filter .6s var(--ease); }
#hx-persist .ah[data-severity='warning'] .ah-visor { filter: hue-rotate(-10deg) saturate(1.35) brightness(1.05); }
#hx-persist .ah[data-severity='critical'] .ah-visor { filter: hue-rotate(-32deg) saturate(1.75) brightness(1.1); }
#hx-persist .ah[data-severity='sealed'] .ah-visor { filter: saturate(.12) brightness(.78); }
#hx-persist .ah[data-state='playing'] .ah-visor { filter: brightness(calc(1 + var(--hx-level) * .14)) saturate(calc(1 + var(--hx-level) * .2)); }
#hx-persist .ah-fx { mix-blend-mode: screen; pointer-events: none; transform: translateZ(14px) translate(var(--look-x), var(--look-y)); overflow: visible; transition: filter .6s var(--ease); }
#hx-persist .ah-eyes { opacity: .5; transition: opacity .08s linear; }
#hx-persist .ah-hud, #hx-persist .ah-scan { opacity: 0; }
#hx-persist .ah-cup { fill: none; stroke: #4ff0e0; stroke-width: 2; opacity: .25; }
#hx-persist .ah-pulse { fill: none; stroke: #4ff0e0; stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
#hx-persist .ah-pulse.is-beat { animation: ah-pulse .9s ease-out both; }

#hx-persist .ah.is-boot .ah-body { animation: ah-servo 3s both, ah-power 3s both; }
#hx-persist .ah.is-boot .ah-visor { animation: ah-parallax 3s both; }
#hx-persist .ah.is-boot .ah-eyes { animation: ah-ignite 3s both; }
#hx-persist .ah.is-boot .ah-hud { animation: ah-hud 3s both; }
#hx-persist .ah.is-boot .ah-scan { animation: ah-scan 3s both; }
#hx-persist .ah.is-boot .ah-pulse { animation: ah-bootpulse 3s both; animation-delay: var(--ah-d); }
@keyframes ah-servo {
  0% { transform: rotateX(11deg) rotateY(0deg) scale(.955); animation-timing-function: steps(1, end); }
  11% { transform: rotateX(10deg) rotateY(0deg) scale(.96); animation-timing-function: steps(5, end); }
  32% { transform: rotateX(5deg) rotateY(-9deg) scale(.985); animation-timing-function: steps(6, end); }
  52% { transform: rotateX(2deg) rotateY(9deg) scale(1); animation-timing-function: steps(4, end); }
  70% { transform: rotateX(1deg) rotateY(3.5deg) scale(1); }
  86% { transform: rotateX(0deg) rotateY(-1.5deg) scale(1); animation-timing-function: cubic-bezier(.22, .9, .3, 1); }
  100% { transform: rotateX(0deg) rotateY(0deg) scale(1); }
}
@keyframes ah-power {
  0%, 9% { filter: brightness(.2) saturate(.2) contrast(1.15); } 11% { filter: brightness(1.55) saturate(1.1); }
  13% { filter: brightness(.3) saturate(.35); } 16% { filter: brightness(1.3) saturate(1); }
  19% { filter: brightness(.55) saturate(.7); } 23% { filter: brightness(1.08); } 34%, 100% { filter: none; }
}
@keyframes ah-parallax {
  0%, 28% { transform: translateZ(10px) translate(0, 0); } 32% { transform: translateZ(10px) translate(3px, -1px); }
  52% { transform: translateZ(10px) translate(-3px, 1px); } 86% { transform: translateZ(10px) translate(1px, 0); } 100% { transform: translateZ(10px) translate(0, 0); }
}
@keyframes ah-ignite { 0%, 17% { opacity: 0; } 18% { opacity: .9; } 20% { opacity: .05; } 23% { opacity: 1; } 25% { opacity: .25; } 29% { opacity: .85; } 31% { opacity: .4; } 35% { opacity: .95; } 60%, 100% { opacity: .55; } }
@keyframes ah-hud { 0%, 7% { opacity: 0; } 9% { opacity: .9; } 30% { opacity: .55; } 44%, 100% { opacity: 0; } }
@keyframes ah-scan { 0%, 8% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 40% { opacity: .9; transform: translateY(200px); } 46% { opacity: 0; transform: translateY(230px); } 100% { opacity: 0; } }
@keyframes ah-bootpulse { 0%, 48% { opacity: 0; transform: scale(1); } 50% { opacity: .75; transform: scale(1); } 78%, 100% { opacity: 0; transform: scale(2); } }
#hx-persist .ah[data-state='idle']:not(.is-boot) .ah-body { animation: ah-sway 9s ease-in-out infinite; }
#hx-persist .ah[data-state='idle']:not(.is-boot) .ah-eyes { animation: ah-breathe 4s ease-in-out infinite; }
#hx-persist .ah[data-state='playing']:not(.is-boot) .ah-body { animation: ah-sway 6s ease-in-out infinite; }
#hx-persist .ah[data-state='playing']:not(.is-boot) .ah-cup { opacity: calc(.35 + var(--hx-level) * .5); }
@keyframes ah-sway { 0%, 100% { transform: rotateY(-2.5deg) rotateX(.6deg); } 50% { transform: rotateY(2.5deg) rotateX(-.6deg); } }
@keyframes ah-breathe { 0%, 100% { opacity: .4; } 50% { opacity: .62; } }
@keyframes ah-pulse { 0% { opacity: .75; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }

/* ─────────── DivineTouch field (port of 333Bi Tech DivineField) ─────────── */
#hx-persist .dtf { display: block; aspect-ratio: 1; pointer-events: none; }
#hx-persist .dtf-stage { position: absolute; inset: 0; perspective: 1200px; }
#hx-persist .dtf-stack { position: absolute; inset: 0; transform-style: preserve-3d; animation: dtf-orbit 60s ease-in-out infinite; transition: opacity .8s var(--ease); }
#hx-persist .dtf-depth { position: absolute; inset: 0; transform-style: preserve-3d; }
#hx-persist .dtf-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: dtf-spin var(--dtf-spin) linear infinite; }
#hx-persist .dtf-ring path { fill: none; vector-effect: non-scaling-stroke; }
@keyframes dtf-orbit { 0%, 100% { transform: rotateX(10deg) rotateY(-28deg); } 50% { transform: rotateX(-10deg) rotateY(28deg); } }
@keyframes dtf-spin { to { transform: rotate(360deg); } }
@keyframes dtf-emit { 0%, 70% { opacity: var(--dtf-o); } 80% { opacity: 1; } 100% { opacity: var(--dtf-o); } }
#hx-persist .dtf[data-state='dormant'] .dtf-stack { animation-duration: 96s; opacity: .3; }
#hx-persist .dtf[data-state='dormant'] .dtf-ring { animation-duration: calc(var(--dtf-spin) * 2.2); }
#hx-persist .dtf[data-state='listening'] .dtf-stack { animation-duration: 60s; opacity: .5; }
#hx-persist .dtf[data-state='listening'] .dtf-ring { animation-duration: calc(var(--dtf-spin) * 1.4); }
#hx-persist .dtf[data-state='thinking'] .dtf-stack { animation-duration: 22s; opacity: .7; }
#hx-persist .dtf[data-state='thinking'] .dtf-ring { animation-duration: calc(var(--dtf-spin) * .45); }
#hx-persist .dtf[data-state='responding'] .dtf-stack { animation-duration: 34s; opacity: calc(.62 + var(--hx-level) * .38); }
#hx-persist .dtf[data-state='responding'] .dtf-ring { animation-duration: calc(var(--dtf-spin) * .8); animation-name: dtf-spin, dtf-emit; animation-delay: 0s, var(--dtf-delay); }

/* page-swap fade */
html.hx-swapping body > :not(#hx-persist) { opacity: .55; transition: opacity .15s; }

/* ─────────────────────────── Responsive ─────────────────────────── */
@media (max-width: 1020px) {
  .hx-dock { grid-template-columns: 52px minmax(110px, 180px) minmax(0, 1fr) auto auto 40px 34px; }
  .hx-vu, .hx-lyrics-dock { display: none; }
}
@media (max-width: 860px) {
  .hx-dock { grid-template-columns: 48px minmax(0, 1fr) auto 40px 34px; gap: 12px; padding-top: 14px; }
  .hx-art { width: 48px; height: 48px; }
  .hx-wave--dock { display: none; }
  .hx-dock::after { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-bright)); transform-origin: 0 50%; transform: scaleX(var(--hx-p, 0)); }
  .hx-time { display: none; }
  .hx-deck-panel { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; border-radius: 24px; }
  .hx-stage { min-height: 360px; padding: 0 20px 56px; }
  .hx-stage .dtf { width: min(320px, 82%); top: 44%; }
  .hx-head { width: min(196px, 50%); }
  .hx-np { padding: 0 22px 26px; }
  .hx-stage.is-lyrics { min-height: 0; padding: 0 16px 8px; }
  .hx-ly-scroll { max-height: 42vh; min-height: 180px; }
  .hx-ly-stanza { font-size: 18px; }
  .hx-vol { display: none; }
}
@media (max-width: 560px) {
  html.hx-has-dock body { padding-bottom: 96px; }
  .hx-dock { width: calc(100% - 16px); bottom: max(8px, env(safe-area-inset-bottom)); grid-template-columns: 44px minmax(0, 1fr) auto 38px; gap: 10px; padding: 12px 10px 10px; border-radius: 18px; }
  .hx-art { width: 44px; height: 44px; }
  .hx-controls .hx-prev, .hx-controls .hx-next, .hx-min { display: none; }
  .hx-title { font-size: 14px; }
  .hx-deck { padding: 0; place-items: stretch; }
  .hx-deck-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .hx-deck-head { padding: max(14px, env(safe-area-inset-top)) 12px 0 20px; }
  .hx-np-top { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; }
  .hx-np-art { width: 92px; height: 92px; border-radius: 12px; }
  .hx-np-title { font-size: 24px; }
  .hx-readout { gap: 14px; font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  #hx-persist *, #hx-persist *::before, #hx-persist *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  #hx-persist .dtf-stack { transform: rotateX(14deg) rotateY(24deg); }
  #hx-persist .hx-ly-scroll { scroll-behavior: auto; }
}
@media (hover: none) and (pointer: coarse) { .hx-vol { display: none; } }
@media (forced-colors: active) { .hx-play { forced-color-adjust: none; } }
@media print { #hx-persist { display: none !important; } html.hx-has-dock body { padding-bottom: 0; } }
