@layer components {
  .boss-hud {
    --boss-tint: #ffcf4a;
    --boss-stage-h: clamp(112px, 28vh, 250px);
    position: relative;
    z-index: 1;
    flex: 0 1 auto;
    min-height: var(--boss-min, 0px);
    display: flex;
    flex-direction: column;
    padding: 7px 9px 8px;
    border-radius: 22px;
    background:
      radial-gradient(120% 60% at 50% 55%, color-mix(in srgb, var(--boss-tint) 14%, transparent), transparent 72%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 26%),
      linear-gradient(180deg, rgba(40, 26, 76, 0.86), rgba(12, 8, 26, 0.94));
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6),
      0 0 0 3px rgba(240, 181, 52, 0.6),
      0 0 0 4.5px rgba(40, 20, 0, 0.8),
      0 14px 30px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
    isolation: isolate;
  }

  .boss-hud__view {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: calc(-1 * var(--boss-spill, 0px));
    z-index: 1;
    overflow: hidden;
    border-radius: 22px;
    pointer-events: none;
  }

  .boss-hud__actor {
    position: absolute;
    left: 50%;
    bottom: 0;
    translate: -50% 0;
    transform-origin: 50% 100%;
    transition: opacity 0.45s ease;
  }

  .boss-hud__still {
    width: auto;
    max-width: none;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  }

  .boss-hud__actor .actor {
    filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.45));
  }

  .boss-hud__actor .actor.is-fading {
    opacity: 0;
    filter: brightness(2.2) saturate(0) drop-shadow(0 0 8px var(--boss-tint));
    transition: opacity 0.7s ease 0.15s, filter 0.3s ease;
  }

  .boss-hud__grave {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: auto;
    max-width: none;
    translate: -50% 0;
    transform-origin: 50% 100%;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    animation: boss-grave 0.6s var(--ease-spring) 0.35s both;
  }

  :root[data-motion='reduced'] .boss-hud__grave {
    animation: none;
  }

  .boss-hud__head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 6px;
    padding: 0 0 0 4px;
  }

  .boss-hud__title {
    display: grid;
    min-width: 0;
    line-height: 1.05;
  }

  .boss-hud__kicker {
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: var(--boss-tint);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
  }

  .boss-hud__kicker b {
    color: var(--gold-hi);
  }

  .boss-hud__name {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .boss-hud__info {
    position: relative;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s var(--ease-spring);
  }

  .boss-hud__info .info-ico {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .boss-hud__info::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
  }

  .boss-hud__info:active {
    transform: translateY(2px) scale(0.94);
  }

  .boss-hud__stage {
    position: relative;
    flex: 0 1 var(--boss-stage-h);
    min-height: 60px;
  }

  .boss-hud__aura {
    position: absolute;
    left: 6%;
    right: 6%;
    top: 4%;
    bottom: 2%;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--boss-tint) 30%, transparent), transparent);
    opacity: 0.8;
    animation: boss-aura 3.6s ease-in-out infinite;
    pointer-events: none;
  }

  .boss-hud__floor {
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: -4px;
    height: 18px;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent);
    pointer-events: none;
  }

  .boss-hud__lock {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    justify-items: center;
    gap: 3px;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  .boss-hud__lock img {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.8));
  }

  .boss-hud__lock span {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 900;
    color: var(--gold);
    background: rgba(8, 4, 16, 0.92);
    box-shadow: 0 0 0 1px rgba(255, 212, 74, 0.5);
    white-space: nowrap;
  }

  .boss-hud__fx {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
  }

  .boss-hud__meter {
    position: relative;
    z-index: 2;
    padding-top: 5px;
  }

  .boss-hud__bar {
    position: relative;
    display: block;
    height: 22px;
    border-radius: 99px;
    overflow: hidden;
    background: linear-gradient(180deg, #12060a, #2a0c14);
    box-shadow:
      0 0 0 1.5px #0a0306,
      0 0 0 3px rgba(240, 181, 52, 0.55),
      inset 0 3px 6px rgba(0, 0, 0, 0.8);
  }

  .boss-hud__fill,
  .boss-hud__ghost {
    position: absolute;
    inset: 2.5px;
    border-radius: inherit;
    transform-origin: 0 50%;
  }

  .boss-hud__ghost {
    background: linear-gradient(180deg, #fff6d0, #ffc86a);
    opacity: 0.9;
    transition-property: transform;
    transition-timing-function: var(--ease-soft);
  }

  .boss-hud__fill {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 45%),
      linear-gradient(180deg, #ff8a96, #e8263c 55%, #9e0a24);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
    transition: transform 0.35s var(--ease-out);
  }

  .boss-hud__hp {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    height: 100%;
    padding: 0 8px;
    font-size: 11.5px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 0 #000, 0 0 4px rgba(0, 0, 0, 0.9), 0 0 2px #000;
    white-space: nowrap;
    overflow: hidden;
  }

  .boss-hud__bar[data-locked='true'] .boss-hud__hp {
    padding: 0 5px;
    font-size: 9.5px;
    letter-spacing: 0.06em;
    color: var(--gold);
  }

  .boss-hud__meter {
    container-type: inline-size;
  }

  .boss-hud__short {
    display: none;
  }

  @container (max-width: 145px) {
    .boss-hud__long {
      display: none;
    }

    .boss-hud__short {
      display: inline;
    }
  }

  .boss-hud__foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 6px 2px 0 4px;
  }

  .boss-hud__pips {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: none;
  }

  .boss-hud__pips i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
  }

  .boss-hud__pips i.is-on {
    background: radial-gradient(circle at 50% 35%, #fff4c4, #ffb81c);
    box-shadow: 0 0 6px rgba(255, 196, 60, 0.7);
  }

  .boss-hud__pips i.is-strike {
    width: 11px;
    height: 11px;
    margin-left: 2px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: rgba(255, 90, 110, 0.3);
    box-shadow: inset 0 0 0 1.5px rgba(255, 90, 110, 0.75);
  }

  .boss-hud.is-warning .boss-hud__pips i.is-strike {
    background: #ff3d55;
    box-shadow: 0 0 10px rgba(255, 60, 85, 0.9);
    animation: boss-pulse 0.9s ease-in-out infinite;
  }

  .boss-hud__status {
    position: absolute;
    left: 50%;
    top: 2px;
    z-index: 3;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    translate: -50% 0;
    pointer-events: none;
  }

  .boss-hud__status[data-tone='warn'] {
    color: #fff;
    background: linear-gradient(180deg, #ff6a7c, #c8102e);
    box-shadow: 0 0 0 1.5px #1a0306, 0 0 12px rgba(255, 60, 85, 0.6);
    animation: boss-warn 1s ease-in-out infinite;
  }

  .boss-hud__status[data-tone='rest'] {
    color: var(--text);
    background: rgba(12, 8, 26, 0.88);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  .boss-hud__prize {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    flex: none;
    font-size: 11.5px;
    font-weight: 900;
    color: var(--gold-hi);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
  }

  .boss-hud__chest {
    width: 26px;
    height: 26px;
    margin: -6px 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
  }

  .boss-hud__pack {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: -6px 3px -6px 0;
  }

  .boss-hud__pack[hidden] {
    display: none;
  }

  .boss-hud__pack img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
  }

  .boss-hud__pack b {
    position: relative;
    align-self: flex-end;
    margin: 0 0 -2px -5px;
    padding: 0 3px;
    border-radius: 6px;
    font-size: 8.5px;
    line-height: 12px;
    color: #1a0c02;
    text-shadow: none;
    white-space: nowrap;
    background: linear-gradient(180deg, #fff3b0, #ffc53d);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
  }

  .boss-hud__damage {
    position: absolute;
    left: calc(50% + var(--dx, 0px));
    top: 40%;
    font-size: 20px;
    font-weight: 900;
    color: #ff5a6e;
    text-shadow: 0 2px 0 #3a0010, 0 0 10px rgba(255, 60, 90, 0.75);
    white-space: nowrap;
    translate: -50% -50%;
    animation: boss-damage 1.2s var(--ease-out) forwards;
  }

  .boss-hud__damage[data-tone='crit'] {
    font-size: 27px;
    color: #ffd44a;
    text-shadow: 0 2px 0 #4a2a00, 0 0 14px rgba(255, 200, 60, 0.95);
  }

  .boss-hud__damage[data-tone='counter'] {
    font-size: 24px;
    color: #7ff3ff;
    text-shadow: 0 2px 0 #00303a, 0 0 12px rgba(93, 233, 255, 0.9);
  }

  .boss-hud__callout {
    position: absolute;
    left: 50%;
    bottom: 10px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #2a1500;
    background: linear-gradient(180deg, #fff3b0, #ffb81c);
    box-shadow: 0 0 0 1.5px #1a0c02, 0 4px 12px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    translate: -50% 0;
    animation: boss-callout 1.6s var(--ease-out) forwards;
  }

  .boss-hud__callout[data-tone='attack'] {
    color: #fff;
    background: linear-gradient(180deg, #ff6a7c, #c8102e);
  }

  .boss-hud__callout[data-tone='dodge'] {
    color: #00262e;
    background: linear-gradient(180deg, #c8fbff, #3fd6f0);
  }

  .boss-hud__callout[data-tone='win'] {
    font-size: 15px;
    color: #0a2a0e;
    background: linear-gradient(180deg, #d4ffc8, #4fd65c);
  }

  .boss-hud.is-low .boss-hud__fill {
    animation: boss-low 1.1s ease-in-out infinite;
  }

  .boss-hud.is-warning {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6),
      0 0 0 3px rgba(255, 70, 90, 0.85),
      0 0 0 4.5px rgba(60, 0, 10, 0.85),
      0 0 22px rgba(255, 50, 80, 0.45),
      0 14px 30px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .boss-hud.is-resting .boss-hud__actor {
    filter: saturate(0.55) brightness(0.8);
  }

  .boss-hud.is-locked .boss-hud__actor {
    filter: brightness(0) drop-shadow(0 0 5px color-mix(in srgb, var(--boss-tint) 70%, transparent));
    opacity: 0.8;
  }

  .boss-hud.is-locked .boss-hud__aura {
    opacity: 0.25;
    animation: none;
  }

  .boss-hud.is-locked .boss-hud__name {
    color: var(--text-dim);
  }

  .boss-hud.is-unlocking .boss-hud__lock {
    animation: boss-lock-break 0.7s var(--ease-in) forwards;
  }

  .boss-hud__actor.is-entering {
    animation: boss-enter 1.1s var(--ease-out) both;
  }

  .boss-hud__actor.is-hit {
    animation: boss-recoil 0.45s ease;
  }

  .boss-hud__actor.is-gone {
    opacity: 0;
    transition-delay: 0.25s;
  }

  .boss-hud.is-shake {
    animation: boss-shake 0.5s ease;
  }

  .boss-hud.is-struck {
    animation: boss-struck 0.6s ease;
  }

  .boss-rules {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .boss-rules li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  }

  .boss-rules img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  }

  @media (hover: hover) {
    .boss-hud__info:hover {
      transform: translateY(-1px) scale(1.08);
      filter: drop-shadow(0 3px 6px rgba(58, 168, 255, 0.55)) brightness(1.08);
    }
  }

  @media (max-height: 760px) and (min-aspect-ratio: 4/5) {
    .boss-hud {
      --boss-stage-h: clamp(100px, 26vh, 200px);
      padding: 5px 8px 6px;
    }

    .boss-hud__foot {
      min-height: 24px;
      padding-top: 4px;
    }
  }

  @media (max-width: 1100px) and (min-aspect-ratio: 4/5) {
    .boss-hud__name {
      font-size: 13.5px;
    }

    .boss-hud__bar {
      height: 20px;
    }

    .boss-hud__hp {
      font-size: 10.5px;
    }
  }

  @media (max-height: 540px) and (orientation: landscape) {
    .boss-hud {
      --boss-stage-h: 150px;
      padding: 4px 6px 5px;
      border-radius: 16px;
    }

    .boss-hud__view {
      border-radius: 16px;
    }

    .boss-hud__kicker {
      display: none;
    }

    .boss-hud__name {
      font-size: 11.5px;
      line-height: 1.05;
      white-space: normal;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .boss-hud__info {
      width: 22px;
      height: 22px;
    }

    .boss-hud__meter {
      padding-top: 3px;
    }

    .boss-hud__bar {
      height: 16px;
    }

    .boss-hud__hp {
      font-size: 9.5px;
    }

    .boss-hud__foot {
      min-height: 20px;
      padding-top: 3px;
      gap: 4px;
    }

    .boss-hud__pips i {
      width: 6px;
      height: 6px;
    }

    .boss-hud__pips i.is-strike {
      width: 8px;
      height: 8px;
    }

    .boss-hud__status {
      font-size: 8.5px;
      padding: 2px 6px;
    }

    .boss-hud__chest {
      width: 20px;
      height: 20px;
    }

    .boss-hud__pack img {
      width: 18px;
      height: 18px;
    }

    .boss-hud__lock img {
      width: 24px;
      height: 24px;
    }

    .boss-hud__damage {
      font-size: 15px;
    }

    .boss-hud__damage[data-tone='crit'] {
      font-size: 18px;
    }

    .boss-hud__damage[data-tone='counter'] {
      font-size: 16px;
    }

    .boss-hud__callout {
      font-size: 10px;
      padding: 2px 7px;
    }
  }

  @media (orientation: portrait) and (max-aspect-ratio: 4/5) {
    .boss-hud {
      --boss-stage-w: clamp(92px, 30vw, 132px);
      display: grid;
      grid-template-columns: minmax(0, 1fr) var(--boss-stage-w);
      grid-template-rows: auto auto minmax(0, 1fr);
      grid-template-areas:
        'head stage'
        'meter stage'
        'foot stage';
      align-content: center;
      padding: 6px 4px 6px 10px;
      border-radius: 18px;
    }

    .boss-hud__view {
      border-radius: 18px;
    }

    .boss-hud__head {
      grid-area: head;
      padding: 0;
    }

    .boss-hud__kicker {
      font-size: 9px;
    }

    .boss-hud__name {
      font-size: 13px;
      line-height: 1.05;
      white-space: normal;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .boss-hud__info {
      width: 24px;
      height: 24px;
    }

    .boss-hud__stage {
      grid-area: stage;
      min-height: 0;
      margin: -2px 0;
    }

    .boss-hud__meter {
      grid-area: meter;
      padding-top: 4px;
    }

    .boss-hud__bar {
      height: 18px;
    }

    .boss-hud__hp {
      font-size: 10.5px;
    }

    .boss-hud__foot {
      grid-area: foot;
      min-height: 22px;
      padding: 4px 0 0;
      gap: 4px;
    }

    .boss-hud__status {
      top: 0;
      font-size: 8.5px;
      padding: 2px 6px;
    }

    .boss-hud__chest {
      width: 22px;
      height: 22px;
    }

    .boss-hud__pack img {
      width: 19px;
      height: 19px;
    }

    .boss-hud__lock img {
      width: 24px;
      height: 24px;
    }

    .boss-hud__lock span {
      font-size: 9px;
      padding: 1px 6px;
    }

    .boss-hud__damage {
      font-size: 17px;
      top: 30%;
    }

    .boss-hud__damage[data-tone='crit'] {
      font-size: 18px;
    }

    .boss-hud__damage[data-tone='counter'] {
      font-size: 17px;
    }

    .boss-hud__callout {
      bottom: 2px;
      font-size: 9.5px;
      padding: 2px 7px;
    }
  }

  @media (orientation: portrait) and (max-aspect-ratio: 4/5) and (max-height: 800px) {
    .boss-hud {
      --boss-stage-w: clamp(80px, 26vw, 108px);
      padding: 4px 4px 4px 8px;
      border-radius: 16px;
    }

    .boss-hud__view {
      border-radius: 16px;
    }

    .boss-hud__kicker {
      display: none;
    }

    .boss-hud__name {
      font-size: 12px;
    }

    .boss-hud__info {
      width: 22px;
      height: 22px;
    }

    .boss-hud__stage {
      margin: -4px 0;
    }

    .boss-hud__meter {
      padding-top: 3px;
    }

    .boss-hud__bar {
      height: 15px;
    }

    .boss-hud__hp {
      font-size: 9.5px;
    }

    .boss-hud__foot {
      min-height: 18px;
      padding-top: 3px;
    }

    .boss-hud__pips i {
      width: 6px;
      height: 6px;
    }

    .boss-hud__pips i.is-strike {
      width: 8px;
      height: 8px;
    }

    .boss-hud__chest {
      width: 18px;
      height: 18px;
    }

    .boss-hud__pack img {
      width: 16px;
      height: 16px;
    }

    .boss-hud__prize {
      font-size: 10px;
    }
  }

  @media (orientation: portrait) and (max-aspect-ratio: 4/5) and (max-width: 380px) {
    .boss-hud {
      --boss-stage-w: clamp(74px, 23vw, 92px);
    }

    .boss-hud__hp {
      padding: 0 4px;
    }
  }

  .boss-hud__field {
    --field-r: 29px;
    position: absolute;
    inset: -7px;
    z-index: 4;
    border-radius: var(--field-r);
    pointer-events: none;
    box-shadow:
      0 0 0 1.5px rgba(186, 244, 255, 0.9),
      0 0 0 3px rgba(40, 150, 220, 0.35),
      0 0 10px 1px rgba(110, 220, 255, 0.55),
      inset 0 0 0 1px rgba(170, 140, 255, 0.45),
      inset 0 0 9px rgba(120, 210, 255, 0.35);
  }

  .boss-hud__field-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
      0 0 0 2px rgba(236, 252, 255, 0.95),
      0 0 16px 3px rgba(120, 225, 255, 0.8),
      0 0 30px 6px rgba(160, 120, 255, 0.35),
      inset 0 0 14px rgba(170, 140, 255, 0.55);
    opacity: 0.18;
    animation: field-pulse 2.8s ease-in-out infinite;
  }

  .boss-hud__field-run {
    position: absolute;
    left: calc(var(--field-r) * 0.8);
    right: calc(var(--field-r) * 0.8);
    height: 3px;
    overflow: hidden;
    border-radius: 2px;
  }

  .boss-hud__field-run.is-top {
    top: -1.5px;
  }

  .boss-hud__field-run.is-bottom {
    bottom: -1.5px;
  }

  .boss-hud__field-run b {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff 50%, rgba(255, 255, 255, 0));
    transform: translateX(-100%);
    animation: field-run 3.1s linear infinite;
  }

  .boss-hud__field-run.is-bottom b {
    animation-direction: reverse;
    animation-delay: -1.4s;
    animation-duration: 3.7s;
  }

  .boss-hud__field-node {
    position: absolute;
    width: 8px;
    height: 8px;
    margin: -4px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: radial-gradient(circle, #ffffff 0 30%, #9ff0ff 55%, rgba(159, 240, 255, 0) 75%);
    box-shadow: 0 0 6px 1px rgba(140, 230, 255, 0.9);
  }

  .boss-hud__field-node.is-tl {
    left: calc(var(--field-r) * 0.293);
    top: calc(var(--field-r) * 0.293);
  }

  .boss-hud__field-node.is-tr {
    right: calc(var(--field-r) * 0.293);
    top: calc(var(--field-r) * 0.293);
  }

  .boss-hud__field-node.is-bl {
    left: calc(var(--field-r) * 0.293);
    bottom: calc(var(--field-r) * 0.293);
  }

  .boss-hud__field-node.is-br {
    right: calc(var(--field-r) * 0.293);
    bottom: calc(var(--field-r) * 0.293);
  }

  .boss-hud__field.is-hit .boss-hud__field-glow {
    animation: field-hit 0.62s ease-out;
  }

  .boss-hud__ripple {
    position: absolute;
    width: 70px;
    height: 70px;
    margin: -35px 0 0 -35px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(240, 253, 255, 0.95), rgba(140, 225, 255, 0.6) 42%, rgba(160, 120, 255, 0.25) 62%, rgba(140, 225, 255, 0) 72%);
    box-shadow: 0 0 0 2px rgba(210, 248, 255, 0.85), 0 0 14px rgba(140, 225, 255, 0.8);
    opacity: 0;
    animation: field-ripple 0.72s ease-out forwards;
  }

  .boss-hud__ripple[data-kind='swing'] {
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
    animation-duration: 0.85s;
  }

  .boss-hud.is-locked .boss-hud__field,
  .boss-hud.is-resting .boss-hud__field {
    opacity: 0.55;
  }

  .boss-hud.is-locked .boss-hud__field-run {
    display: none;
  }

  :root[data-lite='true'] .boss-hud__field-run.is-bottom {
    display: none;
  }

  :root[data-device='phone'][data-spinning='true'] .boss-hud__field-run b,
  :root[data-device='phone'][data-spinning='true'] .boss-hud__field-glow {
    animation-play-state: paused;
  }

  :root[data-motion='reduced'] .boss-hud__field-run,
  :root[data-motion='reduced'] .boss-hud__ripple {
    display: none;
  }

  :root[data-motion='reduced'] .boss-hud__field-glow {
    animation: none;
    opacity: 0.35;
  }

  @media (max-height: 540px) and (orientation: landscape) {
    .boss-hud__field {
      --field-r: 23px;
    }
  }

  @media (orientation: portrait) and (max-aspect-ratio: 4/5) {
    .boss-hud__field {
      --field-r: 25px;
    }
  }

  @media (orientation: portrait) and (max-aspect-ratio: 4/5) and (max-height: 800px) {
    .boss-hud__field {
      --field-r: 23px;
    }
  }
}

@layer fx {
  @keyframes boss-aura {
    0%,
    100% {
      transform: scale(0.94);
      opacity: 0.65;
    }

    50% {
      transform: scale(1.04);
      opacity: 0.95;
    }
  }

  @keyframes boss-damage {
    0% {
      opacity: 0;
      transform: translateY(8px) scale(0.5);
    }

    18% {
      opacity: 1;
      transform: translateY(-6px) scale(1.2);
    }

    40% {
      transform: translateY(-14px) scale(1);
    }

    100% {
      opacity: 0;
      transform: translateY(-46px) scale(0.95);
    }
  }

  @keyframes boss-callout {
    0% {
      opacity: 0;
      transform: scale(0.4);
    }

    14% {
      opacity: 1;
      transform: scale(1.12);
    }

    26% {
      transform: scale(1);
    }

    78% {
      opacity: 1;
      transform: none;
    }

    100% {
      opacity: 0;
      transform: translateY(-10px);
    }
  }

  @keyframes boss-grave {
    from {
      opacity: 0;
      transform: translateY(35%) scaleY(0.3);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes boss-recoil {
    0%,
    100% {
      transform: none;
      filter: none;
    }

    18% {
      transform: translateX(7px) rotate(3deg);
      filter: brightness(2.2) saturate(0.3);
    }

    45% {
      transform: translateX(-4px) rotate(-1.5deg);
      filter: brightness(1.3);
    }

    70% {
      transform: translateX(2px);
    }
  }

  @keyframes boss-enter {
    0% {
      opacity: 0;
      transform: translateX(70%);
    }

    30% {
      opacity: 1;
    }

    100% {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes boss-shake {
    0%,
    100% {
      transform: none;
    }

    15% {
      transform: translate(-5px, 2px) rotate(-1deg);
    }

    30% {
      transform: translate(5px, -2px) rotate(1deg);
    }

    45% {
      transform: translate(-4px, 1px);
    }

    60% {
      transform: translate(3px, -1px);
    }

    80% {
      transform: translate(-1px, 0);
    }
  }

  @keyframes boss-struck {
    0%,
    100% {
      transform: none;
      filter: none;
    }

    20% {
      transform: translateX(-6px);
      filter: drop-shadow(0 0 16px rgba(255, 40, 70, 0.9));
    }

    45% {
      transform: translateX(4px);
    }

    70% {
      transform: translateX(-2px);
    }
  }

  @keyframes boss-pulse {
    0%,
    100% {
      scale: 1;
    }

    50% {
      scale: 1.3;
    }
  }

  @keyframes boss-warn {
    0%,
    100% {
      scale: 1;
    }

    50% {
      scale: 1.07;
    }
  }

  @keyframes boss-low {
    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.55;
    }
  }

  @keyframes field-pulse {
    0%,
    100% {
      opacity: 0.14;
    }

    50% {
      opacity: 0.46;
    }
  }

  @keyframes field-run {
    from {
      transform: translateX(-100%);
    }

    to {
      transform: translateX(240%);
    }
  }

  @keyframes field-hit {
    0% {
      opacity: 1;
    }

    100% {
      opacity: 0.18;
    }
  }

  @keyframes field-ripple {
    0% {
      opacity: 1;
      transform: scale(0.15);
    }

    35% {
      opacity: 0.95;
    }

    100% {
      opacity: 0;
      transform: scale(1.7);
    }
  }

  @keyframes boss-lock-break {
    0% {
      transform: translate(-50%, -50%);
      opacity: 1;
    }

    30% {
      transform: translate(-50%, -50%) scale(1.3) rotate(-12deg);
      opacity: 1;
    }

    100% {
      transform: translate(-50%, 10%) scale(0.6) rotate(40deg);
      opacity: 0;
    }
  }
}
