/* Ilustración interactiva 2D: conserva la órbita y transforma la máscara. */
.cyber-emblem {
  isolation: isolate;
  pointer-events: auto;
  aspect-ratio: 1;
}
.cyber-emblem .cyber-orbit {
  inset: 2% 7% auto;
  width: 86%;
  height: auto;
  aspect-ratio: 1;
}
.cyber-emblem .orbit-b {
  inset: 8% 13% auto;
  width: 74%;
}
.cyber-emblem .cyber-orbit,
.cyber-emblem .cyber-code {
  pointer-events: none;
}
.hannya-toggle {
  position: absolute;
  inset: 26px 6% 44px;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 36%;
  -webkit-tap-highlight-color: transparent;
}
.hannya-layer {
  position: absolute;
  inset: 0;
  display: block;
  transition: clip-path 0.72s cubic-bezier(0.2, 0.75, 0.15, 1);
}
[data-theme="CYBER JAPAN"]
  .cyber-emblem
  .hannya-toggle
  .hannya-layer
  .hannya-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  filter: drop-shadow(0 0 10px #ff214c55);
}
.cyber-emblem .hannya-toggle .hannya-art svg {
  width: 100%;
  height: 100%;
  filter: none;
}
.hannya-cyborg {
  clip-path: inset(0 100% 0 0);
}
[data-hannya="cyborg"] .hannya-cyborg {
  clip-path: inset(0 0 0 0);
}
.hannya-toggle:hover .hannya-art {
  filter: drop-shadow(0 0 16px #ff335488);
}
.hannya-toggle:focus-visible,
.hannya-switch:focus-visible {
  outline: 2px solid #ffd9df;
  outline-offset: 3px;
}
.hannya-switch {
  position: absolute;
  z-index: 4;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 126px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #ffdce4;
  cursor: pointer;
  font: 700 10px var(--body);
  letter-spacing: 1px;
  white-space: nowrap;
}
.hannya-switch:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px 0;
  border: 1px solid #c83b525e;
  border-radius: 30px;
  background: #180b16ec;
  box-shadow: inset 0 1px #ff8e9c15;
}
.hannya-switch:hover:before {
  border-color: #ff5674;
  box-shadow: 0 0 14px #ff2a4933;
}
.hannya-led {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #ff173e;
  box-shadow:
    0 0 9px #ff214c,
    0 0 3px #fff;
  animation: hannya-led 1.8s ease-in-out infinite;
}
[data-hannya="cyborg"] .hannya-led {
  animation: none;
  opacity: 1;
}
[data-hannya="cyborg"] .hannya-switch:before {
  border-color: #ff365b99;
}
.hannya-transform-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 40%;
}
.hannya-transition .hannya-transform-scan:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #bffaff;
  box-shadow: 0 0 16px 5px #32d9ee88;
  animation: hannya-transform 0.72s cubic-bezier(0.2, 0.75, 0.15, 1) forwards;
}
.hannya-transition .hannya-transform-scan:before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 15px,
    #67f0ff3d 16px 17px,
    transparent 18px 34px
  );
  clip-path: polygon(
    0 12%,
    60% 12%,
    60% 16%,
    0 16%,
    0 43%,
    45% 43%,
    45% 47%,
    0 47%,
    0 73%,
    55% 73%,
    55% 76%,
    0 76%
  );
  animation: hannya-digital-noise 0.72s steps(1) both;
}
.hannya-transition .hannya-cyborg {
  animation: hannya-chromatic-lock 0.72s steps(1) both;
}
[data-hannya="tradicional"].hannya-transition .hannya-transform-scan:after {
  animation-direction: reverse;
}
.cyborg-optic {
  filter: drop-shadow(0 0 4px #59f4ff);
}
.hero-art:has(.cyber-emblem) {
  pointer-events: auto;
}
@media (min-width: 761px) {
  [data-theme="CYBER JAPAN"] .hero {
    min-height: 340px;
  }
  [data-theme="CYBER JAPAN"] .hero-art .cyber-emblem {
    width: auto;
    height: min(310px, calc(100% - 28px));
    max-width: 100%;
    aspect-ratio: 1;
    transform: none;
    margin: 0;
  }
}
.cyber-emblem .code-top {
  top: 0;
  padding: 3px 10px;
  font-size: 10px;
}
.module-theme-art .cyber-emblem {
  min-width: 112px;
  padding-bottom: 12px;
}
.module-theme-art .hannya-toggle {
  inset: 10px 5% 24px;
}
.module-theme-art .hannya-switch {
  min-width: 110px;
  font-size: 8px;
  letter-spacing: 0.6px;
  bottom: -15px;
}
.module-theme-art .hannya-switch:before {
  inset: 11px 0;
}
.teacher-timer-art .hannya-switch,
.kiosk-theme-art .hannya-switch,
.public-theme-art .hannya-switch {
  font-size: 9px;
  min-width: 118px;
}
@keyframes hannya-led {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.12;
    box-shadow: none;
  }
}
@keyframes hannya-transform {
  from {
    left: 0;
    opacity: 1;
  }
  to {
    left: 100%;
    opacity: 0;
  }
}
@keyframes hannya-digital-noise {
  0%,
  100% {
    opacity: 0;
  }
  14% {
    opacity: 0.8;
    transform: translateX(-3px);
  }
  28% {
    opacity: 0.35;
    transform: translateX(3px);
  }
  42% {
    opacity: 0.6;
    transform: translateX(-1px);
  }
  64% {
    opacity: 0;
  }
}
@keyframes hannya-chromatic-lock {
  0%,
  100% {
    filter: none;
  }
  16%,
  38% {
    filter: drop-shadow(-2px 0 #24e9edb0) drop-shadow(2px 0 #ff285d80);
  }
  27%,
  50% {
    filter: none;
  }
}
@media (max-width: 760px) {
  [data-theme="CYBER JAPAN"] .hero-art {
    min-height: 0;
    padding: 8px 10px;
  }
  [data-theme="CYBER JAPAN"] .hero-art .cyber-emblem {
    width: min(260px, 100%);
    aspect-ratio: 1;
    height: auto;
  }
  .module-theme-art .cyber-emblem {
    width: 112px;
  }
  .kiosk-theme-art .hannya-switch {
    bottom: 0;
    font-size: 7px;
    min-width: 102px;
    letter-spacing: 0.4px;
  }
  .kiosk-theme-art .hannya-toggle,
  .public-theme-art .hannya-toggle {
    inset: 21px 4% 35px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hannya-layer {
    transition: none;
    animation: none !important;
  }
  .hannya-led {
    animation: none;
    opacity: 0.4;
  }
  [data-hannya="cyborg"] .hannya-led {
    opacity: 1;
  }
  .hannya-transform-scan:after,
  .hannya-transform-scan:before {
    animation: none !important;
    display: none;
  }
}
