/* ===================================================================
 *  main.css  -  HaloMakers site
 *
 *  두 층으로 나뉘어 있다.
 *
 *  1) primitive 토큰 (--color-*, --font-*, --radius-*, --shadow-*)
 *     "broadsheet" 이라는 편집형 디자인 시스템에서 가져온 값 층.
 *     원래 별도 stylesheet에 있던 것을 이 파일 상단으로 병합해
 *     외부 의존성을 없앴다. 색·서체·라운드 값을 바꾸고 싶으면 여기만 만진다.
 *
 *  2) semantic 토큰 (--bg, --text, --accent, --border 등) → 실제 규칙
 *     기존 사이트 구조를 그대로 유지하기 위해 semantic 층을 남긴다.
 *     각 규칙은 semantic 만 참조하고, primitive를 직접 만지지 않는다.
 * =================================================================== */

/* ---------------------------------------------------------------
 * 0. PRIMITIVE TOKENS  (broadsheet)
 *
 *  단일 라이트 팔레트. 배경은 순백, 텍스트는 near-black,
 *  강조는 딥 틸(#0088B0) + 대비 warm(#C7333B).
 *  헤딩만 세리프, 본문은 sans (Pretendard).
 * --------------------------------------------------------------- */

:root {
  /* 중립 스케일 */
  --color-bg:            #FFFFFF;
  --color-surface:       #FFFFFF;
  --color-text:          #101014;
  --color-divider:       #D5D6DA;
  --color-neutral-100:   #F7F7F8;
  --color-neutral-200:   #EEEEF0;
  --color-neutral-300:   #E1E2E5;
  --color-neutral-600:   #737480;
  --color-neutral-700:   #4C4D57;

  /* 강조 - Blue Archive풍 비비드 블루 */
  --color-accent:        #2F6FED;
  --color-accent-100:    #EAF1FE;
  --color-accent-600:    #2560D6;
  --color-accent-700:    #1948A3;
  --color-accent-800:    #123572;

  /* 대비 warm accent (에러도 여기서 파생) */
  --color-accent-2:      #C7333B;
  --color-accent-2-100:  #FDECEA;
  --color-accent-2-700:  #A0272E;
  --color-accent-2-800:  #7A1D22;

  /* 세만틱 시그널 */
  --color-process-yellow: #F4CE00;

  /* 서체 - 모던 단일 산세리프 페어링 (헤딩도 본문과 통일) */
  --font-body:    "Pretendard Variable", Pretendard, -apple-system,
                  BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-heading: var(--font-body);
  --font-heading-weight: 700;

  /* 반경 - 모던, 소프트한 라운드 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* 그림자 - 소프트한 모던 엘리베이션 */
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
}


/* ---------------------------------------------------------------
 * 1. CUSTOM PROPERTIES (Design Tokens) - Light (base)
 * --------------------------------------------------------------- */

:root {
  /* 배경/표면 - Broadsheet 컬러 토큰 그대로 */
  --bg: var(--color-bg);
  --bg-surface: var(--color-surface);
  --bg-surface-raised: var(--color-neutral-200);
  --bg-surface-hover: var(--color-neutral-300);
  --bg-input: var(--color-surface);

  /* 테두리 / 보조 표면 */
  --border: var(--color-divider);
  --border-strong: color-mix(in srgb, var(--color-text) 30%, transparent);
  --border-focus: var(--color-accent);

  /* 강조 - 프로세스 시안 + 드문 마젠타 */
  --accent: var(--color-accent);
  --accent-hover: var(--color-accent-600);
  --accent-soft: color-mix(in srgb, var(--color-accent) 10%, transparent);
  --accent-secondary: var(--color-accent-2);
  --accent-secondary-soft: color-mix(in srgb, var(--color-accent-2) 10%, transparent);
  --accent-rgb: 0, 136, 176;

  /* 텍스트 - 본문 색은 accent-700으로, 순수 accent는 인터페이스 요소 전용 */
  --text: var(--color-text);
  --text-secondary: var(--color-neutral-700);
  --text-muted: var(--color-neutral-600);
  --text-inverse: var(--color-neutral-100);
  --text-link: var(--color-accent-700);

  /* 시맨틱 */
  --error: var(--color-accent-2-700);
  --error-soft: color-mix(in srgb, var(--color-accent-2) 8%, transparent);
  --success: #1C8F5C;
  --success-soft: rgba(28, 143, 92, 0.08);
  --warning: var(--color-process-yellow);
  --warning-soft: color-mix(in srgb, var(--color-process-yellow) 12%, transparent);
  --info: var(--color-accent);
  --info-soft: var(--accent-soft);

  /* 타이포그래피 - Broadsheet 폰트 토큰 그대로 상속 */
  --font-sans: var(--font-body);
  --font-display: var(--font-heading);
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace,
    SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 반경 - Broadsheet 반경 토큰 */
  --radius-sm: var(--radius-sm);
  --radius: var(--radius-md);
  --radius-lg: var(--radius-lg);
  --radius-xl: calc(var(--radius-lg) * 1.5);
  --clip: 0px;
  --clip-lg: 0px;

  /* 이펙트 - Broadsheet 섀도 토큰 */
  --shadow: var(--shadow-sm);
  --shadow-lg: var(--shadow-lg);
  --transition: 0.15s ease;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

/* Broadsheet는 지면(paper) 기반 시스템만 사용 — 다크 서피스 없음 */


/* ---------------------------------------------------------------
 * 2. RESET & BASE
 * --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 한글 어절이 음절 단위로 끊기지 않게. 영문 줄바꿈에는 영향 없음 */
  word-break: keep-all;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

::selection {
  background: var(--accent);
  color: var(--text-inverse);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ---------------------------------------------------------------
 * 3. TYPOGRAPHY
 * --------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  color: var(--text);
  letter-spacing: -0.015em;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1875rem; }
h4 { font-size: 1.0625rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

p:last-child {
  margin-bottom: 0;
}

label,
legend {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

small {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-input);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* 섹션 눈금 라벨 - 무채색 트랙킹 캡션, "AI 카드" 대신 게임 UI의 인덱스 표기 느낌 */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-link);
  margin-bottom: 0.375rem;
}


/* ---------------------------------------------------------------
 * 4. SITE HEADER
 * --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Landing header carries a centered tagline below the row; form-page
   headers (member/project) only render .header-row, so the extra
   centering here is a no-op for them. */
.site-header:has(.tagline) {
  text-align: center;
}

.header-row {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}


/* ---------------------------------------------------------------
 * 5. LANGUAGE SWITCHER - 펼침 드롭다운
 * --------------------------------------------------------------- */

.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  user-select: none;
}

.lang-trigger::-webkit-details-marker { display: none; }

.lang-trigger:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.lang-switcher[open] .lang-trigger {
  color: var(--accent);
  border-color: var(--accent);
}

.lang-trigger__chevron {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.lang-switcher[open] .lang-trigger__chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 8rem;
  padding: 0.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lang-btn {
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  padding: 0.5rem 0.625rem;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  color: var(--text);
  background: var(--bg-surface-raised);
}

.lang-btn.active {
  color: var(--accent);
  font-weight: 700;
}


/* ---------------------------------------------------------------
 * 6. FOOTER
 * --------------------------------------------------------------- */

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.site-footer p {
  margin: 0;
}

/* Footer legal links strip - 얇은 라인. IP 고지·저작권 위쪽에 배치 */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 0.625rem;
}

.legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.legal-links__sep {
  color: var(--text-muted);
}


/* ---------------------------------------------------------------
 * 6b. LEGAL PAGES (privacy, terms) - 편집형 톤 그대로
 * --------------------------------------------------------------- */

.legal-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin: 0 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.legal-subheading {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 1.25rem 0 0.5rem;
}

/* 반응형 스크롤 컨테이너 - 좁은 화면에서 표가 페이지 폭을 튀어나가지 않게 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal-table th,
.legal-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-table thead th {
  background: var(--bg-surface-raised);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.legal-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-table td:first-child {
  color: var(--text);
  font-weight: 500;
}

.legal-table td:not(:first-child),
.legal-table tbody tr:not(:has(td:first-child + td:last-child)) td:not(:first-child) {
  color: var(--text-secondary);
}


/* ---------------------------------------------------------------
 * 7. LANDING PAGE
 * --------------------------------------------------------------- */

.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 700px;
  width: 100%;
  /* 부모(.content-container)는 960px인데 여기는 700px로 좁으므로,
     auto 마진이 없으면 카드가 왼쪽에 붙고 오른쪽만 비어 보인다. */
  margin-inline: auto;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  clip-path: polygon(0 0, calc(100% - var(--clip)) 0, 100% var(--clip), 100% 100%, 0 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition:
    background var(--transition),
    border-color var(--transition);
}

.card:hover {
  border-color: var(--accent);
  border-top-color: var(--accent);
  background: var(--bg-surface-raised);
  text-decoration: none;
}

.card__icon {
  color: var(--accent);
  width: 44px;
  height: 44px;
}

.card--project .card__icon {
  color: var(--accent-secondary);
}

.card--project:hover {
  border-color: var(--accent-secondary);
  border-top-color: var(--accent-secondary);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}

.card:hover .card__title {
  color: var(--accent);
}

.card--project:hover .card__title {
  color: var(--accent-secondary);
}

.card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}


/* ---------------------------------------------------------------
 * 8. FORM PAGE LAYOUT
 * --------------------------------------------------------------- */

.form-page {
  flex: 1;
  padding: 1.5rem 1rem 3rem;
}

.form-container {
  max-width: 720px;
  margin: 0 auto;
}

.page-title {
  margin-bottom: 0.5rem;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}


/* ---------------------------------------------------------------
 * 9. NOTICES / WARNING BOXES - 좌측 바 + 옅은 틴트 (풀 그라디언트 카드 지양)
 * --------------------------------------------------------------- */

.notice {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-left: 3px solid;
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg-surface);
}

.notice strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}

.notice a {
  font-weight: 600;
}

.notice--warning {
  border-left-color: var(--warning);
  color: var(--text);
}

.notice--warning strong {
  color: var(--warning);
}

.notice--warning a {
  color: var(--warning);
}

.notice--info {
  border-left-color: var(--accent);
  color: var(--text);
}

.notice--info strong {
  color: var(--accent);
}

/* Warning box (project form leader warning) */
.warning-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.warning-box__title {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warning);
  margin-bottom: 0.375rem;
}

.warning-box__body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.warning-box a {
  color: var(--warning);
  font-weight: 600;
}

/* Review notice */
.review-notice {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ---------------------------------------------------------------
 * 10. INFO BOX / BENEFITS BOX
 * --------------------------------------------------------------- */

.info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-box__title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.info-box__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-box__list li {
  padding-left: 1.25rem;
  position: relative;
}

.info-box__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.info-box__list strong {
  display: block;
  color: var(--text);
  font-size: 0.9375rem;
}

.info-box__list span {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* Benefits box (alternate card-style) */
.benefits-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.benefits-box__title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.benefit-item {
  padding: 0.875rem;
  background: var(--bg-surface-raised);
  border-left: 2px solid var(--accent);
}

.benefit-item__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.benefit-item__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}


/* ---------------------------------------------------------------
 * 11. FORM SECTIONS (Fieldsets)
 * --------------------------------------------------------------- */

.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
}

.form-section legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 0.5rem;
}

.form-section legend::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}


/* ---------------------------------------------------------------
 * 12. FORM GROUPS & ROWS
 * --------------------------------------------------------------- */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group > label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.label-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.form-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}


/* ---------------------------------------------------------------
 * 13. INPUTS, SELECTS, TEXTAREAS
 * --------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="password"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23838BA1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

select option {
  background: var(--bg-surface);
  color: var(--text);
}

select[multiple] {
  background-image: none;
  padding-right: 0.75rem;
  min-height: 120px;
}

/* Deep-link locked select: 게임 서브도메인에서 ?project=로 넘어온 값.
   시각적으로 잠긴 표시(자물쇠 아이콘·회색)를 주되 사용자가 변경은 불가. */
select[data-locked="true"] {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6V4a3 3 0 0 1 6 0v2M3 6h8v6H3z' stroke='%23737480' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color: var(--text-secondary);
  cursor: default;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
}

/* Number input */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}


/* ---------------------------------------------------------------
 * 14. CHECKBOXES & RADIOS
 * --------------------------------------------------------------- */

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 0.375rem 0;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}


/* ---------------------------------------------------------------
 * 15. BUTTONS - 플랫 + 코너컷 (라운드/그림자 블룸 지양)
 * --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition);
}

.btn:hover {
  text-decoration: none;
}

/* Primary */
.btn--primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  border-radius: var(--radius);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Secondary */
.btn--secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong);
  border-radius: var(--radius);
}

.btn--secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Danger */
.btn--danger {
  background: var(--error);
  color: var(--text-inverse);
  border-color: var(--error);
}

.btn--danger:hover:not(:disabled) {
  filter: brightness(0.9);
}

.btn--danger:focus-visible {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

/* Size modifiers */
.btn--small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn--large {
  padding: 0.75rem 2rem;
  font-size: 1.0625rem;
}

/* Default (no size class) */
.btn:not(.btn--small):not(.btn--large) {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Disabled */
.btn:disabled,
.btn.btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading spinner */
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}


/* ---------------------------------------------------------------
 * 16. FORM ACTIONS
 * --------------------------------------------------------------- */

.form-actions {
  text-align: center;
  padding: 1.5rem 0 0;
}


/* ---------------------------------------------------------------
 * 17. ROLE SELECTION
 *
 * 직군이 12개로 늘어 평평한 목록으로는 훑기 어려워졌다.
 * 계열(.role-track)로 묶고, 각 선택지는 칩(.role-chip)으로 그린다.
 * 세부 분야(.subfield)는 체크했을 때만 숙련도 select가 열린다.
 * --------------------------------------------------------------- */

.role-picker {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.role-track__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.role-track__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
    color var(--transition);
}

.role-chip:hover { border-color: var(--accent); }

.role-chip:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

.role-chip:has(input:checked) span { font-weight: 600; }

/* 부 직군 상한(3개)을 채우면 남은 칩을 눌러도 반응하지 않는다는 걸 보여준다. */
.role-chip.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}
.role-chip.is-disabled:hover { border-color: var(--border); }

/* 선택 개수 표시. 상한에 닿으면 색으로 알린다. */
.counter-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: middle;
}
.counter-badge.is-full {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* 툴 상한(60개)을 채우면 남은 항목이 잠긴다는 걸 보여준다. */
.tool-item.is-disabled {
  opacity: .45;
}
.tool-item.is-disabled label {
  cursor: not-allowed;
}

/* 세부 분야: 체크 + (체크 시) 숙련도 */
.subfield-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subfield {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  transition: border-color var(--transition), background var(--transition);
}

.subfield.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.subfield__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 0;
}

.subfield__level {
  width: auto;
  min-width: 140px;
  flex: 0 0 auto;
}

.proficiency-select--primary {
  max-width: 240px;
}


/* ---------------------------------------------------------------
 * 18. TOOL CATALOG
 * --------------------------------------------------------------- */

.tool-catalog {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Tool group (modern card style) */
.tool-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tool-group__title {
  background: var(--bg-surface-raised);
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.tool-group__items {
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Tool category (alternate naming for same structure) */
.tool-category {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tool-category__header {
  background: var(--bg-surface-raised);
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.tool-category__items {
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Tool item */
.tool-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  transition: border-color var(--transition), background var(--transition);
}

.tool-item label {
  font-weight: 400;
  font-size: 0.875rem;
  cursor: pointer;
}

.tool-item.checked,
.tool-item:has(.tool-check:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tool-item select {
  width: auto;
  min-width: 100px;
  font-size: 0.8125rem;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
}


/* ---------------------------------------------------------------
 * 19. SCHEDULE GRID
 * --------------------------------------------------------------- */

.schedule-grid-wrapper {
  margin-top: 0.5rem;
}

.schedule-grid-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.schedule-grid {
  border-collapse: collapse;
  min-width: 500px;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.schedule-grid th {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2;
}

.schedule-grid td {
  padding: 0;
  border: 1px solid var(--border);
  text-align: center;
}

/* Time label column */
.schedule-grid td:first-child,
.schedule-grid .time-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 0.125rem 0.375rem;
  white-space: nowrap;
  background: var(--bg-surface);
  width: 3.5rem;
  text-align: right;
  cursor: default;
  font-variant-numeric: tabular-nums;
}

/* Clickable time slots */
.schedule-grid .slot {
  width: 100%;
  height: 18px;
  cursor: pointer;
  background: var(--bg-input);
  transition: background-color 60ms;
}

.schedule-grid .slot:hover {
  background: var(--bg-surface-hover);
}

.schedule-grid .slot.active,
.schedule-grid td.active {
  background: var(--accent);
}

/* Drag feedback */
.schedule-grid .slot.drag-preview,
.schedule-grid td.drag-preview {
  background: var(--accent-soft);
}

.schedule-grid .slot.drag-remove-preview,
.schedule-grid td.drag-remove-preview {
  background: var(--error-soft);
}


/* ---------------------------------------------------------------
 * 20. CONDITIONAL SECTIONS
 * --------------------------------------------------------------- */

.conditional-section {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
}


/* ---------------------------------------------------------------
 * 21. DYNAMIC LISTS (Links, Contacts, Needed Roles)
 * --------------------------------------------------------------- */

.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Shared dynamic list item */
.dynamic-list-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  position: relative;
}

.dynamic-list-item .remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition);
  justify-self: end;
}

.dynamic-list-item .remove-btn:hover {
  color: var(--error);
}

/* Link row */
.link-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.link-row input {
  flex: 1;
}

.link-row .btn--remove {
  flex-shrink: 0;
  padding: 0.625rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.link-row .btn--remove:hover {
  color: var(--error);
  border-color: var(--error);
}

/* Contact row */
.contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
}

.contact-row .btn--remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.125rem;
  line-height: 1;
  transition: color var(--transition);
}

.contact-row .btn--remove:hover {
  color: var(--error);
}

/* Needed role row */
.needed-role-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
}

.needed-role-row .btn--remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.125rem;
  line-height: 1;
  transition: color var(--transition);
}

.needed-role-row .btn--remove:hover {
  color: var(--error);
}

/* Dynamic row (JS-generated base class) */
.dynamic-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.dynamic-row input,
.dynamic-row select {
  flex: 1;
  min-width: 100px;
}

.dynamic-row .link-url { flex: 2; min-width: 180px; }
.dynamic-row .link-label { flex: 1; min-width: 80px; }
.dynamic-row .link-type { flex: 0 0 auto; min-width: 130px; }
.dynamic-row .needed-role-code { flex: 2; }
.dynamic-row .needed-role-count { flex: 0 0 70px; min-width: 70px; }
.dynamic-row .needed-role-priority { flex: 0 0 80px; min-width: 80px; }
.dynamic-row .needed-role-note { flex: 1; }
.dynamic-row .contact-type { flex: 0 0 auto; min-width: 110px; }
.dynamic-row .contact-value { flex: 2; }
.dynamic-row .contact-label { flex: 1; }

.remove-row-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
}

.remove-row-btn:hover {
  color: var(--error);
}

.add-row-btn {
  /* Inherits from .btn .btn--secondary .btn--small in HTML */
}


/* ---------------------------------------------------------------
 * 21b. JS-GENERATED ROLE, TOOL, SCHEDULE ELEMENTS
 * --------------------------------------------------------------- */

/* 직군 칩·세부 분야 스타일은 §17로 옮겼다. 여기에는 공통 select만 남긴다. */
.proficiency-select {
  width: auto;
  min-width: 100px;
}

/* Tool groups (rendered by member.js) */
.tool-group-label {
  background: var(--bg-surface-raised);
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.tool-list {
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-check {
  /* checkbox inside tool items */
  accent-color: var(--accent);
}

.tool-proficiency {
  width: auto;
  min-width: 80px;
  font-size: 0.8125rem;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  margin-left: 0.25rem;
}

/* Checkbox options (rendered by project.js for genres/platforms) */
.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
    color var(--transition);
  margin: 0 0.25rem 0.25rem 0;
}

.checkbox-option:hover {
  border-color: var(--accent);
}

.checkbox-option:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

/* Schedule grid (rendered by member.js) */
.schedule-header {
  display: grid;
  grid-template-columns: 3.5rem repeat(7, 1fr);
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.schedule-corner {
  padding: 0.375rem;
}

.schedule-day {
  padding: 0.375rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.schedule-row {
  display: grid;
  grid-template-columns: 3.5rem repeat(7, 1fr);
}

.schedule-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 0 0.375rem;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  min-height: 14px;
  font-variant-numeric: tabular-nums;
}

.schedule-cell {
  min-height: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-input);
  transition: background-color 60ms;
}

.schedule-cell:hover {
  background: var(--bg-surface-hover);
}

.schedule-cell.active {
  background: var(--accent);
}

/* Consent label (rendered by shared.js) */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.consent-label input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.consent-text {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

/* btn-secondary (used by showDone in shared.js) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

/* Parttime / completed-project conditional fields */
.parttime-fields,
.completed-project-fields {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
}


/* ---------------------------------------------------------------
 * 22. CONSENT ITEMS
 * --------------------------------------------------------------- */

.consents-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.consent-item {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: border-color var(--transition);
}

.consent-item .consent-body {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.65;
  max-height: 220px;
  overflow-y: auto;
}

.consent-item .consent-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.consent-item.required .consent-check {
  font-weight: 500;
}

.consent-item.required .consent-check::after {
  content: '*';
  color: var(--error);
  margin-left: 0.125rem;
}

/* Markdown-lite rendering (consent document bodies) */
.consent-body p {
  color: var(--text-secondary);
  margin-bottom: 0.6em;
}

.consent-body p:last-child {
  margin-bottom: 0;
}

.consent-body strong {
  color: var(--text);
  font-weight: 700;
}

.consent-body .md-h {
  color: var(--text);
  font-weight: 700;
  margin-top: 0.9em;
  margin-bottom: 0.4em;
}

.consent-body .md-h:first-child {
  margin-top: 0;
}

.consent-body .md-h1 { font-size: 0.9375rem; }
.consent-body .md-h2 { font-size: 0.9375rem; }
.consent-body .md-h3 { font-size: 0.875rem; color: var(--text-secondary); }
.consent-body .md-h4 { font-size: 0.8125rem; color: var(--text-secondary); }

.consent-body .md-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.6em;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.consent-body .md-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75em 0;
}

.consent-body .md-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.75em;
}

.consent-body .md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.consent-body .md-table th,
.consent-body .md-table td {
  border: 1px solid var(--border);
  padding: 0.375rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.consent-body .md-table th {
  background: var(--bg-surface);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.consent-body code {
  font-size: 0.8em;
}

.consent-required-notice {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}


/* ---------------------------------------------------------------
 * 23. BADGES
 * --------------------------------------------------------------- */

.badge-required,
.required-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--error);
  background: var(--error-soft);
  padding: 0.125em 0.4em;
  border-radius: var(--radius-sm);
  margin-left: 0.375rem;
  vertical-align: middle;
  line-height: 1.4;
}

.badge-optional,
.optional-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-surface-raised);
  padding: 0.125em 0.4em;
  border-radius: var(--radius-sm);
  margin-left: 0.375rem;
  vertical-align: middle;
  line-height: 1.4;
}


/* ---------------------------------------------------------------
 * 24. ERROR STATES
 * --------------------------------------------------------------- */

/* Field-level errors */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 2px var(--error-soft);
}

.has-error .consent-item,
.consent-item.has-error {
  border-color: var(--error);
}

.field-error,
.error-text {
  color: var(--error);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Global error banner */
.global-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--error);
  border-radius: var(--radius-sm);
  margin: 1rem auto;
  max-width: 720px;
}

.global-error__text {
  font-size: 0.875rem;
  color: var(--error);
  line-height: 1.5;
}

.global-error__close {
  background: none;
  border: none;
  color: var(--error);
  font-size: 1.375rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.global-error__close:hover {
  opacity: 1;
}


/* ---------------------------------------------------------------
 * 25. DONE / SUCCESS SCREEN
 * --------------------------------------------------------------- */

.done-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 2rem 1rem;
}

.done-card {
  text-align: center;
  max-width: 480px;
}

.done-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.done-card p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.done-card strong {
  color: var(--accent);
}

.done-card .btn {
  margin-top: 1.5rem;
}

/* Submit result overlay */
.submit-result {
  padding: 2rem 0;
}

.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--success);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.result-card--success .result-icon {
  color: var(--success);
  margin-bottom: 1rem;
}

.result-card h2 {
  margin-bottom: 0.5rem;
}

.result-card p {
  color: var(--text-secondary);
}

.result-ref {
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;
}

.result-ref code {
  font-size: 0.9375rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.625rem;
  border-color: transparent;
}


/* ---------------------------------------------------------------
 * 26. LOADING STATE
 * --------------------------------------------------------------- */

.loading-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
  padding: 1rem 0;
  text-align: center;
}

/* 부 직군처럼 "먼저 다른 걸 고르면 채워지는" 영역의 안내 문구.
   로딩 중이 아니라 대기 상태이므로 기울임은 쓰지 않는다. */
.role-hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.75rem 0;
}


/* ---------------------------------------------------------------
 * 27. PLACEHOLDER FADE ANIMATION
 * --------------------------------------------------------------- */

@keyframes placeholderFadeOut {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes placeholderFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.placeholder-fade-out {
  animation: placeholderFadeOut 0.6s var(--ease) forwards;
}

.placeholder-fade-in,
.intro-fade-placeholder {
  animation: placeholderFadeIn 0.6s ease-out forwards;
}


/* ---------------------------------------------------------------
 * 28. MULTI-SELECT HELPER
 * --------------------------------------------------------------- */

.multi-select-wrapper select[multiple] option {
  padding: 0.375rem 0.5rem;
}

.multi-select-wrapper select[multiple] option:checked {
  background: var(--accent);
  color: var(--text-inverse);
}


/* ---------------------------------------------------------------
 * 29. REDUCED MOTION
 * --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ---------------------------------------------------------------
 * 30. RESPONSIVE BREAKPOINTS
 * --------------------------------------------------------------- */

/* >= 600px: two-column form rows and grids */
@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .benefits-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr 1fr;
  }

  .needed-role-row {
    grid-template-columns: 2fr 1fr auto;
  }

  .dynamic-list-item.link-item {
    grid-template-columns: 1fr 1fr auto;
    align-items: start;
  }

  .dynamic-list-item.contact-item {
    grid-template-columns: 1fr 1fr;
  }

  .dynamic-list-item.needed-role-item {
    grid-template-columns: 2fr 1fr;
  }
}

/* <= 480px: compressed mobile layout */
@media (max-width: 480px) {
  .site-header {
    padding: 0 0.75rem;
  }

  .site-header:not(:has(.header-row)) {
    padding: 1.25rem 0.75rem;
  }

  .header-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .lang-switcher {
    order: 2;
    width: 100%;
    justify-content: center;
  }

  .form-page {
    padding: 1rem 0.75rem 2rem;
  }

  .form-section {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 2rem 1.25rem;
  }

  .form-actions .btn--large {
    width: 100%;
  }

  /* 좁은 화면에서는 칩을 한 줄에 하나씩 세워 터치 영역을 넓힌다. */
  .role-track__options {
    flex-direction: column;
  }

  .subfield {
    align-items: stretch;
    flex-direction: column;
  }

  .subfield__level {
    width: 100%;
  }
}


/* ---------------------------------------------------------------
 * 31. PRINT STYLES
 * --------------------------------------------------------------- */


/* ---------------------------------------------------------------
 * 20. PUBLIC SITE  (landing / games / join / support / launcher)
 * --------------------------------------------------------------- */

/* --- 상단 네비 --- */

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  margin-right: 1.25rem;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a.is-current {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 헤더에 네비가 들어오면 언어 전환기는 밀어내지 않는다 */
.header-row:has(.site-nav) .lang-switcher {
  margin-left: 0;
}

/* --- 페이지 셸 --- */

.content-page {
  padding: 2.5rem 1rem 4rem;
}

.content-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.content-container--narrow {
  max-width: 720px;
}

.section {
  padding: 4rem 1rem;
}

.section--alt {
  background: var(--bg-surface);
}
  border-bottom: 1px solid var(--border);
}

.section__inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.5rem;
}

/* 섹션 최상단에 붙는 인덱스 라벨. eyebrow를 HUD 판독계 느낌으로 확장 */
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--accent);
}

.section__lead {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.7;
}

.section__head .section__lead {
  margin-bottom: 0;
}

.section__more {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.section__more::after {
  content: ' →';
}

/* --- 히어로 --- */

.hero {
  position: relative;
  padding: 7rem 1.5rem 5.5rem;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero__text {
  min-width: 0;
}

.hero__visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 10;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__visual-tag {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

/* 히어로 이미지를 임시로 빼둔 동안 쓰는 텍스트 전용 레이아웃.
   기본 .hero__inner는 2단(1.1fr 0.9fr)이라 이미지가 없으면 텍스트가
   반쪽 폭에 갇힌 채 오른쪽이 빈다. 이미지를 되살리면 이 클래스만 지운다. */
.hero__inner--text-only {
  grid-template-columns: 1fr;
  max-width: 820px;
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.banner-strip {
  width: 100%;
  aspect-ratio: 21 / 6;
  max-height: 320px;
}

/* 캡션은 심플하게. 배지·프레임 없이 트래킹만 살린다 */
.hero .eyebrow {
  color: var(--text-link);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.5vw, 4.5rem);
  font-weight: var(--font-heading-weight);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 1.5rem;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero__lead {
  font-size: 1.25rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 2.5rem;
  max-width: 38rem;
  word-break: keep-all;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* --- 특징 그리드 --- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

.feature {
  padding: 0;
}

.feature__index {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: var(--font-heading-weight);
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section--alt .feature {
  background: transparent;
}

.feature--accent .feature__index {
  color: var(--accent-secondary);
}

.feature__title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 0.625rem;
}

.feature__body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  word-break: keep-all;
}

/* --- 3분기 CTA --- */

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 2.25rem 1.75rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: box-shadow var(--transition), transform var(--transition);
}

.cta-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.cta-card--accent {
  background: var(--bg-surface);
}

.cta-card--accent:hover {
  box-shadow: var(--shadow-lg);
}

.cta-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin-bottom: 0.375rem;
}

.cta-card__icon--accent {
  color: var(--accent);
  background: var(--accent-soft);
}

.cta-card__icon--accent2 {
  color: var(--accent-secondary);
  background: var(--accent-secondary-soft);
}

.cta-card__title {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.cta-card__desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.cta-card__action {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}

.cta-card__action::after {
  content: ' →';
}

/* --- 게임 카드 --- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* 랜딩의 미리보기 줄은 항목이 적어 auto-fill 이면 오른쪽이 비어 보인다.
   auto-fit 으로 남은 트랙을 접어 카드가 폭을 채우게 한다. */
.game-grid--preview {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.game-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.game-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.game-card--paused {
  opacity: 0.6;
}

.game-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-surface-raised);
  overflow: hidden;
}

.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card__media img {
  transform: scale(1.04);
}

.game-card__status {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #F8F4F4;
  background: rgba(32, 30, 29, 0.82);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-sm);
}

.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.125rem 1.25rem 1.25rem;
  flex: 1;
}

.game-card__title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.game-card__tagline {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.game-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.5rem;
}

.tag.tag-accent {
  border: none;
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}

.tag.tag-accent-2 {
  border: none;
  background: var(--color-accent-2-100);
  color: var(--color-accent-2-800);
}

.game-card__cta {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
}

.game-card__cta::after {
  content: ' →';
}

/* --- 게임 상세 다이얼로그 --- */

.game-dialog {
  /* 브라우저 기본 dialog 배치에 기대지 않고 명시적으로 중앙에 둔다.
     (기본값에 맡기면 width 를 지정했을 때 좌측에 붙는 경우가 있다) */
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  max-width: 640px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-surface);
  color: var(--text);
}

.game-dialog::backdrop {
  background: rgba(8, 10, 18, 0.62);
  backdrop-filter: blur(2px);
}

.game-dialog__inner {
  position: relative;
}

.game-dialog__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-inverse);
  background: rgba(18, 20, 31, 0.7);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.game-dialog__close:hover {
  background: rgba(18, 20, 31, 0.9);
}

.game-dialog__banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-surface-raised);
}

.game-dialog__body {
  padding: 1.5rem;
}

.game-dialog__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.375rem;
}

.game-dialog__tagline {
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
}

.game-dialog__desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.game-dialog__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.375rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}

.game-dialog__meta dt {
  color: var(--text-muted);
  font-weight: 600;
}

.game-dialog__meta dd {
  margin: 0;
  color: var(--text-secondary);
}

.game-dialog__note {
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-surface-raised);
  border-radius: 3px;
  padding: 0.625rem 0.875rem;
  margin: 0;
}

/* --- 공통 블록 --- */

.block {
  margin-top: 3rem;
}

.block__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.block__body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plain-list li {
  padding-left: 0.875rem;
  border-left: 2px solid var(--border-strong);
}

.plain-list strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.plain-list span {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* --- 격려 박스 (모집 페이지) --- */

.encourage {
  position: relative;
  margin-top: 3rem;
  padding: 2.25rem 1.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  clip-path: polygon(0 0, calc(100% - var(--clip-lg)) 0, 100% var(--clip-lg), 100% 100%, var(--clip-lg) 100%, 0 calc(100% - var(--clip-lg)));
  text-align: center;
}

.encourage__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.encourage__body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 auto 0.75rem;
  max-width: 36rem;
}

.encourage__note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- 후원 페이지 --- */

.disclaimer {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface-raised);
  border-left: 3px solid var(--accent);
  clip-path: polygon(0 0, calc(100% - var(--clip)) 0, 100% var(--clip), 100% 100%, 0 100%);
}

.disclaimer p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

.status-panel {
  margin: 2rem 0;
  padding: 2.25rem 1.75rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  clip-path: polygon(0 0, calc(100% - var(--clip-lg)) 0, 100% var(--clip-lg), 100% 100%, 0 100%);
  text-align: center;
}

.status-panel__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.status-panel__body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

.contact-mail {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.report-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.9375rem;
}

.report-list__date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- 카드 액션 (모집 페이지 2카드) --- */

.card__action {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}

.card__action::after {
  content: ' →';
}

/* --- 상태 텍스트 --- */

.empty-text {
  grid-column: 1 / -1;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* 그리드 안(게임 목록)에서는 여백을 더 준다 */
.game-grid > .empty-text {
  padding: 2.5rem 1rem;
}

.form-hint--center {
  text-align: center;
  margin-top: 1rem;
}

/* --- 푸터 IP 고지 --- */

.ip-notice {
  font-size: 0.8125rem !important;
  line-height: 1.7;
  color: var(--text-muted) !important;
  max-width: 46rem;
  margin: 0 auto 0.5rem !important;
}

/* --- 반응형 --- */

@media (max-width: 720px) {
  .site-nav {
    gap: 0.875rem;
    margin-right: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    font-size: 0.875rem;
  }

  .hero {
    padding: 3.5rem 1rem 3rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-row {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-card,
  .game-card,
  .game-card__media img {
    transition: none;
  }

  .cta-card:hover,
  .game-card:hover {
    transform: none;
  }

  .game-card:hover .game-card__media img {
    transform: none;
  }
}
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .lang-switcher,
  .btn,
  .form-actions,
  .schedule-grid-wrapper {
    display: none !important;
  }

  .form-section {
    break-inside: avoid;
    border: 1px solid #ccc !important;
    padding: 10pt;
    margin-bottom: 10pt;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666 !important;
  }

  input,
  select,
  textarea {
    border: 1px solid #999 !important;
  }
}

/* ==================================================================
   Console pages: login / password reset / onboarding
   ================================================================== */

.form-container--narrow {
  max-width: 28rem;
}

.form-group--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
}

.text-link {
  color: var(--text-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover {
  text-decoration-thickness: 2px;
}

.site-footer--minimal {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.form-section__hint {
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.prefill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}
.prefill-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.prefill-item__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.prefill-item__value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  word-break: keep-all;
}

.team-email-preview {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  background: var(--bg-surface-raised);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.team-email-preview--bad {
  background: var(--error-soft);
  color: var(--error);
  text-decoration: line-through;
}

/* ==================================================================
   Console: sidebar shell, tables, forms
   내부 관리용 — 정보 밀도와 스캔 가능성을 우선한다.
   ================================================================== */

.console-page {
  display: grid;
  grid-template-columns: 15rem 1fr;
  min-height: 100vh;
  background: var(--bg-surface-raised);
}

.console-topbar { display: none; }

.console-nav {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 50;
}
.console-nav__header { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
.console-nav__name { font-weight: 700; font-family: var(--font-display); color: var(--text); }
.console-nav__role { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 0.125rem; }
.console-nav__list { display: flex; flex-direction: column; gap: 2px; }
.console-nav__item {
  display: block;
  padding: .55rem .65rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.console-nav__item:hover { background: var(--bg-surface-raised); color: var(--text); text-decoration: none; }
.console-nav__item.is-active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
}
.console-nav__logout {
  margin-top: auto;
  padding: .55rem .65rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition), color var(--transition);
}
.console-nav__logout:hover { border-color: var(--border-strong); color: var(--text); }

.console-main {
  padding: 2rem 2.5rem 4rem;
  min-width: 0;
}
.console-main .page-title { margin-bottom: 0.25rem; }
.console-main .page-desc { margin-bottom: 1.5rem; }

.console-block {
  margin-block: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.console-block__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem 0;
}
.console-block__sub {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem 0;
}

.console-toolbar {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-block: 1rem;
  padding: .75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.console-toolbar label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}
.console-toolbar input,
.console-toolbar select {
  padding: .4rem .6rem;
  font: inherit;
  font-size: 0.875rem;
}
.console-toolbar .btn { margin-left: auto; }

.console-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  margin-block: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin-block: 0;
}
.data-table th, .data-table td {
  border-bottom: 1px solid var(--border);
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
.data-table thead th {
  background: var(--bg-surface-raised);
  font-weight: 700;
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.data-table tbody tr:hover { background: var(--bg-surface-raised); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table code { font-family: var(--font-mono); font-size: .85em; }

.kv-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 40rem;
  font-size: .9rem;
}
.kv-table th, .kv-table td {
  border-bottom: 1px solid var(--border);
  padding: .5rem .75rem;
  text-align: left;
  vertical-align: top;
}
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: none; }
.kv-table th { color: var(--text-muted); font-weight: 500; width: 11rem; }

.console-form {
  margin-block: 1rem;
  padding: 1rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.console-form summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text); }
.console-form[open] summary { margin-bottom: .75rem; }
.inline-form {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
  align-items: center;
}
.inline-form input,
.inline-form select {
  padding: .4rem .6rem;
  font: inherit;
  font-size: 0.875rem;
}

.console-log {
  margin-top: 1.5rem;
  padding: .75rem 1rem;
  background: var(--color-neutral-700);
  color: var(--color-neutral-100);
  font-family: var(--font-mono);
  font-size: .8rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 20rem;
  overflow-y: auto;
  border-radius: var(--radius-sm);
}

.quick-links {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}
.quick-link {
  display: inline-flex;
  align-items: center;
  padding: .55rem .9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .875rem;
  transition: border-color var(--transition), color var(--transition);
}
.quick-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.tag-list { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag-chip {
  padding: .2rem .55rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-secondary);
}

/* Console-only button modifiers (single-dash — kept to match the
   existing console-*.js markup rather than churn every page's JS). */
.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  border-radius: var(--radius);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-small { padding: .3rem .65rem; font-size: .8125rem; }

/* Status / role badges — replaces bare enum strings in tables */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  background: var(--bg-surface-raised);
  color: var(--text-secondary);
}
.status-badge--submitted,
.status-badge--pending { background: var(--bg-surface-raised); color: var(--text-secondary); }
.status-badge--in_review,
.status-badge--interview { background: var(--info-soft); color: var(--accent-hover); }
.status-badge--accepted,
.status-badge--joined,
.status-badge--active { background: var(--success-soft); color: var(--success); }
.status-badge--rejected,
.status-badge--suspended { background: var(--error-soft); color: var(--error); }
.status-badge--on_hold { background: var(--warning-soft); color: #8a6d00; }
.status-badge--withdrawn,
.status-badge--left { background: var(--bg-surface-raised); color: var(--text-muted); }

/* Off-canvas nav below tablet width */
@media (max-width: 860px) {
  .console-page { grid-template-columns: 1fr; }

  .console-topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: .75rem 1rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
  }
  .console-topbar__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text);
    flex-shrink: 0;
  }
  .console-topbar__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text); }

  .console-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82vw;
    max-width: 20rem;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 70;
  }
  body.console-nav-open .console-nav { transform: translateX(0); }

  .console-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 16, 20, .45);
    z-index: 65;
  }
  body.console-nav-open .console-nav-backdrop { display: block; }

  .console-main { padding: 1.25rem 1rem 3rem; }
  .console-block { padding: 1rem 1.1rem; }
  .console-toolbar { padding: .75rem; }
  .console-toolbar .btn { margin-left: 0; width: 100%; }
  .kv-table th { width: 8rem; }
}
