/* play.css — Tabletop score tracking pane for RiftHomies.
 *
 * Replicates the Android app's table mode (TableZone + table layout in
 * PlayModeScreen.kt): legend card art full-bleed behind each zone, huge gold
 * Cinzel score numeral flanked by gold-ringed steppers, XP row, far-side
 * zones rotated 180°. Session-only state — nothing is persisted.
 *
 * Arcane tokens come from styles.css (:root): --bg-deep, --gold,
 * --gold-pale, --cream, --dim. Gold bright (#EBCB7E) is defined here.
 */
#pane-play.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pl-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px 10px 2px;
}
.pl-seg {
  display: flex;
  border: 1px solid rgba(217,164,65,.5);
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
}
.pl-seg button {
  background: transparent;
  border: none;
  color: var(--dim);
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  cursor: pointer;
}
.pl-seg button.on {
  background: var(--gold);
  color: #1A1206;
}
.pl-reset {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
}

.pl-zones {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-zones.four {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.pl-zones .pl-zone {
  min-height: 0;
  min-width: 0;
}

.pl-zone {
  position: relative;
  flex: 1 1 0;
  border-radius: 18px;
  border: 1px solid rgba(217,164,65,.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pl-zone.rot {
  transform: rotate(180deg);
}
.pl-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.pl-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.82), rgba(0,0,0,.45) 50%, rgba(0,0,0,.88));
}
.pl-zone.noart {
  background: linear-gradient(180deg, #1B1626, #14121B);
}
.pl-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  max-width: 100%;
}
.pl-pill {
  background: rgba(0,0,0,.72);
  border-radius: 18px;
  padding: 6px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.pl-name {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 6px #000;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-legend {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold-pale);
  text-shadow: 0 2px 6px #000;
  padding: 4px 2px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 8px 0;
}
.pl-score {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 800;
  color: #EBCB7E;
  text-shadow: 0 2px 6px #000, 0 0 22px rgba(235,203,126,.25);
  text-align: center;
  font-size: clamp(64px, 24vw, 100px);
  line-height: 1.04;
  min-width: 64px;
  padding: 0 12px;
}
.four .pl-score {
  font-size: clamp(48px, 16vw, 72px);
  min-width: 44px;
  padding: 0 6px;
}
.pl-step {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 6px #000;
}
.four .pl-step {
  width: 52px;
  height: 52px;
  font-size: 24px;
}
.pl-step:active { background: rgba(217,164,65,.22); }

.pl-xp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.72);
  border-radius: 999px;
  padding: 4px 10px;
}
.pl-xp-label {
  font-size: 12px;
  color: rgba(255,255,255,.85);
  text-shadow: 0 2px 6px #000;
}
.pl-xp-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 6px #000;
}
.pl-xp-step:active { background: rgba(217,164,65,.22); }
.pl-xp-num {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold-pale);
  text-shadow: 0 2px 6px #000;
  min-width: 24px;
  text-align: center;
}

/* ---------- legend picker screen ---------- */
#screen-legendpick.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.lp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 8px 2px;
}
.lp-back {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}
.lp-head h2 {
  font-family: "Cinzel", Georgia, serif;
  font-size: 18px;
  margin: 0;
  color: var(--cream);
}
.lp-search {
  margin-bottom: 8px;
}
.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding-bottom: 20px;
}
.lp-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  color: var(--cream);
}
.lp-item img {
  width: 100%;
  aspect-ratio: 3 / 3.2;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.lp-item .lp-cap {
  padding: 6px 4px 8px 4px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}
.lp-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--dim);
  padding: 30px 0;
}
