@import url("https://fonts.googleapis.com/css2?family=Sono:wght@400;500;600;700&family=Zen+Maru+Gothic:wght@400;500;700&display=swap");
:root {
  --logo-shell: #fffdf7;
  --logo-bright: #0f5bd8;
  --logo-mid: #0f5bd8;
  --logo-deep: #151515;
  --status-online: #0f5bd8;
  --status-pending: #151515;
  --status-error: #d81e5b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  color: #151515;
  background: #edf5ff;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

::selection {
  background: rgba(15, 91, 216, 0.16);
}

p,
h1,
h2,
h3,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
}

@keyframes stage-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes timeline-item-pop {
  0% {
    opacity: 0;
    transform: translateY(0.7rem) scale(0.97);
  }
  70% {
    opacity: 1;
    transform: translateY(-0.08rem) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes timeline-system-slide {
  from {
    opacity: 0;
    transform: translateX(-0.6rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes card-modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes card-rise-in {
  0% {
    opacity: 0;
    transform: translateY(2.2rem) scale(0.88) rotate(-4deg);
  }
  65% {
    opacity: 1;
    transform: translateY(-0.3rem) scale(1.01) rotate(0.6deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}
@keyframes card-settle-down {
  from {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translateY(2rem) scale(0.9) rotate(5deg);
  }
}
@keyframes card-play-burst {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: translateY(-0.8rem) scale(1.04) rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: translate(110vw, -18vh) scale(0.74) rotate(12deg);
  }
}
@keyframes card-play-flare {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  35% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}
.app-shell {
  min-height: 100vh;
  padding: 2.5rem 1.5rem 4rem;
}
.app-shell > .app-brand,
.app-shell > .app-status {
  max-width: 42rem;
  margin-inline: auto;
}

.app-shell-frame {
  max-width: 82rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

.app-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

.app-header {
  min-width: 0;
}

.app-header.landing {
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  animation: stage-enter 220ms ease both;
}

.app-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
}

.brand-mark {
  width: clamp(4.25rem, 8vw, 5.4rem);
  height: auto;
  flex: none;
}

.app-title {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 700;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.app-header.game {
  position: static;
}

.app-route-meta,
.action-strip-summary,
.timeline-row-detail,
.app-status-strip-context,
.group-count-button,
.app-status:not(.app-header-status),
.mobile-panel-toggle-button,
.secondary-action,
.location-stat-label {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 500;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
}

.app-route-meta,
.section-note,
.landing-copy,
.now-bar-body,
.task-guide-body,
.location-note,
.location-detail,
.question-card-detail,
.system-card-body,
.chat-body,
.name-notes,
.name-notes p {
  color: #39404a;
}

.section-title,
.landing-title,
.now-bar-title,
.task-guide-title,
.winner-banner-name,
.step-title,
.chat-author,
.system-card-title,
.score-name,
.award-recipient,
.location-name,
.participant-name {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
}

.timeline-row-detail,
.location-pill,
.score-pill,
.step-number,
.location-stat-value {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.app-status-strip {
  border-radius: 0.5rem;
  background: rgba(255, 253, 247, 0.94);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem 1.25rem;
  animation: stage-enter 220ms ease both;
}

.app-status-strip-copy {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
}

.app-header.game {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.app-status-strip-context {
  max-width: 34rem;
  font-size: 0.875rem;
  letter-spacing: 0.015em;
  line-height: 1.35;
  color: #39404a;
}

.game-header-menu-toggle {
  min-width: 0;
}

.game-header-menu {
  border-radius: 0.5rem;
  background: rgba(255, 253, 247, 0.96);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  align-self: end;
  width: min(100%, 18rem);
  padding: 0.75rem;
}

.app-status-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}

.app-status-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.app-status:not(.app-header-status) {
  border-radius: 0.5rem;
  background: rgba(255, 253, 247, 0.94);
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 0.78125rem;
  line-height: 1.45;
}

.app-status.soft:not(.app-header-status) {
  background: #fcfbf7;
}

.app-status.hard:not(.app-header-status) {
  background: #fffdf7;
}

.app-header-status {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: #dcebff;
  color: #39404a;
  font-size: 0.78125rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  width: fit-content;
}

.app-status.timer {
  gap: 0.25rem;
}

.app-status-timer-label {
  opacity: 0.7;
}

.app-status-dot {
  inline-size: 0.6rem;
  block-size: 0.6rem;
  border-radius: 50%;
  background: var(--status-pending);
  flex: none;
}

.app-header-status.online {
  background: #dcebff;
  color: #073a8b;
}
.app-header-status.online .app-status-dot {
  background: var(--status-online);
}

.app-header-status.pending {
  background: #dcebff;
}
.app-header-status.pending .app-status-dot {
  background: var(--status-pending);
}

.app-header-status.offline,
.app-header-status.error {
  background: #ffd9e6;
  color: #151515;
}
.app-header-status.offline .app-status-dot,
.app-header-status.error .app-status-dot {
  background: var(--status-error);
}

.app-status.error:not(.app-header-status) {
  background: #ffe6ec;
}

.app-status.network:not(.app-header-status),
.app-status.geolocation:not(.app-header-status),
.app-status.loading:not(.app-header-status) {
  background: #e7f1fc;
}

.app-status.lost:not(.app-header-status),
.app-status.blocked:not(.app-header-status) {
  background: #ffe7ed;
}

.app-status.loading:not(.app-header-status) {
  width: fit-content;
}

.landing-scene {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.88fr);
  gap: 4rem;
  align-items: start;
}

.landing-intro,
.landing-steps {
  animation: stage-enter 240ms ease both;
}

.landing-intro {
  max-width: 38rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

.landing-title {
  font-size: clamp(2.35rem, 5vw, 3.65rem);
  letter-spacing: -0.07em;
  line-height: 0.9;
  max-width: 8ch;
}

.landing-copy {
  max-width: 28rem;
  font-size: 1.08rem;
  line-height: 1.55;
}

.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  padding-top: 1rem;
}

.section-title {
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.step-list {
  list-style: none;
}

.step-item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-block: 1rem;
}
.step-item + .step-item {
  padding-top: 1.25rem;
}

.step-item > .step-note {
  grid-column: 2;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.2rem;
  block-size: 2.2rem;
  border-radius: 0.375rem;
  background: #fffdf7;
  color: #073a8b;
  font-size: 0.78125rem;
  line-height: 1;
}

.step-title {
  font-size: 1.02rem;
}

.step-note {
  color: #39404a;
}

.primary-action {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.1rem;
  border-radius: 0.5rem;
  background: #151515;
  color: #fffdf7;
  font-size: 0.78125rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.primary-action:hover:not(:disabled) {
  transform: translateY(-1px);
}
.primary-action:focus-visible {
  filter: brightness(0.97);
}
.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.secondary-action {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  color: #151515;
  font-size: 0.78125rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-decoration-line: underline;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 140ms ease, opacity 140ms ease;
}
.secondary-action:hover:not(:disabled) {
  color: #073a8b;
}
.secondary-action:focus-visible {
  opacity: 0.78;
}
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.game-scene {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

.game-scene.cue-chat .now-bar,
.game-scene.cue-question .now-bar,
.game-scene.cue-question-action .now-bar {
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.game-scene.cue-chat .now-bar {
  box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.16);
}

.game-scene.cue-question .now-bar {
  box-shadow: 0 0 0 3px rgba(255, 148, 63, 0.18);
}

.game-scene.cue-question-action .now-bar {
  box-shadow: 0 0 0 4px rgba(255, 88, 88, 0.26);
  transform: translateY(-1px);
}

.game-phase {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: #dcebff;
  color: #151515;
  font-size: 0.78125rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.game-phase.transition,
.game-phase.lobby {
  background: #dcebff;
}

.game-phase.warning {
  background: #ffd9e6;
}

.game-phase.paused,
.game-phase.neutral {
  background: #eef2f6;
  color: #39404a;
}

.game-phase.searching,
.question-status-pill.answered {
  background: #dcebff;
  color: #073a8b;
}

.game-phase.hiding,
.question-status-pill.waiting {
  background: #fffdf7;
}

.game-phase.postgame {
  background: #ffd84d;
  color: #4f3600;
}

.game-overview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.now-bar,
.task-guide {
  max-width: 44rem;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  animation: stage-enter 240ms ease both;
}

.now-bar-title,
.task-guide-title {
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  letter-spacing: -0.06em;
  line-height: 0.93;
  max-width: 13ch;
}

.task-guide-body,
.action-strip-summary {
  max-width: 42rem;
}

.action-strip {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  padding-block: 0.5rem;
}

.game-controls,
.question-actions,
.award-actions,
.location-row,
.score-row,
.award-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
}

.mobile-panel-toggle {
  display: none;
}

.game-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.game-primary {
  order: 1;
  min-width: 0;
  width: 100%;
}
.game-primary > * + * {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.game-secondary {
  order: 2;
  width: 100%;
}

.participants-panel,
.content-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  animation: stage-enter 240ms ease both;
  width: 100%;
}

.group-surface-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.group-surface-footer {
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.group-surface-invite {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.participant-list,
.chat-list {
  list-style: none;
}

.participant-item,
.chat-item {
  padding-block: 1rem;
}

.participant-item + .participant-item,
.chat-item + .chat-item {
  padding-top: 1.25rem;
}

.participant-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.participant-summary,
.location-summary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.participant-summary > header,
.participant-summary > p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

.participant-summary > p {
  margin: 0;
}

.participant-name {
  font-size: 1.04rem;
}

.participant-pill,
.question-status-pill,
.location-pill,
.score-pill,
.award-pill {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: #dcebff;
  color: #151515;
  font-size: 0.78125rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.participant-pill.self {
  background: #151515;
  color: #fffdf7;
}

.participant-pill.role.hider,
.participant-pill.presence.connected,
.location-pill {
  background: #dcebff;
  color: #073a8b;
}

.participant-pill.role.sardine {
  background: #ffd84d;
  color: #4f3600;
}

.participant-pill.presence.disconnected,
.question-status-pill.vetoed {
  background: #ffd9e6;
  color: #151515;
}

.participant-item.location {
  align-items: stretch;
}

.location-card {
  border-radius: 0.5rem;
  background: #fafaf8;
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.location-row.heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.location-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.location-stat {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: stretch;
}

.location-stat-label {
  font-size: 0.78125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #39404a;
}

.location-stat-value {
  font-size: 0.875rem;
  line-height: 1.3;
  color: #151515;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chat-item {
  display: grid;
  grid-template-columns: 0.75rem minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0.5rem;
}

.timeline-marker {
  display: block;
  inline-size: 0.75rem;
  block-size: 0.75rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #151515;
}

.timeline-marker.chat {
  background: #151515;
}

.timeline-marker.question {
  background: #0f5bd8;
}

.timeline-marker.system,
.timeline-marker.result {
  background: #151515;
}

.chat-author {
  font-size: 1rem;
}

.chat-body,
.system-card-title,
.system-card-body,
.question-card-body,
.question-card-detail {
  min-width: 0;
}

.chat-item.system-alert {
  border-radius: 0.5rem;
  background: #ffe7ed;
  padding: 1rem;
}
.chat-item.system-alert .timeline-marker {
  background: #d81e5b;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  height: 100%;
  align-items: stretch;
}

.chat-input,
.name-input {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 500;
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  color: #151515;
  transition: background-color 140ms ease;
}
.chat-input::placeholder,
.name-input::placeholder {
  color: #70757a;
}
.chat-input:focus-visible,
.name-input:focus-visible {
  filter: brightness(0.98);
}

.timeline-row-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.question-status-pill {
  background: #dcebff;
  color: #39404a;
}

.winner-banner {
  border-radius: 0.5rem;
  background: #ffe27d;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.winner-banner-name {
  font-size: 1.35rem;
  letter-spacing: -0.05em;
}

.winner-banner-note {
  color: #39404a;
}

.participant-item.score-item {
  flex-direction: column;
  align-items: stretch;
}

.score-row {
  width: 100%;
  justify-content: space-between;
}

.score-pill {
  background: #151515;
  color: #fffdf7;
}

.award-pill {
  background: #ffd84d;
  color: #4f3600;
}

.award-actions {
  padding-top: 0.25rem;
}

.name-panel {
  border-radius: 0.5rem;
  background: rgba(255, 253, 247, 0.96);
  max-width: 38rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  animation: stage-enter 240ms ease both;
}

.name-panel.warning {
  background: #ffe7ec;
}

.name-panel.resync {
  background: #e9f2fc;
}

.name-notes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

@media (max-width: 72rem) {
  .landing-scene {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
@media (max-width: 56rem) {
  .game-layout {
    gap: 1.5rem;
  }
  .mobile-panel-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
  }
  .mobile-panel-toggle-button {
    appearance: none;
    padding: 0 0 0.55rem;
    background: transparent;
    color: #39404a;
    font-size: 0.78125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 140ms ease;
  }
  .mobile-panel-toggle-button:focus-visible {
    opacity: 0.78;
  }
  .mobile-panel-toggle-button.active {
    color: #151515;
  }
  .game-layout .mobile-panel {
    display: none;
  }
  .game-layout.show-timeline .timeline-panel,
.game-layout.show-map .map-panel,
.game-layout.show-hand .hand-panel,
.game-layout.show-results .results-panel {
    display: block;
  }
  .participants-panel > .section-title,
.participants-panel > .section-note,
.participants-panel > .content-section-header,
.content-section > .section-title,
.content-section > .section-note,
.content-section > .content-section-header {
    max-width: 100%;
  }
}
@media (max-width: 40rem) {
  .app-shell {
    padding-inline: 1rem;
    padding-top: 1.5rem;
  }
  .app-status-strip {
    grid-template-columns: 1fr;
    padding-inline: 1rem;
  }
  .app-status-strip-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .app-title {
    font-size: clamp(2rem, 14vw, 3.5rem);
  }
  .landing-title {
    max-width: none;
  }
  .location-stats {
    grid-template-columns: 1fr;
  }
  .game-controls,
.participant-item,
.location-row,
.score-row,
.chat-composer {
    align-items: stretch;
  }
  .game-controls,
.participant-item,
.location-row,
.score-row {
    flex-direction: column;
  }
  .chat-composer {
    grid-template-columns: 1fr;
  }
  .landing-primary-action,
.primary-action {
    width: 100%;
  }
  .chat-item {
    grid-template-columns: 0.75rem minmax(0, 1fr);
    column-gap: 0.75rem;
  }
  .timeline-marker {
    inline-size: 0.7rem;
    block-size: 0.7rem;
    margin-top: 0.4rem;
  }
  .name-panel {
    padding: 1.5rem;
  }
}
:root {
  --concept-hider: #ff5f3d;
  --concept-hider-soft: #ffd9cc;
  --concept-seeker: #005fcc;
  --concept-seeker-soft: #d6e8ff;
  --concept-sardine: #008b63;
  --concept-sardine-soft: #cdf5e4;
  --concept-question: #ffcf33;
  --concept-question-soft: #fff0a6;
  --concept-squeeze: #e23d54;
  --concept-squeeze-soft: #ffd7e0;
  --concept-chat: #465a7a;
  --concept-chat-soft: #e1e8f2;
  --concept-finish: #8d5a00;
  --concept-finish-soft: #ffe09d;
  --purpose-system: #151515;
  --purpose-start: var(--concept-question);
  --purpose-info: var(--concept-seeker);
  --purpose-info-soft: var(--concept-seeker-soft);
  --purpose-hider: var(--concept-hider);
  --purpose-hider-soft: var(--concept-hider-soft);
  --purpose-question: var(--concept-question);
  --purpose-question-soft: var(--concept-question-soft);
  --purpose-success: var(--concept-sardine);
  --purpose-success-soft: var(--concept-sardine-soft);
  --purpose-danger: var(--concept-squeeze);
  --purpose-danger-soft: var(--concept-squeeze-soft);
  --purpose-chat: var(--concept-chat);
  --purpose-chat-soft: var(--concept-chat-soft);
  --purpose-finish: var(--concept-finish);
  --purpose-finish-soft: var(--concept-finish-soft);
}

body {
  --bottom-panel-selector-height: 4.65rem;
  --chat-composer-height: clamp(4.25rem, 11dvh, 5.25rem);
  background: #edf5ff;
  overflow: hidden;
}

.app-shell {
  height: 100dvh;
  min-height: 0;
  padding: max(1.25rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
  overflow: hidden;
}

.app-shell-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-width: 76rem;
  height: 100%;
  gap: 1rem;
}

.app-stage {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.game-scene {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  gap: 1rem;
  overflow: hidden;
}

.app-brand {
  gap: 0.75rem;
}

.brand-mark {
  width: clamp(3rem, 8vw, 4.25rem);
}

.app-title {
  letter-spacing: -0.08em;
}

.primary-action,
.secondary-action,
.choice-action,
.mobile-panel-toggle-button {
  min-height: 3.1rem;
  border-radius: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}

.primary-action {
  background: #151515;
}

.primary-action:disabled {
  background: #151515;
  color: #fffdf7;
  opacity: 1;
}

.secondary-action,
.choice-action {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  color: #151515;
  font-size: 0.78125rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 140ms ease, background-color 140ms ease;
}
.secondary-action:hover:not(:disabled),
.choice-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #fffaf0;
}
.secondary-action:disabled,
.choice-action:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.choice-action.yes {
  background: var(--purpose-success-soft);
  color: #006b4d;
}

.choice-action.no {
  background: var(--purpose-danger-soft);
  color: #9b1f32;
}

.chat-input,
.name-input {
  min-height: 3.25rem;
  border-radius: 0.5rem;
  background: #fffdf7;
}

.app-header.game {
  position: static;
  top: auto;
}

.app-status-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: var(--purpose-system);
  color: #fffdf7;
}

.app-status-strip-context {
  color: #fffdf7;
  font-size: 0.95rem;
  font-weight: 700;
}

.app-status-strip-actions {
  gap: 0.5rem;
  align-items: center;
}

.app-status-strip-actions .invite-action-row {
  margin-right: 0.25rem;
}

.app-header-status,
.game-phase,
.participant-pill,
.question-status-pill,
.location-pill,
.score-pill,
.award-pill,
.group-count-pill {
  border-radius: 999px;
}

.app-header-status,
.game-phase,
.participant-pill,
.question-status-pill,
.location-pill,
.score-pill,
.award-pill,
.group-count-pill {
  border-radius: 0.5rem;
}

.game-phase.hiding,
.participant-pill.role.hider,
.participant-avatar.hider {
  background: var(--purpose-hider-soft);
  color: #9c2f1b;
}

.game-phase.searching,
.participant-pill.role.seeker,
.participant-avatar.seeker {
  background: var(--purpose-info-soft);
  color: #084d91;
}

.participant-pill.role.sardine,
.participant-avatar.sardine {
  background: var(--purpose-success-soft);
  color: #006b4d;
}

.game-phase.postgame,
.award-pill {
  background: var(--purpose-finish-soft);
  color: #75500a;
}

.app-status:not(.app-header-status),
.name-panel,
.participants-panel,
.content-section,
.winner-banner,
.location-card,
.now-bar,
.task-guide,
.action-strip {
  border-radius: 0.5rem;
}

.landing-scene {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.landing-intro {
  max-width: none;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: var(--purpose-start);
  color: #151515;
  gap: 1.25rem;
}

.landing-intro .app-status:not(.app-header-status) {
  background: #fffdf7;
  color: #151515;
  padding: 0.7rem 0.85rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.landing-intro .app-status.network:not(.app-header-status),
.landing-intro .app-status.geolocation:not(.app-header-status),
.landing-intro .app-status.loading:not(.app-header-status) {
  background: var(--purpose-info);
  color: #fffdf7;
}

.landing-intro .app-status.error:not(.app-header-status),
.landing-intro .app-status.lost:not(.app-header-status),
.landing-intro .app-status.blocked:not(.app-header-status) {
  background: var(--purpose-danger);
  color: #fffdf7;
}

.landing-title {
  max-width: 10ch;
  font-size: clamp(2.55rem, 7vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.landing-copy {
  max-width: 34rem;
  color: #151515;
  font-size: 0.98rem;
}

.landing-steps {
  padding: 0;
  background: transparent;
  color: #151515;
}

.step-list {
  display: grid;
  gap: 0.75rem;
}

.step-item {
  grid-template-columns: 2.8rem minmax(0, 1fr);
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  color: #151515;
}
.step-item + .step-item {
  padding-top: 1rem;
}

.step-item:nth-child(1) {
  background: var(--purpose-info);
  color: #fffdf7;
}

.step-item:nth-child(2) {
  background: var(--purpose-hider);
  color: #151515;
}

.step-item:nth-child(3) {
  background: var(--purpose-question);
  color: #151515;
}

.step-item:nth-child(1) .step-note {
  color: #fffdf7;
}

.step-item:nth-child(2) .step-note,
.step-item:nth-child(3) .step-note {
  color: #30130b;
}

.step-item:nth-child(1) .step-number {
  background: #fffdf7;
  color: #151515;
}

.step-number {
  border-radius: 999px;
  background: #151515;
  color: #fffdf7;
}

.step-title {
  font-size: 0.98rem;
}

.step-note {
  max-width: 36rem;
  font-size: 0.94rem;
  line-height: 1.48;
}

.game-overview {
  gap: 0.75rem;
}

.game-floating-chrome {
  position: static;
  top: auto;
  z-index: auto;
  display: grid;
  gap: 0.5rem;
  width: 100%;
  transition: transform 180ms ease, opacity 180ms ease;
}

.now-bar,
.task-guide {
  max-width: none;
  padding: 1.25rem;
  background: var(--purpose-info);
  color: #fffdf7;
}

.now-bar {
  position: static;
  top: auto;
}

.task-guide {
  position: static;
  top: auto;
}

.now-bar-title,
.task-guide-title {
  max-width: none;
  font-size: clamp(1.6rem, 8vw, 3rem);
}

.now-bar-body,
.task-guide-body {
  max-width: 42rem;
  color: #fffdf7;
}

.now-bar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.75rem;
}

.action-dock {
  position: static;
  top: auto;
  z-index: auto;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--purpose-question-soft);
}

.action-strip {
  padding: 0;
  background: transparent;
  gap: 0.5rem;
}

.action-strip-summary {
  color: #151515;
  font-size: 0.98rem;
  font-weight: 700;
}

.now-bar .action-strip-summary {
  color: #fffdf7;
}

.game-controls,
.question-actions,
.award-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}
.game-controls::-webkit-scrollbar,
.question-actions::-webkit-scrollbar,
.award-actions::-webkit-scrollbar {
  display: none;
}

.game-controls > *,
.question-actions > *,
.award-actions > * {
  flex: 0 0 auto;
}

.mobile-panel-toggle {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--purpose-question);
  touch-action: pan-y;
}

.mobile-panel-toggle-button {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 700;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  background: transparent;
  color: #151515;
  font-size: 0.78125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-panel-toggle-button.active {
  background: #151515;
  color: #fffdf7;
}

.mobile-panel-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  min-height: 1.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.7rem;
  color: inherit;
}

.game-layout {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.game-layout .mobile-panel {
  display: block;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(calc(var(--active-mobile-panel-index, 0) * -100%));
  transition: transform 240ms ease, opacity 180ms ease;
}

.game-layout .mobile-panel:not(.available) {
  display: none;
}

.game-layout.show-timeline .timeline-panel,
.game-layout.show-map .map-panel,
.game-layout.show-hand .hand-panel,
.game-layout.show-results .results-panel,
.game-layout.show-settings .settings-panel,
.game-layout.show-group .group-panel {
  pointer-events: auto;
}

.game-primary {
  order: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 1rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.game-secondary {
  order: 2;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.participants-panel,
.content-section {
  padding: 1rem;
  background: #fffdf7;
  border-radius: 0.5rem;
}

.participants-panel {
  background: var(--purpose-info-soft);
}

.mobile-panel > .participants-panel,
.mobile-panel > .content-section:not(.compose-dock):not(.timeline-section) {
  min-height: 100%;
}

.map-panel,
.seeker-map-section {
  display: flex;
  align-items: stretch;
}

.content-section.timeline-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0.75rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.content-section.compose-dock,
.content-section.question-compose {
  background: #fffaf0;
}

.content-section.compose-dock {
  position: static;
  display: grid;
  align-items: stretch;
  gap: 0.75rem;
  height: var(--chat-composer-height);
  max-height: 5.25rem;
  padding: 0.75rem;
  overflow: hidden;
}

.group-surface-presence {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.group-count-pill {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(255, 253, 247, 0.9);
  color: #39404a;
  font-size: 0.78125rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.group-count-button {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.35;
  transition: opacity 120ms ease;
}
.group-count-button:hover {
  opacity: 0.75;
}
.group-count-button:focus-visible {
  opacity: 0.72;
}

.group-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.group-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.group-overlay-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  max-height: 100dvh;
  overflow-y: auto;
  background: #fffdf7;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
}

.group-overlay-header {
  display: flex;
  justify-content: flex-end;
}

.group-overlay-close {
  min-height: unset;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
}

.seeker-map-section {
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.seeker-map-tile {
  flex: 1 1 auto;
  min-height: 100%;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
}

.content-section.timeline-section {
  position: relative;
}

.chat-list.timeline-list {
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 0.5rem;
}

.timeline-empty-state {
  padding: 0;
}

.timeline-empty-message {
  padding: 0.5rem 0.25rem;
  color: #39404a;
}

.timeline-jump-action {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  padding: 0.55rem 0.8rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  text-decoration: none;
}

.timeline-bottom-sentinel {
  padding: 0;
  min-height: 0.1rem;
}

.invite-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.invite-feedback {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 500;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.78125rem;
  color: #39404a;
}

.invite-feedback.copied {
  color: #006b4d;
}

.invite-feedback.failed {
  color: #9b1f32;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.7rem;
  border: none;
  border-radius: 0.5rem;
  background: #fffdf7;
  color: #151515;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease;
}
.icon-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #fffaf0;
}
.icon-action:focus-visible {
  filter: brightness(0.97);
}

.icon-action .fa-solid,
.secondary-action .fa-solid,
.settings-avatar.placeholder .fa-solid {
  font-size: 1rem;
  line-height: 1;
}

.app-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.icon-action .app-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.settings-menu-toggle {
  background: rgba(255, 255, 255, 0.16);
  color: #fffdf7;
}

.settings-menu-toggle.open {
  background: #fffdf7;
  color: #151515;
}

.landing-steps {
  gap: 0.75rem;
}

.ui-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
}

.ui-hint.landing {
  background: #fffdf7;
}

.ui-hint.question {
  background: var(--purpose-question-soft);
}

.ui-hint.cards {
  background: var(--purpose-info-soft);
}

.ui-hint.inline {
  margin-top: 0.5rem;
  background: #fffaf0;
}

.ui-hint-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: stretch;
  min-width: 0;
}

.ui-hint-title {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.95rem;
  line-height: 1.2;
}

.ui-hint-body {
  color: #39404a;
  font-size: 0.875rem;
  line-height: 1.45;
}

.ui-hint-dismiss {
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.55rem;
  background: rgba(21, 21, 21, 0.05);
}

.game-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.game-panel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.game-panel-title {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: clamp(1.08rem, 2vw, 1.22rem);
}

.game-panel-body {
  display: grid;
  gap: 1rem;
  align-content: start;
  overflow-y: auto;
  padding-bottom: 1rem;
}

.settings-section {
  display: grid;
  gap: 1rem;
}

.settings-section {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
}

.settings-section.profile-section {
  background: #fcfbf7;
}

.settings-section.game-controls-section,
.settings-section.rules-section {
  background: #fbfbf8;
}

.settings-section-title {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.98rem;
}

.settings-avatar-row,
.settings-name-row,
.settings-rules-row {
  display: grid;
  gap: 0.75rem;
}

.settings-avatar-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.settings-avatar {
  inline-size: 4rem;
  block-size: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #151515;
  color: #fffdf7;
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 700;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
}

.settings-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #151515;
  color: #fffdf7;
}

.settings-avatar-label {
  justify-self: start;
}

.settings-avatar-input {
  display: none;
}

.settings-rules-label {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.78125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-rules-select {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 500;
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  color: #151515;
  transition: background-color 140ms ease;
}
.settings-rules-select::placeholder {
  color: #70757a;
}
.settings-rules-select:focus-visible {
  filter: brightness(0.98);
}

.permission-toggle-list {
  display: grid;
  gap: 0.75rem;
}

.permission-toggle {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
  color: #151515;
  font-size: 0.78125rem;
}

.permission-toggle.on {
  background: var(--purpose-success-soft);
  color: #006b4d;
}

.permission-toggle.blocked {
  background: var(--purpose-danger-soft);
  color: #9b1f32;
}

.permission-toggle.unsupported {
  background: #eef2f6;
  color: #39404a;
}

.now-bar,
.task-guide {
  padding: 1rem 1.25rem;
  gap: 0.5rem;
}

.now-bar-title,
.task-guide-title {
  font-size: clamp(1.35rem, 6vw, 2.3rem);
}

.now-bar-body,
.task-guide-body {
  font-size: 0.875rem;
  line-height: 1.45;
}

.participant-list,
.chat-list {
  display: grid;
  gap: 0.75rem;
}

.participant-item,
.chat-item,
.participant-item + .participant-item,
.chat-item + .chat-item {
  padding-top: 0;
}

.participant-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: #fffdf7;
}

.participant-avatar {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 800;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.8rem;
  block-size: 2.8rem;
  flex: none;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  line-height: 1;
}

.participant-remove-action {
  min-height: 2.35rem;
  padding-inline: 0.8rem;
}

.chat-list {
  gap: 0.75rem;
}

.chat-item {
  grid-template-columns: 0.9rem minmax(0, 1fr);
  padding: 0;
  column-gap: 0.75rem;
}

.timeline-marker {
  inline-size: 0.9rem;
  block-size: 0.9rem;
  margin-top: 1rem;
}

.timeline-marker.chat {
  background: var(--purpose-chat);
}

.timeline-marker.question {
  background: var(--purpose-question);
}

.timeline-marker.system {
  background: #151515;
}

.timeline-marker.result {
  background: var(--purpose-finish);
}

.timeline-card {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
}

.timeline-card.chat-card {
  background: var(--purpose-chat-soft);
}

.timeline-card.question-card {
  background: var(--purpose-question-soft);
}

.timeline-card.system-card {
  background: #fffaf0;
}

.timeline-card.result-card {
  background: var(--purpose-finish-soft);
}

.content-section.cards-section {
  background: #fdfbf7;
}

.card-hand-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
}

.card-hand-item {
  padding: 0;
}

.card-hand-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fffdf7;
}

.card-hand-header,
.card-hand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.card-hand-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.card-hand-header > .card-kind-pill {
  justify-self: start;
}

.card-hand-header > .card-hand-detail {
  grid-column: 2;
  grid-row: 1/span 2;
  align-self: start;
  text-align: right;
}

.card-hand-title {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 650;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
}

.card-hand-body {
  color: #151515;
}

.card-kind-pill.question {
  background: var(--purpose-question-soft);
  color: #6d4b00;
}

.card-kind-pill.assist {
  background: var(--purpose-success-soft);
  color: #006b4d;
}

.card-kind-pill.bonus {
  background: var(--purpose-hider-soft);
  color: #8f351e;
}

.card-kind-pill.curse {
  background: var(--purpose-danger-soft);
  color: #9b1f32;
}

.card-kind-pill.reaction {
  background: var(--purpose-info-soft);
  color: #084d91;
}

.card-kind-pill.challenge {
  background: var(--purpose-finish-soft);
  color: #75500a;
}

.chat-item.system-alert {
  padding: 0;
  background: transparent;
}
.chat-item.system-alert .timeline-card {
  background: var(--purpose-danger-soft);
}
.chat-item.system-alert .timeline-marker {
  background: var(--purpose-danger);
}

.timeline-row-header {
  align-items: flex-start;
}

.chat-body,
.system-card-body,
.question-card-body {
  color: #151515;
}

.question-card-detail,
.system-card-body {
  font-size: 0.875rem;
}

.question-status-pill.waiting {
  background: var(--purpose-question-soft);
  color: #6d4b00;
}

.question-status-pill.answered {
  background: var(--purpose-success-soft);
  color: #006b4d;
}

.question-status-pill.vetoed {
  background: var(--purpose-danger-soft);
  color: #9b1f32;
}

.chat-composer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.compose-dock .chat-input {
  height: 100%;
  min-height: 0;
}

.compose-dock .compose-send-action {
  width: auto;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
}

.compose-send-action {
  min-height: 3.25rem;
  padding-inline: 1rem;
  border-radius: 0.5rem;
  background: var(--purpose-chat-soft);
  color: var(--purpose-chat);
  text-decoration: none;
}

.compose-send-action:hover:not(:disabled) {
  background: #fffaf0;
  color: var(--purpose-chat);
}

.leave-game-action {
  background: var(--purpose-danger-soft);
  color: #9b1f32;
}

.name-panel {
  width: min(100%, 32rem);
  padding: 1.5rem;
  background: var(--purpose-question-soft);
  border-radius: 0.5rem;
}

.name-notes {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(21, 21, 21, 0.04);
}

.location-card,
.winner-banner {
  border-radius: 0.5rem;
}

@media (min-width: 44rem) {
  .app-shell {
    padding-inline: 1.5rem;
  }
  .landing-scene {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    align-items: stretch;
  }
  .landing-intro,
.landing-steps {
    min-height: 100%;
  }
}
.avatar-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.88);
}

.avatar-crop-hint {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  text-align: center;
  margin: 0;
}

.avatar-crop-area {
  position: relative;
  inline-size: 280px;
  block-size: 280px;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.avatar-crop-area:active {
  cursor: grabbing;
}

.avatar-crop-image {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  pointer-events: none;
  transform-origin: center center;
}

.avatar-crop-actions {
  display: flex;
  gap: 0.75rem;
}

.chat-avatar-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.chat-avatar {
  inline-size: 2rem;
  block-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 700;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
}

.chat-avatar.placeholder {
  background: #eef2f6;
  color: #39404a;
}

.participant-avatar.photo {
  object-fit: cover;
}

button,
input,
select,
textarea {
  border: none;
  outline: none;
  box-shadow: none;
}

.chat-input,
.name-input,
.settings-rules-select {
  border: none;
  background: #fffdf7;
}

.chat-list.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-item {
  display: block;
  animation: timeline-item-pop 240ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.chat-item.system,
.chat-item.question {
  animation-name: timeline-system-slide;
  animation-duration: 220ms;
  animation-timing-function: ease-out;
}

.timeline-marker {
  display: none;
}

.chat-bubble-button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
}

.chat-avatar-row {
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.chat-bubble-stack {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.chat-item.self .chat-avatar-row {
  grid-template-columns: minmax(0, 1fr) 2rem;
}

.chat-item.self .chat-avatar {
  order: 2;
}

.chat-item.self .chat-bubble-stack {
  justify-items: end;
}

.chat-avatar {
  border-radius: 0.9rem;
  background: #eef2f6;
  color: #39404a;
}

.chat-avatar.self {
  background: var(--purpose-chat);
  color: #fffdf7;
}

.chat-author-label {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 500;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #555a62;
}

.timeline-card.chat-card {
  display: block;
  max-width: min(32rem, 100vw - 6rem);
  padding: 0.95rem 1.1rem;
  border-radius: 1.3rem 1.3rem 1.3rem 0.55rem;
  background: var(--purpose-chat-soft);
}

.timeline-card.chat-card.self {
  border-radius: 1.3rem 1.3rem 0.55rem 1.3rem;
  background: var(--purpose-chat);
}

.timeline-card.chat-card.self .chat-body {
  color: #fffdf7;
}

.timeline-card.question-card,
.timeline-card.system-card,
.timeline-card.result-card {
  border-radius: 1.25rem;
}

.chat-body {
  font-size: 1rem;
  line-height: 1.48;
}

.timeline-row-detail {
  font-size: 0.68rem;
  color: #39404a;
}

.chat-reaction-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: -0.5rem;
}

.chat-reaction-count {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.06);
  font-size: 0.72rem;
  color: #39404a;
}

.chat-reaction-count.selected {
  background: #ffd84d;
  color: #4f3600;
}

.chat-reaction-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chat-reaction-menu-shell {
  display: flex;
  margin-top: -0.25rem;
}

.chat-item.self .chat-reaction-menu-shell {
  justify-content: flex-end;
}

.chat-reaction-menu {
  padding: 0.5rem;
  border-radius: 999px;
  background: #fffdf7;
  box-shadow: 0 0.4rem 1rem rgba(21, 21, 21, 0.12);
}

.chat-reaction-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: transparent;
  color: #151515;
  font-size: 1rem;
}

.chat-reaction-option.selected {
  background: #ffd84d;
}

.chat-reaction-option .fa-solid,
.chat-reaction-count .fa-solid {
  font-size: 0.9rem;
}

.compose-send-action {
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.75rem;
  border-radius: 999px;
  background: var(--purpose-chat);
  color: #fffdf7;
}

.compose-send-action:hover:not(:disabled) {
  background: #073a8b;
  color: #fffdf7;
}

.compose-dock .compose-send-action {
  min-width: 0;
  min-height: 0;
}

.compose-send-action .fa-solid {
  font-size: 0.95rem;
}

.card-hand-card {
  appearance: none;
  width: 100%;
  min-height: 11.5rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 28%), #fffcf5;
  color: #151515;
  text-align: left;
  transform-origin: center bottom;
  transition: transform 180ms ease;
}

.card-hand-card:hover {
  transform: translateY(-0.2rem) rotate(-0.35deg);
}

.card-hand-header {
  align-items: start;
}

.card-hand-detail {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #39404a;
}

.card-hand-divider {
  height: 0.22rem;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.1);
}

.card-hand-title {
  font-size: 1.12rem;
}

.card-hand-body {
  font-size: 0.96rem;
  line-height: 1.5;
}

.card-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(21, 21, 21, 0.58);
  animation: card-modal-fade 180ms ease both;
}

.card-detail-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1rem;
  width: min(100%, 34rem);
  max-height: 100%;
  min-height: min(44rem, 100dvh - 2rem);
  padding: 1.25rem;
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 24%), #fffbf2;
  transform-origin: center bottom;
}

.card-detail-card.opening {
  animation: card-rise-in 240ms cubic-bezier(0.18, 0.92, 0.22, 1) both;
}

.card-detail-card.returning {
  animation: card-settle-down 260ms ease-in both;
}

.card-detail-card.playing {
  position: relative;
  animation: card-play-burst 520ms cubic-bezier(0.2, 0.84, 0.26, 1) both;
}

.card-detail-card.playing::after {
  content: "";
  position: absolute;
  inset: 10% 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 216, 77, 0.95) 0%, rgba(255, 216, 77, 0.35) 38%, rgba(255, 216, 77, 0) 72%);
  animation: card-play-flare 520ms ease-out both;
  pointer-events: none;
}

.card-detail-header,
.card-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-detail-main {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 0;
}

.card-detail-title {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 700;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: clamp(1.6rem, 5vw, 2.35rem);
  line-height: 0.96;
}

.card-detail-description {
  font-size: 1.02rem;
  line-height: 1.58;
  color: #151515;
}

.card-detail-label {
  font-family: "Sono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  font-weight: 600;
  font-variation-settings: "MONO" 0;
  font-feature-settings: "tnum" 1;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #39404a;
}

.card-detail-back-action {
  min-height: 3rem;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  background: #eef2f6;
  color: #151515;
  text-decoration: none;
}

.card-detail-play-action {
  min-height: 3rem;
  padding-inline: 1.1rem;
  border-radius: 999px;
}

@media (max-width: 56rem) {
  .card-modal {
    padding: 0.5rem;
  }
  .card-detail-card {
    min-height: calc(100dvh - 1rem);
    border-radius: 1.4rem;
  }
  .chat-composer {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
*::before,
*::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
