/* Screen-by-screen layout for the plain P1 screens. P4 restyles. */

/* Home */
.screen-home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.home-hero {
  text-align: center;
}

.home-cards {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--accent);
}

.home-cards span:first-child {
  display: inline-block;
  transform: rotate(-10deg);
}

.home-cards span:last-child {
  display: inline-block;
  transform: rotate(10deg);
}

.home-title {
  font-size: 36px;
}

.home-tagline {
  color: var(--muted);
  max-width: 30ch;
  margin: 0 auto 24px;
}

/* Setup */
.swatches {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.swatch {
  position: relative;
  width: 48px;
  height: 48px;
}

.swatch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.swatch-dot {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid transparent;
  pointer-events: none;
}

.swatch input:checked + .swatch-dot {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--swatch);
}

.swatch input:disabled + .swatch-dot {
  opacity: 0.2;
}

.swatch input:focus-visible + .swatch-dot {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Scoreboard */
.scorebar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(8px + env(safe-area-inset-top)) var(--pad) 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.scorebar-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.chip {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 6px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--player) 45%, transparent);
  background: color-mix(in srgb, var(--player) 10%, var(--bg-raised));
}

.chip.is-picker {
  border-color: var(--player);
}

.chip-name {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--player);
}

.chip-score {
  grid-row: span 2;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chip-items {
  font-size: 14px;
  color: var(--muted);
}

.meter {
  margin-top: 8px;
}

.meter-text {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.meter-track {
  height: 8px;
  margin-top: 4px;
  border-radius: 4px;
  background: var(--bg-raised);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--heat-1);
  transform-origin: left center;
  transition: transform 400ms var(--ease);
}

.meter.heat-2 .meter-fill {
  background: var(--heat-2);
}

.meter.heat-3 .meter-fill {
  background: var(--heat-3);
}

.meter.heat-4 .meter-fill {
  background: var(--heat-4);
}

/* Turn banner and topic pick */
.turn-banner {
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border-left: 6px solid var(--player);
  background: color-mix(in srgb, var(--player) 14%, var(--bg-raised));
}

.turn-round {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.turn-title {
  font-size: 28px;
  margin: 0;
  color: var(--player);
}

.turn-sub {
  margin: 2px 0 0;
}

.notes {
  margin-bottom: 12px;
}

.note {
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  margin-bottom: 8px;
}

.unlock-callout {
  padding: 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 2px solid var(--heat-3);
  background: color-mix(in srgb, var(--heat-3) 12%, transparent);
}

.dial {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.dial-step {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 6px 4px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.dial-step[aria-pressed='true'].heat-1 {
  border-color: var(--heat-1);
}

.dial-step[aria-pressed='true'].heat-2 {
  border-color: var(--heat-2);
}

.dial-step[aria-pressed='true'].heat-3 {
  border-color: var(--heat-3);
}

.dial-step[aria-pressed='true'].heat-4 {
  border-color: var(--heat-4);
}

.dial-step[aria-pressed='true'] {
  background: color-mix(in srgb, var(--text) 10%, var(--bg-raised));
}

.dial-step.is-locked {
  opacity: 0.55;
  cursor: default;
}

.dial-num {
  font-weight: 800;
  font-size: 18px;
}

.dial-name {
  font-size: 14px;
  line-height: 1.15;
}

.dial-hint {
  font-size: 14px;
  color: var(--muted);
}

.pick-actions {
  margin: 0 0 12px;
}

.topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.topic {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 112px;
  padding: 12px;
  border-radius: var(--radius);
  border: 2px solid hsl(var(--hue) 60% 45% / 0.6);
  background: hsl(var(--hue) 45% 18%);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms var(--ease);
}

.topic:active {
  transform: scale(0.97);
}

.topic-emoji {
  font-size: 26px;
  line-height: 1.1;
}

.topic-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.topic-blurb {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.25;
}

/* Lasting badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.badge-count {
  color: var(--accent);
}

/* Cards (question, truth, dare) */
.card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(160deg, hsl(var(--hue, 260) 40% 22%), var(--bg-raised) 70%);
  border: 2px solid var(--line);
}

.card.heat-1 {
  border-color: color-mix(in srgb, var(--heat-1) 60%, transparent);
}

.card.heat-2 {
  border-color: color-mix(in srgb, var(--heat-2) 60%, transparent);
}

.card.heat-3 {
  border-color: color-mix(in srgb, var(--heat-3) 70%, transparent);
}

.card.heat-4 {
  border-color: color-mix(in srgb, var(--heat-4) 80%, transparent);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
}

.card-topic {
  color: var(--muted);
  font-weight: 600;
}

.heat-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bg);
  background: var(--heat-1);
}

.heat-badge.heat-2 {
  background: var(--heat-2);
}

.heat-badge.heat-3 {
  background: var(--heat-3);
}

.heat-badge.heat-4 {
  background: var(--heat-4);
}

.card-for {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--player);
}

.card-text {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.3;
  margin: 0;
}

.card-note {
  margin: 14px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.mirror-lead {
  font-size: 20px;
  font-weight: 700;
  color: var(--heat-3);
}

/* React */
.react-question {
  color: var(--muted);
  margin-bottom: 14px;
}

.follow-up {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.follow-up-label {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 4px;
}

.follow-up-text {
  font-size: 20px;
  font-weight: 650;
}

/* Shop */
.shop-player {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  border: 2px solid color-mix(in srgb, var(--player) 50%, transparent);
}

.shop-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--player);
  font-size: 20px;
}

.shop-points {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.shop-items {
  display: grid;
  gap: 8px;
}

/* Truth */
.custom-truth {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Timer */
.timer {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.timer-display {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.timer.is-done .timer-display {
  color: var(--accent);
}

/* Wildcard and mini-game */
.wildcard,
.minigame {
  padding: 22px 18px;
  border-radius: 22px;
  border: 2px dashed var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-raised));
}

.wildcard-title {
  font-size: 28px;
}

.wildcard-text {
  font-size: 20px;
}

.wildcard-extra {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

/* Comfort */
.rules-list {
  padding-left: 20px;
  margin: 0 0 16px;
}

.rules-list li {
  margin-bottom: 10px;
}

/* Recap */
.final-score {
  display: flex;
  gap: 10px;
  margin: 8px 0 16px;
}

.final-player {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 2px solid var(--player);
  color: var(--player);
  font-weight: 700;
}

.final-player strong {
  font-size: 40px;
  color: var(--text);
}

.stats {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.stat-value {
  font-weight: 700;
}

.common {
  padding-left: 20px;
}

.common li {
  margin-bottom: 6px;
}

/* Two-thumb unlock */
.overlay-unlock {
  align-items: stretch;
  padding: 0;
  background: var(--bg);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.unlock-sheet {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) var(--pad) calc(16px + env(safe-area-inset-bottom));
}

.unlock-middle {
  text-align: center;
}

.hold-zone {
  flex: 1 1 0;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 24px;
  border: 3px dashed var(--player);
  background: color-mix(in srgb, var(--player) 8%, transparent);
  touch-action: none;
  cursor: pointer;
}

.hold-zone.is-far {
  transform: rotate(180deg);
}

.hold-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 6px solid var(--player);
  opacity: 0.6;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}

.hold-zone.is-held .hold-ring {
  opacity: 1;
  transform: scale(1.15);
}

.hold-label {
  font-weight: 700;
  color: var(--player);
}

.hold-bar {
  height: 12px;
  margin: 14px 0 10px;
  border-radius: 6px;
  background: var(--bg-raised);
  overflow: hidden;
}

.hold-fill {
  height: 100%;
  background: var(--heat-3);
  transform: scaleX(0);
  transform-origin: left center;
}

.hold-status {
  font-weight: 650;
}
