.deck-collection-tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -14px -1px 14px;
  padding: 10px 5px 5px;
  background: linear-gradient(#172f40 0%, #112b40 90%);
  box-shadow: 0 8px 12px #07192388;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  margin: 0 0 14px;
  background: #112b40;
  border: 1px solid #597b8f;
  border-radius: 13px;
}
.deck-collection-tabs button {
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: #b5cfde;
  font: 900 12px/1 system-ui;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: .03em;
}
.deck-collection-tabs button[aria-selected="true"] {
  background: linear-gradient(#ffe584, #ffb027);
  color: #322106;
  box-shadow: 0 3px 0 #775314;
  border-color: #fff0a0;
}
.deck-view-content[hidden] {
  display: none !important;
}

#journeyCosmetics, #deckEmotesContent {
  padding: 8px 8px 32px;
  /* The Deck owns scrolling. An unbounded nested scroller traps mobile swipes. */
  overflow: visible;
  overscroll-behavior: auto;
  touch-action: pan-y;
}
#journeyDeck {
  touch-action: pan-y;
  scroll-padding-top: 54px;
  -webkit-overflow-scrolling: touch;
}
.cosmetic-heading > span {
  font: 900 9px system-ui;
  letter-spacing: .08em;
  color: #e5ba61;
}
.cosmetic-heading h3 {
  margin: 4px 0 6px;
  font: 900 22px/1.1 system-ui;
  color: #fff1bd;
}
.cosmetic-heading p, .cosmetic-help {
  font: 12px/1.5 system-ui;
  color: #c1d4dd;
  margin: 6px 0 14px;
}
.cosmetic-packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.cosmetic-pack {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  padding: 12px 6px;
  background: radial-gradient(ellipse at center top, var(--skin-color), #153044 90%);
  border: 2px solid #537285;
  border-radius: 14px;
  color: #fff;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #0a1c2c;
  transition: transform .1s ease, border-color .15s ease;
}
.cosmetic-pack:active {
  transform: translateY(2px);
}
.cosmetic-pack.selected {
  border-color: #ffdb6b;
  box-shadow: 0 4px 0 #6d4b16, 0 0 14px #ffda4833;
}
.cosmetic-pack .cosmetic-face {
  width: 76px;
  height: 76px;
  flex: none;
  filter: drop-shadow(0 2px 2px #0008);
  margin: 0 0 8px;
}
.cosmetic-pack strong {
  font: 900 13px/1.3 system-ui;
  text-shadow: 0 1px 2px #000;
}
.cosmetic-pack small {
  font: 900 8px/1.3 system-ui;
  margin: 6px 0 0;
  color: #ffdf8d;
}
.cosmetic-face {
  display: block;
  background-size: 400% 400%;
  background-repeat: no-repeat;
  width: 38px;
  height: 38px;
}
.cosmetic-showcase {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  margin: 14px 0;
  background: linear-gradient(120deg, #2c4656, #112b3e);
  border: 1px solid #668494;
  border-radius: 15px;
}
.cosmetic-showcase #cosmeticHero {
  width: 96px;
  height: 96px;
  flex: none;
  display: grid;
  place-items: center;
}
.cosmetic-showcase .cosmetic-hero-face {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 4px 6px #071626b0);
}
.cosmetic-showcase > div + div {
  min-width: 0;
}
.cosmetic-showcase h4 {
  font: 900 17px/1.2 system-ui;
  margin: 4px 0;
  color: #ffeac0;
}
.cosmetic-showcase #cosmeticTag {
  font: 900 8px/1.3 system-ui;
  color: #8ddcd6;
  letter-spacing: .07em;
}
.cosmetic-showcase p {
  font: 700 12px system-ui;
  margin: 6px 0;
  color: #fff;
}
.cosmetic-showcase small {
  font: 10px/1.4 system-ui;
  color: #a9c4d2;
}
.cosmetic-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.cosmetic-quick button, .cosmetic-emote-grid button {
  display: grid;
  place-items: center;
  border: 1.5px solid #6b8c9c;
  background: linear-gradient(#2b5064, #173448);
  border-radius: 10px;
  min-width: 0;
  color: #e1edf3;
  padding: 6px 2px;
  cursor: pointer;
  box-shadow: 0 2px 0 #0f2230;
}
.cosmetic-quick .cosmetic-face {
  width: 50px;
  height: 50px;
}
.cosmetic-quick button.selected, .cosmetic-emote-grid button.selected {
  border: 2px solid #ffdb6b;
  background: #66582e;
  box-shadow: 0 0 8px #ffdb6b44;
}
.cosmetic-emote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cosmetic-emote-grid .cosmetic-face {
  width: 48px;
  height: 48px;
}
.cosmetic-emote-grid small {
  font: 700 9px system-ui;
  margin-top: 4px;
}
.cosmetic-save {
  width: 100%;
  background: linear-gradient(#ffe780, #f9a216);
  color: #322108;
  font: 900 15px/1.3 system-ui;
  border: 2px solid #ffd573;
  border-radius: 12px;
  padding: 13px 8px;
  box-shadow: 0 4px 0 #715015;
  margin-top: 18px;
  cursor: pointer;
}
.cosmetic-save:disabled {
  opacity: .6;
  cursor: default;
}
#cosmeticNotice {
  font: 12px/1.4 system-ui;
  min-height: 22px;
  color: #bfe9db;
  margin: 12px 0;
  text-align: center;
}
.cosmetic-pack:focus-visible, .cosmetic-save:focus-visible, .cosmetic-emote-grid button:focus-visible {
  outline: 3px solid #80e0e3;
  outline-offset: 2px;
}
@media (max-width: 350px) {
  .cosmetic-pack .cosmetic-face { width: 64px; height: 64px; }
  .cosmetic-showcase #cosmeticHero, .cosmetic-showcase .cosmetic-hero-face { width: 80px; height: 80px; }
  .cosmetic-showcase { gap: 8px; padding: 10px 6px; }
  .cosmetic-emote-grid .cosmetic-face { width: 40px; height: 40px; }
}
