:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #69758a;
  --line: #dbe4f0;
  --paper: #f7f9fc;
  --panel: rgba(255, 255, 255, 0.9);
  --blue: #3877ff;
  --blue-deep: #2458d3;
  --green: #1f9d76;
  --gold: #d49324;
  --soft-blue: #eef4ff;
  --shadow: 0 22px 55px rgba(31, 45, 75, 0.13);
  --shadow-soft: 0 12px 28px rgba(31, 45, 75, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui,
    sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(56, 119, 255, 0.14), transparent 31%),
    radial-gradient(circle at 84% 20%, rgba(31, 157, 118, 0.11), transparent 28%),
    linear-gradient(145deg, #f8fbff 0%, #eef4ff 48%, #f7f9fc 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  background: linear-gradient(135deg, #4f8cff 0%, var(--blue-deep) 100%);
  color: white;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(36, 88, 211, 0.2);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

button:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(36, 88, 211, 0.26);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  box-shadow: none;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  font-weight: 800;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input::placeholder {
  color: #9aa6b7;
  font-weight: 700;
}

input:focus {
  border-color: #6c9bff;
  box-shadow: 0 0 0 5px rgba(56, 119, 255, 0.14);
  background: white;
  outline: 0;
}

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.hidden {
  display: none !important;
}

.entry {
  min-height: calc(100vh - 84px);
  display: grid;
  align-content: center;
  gap: 30px;
}

.hero {
  max-width: 820px;
}

.hero-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  pointer-events: none;
}

.hero-badges span {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  font-size: 25px;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  font-weight: 700;
}

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

.panel,
.round-card,
.participants {
  border: 1px solid rgba(219, 228, 240, 0.86);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel {
  display: grid;
  gap: 18px;
  padding: 26px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.panel:hover {
  border-color: rgba(100, 142, 255, 0.42);
  transform: translateY(-3px);
  box-shadow: 0 26px 64px rgba(31, 45, 75, 0.16);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.panel-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(219, 228, 240, 0.9);
  font-size: 21px;
  font-weight: 900;
}

.panel h2,
.section-title h2,
.round-heading h2 {
  margin: 0;
}

.panel h2 {
  font-size: 24px;
  line-height: 1.2;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

label {
  display: grid;
  gap: 9px;
  color: #526176;
  font-size: 14px;
  font-weight: 900;
}

.room {
  display: grid;
  gap: 18px;
}

.topbar,
.wager-strip,
.board {
  display: grid;
  gap: 18px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 48px;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(31, 157, 118, 0.12);
  color: var(--green);
  font-weight: 900;
  font-size: 13px;
}

.wager-strip {
  grid-template-columns: 1fr minmax(280px, 430px);
  align-items: end;
  padding: 4px 0 2px;
}

.wager-strip h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.board {
  grid-template-columns: 360px 1fr;
  align-items: start;
}

.participants {
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title span {
  color: var(--blue-deep);
  font-weight: 900;
}

.participant-list {
  display: grid;
  gap: 10px;
}

.participant {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: white;
}

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

.participant small {
  color: var(--muted);
  font-weight: 800;
}

.participant input {
  min-height: 42px;
  border-radius: 12px;
}

.status-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  background: #eef2f7;
  color: var(--muted);
}

.pill.on {
  background: rgba(31, 157, 118, 0.12);
  color: var(--green);
}

.pill.host {
  background: rgba(212, 147, 36, 0.15);
  color: var(--gold);
}

.play {
  min-width: 0;
}

.round-card {
  min-height: 520px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  padding: 26px;
}

.game-symbols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  pointer-events: none;
}

.game-symbols span {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
  font-size: 36px;
}

.round-heading p {
  margin: 0 0 6px;
  color: var(--blue-deep);
  font-weight: 900;
}

.round-heading h2 {
  font-size: 32px;
  line-height: 1.18;
}

.result-box {
  border: 1px solid #bfd4ff;
  border-left: 5px solid var(--blue);
  padding: 16px;
  background: var(--soft-blue);
  border-radius: 16px;
  font-weight: 900;
}

.result-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.moves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.moves button {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 8px;
  background: white;
  color: var(--ink);
  border: 2px solid var(--line);
  font-size: 54px;
  box-shadow: var(--shadow-soft);
}

.moves button:hover:not(:disabled),
.moves button.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.moves span {
  font-size: 18px;
}

.round-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 10px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 920px) {
  .app {
    padding: 30px 0;
  }

  .entry {
    align-content: start;
    min-height: calc(100vh - 60px);
  }

  .hero {
    text-align: left;
  }

  .entry-grid,
  .topbar,
  .wager-strip,
  .board {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .app {
    width: min(100% - 20px, 1120px);
    padding: 22px 0;
  }

  .entry {
    gap: 22px;
  }

  .hero-badges span {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 22px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .panel {
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .panel h2 {
    font-size: 21px;
  }

  .round-card,
  .participants {
    padding: 18px;
  }

  .round-heading h2 {
    font-size: 25px;
  }

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

  .moves button {
    min-height: 88px;
    grid-template-columns: auto auto;
    justify-content: center;
    font-size: 34px;
  }

  .round-actions {
    grid-template-columns: 1fr;
  }
}
