:root {
  --bg: #0e1116;
  --panel: #1a1f29;
  --card: #222833;
  --text: #f2f4f8;
  --muted: #9aa3b5;
  --line: #2c3444;
  --accent: #5b8def;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 18px 16px 40px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
h1 { margin: 0; font-size: 22px; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.panel { background: var(--panel); border-radius: 22px; padding: 18px 14px 24px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
}
.card .emoji { font-size: 32px; }
.card .name { font-weight: 900; margin-top: 8px; }
.card .desc { color: var(--muted); font-size: 12px; font-weight: 700; }
.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #2a3140;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.btn.primary { background: var(--accent); border: none; }
.btn.block { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tab {
  border-radius: 999px;
  padding: 8px 14px;
  background: #151a24;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.tab.on { background: #fff; color: #111; }
.row { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid #1f2633; }
.num { width: 28px; text-align: center; font-weight: 900; }
.name { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat { font-weight: 800; font-size: 13px; }
input, select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121820;
  color: var(--text);
  padding: 8px 12px;
  font-weight: 700;
}
.hint { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.5; }
.board { display: grid; gap: 4px; margin-top: 12px; }
.cell {
  aspect-ratio: 1;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #151a24;
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.life { font-weight: 900; }
.guess { display: flex; gap: 4px; margin: 6px 0; }
.jamo {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #2a3140; font-weight: 900;
}
.jamo.c { background: #3d9bfd; }
.jamo.p { background: #c9a227; color: #111; }
.jamo.a { background: #3a4254; }
.bar { position: relative; height: 28px; border-radius: 999px; background: #121820; overflow: hidden; border: 1px solid var(--line); }
.bar i { position: absolute; top: 0; bottom: 0; width: 8px; margin-left: -4px; background: #fff; }
.sweet { position: absolute; top: 0; bottom: 0; background: #3d9bfd55; }
.hp { height: 10px; border-radius: 999px; background: #121820; overflow: hidden; }
.hp span { display: block; height: 100%; background: #e07070; }
.hp.me span { background: #3d9bfd; }
.yokai { width: 180px; display: block; margin: 8px auto; }
.cuts img { width: 100%; border-radius: 16px; }
