/* the character screen: a hall behind, the hero on a dais, what they do beside them and the
   roster along the bottom. --accent / --glow are the class being looked at */
#screen-character {
  padding: 0;
  background: #0b090f;
  overflow: hidden;
}
.cs.menu-screen {
  --accent: #7ff2c0;
  --glow: 127, 242, 192;
  position: relative;
  max-width: none;
  padding: 18px 24px 14px;
  gap: 12px;
  box-sizing: border-box;
}
.cs > * {
  position: relative;
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
}
.cs > .cs-backdrop {
  position: absolute;
  inset: 0;
  max-width: none;
  height: 100%;
  pointer-events: none;
}

.cs-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 46%);
  gap: 16px;
}

/* the stage */
.cs-stage {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(var(--glow), 0.18);
  background: linear-gradient(180deg, rgba(8, 6, 12, 0.1), rgba(8, 6, 12, 0.45));
  transition: border-color 0.3s ease;
}
.cs-stage::before,
.cs-stage::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--accent);
  opacity: 0.7;
  pointer-events: none;
}
.cs-stage::before {
  top: 8px;
  left: 8px;
  border-right: 0;
  border-bottom: 0;
}
.cs-stage::after {
  right: 8px;
  bottom: 8px;
  border-left: 0;
  border-top: 0;
}
.cs-stage-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cs-plate {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  pointer-events: none;
}
.cs-name {
  font:
    700 clamp(26px, 3.6vw, 46px) / 1 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: 4px;
  color: var(--accent);
  text-shadow:
    0 2px 6px #000c,
    0 0 26px rgba(var(--glow), 0.5);
}
.cs-title {
  margin-top: 7px;
  font:
    700 12px/1 Arial,
    sans-serif;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #cfc6ba;
  text-shadow: 0 1px 4px #000;
}
.cs-ribbon {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px;
  border: 1px solid rgba(var(--glow), 0.6);
  border-radius: 3px;
  background: rgba(8, 6, 12, 0.72);
  color: var(--accent);
  font:
    800 11px/1 Arial,
    sans-serif;
  letter-spacing: 5px;
  white-space: nowrap;
  animation: csSoon 2.6s ease-in-out infinite;
}
.cs-ribbon[hidden] {
  display: none;
}
@keyframes csSoon {
  50% {
    box-shadow: 0 0 22px rgba(var(--glow), 0.45);
  }
}
.cs-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  width: 38px;
  height: 52px;
  margin-top: -26px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(10, 8, 14, 0.55);
  color: #e0d7ca;
  font:
    400 30px/1 Georgia,
    serif;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}
.cs-nav:hover {
  border-color: var(--accent);
  background: rgba(var(--glow), 0.14);
}
.cs-nav.prev {
  left: 10px;
}
.cs-nav.next {
  right: 10px;
}

/* what they do */
.cs-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #9b857d30;
  border-top: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(14, 12, 18, 0.84);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease;
}
.cs-info {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cs-chip {
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font:
    700 11.5px/1 Arial,
    sans-serif;
  color: rgba(255, 255, 255, 0.78);
}
.cs-chip b {
  color: var(--accent);
  letter-spacing: 2px;
}
.cs-chip-lv {
  color: var(--accent);
  border-color: rgba(var(--glow), 0.45);
  font-weight: 900;
}
.cs-tagline {
  margin: 0;
  font:
    italic 15px/1.4 Georgia,
    serif;
  color: #d8cfc2;
}
.cs-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 18px;
}
.cs-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cs-stat-label {
  width: 58px;
  font:
    800 10.5px/1 Arial,
    sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.cs-stat-bar {
  display: flex;
  gap: 3px;
  flex: 1;
}
.cs-stat-bar i {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.cs-stat-bar i.on {
  box-shadow: 0 0 8px rgba(var(--glow), 0.5);
}
.cs-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  font:
    900 11px/1 Arial,
    sans-serif;
  letter-spacing: 3px;
  color: #b8a17d;
}
.cs-h::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #9b857d50, transparent);
}
.cs-kit {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cs-kit-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.cs-key {
  flex: none;
  min-width: 54px;
  padding: 5px 6px;
  text-align: center;
  border-radius: 4px;
  background: rgba(var(--glow), 0.12);
  border: 1px solid rgba(var(--glow), 0.35);
  color: var(--accent);
  font:
    900 10px/1 Arial,
    sans-serif;
  letter-spacing: 1px;
}
.cs-kit-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font:
    400 12.5px/1.4 Arial,
    sans-serif;
  color: #b9b1ac;
}
.cs-kit-text b {
  color: #fff;
  font-size: 13px;
}
/* a class nobody's been told about yet */
.cs-kit.hidden-kit .cs-kit-text {
  opacity: 0.45;
  letter-spacing: 1px;
}
.cs-kit.hidden-kit .cs-key {
  opacity: 0.6;
}
.cs-skins {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.cs-skin {
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: Arial, sans-serif;
}
.cs-skin:hover {
  border-color: rgba(var(--glow), 0.5);
}
.cs-skin.viewing {
  border-color: var(--accent);
  background: rgba(var(--glow), 0.1);
}
.cs-swatch {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.5);
}
.cs-skin-name {
  font:
    800 12px/1 Arial,
    sans-serif;
}
.cs-skin-tag {
  font:
    900 8.5px/1 Arial,
    sans-serif;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.45);
}
.cs-skin.owned .cs-skin-tag {
  color: #7ff2c0;
}
.cs-skin.pass .cs-skin-tag {
  color: #5fe8b4;
}
.cs-skin.worn .cs-skin-tag {
  color: var(--accent);
}
/* a secret look nobody's found yet */
.cs-skin.secret {
  border-style: dashed;
  border-color: rgba(200, 190, 255, 0.25);
}
.cs-skin.secret .cs-swatch {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1a1a22, #2a2a36);
  font:
    900 14px/1 Georgia,
    serif;
  color: rgba(220, 210, 255, 0.7);
}
.cs-skin.secret .cs-skin-tag {
  color: rgba(200, 190, 255, 0.6);
}
.cs-note {
  font:
    600 11.5px/1.35 Arial,
    sans-serif;
  color: #ffd166;
}
.cs-note.cs-secret {
  font-style: italic;
  font-family: Georgia, serif;
  color: #c8c0ff;
}
.cs-price-note {
  color: #ffe3a0;
}
.cs-soon-note {
  color: #b9b1ac;
  font-style: italic;
}
.cs-shoplink {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.cs-go {
  appearance: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 209, 102, 0.5);
  background: rgba(255, 209, 102, 0.12);
  color: #ffd166;
  font:
    900 10.5px/1 Arial,
    sans-serif;
  letter-spacing: 1px;
}
.cs-go:hover {
  background: rgba(255, 209, 102, 0.25);
}

/* the buttons, always in reach under the panel */
.cs-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 8px 8px;
  background: rgba(8, 6, 12, 0.72);
}
.cs-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cs-select {
  flex: 1 1 200px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 6px;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(var(--glow), 0.34), rgba(var(--glow), 0.12));
  font-size: 14px;
  letter-spacing: 2px;
}
.cs-select:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(var(--glow), 0.48), rgba(var(--glow), 0.18));
}
.cs-select:disabled {
  cursor: default;
  transform: none;
}
.cs-select.on {
  background: rgba(var(--glow), 0.14);
  color: var(--accent);
}
.cs-select.locked {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
}
.cs-select.cs-try {
  border-color: #7dffb0;
  color: #d8ffe8;
  background: linear-gradient(180deg, rgba(125, 255, 176, 0.28), rgba(125, 255, 176, 0.08));
}
.cs-select.cs-try:hover {
  background: linear-gradient(180deg, rgba(125, 255, 176, 0.4), rgba(125, 255, 176, 0.14));
}
.cs-select.cs-buy {
  border-color: #ffd66b;
  color: #fff2c8;
  background: linear-gradient(180deg, rgba(255, 200, 80, 0.34), rgba(255, 170, 40, 0.1));
}
.cs-select.cs-buy:hover {
  background: linear-gradient(180deg, rgba(255, 210, 90, 0.48), rgba(255, 170, 40, 0.16));
}
.cs-select.cs-buy.confirm {
  border-color: #fff;
  color: #1a1204;
  background: linear-gradient(180deg, #ffe08a, #e8a93a);
  animation: csPulse 1s ease-in-out infinite;
}
.cs-select.cs-buy.poor {
  border-color: rgba(255, 210, 90, 0.3);
  color: rgba(255, 230, 180, 0.6);
  background: rgba(255, 200, 80, 0.06);
}
@keyframes csPulse {
  50% {
    box-shadow: 0 0 26px rgba(255, 210, 90, 0.6);
  }
}

/* the roster */
.cs-roster {
  display: flex;
  flex: none;
  gap: 7px;
  padding: 6px 2px 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
/* centred while it fits, from the left edge once it doesn't */
.cs-card:first-child {
  margin-left: auto;
}
.cs-card:last-child {
  margin-right: auto;
}
.cs-card {
  appearance: none;
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  padding: 5px 5px 7px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(14, 12, 18, 0.84);
  color: #fff;
  font-family: Arial, sans-serif;
  scroll-snap-align: center;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.cs-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--glow), 0.55);
}
.cs-card.viewing {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(var(--glow), 0.22), rgba(14, 12, 18, 0.92));
  box-shadow: 0 6px 22px rgba(var(--glow), 0.25);
}
.cs-card-art {
  width: 100%;
  height: 70px;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 85%, rgba(var(--glow), 0.24), rgba(0, 0, 0, 0.4) 75%);
}
.cs-card-name {
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font:
    800 9.5px/1.1 Arial,
    sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.cs-card.locked .cs-card-name {
  color: rgba(255, 255, 255, 0.55);
}
.cs-card-lv {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin-top: 4px;
  padding: 0 3px;
  box-sizing: border-box;
}
.cs-card-lv[hidden] {
  display: none;
}
.cs-card-lv b {
  font:
    900 8.5px/1 Arial,
    sans-serif;
  letter-spacing: 0.5px;
  color: var(--accent);
  white-space: nowrap;
}
.cs-card-lv span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}
.cs-card-lv i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.cs-card-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font:
    900 8.5px/1 Arial,
    sans-serif;
  letter-spacing: 0.5px;
}
.cs-card-badge.on {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0a0e;
  font-size: 11px;
}
.cs-card-badge.soon {
  padding: 3px 5px;
  border-radius: 3px;
  background: rgba(10, 8, 14, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.6);
}
.cs-card-badge.price {
  padding: 3px 5px;
  border-radius: 3px;
  background: rgba(40, 28, 6, 0.85);
  border: 1px solid rgba(255, 210, 90, 0.5);
  color: #ffd66b;
}

/* narrow and tall: roster first, then the stage and the panel in one scroll */
@media (max-width: 860px) and (min-height: 461px) {
  .cs.menu-screen {
    padding: 10px 12px 0;
    gap: 8px;
  }
  .cs-roster {
    order: 1;
  }
  .cs-main {
    order: 2;
    display: block;
    overflow: auto;
  }
  .cs-stage {
    height: 300px;
    margin-bottom: 10px;
  }
  .cs-panel {
    min-height: auto;
    margin-bottom: 12px;
  }
  .cs-info {
    overflow: visible;
    padding: 14px;
  }
  .cs-actions {
    position: sticky;
    bottom: 0;
    padding: 10px 14px 12px;
    background: rgba(8, 6, 12, 0.94);
  }
  .cs-card {
    width: 80px;
  }
  .cs-card-art {
    height: 56px;
  }
  .cs-card-name {
    font-size: 8.5px;
    letter-spacing: 0.2px;
  }
  .cs-stats {
    grid-template-columns: 1fr;
  }
}
/* short and wide: everything a size down */
@media (max-height: 460px) {
  .cs.menu-screen {
    padding: 8px 12px 6px;
    gap: 6px;
  }
  .cs-main {
    grid-template-columns: 34% 1fr;
    gap: 8px;
  }
  .cs-stage {
    min-height: 0;
  }
  .cs-name {
    font-size: 20px;
    letter-spacing: 2px;
  }
  .cs-title {
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .cs-plate {
    left: 12px;
    bottom: 8px;
  }
  .cs-nav {
    width: 28px;
    height: 40px;
    margin-top: -20px;
    font-size: 22px;
  }
  .cs-ribbon {
    top: 8px;
    padding: 5px 9px;
    font-size: 8.5px;
    letter-spacing: 3px;
  }
  .cs-info {
    padding: 10px 12px;
    gap: 8px;
  }
  .cs-actions {
    padding: 7px 12px 8px;
    gap: 5px;
  }
  .cs-select {
    padding: 9px 12px;
    font-size: 12px;
  }
  .cs-roster {
    gap: 5px;
    padding: 2px;
  }
  .cs-card {
    width: 60px;
    padding: 3px;
  }
  .cs-card-art {
    height: 40px;
  }
  .cs-card-name,
  .cs-card-lv {
    display: none;
  }
  .cs-card.viewing {
    transform: none;
  }
}
