/* ============================================================
   EC TUTOR — POLISH (2026-11-13 체계적 디자인 개선, 마지막에 로드)
   목표: ① 접근성(포커스·대비·터치) ② 일관된 간격/반경 스케일
        ③ 외부인 랜딩 2열 레이아웃 ④ 움직임 줄이기 존중
   원칙: 새 색·폰트·외부 자산 추가 없음 (운영비·로딩 비용 0 유지)
   ============================================================ */
:root {
  --muted: #4d5c78;            /* 흰 배경 대비 강화 (기존 #63728f → AA 근접) */
  --focus: #1f54e0;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --tap: 44px;                 /* 최소 터치 영역 */
}

/* --- 포커스: 키보드 사용자에게 항상 보이게 --- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.input:focus-visible { outline-offset: 0; }

/* --- 터치 영역·입력: 초등학생 손가락과 iOS 줌 방지 --- */
.btn, .login-tabs button, .rail-nav button, .icon-btn { min-height: var(--tap); }
.input { font-size: 16px; min-height: var(--tap); }
.login-tabs button[aria-selected="true"], .login-tabs button.on { font-weight: 800; }

/* --- 본문 보조 텍스트 대비 --- */
.tiny.muted, .muted, .sec-head .sub, .section-head .sub { color: var(--muted); }

/* --- 카드 상호작용: 마우스 기기에서만, 과장 없이 --- */
@media (hover: hover) and (pointer: fine) {
  .game-card, .card.hoverable { transition: transform .16s ease, box-shadow .16s ease; }
  .game-card:hover, .card.hoverable:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(56, 86, 150, .16), inset 0 1px 0 #fff;
  }
}

/* --- 로더: 스피너 대신 내용 자리 표시(스켈레톤 느낌) --- */
.loader { min-height: 120px; border-radius: var(--r-md); }

/* --- 움직임 줄이기 설정 존중 --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .login-float, .cloud { animation: none !important; }
}

/* --- 외부인 랜딩: 데스크톱 2열 (가치 제안 | 로그인) --- */
.login-body { overflow-y: auto; place-items: start center; }
.login-wrap {
  display: grid; gap: 20px; align-items: start;
  width: min(1120px, 100%); margin: 12px auto 0; position: relative; z-index: 2;
}
.login-wrap .login-card { justify-self: center; width: min(460px, 100%); }
.visitor-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 18px 40px rgba(56, 86, 150, .12), inset 0 1px 0 #fff;
  padding: 26px 26px 20px; text-align: left;
}
.visitor-panel h2 { font-size: 26px; line-height: 1.25; margin: 6px 0 8px; color: #17233b; }
.visitor-panel .lead { color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
.visitor-points { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.visitor-points li {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px; line-height: 1.5;
}
.visitor-points b { color: #17233b; }
.visitor-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 6px; }
.visitor-steps .step {
  background: #eaf2ff; color: #1f3a6e; border-radius: 999px;
  padding: 6px 12px; font-weight: 700; font-size: 13px;
}
.visitor-steps .arrow { color: #8aa0c4; font-weight: 700; }
@media (min-width: 1024px) {
  .login-wrap { grid-template-columns: 1.05fr .95fr; }
}
@media (max-width: 1023px) {
  /* 모바일: 재방문 학생이 바로 로그인하도록 카드를 먼저, 소개는 아래에 */
  .login-wrap .login-card { order: -1; }
  .visitor-panel h2 { font-size: 22px; }
}

/* --- 요금제: 가격 위계와 추천 플랜 구분 --- */
#plansList .between { border-radius: var(--r-md) !important; }
#plansList .between > b { white-space: nowrap; }
#plansList .between:nth-child(2) { border: 2px solid #2f6bff !important; background: #f4f8ff; }
#publicPlans .card-title { font-size: 17px; }

/* --- 상단바 테마색과 밝은 테마 일치 (meta theme-color와 쌍) --- */
.topbar, .hud { backdrop-filter: saturate(1.1); }

/* --- 타이포 통일: 한 벌의 글꼴·크기 체계로 (페이지마다 달라 보이던 원인 제거) --- */
body { font-family: "QuestBody", "Pretendard", "Nunito", "Malgun Gothic", system-ui, sans-serif; }
h1, h2, h3, h4, .card-title { font-family: "QuestRound", "QuestBody", "Malgun Gothic", sans-serif; }
.card-title { font-size: 17px; line-height: 1.35; }
.tiny { font-size: 12px; }
.small { font-size: 13.5px; }
.btn { font-size: 15px; }
.btn.small { font-size: 13px; }
.lobby-stat .v, .stat .v { font-size: 20px; line-height: 1.15; }
.sec-head .sec-kicker, .section-head .k { font-size: 11px; letter-spacing: .12em; }
.topbar .tb-brand small { font-size: 10px; letter-spacing: .1em; }
.hero-en { letter-spacing: .2em; }
html[lang="ko"] body { word-break: keep-all; overflow-wrap: break-word; }
.msg, .card p, .lead { line-height: 1.55; }

/* --- 게임 타일 감각 (Roblox류 플랫폼 착안: 큼직·두툼·눌리는 맛) --- */
.game-card { border-radius: 18px; overflow: hidden; }
.game-card:active { transform: translateY(2px) scale(.99); }
.play-btn:active, .btn.big:active { transform: translateY(3px); box-shadow: 0 2px 0 #1746c4, 0 8px 18px rgba(47,107,255,.25); }
.map-node[data-locked="1"] { opacity: .55; filter: saturate(.4); }
.map-node[data-locked="1"] .node-bubble { background: #dbe6f5; }
#consultBtn { font-weight: 800; }

/* --- 성인 밴드: 같은 플랫폼, 차분한 톤 --- */
body[data-band="adult"] .login-float,
body[data-band="adult"] .hero-banner::before { display: none; }
body[data-band="adult"] .hero-h { letter-spacing: -0.5px; }
body[data-band="adult"] .game-card { border-radius: 12px; }

/* --- 인쇄: 리포트 화면을 종이로 뽑을 때 장식 제거 --- */
@media print {
  .rail, .topbar, .hud .hud-stats, .toast-wrap, .login-sky { display: none !important; }
  body { background: #fff !important; }
  body.platform { padding-left: 0 !important; }
}
