/* GameRun 전역 디자인 시스템 (A안: 다크 앤 파이어) */
:root {
  --bg: #0b0c10;
  --sur: #13141a;
  --card: #1c1e27;
  --brd: #2a2c38;
  --acc: #ff4d4d;
  --acc2: #ff8c42;
  --gold: #ffd166;
  --grn: #06d6a0;
  --blu: #4da6ff;
  --spec: #f59e0b;
  --txt: #f0f0f5;
  --mut: #6b7280;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Noto Sans KR', sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 70% 50% at 15% 5%, rgba(255,77,77,.06) 0%, transparent 60%),
              radial-gradient(ellipse 50% 35% at 85% 90%, rgba(77,166,255,.04) 0%, transparent 60%);
}

/* ── 레이아웃 ── */
.wrap { position: relative; z-index: 1; max-width: 540px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 14px calc(80px + env(safe-area-inset-bottom)); }
.adm-wrap { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 14px calc(80px + env(safe-area-inset-bottom)); }
.page { display: none; }
.page.on { display: block; }
.scr { display: none; }
.scr.on { display: block; }

/* ── 로딩 ── */
#ld { position: fixed; inset: 0; background: var(--bg); z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
#ld-title { font-family: 'Black Han Sans', sans-serif; font-size: 32px; background: linear-gradient(135deg, #ff4d4d, #ff8c42, #ffd166); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
#ld-spinner { width: 32px; height: 32px; border: 3px solid var(--brd); border-top-color: var(--acc); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
#ld-msg { font-size: 13px; color: var(--mut); text-align: center; padding: 0 24px; line-height: 1.6; max-width: 320px; }

/* ── 헤더 ── */
.hdr { text-align: center; margin-bottom: 22px; }
.logo-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .2em; color: var(--acc); border: 1px solid var(--acc); padding: 3px 10px; border-radius: 2px; margin-bottom: 8px; }
.pg-title { font-family: 'Black Han Sans', sans-serif; font-size: clamp(30px, 9vw, 46px); line-height: 1; background: linear-gradient(135deg, #ff4d4d, #ff8c42, #ffd166); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pg-sub { font-size: 11px; color: var(--mut); margin-top: 4px; }

/* ── 공통 UI ── */
/* 텍스트 그라데이션 유틸리티 */
.text-grad { background: linear-gradient(135deg, #ff4d4d, #ff8c42, #ffd166); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* 버튼 그룹 */
.bp { background: linear-gradient(135deg, var(--acc), var(--acc2)); border: none; border-radius: 10px; color: white; font-family: 'Black Han Sans', sans-serif; font-size: 16px; padding: 14px; width: 100%; cursor: pointer; transition: all .2s; letter-spacing: .04em; }
.bp:hover { opacity: .88; }
.bp:active { transform: scale(.96); filter: brightness(1.1); }
.bp:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.bg { background: none; border: 1px solid var(--brd); border-radius: 8px; color: var(--mut); font-size: 13px; padding: 9px 14px; cursor: pointer; transition: all .2s; font-family: 'Noto Sans KR', sans-serif; }
.bg:hover { border-color: var(--mut); color: var(--txt); }
.bd { background: none; border: 1px solid rgba(255,77,77,.4); border-radius: 8px; color: var(--acc); font-size: 12px; padding: 8px 14px; cursor: pointer; transition: all .2s; font-family: 'Noto Sans KR', sans-serif; }
.bd:hover { background: var(--acc); color: white; }
.bb { background: rgba(77,166,255,.12); border: 1px solid rgba(77,166,255,.3); border-radius: 8px; color: var(--blu); font-size: 12px; padding: 8px 14px; cursor: pointer; transition: all .2s; font-family: 'Noto Sans KR', sans-serif; }
.bb:hover { background: rgba(77,166,255,.25); }
.bg-grn { background: rgba(6,214,160,.12); border: 1px solid rgba(6,214,160,.3); border-radius: 8px; color: var(--grn); font-size: 12px; padding: 8px 14px; cursor: pointer; transition: all .2s; font-family: 'Noto Sans KR', sans-serif; }
.bg-grn:hover { background: rgba(6,214,160,.25); }

/* 입력 필드 */
.inp { width: 100%; background: var(--card); border: 1px solid var(--brd); border-radius: 8px; padding: 12px 14px; color: var(--txt); font-family: 'Noto Sans KR', sans-serif; font-size: 16px; outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
.inp:focus { border-color: var(--acc); background: rgba(255,77,77,.02); }
.inp::placeholder { color: var(--mut); font-size: 14px; }

/* 라벨 */
.fl { font-size: 11px; letter-spacing: .13em; color: var(--mut); margin-bottom: 5px; text-transform: uppercase; }
.sec-lbl { font-size: 11px; letter-spacing: .12em; color: var(--mut); text-transform: uppercase; margin-bottom: 9px; }

/* 카드 (룰북 등에 사용) */
.card-box { background: var(--card); border: 1px solid var(--brd); border-radius: 8px; padding: 24px; margin-bottom: 12px; position: relative; overflow: hidden; }
.card-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
