/* Boathouse / character-select — holo-card carousel (3D-in-card).
   Card + foil styles live in boathouse-roster.css; this file is the screen shell:
   header, coin chip, carousel stage, nav arrows, name/rarity/stat panel, actions. */

#screen-character {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(52px, 9vh, 76px) clamp(12px, 3vw, 40px) clamp(12px, 2.6vh, 24px);
  gap: clamp(6px, 1.4vh, 14px);
}

.bh-head {
  position: absolute;
  top: max(clamp(10px, 2.8vh, 30px), env(safe-area-inset-top));
  left: max(clamp(14px, 3.9vw, 50px), env(safe-area-inset-left));
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1.1vw, 14px);
}
.bh-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(20px, 4.2vh, 30px);
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 22px rgba(0, 229, 255, .35);
}
.bh-title b { color: var(--brass); }
.bh-sub {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(9px, 1.5vh, 11px);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-hot);
  opacity: .85;
}

.coin-chip {
  position: absolute;
  top: max(clamp(10px, 3vh, 32px), env(safe-area-inset-top));
  right: max(clamp(14px, 3.75vw, 48px), env(safe-area-inset-right));
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px 7px 12px;
  background: #0e2240;
  clip-path: polygon(11% 0, 100% 0, 89% 100%, 0 100%);
  border: 1px solid rgba(255, 215, 0, .4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
}
.coin-chip .coin-dot {
  width: clamp(16px, 1.7vw, 22px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFE680, var(--gem-gold) 60%, var(--marigold-dark));
  box-shadow: 0 0 10px rgba(255, 215, 0, .55), inset 0 1px 1px rgba(255, 255, 255, .6);
}
.coin-chip span:last-child {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(14px, 1.5vw, 19px);
  color: var(--gem-gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

/* guest nudge under the coin chip — coins persist once signed in */
.bh-coins-hint {
  position: absolute;
  top: calc(max(clamp(10px, 3vh, 32px), env(safe-area-inset-top)) + clamp(34px, 5vh, 52px));
  right: max(clamp(14px, 3.75vw, 48px), env(safe-area-inset-right));
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(10px, 1.05vw, 12px);
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .6);
  pointer-events: none;
}
.bh-coins-hint .ti { font-size: 1em; opacity: .8; }

/* ── Carousel stage — cards are absolutely positioned inside .cs-track ────── */
.cs-carousel {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
}
.cs-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.cs-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  width: clamp(40px, 5vw, 54px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 229, 255, .4);
  background: linear-gradient(180deg, rgba(14, 27, 51, .82), rgba(8, 16, 34, .9));
  color: var(--brass);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(127, 242, 255, .25);
  transition: transform var(--engine-dur) var(--engine-ease), background .2s, opacity .2s;
}
.cs-nav:hover { background: linear-gradient(180deg, rgba(0, 229, 255, .22), rgba(8, 16, 34, .9)); }
.cs-nav:active { transform: translateY(-50%) scale(.94); }
.cs-nav.cs-prev { left: clamp(4px, 2vw, 28px); }
.cs-nav.cs-next { right: clamp(4px, 2vw, 28px); }
.cs-nav[disabled] { opacity: .25; pointer-events: none; }

/* ── Name / rarity / stats panel (below the card) ─────────────────────────── */
.cs-info {
  flex: 0 0 auto;
  width: min(100%, 540px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.4vh, 12px);
  padding: clamp(12px, 1.8vh, 18px) clamp(18px, 2.4vw, 32px) clamp(10px, 1.4vh, 14px);
  /* SOLID angular panel island over the live ocean (anti-glass; the ocean reads around it) */
  background: #0b1a33;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 96% 100%, 0 100%);
  border: 1px solid rgba(0, 229, 255, .24);
  box-shadow: inset 0 1px 0 rgba(127, 242, 255, .14), 0 16px 38px rgba(0, 0, 0, .55);
}
.cs-nameplate {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(6px, 1vw, 12px);
}
.cs-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: clamp(22px, 5vh, 36px);
  line-height: 1;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 18px rgba(0, 229, 255, .3);
}
.cs-title {
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(9px, 1.7vh, 12px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-hot);
}
.cs-rarity {
  align-self: center;
  padding: 3px 12px;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(9px, 1.4vh, 11px);
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.cs-rarity[data-rarity="common"]    { color: var(--cream-warm); opacity: .85; }
.cs-rarity[data-rarity="rare"]      { color: var(--brass); box-shadow: 0 0 12px rgba(0, 229, 255, .35); }
.cs-rarity[data-rarity="legendary"] { color: var(--gold); box-shadow: 0 0 14px rgba(255, 224, 0, .4); }

#cs-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 1.3vh, 10px);
}
.cs-note {
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.6vh, 12px);
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--cream-warm);
  opacity: .82;
}
.cs-note b { color: var(--brass); font-weight: 700; }
.stat { display: flex; align-items: center; gap: clamp(8px, 1vw, 12px); }
.stat-gem { display: none; }
.stat-label {
  width: clamp(58px, 6.1vw, 78px);
  flex: none;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(9px, 1.55vh, 11px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: .92;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.stat-track {
  position: relative;
  flex: 1;
  height: clamp(12px, 2vh, 15px);
  clip-path: polygon(1.5% 0, 100% 0, 98.5% 100%, 0 100%);
  background: #050d1f;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .24);
  overflow: hidden;
}
.stat-track i {
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 0%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sgc, var(--gem-aqua)) 55%, var(--deep-ui)), var(--sgc, var(--gem-aqua)));
  box-shadow: 0 0 10px var(--sgc, var(--gem-aqua));
  transition: width .5s cubic-bezier(.34, 1.3, .5, 1);
}
.stat-track .stat-val {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(9px, 1.55vh, 11px);
  color: var(--cream);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  z-index: 1;
}

/* ── Actions ──────────────────────────────────────────────────────────────── */
.cs-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 460px);
}
.cs-actions .lh-ghost, .cs-actions .lh-cta { flex: 1 1 0; }
/* Select is the primary action — keep it visibly LIVE (the flat gold read as disabled).
   Brighter gradient + a warm glow that gently pulses so it invites the click. */
.cs-actions #cs-select {
  flex: 1.7;
  color: #2a1300;
  /* juicy gold -> deep orange (4 stops, more orange presence) + a saturation/contrast lift so it reads
     VIBRANT, not flat gold. No white inset highlight — that was washing the top out to pale. */
  background: linear-gradient(177deg, #ffe53a 0%, #ffb200 40%, #ff8000 74%, #ff5e00 100%) !important;
  filter: saturate(1.28) contrast(1.05);
  box-shadow: inset 0 0 0 1.5px rgba(255, 140, 0, .75),
    0 8px 26px rgba(255, 130, 0, .6), 0 0 42px rgba(255, 160, 0, .5);
  animation: csSelectGlow 1.8s ease-in-out infinite;
}
.cs-actions #cs-select:hover { filter: saturate(1.4) brightness(1.08); }
@keyframes csSelectGlow {
  0%, 100% { box-shadow: inset 0 0 0 1.5px rgba(255,140,0,.75), 0 8px 26px rgba(255,130,0,.5),  0 0 34px rgba(255,160,0,.4); }
  50%      { box-shadow: inset 0 0 0 1.5px rgba(255,140,0,.75), 0 13px 34px rgba(255,130,0,.72), 0 0 56px rgba(255,170,0,.62); }
}
@media (prefers-reduced-motion: reduce) { .cs-actions #cs-select { animation: none; } }
.cs-actions .roster-count {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(10px, 1.7vh, 12px);
  color: var(--brass);
  letter-spacing: .08em;
  white-space: nowrap;
  min-width: 48px;
  text-align: right;
}

/* ── Short-landscape (phones) — compress so the CTA stays in view ─────────── */
@media (orientation: landscape) and (max-height: 480px) {
  #screen-character { padding-top: 42px; gap: 4px; }
  .bh-sub { display: none; }
  .cs-info { max-width: 560px; }
  #cs-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-nav { transition: none; }
}
