/* ═══════════════════════════════════════════════════════════════════════════
   REFORMANCE 공용 디자인 토큰 — design-tokens.json 과 동시 갱신.
   구조(스코프 분리 — 값 누출 방지 계약):
     1) :root  전역 PRIMITIVE — 폰트(Gmarket Sans)·radius·spacing·shadow·raw 색.
     2) #app-admin  PORTAL semantic/component(--rf-p-*) — 기준: Baseball "경기 분석"
        화면의 실측 팔레트(코치 확정). 코치 어드민 전용 스코프.
     3) --rf-bb-*  BASEBALL semantic 문서화 — 값은 V5.1.1 원본이며 실제 소비는
        baseball_app/app/globals.css 의 자체 :root(원본 그대로). Baseball 은 전역
        PRIMITIVE(폰트 등)만 공유하고 --rf-p-* 를 일절 사용하지 않는다(역방향 동일).
   소비처: reformance.html(link) · static/cinema/index.html(link, 폰트만)
          · baseball_app globals.css(@import, 폰트만)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 전역 서체: Gmarket Sans (공식 OFL, 로컬 WOFF2 — static/fonts/, CDN 미사용)
   300(Light)·500(Medium)·700(Bold), font-display:swap. 라이선스: GmarketSans-LICENSE.txt ── */
@font-face {
  font-family: 'Gmarket Sans';
  font-weight: 300; font-style: normal; font-display: swap;
  src: url('/static/fonts/GmarketSans-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Gmarket Sans';
  font-weight: 500; font-style: normal; font-display: swap;
  src: url('/static/fonts/GmarketSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Gmarket Sans';
  font-weight: 700; font-style: normal; font-display: swap;
  src: url('/static/fonts/GmarketSans-Bold.woff2') format('woff2');
}

:root {
  /* ── PRIMITIVE (전역 공용) ── */
  --rf-font-sans: 'Gmarket Sans', system-ui, -apple-system, 'Apple SD Gothic Neo',
                  'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --rf-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --rf-weight-light: 300;
  --rf-weight-medium: 500;
  --rf-weight-bold: 700;
  --rf-radius-sm: 6px;
  --rf-radius: 8px;
  --rf-radius-lg: 13px;
  --rf-radius-pill: 999px;
  --rf-space-1: 4px; --rf-space-2: 8px; --rf-space-3: 12px;
  --rf-space-4: 16px; --rf-space-5: 22px; --rf-space-6: 32px;
  /* raw 색(경기 분석 실측 + V5.1.1 원본 팔레트) */
  --rf-navy-950: #07131e;
  --rf-navy-900: #0b1d2b;
  --rf-navy-800: #10293c;
  --rf-cool-50: #f7f9fa;
  --rf-cool-100: #f1f4f6;
  --rf-cool-line: #dfe6eb;
  --rf-cool-line-soft: #eaf0f3;
  --rf-steel-500: #285f8a;
  --rf-steel-700: #173f63;
  --rf-steel-soft: #e8f1f8;
  --rf-steel-rail: #74a9d1;
  --rf-slate-500: #71808f;
  --rf-slate-400: #97a4af;
  --rf-green: #1fb27a;
  --rf-gold: #f0b94e;
  --rf-red: #ed5b5b;
  --rf-white: #ffffff;
  --rf-shadow-card: 0 10px 34px rgba(13, 32, 47, 0.07);
  --rf-shadow-navy: 0 14px 34px rgba(7, 19, 30, 0.13);
  --rf-focus: rgba(40, 95, 138, 0.3);
}

/* ── PORTAL 스코프(--rf-p-*): 코치 어드민 전용 — 기준 = "경기 분석" 화면 실측.
      (#app-athlete / #app-public 라임 테마는 기존 코치 승인분이라 이 스코프 밖) ── */
#app-admin, .rf-portal {
  --rf-p-bg: var(--rf-cool-100);
  --rf-p-surface: var(--rf-white);
  --rf-p-surface-2: var(--rf-cool-50);
  --rf-p-border: var(--rf-cool-line);
  --rf-p-border-soft: var(--rf-cool-line-soft);
  --rf-p-text: var(--rf-navy-900);
  --rf-p-text-strong: var(--rf-navy-950);
  --rf-p-muted: var(--rf-slate-500);
  --rf-p-muted-2: var(--rf-slate-400);
  --rf-p-accent: var(--rf-steel-500);
  --rf-p-accent-strong: var(--rf-steel-700);
  --rf-p-accent-soft: var(--rf-steel-soft);
  --rf-p-success: var(--rf-green);
  --rf-p-warning: var(--rf-gold);
  --rf-p-danger: var(--rf-red);
  --rf-p-sidebar-bg: var(--rf-navy-950);
  --rf-p-sidebar-text: #9eb0bf;
  --rf-p-sidebar-text-active: var(--rf-white);
  --rf-p-sidebar-active-bg: linear-gradient(90deg, rgba(64, 126, 174, .28), rgba(64, 126, 174, .08));
  --rf-p-sidebar-active-rail: var(--rf-steel-rail);
  --rf-p-card-radius: var(--rf-radius-lg);
  --rf-p-card-shadow: var(--rf-shadow-card);
  --rf-p-btn-primary-bg: var(--rf-p-accent);
  --rf-p-btn-primary-hover: var(--rf-p-accent-strong);
  --rf-p-btn-primary-fg: var(--rf-white);
  --rf-p-pill-active-bg: var(--rf-navy-800);
  --rf-p-pill-active-fg: var(--rf-white);
}

/* ── BASEBALL 스코프(--rf-bb-*): 값 문서화 = V5.1.1 원본. 실소비는 baseball globals
      자체 :root(원본 그대로 — 여기 값과 항상 일치 유지). 포털에서 사용 금지. ── */
.rf-baseball-doc {
  --rf-bb-canvas: #f1f4f6;
  --rf-bb-surface: #ffffff;
  --rf-bb-sidebar: #07131e;
  --rf-bb-accent: #285f8a;
  --rf-bb-green: #1fb27a;
  --rf-bb-gold: #f0b94e;
  --rf-bb-red: #ed5b5b;
}

/* form control 폰트 상속(전역) — 브라우저 기본체로 떨어지는 것 방지.
   모노·디스플레이 등 개별 명시 지정은 그대로 우선. */
button, input, select, textarea { font-family: inherit; }
