:root {
  --bg: #f7f7f2;
  --card: #ffffff;
  --border: #d8d8d0;
  --text: #1f2937;
  --muted: #6b7280;
  --good: #14532d;
  --good-bg: #daf5e4;
  --bad: #b91c1c;
  --bad-bg: #f3f4f6;
  --off: #9ca3af;
  --accent: #0f766e;
}
body {
  margin: 0;
  font-family: "Trebuchet MS", Candara, sans-serif;
  background: radial-gradient(circle at top left, #eef8f5, var(--bg));
  color: var(--text);
}
.wrap {
  max-width: 1120px;
  margin: 16px auto;
  padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.site-header {
  padding: 11px 16px;
}
.site-brand-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  white-space: nowrap;
}
.site-brand-line h1,
.site-brand-line p {
  margin: 0;
}
.site-brand-line .muted {
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-nav {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.brand-expansion {
  color: #115e59;
  font-size: 1rem;
  font-weight: 900;
}
.site-nav-btn {
  min-height: 44px;
  border: 1px solid var(--border);
  color: var(--text);
  background: #f3f4f6;
  font-weight: 700;
}
.site-nav-btn.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.game-view-nav {
  display: none;
}
.game-view-nav button {
  min-height: 44px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.game-view-nav button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
body.game-active .site-header,
body.game-active .build-footer {
  display: none;
}
body.game-active .wrap {
  margin-top: 0;
  padding-top: max(8px, env(safe-area-inset-top));
}
body.game-active .game-view-nav:not(.hidden) {
  position: sticky;
  z-index: 20;
  top: max(8px, env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 8px;
  border: 1px solid #99d5cb;
  border-radius: 11px;
  background: rgba(240, 253, 250, 0.96);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(5px);
}
body.game-active.game-view-turn #lobbyCard,
body.game-active.game-view-lobby #gameCard {
  display: none;
}
body.game-active.game-view-lobby #lobbyCard {
  margin-bottom: 0;
}
body.management-open .play-surface {
  display: none !important;
}
.management-card:focus {
  outline: none;
}

.management-alert-section {
  margin: 18px 0;
}

.management-alert-list {
  display: grid;
  gap: 8px;
}

.management-alert,
.management-alert-clear {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0;
  padding: 10px 12px;
}

.management-alert.warning {
  border-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}

.management-alert.critical {
  border-color: var(--bad);
  background: #fef2f2;
  color: #991b1b;
}

.management-alert-clear {
  background: #f0fdf4;
  color: #166534;
}

.management-host-grid {
  margin-bottom: 10px;
}
[data-management-component="host-alert-thresholds"] {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.management-threshold-grid {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) repeat(2, minmax(6rem, 9rem));
  gap: 8px 12px;
  align-items: center;
}
.management-threshold-grid label,
.management-threshold-grid input {
  margin: 0;
}
.management-threshold-heading {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}
.management-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.management-heading p,
.management-heading h2 {
  margin: 0;
}
.management-unlock-form {
  max-width: 34rem;
  padding: 16px;
  border: 1px solid #b9ddd8;
  border-radius: 12px;
  background: #f0fdfa;
}
#managementUnlockBtn {
  width: 100%;
  min-height: 44px;
  color: #fff;
  background: var(--accent);
}
.management-unlocked-state {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--good);
  background: var(--good-bg);
  font-weight: 700;
}
.management-area-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}
.management-area-list span,
.management-area {
  padding: 9px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
}
.management-area {
  width: 100%;
  min-height: 0;
  cursor: pointer;
}
.management-area.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.management-data-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}
.management-data-panel h3 {
  margin-bottom: 12px;
}
.management-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.management-stat-grid article {
  display: flex;
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dbe3eb;
  border-radius: 10px;
  background: #fff;
  flex-direction: column;
  justify-content: center;
}
.management-stat-grid strong {
  color: var(--accent);
  font-size: 1.8rem;
}
.management-stat-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.management-system-list {
  display: grid;
  gap: 8px;
  margin: 0;
}
.management-system-list div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.25fr) 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
}
.management-system-list dt {
  font-weight: 800;
}
.management-system-list dd {
  margin: 0;
}
.management-panel-heading,
.management-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.management-panel-heading h3 {
  margin-bottom: 0;
}
.management-log-filters {
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) auto minmax(8rem, 1fr);
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}
.management-log-filters label {
  margin: 0;
  font-weight: 800;
}
.management-query-filters {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr) auto minmax(8rem, 0.4fr) auto;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
}
.management-query-filters label {
  margin: 0;
  font-weight: 800;
}
.management-query-filters input,
.management-query-filters select {
  margin: 0;
}
.management-table-wrap {
  overflow-x: auto;
}
.management-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.82rem;
}
.management-log-table th,
.management-log-table td {
  padding: 9px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.management-log-table th {
  background: #eef2f7;
}
.management-pagination {
  margin-top: 12px;
}
.management-game-detail {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.management-game-chains {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.management-game-chain {
  padding: 12px;
  border: 1px solid #dbe3eb;
  border-radius: 10px;
  background: #f8fafc;
}
.management-game-chain h4 {
  margin: 0 0 8px;
}
.management-game-step {
  padding: 10px;
  border-top: 1px solid var(--border);
}
.management-game-step:first-of-type {
  border-top: 0;
}
.management-game-step p {
  margin: 4px 0;
  white-space: pre-wrap;
}
.management-game-step img {
  display: block;
  width: auto;
  max-width: min(100%, 420px);
  max-height: 320px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.management-metric-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.management-metric-heading h3 {
  margin: 0 auto 0 0;
}
.management-metric-heading label {
  margin: 0;
  font-weight: 800;
}
.management-metric-heading select {
  width: auto;
  min-width: 7rem;
  margin: 0;
}
.management-metric-summary {
  margin-top: 10px;
}
.management-metric-trend {
  display: flex;
  height: 110px;
  align-items: flex-end;
  gap: 2px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.management-metric-trend span {
  min-width: 3px;
  background: var(--accent);
  flex: 1;
}
.management-metric-trend span.has-errors {
  background: var(--bad);
}
.management-metric-trend.empty::after {
  content: "No metric buckets in this window";
  align-self: center;
  margin: auto;
  color: var(--muted);
}
h1, h2, h3 {
  margin-top: 0;
  margin-bottom: 8px;
}
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}
label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
}
input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 1rem;
  font-family: inherit;
}
button {
  border: none;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}
button:hover {
  transform: translateY(-1px);
}
button:focus, input:focus, textarea:focus, select:focus, canvas:focus {
  outline: 3px solid #0b5fff;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.8;
}
#joinBtn {
  background: var(--accent);
  color: #fff;
  min-height: 44px;
  width: 100%;
}
.selector-card {
  padding: 14px;
}
.player-identity {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 1.4fr) auto minmax(12rem, auto);
  align-items: end;
  gap: 8px 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #b8dcd5;
  border-radius: 12px;
  background: #f0fdfa;
}
.player-identity label,
.player-identity legend {
  font-weight: 800;
}
.player-identity input,
.player-identity .tool-row,
.player-identity .identity-row,
.player-identity .tiny {
  margin-bottom: 0;
}
.avatar-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.avatar-picker .tool-row {
  gap: 7px;
}
.identity-row {
  white-space: nowrap;
}
.optional-sign-in {
  align-self: center;
  color: #374151;
  font-size: 0.86rem;
}
.optional-sign-in summary {
  cursor: pointer;
  font-weight: 800;
}
.optional-sign-in[open] {
  padding: 8px;
  border-radius: 9px;
  background: #fff;
}
.selector-workspace {
  display: grid;
  grid-template-areas:
    "games"
    "create"
    "join";
  gap: 12px;
  align-items: stretch;
}
.public-lobbies { grid-area: games; }
.create-game-panel { grid-area: create; }
.join-game-panel { grid-area: join; }
.selector-action-card,
.public-lobbies {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
}
.selector-action-card {
  border: 1px solid #b8dcd5;
  background: linear-gradient(150deg, #fff, #effbf8);
}
.selector-action-card p {
  margin-top: 0;
}
.join-game-panel {
  border: 2px solid var(--accent);
  box-shadow: 0 7px 18px rgba(15, 118, 110, 0.1);
}
#createModeBtn {
  width: 100%;
  min-height: 44px;
  color: #fff;
  background: #9a3412;
  font-weight: 800;
}
#joinBtn {
  font-weight: 900;
}
.create-game-panel {
  border-color: #f0cf8a;
  background: linear-gradient(150deg, #fff, #fff8e8);
}
.selector-action-card input {
  margin-bottom: 7px;
}
.selector-action-card .tiny {
  margin: 0 0 10px;
}
.selector-action-card .section-eyebrow {
  min-height: 0;
  margin-bottom: 4px;
}
.selector-card > .error {
  margin: 10px 0 0;
}
.selector-card button:disabled {
  opacity: 0.55;
}
.selector-card .public-lobby-card:disabled {
  opacity: 1;
}
.selector-card .public-lobby-card {
  transform: none;
}
.selector-card .public-lobby-card:hover {
  transform: translateY(-1px);
}
.selector-card .public-lobby-action {
  color: #fff;
}
.public-lobbies {
  border: 1px solid #f0cf8a;
  background:
    radial-gradient(circle at 92% 8%, rgba(245, 158, 11, 0.18), transparent 34%),
    #fffbeb;
}
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-heading-row h3,
.section-heading-row p {
  margin: 0;
}
.section-eyebrow {
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.public-lobby-list {
  display: grid;
  gap: 8px;
  max-height: 278px;
  overflow-y: auto;
  padding-right: 3px;
}
.public-lobby-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 54px;
  padding: 9px 11px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  text-align: left;
}
.public-lobby-card span {
  color: var(--muted);
  font-size: 0.82rem;
}
.public-lobby-card .public-lobby-action {
  justify-self: start;
  min-width: 7rem;
  margin-top: 2px;
  padding: 5px 9px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}
.public-lobby-card .public-lobby-action.unavailable {
  border-color: #9ca3af;
  background: #e5e7eb;
  color: #4b5563;
}
.public-lobby-card.unavailable {
  background: #f3f4f6;
}
#startBtn {
  background: var(--off);
  color: #fff;
}
.ready-action-panel {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid #99d5cb;
  border-radius: 12px;
  background: #f0fdfa;
}
.join-requests-panel {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid #d97706;
  border-radius: 12px;
  background: #fffbeb;
}
.join-requests-panel h3 {
  margin-bottom: 4px;
  color: #92400e;
}
.approve-join-request {
  border-color: var(--good);
  background: var(--good-bg);
  color: var(--good);
  font-weight: 800;
}
.decline-join-request {
  color: var(--bad);
}
.ready-action-panel .section-eyebrow {
  margin: 0 0 8px;
}
.ready-primary {
  width: 100%;
  min-height: 54px;
  color: #fff;
  background: var(--accent);
  font-size: 1.12rem;
  font-weight: 900;
}
.ready-primary.is-ready {
  background: var(--good);
}
.ready-action-panel #readyGuidance {
  margin: 8px 0;
  color: #115e59;
  font-weight: 700;
}
.lobby-secondary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lobby-secondary-actions button {
  min-height: 44px;
}
#startBtn.ready {
  background: var(--good);
}
#exitBtn {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
  margin-right: 8px;
}
.reconnect-lobby-card {
  border-color: var(--accent);
  background: #f0fdfa;
}
.public-lobby-action.reconnect {
  background: var(--good);
  color: #fff;
}
.lobby-summary {
  display: flex;
  align-items: center;
  gap: 7px 18px;
  flex-wrap: wrap;
  padding: 8px 11px;
  border: 1px solid #b8dcd5;
  border-radius: 10px;
  background: #f0fdfa;
}
.lobby-summary p {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
}
.lobby-summary-label {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lobby-summary code {
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff;
  color: #134e4a;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.copy-icon-btn {
  display: inline-grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  padding: 4px;
  border: 1px solid #99d5cb;
  background: #fff;
  color: #0f766e;
  font-size: 1.25rem;
  line-height: 1;
}
.player-roster,
.game-settings {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}
.player-roster {
  padding: 7px 9px;
}
.compact-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.compact-section-heading h2,
.compact-section-heading .tiny {
  margin: 0;
}
.compact-section-heading h2 {
  font-size: 1.15rem;
}
.player-slot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}
.player-slot-grid li {
  box-sizing: border-box;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 3px 6px;
}
.empty-player-slot {
  border-style: dashed;
  color: #6b7280;
  background: #f8fafc;
}
.pill.open-slot {
  border-color: #cbd5e1;
  background: #fff;
  color: #64748b;
}
.invite-panel {
  border: 1px solid #b9ddd8;
  border-radius: 10px;
  background: #f0fdfa;
  padding: 9px 11px;
}
.invite-label {
  display: block;
  margin-bottom: 5px;
  color: #115e59;
  font-weight: 700;
}
.invite-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.invite-row a {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #0f5f59;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#copyInviteBtn {
  min-height: 44px;
  background: var(--accent);
  color: #fff;
  flex: 0 0 auto;
}
#inviteStatus {
  margin: 5px 0 0;
}
#submitSentenceBtn, #submitDrawingBtn {
  background: var(--accent);
  color: #fff;
}
#playAgainBtn {
  background: var(--good);
  color: #fff;
  margin-bottom: 12px;
}
#saveSettingsBtn {
  background: var(--accent);
  color: #fff;
}
.game-settings {
  background: #f8fafc;
}
.settings-grid {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
}
.setting-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.15fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
}
.setting-row > label,
.setting-row > span {
  margin: 0;
  font-weight: 700;
}
.setting-row input[type="number"],
.setting-row select {
  margin: 0;
  padding: 7px 9px;
}
.setting-control {
  display: grid;
  grid-template-columns: minmax(5rem, 0.7fr) auto;
  align-items: center;
  gap: 7px;
}
.settings-read-only {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 7px;
}
.settings-read-only div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff;
}
.settings-read-only dt {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}
.settings-read-only dd {
  margin: 0;
  color: #134e4a;
  font-weight: 900;
  text-align: right;
}
.settings-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.settings-save-row .tiny {
  margin: 0;
}
.setting-explanation {
  margin: 4px 0 7px;
  padding: 6px 9px;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.9rem;
}
.check-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.check-label input {
  width: auto;
  margin: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  gap: 8px;
}
.pill {
  font-size: 0.82rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill.ready {
  background: var(--good-bg);
  color: var(--good);
  border-color: #b8e9ca;
}
.pill.not-ready {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: #d1d5db;
}
.pill.clickable {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.ready-toggle {
  box-sizing: border-box;
  min-width: 5.25rem;
  min-height: 2rem;
  padding: 0.25rem 0.6rem;
  border-width: 1px;
  border-radius: 999px;
  box-shadow: none;
  font-size: 0.8rem;
}
.ready-toggle.not-ready {
  background: #fff7f7;
  border-color: var(--bad);
}
.ready-toggle.ready {
  background: var(--good-bg);
  border-color: var(--good);
}
.pill.clickable:hover, .pill.clickable:focus {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(17, 24, 39, 0.18);
}
.current-player {
  border-color: var(--accent);
  background: #f0fdfa;
  box-shadow: inset 4px 0 0 var(--accent);
}
.ready-control-group {
  display: inline-flex;
  align-items: flex-end;
}
.player-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.declare-abandoned {
  color: var(--bad);
  border-color: #fecaca;
}
.error {
  color: #991b1b;
  font-weight: 600;
  min-height: 1.2em;
}
.hidden {
  display: none;
}
.sr-only,
.clipboard-fallback {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.countdown {
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.15rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.turn-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.turn-heading h2,
.turn-heading .section-eyebrow {
  margin-bottom: 4px;
}
.turn-meta {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.turn-timer {
  display: grid;
  min-width: 8.5rem;
  padding: 9px 11px;
  border: 2px solid #99d5cb;
  border-radius: 12px;
  background: #ecfdf5;
  color: #115e59;
  text-align: center;
}
.timer-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.timer-urgency {
  min-height: 1.1em;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}
.turn-timer.warning {
  border-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}
.turn-timer.critical {
  border-color: var(--bad);
  background: #fef2f2;
  color: #991b1b;
  animation: timer-pulse 650ms ease-in-out infinite alternate;
}
@keyframes timer-pulse {
  from { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.05); }
  to { box-shadow: 0 0 0 7px rgba(185, 28, 28, 0.22); }
}
.audio-cue-btn {
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 800;
}
.prompt-box {
  border: 1px dashed #c6c9bf;
  border-radius: 10px;
  background: #fafcf9;
  padding: 12px;
  margin-bottom: 12px;
}
.round-progress {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px;
  margin-bottom: 12px;
  background: #f8fafc;
}
.round-progress-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}
.round-progress li {
  background: #fff;
  min-height: 30px;
  margin: 0;
  padding: 4px 6px;
}
.round-progress ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 4px;
  margin-top: 6px;
}
#submittedNotice {
  margin-bottom: 12px;
  padding: 16px;
  border: 2px solid #99d5cb;
  border-radius: 10px;
  background: #f0fdfa;
  color: #115e59;
  text-align: center;
}
#submittedNotice p {
  margin: 0;
}
.prompt-image {
  max-width: 100%;
  border: 1px solid #c9d1d9;
  border-radius: 8px;
  background: #fff;
}
.tool-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
fieldset.tool-group {
  border: 0;
  padding: 0;
  margin: 0 0 10px;
}
fieldset.tool-group legend {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.tool-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #111827;
  font-size: 0.9rem;
  padding: 8px 10px;
}
.tool-btn.active {
  border-color: var(--accent);
  background: #ecfdf5;
  color: #065f46;
}
.swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 0;
}
.swatch.active {
  border-color: #111827;
}
.avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid #d1d5db;
  background: #ffffff;
  object-fit: cover;
}
.avatar.large {
  width: 36px;
  height: 36px;
}
.identity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.inline-btn {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
  font-size: 0.88rem;
  padding: 6px 10px;
}
.name-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#drawCanvas {
  width: 100%;
  max-width: 700px;
  border: 1px solid #c7cdd4;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  display: block;
  margin-bottom: 10px;
}
.turn-actions {
  display: flex;
  align-items: stretch;
  gap: 9px;
  flex-wrap: wrap;
}
.turn-actions button {
  min-height: 48px;
}
.help-me-btn {
  border: 2px solid #d97706;
  background: #fff7d6;
  color: #78350f;
  font-weight: 800;
}
.help-status {
  min-height: 1.2em;
  margin-top: 10px;
  color: #115e59;
  font-weight: 700;
}
.reveal-chain {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(12px, 3vw, 24px);
  margin-bottom: 14px;
  background: linear-gradient(145deg, #fffdf7, #f4fbf9);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.07);
}
.reveal-chain > .name-with-avatar {
  margin-bottom: 18px;
}
.reveal-summary {
  position: relative;
  overflow: hidden;
  border: 1px solid #f1d59a;
  border-radius: 18px;
  padding: clamp(20px, 5vw, 38px);
  margin: 18px 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.22), transparent 34%),
    linear-gradient(145deg, #fff8e8, #eefaf7 72%);
}
.completion-celebration {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.completion-celebration span {
  position: absolute;
  top: -16px;
  left: var(--celebration-x);
  width: 8px;
  height: 15px;
  border-radius: 2px;
  background: var(--celebration-color);
  opacity: 0;
  animation: celebration-fall 900ms cubic-bezier(0.2, 0.8, 0.4, 1) var(--celebration-delay) 1 both;
}
@keyframes celebration-fall {
  0% {
    transform: translate3d(0, -8px, 0) rotate(0deg);
    opacity: 0;
  }
  18% {
    opacity: 0.82;
  }
  100% {
    transform: translate3d(14px, 190px, 0) rotate(210deg);
    opacity: 0;
  }
}
.summary-eyebrow {
  margin: 0 0 8px;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.reveal-summary h3 {
  max-width: 650px;
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.05;
}
.reveal-summary > p:not(.summary-eyebrow) {
  max-width: 620px;
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.55;
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
  max-width: 660px;
  margin: 22px 0;
}
.summary-stats div {
  padding: 13px 10px;
  border: 1px solid rgba(154, 52, 18, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}
.summary-stats dt {
  color: #6b4f3b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.summary-stats dd {
  margin: 0 0 2px;
  color: #7c2d12;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 800;
}
.player-summary {
  max-width: 660px;
  margin-bottom: 18px;
}
.player-summary h4 {
  margin: 0 0 9px;
  color: #374151;
}
.player-summary ul {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.player-summary li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.88rem;
  font-weight: 700;
}
.player-reaction-totals {
  padding-left: 6px;
  color: #6b4f3b;
  font-size: 0.78rem;
  font-weight: 600;
  word-spacing: 3px;
}
.summary-highlight {
  max-width: 660px;
  margin: 20px 0;
  padding: 18px;
  border-left: 5px solid #0f766e;
  border-radius: 4px 14px 14px 4px;
  background: rgba(236, 253, 245, 0.86);
}
.summary-highlight h4 {
  margin: 2px 0 6px;
  color: #134e4a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}
.summary-highlight p:not(.summary-eyebrow) {
  margin: 0 0 12px;
  color: #3f5f5b;
}
.summary-highlight button {
  min-height: 44px;
  color: #fff;
  background: #0f766e;
}
#viewChainsBtn {
  min-height: 48px;
  margin-top: 8px;
  color: #fff;
  background: #9a3412;
  font-weight: 800;
}
.completion-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.completion-actions button {
  min-height: 48px;
}
#downloadGameExportBtn {
  color: #fff;
  background: #0f766e;
  font-weight: 800;
}
#gameExportStatus {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #115e59;
  font-weight: 700;
}
.back-to-summary {
  min-height: 44px;
  margin-top: 14px;
  color: #115e59;
  border: 1px solid #99d5cb;
  background: #ecfdf5;
  font-weight: 800;
}
.reveal-navigation {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr minmax(88px, auto);
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
}
.reveal-navigation button {
  min-height: 44px;
  color: #fff;
  background: var(--accent);
}
.reveal-navigation button:disabled {
  color: #4b5563;
  background: #e5e7eb;
}
#revealProgress {
  margin: 0;
  text-align: center;
  font-weight: 800;
  color: #115e59;
}
.reveal-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.reveal-page {
  width: 44px;
  height: 44px;
  padding: 0;
  color: #374151;
  background: #e5e7eb;
  font-weight: 700;
}
.reveal-page.active {
  color: #fff;
  background: var(--accent);
}
.reveal-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 22px;
}
.reveal-step:not(:last-child)::before {
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 19px;
  width: 2px;
  background: linear-gradient(#86c8bd, #e6c789);
  content: "";
}
.reveal-step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #0f766e;
  box-shadow: 0 0 0 2px #99d5cb;
  font-weight: 900;
}
.reveal-step[data-step-type="drawing"] .reveal-step-number {
  background: #b45309;
  box-shadow: 0 0 0 2px #f1d59a;
}
.reveal-step-body {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1e4df;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}
.reveal-step-body > .name-with-avatar {
  display: flex;
  margin: 0 0 10px;
  font-weight: 800;
}
.reveal-type {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.reveal-type-sentence {
  color: #115e59;
  background: #ccfbf1;
}
.reveal-type-drawing {
  color: #92400e;
  background: #fef3c7;
}
.reveal-sentence {
  margin: 8px 0 4px;
  color: #25312f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.45;
}
.reaction-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}
.reaction-button {
  display: inline-flex;
  min-width: 48px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 1.05rem;
}
.reaction-button[aria-pressed="true"] {
  border-color: #0f766e;
  background: #ccfbf1;
  box-shadow: inset 0 0 0 1px #0f766e;
}
.reaction-button:disabled {
  opacity: 0.48;
}
.reaction-count {
  min-width: 1ch;
  font-size: 0.78rem;
  font-weight: 800;
}
.reveal-step img {
  max-width: 100%;
  border: 1px solid #c7cdd4;
  border-radius: 8px;
  background: #fff;
  margin-top: 6px;
}
.reveal-drawing-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.reveal-drawing-button:focus-visible {
  outline: 3px solid #0f766e;
  outline-offset: 4px;
}
.drawing-dialog {
  width: min(94vw, 1100px);
  max-height: 94vh;
  padding: 14px;
  border: 0;
  border-radius: 16px;
  background: #fffdf7;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.38);
}
.drawing-dialog::backdrop {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(3px);
}
.drawing-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.drawing-dialog-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 3vw, 1.55rem);
}
.drawing-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.drawing-dialog-actions button {
  min-width: 76px;
  min-height: 48px;
}
#downloadDrawingBtn {
  color: #fff;
  background: #0f766e;
}
#closeDrawingDialogBtn {
  color: #fff;
  background: #374151;
}
.drawing-dialog > img {
  display: block;
  width: 100%;
  max-height: calc(94vh - 86px);
  object-fit: contain;
  border: 1px solid #d6d6d0;
  border-radius: 10px;
  background: #fff;
}
.instructions-dialog {
  width: min(92vw, 680px);
  max-height: 90vh;
  padding: clamp(16px, 4vw, 28px);
  border: 0;
  border-radius: 18px;
  color: var(--text);
  background: #fffdf7;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.38);
}
.instructions-dialog::backdrop {
  background: rgba(15, 23, 42, 0.72);
}
.instructions-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.instructions-heading h2,
.instructions-heading p {
  margin-bottom: 4px;
}
.instructions-lead {
  max-width: 34rem;
  color: #115e59;
  font-size: 1.05rem;
  font-weight: 800;
}
.instruction-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.instruction-steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  align-items: start;
  gap: 9px;
  margin: 0;
  padding: 12px;
  background: #fff;
}
.instruction-steps li > span {
  font-size: 1.75rem;
  line-height: 1;
}
.instruction-steps strong {
  color: #134e4a;
  font-size: 1.02rem;
}
.instruction-steps p {
  margin: 3px 0 0;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.35;
}
@media (min-width: 900px) {
  .selector-workspace {
    grid-template-columns: minmax(24rem, 1.35fr) minmax(17rem, 0.85fr);
    grid-template-areas:
      "games create"
      "games join";
  }
  body.game-active .wrap {
    max-width: 1280px;
    padding: 8px 16px 10px;
  }
  body.game-active .game-view-nav:not(.hidden) {
    top: 6px;
    margin-bottom: 6px;
  }
  body.game-active #gameCard,
  body.game-active #lobbyCard {
    padding: 12px 14px;
    margin-bottom: 0;
  }
  .lobby-card:not(.hidden) {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
    grid-template-areas:
      "summary summary"
      "players settings"
      "invite settings"
      "ready settings"
      "requests settings";
    gap: 8px 12px;
    align-items: start;
  }
  .lobby-summary { grid-area: summary; }
  .player-roster { grid-area: players; }
  .invite-panel { grid-area: invite; }
  .ready-action-panel { grid-area: ready; }
  .join-requests-panel { grid-area: requests; }
  #gameSettings { grid-area: settings; }
  .lobby-card .ready-action-panel,
  .lobby-card .join-requests-panel {
    margin: 0;
    padding: 9px 10px;
  }
  .lobby-card #settingsStatus {
    margin-bottom: 0;
  }
  body.game-active .ready-primary {
    min-height: 44px;
  }
  body.game-active .ready-action-panel .section-eyebrow,
  body.game-active .ready-action-panel #readyGuidance,
  body.game-active #inviteStatus {
    margin: 4px 0;
  }
  body.game-active #gameCard .turn-meta,
  body.game-active #gameCard .prompt-box,
  body.game-active #gameCard .round-progress {
    margin-bottom: 7px;
  }
  body.game-active #gameCard .prompt-box,
  body.game-active #gameCard .round-progress {
    padding: 8px 10px;
  }
  body.game-active #drawingPanel:not(.hidden) {
    display: grid;
    grid-template-columns: minmax(0, 700px) minmax(17rem, 1fr);
    grid-template-rows: auto auto auto 1fr;
    gap: 7px 14px;
    align-items: start;
  }
  body.game-active #drawingPanel > fieldset,
  body.game-active #drawingPanel > .tool-row,
  body.game-active #drawingPanel > .turn-actions {
    grid-column: 2;
    margin-bottom: 0;
  }
  body.game-active #drawingPanel > fieldset:nth-of-type(1) { grid-row: 1; }
  body.game-active #drawingPanel > fieldset:nth-of-type(2) { grid-row: 2; }
  body.game-active #drawingPanel > .tool-row { grid-row: 3; }
  body.game-active #drawingPanel > .turn-actions { grid-row: 4; }
  body.game-active #drawCanvas {
    grid-column: 1;
    grid-row: 1 / span 4;
    margin-bottom: 0;
  }
  body.game-active #helpStatus {
    margin: 5px 0;
  }
}
@media (min-width: 600px) and (max-width: 899px) {
  .selector-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "games create"
      "games join";
  }
}
@media (max-width: 899px) {
  .player-identity {
    grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 1.4fr);
  }
  .identity-row,
  .optional-sign-in {
    align-self: center;
  }
}
@media (max-width: 520px) {
  .wrap {
    margin: 8px auto;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .card {
    padding: 13px;
    border-radius: 12px;
  }
  body.game-active .wrap {
    margin-top: 0;
    padding-top: max(5px, env(safe-area-inset-top));
  }
  body.game-active .game-view-nav:not(.hidden) {
    top: max(4px, env(safe-area-inset-top));
    margin-bottom: 7px;
  }
  body.game-active #gameCard {
    padding: 11px;
    margin-bottom: 0;
    border-radius: 10px;
  }
  .turn-heading {
    align-items: stretch;
    gap: 8px;
  }
  .turn-heading > div:first-child {
    min-width: 0;
    flex: 1;
  }
  .turn-heading h2 {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }
  .turn-timer {
    min-width: 6.9rem;
    padding: 7px 8px;
  }
  .countdown {
    font-size: 1.65rem;
  }
  .turn-meta {
    margin-bottom: 8px;
  }
  #promptBox {
    margin-bottom: 8px;
    padding: 9px;
  }
  #sentenceInput {
    min-height: 8rem;
  }
  .turn-actions {
    display: grid;
    grid-template-columns: minmax(7rem, auto) 1fr;
  }
  .turn-actions #submitSentenceBtn,
  .turn-actions #submitDrawingBtn {
    font-weight: 900;
  }
  #drawingPanel fieldset.tool-group {
    margin-bottom: 5px;
  }
  #drawingPanel .tool-row {
    gap: 6px;
    margin-bottom: 6px;
  }
  #drawCanvas {
    max-height: 43vh;
    margin-bottom: 7px;
  }
  .round-progress {
    margin: 10px 0 0;
    padding: 8px;
  }
  .instruction-steps {
    grid-template-columns: 1fr;
  }
  .site-header {
    padding: 9px 10px;
  }
  .site-brand-line {
    gap: 7px;
  }
  .site-brand-line h1 {
    font-size: 1.25rem;
  }
  .site-brand-line .brand-expansion {
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
  }
  .site-brand-line .muted {
    display: none;
  }
  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
  }
  .site-nav-btn {
    min-width: 0;
    min-height: 38px;
    padding: 7px 4px;
    font-size: 0.82rem;
  }
  .management-heading {
    align-items: stretch;
    flex-direction: column;
  }
  #managementLockBtn {
    width: 100%;
  }
  .player-identity {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .avatar-picker,
  .optional-sign-in {
    grid-column: 1 / -1;
  }
  .selector-action-card .muted,
  .selector-action-card .tiny {
    min-height: 0;
  }
  .management-area-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .management-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .management-log-filters {
    grid-template-columns: 1fr;
  }
  .management-query-filters {
    grid-template-columns: 1fr;
  }
  .management-metric-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .management-metric-heading select {
    width: 100%;
  }
  .management-threshold-grid {
    grid-template-columns: minmax(7rem, 1fr) repeat(2, minmax(4.5rem, 1fr));
    gap: 8px;
  }
  .lobby-summary {
    gap: 6px 12px;
  }
  .lobby-summary > p:first-child {
    flex: 1 1 100%;
  }
  .setting-row {
    grid-template-columns: minmax(7rem, 0.8fr) minmax(9rem, 1.2fr);
  }
  .setting-control {
    grid-template-columns: minmax(4.5rem, 0.7fr) auto;
  }
  .settings-read-only {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .setting-row input[type="number"],
  .setting-row select {
    margin: 0;
  }
  #revealCard {
    overflow: hidden;
  }
  .reveal-summary {
    margin: 12px 0;
    padding: 18px 14px;
    border-radius: 14px;
  }
  .reveal-summary h3 {
    font-size: clamp(1.75rem, 10vw, 2.35rem);
  }
  .summary-stats {
    gap: 7px;
  }
  .summary-stats div {
    padding: 11px 8px;
  }
  #viewChainsBtn,
  #viewHighlightBtn,
  .back-to-summary,
  #downloadGameExportBtn,
  #playAgainBtn {
    width: 100%;
    min-height: 48px;
  }
  .reveal-chain {
    padding: 12px 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .reveal-step {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }
  .reveal-step-number {
    width: 32px;
    height: 32px;
  }
  .reveal-step:not(:last-child)::before {
    top: 30px;
    left: 15px;
  }
  .reveal-step-body > .name-with-avatar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .reveal-type {
    margin-left: 0;
  }
  .reveal-step-body {
    padding: 10px;
  }
  .reveal-navigation button,
  .reveal-page {
    min-width: 48px;
    min-height: 48px;
  }
  .reveal-sentence {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 420px) {
  .summary-stats {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }
  .reveal-navigation {
    grid-template-columns: 1fr 1fr;
  }
  #revealProgress {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}
.build-footer {
  max-width: 920px;
  margin: -16px auto 20px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  button, .pill.clickable {
    transition: none;
  }
  .completion-celebration {
    display: none;
  }
  .turn-timer.critical {
    animation: none;
  }
}
