/* YOYO Meteor Dance: styles are isolated from the textbook reading interface. */
#top .space-heading #yoyo-dance-open.yo-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  padding: 5px 12px 5px 8px;
  border: 1px solid #b9dacf;
  border-radius: 12px;
  background: linear-gradient(115deg, #edf8ef, #eae7fa);
  color: #24484b;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.02em;
  box-shadow: 0 2px 8px #07172818;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
#top .space-heading #yoyo-dance-open.yo-open:hover {
  border-color: #81b8a6;
  background: #fff3da;
  transform: translateY(-1px);
}
#top .space-heading #yoyo-dance-open.yo-open img {
  display: block;
  width: 29px;
  height: 31px;
  flex: 0 0 29px;
  object-fit: contain;
}
#top .space-heading #yoyo-dance-open.yo-open span { color: inherit; }

#top #yoyo-dance.yo-dialog {
  --yo-ink: #243b49;
  --yo-muted: #62737a;
  --yo-line: #dbe5df;
  --yo-mint: #bcebd5;
  --yo-lavender: #ddd5f5;
  --yo-peach: #f7d2ba;
  position: fixed;
  inset: 0;
  width: min(80vw, 1120px);
  max-width: calc(100vw - 32px);
  max-height: 95vh;
  max-height: 95dvh;
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #ffffff75;
  border-radius: 25px;
  background: #f8f7f1;
  color: var(--yo-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 26px 100px #03101b78;
  scrollbar-color: #b9c9c1 #f8f7f1;
  scrollbar-width: thin;
}
#top #yoyo-dance.yo-dialog::backdrop {
  background: #061323b8;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
#top #yoyo-dance .yo-shell,
#top #yoyo-dance .yo-shell * { box-sizing: border-box; }
#top #yoyo-dance .yo-shell { width: 100%; min-width: 0; }
#top #yoyo-dance p { margin: 0; }
#top #yoyo-dance button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid #c9d8d1;
  border-radius: 11px;
  background: #fffdf8;
  color: #29454c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  text-transform: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
#top #yoyo-dance button:hover { border-color: #91b7a5; background: #ebf5ed; }
#top #yoyo-dance button:active { transform: translateY(1px); }
#top #yoyo-dance button:focus-visible,
#top #yoyo-dance .yo-arena:focus-visible,
#top .space-heading #yoyo-dance-open.yo-open:focus-visible {
  outline: 3px solid #deac63;
  outline-offset: 3px;
}
#top #yoyo-dance button:disabled { opacity: .5; cursor: default; transform: none; }
#top #yoyo-dance .yo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 25px 17px;
  border: 0;
  background: linear-gradient(120deg, #f6f7ef 10%, #edf6ef 68%, #f2effa);
}
#top #yoyo-dance .yo-title-group { min-width: 0; }
#top #yoyo-dance .yo-eyebrow {
  margin: 0 0 5px;
  color: #558275;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.5;
}
#top #yoyo-dance #yo-title {
  margin: 0 0 5px;
  color: #253f48;
  font-size: clamp(23px, 2.4vw, 30px) !important;
  font-weight: 800 !important;
  letter-spacing: -.04em !important;
  line-height: 1.28 !important;
  overflow-wrap: anywhere;
}
#top #yoyo-dance .yo-subtitle {
  max-width: 660px;
  color: #62767a;
  font-size: 13px;
  line-height: 1.6;
}
#top #yoyo-dance .yo-close {
  flex: 0 0 auto;
  background: #ffffffb8;
  border-color: #d5dfd7;
}
#top #yoyo-dance .yo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 25px;
  border-top: 1px solid #e4e9e2;
}
#top #yoyo-dance .yo-stats {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
#top #yoyo-dance .yo-stats > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 99px;
  padding: 9px 12px;
  border: 1px solid #dce8df;
  border-radius: 12px;
  background: #edf4ed;
}
#top #yoyo-dance .yo-stats > span:nth-child(2) { background: #efecf7; border-color: #e1dced; }
#top #yoyo-dance .yo-stats > span:nth-child(3) { background: #faf0e8; border-color: #ecdfd3; }
#top #yoyo-dance .yo-stats small {
  color: #637478;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
#top #yoyo-dance .yo-stats strong {
  color: #2b484b;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#top #yoyo-dance #yo-lives { color: #a65d53; letter-spacing: .08em; }
#top #yoyo-dance .yo-actions { display: flex; flex-wrap: wrap; gap: 7px; }
#top #yoyo-dance #yo-sound[aria-pressed="true"] { background: #dff1e6; border-color: #a6cbb7; color: #2e5b4b; }
#top #yoyo-dance #yo-pause[aria-pressed="true"] { background: #e8e2f5; border-color: #c6b7e0; color: #584779; }
#top #yoyo-dance .yo-arena {
  isolation: isolate;
  position: relative;
  width: calc(100% - 36px);
  height: calc(95dvh - 330px);
  min-height: 300px;
  max-height: 580px;
  margin: 0 18px;
  overflow: hidden;
  border: 1px solid #355063;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 77% 20%, #65528e2e, transparent 53%),
    radial-gradient(ellipse at 24% 84%, #32796d26, transparent 52%),
    radial-gradient(circle at 10% 17%, #d3f3ed94 0 1px, transparent 1.7px),
    radial-gradient(circle at 30% 8%, #e2dbfd88 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 12%, #ffdfc591 0 1px, transparent 1.7px),
    radial-gradient(circle at 94% 39%, #f1efffb5 0 .8px, transparent 1.5px),
    radial-gradient(circle at 9% 76%, #c7e6e69c 0 .8px, transparent 1.5px),
    radial-gradient(circle at 71% 89%, #e4ccec9c 0 1px, transparent 1.8px),
    linear-gradient(155deg, #102034, #0c182b 68%, #192239);
  box-shadow: inset 0 0 45px #020a1459;
  color: #f4f5ef;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#top #yoyo-dance .yo-map-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: .28;
  pointer-events: none;
  filter: saturate(.68);
}
#top #yoyo-dance .yo-map-layer .alien-graph-stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}
#top #yoyo-dance .yo-map-layer #jarvis-space {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  pointer-events: none !important;
}
#top #yoyo-dance .yo-map-layer .yoyo-original-echo,
#top #yoyo-dance .yo-map-layer #alien-message-open { display: none !important; }
#top #yoyo-dance .yo-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#top #yoyo-dance .yo-stage-label {
  position: absolute;
  top: 17px;
  left: 19px;
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid #d9eee817;
  border-radius: 7px;
  background: #0c1a2b82;
  color: #b6cdc9;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
  line-height: 1.5;
  pointer-events: none;
}
#top #yoyo-dance .yo-curtain {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 34px 24px;
  background: radial-gradient(ellipse at center, #0d1d31e8, #0d1d3175 64%, #0d1d3125);
  text-align: center;
  cursor: default;
}
#top #yoyo-dance .yo-curtain > * { max-width: 470px; }
#top #yoyo-dance .yo-curtain-card { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#top #yoyo-dance .yo-curtain #yo-curtain-kicker {
  color: #b9e5d3;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.5;
}
#top #yoyo-dance .yo-curtain #yo-curtain-title {
  margin: 0;
  color: #fff8ec;
  font-size: clamp(24px, 3vw, 37px) !important;
  font-weight: 800 !important;
  letter-spacing: -.045em !important;
  line-height: 1.32 !important;
  text-wrap: balance;
}
#top #yoyo-dance .yo-curtain #yo-curtain-text {
  color: #c8d8dc;
  font-size: 14px;
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
#top #yoyo-dance .yo-curtain #yo-start {
  min-width: 170px;
  min-height: 49px;
  margin-top: 5px;
  padding: 12px 23px;
  border-color: #badfc9;
  border-radius: 14px;
  background: linear-gradient(105deg, #c6eed9, #e5def6);
  color: #203d48;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 5px 25px #020a144d;
}
#top #yoyo-dance .yo-curtain #yo-start:hover { background: #f8e5c9; border-color: #f1d5b0; }
#top #yoyo-dance .yo-toast {
  position: absolute;
  bottom: 19px;
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 8px 15px;
  border: 1px solid #d4e9db38;
  border-radius: 999px;
  background: #17312edf;
  color: #e0f2e7;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}
#top #yoyo-dance .yo-toast:empty { display: none; }
#top #yoyo-dance .yo-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 25px 21px;
}
#top #yoyo-dance .yo-help { min-width: 0; max-width: 630px; }
#top #yoyo-dance #yo-instructions { color: #48626a; font-size: 13px; line-height: 1.7; }
#top #yoyo-dance .yo-record-note { margin-top: 5px; color: #7b8a8d; font-size: 11px; line-height: 1.6; }
#top #yoyo-dance .yo-dpad {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(2, 44px);
  gap: 4px;
}
#top #yoyo-dance .yo-dpad button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-color: #ccdcd4;
  background: #eef4ed;
  font-size: 19px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#top #yoyo-dance .yo-dpad button[data-dir="up"] { grid-column: 2; grid-row: 1; }
#top #yoyo-dance .yo-dpad button[data-dir="left"] { grid-column: 1; grid-row: 2; }
#top #yoyo-dance .yo-dpad button[data-dir="down"] { grid-column: 2; grid-row: 2; }
#top #yoyo-dance .yo-dpad button[data-dir="right"] { grid-column: 3; grid-row: 2; }
#top #yoyo-dance .yo-dpad button:hover,
#top #yoyo-dance .yo-dpad button:active,
#top #yoyo-dance .yo-dpad button[data-pressed="true"],
#top #yoyo-dance .yo-dpad button[aria-pressed="true"] {
  border-color: #91b69f;
  background: #d7eddd;
  color: #244c3b;
}
#top #yoyo-dance .yo-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#top #yoyo-dance [hidden] { display: none !important; }

@media (max-width: 1000px) {
  #top #yoyo-dance.yo-dialog { width: calc(100vw - 32px); }
}
@media (max-width: 700px) {
  #top #yoyo-dance.yo-dialog { max-width: calc(100vw - 16px); width: calc(100vw - 16px); border-radius: 19px; }
  #top #yoyo-dance .yo-header { gap: 10px; padding: 17px 16px 13px; }
  #top #yoyo-dance #yo-title { font-size: 23px !important; }
  #top #yoyo-dance .yo-subtitle { font-size: 12px; line-height: 1.65; }
  #top #yoyo-dance .yo-eyebrow { font-size: 9px; }
  #top #yoyo-dance .yo-close { padding: 8px 10px; font-size: 12px; }
  #top #yoyo-dance .yo-toolbar { align-items: stretch; gap: 10px; padding: 12px 14px; }
  #top #yoyo-dance .yo-stats { width: 100%; gap: 6px; }
  #top #yoyo-dance .yo-stats > span {
    flex: 1;
    justify-content: center;
    min-width: 0;
    gap: 7px;
    padding: 9px 7px;
  }
  #top #yoyo-dance .yo-stats small { font-size: 10px; }
  #top #yoyo-dance .yo-stats strong { font-size: 16px; }
  #top #yoyo-dance .yo-actions { justify-content: flex-end; width: 100%; gap: 6px; }
  #top #yoyo-dance .yo-actions button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
  #top #yoyo-dance .yo-arena { width: calc(100% - 20px); height: 44dvh; min-height: 300px; max-height: 390px; margin: 0 10px; border-radius: 15px; }
  #top #yoyo-dance .yo-stage-label { top: 12px; left: 12px; font-size: 9px; }
  #top #yoyo-dance .yo-curtain { gap: 10px; padding: 36px 20px 25px; }
  #top #yoyo-dance .yo-curtain #yo-curtain-title { font-size: 26px !important; }
  #top #yoyo-dance .yo-curtain #yo-curtain-text { font-size: 13px; line-height: 1.8; }
  #top #yoyo-dance .yo-curtain #yo-start { min-width: 155px; font-size: 14px; }
  #top #yoyo-dance .yo-bottom { align-items: center; gap: 12px; padding: 14px 16px 17px; }
  #top #yoyo-dance #yo-instructions { font-size: 12px; line-height: 1.7; }
  #top #yoyo-dance .yo-record-note { font-size: 10px; }
  #top #yoyo-dance .yo-toast { bottom: 13px; padding: 7px 12px; font-size: 12px; }
}
@media (max-width: 440px) {
  #top #yoyo-dance .yo-bottom { align-items: flex-start; }
  #top #yoyo-dance .yo-stats > span { flex-direction: column; gap: 3px; padding: 7px 5px; }
  #top #yoyo-dance .yo-stats strong { font-size: 17px; }
  #top #yoyo-dance .yo-close { font-size: 11px; padding: 8px; }
  #top .space-heading #yoyo-dance-open.yo-open { font-size: 12px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #top #yoyo-dance button,
  #top .space-heading #yoyo-dance-open.yo-open { transition: none; }
  #top .space-heading #yoyo-dance-open.yo-open:hover { transform: none; }
}
@media print {
  #top #yoyo-dance,
  #top #yoyo-dance-open { display: none !important; }
}

