  .rar--lucky {
    border: 3px solid #5ad46a;
    box-shadow: 0 0 9px rgba(90,212,106,.45);
  }
  .rar--refined {
    border: 3px solid #8e99a3;
    box-shadow: 0 0 7px rgba(142,153,163,.45), inset 0 0 0 1px rgba(20,9,6,.6);
  }

  .rar--enchanted {
    border: 3px solid transparent;
    border-radius: 3px;
    background-image:
      linear-gradient(var(--bark-d), var(--bark-d)),
      linear-gradient(135deg, #d6ecef, #a9e7c8, #f3f2ab, #f6c9e1, #bcd7f6, #d6ecef);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 9px rgba(178,230,242,.5);
  }
  .rar--enchanted::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(115deg,
                  transparent 0 42%, rgba(255,255,255,.5) 50%, transparent 58% 100%);
    background-size: 300% 100%;
    animation: sheen 3s linear infinite;
    animation-delay: var(--sheen, 0s);
  }
  /* exactly one tile per cycle, so the sweep loops with no gap */
  @keyframes sheen {
    from { background-position: 0 0; }
    to   { background-position: -300% 0; }
  }

  .mgrp { flex: none; }
  .mgrp__head {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    font-size: 12px;
    text-align: left;
    color: var(--cream);
    background: var(--bark-d);
    border: 2px solid var(--bark-l);
    border-radius: 3px;
    padding: 7px 9px;
    cursor: pointer;
    transition: border-color .12s, background .12s;
  }
  .mgrp__head:hover { border-color: var(--ember); background: rgba(224,160,84,.1); }
  .mgrp__caret { display: inline-block; transition: transform .14s; color: var(--ember); }
  .mgrp__head[aria-expanded="true"] .mgrp__caret { transform: rotate(90deg); }
  .mgrp__count { margin-left: auto; font-size: 9px; color: var(--ember); white-space: nowrap; }
  .mgrp__body { display: flex; flex-direction: column; gap: 7px; padding: 7px 0 2px 8px; }

  .minfo {
    background: var(--bark-d);
    border: 2px solid var(--bark-l);
    border-radius: 3px;
    padding: 8px 9px;
    margin-bottom: 6px;
    font-size: 9px;
    line-height: 1.5;
    color: rgba(242,227,208,.72);
  }
  .minfo__h { display: block; margin: 6px 0 3px; font-size: 10px; color: var(--cream); }
  .minfo__h:first-child { margin-top: 0; }
  .minfo__row { display: flex; gap: 6px; }
  .minfo__k { color: var(--ember); white-space: nowrap; }

  /* Museum: a vertical wardrobe, one rail per set. Each rail holds the five
     worn slots; a rail fills left to right as pieces are donated. */
  .museum {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    padding: 2px 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--bark-l) transparent;
  }
  .museum::-webkit-scrollbar       { width: 9px; }
  .museum::-webkit-scrollbar-thumb { background: var(--bark-l); border-radius: 5px; }
  .museum::-webkit-scrollbar-track { background: transparent; }
  /* Info can be long; cap it so it never pushes the wardrobe off screen. */
  .minfo { flex: none; max-height: 40vh; overflow-y: auto; }
  .rail {
    flex: none;
    background: var(--bark-d);
    border: 2px solid var(--bark-l);
    border-radius: 3px;
    padding: 7px 8px 8px;
  }
  .rail--done { border-color: var(--ember); }
  .rail__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    margin-bottom: 6px;
  }
  .rail__name { font-size: 11px; }
  .rail__count { margin-left: auto; font-size: 9px; color: var(--ember); white-space: nowrap; }
  .rail__buff {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.4;
    color: rgba(242,227,208,.5);
  }
  .rail__slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .rail__slot {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: var(--bark-dd);
    border: 2px solid var(--bark-l);
    border-radius: 3px;
    color: rgba(242,227,208,.42);
    cursor: pointer;
    transition: border-color .12s, background .12s;
  }
  .rail__slot:hover:not(:disabled) { border-color: var(--ember); }
  .rail__slot:disabled { cursor: not-allowed; }
  .rail__slot--in {
    color: var(--cream);
    border: 3px solid #cbd3dd;
    border-image: var(--chrome) 1 stretch;
    box-shadow: var(--chrome-edge);
  }

  .rail__slot svg { width: 62%; height: auto; }

  /* Storm clock, top right of the play area. Same blue as the Thunder enchant. */
  .chart {
    flex: none;
    margin: 0 12px 12px;
    padding: 8px 6px 4px;
    background: var(--bark-d);
    border: 2px solid var(--bark-l);
    border-radius: 3px;
  }
  .chart svg { display: block; width: 100%; height: auto; }
  .chart__empty { display: block; padding: 14px 6px; font-size: 9px; color: rgba(242,227,208,.5); }

  .map {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c5470;
  }
  .map__art { width: 100%; height: 100%; }
  /* Outlines are painted into the map art; these are the matching hit areas. */
  .map__zone { fill: transparent; stroke: none; }
  /* Only zones that are real destinations light up, and Wade only once it is
     unlocked. Altitude and Deep stay inert even when their level is reached. */
  .map__zone[data-loc="pond"],
  .map__zone[data-loc="wade"]:not(.map__zone--locked) { cursor: pointer; }
  .map__zone[data-loc="pond"]:hover,
  .map__zone[data-loc="wade"]:not(.map__zone--locked):hover { fill: rgba(255, 201, 14, .18); }
  /* Standing note where the Back button used to be. Not a hit target, so it
     must not swallow clicks meant for the zone underneath it. */
  .map__note {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 2;
    max-width: 260px;
    padding: 8px 11px;
    background: rgba(20,28,38,.72);
    border: 2px solid rgba(226,238,250,.28);
    border-radius: 3px;
    color: rgba(226,238,250,.82);
    font-size: 10px;
    line-height: 1.5;
    pointer-events: none;
  }
  /* Second line, set off from the first so the two read as separate notes. */
  .map__note-p {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(226,238,250,.18);
  }
  .map__note-h {
    display: block;
    margin-bottom: 3px;
    color: var(--ember);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .map__name {
    font-size: 19px;
    fill: rgba(226,238,250,.62);
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  /* Matches the labels baked into the map art. */
  .map__name--map {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    letter-spacing: 0;
    text-transform: none;
    fill: #ffffff;
    stroke: rgba(20,28,38,.85);
    stroke-width: 3px;
    paint-order: stroke fill;
  }
  .map__req {
    font-size: 13px;
    fill: rgba(226,238,250,.42);
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .map__name--on { fill: #ffffff; }
  .map__req--on  { fill: var(--ember); }


  .stormtag {
    position: absolute;
    top: 12px;
    right: calc(var(--panel-r) + 12px);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
    color: #bfe0ff;
    background: rgba(18,28,48,.78);
    border: 2px solid #63b6ff;
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(106,168,255,.6), inset 0 0 8px rgba(150,205,255,.28);
    pointer-events: none;
    animation: stormtag 2.4s ease-in-out infinite;
  }
  .stormtag svg { width: 15px; height: 15px; }
  @keyframes stormtag {
    0%, 100% { box-shadow: 0 0 8px rgba(106,168,255,.4), inset 0 0 6px rgba(150,205,255,.2); }
    50%      { box-shadow: 0 0 18px rgba(106,168,255,.95), inset 0 0 11px rgba(150,205,255,.5); }
  }
  .phone .stormtag { right: 12px; }

  /* Redbull, stacked under the storm tag so both can be up at once. */
  .rushtag {
    position: absolute;
    top: 54px;
    right: calc(var(--panel-r) + 12px);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
    color: #d6ffd9;
    background: rgba(16,40,22,.78);
    border: 2px solid #5ad46a;
    border-radius: 3px;
    pointer-events: none;
    animation: rushtag 1.1s ease-in-out infinite;
  }
  .rushtag svg { width: 15px; height: 15px; }
  @keyframes rushtag {
    0%, 100% { box-shadow: 0 0 8px rgba(90,212,106,.4), inset 0 0 6px rgba(150,255,170,.2); }
    50%      { box-shadow: 0 0 18px rgba(90,212,106,.95), inset 0 0 11px rgba(150,255,170,.5); }
  }
  .phone .rushtag { right: 12px; }

  /* The Fog, stacked under Redbull so all three events can be up at once. */
  .fogtag {
    position: absolute;
    top: 96px;
    right: calc(var(--panel-r) + 12px);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
    color: #e6ecef;
    background: rgba(38,44,48,.78);
    border: 2px solid #b9c6cc;
    border-radius: 3px;
    pointer-events: none;
    animation: fogtag 2.8s ease-in-out infinite;
  }
  .fogtag svg { width: 15px; height: 15px; }
  @keyframes fogtag {
    0%, 100% { box-shadow: 0 0 8px rgba(200,214,220,.35), inset 0 0 6px rgba(230,240,245,.18); }
    50%      { box-shadow: 0 0 18px rgba(200,214,220,.85), inset 0 0 11px rgba(230,240,245,.45); }
  }
  .phone .fogtag { right: 12px; }

  .rar--thunder {
    border: 3px solid #63b6ff;
    box-shadow: 0 0 11px rgba(106,168,255,.8), inset 0 0 8px rgba(150,205,255,.45);
  }
  .rar--thunder::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(115deg,
                  transparent 0 42%, rgba(200,232,255,.6) 50%, transparent 58% 100%);
    background-size: 300% 100%;
    animation: sheen 1.6s linear infinite;
    animation-delay: var(--sheen, 0s);
  }
  .rar--thunder::after {
    content: "";
    position: absolute;
    inset: -3px;
    pointer-events: none;
    border: 1px solid rgba(234,245,255,.85);
    animation: arc 1.1s steps(1) infinite;
  }
  @keyframes arc {
    0%, 62%  { opacity: .15; }
    66%, 70% { opacity: 1; }
    74%      { opacity: .3; }
    78%, 82% { opacity: .95; }
    86%      { opacity: .15; }
  }

  .rar--awakened {
    border: 3px solid #ef7fd0;
    box-shadow: 0 0 9px rgba(239,127,208,.5), inset 0 0 0 1px rgba(255,255,255,.18);
  }
  .rar--awakened::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(115deg,
                  transparent 0 42%, rgba(255,168,224,.55) 50%, transparent 58% 100%);
    background-size: 300% 100%;
    animation: sheen 3s linear infinite;
    animation-delay: var(--sheen, 0s);
  }
  .rar--awakened::after {
    content: "";
    position: absolute;
    inset: -4px;
    pointer-events: none;
    background:
      linear-gradient(#ff4fa0, #ff4fa0) left  top    / 7px 7px no-repeat,
      linear-gradient(#ff4fa0, #ff4fa0) right top    / 7px 7px no-repeat,
      linear-gradient(#ff4fa0, #ff4fa0) left  bottom / 7px 7px no-repeat,
      linear-gradient(#ff4fa0, #ff4fa0) right bottom / 7px 7px no-repeat;
  }

  .rar--ascended {
    border: 3px solid #f7edb0;
    box-shadow: 0 0 11px rgba(247,237,176,.55), inset 0 0 8px rgba(247,237,176,.3);
  }
  .rar--ascended::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(115deg,
                  transparent 0 42%, rgba(255,247,190,.6) 50%, transparent 58% 100%);
    background-size: 300% 100%;
    animation: sheen 3s linear infinite;
    animation-delay: var(--sheen, 0s);
  }
  .rar--ascended::after {
    content: "";
    position: absolute;
    inset: -5px;
    pointer-events: none;
    background:
      linear-gradient(#f7edb0, #f7edb0) left  top    / 11px 3px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) left  top    / 3px 11px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) right top    / 11px 3px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) right top    / 3px 11px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) left  bottom / 11px 3px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) left  bottom / 3px 11px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) right bottom / 11px 3px no-repeat,
      linear-gradient(#f7edb0, #f7edb0) right bottom / 3px 11px no-repeat;
    filter: drop-shadow(0 0 3px rgba(247,237,176,.55));
  }

  /* A museum slot you hold the piece for, and the tier header above it,
     breathe gold until the donation is made. */
  .rail__slot--none {
    border-color: #a33b34;
    background: rgba(163,59,52,.12);
    color: rgba(200,120,112,.5);
  }
  .rail__slot--have { animation: donatepulse 4s ease-in-out infinite; }
  .mgrp__head--want { animation: donateheadpulse 4s ease-in-out infinite; }
  @keyframes donateheadpulse {
    0%, 100% { border-color: rgba(255,196,60,.22); box-shadow: 0 0 0 rgba(255,196,60,0); }
    50%      { border-color: #ffdf7a; box-shadow: 0 0 14px rgba(255,201,64,.85); }
  }
  /* 2s up, 2s down. Peak is a bright saturated gold, not the panel ember. */
  @keyframes donatepulse {
    0%, 100% {
      border-color: rgba(255,196,60,.22);
      box-shadow: 0 0 0 rgba(255,196,60,0);
    }
    50% {
      border-color: #ffdf7a;
      box-shadow: 0 0 16px rgba(255,201,64,1), inset 0 0 10px rgba(255,214,110,.55);
    }
  }
