@font-face {
  font-family: LiarDisplay;
  src: url("./fonts/display.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: LiarBody;
  src: url("./fonts/body.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: LiarBody;
  src: url("./fonts/body-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: LiarBody, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #233b2e;
  background: #f7f8f2;
  font-synthesis: none;
  font-size: 16px;
  --ink: #233b2e;
  --muted: #657064;
  --line: #dce1d5;
  --accent: #c4ef72;
  --surface: #fff;
  --danger: #a83032;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
}
button,
input,
summary {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
:focus-visible {
  outline: 3px solid #60872d;
  outline-offset: 4px;
}
input:not([type="radio"]) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #a9b4a4;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  margin: 8px 0 16px;
}
input::placeholder {
  color: var(--muted);
}
input[aria-invalid="true"] {
  border-color: var(--danger);
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1,
h2,
.brand {
  font-family: LiarDisplay, "Apple SD Gothic Neo", sans-serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 28px;
  line-height: 1.3;
}
p {
  line-height: 1.6;
}
label,
legend {
  font-weight: 700;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.app-shell {
  width: min(100%, 1120px);
  min-height: 100dvh;
  margin: auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
}
.site-header {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 30px;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-header nav a {
  padding: 12px 8px;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
}
.site-header nav a:hover,
footer a:hover {
  text-decoration: underline;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 12px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 10px;
  z-index: 10;
}
.skip-link:focus {
  transform: none;
}
main {
  flex: 1;
  padding: 48px 0;
}
#home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
  row-gap: 24px;
  align-items: start;
}
.intro {
  padding: 20px 0;
}
.tag {
  display: inline-block;
  color: var(--ink);
  background: var(--accent);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
}
.intro h1 {
  margin: 24px 0 20px;
}
.intro p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}
.entry-card,
.participants,
.game-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.primary:hover:not(:disabled) {
  border-color: var(--ink);
}
.secondary {
  background: var(--surface);
  border-color: var(--ink);
  color: var(--ink);
}
.secondary:hover:not(:disabled),
.quiet:hover:not(:disabled) {
  background: #f7f8f2;
}
.quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.entry-card button {
  width: 100%;
}
.entry-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}
.entry-divider::before,
.entry-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.entry-divider span {
  flex: none;
}
.error {
  color: var(--danger);
  font-weight: 700;
  margin-top: 16px;
}
.status {
  color: var(--muted);
  font-size: 14px;
}
.status:not(:empty) {
  margin: 12px 0;
}
.entry-card .quiet {
  margin-top: 8px;
}
.previous-room {
  display: block;
  margin-top: 16px;
  line-height: 1.6;
}
.rules {
  grid-column: 1 / -1;
  max-width: 720px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.rules summary {
  cursor: pointer;
  min-height: 44px;
  line-height: 1.6;
  font-weight: 700;
}
.rules ol {
  margin: 4px 0 0;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.8;
}
.rules li + li {
  margin-top: 8px;
}
.room-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.room-top h1 {
  font-size: clamp(32px, 6vw, 48px);
  margin-top: 16px;
}
.invite-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.connection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 20px 0;
  background: var(--surface);
}
.connection-bar button {
  flex-shrink: 0;
}
.notice {
  margin-top: 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--ink);
  background: var(--surface);
}
.room-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
#player-count {
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
}
#players {
  list-style: none;
  padding: 0;
  margin: 0;
}
#players li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.player-name {
  min-width: 0;
  flex: 1;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.player-flags {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  max-width: 45%;
  word-break: keep-all;
}
.game-panel h2 {
  margin-bottom: 20px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}
.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  font-weight: 400;
  line-height: 1.6;
}
.mode-option input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 3px 0 0;
  accent-color: var(--ink);
}
.mode-option strong {
  display: block;
}
.mode-option small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 4px;
}
#private-area button,
#advance {
  width: 100%;
}
.role-card,
.result-card {
  background: #f7f8f2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-top: 16px;
  text-align: center;
}
.result-card {
  margin-top: 0;
}
.eyebrow {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.secret-word {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.result-card .eyebrow {
  margin-top: 24px;
}
.action-help {
  color: var(--muted);
  font-size: 14px;
  margin: 20px 0 12px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}
.leave-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.leave-row p {
  margin: 0;
}
footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
}
dialog::backdrop {
  background: rgb(35 59 46 / 45%);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.dialog-heading h2 {
  font-size: 24px;
}
#qr-image {
  display: block;
  margin: 0 auto 20px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}
dialog > p {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 760px) {
  .app-shell {
    padding: 0 20px;
  }
  .site-header {
    min-height: 80px;
  }
  main {
    padding: 28px 0;
  }
  #home,
  .room-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .intro {
    padding: 0;
  }
  .intro h1 {
    margin: 20px 0 16px;
  }
  .intro p {
    font-size: 16px;
  }
  .desktop-break {
    display: none;
  }
  .rules {
    grid-column: auto;
  }
  .room-top {
    align-items: flex-start;
    gap: 20px;
  }
  .room-grid {
    margin-top: 24px;
  }
}
@media (max-width: 360px) {
  .app-shell {
    padding: 0 16px;
  }
  .entry-card,
  .participants,
  .game-panel {
    padding: 20px;
  }
  .brand {
    font-size: 26px;
  }
  .site-header nav {
    gap: 0;
  }
  .site-header nav a {
    padding: 12px 6px;
  }
  .connection-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}
