:root {
  --ink: #111111;
  --muted: #68615c;
  --paper: #fffdf8;
  --surface: #ffffff;
  --line: #ded8d0;
  --coral: #ff533d;
  --teal: #009f9a;
  --yellow: #f4c842;
  --lime: #74bd4a;
  --violet: #7e57c2;
  --danger: #d93636;
  --shadow: 0 18px 40px rgba(17, 17, 17, 0.13);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100svh;
}

body {
  background:
    linear-gradient(135deg, rgba(0, 159, 154, 0.16), transparent 30%),
    linear-gradient(315deg, rgba(255, 83, 61, 0.14), transparent 26%),
    #f4f6f8;
  color: var(--ink);
  font-size: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 10px) 10px calc(env(safe-area-inset-bottom) + 10px);
}

.screen {
  display: none;
  min-width: 0;
  min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 40px);
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#screen-setup.active {
  min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
}

.topbar > div {
  min-width: 0;
}

.topbar h1,
.result-hero h1 {
  margin: 0;
  font-size: clamp(3.9rem, 3rem + 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.kicker {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  padding: 24px;
  min-width: 0;
}

.setup-panel {
  padding-bottom: 14px;
}

.round-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  overflow: auto;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head.compact {
  margin-bottom: 8px;
}

.panel h2,
.panel-head h2,
.current-player h2 {
  margin: 0;
  font-size: 1.78rem;
  line-height: 1.15;
}

.panel p,
.current-player p,
.body-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1.42rem;
  line-height: 1.45;
}

.players-list {
  display: grid;
  gap: 16px;
}

.player-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 74px 74px;
  align-items: center;
  gap: 14px;
}

.player-row img,
.current-player img,
.avatar-chip img,
.vote-card img,
.role-row img {
  display: block;
  object-fit: cover;
  border-radius: 999px;
  background: #eeeeee;
}

.player-row img {
  width: 88px;
  height: 88px;
}

.player-row input {
  width: 100%;
  min-height: 88px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
  color: var(--ink);
  font-size: 1.68rem;
  padding: 16px 20px;
  outline: 0;
}

.player-row input:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 159, 154, 0.18);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
}

.player-row .icon-button {
  width: 74px;
  height: 74px;
  background: #efebe5;
  color: var(--ink);
  font-size: 1.58rem;
}

.player-row .icon-button.danger {
  color: var(--danger);
}

.small-button,
.secondary-button,
.primary-button {
  min-height: 76px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 1.42rem;
}

.small-button {
  min-height: 64px;
  white-space: nowrap;
  background: var(--yellow);
  color: var(--ink);
  padding: 0 18px;
}

.primary-button,
.secondary-button {
  width: 100%;
  padding: 18px 20px;
}

.primary-button {
  position: relative;
  z-index: 1;
  background: var(--coral);
  color: #ffffff;
  box-shadow: var(--shadow);
}

#screen-setup > #start-round {
  margin-top: 0;
}

.primary-button.dark {
  background: var(--ink);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #cfc8bd;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.field {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.field span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field select {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
  color: var(--ink);
  font-size: 1.38rem;
  padding: 0 18px;
}

.setting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0ede8;
  padding: 4px;
  margin-top: 18px;
}

.segment {
  min-height: 74px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.34rem;
  font-weight: 900;
}

.segment.active {
  background: var(--ink);
  color: #ffffff;
}

.rules {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.rules summary {
  cursor: pointer;
  font-size: 1.34rem;
  font-weight: 900;
}

.rules ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.45;
}

.error-text {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.reveal-topbar {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  grid-template-areas:
    "back badge"
    "title title";
  align-items: flex-start;
  gap: 12px;
}

.reveal-topbar .icon-button {
  grid-area: back;
}

.reveal-topbar > div {
  grid-area: title;
}

.reveal-topbar .round-badge {
  grid-area: badge;
  justify-self: end;
}

.reveal-topbar h1 {
  font-size: clamp(3.9rem, 16vw, 6rem);
  overflow-wrap: anywhere;
}

#screen-reveal.active {
  min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 40px);
}

.round-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  max-width: 170px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  padding: 0 16px;
  font-size: 1.08rem;
  font-weight: 900;
  text-align: center;
}

.current-player {
  display: none;
  grid-template-columns: clamp(150px, 38vw, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.current-player img {
  width: clamp(150px, 38vw, 220px);
  height: clamp(150px, 38vw, 220px);
  border: 3px solid #ffffff;
  box-shadow: var(--shadow);
}

.current-player p {
  font-size: clamp(1.35rem, 1.05rem + 2vw, 1.9rem);
}

.current-player h2 {
  overflow-wrap: anywhere;
  font-size: clamp(3.4rem, 1.9rem + 9vw, 6.2rem);
}

.reveal-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(244, 200, 66, 0.45), transparent 24%),
    linear-gradient(150deg, #111111, #282424);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.secret-layer,
.cover-layer {
  position: absolute;
  inset: 0;
}

.secret-layer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 36px 28px;
  color: #ffffff;
  text-align: center;
}

.role-label {
  display: grid;
  place-items: center;
  width: min(100%, 620px);
  min-height: 76px;
  margin: 0;
  border-radius: 8px;
  background: var(--teal);
  padding: 14px 22px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  font-size: clamp(1.45rem, 1.05rem + 2vw, 2.1rem);
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.role-label.impostor {
  background: var(--coral);
}

.secret-layer h2 {
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(4.4rem, 2.5rem + 8vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.secret-layer p:not(.role-label) {
  max-width: 28ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.34rem;
  line-height: 1.42;
}

.secret-layer .primary-button {
  margin-top: 10px;
  box-shadow: none;
}

#hide-and-next {
  width: min(100%, 620px);
  min-height: 78px;
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(0, 159, 154, 0.32);
  font-size: clamp(1.55rem, 1.05rem + 2.5vw, 2.25rem);
  letter-spacing: 0;
}

#hide-and-next:active {
  transform: translateY(1px);
}

.cover-layer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(115deg, transparent 0 16%, rgba(255, 255, 255, 0.18) 16% 28%, transparent 28% 48%, rgba(255, 255, 255, 0.13) 48% 58%, transparent 58%),
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(160deg, #ff7a42 0%, #ff1f4f 100%);
  color: #ffffff;
  padding: 24px 24px 34px;
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition: transform 180ms ease-out;
  z-index: 2;
}

.drag-handle {
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.cover-player {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  min-height: 0;
  width: 100%;
  flex: 1 1 auto;
  text-align: center;
}

.cover-player h2 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(17, 17, 17, 0.28);
  font-size: clamp(4.4rem, 2.3rem + 12vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.cover-player img {
  width: clamp(190px, 52vw, 320px);
  height: clamp(190px, 52vw, 320px);
  border-radius: 999px;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.24);
}

.cover-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.cover-copy p {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.4rem, 1rem + 2.2vw, 2rem);
  font-weight: 950;
  letter-spacing: 0;
}

.cover-copy h2 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(5.6rem, 2.6rem + 16vw, 9.6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) {
  .cover-copy {
    cursor: pointer;
  }
}

.swipe-arrow {
  display: grid;
  place-items: center;
  width: clamp(78px, 15vw, 112px);
  height: clamp(78px, 15vw, 112px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--coral);
  font-size: clamp(2.7rem, 1.9rem + 4vw, 4rem);
  font-weight: 900;
}

.microcopy {
  margin: -4px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 1.18rem;
}

.timer-panel {
  text-align: center;
}

.timer-label {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timer-display {
  margin: 4px 0 14px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(5rem, 3.5rem + 10vw, 8rem);
  font-weight: 950;
  line-height: 1;
}

.button-row,
.button-stack {
  display: grid;
  gap: 10px;
}

.button-row {
  grid-template-columns: 1fr 1fr;
}

.avatar-strip {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.avatar-chip {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 98px;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.avatar-chip img {
  width: 78px;
  height: 78px;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.1);
}

.vote-helper {
  margin-top: -2px;
}

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

.vote-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 220px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px 8px;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.08);
}

.vote-card img {
  width: 116px;
  height: 116px;
}

.vote-card span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.36rem;
  font-weight: 900;
}

.vote-card.selected {
  border-color: var(--coral);
  background: #fff2ef;
}

.result-hero {
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  padding: 24px 18px;
}

.result-hero .kicker {
  color: var(--yellow);
}

.result-hero p:last-child {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.3rem;
  line-height: 1.45;
}

.result-words {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-words div {
  min-width: 0;
  border-radius: 8px;
  background: #f4f6f8;
  padding: 12px;
}

.result-words span {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-words strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 1.9rem;
  line-height: 1.1;
}

.roles-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.role-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.role-row img {
  width: 72px;
  height: 72px;
}

.role-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.role-row span {
  color: var(--muted);
  font-size: 1.18rem;
}

.role-row .role-pill {
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  padding: 7px 10px;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role-row .role-pill.impostor {
  background: var(--coral);
}

@media (max-width: 700px) {
  .topbar h1,
  .result-hero h1 {
    font-size: clamp(3.1rem, 13vw, 4.8rem);
  }

  #setup-title {
    font-size: clamp(4.4rem, 20vw, 5.8rem);
  }

  #discussion-title {
    font-size: clamp(2.35rem, 9.5vw, 3.4rem);
  }

  #discussion-count {
    max-width: 136px;
  }

  #reset-demo {
    display: none;
  }

  .app-shell {
    padding-left: 8px;
    padding-right: 8px;
  }

  .panel {
    padding: 22px;
  }

  .panel-head {
    display: block;
  }

  .panel-head .small-button {
    width: 100%;
    margin-top: 16px;
  }

  .player-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
  }

  .player-row .icon-button {
    display: none;
  }

  .player-row img {
    width: 88px;
    height: 88px;
  }

  .player-row input {
    min-height: 88px;
    font-size: 1.72rem;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 21px;
  }

  .app-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .player-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .player-row img {
    width: 72px;
    height: 72px;
  }

  .player-row input {
    min-height: 72px;
    font-size: 1.48rem;
    padding-left: 14px;
    padding-right: 14px;
  }

  .current-player {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .current-player img {
    width: 118px;
    height: 118px;
  }

  .vote-grid {
    grid-template-columns: 1fr;
  }

  .result-words {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 700px) and (max-width: 1024px) and (hover: none),
  (min-width: 700px) and (max-width: 1024px) and (pointer: coarse),
  (min-width: 700px) and (max-width: 1024px) and (pointer: none) {
  body {
    font-size: 30px;
  }

  .app-shell {
    padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 18px);
  }

  .screen.active {
    gap: 18px;
  }

  .topbar {
    min-height: 88px;
  }

  .topbar h1,
  .result-hero h1 {
    font-size: clamp(5.1rem, 3.4rem + 5vw, 7rem);
  }

  .kicker {
    font-size: 1.2rem;
  }

  .panel {
    padding: 30px;
  }

  .panel h2,
  .panel-head h2,
  .current-player h2 {
    font-size: 2rem;
  }

  .panel p,
  .current-player p,
  .body-copy {
    font-size: 1.5rem;
  }

  .players-list {
    gap: 18px;
  }

  .player-row {
    grid-template-columns: 108px minmax(0, 1fr) 88px 88px;
    gap: 18px;
  }

  .player-row img {
    width: 108px;
    height: 108px;
  }

  .player-row input {
    min-height: 104px;
    font-size: 1.72rem;
    padding: 18px 24px;
  }

  .player-row .icon-button {
    width: 88px;
    height: 88px;
    font-size: 1.75rem;
  }

  .icon-button {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .small-button,
  .secondary-button,
  .primary-button {
    min-height: 94px;
    font-size: 1.62rem;
  }

  .small-button {
    min-height: 78px;
    padding: 0 24px;
  }

  .field {
    gap: 12px;
    margin-top: 22px;
  }

  .field span {
    font-size: 1.18rem;
  }

  .field select {
    min-height: 94px;
    font-size: 1.6rem;
    padding: 0 24px;
  }

  .segmented {
    margin-top: 24px;
  }

  .segment {
    min-height: 90px;
    font-size: 1.55rem;
  }

  .setting-grid {
    gap: 16px;
  }

  .rules {
    padding-top: 22px;
  }

  .rules summary {
    font-size: 1.5rem;
  }
}

@media (min-width: 720px) and (hover: hover) and (pointer: fine) {
  .app-shell {
    max-width: 480px;
  }
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body {
    font-size: 18px;
  }

  .app-shell {
    max-width: none;
    padding: 24px clamp(28px, 4vw, 72px) 34px;
  }

  .screen.active {
    width: 100%;
    max-width: min(1500px, calc(100vw - 56px));
    margin: 0 auto;
    gap: 22px;
  }

  .topbar {
    min-height: 82px;
  }

  .topbar h1,
  .result-hero h1 {
    font-size: clamp(4rem, 4.4vw, 5.7rem);
  }

  .kicker {
    font-size: 0.86rem;
    letter-spacing: 0.1em;
  }

  .panel {
    padding: 20px;
  }

  .panel h2,
  .panel-head h2,
  .current-player h2 {
    font-size: 1.35rem;
  }

  .panel p,
  .current-player p,
  .body-copy {
    font-size: 1rem;
  }

  #screen-setup.active {
    display: grid;
    grid-template-columns: minmax(520px, 0.95fr) minmax(520px, 1.05fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    min-height: auto;
  }

  #screen-setup > .topbar {
    grid-column: 1 / -1;
  }

  #screen-setup > .setup-panel {
    grid-column: 1;
    grid-row: 2;
  }

  #screen-setup > .round-panel {
    grid-column: 2;
    grid-row: 2;
    display: block;
    overflow: visible;
  }

  #screen-setup > #start-round {
    grid-column: 2;
    grid-row: 3;
  }

  #screen-setup > #setup-error {
    grid-column: 1 / -1;
  }

  .players-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .player-row {
    grid-template-columns: 60px minmax(0, 1fr) 48px 48px;
    gap: 10px;
  }

  .player-row img {
    width: 60px;
    height: 60px;
  }

  .player-row input {
    min-height: 58px;
    font-size: 1.05rem;
    padding: 10px 12px;
  }

  .icon-button {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 1.55rem;
  }

  .player-row .icon-button {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .small-button,
  .secondary-button,
  .primary-button {
    min-height: 58px;
    font-size: 1.05rem;
  }

  .small-button {
    min-height: 48px;
    padding: 0 16px;
  }

  .field {
    gap: 8px;
    margin-top: 14px;
  }

  .field span {
    font-size: 0.78rem;
  }

  .field select {
    min-height: 58px;
    font-size: 1.05rem;
    padding: 0 12px;
  }

  .segmented {
    margin-top: 16px;
  }

  .segment {
    min-height: 56px;
    font-size: 1.05rem;
  }

  .rules summary {
    font-size: 1rem;
  }

  .rules ol {
    font-size: 0.95rem;
  }

  #screen-reveal.active {
    display: grid;
    grid-template-columns: minmax(340px, 420px) minmax(560px, 1fr);
    grid-template-rows: auto 1fr auto;
    min-height: calc(100dvh - 58px);
    align-items: stretch;
  }

  #screen-reveal > .reveal-topbar {
    grid-column: 1 / -1;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    grid-template-areas: "back title badge";
    align-items: start;
  }

  .reveal-topbar h1 {
    font-size: clamp(4rem, 4.4vw, 5.7rem);
  }

  .current-player {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 18px;
  }

  .current-player img {
    width: 96px;
    height: 96px;
  }

  .current-player p {
    font-size: 1rem;
  }

  .current-player h2 {
    font-size: clamp(2.2rem, 3.2vw, 3.4rem);
  }

  .reveal-card {
    grid-column: 2;
    grid-row: 2 / span 2;
    min-height: 500px;
    height: clamp(500px, 64vh, 700px);
  }

  .microcopy {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    margin: 0;
    font-size: 1rem;
    text-align: left;
  }

  .cover-player h2 {
    font-size: clamp(3.4rem, 4vw, 5.4rem);
  }

  .cover-player img {
    width: clamp(180px, 19vw, 260px);
    height: clamp(180px, 19vw, 260px);
  }

  .cover-player {
    gap: 10px;
  }

  .cover-copy {
    gap: 8px;
  }

  .cover-copy p {
    font-size: clamp(1.2rem, 1.6vw, 1.65rem);
  }

  .swipe-arrow {
    width: clamp(68px, 7vw, 92px);
    height: clamp(68px, 7vw, 92px);
    font-size: clamp(2.1rem, 2.5vw, 3rem);
  }

  .secret-layer h2 {
    font-size: clamp(3.8rem, 4.7vw, 6.4rem);
  }

  .secret-layer p:not(.role-label) {
    font-size: 1.1rem;
  }

  .role-label,
  #hide-and-next {
    min-height: 64px;
    font-size: clamp(1.2rem, 1.6vw, 1.7rem);
  }

  #screen-discussion.active {
    display: grid;
    grid-template-columns: minmax(440px, 0.9fr) minmax(520px, 1.1fr);
    grid-template-rows: auto auto;
    align-items: start;
  }

  #screen-discussion > .topbar {
    grid-column: 1 / -1;
  }

  #screen-discussion > #go-vote {
    grid-column: 1 / -1;
  }

  .timer-display {
    font-size: clamp(5rem, 8vw, 8.5rem);
  }

  .avatar-chip {
    min-width: 78px;
    font-size: 0.86rem;
  }

  .avatar-chip img {
    width: 60px;
    height: 60px;
  }

  #screen-vote.active {
    max-width: min(1280px, calc(100vw - 56px));
  }

  .vote-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .vote-card {
    min-height: 210px;
  }

  .vote-card img {
    width: 112px;
    height: 112px;
  }

  .vote-card span {
    font-size: 1.12rem;
  }

  #screen-result.active {
    max-width: min(1180px, calc(100vw - 56px));
  }

  .result-hero {
    padding: 32px;
  }

  .result-hero p:last-child {
    font-size: 1.1rem;
  }

  .result-words strong {
    font-size: 1.7rem;
  }

  .roles-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }

  .role-row {
    grid-template-columns: 60px minmax(0, 1fr) auto;
  }

  .role-row img {
    width: 60px;
    height: 60px;
  }

  .role-row span {
    font-size: 0.95rem;
  }

  .role-row .role-pill {
    font-size: 0.78rem;
  }
}
