﻿:root {
  --bg: #0a0f1a;
  --bg2: #0d1322;
  --card: rgba(255,255,255,.05);
  --line: rgba(255,255,255,.1);
  --text: #edf2ff;
  --muted: rgba(237,242,255,.72);
  --accent: #79ffa8;
  --accent-2: #7fb2ff;
  --danger: #ff7878;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100svh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(70vw 40vh at 10% -5%, rgba(121,255,168,.12), transparent 60%),
    radial-gradient(70vw 45vh at 100% 5%, rgba(127,178,255,.14), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}

.wrap {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
}

.card {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(10px);
}
.card.compact { padding: 12px; }
.hero { margin-top: 0; }

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

.header h1 { margin: 0; font-size: 26px; line-height: 1.1; }
.sub { margin: 8px 0 0; color: var(--muted); line-height: 1.45; font-size: 14px; }
.section-title { margin: 0; font-size: 17px; }
.small { font-size: 12px; color: var(--muted); }

.row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.row.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

input, select {
  width: 100%;
  min-height: 46px;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  background: rgba(0,0,0,.2);
  outline: none;
}
input:focus, select:focus {
  border-color: rgba(121,255,168,.45);
  box-shadow: 0 0 0 3px rgba(121,255,168,.12);
}

.game { margin-top: 8px; }
.game-head { margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: 1fr; gap: 10px; }
.stat {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.18);
  padding: 12px;
}
.stat .k { display: block; font-size: 12px; color: var(--muted); }
.stat .v { display: block; margin-top: 6px; font-size: 21px; font-weight: 700; }

.status-box, .reaction-state {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--text);
  line-height: 1.4;
  font-size: 14px;
}

.big {
  margin-top: 12px;
  width: 100%;
  min-height: 180px;
  border: 0;
  border-radius: 18px;
  color: #0a0f1a;
  background: linear-gradient(180deg, var(--accent), #54e58f);
  font-weight: 800;
  font-size: clamp(30px, 8vw, 40px);
  cursor: pointer;
  touch-action: manipulation;
}
.big:active { transform: scale(.995); }
.big:disabled { opacity: .45; cursor: not-allowed; }

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}
.sticky-actions {
  position: sticky;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 2;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.btn.secondary { background: rgba(255,255,255,.04); color: var(--muted); }
.btn.slim { min-height: 36px; padding: 8px 12px; }

.rank { margin: 10px 0 0; padding-left: 20px; }
.rank li { padding: 8px 4px; border-bottom: 1px dashed rgba(255,255,255,.1); line-height: 1.35; }

@media (min-width: 700px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .header h1 { font-size: 30px; }
  .row { grid-template-columns: 1fr 180px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actions { grid-template-columns: 1fr 1fr; }
  .sticky-actions { position: static; }
  .big { min-height: 150px; }
}
