/*
  Adventure (css/adventure.css): the Adventure screens, in canvas units (--u) like their prefabs
  (client/Unity/Assets/Prefabs/Adventure/**). Colours are AdventureWarmTheme.cs: mint page, white
  cards with a soft shadow, navy header band, ink #041845 and muted #3c465a text.
*/
.adv {
  --adv-mint: #e3f1e8;
  --adv-ink: #041845;
  --adv-muted: #3c465a;
  --adv-cream: #fff6e3;
  --adv-cream-rim: #edd9c2;
  --adv-green: #0d8439;
  --adv-green-soft: #e0efe5;
  --adv-amber: #ffae0d;
  --adv-purple: #7b5bc0;
  --adv-purple-soft: #f4effd;
  --adv-blue: #3a7bd5;
  --adv-blue-soft: #eaf2fb;
  --adv-gold: #f4b43a;
  --adv-gold-soft: #fff4d8;
  --adv-red: #e64a3c;
  --adv-red-soft: #fdece9;
  --adv-outline: #e6e0d2;
  --adv-card-shadow: 0 calc(10 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.08);
  --adv-corner-panel: calc(48 * var(--u));
  --adv-corner-card: calc(36 * var(--u));
  --adv-margin: calc(40 * var(--u));
  /* the content column on wide screens; the header's robot and title line up with it */
  --adv-col-max: 920px;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--adv-mint);
  color: var(--adv-ink);
  overflow: hidden;
}
.adv__body {
  position: relative;
  flex: 1;
  min-height: 0;
}
.adv__column {
  width: 100%;
  margin: 0 auto;
  padding: calc(27 * var(--u)) var(--adv-margin) calc(var(--safe-bottom) + 120 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(24 * var(--u));
}
.layout-wide .adv__column {
  max-width: var(--adv-col-max);
  padding-top: 36px;
  gap: 28px;
}

/* ---- header (AdventureScreenHeader): navy band, mountains, round-hole explorer, title + stats ---- */
.adv-header {
  position: relative;
  flex: none;
  z-index: 2;
  /* 100cqw below is the band's width */
  container-type: inline-size;
  height: calc(340 * var(--u) + var(--safe-top));
  background: var(--navy);
  color: #fff;
  overflow: visible;
}
.adv-header__decor {
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(560 * var(--u));
  opacity: 0.57;
  pointer-events: none;
}
.adv-header__inner {
  position: absolute;
  inset: var(--safe-top) 0 0 0;
  width: 100%;
  max-width: var(--adv-col-max);
  margin: 0 auto;
}
.layout-phone .adv-header__inner {
  max-width: none;
}
/* the back and right controls sit at the band's edges on every size (the full-width header of a wide flow) */
.adv-header__back {
  position: absolute;
  left: calc(40 * var(--u));
  top: calc(var(--safe-top) + 40 * var(--u));
  z-index: 3;
}
.adv-header__back .icon-btn {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  color: #fff;
}
.adv-header__right {
  position: absolute;
  right: calc(40 * var(--u));
  top: calc(var(--safe-top) + 40 * var(--u));
  display: flex;
  gap: calc(16 * var(--u));
  z-index: 3;
}
.adv-header__text {
  position: absolute;
  left: calc(441 * var(--u));
  right: calc(40 * var(--u));
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* the title sits on one line in every header (centre 130u below the band's top); the scope chip stands above it, the stats and chips below */
  padding-top: calc(102 * var(--u));
  gap: calc(4 * var(--u));
  min-width: 0;
}
.adv-header__text > .adv-eyebrow {
  position: absolute;
  left: 0;
  top: calc(30 * var(--u));
}
.adv-header__text h1 {
  font-weight: var(--w-semibold);
  font-size: calc(50 * var(--u));
  line-height: 1.1;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-header__subtitle {
  font-weight: var(--w-medium);
  font-size: calc(26 * var(--u));
  color: rgba(255, 255, 255, 0.9);
  text-shadow: var(--on-colour-shadow);
}
.adv-header__stats {
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
  margin: calc(3 * var(--u)) 0 0;
  padding: 0;
  list-style: none;
}
.adv-stat {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  min-width: 0;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-stat__glyph {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  object-fit: contain;
  flex: none;
}
.adv-stat__label {
  font-weight: var(--w-medium);
  font-size: calc(26 * var(--u));
  white-space: nowrap;
}
.adv-stat__value {
  font-weight: var(--w-semibold);
  font-size: calc(26 * var(--u));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* the round hole: the lower arc cuts the robot at the hips, the head breaks out above the rim */
.adv-hole {
  position: absolute;
  left: calc(152 * var(--u));
  bottom: calc(14 * var(--u));
  width: calc(266 * var(--u));
  height: calc(330 * var(--u));
  z-index: 2;
  clip-path: inset(0 0 0 0 round 0 0 calc(133 * var(--u)) calc(133 * var(--u)));
}
.adv-hole__disc {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--adv-cream);
}
.adv-hole__robot {
  position: absolute;
  left: calc(-15 * var(--u));
  bottom: calc(-158 * var(--u));
  width: calc(296.4 * var(--u));
  height: calc(487.8 * var(--u));
}
/*
  Wide: the robot and the title line up with the content column below once the column stands in from the
  band's edges (--adv-inset, capped where the robot still clears the back button at the band's edge). The
  disc keeps the phone's height: it stands clear of the band's lower edge, so the whole circle shows
  against the navy instead of its rim being swallowed by the edge of the band.
*/
.layout-wide .adv-header {
  --adv-inset: min(calc(112 * var(--u)), max(0px, (100cqw - var(--adv-col-max)) / 2));
}
.layout-wide .adv-hole {
  left: calc(152 * var(--u) - var(--adv-inset));
}
.layout-wide .adv-header__text {
  left: calc(441 * var(--u) - var(--adv-inset));
}

/* ---- surfaces and dividers ------------------------------------------------------------------- */
.adv-surface {
  background: #fff;
  border-radius: var(--adv-corner-panel);
  box-shadow: var(--adv-card-shadow);
  border: calc(2 * var(--u)) solid var(--adv-outline);
}
.adv-divider {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  padding: calc(8 * var(--u)) calc(24 * var(--u));
}
.adv-hero + .adv-divider {
  margin: calc(4 * var(--u)) 0 calc(-12 * var(--u));
}
/* a section heading belongs to the block below it: more air above it than below, the same on both */
.adv-entry__side > .adv-divider:first-child {
  margin: calc(4 * var(--u)) 0 calc(-12 * var(--u));
}
.adv-divider__rule {
  flex: 1;
  height: calc(3 * var(--u));
  min-width: calc(40 * var(--u));
  background: rgba(60, 70, 90, 0.35);
}
.adv-divider__label {
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--adv-ink);
  white-space: nowrap;
}

/* ---- option rows (AdventureOptionRow 1000x132) -------------------------------------------------- */
.adv-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(28 * var(--u));
  width: 100%;
  min-height: calc(132 * var(--u));
  padding: calc(24 * var(--u)) calc(32 * var(--u)) calc(24 * var(--u)) calc(30 * var(--u));
  border-radius: calc(40 * var(--u));
  background: #fff;
  box-shadow: var(--adv-card-shadow), inset 0 0 0 calc(2 * var(--u)) var(--adv-outline);
  text-align: left;
  transition: transform var(--t-fast) var(--ease-out);
}
.adv-option:active:not(:disabled) {
  transform: translateY(calc(4 * var(--u))) scale(0.99);
}
.adv-option:disabled {
  opacity: 0.55;
}
.adv-option__disc {
  display: grid;
  place-items: center;
  width: calc(84 * var(--u));
  height: calc(84 * var(--u));
  flex: none;
  border-radius: 50%;
}
.adv-option__disc img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
.adv-option__text {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  min-width: 0;
  flex: 1;
}
.adv-option__title {
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  line-height: 1.15;
  color: var(--adv-ink);
}
.adv-option__subtitle {
  font-weight: var(--w-medium);
  font-size: calc(26 * var(--u));
  line-height: 1.25;
  color: var(--adv-muted);
}
.adv-option__chevron {
  flex: none;
  font-weight: var(--w-black);
  font-size: calc(64 * var(--u));
  line-height: 0.8;
  color: var(--adv-ink);
}
.adv-option__badge {
  flex: none;
  padding: calc(8 * var(--u)) calc(20 * var(--u));
  border-radius: 999px;
  background: var(--adv-gold-soft);
  color: var(--adv-ink);
  font-weight: var(--w-semibold);
  font-size: calc(24 * var(--u));
}

/* ---- hero card (AdventureEntryMenu HeroCard) ------------------------------------------------------ */
.adv-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(32 * var(--u));
  padding: calc(40 * var(--u)) calc(40 * var(--u)) calc(38 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
  border: calc(2 * var(--u)) solid var(--adv-outline);
}
.adv-hero__top {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
}
.adv-hero__text {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  flex: 1;
  min-width: 0;
}
.adv-hero__title {
  font-weight: var(--w-semibold);
  font-size: calc(44 * var(--u));
  line-height: 1.15;
  color: var(--adv-ink);
}
.adv-hero__subtitle {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.3;
  text-wrap: balance;
  text-wrap: pretty;
  color: var(--adv-muted);
}
.adv-hero__art {
  flex: none;
  width: calc(212 * var(--u));
  height: calc(206 * var(--u));
  object-fit: contain;
  margin-right: calc(-4 * var(--u));
}
.adv-hero__cta {
  display: flex;
  gap: calc(14 * var(--u));
}

/* ---- pill buttons ----------------------------------------------------------------------------------- */
.adv-pill {
  --btn-h: calc(112 * var(--u));
  --btn-font: calc(38 * var(--u));
}
.adv-pill--secondary,
.adv-pill--tertiary {
  --btn-h: calc(88 * var(--u));
  --btn-font: calc(30 * var(--u));
}
.adv-pill--danger {
  --btn-h: calc(88 * var(--u));
  --btn-font: calc(30 * var(--u));
}
.adv-pill:not(.btn--block) {
  min-width: calc(220 * var(--u));
}
.adv-hero__cta .adv-pill {
  flex: 1;
}
.adv-hero__cta .adv-pill--tertiary,
.adv-hero__cta .adv-pill--danger {
  flex: none;
  min-width: calc(220 * var(--u));
}

/* ---- mode tiles (AdventureModeCard 480x372) ---------------------------------------------------------- */
.adv-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(24 * var(--u));
}
.adv-mode {
  --face: #7b5bc0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(372 * var(--u));
  padding: calc(32 * var(--u)) calc(28 * var(--u)) calc(28 * var(--u));
  border-radius: var(--adv-corner-card);
  background: var(--face);
  box-shadow:
    inset 0 calc(-9 * var(--u)) 0 color-mix(in srgb, var(--face) 76%, #000),
    inset 0 0 0 calc(3 * var(--u)) color-mix(in srgb, var(--face) 82%, #000),
    var(--adv-card-shadow);
  color: #fff;
  overflow: hidden;
}
.adv-mode__text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30%;
  align-items: start;
  gap: calc(12 * var(--u));
  margin: calc(16 * var(--u)) 0 calc(24 * var(--u));
  flex: 1;
}
.adv-mode__heading {
  overflow-wrap: anywhere;
  font-weight: var(--w-semibold);
  font-size: calc(40 * var(--u));
  line-height: 1.1;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-mode__text p {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.25;
  /* no single word left alone on the last line ("Runs.", "Endless.") */
  text-wrap: balance;
  text-wrap: pretty;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: var(--on-colour-shadow);
}
.adv-mode__art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.adv-mode__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(16 * var(--u));
  width: 100%;
  min-height: calc(132 * var(--u));
  padding: 0 calc(24 * var(--u));
  border-radius: 999px;
  background: var(--adv-cream);
  box-shadow: inset 0 calc(-6 * var(--u)) 0 var(--adv-cream-rim), 0 calc(6 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.14);
  color: var(--adv-ink);
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.adv-mode__cta-icon {
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  object-fit: contain;
  flex: none;
  /* the white action glyph takes the label's ink on the cream face */
  filter: brightness(0) saturate(100%) invert(8%) sepia(60%) saturate(3000%) hue-rotate(205deg);
}
.adv-mode__cta-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-mode.is-locked .adv-mode__cta {
  background: color-mix(in srgb, var(--face) 58%, #000);
  box-shadow: inset 0 0 0 calc(5 * var(--u)) color-mix(in srgb, var(--face) 44%, #000), 0 calc(6 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.16);
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-mode.is-locked .adv-mode__cta-icon {
  filter: none;
}
.adv-options {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}
.layout-wide .adv-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/*
  Entry hub layout. Phones and portrait tablets: one column as in AdventureEntryMenu.prefab (the wrappers
  are transparent). Wide: the hero card puts its CTA under the copy with the island beside both, so its
  padding is even on every side; the mode tiles get a fixed-size illustration and a CTA proportionate to
  its label, locked or not; the section rules run flush with the cards. Landscape screens use the width:
  the hero and the mode tiles fill a main column, the option rows a side column whose rows stretch so
  both columns end on one line.
*/
.adv-entry,
.adv-entry__main,
.adv-entry__side {
  display: contents;
}
/* the heading stands nearer the block it labels than the one above it */
.layout-wide .adv[data-screen='entry'] .adv-divider {
  margin: 0 0 calc(-14 * var(--u));
  padding-inline: 0;
}
.layout-wide .adv-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'text art'
    'cta art';
  align-items: center;
  column-gap: calc(40 * var(--u));
  row-gap: calc(30 * var(--u));
  padding: calc(44 * var(--u));
}
.layout-wide .adv-hero__top {
  display: contents;
}
.layout-wide .adv-hero__text {
  grid-area: text;
  align-self: end;
}
.layout-wide .adv-hero__art {
  grid-area: art;
  width: calc(236 * var(--u));
  height: calc(230 * var(--u));
  margin: 0;
}
.layout-wide .adv-hero__cta {
  grid-area: cta;
  align-self: start;
}
/* a narrow hero (the 1024 px landscape main column; the query measures the content box) gives CONTINUE +
   ABANDON the full width under the island */
.layout-wide .adv-hero {
  container-type: inline-size;
}
@container (max-width: 580px) {
  .layout-wide .adv-hero__text {
    align-self: start;
  }
  .layout-wide .adv-hero__art {
    grid-row: 1;
    align-self: start;
    width: calc(164 * var(--u));
    height: calc(160 * var(--u));
  }
  .layout-wide .adv-hero__cta {
    grid-column: 1 / -1;
  }
}
/* the tile as authored in AdventureModeCard.prefab: heading and copy on the left, the illustration in the
   top-right corner beside both, the CTA across the foot */
.layout-wide .adv-modes {
  container-type: inline-size;
}
.layout-wide .adv-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  column-gap: calc(20 * var(--u));
  min-height: 0;
  padding: calc(32 * var(--u)) calc(32 * var(--u)) calc(36 * var(--u));
}
.layout-wide .adv-mode__heading {
  grid-column: 1;
  grid-row: 1;
}
.layout-wide .adv-mode__text {
  display: contents;
}
.layout-wide .adv-mode__text p {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin-top: calc(10 * var(--u));
}
.layout-wide .adv-mode__art {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  width: calc(136 * var(--u));
  aspect-ratio: 1;
}
/* narrow tiles (1024 px landscape) keep the heading's room: the longest heading, "Valintaseikkailu", fits */
@container (max-width: 640px) {
  .layout-wide .adv-mode__art {
    width: calc(100 * var(--u));
  }
}
.layout-wide .adv-mode__cta {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: calc(28 * var(--u));
  min-height: calc(88 * var(--u));
  gap: calc(14 * var(--u));
  font-size: calc(28 * var(--u));
}
.layout-wide .adv-mode__cta-icon {
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
}
/*
  Wide entry: the composition scales with the room under the header instead of staying a fixed size at the
  top of a mostly empty page. The body measures its own height and width (container-type: size), the column
  takes the unit that makes the content fill that room with an even margin above and below, never smaller
  than the document's unit (a short laptop keeps today's size and scrolls if it must) and never more than
  1.3 times larger (a very large monitor centres the block instead of blowing it up). --adv-hu and --adv-wu
  are the content's height and its narrowest validated width in units; the header, the page margin and the
  back button keep the document's unit (--u-head), so the robot still lines up with the column's edge.
*/
@property --adv-room-h {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
@property --adv-room-w {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
@property --adv-spare {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
.layout-wide .adv[data-screen='entry'] {
  --u-head: var(--u);
}
.layout-wide .adv[data-screen='entry'] .adv__body {
  container-type: size;
}
.layout-wide .adv[data-screen='entry'] .adv__column {
  --adv-hu: 1300;
  --adv-wu: 1290;
  --adv-pad: max(36px, 5cqh);
  --adv-room-h: calc(100cqh - 2 * var(--adv-pad) - var(--safe-bottom));
  --adv-room-w: calc(min(100cqw, var(--adv-col-max)) - 2 * var(--adv-margin));
  --u: clamp(var(--u-head), min(calc(var(--adv-room-h) / var(--adv-hu)), calc(var(--adv-room-w) / var(--adv-wu))), calc(var(--u-head) * 1.3));
  /* the height the content leaves over at that unit (a width-limited tablet): the one-column layout shares it
     out between its sections instead of leaving it all above and below the block */
  --adv-spare: max(0px, calc(var(--adv-room-h) - var(--adv-hu) * var(--u)));
  /* the surfaces take the scaled unit too (the page declares them in the document's) */
  --adv-corner-panel: calc(48 * var(--u));
  --adv-corner-card: calc(36 * var(--u));
  --adv-card-shadow: 0 calc(10 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  min-height: 100cqh;
  justify-content: safe center;
  gap: calc(50 * var(--u));
  padding: var(--adv-pad) var(--adv-margin) calc(var(--adv-pad) + var(--safe-bottom));
}
.layout-wide .adv-options {
  gap: calc(28 * var(--u));
}
@media (min-width: 1000px) and (orientation: landscape) {
  .layout-wide .adv[data-screen='entry'] {
    --adv-col-max: 1280px;
  }
  .layout-wide .adv[data-screen='entry'] .adv__column {
    --adv-hu: 830;
    --adv-wu: 1750;
  }
  .layout-wide .adv-entry {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: calc(57 * var(--u));
    align-items: stretch;
  }
  .layout-wide .adv-entry__main,
  .layout-wide .adv-entry__side {
    display: flex;
    flex-direction: column;
    gap: calc(36 * var(--u));
    min-width: 0;
  }
  .layout-wide .adv-entry__side .adv-options {
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(calc(132 * var(--u)), 1fr);
    gap: calc(25 * var(--u));
  }
}
/* desktop monitors and portrait tablets have height to spare: a looser rhythm instead of the packing that
   a landscape tablet or a 720 px laptop needs to show everything at once */
@media (orientation: portrait) {
  .layout-wide .adv[data-screen='entry'] .adv__column {
    gap: calc(50 * var(--u) + var(--adv-spare) * 0.2);
  }
}
@media (min-width: 1360px) and (min-height: 860px) and (orientation: landscape), (orientation: portrait) {
  .layout-wide .adv-entry {
    column-gap: calc(68 * var(--u));
  }
  .layout-wide .adv-entry__main,
  .layout-wide .adv-entry__side {
    gap: calc(44 * var(--u));
  }
  .layout-wide .adv-entry__side .adv-options,
  .layout-wide .adv-options {
    gap: calc(30 * var(--u));
  }
  .layout-wide .adv[data-screen='entry'] .adv-hero {
    padding: calc(52 * var(--u));
    row-gap: calc(36 * var(--u));
  }
  .layout-wide .adv[data-screen='entry'] .adv-mode {
    padding: calc(40 * var(--u)) calc(40 * var(--u)) calc(44 * var(--u));
  }
  .layout-wide .adv[data-screen='entry'] .adv-mode__cta {
    margin-top: calc(34 * var(--u));
  }
}
@media (min-width: 1360px) and (min-height: 860px) and (orientation: landscape) {
  .layout-wide .adv[data-screen='entry'] {
    --adv-col-max: 1440px;
  }
  .layout-wide .adv[data-screen='entry'] .adv__column {
    --adv-hu: 885;
    --adv-wu: 2150;
  }
}
@media (min-width: 1600px) and (min-height: 860px) and (orientation: landscape) {
  .layout-wide .adv[data-screen='entry'] {
    --adv-col-max: 1760px;
  }
}

/* ---- empty / info panel (AdventureEmptyState) -------------------------------------------------------- */
.adv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(56 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
  text-align: center;
}
.adv-empty__glyph {
  font-weight: var(--w-bold);
  font-size: calc(88 * var(--u));
  line-height: 1;
  color: var(--adv-muted);
}
.adv-empty__robot {
  width: calc(260 * var(--u));
  height: calc(260 * var(--u));
}
.adv-empty h2 {
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  color: var(--adv-ink);
}
.adv-empty p {
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.3;
  color: var(--adv-muted);
}

/* ---- relic art ---------------------------------------------------------------------------------------------- */
.adv-relic-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.adv-relic-art--missing {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(27, 37, 89, 0.1);
  font-weight: var(--w-bold);
  color: var(--adv-ink);
}
.adv-glyph-disc {
  display: grid;
  place-items: center;
  width: var(--size, calc(84 * var(--u)));
  height: var(--size, calc(84 * var(--u)));
  flex: none;
  border-radius: 50%;
}
.adv-glyph-disc img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

/* ---- biome tiles (AdventureItemCard on the biome select) ------------------------------------------ */
.adv-biomes {
  display: flex;
  flex-direction: column;
  gap: calc(21 * var(--u));
}
.layout-wide .adv-biomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.adv-biome {
  --tint: #1e823c;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: calc(24 * var(--u));
  width: 100%;
  padding: calc(25 * var(--u)) calc(26 * var(--u)) calc(20 * var(--u)) calc(28 * var(--u));
  border-radius: var(--adv-corner-card);
  background: var(--tint);
  box-shadow:
    inset 0 0 0 calc(6 * var(--u)) color-mix(in srgb, var(--tint) 70%, #001242),
    var(--adv-card-shadow);
  text-align: left;
  color: #fff;
  transition: transform var(--t-fast) var(--ease-out);
}
.adv-biome:active:not(:disabled) {
  transform: translateY(calc(4 * var(--u))) scale(0.99);
}
.adv-biome:disabled {
  cursor: default;
}
.adv-biome.is-locked {
  --tint: #969ba0;
}
.adv-biome__disc {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  flex: none;
  margin-top: calc(12 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.adv-biome__disc > img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.adv-biome.is-locked .adv-biome__disc > img {
  opacity: 0.6;
}
.adv-biome__lock {
  position: absolute;
  right: calc(-4 * var(--u));
  bottom: calc(-4 * var(--u));
  display: grid;
  place-items: center;
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  border-radius: 50%;
  background: #3b4559;
  border: calc(5 * var(--u)) solid #fff;
}
.adv-biome__lock img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}
.adv-biome__body {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  flex: 1;
  min-width: 0;
}
.adv-biome__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--u));
}
.adv-biome__title {
  font-weight: var(--w-semibold);
  font-size: calc(44 * var(--u));
  line-height: 1.15;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
  min-width: 0;
}
.adv-biome.is-locked .adv-biome__title {
  color: var(--adv-muted);
  text-shadow: none;
}
.adv-biome__tier {
  flex: none;
  padding: calc(8 * var(--u)) calc(22 * var(--u));
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 50%, #000);
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-biome.is-locked .adv-biome__tier {
  background: #7a808a;
}
.adv-biome__desc {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
  padding: calc(14 * var(--u)) calc(22 * var(--u));
  border-radius: calc(24 * var(--u));
  background: color-mix(in srgb, var(--tint) 12%, #fff);
  color: var(--adv-ink);
  font-weight: var(--w-semibold);
  font-size: calc(29 * var(--u));
  line-height: 1.22;
}
.adv-biome.is-locked .adv-biome__desc,
.adv-biome__desc em {
  color: #3b4559;
}
.adv-biome__desc em {
  font-style: italic;
}
.adv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(120 * var(--u)) 0;
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  color: var(--adv-muted);
}


/* ---- header eyebrow chip (AdventureScreenHeader scope chip) ----------------------------------------- */
.adv-eyebrow {
  --chip: #1e823c;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  max-width: 100%;
  padding: calc(10 * var(--u)) calc(26 * var(--u)) calc(10 * var(--u)) calc(18 * var(--u));
  border-radius: 999px;
  background: var(--chip);
  font-weight: var(--w-bold);
  font-size: calc(29 * var(--u));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
}
.adv-eyebrow img {
  width: calc(38 * var(--u));
  height: calc(38 * var(--u));
  object-fit: contain;
}
.adv-eyebrow span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- item cards (AdventureItemCard: relics, perks, shop offers) --------------------------------------- */
.adv-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  width: 100%;
  padding: calc(28 * var(--u)) calc(32 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow), inset 0 0 0 calc(2 * var(--u)) var(--adv-outline);
  text-align: left;
  color: var(--adv-ink);
}
button.adv-item {
  transition: transform var(--t-fast) var(--ease-out);
}
button.adv-item:active:not(:disabled) {
  transform: translateY(calc(4 * var(--u))) scale(0.99);
}
.adv-item.is-selected {
  background: #eaf6ee;
  box-shadow: var(--adv-card-shadow), inset 0 0 0 calc(6 * var(--u)) var(--adv-green);
}
.adv-item__head {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  min-height: calc(112 * var(--u));
}
.adv-item__title {
  flex: 1;
  min-width: 0;
  font-weight: var(--w-semibold);
  font-size: calc(44 * var(--u));
  line-height: 1.15;
  color: var(--adv-ink);
}
.adv-item__chip {
  --chip: #8a93a6;
  flex: none;
  padding: calc(8 * var(--u)) calc(22 * var(--u));
  border-radius: 999px;
  background: var(--chip);
  font-weight: var(--w-semibold);
  font-size: calc(26 * var(--u));
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-item__desc {
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  line-height: 1.25;
  color: var(--adv-muted);
}
.adv-item--heart-resource .adv-item__chip {
  color: var(--adv-ink);
  text-shadow: none;
}
.adv-item__hint {
  font-weight: var(--w-medium);
  font-style: italic;
  font-size: calc(32 * var(--u));
  color: var(--adv-muted);
}
.adv-item__check {
  position: absolute;
  right: calc(24 * var(--u));
  bottom: calc(24 * var(--u));
  display: grid;
  place-items: center;
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  border-radius: 50%;
  background: var(--adv-green);
}
.adv-item__check img {
  width: 55%;
  height: 55%;
  object-fit: contain;
}
.adv-item__cta {
  display: block;
  margin-top: calc(8 * var(--u));
}
.adv-item-icon {
  --accent: #8a93a6;
  display: grid;
  place-items: center;
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, #fff);
}
.adv-item-icon img {
  width: calc(88 * var(--u));
  height: calc(88 * var(--u));
  object-fit: contain;
}
.adv-item-icon.is-solid {
  background: var(--accent);
}
.adv-item-icon.is-solid img {
  width: 58%;
  height: 58%;
}
.adv-item-icon__missing {
  width: 50%;
  height: 50%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 45%, #fff);
}

/* a white glyph painted in a colour (kit.js Tint) */
.adv-tint {
  display: inline-block;
  background: var(--tint, currentColor);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* ---- footer bar ------------------------------------------------------------------------------------------- */
.adv-footer {
  flex: none;
  position: relative;
  z-index: 3;
  padding: calc(18 * var(--u)) var(--adv-margin) calc(var(--safe-bottom) + 24 * var(--u));
  background: linear-gradient(to bottom, rgba(227, 241, 232, 0), var(--adv-mint) 28%);
}
.adv-footer__inner {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  width: 100%;
  margin: 0 auto;
}
.layout-wide .adv-footer__inner {
  max-width: 920px;
}

/* ---- header extras on the map: help button and the boss chip ----------------------------------------- */
.adv-help {
  display: grid;
  place-items: center;
  width: calc(88 * var(--u));
  height: calc(88 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-weight: var(--w-bold);
  font-size: calc(46 * var(--u));
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-bosschip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  margin-top: calc(6 * var(--u));
  padding: calc(8 * var(--u)) calc(22 * var(--u)) calc(8 * var(--u)) calc(12 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) rgba(255, 255, 255, 0.55);
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
}
.adv-bosschip img {
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  object-fit: contain;
}

/* ---- the map (MapViewUI, AdventureBiomeBackdrop, MapNode) ------------------------------------------------ */
.adv-map-page {
  background: var(--navy);
}
.adv-map-page .adv-header__text {
  right: calc(152 * var(--u));
}
.adv-map {
  position: relative;
  flex: 1;
  min-height: 0;
  z-index: 1;
  background: #14301c;
}
.adv-map__content {
  position: relative;
  width: 100%;
  height: calc(var(--h) * var(--u));
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: center bottom;
  overflow: hidden;
}
.adv-map__lane {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% + (var(--lane-x) - var(--lane-w) / 2 - 60) * var(--u));
  width: calc((var(--lane-w) + 120) * var(--u));
  background: linear-gradient(90deg, rgba(0, 18, 66, 0), rgba(0, 18, 66, 0.42) calc(60 * var(--u)), rgba(0, 18, 66, 0.42) calc(100% - 60 * var(--u)), rgba(0, 18, 66, 0));
  pointer-events: none;
}
.adv-map__lines {
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(1080 * var(--u));
  height: calc(var(--h) * var(--u));
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
}
.adv-map__lines line {
  stroke-width: 8;
  stroke-dasharray: 20 16;
}
.adv-map__fade {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(340 * var(--u) + var(--safe-top));
  height: calc(110 * var(--u));
  z-index: 2;
  background: linear-gradient(to bottom, rgba(0, 18, 66, 0.9), rgba(0, 18, 66, 0));
  pointer-events: none;
}
.layout-wide .adv-map__fade {
  display: none;
}

.adv-node {
  --face: #1e823c;
  --rim: #0b4a1f;
  --outline: transparent;
  --ink: #fff;
  --plinth: #f5f5f0;
  --plinth-rim: #d9d9d4;
  position: absolute;
  left: calc(50% + (var(--x) - 68) * var(--u));
  bottom: calc(var(--b) * var(--u));
  width: calc(136 * var(--u));
  height: calc(200 * var(--u));
  z-index: 2;
  transition: transform var(--t-fast) var(--ease-out);
}
.adv-node.is-boss {
  transform: scale(1.2);
}
.adv-node:hover {
  transform: scale(1.08);
}
.adv-node.is-boss:hover {
  transform: scale(1.3);
}
.adv-node > * {
  position: absolute;
  pointer-events: none;
}
.adv-node__glow {
  left: calc(-58 * var(--u));
  top: calc(-53 * var(--u));
  width: calc(252 * var(--u));
  height: calc(290 * var(--u));
  background: radial-gradient(closest-side, rgba(255, 233, 168, 0.9), rgba(255, 233, 168, 0));
  animation: adv-glow 1.1s ease-in-out infinite alternate;
}
.reduced-motion .adv-node__glow {
  animation: none;
}
@keyframes adv-glow {
  from {
    opacity: 0.9;
  }
  to {
    opacity: 0.55;
  }
}
.adv-node__plinth-rim,
.adv-node__plinth {
  left: calc(-10 * var(--u));
  width: calc(156 * var(--u));
  height: calc(40 * var(--u));
  border-radius: calc(20 * var(--u));
}
.adv-node__plinth-rim {
  top: calc(158 * var(--u));
  background: var(--plinth-rim);
  box-shadow: 0 calc(6 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.3);
}
.adv-node__plinth {
  top: calc(152 * var(--u));
  background: var(--plinth);
}
.adv-node__rim,
.adv-node__face,
.adv-node__ring {
  left: calc(6 * var(--u));
  width: calc(124 * var(--u));
  height: calc(150 * var(--u));
  border-radius: calc(28 * var(--u));
}
.adv-node__rim {
  top: calc(23 * var(--u));
  background: var(--rim);
}
.adv-node__face {
  top: calc(11 * var(--u));
  background: var(--face);
  box-shadow: inset 0 0 0 calc(6 * var(--u)) var(--outline);
}
.adv-node__ring {
  left: calc(-5 * var(--u));
  top: 0;
  width: calc(146 * var(--u));
  height: calc(184 * var(--u));
  border-radius: calc(34 * var(--u));
  box-shadow: 0 0 0 calc(5 * var(--u)) #fff;
}
.adv-node__ring--failed {
  box-shadow: 0 0 0 calc(5 * var(--u)) #e0533f;
}
.adv-node__disc {
  left: calc(28 * var(--u));
  top: calc(68 * var(--u));
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.adv-node__glyph {
  left: calc(41 * var(--u));
  top: calc(81 * var(--u));
  width: calc(54 * var(--u));
  height: calc(54 * var(--u));
  object-fit: contain;
}
.adv-node__tier {
  left: calc(13 * var(--u));
  top: calc(13 * var(--u));
  width: calc(110 * var(--u));
  height: calc(50 * var(--u));
  display: grid;
  place-items: center;
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  color: var(--ink);
}
.adv-node__badge {
  left: calc(97 * var(--u));
  top: calc(-1 * var(--u));
  display: grid;
  place-items: center;
  width: calc(42 * var(--u));
  height: calc(42 * var(--u));
  border-radius: 50%;
  background: #0d8439;
  box-shadow: 0 0 0 calc(3 * var(--u)) #fff;
}
.adv-node__badge img {
  width: 55%;
  height: 55%;
  object-fit: contain;
}
.adv-node__badge--failed {
  background: #dd6251;
}
.adv-node__lock {
  left: calc(82 * var(--u));
  top: calc(120 * var(--u));
  width: calc(28 * var(--u));
  height: calc(32 * var(--u));
  object-fit: contain;
}
.adv-node.is-shaking {
  animation: adv-shake 0.34s ease-in-out;
}
@keyframes adv-shake {
  25% {
    translate: calc(14 * var(--u)) 0;
  }
  50% {
    translate: calc(-10 * var(--u)) 0;
  }
  75% {
    translate: calc(5 * var(--u)) 0;
  }
}

/* ---- hearts and sparks pills (AdventureRunHud) --------------------------------------------------------------- */
.adv-hud {
  position: absolute;
  right: calc(40 * var(--u));
  bottom: calc(var(--safe-bottom) + 52 * var(--u));
  z-index: 3;
  display: flex;
  gap: calc(16 * var(--u));
}
.adv-hud__pill {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
  height: calc(132 * var(--u));
  padding: 0 calc(28 * var(--u)) 0 calc(24 * var(--u));
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 calc(8 * var(--u)) calc(16 * var(--u)) rgba(0, 0, 0, 0.28);
  font-weight: var(--w-bold);
  font-size: calc(52 * var(--u));
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}
.adv-hud__pill img {
  width: calc(62 * var(--u));
  height: calc(62 * var(--u));
  object-fit: contain;
}
.adv-maphint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 200 * var(--u));
  z-index: 4;
  max-width: calc(100% - 80 * var(--u));
  transform: translateX(-50%);
  padding: calc(18 * var(--u)) calc(36 * var(--u));
  border-radius: 999px;
  background: rgba(0, 18, 66, 0.92);
  color: #fff;
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  text-align: center;
  box-shadow: 0 calc(8 * var(--u)) calc(20 * var(--u)) rgba(0, 0, 0, 0.3);
  animation: toast-in var(--t-med) var(--ease-out);
}
.adv-resource-receipt,
.adv-resource-receipt__part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(14 * var(--u));
}
.adv-resource-receipt { flex-wrap: wrap; max-width: 100%; }
.adv-resource-receipt__part { white-space: nowrap; }
.adv-resource-receipt__part img {
  width: calc(38 * var(--u));
  height: calc(38 * var(--u));
  object-fit: contain;
}
.advq-receipt__goal .adv-resource-receipt { gap: calc(10 * var(--u)); }
.advq-receipt__goal .adv-resource-receipt__part { gap: calc(8 * var(--u)); }
.advq-receipt__goal .adv-resource-receipt__part img {
  width: calc(26 * var(--u)); height: calc(26 * var(--u));
}

/* ---- stop preview sheet (AdventureNodePreviewPopup) ----------------------------------------------------------- */
.adv-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 18, 66, 0.55);
  animation: fade-in var(--t-med) var(--ease-out);
}
.layout-wide .adv-sheet-layer {
  align-items: center;
}
.adv-sheet {
  display: flex;
  flex-direction: column;
  gap: calc(26 * var(--u));
  width: min(100%, calc(1080 * var(--u)));
  max-height: 100%;
  overflow-y: auto;
  padding: calc(22 * var(--u)) calc(40 * var(--u)) calc(var(--safe-bottom) + 56 * var(--u));
  border-radius: calc(48 * var(--u)) calc(48 * var(--u)) 0 0;
  background: var(--card-warm, #fbf7ef);
  box-shadow: 0 calc(-8 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, 0.25);
  animation: adv-sheet-in 0.28s var(--ease-out);
}
.layout-wide .adv-sheet {
  width: min(100%, 720px);
  border-radius: 28px;
  padding-bottom: 44px;
}
@keyframes adv-sheet-in {
  from {
    transform: translateY(100%);
  }
}
.adv-sheet__handle {
  align-self: center;
  width: calc(96 * var(--u));
  height: calc(10 * var(--u));
  border-radius: 999px;
  background: #d7dae0;
}
.adv-sheet__title {
  display: flex;
  align-items: center;
  gap: calc(28 * var(--u));
  min-height: calc(156 * var(--u));
}
.adv-sheet__tile {
  --tile: #1e823c;
  display: grid;
  place-items: center;
  width: calc(150 * var(--u));
  height: calc(150 * var(--u));
  flex: none;
  border-radius: calc(36 * var(--u));
  background: var(--tile);
  box-shadow: inset 0 calc(-8 * var(--u)) 0 color-mix(in srgb, var(--tile) 72%, #000);
}
.adv-sheet__tile img {
  width: 64%;
  height: 64%;
  object-fit: contain;
}
.adv-sheet__text {
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
  min-width: 0;
}
.adv-sheet__text h2 {
  font-weight: var(--w-extrabold);
  font-size: calc(60 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-sheet__text p {
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  color: #5b6578;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-sheet__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(20 * var(--u));
}
.adv-stat-card {
  --c: #3a7bd5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(26 * var(--u)) calc(16 * var(--u)) calc(24 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e7e2d7;
}
.adv-stat-card__disc {
  display: grid;
  place-items: center;
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  border-radius: 50%;
  background: var(--c);
}
.adv-stat-card__disc img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}
.adv-stat-card__disc b {
  font-weight: var(--w-extrabold);
  font-size: calc(64 * var(--u));
  line-height: 1;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.adv-stat-card__label {
  font-weight: var(--w-semibold);
  font-size: calc(24 * var(--u));
  letter-spacing: 0.1em;
  color: #5b6578;
}
.adv-stat-card__value {
  font-weight: var(--w-extrabold);
  font-size: calc(60 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
}
.adv-sheet__line {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: 0 calc(8 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  line-height: 1.25;
  color: #1b2559;
}
.adv-sheet__line img {
  width: calc(54 * var(--u));
  height: calc(54 * var(--u));
  object-fit: contain;
  flex: none;
}
.adv-sheet__line--heart {
  font-weight: var(--w-semibold);
  font-size: calc(38 * var(--u));
  color: #b3261e;
}
.adv-sheet__line--study img {
  filter: invert(36%) sepia(80%) saturate(1500%) hue-rotate(195deg);
}
.adv-sheet__plain {
  padding: calc(12 * var(--u)) 0;
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(40 * var(--u));
  line-height: 1.25;
  color: #1b2559;
}
.adv-sheet__actions {
  display: flex;
  gap: calc(20 * var(--u));
  margin-top: calc(8 * var(--u));
}
.adv-sheet__actions .btn {
  --btn-h: calc(112 * var(--u));
  --btn-font: calc(38 * var(--u));
}
.adv-sheet__start {
  flex: 1.4;
}
.adv-sheet__not-now {
  flex: 1;
}

/* ---- run guide popup ------------------------------------------------------------------------------------------ */
.adv-guide-layer {
  z-index: 70;
}
.adv-guide {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
  width: min(100%, calc(940 * var(--u)));
  max-height: 100%;
  overflow-y: auto;
  padding: calc(56 * var(--u)) calc(44 * var(--u)) calc(40 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: 0 calc(16 * var(--u)) calc(48 * var(--u)) rgba(0, 0, 0, 0.32);
  animation: pop-in var(--t-med) var(--ease-spring);
}
.layout-wide .adv-guide {
  width: min(100%, 600px);
}
.adv-guide h2 {
  text-align: center;
  font-weight: var(--w-extrabold);
  font-size: calc(60 * var(--u));
  color: var(--adv-ink);
}
.adv-guide ul {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
  padding: 0;
}
.adv-guide li {
  display: flex;
  align-items: center;
  gap: calc(28 * var(--u));
  min-height: calc(112 * var(--u));
}
.adv-guide__disc {
  display: grid;
  place-items: center;
  width: calc(104 * var(--u));
  height: calc(104 * var(--u));
  flex: none;
  border-radius: 50%;
}
.adv-guide__disc img {
  width: 54%;
  height: 54%;
  object-fit: contain;
}
.adv-guide__text {
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.25;
  color: #1b2559;
  white-space: pre-line;
}
.adv-guide__hint {
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: var(--adv-muted);
}

/* ---- boss preview (AdventureBossPreviewMenu) ---------------------------------------------------------------------- */
.adv-overlay-screen {
  position: fixed;
  inset: 0;
  z-index: 45;
}
.adv-boss-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(14 * var(--u));
  margin-top: calc(150 * var(--u));
  padding: calc(222 * var(--u)) calc(36 * var(--u)) calc(32 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
  text-align: center;
}
.adv-boss-ring {
  position: absolute;
  left: 50%;
  top: calc(-150 * var(--u));
  width: calc(320 * var(--u));
  height: calc(320 * var(--u));
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 calc(8 * var(--u)) calc(16 * var(--u)) rgba(0, 0, 0, 0.18);
}
.adv-boss-ring__disc {
  position: absolute;
  inset: calc(12 * var(--u));
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
}
.adv-boss-ring__disc img.is-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.adv-boss-ring__disc img.is-glyph {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.adv-boss-ring__crown {
  position: absolute;
  left: 50%;
  bottom: calc(-30 * var(--u));
  display: grid;
  place-items: center;
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--adv-gold);
  box-shadow: 0 0 0 calc(4 * var(--u)) #fff;
}
.adv-boss-ring__crown img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}
.adv-boss-card h2 {
  font-weight: var(--w-semibold);
  font-size: calc(56 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
}
.adv-boss-card__desc {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.3;
  color: var(--adv-muted);
}
.adv-boss-card__reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--u));
  font-size: calc(36 * var(--u));
  color: var(--adv-gold);
}
.adv-boss-card__reward b {
  font-weight: var(--w-bold);
}
.adv-boss-card__reward img {
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  object-fit: contain;
}
.adv-boss-chips {
  display: flex;
  flex-wrap: wrap;
  gap: calc(16 * var(--u));
  padding: calc(8 * var(--u)) 0;
}
.adv-boss-chip {
  --c: #e64a3c;
  position: relative;
  flex: 1 1 calc(420 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(16 * var(--u));
  min-height: calc(120 * var(--u));
  padding: calc(16 * var(--u)) calc(20 * var(--u)) calc(16 * var(--u)) calc(34 * var(--u));
  border-radius: calc(28 * var(--u));
  background: color-mix(in srgb, var(--c) 10%, #fff);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) color-mix(in srgb, var(--c) 28%, #fff);
  text-align: left;
  overflow: hidden;
}
.adv-boss-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(10 * var(--u));
  background: var(--c);
}
.adv-boss-chip__disc {
  display: grid;
  place-items: center;
  width: calc(72 * var(--u));
  height: calc(72 * var(--u));
  flex: none;
  border-radius: 50%;
  background: var(--c);
}
.adv-boss-chip__disc b {
  font-weight: var(--w-black);
  font-size: calc(40 * var(--u));
  color: #fff;
}
.adv-boss-chip__disc img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}
.adv-boss-chip__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.adv-boss-chip__text strong {
  font-weight: var(--w-semibold);
  font-size: calc(30 * var(--u));
  color: var(--adv-ink);
}
.adv-boss-chip__text span {
  font-weight: var(--w-medium);
  font-size: calc(24 * var(--u));
  line-height: 1.25;
  color: var(--adv-muted);
}
.adv-boss-rules {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding: calc(8 * var(--u)) calc(12 * var(--u)) 0;
  text-align: left;
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: var(--adv-ink);
}

/* ---- loadout and shared bits ------------------------------------------------------------------------------------- */
.adv-offers {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
}
.adv-helper-card {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  padding: calc(28 * var(--u)) calc(32 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: color-mix(in srgb, var(--adv-green) 8%, #fff);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) color-mix(in srgb, var(--adv-green) 22%, #fff);
}
.adv-helper-card h3 {
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  color: var(--adv-ink);
}
.adv-helper-card p {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.3;
  color: var(--adv-muted);
}
.adv-pill__label {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
}
.adv-pill__cost {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(4 * var(--u)) calc(16 * var(--u)) calc(4 * var(--u)) calc(8 * var(--u));
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: calc(28 * var(--u));
  text-shadow: none;
}
.adv-pill__cost img {
  width: calc(36 * var(--u));
  height: calc(36 * var(--u));
  object-fit: contain;
  filter: none;
}
.adv-error {
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: var(--adv-red);
}

/* ==== Adventure quiz stop (QuizNode.js, quiz-parts.js) ==================================================== */
.quiz--adventure {
  --adv-mint: #e3f1e8;
  --adv-ink: #041845;
  --adv-muted: #3c465a;
  --adv-cream: #fff6e3;
  --adv-cream-rim: #edd9c2;
  --adv-green: #0d8439;
  --adv-green-soft: #e0efe5;
  --adv-amber: #ffae0d;
  --adv-purple: #7b5bc0;
  --adv-purple-soft: #f4effd;
  --adv-blue: #3a7bd5;
  --adv-blue-soft: #eaf2fb;
  --adv-gold: #f4b43a;
  --adv-gold-soft: #fff4d8;
  --adv-red: #e64a3c;
  --adv-red-soft: #fdece9;
  --adv-outline: #e6e0d2;
  --adv-card-shadow: 0 calc(10 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.08);
  --adv-corner-panel: calc(48 * var(--u));
  --adv-corner-card: calc(36 * var(--u));
  --adv-margin: calc(40 * var(--u));
}
.quiz--adventure .goal-bar__fill {
  background: #37d479;
}
.quiz--adventure .goal-bar {
  width: calc(364 * var(--u));
}

/* the stop tag beside "Goal": ROW 1 on the dark pill, ELITE purple, BOSS red */
.advq-tag {
  display: inline-block;
  line-height: 1;
}
.quiz--adventure .quiz-chip:has(> .advq-tag--boss) {
  background: var(--adv-red);
}
.quiz--adventure .quiz-chip:has(> .advq-tag--elite) {
  background: var(--adv-purple);
}

/* ---- points ring: the white arc is the share of the value still on offer ---- */
/* a dark disc with a thin white band inside its rim: the band is the share of the points still on offer */
.advq-ring {
  border-radius: 50%;
  background: var(--well, #1b2559);
  box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(27, 37, 89, 0.25);
}
.advq-ring .round-timer__ring {
  inset: calc(5 * var(--u));
  background: conic-gradient(#fff calc(var(--fraction) * 360deg), transparent 0);
  box-shadow: none;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9 * var(--u)), #000 calc(100% - 8.4 * var(--u)));
  mask: radial-gradient(farthest-side, transparent calc(100% - 9 * var(--u)), #000 calc(100% - 8.4 * var(--u)));
}
.advq-ring .round-timer__face {
  display: none;
}
.advq-ring__text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(2 * var(--u));
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.advq-ring__value {
  font-weight: var(--w-extrabold);
  font-size: calc(56 * var(--u));
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.advq-ring__value[data-digits='1'],
.advq-ring__value[data-digits='2'] {
  font-size: calc(66 * var(--u));
}
.advq-ring__value[data-digits='4'] {
  font-size: calc(42 * var(--u));
}
.advq-ring__caption {
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  line-height: 1;
  letter-spacing: 0.02em;
}
.advq-ring.is-frozen .advq-ring__text {
  color: #0b5a7a;
  text-shadow: none;
}
.advq-ring.is-frozen {
  background: radial-gradient(circle at 35% 30%, #e9fbff, #8fd8f2 70%);
}
.advq-ring.is-frozen .round-timer__ring {
  background: conic-gradient(#3fb2dd calc(var(--fraction) * 360deg), transparent 0);
}

/* ---- bonus chips under the header ---- */
.advq-chips {
  position: absolute;
  z-index: 3;
  top: calc(var(--banner-h) + var(--safe-top) + 28 * var(--u));
  left: calc(350 * var(--u));
  right: calc(200 * var(--u));
  height: calc(60 * var(--u));
  pointer-events: none;
  overflow: hidden;
}
.advq-chips__row {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: calc(14 * var(--u));
  transform-origin: left center;
}
.layout-wide .advq-chips {
  left: calc(max(0px, (100vw - 1080 * var(--u)) / 2) + 350 * var(--u));
  right: calc(max(0px, (100vw - 1080 * var(--u)) / 2) + 200 * var(--u));
}
.advq-chip {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  flex: none;
  height: calc(60 * var(--u));
  padding: 0 calc(24 * var(--u)) 0 calc(14 * var(--u));
  border-radius: 999px;
  background: var(--chip, #969ba0);
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(28 * var(--u));
  line-height: 1;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
  animation: advq-chip-in 280ms var(--ease-spring) both;
}
.advq-chip:not(:has(img)) {
  padding-left: calc(24 * var(--u));
}
.advq-chip > span {
  flex: none;
}
.advq-chip > .advq-chip__factor { flex: none; overflow: visible; }
.advq-chip img {
  flex: none;
}
.advq-chip img {
  width: calc(38 * var(--u));
  height: calc(38 * var(--u));
  object-fit: contain;
}
@keyframes advq-chip-in {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
}
.reduced-motion .advq-chip {
  animation: none;
}

/* ---- answer rows with a padlock chip ---- */
.advq-row {
  position: relative;
}
.advq-row .answer {
  width: 100%;
}
.advq-row.has-chip .answer {
  padding-right: calc(56 * var(--u) + 118 * var(--u));
}
.answers[data-cols='2'] .advq-row.has-chip .answer {
  padding-right: calc(28 * var(--u) + 84 * var(--u));
}
.answers.is-fading .advq-row .answer {
  transition: opacity 350ms ease;
  opacity: 0;
}
.answer.is-bet {
  --face: #fffaf0;
  box-shadow:
    inset 0 calc(-12 * var(--u)) 0 var(--lip),
    0 0 0 calc(6 * var(--u)) var(--adv-gold),
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.08);
}
.answer.is-greyed {
  --face: #e7e9ec;
  --lip: #c9ccd1;
  --ink-a: #8c929b;
}
.answer.is-wand {
  --face: #fff1c7;
  --lip: #e8b400;
  animation: advq-wand 520ms ease-in-out 2;
}
@keyframes advq-wand {
  50% {
    transform: scale(1.025);
  }
}
.answer.is-removed .answer__text {
  text-decoration: line-through;
}
.advq-lock {
  position: absolute;
  right: calc(22 * var(--u));
  top: calc(50% - 7 * var(--u));
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(#ffc53d, #ffa90a);
  box-shadow:
    inset 0 calc(-8 * var(--u)) 0 #d98d00,
    0 calc(4 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.18);
  transition: transform var(--t-fast) var(--ease-out);
}
.answers[data-cols='2'] .advq-lock {
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  right: calc(16 * var(--u));
}
.advq-lock:not(:disabled):active {
  transform: translateY(-50%) scale(0.92);
}
.advq-lock img {
  width: 50%;
  height: 50%;
  object-fit: contain;
}
.advq-stamp {
  position: absolute;
  right: calc(26 * var(--u));
  top: calc(50% - 7 * var(--u));
  transform: translateY(-50%);
  padding: calc(10 * var(--u)) calc(22 * var(--u));
  border-radius: 999px;
  background: #b9810f;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  line-height: 1;
  white-space: nowrap;
  text-shadow: var(--on-colour-shadow);
  animation: advq-stamp 240ms var(--ease-spring) both;
}
@keyframes advq-stamp {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(1.25) rotate(-8deg);
  }
}
.reduced-motion .advq-stamp {
  animation: none;
}
/* The badge owns an intrinsic-width grid cell; answer text cannot paint underneath it. */
.advq-row.has-stamp .answer,
.answers[data-cols='2'] .advq-row.has-stamp .answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: calc(20 * var(--u));
  padding-left: calc(28 * var(--u));
  padding-right: calc(26 * var(--u));
}
.advq-row.has-stamp .advq-stamp {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  animation-name: advq-stamp-inline;
}
.advq-stamp__mark {
  display: inline-flex;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}
@keyframes advq-stamp-inline {
  from { opacity: 0; transform: scale(1.12); }
}
.reduced-motion .advq-row.has-stamp .advq-stamp { animation: none; }
.advq-stake.is-refused {
  color: var(--adv-red);
}

/* ---- the stake line ---- */
.advq-stake {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(14 * var(--u));
  padding: calc(12 * var(--u)) calc(28 * var(--u));
  border-radius: 999px;
  background: var(--adv-cream);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--adv-cream-rim);
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  line-height: 1.2;
  color: var(--adv-ink);
  text-align: center;
  text-wrap: balance;
  transition: opacity 150ms ease;
}
/* the padlock is a white glyph the Unity chip tints navy */
.advq-stake__lock {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  flex: none;
  background: var(--adv-ink);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.advq-stake.is-hidden {
  opacity: 0;
}

/* ---- footer: run strip, helper tray / receipt ---- */
.advq-footer {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  padding-top: calc(8 * var(--u));
}
.advq-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  min-height: calc(84 * var(--u));
}
.advq-tray {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
}
.advq-relic {
  display: grid;
  place-items: center;
  width: calc(68 * var(--u));
  height: calc(68 * var(--u));
  border-radius: 50%;
  background: var(--rim, #8a93a6);
  box-shadow:
    0 0 0 calc(3 * var(--u)) rgba(255, 255, 255, 0.92),
    0 calc(3 * var(--u)) calc(6 * var(--u)) rgba(27, 37, 89, 0.18);
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  color: var(--adv-ink);
}
.advq-relic img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}
.advq-relic__missing {
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  color: var(--adv-muted);
}
.advq-hud {
  display: flex;
  gap: calc(14 * var(--u));
}
.advq-hud__pill {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  height: calc(78 * var(--u));
  padding: 0 calc(28 * var(--u)) 0 calc(20 * var(--u));
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(27, 37, 89, 0.12);
  font-size: calc(36 * var(--u));
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}
.advq-hud__pill b {
  font-weight: var(--w-bold);
}
.advq-hud__pill img {
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  object-fit: contain;
}

.advq-dock {
  display: grid;
}
.advq-dock > * {
  grid-area: 1 / 1;
}
.advq-dock.has-receipt .advq-dock__tray {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.advq-dock__receipt {
  align-self: stretch;
  display: grid;
  animation: advq-receipt-in 280ms var(--ease-spring) both;
}
@keyframes advq-receipt-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}
.reduced-motion .advq-dock__receipt {
  animation: none;
}
.advq-helpers__note {
  margin: 0 0 calc(8 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  color: var(--adv-red);
}
.advq-helper:disabled {
  opacity: 1;
  filter: none;
}
.advq-helper.is-dim .booster__icon,
.advq-helper.is-dim .booster__cost {
  opacity: 0.4;
}
.advq-helper__badge {
  position: absolute;
  top: calc(-14 * var(--u));
  right: calc(-6 * var(--u));
  min-width: calc(48 * var(--u));
  height: calc(48 * var(--u));
  padding: 0 calc(10 * var(--u));
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0a1a45;
  box-shadow: 0 0 0 calc(4 * var(--u)) #fff;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(28 * var(--u));
  line-height: 1;
}
.advq-helper__name {
  position: absolute;
  bottom: calc(100% + 12 * var(--u));
  left: 50%;
  transform: translateX(-50%);
  padding: calc(10 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  white-space: nowrap;
  pointer-events: none;
}

/* ---- receipt card ---- */
.advq-receipt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(22 * var(--u)) calc(26 * var(--u)) calc(20 * var(--u));
  border-radius: calc(44 * var(--u));
  background: #fff;
  box-shadow:
    inset 0 calc(-8 * var(--u)) 0 #d6d6d6,
    0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(27, 37, 89, 0.12);
  text-align: center;
  overflow: hidden;
}
.advq-receipt__terms {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: calc(16 * var(--u));
  padding-bottom: calc(6 * var(--u));
  transform-origin: center;
  white-space: nowrap;
}
.advq-term {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(2 * var(--u));
}
.advq-term b {
  font-weight: var(--w-bold);
  font-size: calc(50 * var(--u));
  line-height: 1;
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}
.advq-term > span {
  font-weight: var(--w-semibold);
  font-size: calc(22 * var(--u));
  line-height: 1.1;
  color: var(--section-grey);
}
.advq-term.is-total b {
  color: var(--correct-ink);
}
.advq-receipt.is-wrong .advq-term.is-total b {
  color: var(--danger-ink);
}
.advq-receipt__op {
  align-self: flex-start;
  padding-top: calc(8 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  color: var(--section-grey);
}
.advq-receipt__goal,
.advq-receipt__note {
  margin: 0;
  width: 100%;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  line-height: 1.2;
  color: var(--adv-ink);
}
.advq-receipt__goal {
  padding-top: calc(8 * var(--u));
  border-top: calc(2 * var(--u)) solid #ece7dc;
}
.advq-receipt__goal.is-cleared {
  color: var(--correct-ink);
}
.advq-receipt__note {
  color: var(--correct-ink);
}
.advq-receipt__note.is-loss {
  color: var(--danger-ink);
}

/* ---- reveal card ---- */
.advq-reveal {
  position: relative;
  /* the card stands lower than centre, as in the 1.3.0 capture */
  margin-top: calc(250 * var(--u));
  gap: calc(11 * var(--u));
  padding: calc(36 * var(--u)) calc(46 * var(--u)) calc(34 * var(--u));
}
/* the Adventure card carries one more line (the points pill), so it runs a little tighter than the Category Master one */
.advq-reveal .reveal-popup__badge {
  width: calc(116 * var(--u));
  height: calc(116 * var(--u));
  box-shadow: 0 0 0 calc(8 * var(--u)) #d5ead6;
}
.advq-reveal.is-wrong .reveal-popup__badge {
  box-shadow: 0 0 0 calc(8 * var(--u)) #f9e1df;
}
.advq-reveal .reveal-popup__headline {
  margin-top: calc(4 * var(--u));
}
.advq-reveal .reveal-popup__explanation {
  padding: calc(20 * var(--u)) calc(28 * var(--u));
  font-size: calc(26 * var(--u));
  line-height: 1.3;
}
.advq-reveal .reveal-popup__mascot {
  min-height: calc(224 * var(--u));
}
.advq-reveal__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.advq-reveal__confetti img {
  position: absolute;
  left: calc(50% + var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--s) * var(--u));
  height: calc(var(--s) * var(--u));
  transform: translate(-50%, -50%) rotate(var(--r));
  animation: confetti-pop 600ms var(--ease-spring) both;
  animation-delay: calc(var(--i) * 40ms + 200ms);
}
.reduced-motion .advq-reveal__confetti img {
  animation: none;
}
.advq-reveal__points {
  display: inline-flex;
  padding: calc(8 * var(--u)) calc(34 * var(--u)) calc(10 * var(--u));
  border-radius: 999px;
  background: var(--correct);
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  line-height: 1.1;
  text-shadow: var(--on-colour-shadow);
}
.advq-reveal__points.is-wrong {
  background: var(--adv-amber);
}
.advq-reveal .reveal-popup__mascot.is-verdict {
  padding: calc(14 * var(--u)) calc(20 * var(--u));
  border: calc(3 * var(--u)) solid var(--adv-red);
  border-radius: calc(36 * var(--u));
  background: var(--adv-red-soft);
}
.advq-reveal .reveal-popup__mascot.is-verdict b {
  color: #b5251c;
}
.advq-reveal .reveal-popup__mascot.is-verdict p {
  color: var(--adv-ink);
}

/* ---- failed load, build panel, lock explainer ---- */
.advq-failed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(56 * var(--u)) calc(44 * var(--u)) calc(52 * var(--u));
  border-radius: calc(64 * var(--u));
  background: #fdfdfd;
  box-shadow: inset 0 calc(-10 * var(--u)) 0 #cfcfcf;
  text-align: center;
}
.advq-failed h2 {
  font-weight: var(--w-bold);
  font-size: calc(46 * var(--u));
  color: var(--adv-ink);
}
.advq-failed p {
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: var(--adv-muted);
}
.advq-build .popup__body {
  max-height: min(70vh, calc(1100 * var(--u)));
  overflow-y: auto;
}
.advq-build__list {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.advq-build__empty {
  white-space: pre-line;
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  color: var(--adv-muted);
}
.advq-explain__subtitle {
  margin-bottom: calc(16 * var(--u));
  text-align: center;
  font-weight: var(--w-semibold);
  font-size: calc(34 * var(--u));
  color: var(--adv-ink);
}
.advq-explain__rules {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
}
.advq-explain__rules li {
  position: relative;
  padding-left: calc(36 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: var(--adv-ink);
}
.advq-explain__rules li::before {
  content: '';
  position: absolute;
  left: calc(6 * var(--u));
  top: calc(0.55em);
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  border-radius: 50%;
  background: var(--adv-amber);
}

/* ==== Node result (NodeResult.js) ================================================================================ */
.advr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(14 * var(--u));
  padding: calc(30 * var(--u)) calc(40 * var(--u)) calc(40 * var(--u));
  border-radius: calc(48 * var(--u));
  background: var(--card-warm);
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(4, 24, 69, 0.1);
  text-align: center;
}
.advr-hero {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(300 * var(--u));
}
.advr-hero__disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(280 * var(--u));
  height: calc(280 * var(--u));
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.advr-hero__robot {
  position: relative;
  width: calc(246 * var(--u));
  height: calc(300 * var(--u));
}
.advr-hero__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.advr-hero__confetti img {
  position: absolute;
  left: calc(50% + var(--x) * var(--u));
  top: calc(50% - (var(--y) - 150) * var(--u));
  width: calc(var(--s) * var(--u));
  height: calc(var(--s) * var(--u));
  transform: translate(-50%, -50%) rotate(var(--r));
}
.advr-outcome {
  margin-top: calc(6 * var(--u));
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(62 * var(--u));
  line-height: 1.05;
}
.advr-score {
  font-weight: var(--w-extrabold);
  font-size: calc(136 * var(--u));
  line-height: 1.02;
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}
.advr-target {
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  line-height: 1;
  color: var(--section-grey);
}
.advr-pill {
  align-self: center;
  margin-top: calc(6 * var(--u));
  padding: calc(10 * var(--u)) calc(32 * var(--u)) calc(12 * var(--u));
  border-radius: 999px;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  line-height: 1.1;
  text-shadow: var(--on-colour-shadow);
}
.advr-recap {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  margin-top: calc(14 * var(--u));
  text-align: left;
}
.advr-recap__label {
  font-weight: var(--w-bold);
  letter-spacing: 0.03em;
  font-size: calc(25 * var(--u));
  text-transform: uppercase;
  color: var(--section-grey);
}
.advr-recap__cells {
  display: flex;
  gap: calc(14 * var(--u));
}
.advr-cell {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(16 * var(--u));
  height: calc(82 * var(--u));
  padding: 0 calc(20 * var(--u));
  border-radius: calc(32 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--adv-outline);
}
.advr-cell i {
  display: grid;
  place-items: center;
  width: calc(48 * var(--u));
  height: calc(48 * var(--u));
  border-radius: 50%;
}
.advr-cell i img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.advr-cell b {
  font-weight: var(--w-bold);
  font-size: calc(38 * var(--u));
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}
.advr-stats {
  display: flex;
  gap: calc(14 * var(--u));
  margin-top: calc(4 * var(--u));
}
.advr-stat {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--u));
  min-height: calc(94 * var(--u));
  padding: 0 calc(16 * var(--u));
  border-radius: calc(34 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--adv-outline);
  white-space: nowrap;
}
.advr-stat img {
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  object-fit: contain;
  flex: none;
}
.advr-stat .adv-tint {
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  flex: none;
}
.advr-stat b {
  font-weight: var(--w-bold);
  letter-spacing: 0.02em;
  font-size: calc(30 * var(--u));
  color: var(--adv-ink);
}
.advr-stat--streak b {
  color: var(--adv-blue);
}
.advr-stat.is-lost {
  background: #ffece9;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #f2b8b0;
}
.advr-stat.is-lost b {
  color: var(--danger-ink);
}
.advr-best {
  position: absolute;
  left: 50%;
  bottom: calc(-16 * var(--u));
  transform: translateX(-50%);
  padding: calc(4 * var(--u)) calc(18 * var(--u));
  border-radius: 999px;
  background: var(--adv-gold);
  font-style: normal;
  font-weight: var(--w-bold);
  font-size: calc(22 * var(--u));
  color: var(--adv-ink);
}
.advr-cause {
  font-weight: var(--w-semibold);
  font-size: calc(28 * var(--u));
  color: var(--danger-ink);
}
.advr-rewards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(14 * var(--u));
}
.advr-reward {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
  padding: calc(14 * var(--u)) calc(26 * var(--u)) calc(14 * var(--u)) calc(16 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--adv-outline);
  text-align: left;
}
.advr-reward img {
  width: calc(60 * var(--u));
  height: calc(60 * var(--u));
  object-fit: contain;
}
.advr-reward b {
  display: block;
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  color: var(--adv-ink);
}
.advr-reward em {
  display: block;
  font-style: normal;
  font-weight: var(--w-medium);
  font-size: calc(24 * var(--u));
  color: var(--section-grey);
}
.advr-hint {
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(30 * var(--u));
  color: var(--adv-green);
}
.advr-next {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  margin-top: calc(10 * var(--u));
  padding: calc(28 * var(--u)) calc(30 * var(--u)) calc(28 * var(--u)) calc(34 * var(--u));
  border-radius: calc(44 * var(--u));
  background: var(--adv-cream);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--adv-cream-rim);
  text-align: left;
  min-height: calc(296 * var(--u));
}
.advr-next__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(10 * var(--u));
  min-width: 0;
}
.advr-next__eyebrow {
  padding: calc(8 * var(--u)) calc(22 * var(--u));
  border-radius: 999px;
  background: var(--adv-green);
  color: #fff;
  font-weight: var(--w-bold);
  letter-spacing: 0.05em;
  font-size: calc(23 * var(--u));
  line-height: 1;
  text-shadow: var(--on-colour-shadow);
}
.advr-next h3 {
  font-weight: var(--w-bold);
  font-size: calc(52 * var(--u));
  line-height: 1.12;
  color: var(--adv-ink);
}
.advr-next.is-advice h3 {
  font-size: calc(37 * var(--u));
}
.advr-next__depth {
  padding: calc(6 * var(--u)) calc(20 * var(--u));
  border-radius: 999px;
  background: var(--adv-blue);
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  text-shadow: var(--on-colour-shadow);
}
.advr-next p {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.25;
  color: var(--adv-muted);
}
.advr-next.is-advice p {
  font-size: calc(28 * var(--u));
}
.advr-next p.is-warning {
  color: var(--danger-ink);
}
.advr-next__robot {
  flex: none;
  width: calc(150 * var(--u));
  align-self: stretch;
}
.advr-card > .adv-pill {
  margin-top: calc(12 * var(--u));
}

/* ==== Adventure popups: choice, corruption, boss intro, endless intro ============================================== */
.advc-popup,
.advk-popup,
.advb-popup,
.adve-popup {
  --adv-mint: #e3f1e8;
  --adv-ink: #041845;
  --adv-muted: #3c465a;
  --adv-cream: #fff6e3;
  --adv-cream-rim: #edd9c2;
  --adv-green: #0d8439;
  --adv-green-soft: #e0efe5;
  --adv-amber: #ffae0d;
  --adv-purple: #7b5bc0;
  --adv-purple-soft: #f4effd;
  --adv-blue: #3a7bd5;
  --adv-blue-soft: #eaf2fb;
  --adv-gold: #f4b43a;
  --adv-gold-soft: #fff4d8;
  --adv-red: #e64a3c;
  --adv-red-soft: #fdece9;
  --adv-outline: #e6e0d2;
  --adv-card-shadow: 0 calc(10 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.08);
  --adv-corner-panel: calc(48 * var(--u));
  --adv-corner-card: calc(36 * var(--u));
}
.advc-popup .popup__body {
  padding-top: calc(32 * var(--u));
  padding-bottom: calc(20 * var(--u));
}
.advc-offers {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
}
.advc-offer .adv-item {
  width: 100%;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--rim, var(--adv-outline)), var(--adv-card-shadow);
}
.advc-empty {
  padding: calc(40 * var(--u)) 0;
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  color: var(--adv-muted);
}

/* the chip over a popup title (RISK, BOSS, ENDLESS) */
.advk-chip {
  padding: calc(6 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  background: var(--adv-red);
  color: #fff;
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(24 * var(--u));
  line-height: 1.2;
  text-shadow: var(--on-colour-shadow);
}
.advk-chip--endless {
  background: var(--adv-purple);
}

/* synergy toast: two ingredient relics joined by a plus */
.advsy-name {
  color: var(--adv-purple);
}
.advsy-discs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(26 * var(--u));
  margin-bottom: calc(20 * var(--u));
}
.advsy-disc {
  display: grid;
  place-items: center;
  width: calc(170 * var(--u));
  height: calc(170 * var(--u));
  border-radius: 50%;
  background: var(--adv-purple-soft);
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #d8c9f3;
}
.advsy-disc img {
  width: 76%;
  height: 76%;
  object-fit: contain;
}
.advsy-plus {
  font-weight: var(--w-extrabold);
  font-size: calc(70 * var(--u));
  line-height: 1;
  color: var(--adv-purple);
}
.advsy-names {
  margin-bottom: calc(16 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  color: var(--adv-muted);
}
.advsy-effect {
  color: var(--adv-ink);
}

/* corruption */
.advk-name {
  margin-bottom: calc(10 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(46 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
}
.advk-desc {
  margin-bottom: calc(20 * var(--u));
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.3;
  color: var(--adv-muted);
}
.advk-affects {
  display: flex;
  align-items: center;
  gap: calc(16 * var(--u));
  margin-bottom: calc(18 * var(--u));
  padding: calc(14 * var(--u)) calc(24 * var(--u));
  border-radius: calc(36 * var(--u));
  background: var(--adv-cream);
}
.advk-affects__disc {
  display: grid;
  place-items: center;
  width: calc(84 * var(--u));
  height: calc(84 * var(--u));
  border-radius: 50%;
  background: var(--adv-gold-soft);
  box-shadow: inset 0 0 0 calc(4 * var(--u)) var(--adv-gold);
}
.advk-affects__disc img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
.advk-affects__label {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  color: var(--adv-muted);
}
.advk-affects b {
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  color: var(--adv-ink);
}
.advk-block {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  margin-bottom: calc(14 * var(--u));
  padding: calc(20 * var(--u)) calc(26 * var(--u));
  border-radius: calc(36 * var(--u));
}
.advk-block--bonus {
  background: var(--adv-green-soft);
}
.advk-block--downside {
  background: var(--adv-red-soft);
}
.advk-block__disc {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  border-radius: 50%;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(46 * var(--u));
  line-height: 1;
  text-shadow: var(--on-colour-shadow);
}
.advk-block__text {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
  min-width: 0;
}
.advk-block__text b {
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  color: var(--adv-ink);
}
.advk-block__text span {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.25;
  color: var(--adv-ink);
}

/* boss intro */
.advb-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12 * var(--u));
  margin-bottom: calc(24 * var(--u));
}
/* the portrait ring is a flow item here (on the preview card it hangs over the card's top edge) */
.advb-hero .adv-boss-ring {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: calc(236 * var(--u));
  height: calc(236 * var(--u));
  margin: calc(6 * var(--u)) 0 calc(38 * var(--u));
}
.advb-hero h3 {
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(52 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
  text-align: center;
}
.advb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(14 * var(--u));
}
.advb-biome {
  font-size: calc(26 * var(--u));
  text-align: center;
  line-height: 1.1;
}

/* endless intro */
.adve-hero {
  display: grid;
  place-items: center;
  margin-bottom: calc(12 * var(--u));
}
.adve-hero img {
  width: calc(150 * var(--u));
  height: calc(150 * var(--u));
  object-fit: contain;
}
.adve-body {
  margin-bottom: calc(18 * var(--u));
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: var(--adv-muted);
}
.adve-eyebrow {
  text-align: center;
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(26 * var(--u));
  color: var(--adv-muted);
}
.adve-score {
  text-align: center;
  font-weight: var(--w-extrabold);
  font-size: calc(120 * var(--u));
  line-height: 1.05;
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}

/* ==== Boss result extras, rest site, event ======================================================================= */
.advr-summary {
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  line-height: 1.25;
  color: var(--adv-ink);
}
.advr-stars {
  font-weight: var(--w-bold);
  font-size: calc(54 * var(--u));
  line-height: 1;
  color: var(--adv-gold);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.advr-ribbon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(18 * var(--u)) calc(30 * var(--u)) calc(18 * var(--u)) calc(44 * var(--u));
  border-radius: calc(32 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--adv-outline);
  overflow: hidden;
}
.advr-ribbon__stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(14 * var(--u));
  background: var(--tier, var(--adv-green));
}
.advr-ribbon b {
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(32 * var(--u));
  color: var(--adv-ink);
}
.advr-callout {
  padding: calc(20 * var(--u)) calc(28 * var(--u));
  border-radius: calc(36 * var(--u));
  background: var(--adv-purple-soft);
  text-align: center;
}
.advr-callout b {
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(32 * var(--u));
  color: var(--adv-purple);
}
.advr-callout p {
  margin-top: calc(6 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: var(--adv-muted);
}
.advr-daily {
  align-self: center;
  padding: calc(6 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  background: var(--adv-gold);
  color: var(--adv-ink);
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
}

/* rest site: helper chips inside the restock card */
.advrest__helpers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(12 * var(--u));
  margin-top: calc(8 * var(--u));
}
.advrest__helper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(14 * var(--u)) calc(6 * var(--u)) calc(12 * var(--u));
  border-radius: calc(28 * var(--u));
  background: var(--adv-blue-soft);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) rgba(58, 123, 213, 0.35);
  transition: transform var(--t-fast) var(--ease-out);
}
.advrest__helper:not(:disabled):active {
  transform: scale(0.96);
}
.advrest__helper-art {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
}
.advrest__helper-art img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}
.advrest__count {
  position: absolute;
  top: calc(-8 * var(--u));
  right: calc(-10 * var(--u));
  min-width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0a1a45;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  box-shadow: 0 0 0 calc(3 * var(--u)) #fff;
}
.advrest__helper-name {
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  color: var(--adv-ink);
}
.advrest__plus {
  padding: calc(2 * var(--u)) calc(14 * var(--u));
  border-radius: 999px;
  background: var(--adv-blue);
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  text-shadow: var(--on-colour-shadow);
}

/* event: story card and option cards */
.advev-story {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  padding: calc(28 * var(--u)) calc(34 * var(--u)) calc(28 * var(--u)) calc(20 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
}
.advev-story__robot {
  flex: none;
  width: calc(190 * var(--u));
  height: calc(260 * var(--u));
}
.advev-story p {
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.35;
  color: var(--adv-ink);
}
.advev-options {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
}
.advev-opt {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  width: 100%;
  padding: calc(26 * var(--u)) calc(30 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(6 * var(--u)) var(--accent),
    var(--adv-card-shadow);
  text-align: left;
  transition: transform var(--t-fast) var(--ease-out);
}
.advev-opt:not(:disabled):active {
  transform: scale(0.985);
}
.advev-opt.is-short {
  opacity: 0.8;
}
.advev-opt__disc {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(100 * var(--u));
  height: calc(100 * var(--u));
  border-radius: 50%;
}
.advev-opt__disc img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.advev-opt__disc b {
  font-weight: var(--w-bold);
  font-size: calc(62 * var(--u));
  line-height: 1;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.advev-opt__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
}
.advev-opt__label {
  font-weight: var(--w-bold);
  font-size: calc(38 * var(--u));
  line-height: 1.15;
  color: var(--adv-ink);
}
.advev-opt__chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: calc(10 * var(--u));
  padding: calc(6 * var(--u)) calc(18 * var(--u)) calc(6 * var(--u)) calc(10 * var(--u));
  border-radius: 999px;
  background: var(--adv-cream);
  font-weight: var(--w-bold);
  font-size: calc(28 * var(--u));
  color: var(--adv-ink);
}
.advev-opt__chip img {
  width: calc(36 * var(--u));
  height: calc(36 * var(--u));
  object-fit: contain;
}
.advev-opt__resource { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); }
.advr-stat.is-lost .advr-stat__remaining { color: var(--adv-ink); }
.advev-opt__chevron {
  flex: none;
  font-weight: var(--w-bold);
  font-size: calc(64 * var(--u));
  line-height: 1;
  color: var(--accent);
}

/* ==== Run summary (Summary.js) ====================================================================================== */
.advs-reason {
  font-weight: var(--w-semibold);
  font-size: calc(32 * var(--u));
  line-height: 1.25;
  color: var(--adv-muted);
}
.advs-reason.is-lost {
  color: var(--danger-ink);
}
.advs-stars {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(6 * var(--u));
  margin-top: calc(10 * var(--u));
  padding: calc(22 * var(--u)) calc(24 * var(--u));
  border-radius: calc(40 * var(--u));
  background: var(--adv-gold-soft);
}
.advs-stars__value {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
}
.advs-stars__value b {
  font-weight: var(--w-extrabold);
  font-size: calc(110 * var(--u));
  line-height: 1;
  color: var(--adv-gold);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  font-variant-numeric: tabular-nums;
}
.advs-stars__value img {
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  object-fit: contain;
}
.advs-stars__breakdown {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: var(--adv-muted);
}
.advs-keep {
  white-space: pre-line;
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: var(--adv-ink);
}
.advs-goal {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: var(--adv-muted);
}
.advs-archetype {
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  padding: calc(18 * var(--u)) calc(26 * var(--u));
  border-radius: calc(40 * var(--u));
  background: var(--adv-blue-soft);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) rgba(58, 123, 213, 0.4);
  text-align: left;
}
.advs-archetype__disc {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  border-radius: 50%;
  background: var(--adv-blue);
}
.advs-archetype__disc img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}
.advs-archetype__text {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
  min-width: 0;
}
.advs-archetype__text b {
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(36 * var(--u));
  color: var(--adv-ink);
}
.advs-archetype__text em {
  font-style: normal;
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: var(--adv-muted);
}
.advs-records-label {
  margin-top: calc(10 * var(--u));
  text-align: left;
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  font-size: calc(28 * var(--u));
  color: var(--section-grey);
}
.advs-records {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}
.advs-record {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  padding: calc(18 * var(--u)) calc(28 * var(--u));
  border-radius: calc(36 * var(--u));
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  text-align: left;
}
.advs-record__disc {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(84 * var(--u));
  height: calc(84 * var(--u));
  border-radius: 50%;
}
.advs-record__disc img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
.advs-record__disc .adv-tint {
  width: 62%;
  height: 62%;
}
.advs-record__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.advs-record__text b {
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  color: var(--adv-ink);
}
.advs-record__text em {
  font-style: normal;
  font-weight: var(--w-medium);
  font-size: calc(26 * var(--u));
  color: var(--adv-muted);
}
.advs-record__value {
  flex: none;
  font-weight: var(--w-extrabold);
  font-size: calc(56 * var(--u));
  line-height: 1;
  color: var(--adv-ink);
  font-variant-numeric: tabular-nums;
}
.advs-record.is-record .advs-record__value {
  color: var(--adv-gold);
}
.advs-record__ribbon {
  position: absolute;
  top: calc(-14 * var(--u));
  right: calc(28 * var(--u));
  padding: calc(4 * var(--u)) calc(16 * var(--u));
  border-radius: 999px;
  background: var(--adv-gold);
  font-weight: var(--w-bold);
  font-size: calc(22 * var(--u));
  color: var(--adv-ink);
}

/* ==== Daily, permanent upgrades, relic collection, draft ============================================================ */
.advy-stack {
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--u));
}
.layout-phone .advy-body .adv__column {
  min-height: 100%;
  justify-content: center;
}
.advy-today {
  display: flex;
  align-items: center;
  gap: calc(30 * var(--u));
  padding: calc(31 * var(--u)) calc(32 * var(--u)) calc(31 * var(--u)) calc(26 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
}
.advy-today__emblem {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(176 * var(--u));
  height: calc(176 * var(--u));
  border-radius: 50%;
}
.advy-today__emblem img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.advy-today__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(10 * var(--u));
}
.advy-today__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  width: 100%;
}
.advy-today__head b {
  font-weight: var(--w-bold);
  font-size: calc(44 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
}
.advy-today__head em {
  flex: none;
  padding: calc(8 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  background: var(--adv-gold);
  font-style: normal;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.advy-today__desc {
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.2;
  color: var(--adv-muted);
}
.advy-today__reset {
  display: inline-flex;
  align-items: center;
  gap: calc(12 * var(--u));
  padding: calc(8 * var(--u)) calc(24 * var(--u)) calc(8 * var(--u)) calc(16 * var(--u));
  border-radius: 999px;
  background: var(--adv-blue-soft);
  font-weight: var(--w-semibold);
  font-size: calc(28 * var(--u));
  color: var(--adv-ink);
}
.advy-today__reset img {
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  object-fit: contain;
  filter: brightness(0.25);
}
.advy-streak,
.advy-bonus {
  padding: calc(29 * var(--u)) calc(32 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
}
.advy-streak__head {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
}
.advy-streak__disc,
.advy-bonus__disc {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(88 * var(--u));
  height: calc(88 * var(--u));
  border-radius: 50%;
  background: #fde7de;
}
.advy-bonus__disc {
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  background: var(--adv-gold-soft);
}
/* the flame is a white glyph the Unity disc tints orange */
.advy-streak__disc i {
  display: block;
  width: 52%;
  height: 52%;
  background: #f47332;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.advy-bonus__disc img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
.advy-streak__head b {
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  color: var(--adv-ink);
}
.advy-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: calc(8 * var(--u));
  margin: calc(20 * var(--u)) 0 0;
  padding: 0;
  list-style: none;
}
.advy-dots li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--u));
}
.advy-dots i {
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  border-radius: 50%;
  background: #e8eaec;
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #e8eaec;
}
.advy-dots li.is-filled i {
  background: var(--adv-orange, #f47332);
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #f47332;
}
.advy-dots li.is-today i {
  background: #fff;
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #f47332;
}
.advy-dots span {
  font-weight: var(--w-semibold);
  font-size: calc(21 * var(--u));
  white-space: nowrap;
  color: var(--adv-muted);
}
.advy-dots li.is-today span {
  color: #f47332;
}
.advy-bonus {
  display: flex;
  align-items: center;
  gap: calc(30 * var(--u));
}
.advy-bonus__text {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.advy-bonus__text b {
  font-weight: var(--w-semibold);
  font-size: calc(33 * var(--u));
  color: var(--adv-ink);
}
.advy-bonus__text em {
  font-style: normal;
  font-weight: var(--w-extrabold);
  font-size: calc(51 * var(--u));
  line-height: 1.1;
  color: var(--adv-gold);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* permanent upgrades */
.advu-row {
  display: flex;
  align-items: flex-start;
  gap: calc(30 * var(--u));
  padding: calc(28 * var(--u)) calc(30 * var(--u)) calc(28 * var(--u)) calc(30 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow: var(--adv-card-shadow);
}
.advu-row__disc {
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: calc(176 * var(--u));
  height: calc(176 * var(--u));
  border-radius: 50%;
  background: var(--adv-blue);
  box-shadow: inset 0 0 0 calc(10 * var(--u)) #2a5fb0;
}
.advu-row__disc img {
  width: 46%;
  height: 46%;
  object-fit: contain;
}
.advu-row__main {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
}
.advu-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(14 * var(--u));
}
.advu-row__head h3 {
  font-weight: var(--w-bold);
  font-size: calc(39 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
}
.advu-row__rank {
  flex: none;
  padding: calc(8 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  background: var(--adv-blue);
  font-weight: var(--w-bold);
  font-size: calc(25 * var(--u));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.advu-row__rank.is-maxed {
  background: var(--adv-gold);
}
.advu-row__pips {
  align-self: flex-end;
  display: inline-flex;
  gap: calc(10 * var(--u));
}
.advu-row__pips i {
  width: calc(27 * var(--u));
  height: calc(27 * var(--u));
  border-radius: 50%;
  background: #e8eaec;
}
.advu-row__pips i.is-on {
  background: var(--adv-blue);
}
.advu-row__main p {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.25;
  color: var(--adv-ink);
}
.advu-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(2 * var(--u));
  min-height: calc(138 * var(--u));
  margin-top: calc(6 * var(--u));
  padding: calc(14 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  font-weight: var(--w-bold);
  letter-spacing: var(--tmp-bold, 0.105em);
  transition: transform var(--t-fast) var(--ease-out);
}
.advu-buy:not(:disabled):active {
  transform: translateY(calc(4 * var(--u)));
}
.advu-buy__label {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  font-size: calc(36 * var(--u));
  line-height: 1.1;
}
.advu-buy__label img {
  width: calc(42 * var(--u));
  height: calc(42 * var(--u));
  object-fit: contain;
}
.advu-buy__caption {
  font-weight: var(--w-medium);
  letter-spacing: 0;
  font-size: calc(24 * var(--u));
}
.advu-buy.is-ready {
  background: var(--adv-amber);
  box-shadow: inset 0 calc(-8 * var(--u)) 0 #d98d00;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.advu-buy.is-short {
  background: #b9bbbd;
  color: #4f5561;
  opacity: 1;
}
.advu-buy.is-owned {
  background: #e8eaec;
  color: var(--adv-muted);
  opacity: 1;
}

/* relic collection */
.advrc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(31 * var(--u)) calc(28 * var(--u));
}
.layout-wide .advrc-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.advrc-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(10 * var(--u));
  min-height: calc(307 * var(--u));
  padding: calc(24 * var(--u)) calc(24 * var(--u)) calc(26 * var(--u));
  border-radius: var(--adv-corner-panel);
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(4 * var(--u)) var(--rim, var(--adv-outline)),
    var(--adv-card-shadow);
  text-align: left;
}
.advrc-tile h3 {
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  line-height: 1.1;
  color: var(--adv-ink);
}
.advrc-tile p {
  font-weight: var(--w-semibold);
  font-size: calc(28 * var(--u));
  line-height: 1.25;
  color: var(--adv-ink);
}
.advrc-tile__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(105 * var(--u));
  height: calc(105 * var(--u));
  border-radius: 50%;
  background: #eef0f2;
}
.advrc-tile__icon img:not(.advrc-tile__lock img) {
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.advrc-tile.is-locked .advrc-tile__icon > img {
  filter: brightness(0) saturate(100%) invert(10%) sepia(60%) saturate(1500%) hue-rotate(200deg) brightness(0.6);
}
.advrc-tile__lock {
  position: absolute;
  right: calc(-6 * var(--u));
  bottom: calc(-6 * var(--u));
  display: grid;
  place-items: center;
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  border-radius: 50%;
  background: #3c465a;
}
.advrc-tile__lock img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.advrc-tile__chip {
  padding: calc(5 * var(--u)) calc(21 * var(--u));
  border-radius: 999px;
  color: #fff;
  font-weight: var(--w-bold);
  letter-spacing: 0.02em;
  font-size: calc(24 * var(--u));
  text-transform: uppercase;
  text-shadow: var(--on-colour-shadow);
}

/* draft */
.advd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(22 * var(--u));
}
.layout-wide .advd-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.advd-drafted {
  margin-bottom: calc(8 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  color: var(--adv-ink);
}

/* reduced motion: the one-off movements (a sheet sliding in, a locked stop shaking, the wand's target nodding) hold still too */
.reduced-motion .adv-sheet,
.reduced-motion .adv-node.is-shaking,
.reduced-motion .answer.is-wand {
  animation: none !important;
}
