/* Reference-faithful presentation; real data, status and access rules unchanged. */
body.reference-pass {
  background: #100d25 url(assets/cosmic-palace-v1.webp) center top/100% auto no-repeat fixed;
}
.reference-pass > header {
  position: relative;
  min-height: 62px;
  height: 62px;
  padding: 8px 62px;
  justify-content: center;
  border: 0;
  background: linear-gradient(#0c082c44, #100b2477);
}
.reference-pass header .brand {
  font-family: Georgia, serif;
  font-size: clamp(18px, 4.8vw, 32px);
  letter-spacing: 0.04em;
  color: #ffe5b5;
  text-shadow: 0 2px #4b2554;
}
.reference-pass header .brand small,
.reference-pass header .badge {
  display: none;
}
.reference-pass header .back {
  position: absolute;
  left: 12px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #bc94e8;
  border-radius: 12px;
  background: linear-gradient(#61477d, #261638);
  font-size: 0;
  text-decoration: none;
}
.reference-pass header .back:after {
  content: "‹";
  font-size: 35px;
  color: #ffe6b2;
  line-height: 1;
}
.reference-pass header #language {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  background: #231539c9;
  border-color: #9370b6;
}
.reference-pass main {
  padding: 0 10px !important;
}
.reference-pass #tabs {
  display: none;
}
.ref-menu {
  display: none;
}
.reference-pass .ref-menu {
  display: block;
  position: absolute;
  right: 9px;
  top: 61px;
  z-index: 30;
}
.ref-menu summary {
  display: grid;
  place-items: center;
  list-style: none;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  background: #26173cd9;
  border: 1px solid #aa82cb;
  border-radius: 10px;
  font-size: 18px;
}
.ref-menu summary::-webkit-details-marker {
  display: none;
}
.ref-menu > div {
  position: absolute;
  right: 0;
  top: 48px;
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 10px;
  border: 1px solid #c19ae6;
  background: #211331;
  border-radius: 12px;
  box-shadow: 0 10px 40px #000b;
}
.ref-menu button {
  min-height: 44px;
}
#pass > .ref-pass-title {
  flex: none;
  align-self: center;
  margin: 4px 48px 12px;
  width: calc(100% - 100px);
  max-width: 720px;
  padding: 9px 12px;
  background: linear-gradient(120deg, #36214e, #6a3875 50%, #21172f);
  border-top: 2px solid #ffe4a3;
  border-bottom: 2px solid #b087c9;
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
  text-align: center;
  font:
    700 clamp(17px, 4.8vw, 34px)/1.1 Georgia,
    serif;
  color: #ffefdd;
  text-shadow: 0 2px 3px #2d0c44;
}
.reference-pass #pass > .catalog-head {
  position: absolute;
  right: 62px;
  top: 62px;
  z-index: 10;
  min-height: 0;
  padding: 0;
}
.reference-pass #pass > .catalog-head > div,
.reference-pass #pass > .catalog-head > h2 {
  display: none;
}
.reference-pass #buy-pass {
  min-height: 44px;
  font-size: 10px;
  padding: 5px 9px;
}
.reference-pass #pass .compact-progress {
  flex: none;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 6px;
  min-height: 42px;
  width: calc(100% - 36px);
  max-width: 720px;
  padding: 8px 14px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid #af80d7;
  border-bottom: 1px solid #9065bb;
  background: linear-gradient(100deg, #312047dd, #151529ee);
  clip-path: polygon(3% 0, 97% 0, 100% 50%, 97% 100%, 3% 100%, 0 50%);
  font-size: clamp(11px, 2.6vw, 17px);
  color: #dfd1f1;
}
.reference-pass #season-numbers {
  font-size: clamp(14px, 3.3vw, 21px);
  color: #7cf2f4;
}
.reference-pass #progress-destination,
.reference-pass #season-progress {
  display: none;
}
.reference-pass #reputation-status:empty {
  display: none;
}
.reference-pass #pass #track.cosmic-track {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 18px 3px 28px;
  gap: 18px;
}
#track.cosmic-track .cosmic-tier {
  border: 0 !important;
  box-shadow: none !important;
  background: none;
  padding: 0 0 0 53px;
  max-width: 850px;
  overflow: visible;
}
#track.cosmic-track .cosmic-tier:before {
  left: 27px;
  top: -20px;
  height: calc(100% + 20px);
  width: 3px;
}
#track.cosmic-track .level-dot {
  left: 0;
  top: 32%;
  width: 51px;
  min-height: 61px;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: linear-gradient(130deg, #ffe9a0, #c49450 40%, #f6e5a5 55%, #9e6cb5);
  clip-path: polygon(50% 0, 96% 24%, 96% 76%, 50% 100%, 4% 76%, 4% 24%);
  padding: 7px;
  isolation: isolate;
}
#track.cosmic-track .level-dot:before {
  content: "";
  position: absolute;
  inset: 3px;
  background: linear-gradient(130deg, #5e3e89, #251534);
  clip-path: inherit;
  z-index: -1;
}
#track.cosmic-track .level-dot b {
  font-size: 24px;
  text-shadow: 0 2px 4px #140a26;
}
#track.cosmic-track .level-dot small {
  display: none;
}
#track.cosmic-track #pass-level-50 .level-dot {
  filter: drop-shadow(0 0 7px #ffc55f);
  background: linear-gradient(#fff5be, #e6ad46);
}
.cosmic-lanes {
  gap: 7px;
  padding: 8px;
  border: 1px solid #8257ac;
  border-radius: 0;
  clip-path: polygon(3% 0, 97% 0, 100% 8%, 100% 92%, 97% 100%, 3% 100%, 0 92%, 0 8%);
  background: linear-gradient(120deg, #4d2c6555, #19152daa);
}
.cosmic-lane h3 {
  padding: 5px 0;
  margin-bottom: 8px;
  font-size: 12px;
  background: linear-gradient(120deg, #412759, #231b3a);
  border-top: 1px solid #9368bc;
  border-bottom: 1px solid #71409e;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
}
.cosmic-lane:nth-child(2) h3 {
  background: linear-gradient(120deg, #65296b, #30213e);
  color: #ffdfad;
}
#track.cosmic-track .reward-item {
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 0;
  padding: 10px 7px 7px;
  border-radius: 0;
  clip-path: polygon(6% 0, 94% 0, 100% 8%, 100% 92%, 94% 100%, 6% 100%, 0 92%, 0 8%);
  background: linear-gradient(125deg, #362d55ee, #24213e);
  border-color: #8d6ac0;
}
#track.cosmic-track .reward-item.premium {
  background: linear-gradient(125deg, #4f2766, #351d52);
}
#track.cosmic-track .reward-art {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 70px;
  margin: 0;
}
#track.cosmic-track .reward-plaque {
  display: contents;
}
#track.cosmic-track .reward-plaque strong {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(11px, 2.6vw, 20px);
  text-align: center;
  margin: 0;
  padding: 3px;
}
#track.cosmic-track .reward-status {
  grid-column: 1/-1;
  grid-row: 2;
  text-align: center;
  font-size: clamp(11px, 2.3vw, 16px);
  margin: 4px 0 0;
  padding: 0;
}
#track.cosmic-track .reward-item:has(.reward-status-received):after {
  content: "✓";
  position: absolute;
  right: 5px;
  top: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #124e40;
  color: #9efcc3;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 0 10px #75f3b322;
}
#track.cosmic-track .coin-art {
  background: none;
  box-shadow: none;
  overflow: visible;
}
#track.cosmic-track .coin-art img {
  position: absolute;
  inset: 0;
  transform: scale(0.82);
  filter: drop-shadow(0 3px 3px #0008);
}
#track.cosmic-track .coin-art .coin-stack-back {
  transform: translate(12%, -12%) scale(0.7);
}
#track.cosmic-track .coin-art .coin-stack-front {
  transform: translate(-14%, 12%) scale(0.7);
}
#track.cosmic-track .plus-reward {
  padding: 7px 0 0;
  margin-top: 7px;
  gap: 5px;
}
.plus-reward button {
  flex: 1;
}
#track.cosmic-track #pass-level-50 {
  border: 0 !important;
  padding-bottom: 8px;
}
#track.cosmic-track #pass-level-50 .cosmic-lanes {
  border: 2px solid #f2c67c;
  background: linear-gradient(120deg, #9962ab33, #282039aa);
  box-shadow: inset 0 0 15px #f5b76d33;
}
.reference-pass .bonus-chest {
  max-width: 850px;
  margin: 0 auto;
  gap: 10px;
  grid-template-columns: minmax(110px, 37%) minmax(0, 1fr);
  padding: 18px 10px 16px;
  border: 2px solid #e7c589;
  border-radius: 0;
  clip-path: polygon(4% 0, 96% 0, 100% 5%, 100% 95%, 96% 100%, 4% 100%, 0 95%, 0 5%);
  background:
    radial-gradient(ellipse at 20% 50%, #a254da44, transparent 64%),
    linear-gradient(120deg, #271b46, #17142d);
}
.reference-pass .bonus-chest:before {
  content: "";
  position: absolute;
  left: 27px;
  top: -22px;
  height: 22px;
  width: 3px;
  background: #63e7f4;
}
.reference-pass .bonus-chest > img {
  width: 115%;
  max-width: none;
  transform: translateX(-5%);
  filter: drop-shadow(0 5px 12px #9e60ea88);
}
.reference-pass #pass .bonus-chest h2 {
  font-size: clamp(18px, 4.4vw, 32px);
  margin: 5px 22px 7px 0;
  line-height: 1.05;
}
.reference-pass .bonus-chest p {
  font-size: clamp(11px, 2.6vw, 17px);
  margin: 9px 0;
}
.ref-chest-meter {
  position: relative;
  height: 24px;
  margin: 12px 0;
}
.ref-chest-meter progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 24px;
  border: 1px solid #ab78d0;
  border-radius: 16px;
  background: #151027;
  margin: 0;
  overflow: hidden;
}
.ref-chest-meter progress::-webkit-progress-bar {
  background: #18112b;
  border-radius: 16px;
  box-shadow: inset 0 2px 5px #0008;
}
.ref-chest-meter progress::-webkit-progress-value {
  background: linear-gradient(#c5ffff, #42f1ee 45%, #12b7d3);
  border-radius: 16px;
  box-shadow: inset 0 2px #efffff;
}
.ref-chest-meter progress::-moz-progress-bar {
  background: linear-gradient(#c5ffff, #42f1ee, #12b7d3);
  border-radius: 16px;
}
.ref-chest-meter b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #faffff;
  text-shadow: 0 1px 2px #183354;
  pointer-events: none;
}
.reference-pass #bonus-open {
  clip-path: polygon(4% 0, 96% 0, 100% 16%, 100% 84%, 96% 100%, 4% 100%, 0 84%, 0 16%);
  border-radius: 0;
  min-height: 46px;
  font-size: clamp(12px, 2.6vw, 18px);
  padding: 8px;
}
.reference-pass #bonus-open:disabled {
  background: linear-gradient(#7b668f, #49385c);
  color: #e2d8eb;
  border-top: 2px solid #bba3cf;
}
.reference-pass .carousel-controls {
  display: none;
}
@media (orientation: landscape) {
  .reference-pass > header {
    height: 58px;
    min-height: 58px;
  }
  .reference-pass .ref-menu {
    top: 9px;
    right: 62px;
  }
  .reference-pass #pass > .ref-pass-title {
    max-width: 600px;
    font-size: 27px;
    margin: 0 auto 8px;
  }
  .reference-pass #pass > .catalog-head {
    top: 66px;
    right: 16px;
  }
  .reference-pass #pass #track.cosmic-track {
    flex-direction: row;
    padding: 18px 24px;
    gap: 26px;
  }
  #track.cosmic-track .cosmic-tier {
    flex: 0 0 410px;
    width: 410px;
    max-height: 100%;
    overflow-y: auto;
    padding-left: 55px !important;
  }
  #track.cosmic-track .cosmic-tier:before {
    left: -26px;
    top: 50%;
    height: 3px;
    width: 26px;
  }
  #track.cosmic-track .reward-item {
    min-height: 135px;
  }
  #track.cosmic-track .reward-art {
    height: 85px;
  }
  #track.cosmic-track .reward-plaque strong {
    font-size: 16px;
  }
  #track.cosmic-track .reward-status {
    font-size: 13px;
  }
  .reference-pass .bonus-chest {
    flex: 0 0 480px;
    width: 480px;
    max-height: 100%;
  }
  .reference-pass .bonus-chest h2 {
    font-size: 26px !important;
  }
  .reference-pass .bonus-chest p {
    font-size: 14px;
  }
  .reference-pass #bonus-open {
    font-size: 16px;
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  .reference-pass > header {
    height: 48px;
    min-height: 48px;
  }
  .reference-pass header .back,
  .reference-pass header #language {
    top: 2px;
  }
  .reference-pass .ref-menu {
    top: 2px;
  }
  .reference-pass #pass > .ref-pass-title {
    display: none;
  }
  .reference-pass #pass > .catalog-head {
    top: 52px;
  }
  .reference-pass #pass .compact-progress {
    min-height: 30px;
    padding: 4px 12px;
    margin: 0 auto;
  }
  .reference-pass #pass #track.cosmic-track {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #track.cosmic-track .reward-item {
    min-height: 92px;
  }
  #track.cosmic-track .reward-art {
    height: 50px;
  }
  #track.cosmic-track .reward-plaque strong {
    font-size: 12px;
  }
  #track.cosmic-track .reward-status {
    font-size: 10px;
  }
  .reference-pass .bonus-chest {
    padding: 12px;
  }
  .reference-pass .bonus-chest h2 {
    font-size: 20px !important;
  }
  .reference-pass .bonus-chest p {
    font-size: 11px;
    margin: 5px 0;
  }
  .ref-chest-meter {
    margin: 8px 0;
  }
}
.reference-pass header .back {
  font-size: 0 !important;
  line-height: 0;
  overflow: hidden;
  color: transparent;
}
.reference-pass header .back:after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 35px;
  line-height: 1;
  color: #ffe6b2;
}
.reference-pass #pass > .catalog-head {
  display: none;
}
#track.cosmic-track .level-dot:before {
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  transform: none;
  border: 0;
  box-shadow: none;
}
#track.cosmic-track .level-dot b {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0;
  color: #fff6ff;
}
#track.cosmic-track .coin-art:before,
#track.cosmic-track .coin-art:after {
  display: none;
}
#track.cosmic-track .coin-stack-back,
#track.cosmic-track .coin-stack-front {
  display: none;
}
#track.cosmic-track .coin-art > img:last-child {
  transform: none;
}
#track.cosmic-track .reward-plaque strong {
  font-size: clamp(13px, 3.4vw, 22px);
}
/* Retire the earlier arcade sunbursts and fixed tiny currency sizes. */
#track.cosmic-track .reward-item:before,
#track.cosmic-track .level-dot:after {
  display: none;
}
#track.cosmic-track .coin-art img.pass-coin {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: contain;
}
#track.cosmic-track .reward-plaque strong {
  font-size: clamp(13px, 3.4vw, 22px) !important;
}
.reference-pass .bonus-chest > img {
  width: 100%;
  transform: none;
}
@media (min-width: 600px) and (orientation: portrait) {
  #track.cosmic-track .reward-item {
    min-height: 138px;
  }
  #track.cosmic-track .reward-art {
    height: 95px;
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  #track.cosmic-track .reward-plaque strong {
    font-size: 13px !important;
  }
}
body.reference-pass:has(#pass:not([hidden])) {
  background: #100d25 url(assets/cosmic-palace-v1.webp) center top/100% auto no-repeat fixed;
}
.embedded body.reference-pass main > .ref-menu {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 50;
}
.embedded body.reference-pass main {
  position: relative;
}
.embedded .ref-menu #language {
  position: static;
  width: 100%;
  min-height: 44px;
}
/* Native touch scrolling follows the actual axis, including inside /pass iframe. */
#pass #track.cosmic-track {
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html:has(body.reference-pass) {
  background: #100d25;
  overscroll-behavior: none;
}
body.reference-pass {
  overscroll-behavior: none;
}
@media (orientation: landscape) {
  #pass #track.cosmic-track {
    touch-action: pan-x pinch-zoom;
  }
}

/* Give collectibles a real stage instead of squeezing them beside the title. */
#track.cosmic-track .reward-item {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 92px auto auto;
  gap: 6px;
  min-height: 166px;
  padding: 10px 8px;
}
#track.cosmic-track .reward-art {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#track.cosmic-track .reward-plaque strong {
  grid-column: 1;
  grid-row: 2;
  font-size: clamp(12px, 3vw, 19px) !important;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
#track.cosmic-track .reward-status {
  grid-row: 3;
}
#track.cosmic-track .board-preview .board-art {
  flex: none;
  width: 76px;
  height: 76px;
  min-width: 76px;
  aspect-ratio: 1;
  max-width: none;
  max-height: none;
  margin: 0;
  border-width: 4px;
  transform: perspective(400px) rotateX(18deg) rotateZ(-10deg) !important;
}
#track.cosmic-track .room-preview .room-image {
  flex: none;
  width: 80px;
  height: 80px;
  max-width: none;
  max-height: none;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 9px;
  transform: rotate(-4deg);
}
#track.cosmic-track .reward-art .asset-svg {
  max-width: 100%;
}
@media (orientation: landscape) and (max-height: 550px) {
  #track.cosmic-track .reward-item {
    grid-template-rows: 76px auto auto;
    min-height: 145px;
  }
  #track.cosmic-track .reward-art {
    height: 76px;
  }
  #track.cosmic-track .board-preview .board-art {
    width: 64px;
    height: 64px;
    min-width: 64px;
  }
  #track.cosmic-track .room-preview .room-image {
    width: 64px;
    height: 64px;
  }
}
/* Cabinet fitting room: one scene per image, scaled uniformly rather than an atlas. */
.scene:not(.character-stage) {
  background-image:
    linear-gradient(#07182755, #07182799), url(assets/room-apartment-square-v1.webp);
  background-size: cover;
  background-position: center;
}
.scene.white:not(.character-stage) {
  background-image: linear-gradient(#07182755, #07182799), url(assets/room-white-square-v1.webp);
}
.scene.radio:not(.character-stage) {
  background-image: linear-gradient(#07182755, #07182799), url(assets/room-radio-square-v1.webp);
}

/* Identify collectibles; currency names already identify Gold and Silver. */
#track.cosmic-track .reward-item:not(.currency-item) {
  grid-template-rows: 92px auto auto auto;
}
#track.cosmic-track .reward-item:not(.currency-item) .reward-type {
  display: block;
  grid-column: 1;
  grid-row: 2;
  position: static;
  margin: 0;
  color: #e6c8ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: none;
}
#track.cosmic-track .reward-item:not(.currency-item) .reward-plaque strong {
  grid-row: 3;
}
#track.cosmic-track .reward-item:not(.currency-item) .reward-status {
  grid-row: 4;
}
#track.cosmic-track .currency-item .reward-type {
  display: none;
}
.plus-reward .plus-item-type {
  display: block;
  color: #e6c8ff;
  font-size: 10px;
  line-height: 1.3;
}
@media (orientation: landscape) and (max-height: 550px) {
  #track.cosmic-track .reward-item:not(.currency-item) {
    grid-template-rows: 76px auto auto auto;
  }
}
