@font-face {
  font-family: system;
  src: local("Pretendard"), local("Noto Sans KR");
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  background: #f4f2ec;
  color: #193535;
  font-family:
    system,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #b45c28;
  outline-offset: 4px;
}
input:focus,
textarea:focus {
  outline: 2px solid #28756c;
  outline-offset: 2px;
}
header {
  max-width: 1280px;
  margin: auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d8ddd5;
}
.brand {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: inherit;
}
.brand span {
  color: #b65f2f;
}
.brand small {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  margin-left: 14px;
}
.edition,
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #55726b;
}
.edition {
  font-size: 12px;
}
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.3;
  word-break: keep-all;
}
h2 {
  font-size: 24px;
  margin-bottom: 18px;
}
h3 {
  font-size: 19px;
  margin-bottom: 10px;
}
p {
  color: #4b625c;
  word-break: keep-all;
}
small,
.small {
  font-size: 14px;
  color: #57716b;
}
.eyebrow {
  margin-bottom: 14px;
}
.welcome {
  padding: 12px 0 28px;
}
.welcome h1 {
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.045em;
  margin: 14px 0 24px;
}
.welcome em {
  font-style: normal;
  color: #a44d27;
}
.welcome p {
  font-size: 18px;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tags span {
  padding: 4px 12px;
  border: 1px solid #ccd6cd;
  border-radius: 20px;
  font-size: 14px;
}
.entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.panel {
  background: #fffefb;
  border: 1px solid #d8ddd5;
  border-radius: 18px;
  padding: 28px;
}
.entry {
  padding: 30px;
}
.entry:first-child {
  border-top: 4px solid #246557;
}
.entry:last-child {
  border-top: 4px solid #c18e50;
}
.entry .small {
  margin-top: 18px;
  margin-bottom: 0;
}
label {
  display: block;
  font-size: 15px;
  font-weight: 650;
  margin: 16px 0 6px;
}
label span {
  color: #62736d;
  font-weight: 400;
  font-size: 14px;
  margin-left: 8px;
}
input,
textarea {
  width: 100%;
  background: #f9f9f4;
  border: 1px solid #bdc9bf;
  border-radius: 9px;
  padding: 13px 14px;
  color: #193535;
  min-height: 48px;
}
input[name="code"] {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
button {
  border: 0;
  border-radius: 9px;
  font-weight: 650;
  line-height: 1.5;
  min-height: 46px;
}
.primary,
.secondary {
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.primary {
  background: #1e5449;
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: #163e37;
}
.secondary {
  background: #e8eee6;
  color: #1f5048;
  border: 1px solid #b9cabc;
}
.secondary:hover:not(:disabled) {
  background: #dce7db;
}
.primary:disabled,
.secondary:disabled {
  opacity: 0.45;
}
.entry button {
  width: 100%;
  justify-content: space-between;
  margin-top: 22px;
}
.text-button {
  background: transparent;
  color: #215d51;
  padding: 10px 12px;
}
.text-button:hover {
  background: #e7eee4;
}
.demo-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid #d5ddd3;
  margin-top: 26px;
  padding: 22px 2px;
  gap: 20px;
}
.demo-entry p {
  margin: 2px 0 0;
  font-size: 14px;
}
.banner,
.event {
  padding: 15px 18px;
  border-radius: 9px;
  font-size: 15px;
  background: #f6e9d5;
  color: #6d431f;
  border-left: 3px solid #b58142;
}
.banner {
  margin-top: 20px;
}
.resume {
  margin-top: 24px;
}
.resume-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: transparent;
  padding: 14px;
  border-bottom: 1px solid #e0e6df;
}
.resume-row small {
  display: block;
}
.guide {
  margin: 28px 0;
  max-width: 850px;
}
.guide summary {
  cursor: pointer;
  font-weight: 650;
  margin-bottom: 15px;
}
.guide p {
  font-size: 15px;
}
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.game-top h1 {
  font-size: 30px;
  margin: 0 0 8px;
}
.game-top .eyebrow {
  margin-bottom: 8px;
}
.room-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.room-code {
  padding: 5px 16px;
  border-left: 1px solid #cbd5cc;
}
.room-code small {
  display: block;
}
.room-code strong {
  font-size: 24px;
  letter-spacing: 0.15em;
}
.host-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #dfe9db;
  border: 1px solid #bccdb9;
  border-radius: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.host-controls > span {
  margin-right: auto;
  font-size: 14px;
  font-weight: 700;
}
.timeline {
  margin: 25px 0 30px;
}
.timeline ol {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 0;
}
.timeline li {
  padding: 12px 8px;
  border-top: 3px solid #d5ddd4;
  color: #65766e;
  font-size: 14px;
}
.timeline li span {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.timeline .active {
  border-color: #ac602e;
  color: #85431d;
  font-weight: 750;
}
.timeline .passed {
  border-color: #416f58;
  color: #385943;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.chapter {
  padding: 32px;
}
.chapter-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #597267;
  gap: 10px;
}
.progress {
  height: 3px;
  background: #e6e9df;
  margin: 18px 0 32px;
}
.progress i {
  display: block;
  height: 100%;
  background: #bc7339;
}
.chapter h2 {
  font-size: 34px;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.story {
  font-size: 18px;
  margin-bottom: 24px;
}
.choices {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.choice {
  display: flex;
  gap: 14px;
  text-align: left;
  background: #fffefb;
  border: 1px solid #cad4c9;
  border-radius: 12px;
  padding: 20px;
  color: #193535;
  width: 100%;
}
.choice:not(:disabled):hover {
  border-color: #377b66;
  background: #f1f6ec;
  transform: translateY(-1px);
}
.choice:disabled {
  opacity: 1;
}
.choice:disabled:not(.selected) {
  background: #f5f5ef;
  color: #4d6257;
}
.choice:disabled:not(.selected) .choice-number {
  color: #587265;
}
.choice.selected {
  border: 2px solid #317059;
  background: #ecf3e6;
  padding: 19px;
}
.choice-number {
  background: #e6eddf;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.choice-content {
  display: block;
  flex: 1;
  min-width: 0;
}
.choice strong {
  font-size: 17px;
  display: block;
  margin-bottom: 8px;
  word-break: keep-all;
}
.choice small {
  display: block;
  font-size: 13px;
  margin-top: 8px;
}
.effects {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 400;
  color: #536d61;
}
.chosen-label {
  color: #245e48;
  font-weight: 750;
}
.question {
  border-top: 1px solid #dae0d4;
  padding-top: 22px;
  margin-top: 26px;
}
.question span {
  font-size: 13px;
  font-weight: 750;
  color: #a25029;
}
.question p {
  font-size: 18px;
  margin: 8px 0;
  color: #284b3e;
}
.chapter > .primary {
  margin-top: 20px;
  width: 100%;
}
.identity h2 {
  font-size: 23px;
  margin-bottom: 4px;
}
.identity > p {
  font-size: 15px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.stat {
  padding: 18px;
  background: #f1f3e9;
  border: 1px solid #dfe4d6;
  border-radius: 12px;
  --stat: #4c7152;
}
.stat > span {
  display: block;
  font-size: 14px;
}
.stat strong {
  font-size: 30px;
  display: block;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.stat strong small {
  font-size: 12px;
  margin-left: 4px;
  font-weight: 400;
}
.stat > small {
  font-size: 12px;
}
.stat.culture {
  --stat: #9b7238;
}
.stat.network {
  --stat: #4b7c82;
}
.stat.wellbeing {
  --stat: #a16558;
}
.meter {
  height: 5px;
  background: #dce1d6;
  border-radius: 3px;
  margin: 6px 0 10px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--stat);
}
.identity .stats {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0;
}
.identity .stat {
  padding: 12px;
}
.identity .stat strong {
  font-size: 27px;
}
.roster {
  margin-top: 22px;
}
.roster h2 {
  font-size: 19px;
  margin-bottom: 0;
}
.section-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.section-top > span {
  font-size: 14px;
}
.people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.person {
  padding: 8px 12px;
  background: #f1f1e9;
  border-radius: 8px;
  font-size: 15px;
}
.person small {
  display: block;
  font-size: 12px;
}
.person.done {
  background: #e2efd9;
}
.lobby h2 {
  font-size: 30px;
}
.lobby .stats {
  max-width: 850px;
}
.result {
  padding: 20px;
  background: #eef3e5;
  border-radius: 12px;
}
.result p {
  font-size: 15px;
  margin: 12px 0;
}
.vote-counts {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #cad8bb;
  padding-top: 15px;
  font-size: 14px;
}
.vote-counts strong {
  display: block;
}
.compare {
  margin-top: 24px;
}
.compare > p {
  font-size: 15px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 15px;
  white-space: nowrap;
}
caption {
  text-align: left;
  font-size: 14px;
  padding-bottom: 10px;
  color: #567164;
}
th,
td {
  padding: 16px 14px;
  border-bottom: 1px solid #dce3d6;
}
thead th {
  background: #eef2e7;
  font-size: 14px;
}
td span {
  color: #627560;
  font-size: 13px;
  padding: 0 4px;
}
th small {
  display: block;
  font-size: 12px;
  font-weight: 400;
}
.history {
  margin-top: 24px;
}
.history summary {
  font-weight: 650;
  cursor: pointer;
}
.history article {
  padding: 22px 0;
  border-bottom: 1px solid #dde4d5;
}
.history article:last-child {
  border: 0;
  padding-bottom: 0;
}
.history article p {
  margin-bottom: 10px;
}
.history article h3 {
  margin-top: 6px;
}
.finish {
  padding: 28px 0;
}
.finish h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.035em;
}
.reflection {
  margin-top: 24px;
}
.reflection ol {
  padding-left: 22px;
  color: #476354;
}
.reflection li {
  margin: 9px 0;
}
.reflection textarea {
  margin-bottom: 16px;
  resize: vertical;
}
.reflection label {
  margin-top: 24px;
}
.reflection button {
  display: block;
}
#notice {
  position: sticky;
  bottom: 16px;
  max-width: 800px;
  margin: 0 auto;
  background: #193d34;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px #193d3422;
  padding: 14px 20px;
  z-index: 10;
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#notice:empty {
  display: none;
}
footer {
  max-width: 1180px;
  margin: auto;
  padding: 0 24px 30px;
  color: #64766c;
  font-size: 13px;
}
@media (min-width: 1000px) {
  .welcome {
    max-width: 760px;
  }
}
@media (max-width: 900px) {
  .play-layout {
    grid-template-columns: 1fr;
  }
  .play-layout aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .play-layout aside .roster {
    margin-top: 0;
  }
  .game-top {
    align-items: flex-start;
  }
  .room-actions {
    justify-content: flex-end;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  header {
    padding: 18px 20px;
  }
  .edition {
    display: none;
  }
  .brand {
    font-size: 20px;
  }
  .brand small {
    font-size: 13px;
  }
  .welcome h1 {
    font-size: 42px;
  }
  .welcome p {
    font-size: 16px;
  }
  main {
    padding: 26px 16px 40px;
  }
  .entry-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .panel,
  .entry,
  .chapter {
    padding: 22px;
  }
  .demo-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .game-top {
    flex-direction: column;
  }
  .room-actions {
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }
  .room-code {
    padding-left: 0;
    border-left: 0;
  }
  .room-actions button {
    font-size: 14px;
  }
  .game-top h1 {
    font-size: 26px;
  }
  .host-controls {
    padding: 12px;
  }
  .host-controls > span {
    width: 100%;
  }
  .host-controls button {
    flex: 1;
    font-size: 14px;
  }
  .timeline ol {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .timeline li {
    padding: 8px 5px;
  }
  .timeline {
    margin: 20px 0;
  }
  .chapter h2 {
    font-size: 28px;
  }
  .story {
    font-size: 17px;
  }
  .choice {
    padding: 16px;
    gap: 10px;
  }
  .choice.selected {
    padding: 15px;
  }
  .choice strong {
    font-size: 16px;
  }
  .choice-number {
    flex-basis: 26px;
    height: 26px;
  }
  .effects {
    font-size: 12px;
  }
  .play-layout aside {
    grid-template-columns: 1fr;
  }
  .chapter-meta {
    font-size: 12px;
  }
  .section-top {
    gap: 10px;
  }
  .table-scroll {
    margin-inline: -8px;
  }
  th,
  td {
    padding: 14px 10px;
    font-size: 14px;
  }
  .lobby h2 {
    font-size: 26px;
  }
  #notice {
    margin: 0 12px;
    bottom: 12px;
  }
  .resume-row {
    padding: 12px 0;
    font-size: 14px;
  }
  .finish {
    padding: 16px 0;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    transform: none !important;
  }
}

.qr-invite {
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 24px 0;
}
.qr-invite img {
  image-rendering: pixelated;
  background: white;
  border: 1px solid #d8ddd5;
  border-radius: 8px;
}
.qr-invite b {
  letter-spacing: 0.14em;
  font-size: 22px;
}
.qr-invite p {
  margin: 10px 0 0;
}
@media (max-width: 620px) {
  .qr-invite {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
