:root {
  --ink: #2a1c14;
  --paper: rgba(255, 246, 232, 0.9);
  --line: rgba(92, 48, 24, 0.22);
  --seal: #a33b22;
  --shadow: 0 18px 48px rgba(48, 22, 8, 0.32);
  color: var(--ink);
  font-family: "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: url("/assets/bg.jpg") center / cover no-repeat fixed;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, .status { font-family: "Gowun Batang", serif; font-weight: 700; margin: 0; }
h1 { font-size: 48px; letter-spacing: -0.03em; }
.hidden { display: none !important; }

#app { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.panel, .hud {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel { width: min(440px, 100%); padding: 28px 24px; }
.panel.wide { width: min(720px, 100%); }
.mark {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 8px 18px rgba(42, 24, 12, 0.28);
}
.eyebrow {
  margin: 12px 0 0;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--seal);
}
.lead, .me, .empty { color: #5c4636; line-height: 1.55; }
label { display: grid; gap: 6px; margin: 16px 0; font-weight: 700; }
input[type="text"], input:not([type]) {
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.9);
  border-radius: 12px;
  padding: 12px 14px;
}
.primary, .ghost {
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid transparent;
}
.primary { background: #3a2418; color: #fff8ef; font-weight: 700; }
.primary:hover { filter: brightness(1.12); }
.primary:disabled { opacity: 0.45; cursor: default; filter: none; }
.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.row, .create-row, .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row { justify-content: space-between; }
.create-row { margin: 12px 0; }
.create-row input { flex: 1; min-width: 0; margin: 0; }
.rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rooms li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: rgba(255, 252, 247, 0.78);
  border-radius: 14px;
  padding: 12px;
}
.rooms li div { display: grid; gap: 2px; }
.rooms button {
  border: 0;
  background: #3a2418;
  color: #fff8ef;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.rooms button:disabled { opacity: 0.45; }
.wait-players, .players { display: grid; gap: 8px; margin: 14px 0; }
.person, .player {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  background: rgba(255, 252, 247, 0.78);
  border-radius: 14px;
  padding: 10px 12px;
}
.player.turn { outline: 2px solid #c4552a; }
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}
.dot.left { background: radial-gradient(circle at 35% 35%, #f0c48a, #8a4b22 70%); }
.dot.right { background: radial-gradient(circle at 35% 35%, #d7dde6, #3d4a5c 70%); }
.rules { margin: 8px 0 16px; color: #5c4636; }
.rules ul { margin: 8px 0 0; padding-left: 18px; }
.play { width: min(1180px, 100%); }
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
#field {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: url("/assets/bg.jpg") center / cover no-repeat;
}
.hud { padding: 18px 16px 14px; }
.aim label { margin: 10px 0; font-size: 14px; }
.aim input[type="range"] { width: 100%; accent-color: #a33b22; }
.status { min-height: 3.2em; line-height: 1.45; margin-top: 8px; }
.log {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #5c4636;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #3a2418;
  color: #fff8ef;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; }
  h1 { font-size: 40px; }
}
