:root {
  --bg: #0f1923;
  --bg-2: #16232f;
  --red: #ff4655;      /* VALORANT */
  --accent: #17e9e1;   /* TACTIC 강조색 */
  --text: #ece8e1;
  --muted: rgba(236, 232, 225, .62);
  --line: rgba(236, 232, 225, .12);
  --panel: rgba(15, 25, 35, .86);
  --logo-size: 240px;  /* 모든 팀 로고 동일 크기 (화면 폭과 무관하게 고정 → 흐르는 속도 일정) */
  --gap: 120px;
  --header-h: 80px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-weight: 500;
  overflow-x: hidden;
}
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.eyebrow {
  font-family: "Chakra Petch", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--red);
}

/* =================== 헤더 =================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(15, 25, 35, .92);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(236, 232, 225, .08);
}
.site-logo { display: block; height: 30px; text-decoration: none; }
.site-logo svg { height: 100%; width: auto; display: block; }

.header-actions { display: flex; align-items: center; gap: 8px; }

/* 주 메뉴 (요원 / 맵 / 셋업): 오른쪽, 마이페이지 왼쪽에 붙임 */
.main-nav {
  flex: 1;
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  margin-right: 20px;
}
/* 메뉴 사이 구분선 */
.main-nav a + a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 18px;
  transform: translateY(-50%);
  background: rgba(236, 232, 225, .18);
}
/* 메뉴와 마이페이지 사이 구분선 */
.main-nav:not([hidden]) + .header-actions {
  position: relative;
  padding-left: 20px;
}
.main-nav:not([hidden]) + .header-actions::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 28px;
  transform: translateY(-50%);
  background: rgba(236, 232, 225, .22);
}
.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-family: "Black Han Sans", sans-serif;
  font-size: 20px;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
@media (max-width: 1180px) {
  .main-nav a { padding: 0 16px; font-size: 18px; }
  .main-nav a::after { left: 10px; right: 10px; }
}
/* 메뉴가 헤더 한 줄에 다 들어가지 않는 폭: 헤더 아래 두 번째 줄로 (가로로 밀어서 볼 수 있음) */
@media (max-width: 960px) {
  .site-header { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding-top: 6px; }
  .site-header .site-logo { height: 26px; margin: 0; }
  .main-nav:not([hidden]) {
    order: 3;
    flex: 0 0 100%;
    height: 44px;
    margin: 0 -8px 0 0;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid rgba(236, 232, 225, .08);
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { font-size: 16px; padding: 0 14px; }
  .main-nav + .header-actions { padding-left: 0 !important; margin-left: auto; }
  .main-nav + .header-actions::before { display: none; }
}
.main-nav a::after { /* 아래 빨간 막대 */
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: -1px;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(.6); }
.main-nav a[aria-current="page"] { color: var(--text); }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; }
.drawer-links a[aria-current="page"] { color: var(--red); }

/* 요원 / 맵: 준비 중 화면 */
.page-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 48px 40px;
  display: grid;
  gap: 12px;
  text-align: center;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.page-card::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px; top: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--accent));
}
.page-card h1 { font-family: "Black Han Sans", sans-serif; font-size: 48px; font-weight: 400; line-height: 1.1; }
.page-card p { font-size: 15px; color: var(--muted); }
.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.hbtn:hover, .hbtn[aria-expanded="true"] { border-color: var(--line); background: rgba(236, 232, 225, .05); }
.hbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hbtn.icon-only { width: 44px; padding: 0; justify-content: center; }
.hbtn.icon-only svg { width: 26px; height: 26px; }

/* 마이페이지 팝오버 */
.popover-wrap { position: relative; }
.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.pop-nick { font-family: "Black Han Sans", sans-serif; font-size: 22px; }
.pop-email { margin-top: 2px; font-size: 13px; color: var(--muted); }
.pop-logout, .drawer-logout {
  margin-top: 16px;
  width: 100%;
  height: 40px;
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.pop-logout:hover, .drawer-logout:hover { border-color: var(--red); color: var(--red); }
/* 프로필 수정 버튼 (로그아웃 위) */
.pop-edit {
  margin-top: 16px;
  width: 100%;
  height: 40px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  cursor: pointer;
}
.pop-edit:hover { background: #ff5c69; }
.pop-edit + .pop-logout { margin-top: 8px; }
.drawer-empty { margin-top: 8px; font-size: 14px; color: var(--muted); }
.drawer-links:not(:empty) + .drawer-empty { display: none; }

/* 프로필 수정 창 */
.profile-modal {
  width: min(520px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.profile-modal::backdrop { background: rgba(5, 10, 15, .75); }
.profile-form { padding: 24px 28px 26px; }
.profile-head { position: relative; display: grid; gap: 4px; margin-bottom: 4px; }
.profile-head h2 { font-family: "Black Han Sans", sans-serif; font-size: 30px; font-weight: 400; }
.profile-head .hbtn { position: absolute; top: -8px; right: -10px; }
.profile-modal { overflow-x: hidden; } /* 닫기 버튼이 가장자리에 붙어 가로 스크롤이 생기지 않게 */
.profile-form input[readonly] { color: var(--muted); background: rgba(236, 232, 225, .02); }
.profile-sub { margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(236, 232, 225, .08); font-size: 14px; font-weight: 700; }
.profile-sub span { font-weight: 500; color: var(--muted); }

/* 세줄 메뉴 서랍 */
.drawer-dim {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .25s;
}
.drawer-dim.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31;
  width: min(320px, 86vw);
  padding: 20px 24px 28px;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-links { display: grid; }
.drawer-links a {
  display: block;
  padding: 16px 4px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(236, 232, 225, .08);
  transition: color .15s, padding .15s;
}
.drawer-links a:hover { color: var(--accent); padding-left: 10px; }
.drawer-logout { margin-top: auto; }

/* =================== 메인 + 무한 로고 띠 =================== */
main {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.marquees {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 96px;
  pointer-events: none;
}.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track {
  display: flex;
  width: max-content;
  /* 멈춤·속도 변화 없음: 선형, 무한, 지속시간은 JS가 한 번만 계산 */
  animation: scroll-left var(--duration, 50s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee.to-right .track { animation-name: scroll-right; }
/* 같은 세트를 2번 이어 붙이고 -50% 만큼 이동 → 이음새 없이 반복 */
.set { display: flex; gap: var(--gap); padding-right: var(--gap); }
.set img {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  flex: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* T1은 가로로 긴 로고라 칸을 넓혀 퍼시픽과 눈에 보이는 크기(면적)를 맞춤 */
.set img.logo-t1 { width: calc(var(--logo-size) * 1.87); }
@keyframes scroll-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes scroll-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* 공통 패널 */
.auth-card, .cc-card {
  position: relative;
  z-index: 1;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.auth-card::before, .cc-card::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px; top: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--accent));
}

/* =================== 로그인 / 회원가입 =================== */
.auth-card {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
}
.auth-intro {
  padding: 40px 36px;
  border-right: 1px solid rgba(236, 232, 225, .08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-intro h1 { font-family: "Black Han Sans", sans-serif; font-size: 44px; line-height: 1.1; font-weight: 400; letter-spacing: .01em; }
.auth-intro p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.auth-intro .switch { margin-top: auto; }
.auth-intro .switch a { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-intro .switch a:hover { text-decoration: underline; }

.demo-box {
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px dashed rgba(23, 233, 225, .4);
  background: rgba(23, 233, 225, .05);
}
.auth-intro .demo-label { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .05em; }
.auth-intro .demo-value { margin-top: 4px; font-family: "Chakra Petch", monospace; font-size: 14px; line-height: 1.5; color: var(--text); }
.demo-fill {
  margin-top: 10px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(23, 233, 225, .5);
  cursor: pointer;
}
.demo-fill:hover { background: rgba(23, 233, 225, .1); }

.auth-form { padding: 40px 36px; display: grid; gap: 16px; align-content: center; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: rgba(236, 232, 225, .88); }
.field input {
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(236, 232, 225, .05);
  border: 1px solid rgba(236, 232, 225, .16);
  border-radius: 0;
  outline: none;
  transition: border-color .15s, background .15s;
}
.field input::placeholder { color: rgba(236, 232, 225, .32); }
.field input:focus { border-color: var(--accent); background: rgba(23, 233, 225, .06); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.field .hint { font-size: 12px; color: var(--red); }
.field .hint:empty { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.agrees { display: grid; gap: 10px; }
.agree { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(236, 232, 225, .75); cursor: pointer; }
.agree input { width: 16px; height: 16px; flex: none; accent-color: var(--red); }
.agree em { font-style: normal; font-weight: 700; color: var(--red); }
.agree.invalid span { color: var(--red); }

.submit {
  height: 50px;
  margin-top: 4px;
  font-family: "Black Han Sans", sans-serif;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .12em;
  color: #fff;
  background: var(--red);
  border: 0;
  cursor: pointer;
  /* 발로란트풍 모서리 컷 */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background .15s;
}
.submit:hover { background: #ff5c69; }
.submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-msg { font-size: 13px; color: var(--accent); text-align: center; }
.form-msg.error { color: var(--red); }
.form-msg:empty { display: none; }

/* 또는 구분선 · Google 버튼 · 게스트 */
.or-line { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: rgba(236, 232, 225, .14); }
.google-slot { min-height: 44px; display: flex; justify-content: center; }
.google-slot > div { width: 100%; display: flex; justify-content: center; }
.google-fallback {
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: rgba(236, 232, 225, .6);
  background: #202124;
  border: 1px solid rgba(236, 232, 225, .16);
}
.google-fallback svg { width: 18px; height: 18px; }
.google-terms { margin-top: -8px; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.guest-btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(236, 232, 225, .28);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.guest-btn:hover { border-color: var(--accent); color: var(--accent); }
.guest-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guest-note { margin-top: -8px; font-size: 12px; color: var(--muted); text-align: center; }

/* 이메일 인증 (회원가입 2단계) */
.verify-head { display: grid; gap: 8px; }
.verify-head h2 { font-family: "Black Han Sans", sans-serif; font-size: 32px; font-weight: 400; line-height: 1.1; }
.verify-head p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.verify-head strong { color: var(--text); word-break: break-all; }
.field input.code-input { height: 56px; font-family: "Chakra Petch", monospace; font-size: 28px; letter-spacing: .5em; text-align: center; }
.verify-timer { margin-top: -6px; font-size: 13px; color: var(--accent); font-family: "Chakra Petch", monospace; }
.verify-timer.expired { color: var(--red); font-family: inherit; }
.verify-actions { display: flex; justify-content: center; gap: 20px; }
.link-btn { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.link-btn:disabled, .submit:disabled { opacity: .55; cursor: default; }

.agree a, .google-terms a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* 이용약관 · 개인정보 처리방침 */
body[data-view="privacy"] main, body[data-view="terms"] main { place-items: start center; }
.doc-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  padding: 44px 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  font-size: 15px;
  line-height: 1.75;
  color: rgba(236, 232, 225, .85);
}
.doc-card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: linear-gradient(90deg, var(--red), var(--accent)); }
.doc-card h1 { margin-top: 6px; font-family: "Black Han Sans", sans-serif; font-size: 40px; font-weight: 400; line-height: 1.15; color: var(--text); }
.doc-card h2 { margin: 28px 0 8px; font-size: 18px; font-weight: 900; color: var(--text); }
.doc-card p + p { margin-top: 8px; }
.doc-card ul { padding-left: 20px; display: grid; gap: 4px; }
.doc-card b { color: var(--text); }
.doc-card code { font-family: "Chakra Petch", monospace; color: var(--accent); }
.doc-card a { color: var(--accent); }
.doc-date { margin: 6px 0 20px; font-size: 13px; color: var(--muted); }
.doc-back { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(236, 232, 225, .1); }
@media (max-width: 640px) { .doc-card { padding: 32px 20px; } .doc-card h1 { font-size: 32px; } }

/* 유저 커뮤니티: 게스트 안내 */
.guest-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.guest-gate-actions .submit { display: inline-flex; align-items: center; justify-content: center; min-width: 160px; padding: 0 28px; text-decoration: none; margin-top: 0; }
.guest-gate-actions .guest-btn { height: 50px; min-width: 120px; }

/* =================== 메인 (제트 + 큰 문구) =================== */
/* 제트 머리가 패널 위로 튀어나올 자리만큼 위 여백 */
body[data-view="home"] main { padding-top: clamp(120px, 16vh, 190px); padding-bottom: 32px; }
.home-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  min-height: min(560px, calc(100vh - var(--header-h) - 220px));
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  overflow: visible; /* 제트가 패널 밖으로 */
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.home-hero::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px; z-index: 1; /* 제트(2)보다 뒤 → 튀어나온 제트 몸 위로 선이 지나가지 않음 */
  background: linear-gradient(90deg, var(--red), var(--accent));
}
/* 패널 안에서만 보이는 배경 */
.home-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(55% 85% at 80% 60%, rgba(23, 233, 225, .24), transparent 70%),
    radial-gradient(45% 60% at 96% 8%, rgba(120, 170, 255, .2), transparent 70%);
}
.home-outline { /* 뒤에 깔리는 큰 JETT 외곽선 */
  position: absolute;
  right: 3%; top: 50%;
  transform: translateY(-50%);
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(160px, 20vw, 300px);
  font-weight: 700;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(23, 233, 225, .2);
  user-select: none;
  white-space: nowrap;
}

/* 큰 문구: 제트 앞으로 겹쳐도 되게 위에 */
.home-copy { position: relative; z-index: 3; padding: 48px 0 52px clamp(32px, 5vw, 72px); }
.home-copy .eyebrow { font-size: clamp(14px, 1.3vw, 20px); letter-spacing: .34em; }
.home-title {
  margin-top: 14px;
  font-family: "Black Han Sans", sans-serif;
  font-weight: 400;
  font-size: clamp(60px, 8.2vw, 132px);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .55), 0 2px 0 rgba(0, 0, 0, .25);
}
.home-title .line { display: block; white-space: nowrap; }
.home-title .line + .line { margin-top: .06em; }
.home-title em {
  font-style: normal;
  /* 로고처럼: 발로(빨강) → 택틱(청록) */
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 35%, var(--accent) 75%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: none; /* 그림자가 그라데이션 글자를 탁하게 덮어서 끔 */
}

/* 문구 아래 버튼 2개 */
.home-actions { margin-top: clamp(22px, 3vw, 38px); display: flex; flex-wrap: wrap; gap: 12px; }
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 24px 0 20px;
  font-family: "Black Han Sans", sans-serif;
  font-size: 19px;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.home-btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.home-btn.primary { color: #fff; background: var(--red); border: 0; }
.home-btn.primary:hover { background: #ff5c69; transform: translateY(-2px); }
.home-btn.ghost { color: var(--text); background: rgba(15, 25, 35, .7); border: 1px solid rgba(236, 232, 225, .35); }
.home-btn.ghost svg { fill: #ff0033; }
.home-btn.ghost:hover { border-color: var(--text); background: rgba(236, 232, 225, .08); transform: translateY(-2px); }
.home-btn[aria-disabled="true"] { cursor: default; opacity: .6; }
.home-btn[aria-disabled="true"]:hover { transform: none; background: rgba(15, 25, 35, .7); border-color: rgba(236, 232, 225, .35); }
.home-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 제트: 발은 패널 아래쪽, 머리는 패널 위로 */
.home-visual { position: relative; z-index: 2; align-self: stretch; min-height: 420px; }
.home-jett {
  position: absolute;
  right: -2%; bottom: 0;
  height: 136%;
  max-width: none;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6));
  pointer-events: none;
}

@media (max-width: 960px) {
  .home-actions { justify-content: center; }
  .home-btn { height: 48px; font-size: 16px; padding: 0 18px 0 16px; }
  body[data-view="home"] main { padding-top: 32px; }
  .home-hero { grid-template-columns: 1fr; min-height: 0; }
  .home-copy { padding: 40px 24px 0; text-align: center; }
  .home-title { font-size: clamp(40px, 9.5vw, 84px); }
  .home-visual { min-height: 460px; }
  .home-jett { right: 50%; transform: translateX(50%); height: 112%; }
  .home-outline { right: 50%; top: auto; bottom: 8%; transform: translateX(50%); }
}
@media (max-width: 640px) {
  .home-title { font-size: 10vw; } /* 화면 폭에 맞춰 줄어들어 한 줄이 끊기지 않음 */
  .home-visual { min-height: 360px; }
}

/* =================== 커뮤니티 센터 =================== */
body.is-community main { place-items: start center; padding-top: 40px; }
.community { position: relative; z-index: 1; width: 100%; max-width: 1180px; }
.community-head { margin-bottom: 24px; scroll-margin-top: calc(var(--header-h) + 16px); }
.community-head h1 { margin-top: 6px; font-family: "Black Han Sans", sans-serif; font-size: 44px; font-weight: 400; line-height: 1.1; }

/* 커뮤니티 센터 ↔ 유저 커뮤니티: 선택된 쪽은 크고 밝게(앞), 다른 쪽은 작고 흐리게(뒤) */
.cc-tabs { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 22px; }
.cc-tab {
  padding: 0;
  font-family: "Black Han Sans", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  color: rgba(236, 232, 225, .38);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .25s; /* 크기·위치 이동은 app.js에서 미끄러지는 모션으로 처리 */
}
.cc-tab:hover { color: rgba(236, 232, 225, .7); }
.cc-tab[aria-selected="true"] { order: -1; font-size: 1em; color: var(--text); cursor: default; }
.cc-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* 커뮤니티 센터와 페이지 높이를 비슷하게 맞춰 전환해도 배경 로고 위치가 그대로 */
.user-community { display: grid; place-items: start center; padding-top: 40px; min-height: 733px; }
.page-card h2 { font-family: "Black Han Sans", sans-serif; font-size: 40px; font-weight: 400; line-height: 1.1; }
.greet { margin-top: 8px; font-size: 15px; color: var(--muted); }
.greet strong { color: var(--accent); font-weight: 700; }

/* 왼쪽 영상(좁게) : 오른쪽 패치 노트(넓게) */
.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; align-items: stretch; }
.cc-card { display: flex; flex-direction: column; min-height: 560px; scroll-margin-top: calc(var(--header-h) + 16px); }
.cc-card.c-red::before  { background: var(--red); }
.cc-card.c-cyan::before { background: var(--accent); }

.cc-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 24px 18px;
  border-bottom: 1px solid rgba(236, 232, 225, .08);
}
.cc-card-head h2 { font-family: "Black Han Sans", sans-serif; font-size: 28px; font-weight: 400; line-height: 1.15; }
.sort-label {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(23, 233, 225, .4);
}
.cc-card.c-red .sort-label { color: var(--red); border-color: rgba(255, 70, 85, .45); }
.more {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.more::after { content: " ›"; }
.more:hover { color: var(--accent); }

/* 패치 목록 */
.patch-list, .video-list { padding: 8px 12px 14px; display: grid; gap: 2px; }
.patch a, .video a {
  display: block;
  padding: 14px 12px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .15s, border-color .15s;
}
.patch a:hover, .video a:hover { background: rgba(236, 232, 225, .05); border-left-color: var(--red); }
.cc-card.c-cyan .video a:hover { border-left-color: var(--accent); }
.patch-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
/* 넓은 패치 카드: 가장 최신 패치는 한 줄 전체, 나머지는 2열 */
.patch-list { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.patch.latest { grid-column: 1 / -1; }
.patch.latest a { background: rgba(23, 233, 225, .06); border-left-color: var(--accent); padding: 18px 16px; }
.patch.latest .patch-title { font-size: 19px; }
.patch a:hover { border-left-color: var(--accent); }
.patch-new {
  padding: 1px 7px;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--bg);
  background: var(--accent);
}
.patch-ver { font-family: "Chakra Petch", sans-serif; font-size: 15px; font-weight: 700; color: var(--red); }
.patch-date { margin-left: auto; color: var(--muted); }
.patch-title { margin-top: 6px; font-size: 15px; font-weight: 700; }
.patch-summary {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 최신 패치: 공식 대표 이미지 + 내용 */
.patch.latest a { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 18px; align-items: center; }
.patch.latest a:not(:has(.patch-img)) { grid-template-columns: 1fr; }
.patch-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg-2); }
.patch.latest .patch-summary { -webkit-line-clamp: 3; font-size: 14px; }

/* 영상 목록 */
.video a { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: start; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 70, 85, .7), rgba(15, 25, 35, .95)), var(--bg-2);
  overflow: hidden;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .play {
  position: relative;
  width: 30px; height: 30px;
  fill: #fff;
  opacity: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6));
  transition: opacity .15s, transform .15s;
}
.thumb:not(:has(img)) .play, .video a:hover .play { opacity: .95; }
.video a:hover .play { transform: scale(1.15); }
.vtitle {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 2.8em; /* 제목이 한 줄이어도 두 줄 높이 확보 → 모든 영상 항목 높이 동일 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vsub { margin-top: 3px; font-size: 12px; color: var(--muted); }

.loading { grid-column: 1 / -1; padding: 24px 12px; font-size: 14px; color: var(--muted); }
/* 영상 칸: 높이를 옆 패치 노트 칸에 맞춰 고정 (자기 내용으로 늘어나지 않음) */
#card-official { contain: size; }
#card-official .video-list { flex: 1; min-height: 0; overflow: hidden; align-content: start; }

/* 페이지 번호 */
.pager { display: flex; justify-content: center; gap: 6px; padding: 10px 12px 14px; }
.pager:empty { display: none; }
.pg {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.pg:hover:not(:disabled) { color: var(--text); border-color: rgba(236, 232, 225, .4); }
.pg.current { color: #fff; background: var(--red); border-color: var(--red); }
.pg:disabled { opacity: .3; cursor: default; }
.pg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.source { margin-top: auto; padding: 12px 24px 16px; font-size: 12px; color: rgba(236, 232, 225, .4); border-top: 1px solid rgba(236, 232, 225, .06); }
.source:empty { display: none; }
.source.fallback { color: var(--red); }

/* =================== 요원 =================== */
body[data-view="agents"] main { place-items: start center; padding-top: 32px; }
.agents { position: relative; z-index: 1; width: 100%; max-width: 1280px; min-width: 0; }

/* 요원 목록 */
.roster-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }

/* 역할(포지션) 탭 */
.role-tabs { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.role-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg); /* 불투명: 뒤의 빨간 로고가 비쳐 선택된 것처럼 보이지 않게 */
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.role-tab img { width: 16px; height: 16px; opacity: .6; transition: opacity .15s; }
.role-tab:hover { color: var(--text); border-color: rgba(236, 232, 225, .4); }
.role-tab:hover img { opacity: .9; }
.role-tab[aria-selected="true"] { color: #fff; background: var(--red); border-color: var(--red); }
.role-tab[aria-selected="true"] img { opacity: 1; }
.role-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.roster-count { font-size: 13px; color: var(--muted); }
/* 요원 목록: 양쪽 버튼으로 넘김 (스크롤바 숨김) */
.roster-wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.agent-roster {
  flex: none;
  min-width: 0;
  max-width: 100%; /* 정확한 폭(초상화 n개)은 agents.js가 지정 */
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 6px 0;
  scrollbar-width: none;
}
.agent-roster::-webkit-scrollbar { display: none; }
.agent-roster li { scroll-snap-align: start; }
.roster-nav {
  flex: none;
  width: 44px;
  height: 108px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text);
  background: rgba(15, 25, 35, .85);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
.roster-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.roster-nav:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
.roster-nav:disabled { opacity: .25; cursor: default; }
.roster-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.roster-item {
  position: relative;
  width: 104px;
  height: 104px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(15, 25, 35, .8);
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.roster-item img { width: 100%; height: 100%; object-fit: cover; }
.roster-initial { font-family: "Black Han Sans", sans-serif; font-size: 36px; }
.roster-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 4px 0 3px;
  font-size: 13px; font-weight: 700;
  text-align: center;
  background: linear-gradient(transparent, rgba(15, 25, 35, .95));
}
.roster-item:hover:not([disabled]) { border-color: rgba(236, 232, 225, .5); transform: translateY(-2px); }
.roster-item[aria-pressed="true"] { border: 2px solid var(--red); box-shadow: inset 0 0 0 2px rgba(255, 70, 85, .35); } /* 안쪽 그림자: 목록 끝에서 잘리지 않게 */
.roster-item.locked { cursor: not-allowed; }
.roster-item.locked img { filter: grayscale(1) brightness(.45); }
.roster-item.locked .roster-name { color: rgba(236, 232, 225, .45); }
.roster-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 상세 */
.agent-detail {
  position: relative;
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: 680px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.agent-detail::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  z-index: 3;
  background: linear-gradient(90deg, var(--red), var(--accent));
}

/* 왼쪽: 초상화 */
.agent-visual { position: relative; overflow: hidden; }
.agent-glow { position: absolute; inset: 0; }
.agent-bgart {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .14;
  mix-blend-mode: screen;
}
.agent-outline { /* 뒤에 깔리는 큰 영문 이름 (외곽선) */
  position: absolute;
  left: -8px; top: 24px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 150px;
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.02em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(236, 232, 225, .14);
  user-select: none;
  white-space: nowrap;
}
.agent-portrait {
  position: absolute;
  left: 50%; bottom: -20px;
  height: calc(100% + 10px);
  max-width: none;
  translate: -46% 0;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5));
}

/* 오른쪽: 정보 */
.agent-info {
  position: relative;
  z-index: 2;
  padding: 44px 44px 24px 8px;
  display: flex;
  flex-direction: column;
}
.agent-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 5px 12px 5px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: rgba(236, 232, 225, .08);
  border: 1px solid var(--line);
}
.agent-role img { width: 20px; height: 20px; }
.agent-meta { display: flex; align-items: center; gap: 10px; }
/* 셋업 보러 가기: 정보 칸 오른쪽 위, 역할·출시일 줄과 같은 높이 */
.setup-link {
  position: absolute;
  top: 44px; right: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 70, 85, .12);
  border: 1px solid rgba(255, 70, 85, .6);
  cursor: pointer;
  /* 발로란트풍 모서리 컷 (가입하기 버튼과 같은 모양) */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background .15s, border-color .15s, color .15s;
}
.setup-link svg { width: 14px; height: 14px; fill: var(--red); transition: fill .15s; }
.setup-link b {
  min-width: 20px; padding: 0 5px;
  font-family: "Chakra Petch", sans-serif; font-size: 12px; line-height: 18px; text-align: center;
  color: var(--bg); background: var(--accent);
}
.setup-link b[hidden] { display: none; }
.setup-link-arrow { font-size: 18px; line-height: 1; transition: transform .15s; }
.setup-link:hover { color: #fff; background: var(--red); border-color: var(--red); }
.setup-link:hover svg { fill: #fff; }
.setup-link:hover .setup-link-arrow { transform: translateX(3px); }
.setup-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 960px) {
  .setup-link { top: 28px; right: 24px; }
}
@media (max-width: 640px) { /* 폰: 역할·출시일과 겹치지 않게 그 아래 줄로 */
  .setup-link { position: static; align-self: flex-start; margin-top: 12px; }
}
.agent-release { font-family: "Chakra Petch", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.agent-name {
  margin-top: 14px;
  font-family: "Black Han Sans", sans-serif;
  font-size: 88px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .01em;
}
.agent-desc { margin-top: 16px; font-size: 15px; line-height: 1.8; color: var(--muted); max-width: 52ch; }

.ab-title {
  margin-top: 34px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Black Han Sans", sans-serif;
  font-size: 24px;
  font-weight: 400;
}
.ab-list { margin-top: 14px; display: flex; gap: 12px; }
.ab-btn {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(236, 232, 225, .04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.ab-btn img { width: 100%; height: 100%; object-fit: contain; opacity: .6; transition: opacity .15s; }
.ab-fallback { font-family: "Black Han Sans", sans-serif; font-size: 28px; }
.ab-key {
  position: absolute;
  right: -1px; bottom: -1px;
  min-width: 22px;
  padding: 1px 5px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
}
.ab-btn:hover { border-color: rgba(236, 232, 225, .45); transform: translateY(-2px); }
.ab-btn:hover img { opacity: .9; }
.ab-btn[aria-selected="true"] { background: rgba(255, 70, 85, .14); border-color: var(--red); }
.ab-btn[aria-selected="true"] img { opacity: 1; }
.ab-btn[aria-selected="true"] .ab-key { color: #fff; background: var(--red); border-color: var(--red); }
.ab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ab-detail {
  margin-top: 16px;
  padding: 20px 22px;
  min-height: 190px; /* 실제 높이는 agents.js가 가장 긴 스킬 설명에 맞춰 고정 */
  box-sizing: border-box;
  background: rgba(236, 232, 225, .04);
  border-left: 3px solid var(--red);
}
.ab-detail-head { display: flex; align-items: center; gap: 10px; }
.ab-detail-key {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--bg);
  background: var(--text);
}
.ab-detail-head h3 { font-family: "Black Han Sans", sans-serif; font-size: 26px; font-weight: 400; }
.ab-ult {
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(23, 233, 225, .45);
}
.ab-detail-body { margin-top: 10px; font-size: 14px; line-height: 1.8; color: rgba(236, 232, 225, .75); }
.ab-detail-body p + p { margin-top: 8px; }
.hl-white { color: #fff; font-weight: 700; }
.hl-teal { color: var(--accent); font-weight: 700; }
.hl-red { color: var(--red); font-weight: 700; }
.hl-green { color: #6fe39a; font-weight: 700; }
.agent-info .source { margin-top: auto; padding: 16px 0 0; border-top: 0; }

@media (max-width: 960px) {
  .agent-detail { grid-template-columns: 1fr; }
  .agent-visual { height: 460px; }
  .agent-info { padding: 28px 24px 24px; }
  .agent-name { font-size: 64px; }
}
@media (max-width: 640px) {
  .roster-item { width: 80px; height: 80px; }
  .roster-nav { width: 32px; height: 84px; }
  .agent-visual { height: 380px; }
  .agent-outline { font-size: 100px; }
  .ab-list { gap: 8px; }
  .ab-btn { width: 64px; height: 64px; padding: 10px; }
}

/* =================== 맵 =================== */
body[data-view="maps"] main { place-items: start center; padding-top: 32px; }
.maps { position: relative; z-index: 1; width: 100%; max-width: 1280px; min-width: 0; }
.maps .roster-head { margin-bottom: 4px; }
.rotation-note { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.rotation-note b { color: var(--red); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }

/* 맵 카드 목록 */
.map-item {
  position: relative;
  width: 224px;
  height: 104px;
  flex: none;
  padding: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.map-item img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.65); transition: filter .2s, transform .3s; }
.map-item-name {
  position: absolute; left: 12px; bottom: 8px;
  font-family: "Black Han Sans", sans-serif;
  font-size: 22px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}
.map-item-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 1px 7px;
  font-size: 11px; font-weight: 700;
  color: #fff;
  background: var(--red);
}
.map-item:hover { border-color: rgba(236, 232, 225, .5); transform: translateY(-2px); }
.map-item:hover img { filter: brightness(.85); transform: scale(1.04); }
.map-item[aria-pressed="true"] { border: 2px solid var(--red); }
.map-item[aria-pressed="true"] img { filter: brightness(1); }
.map-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.map-roster .roster-nav, .maps .roster-nav { height: 108px; }

/* 맵 상세: 높이 고정 */
.map-detail {
  position: relative;
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  height: 640px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.map-detail::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px; z-index: 3;
  background: linear-gradient(90deg, var(--red), var(--accent));
}
.map-hero { position: relative; overflow: hidden; }
.map-splash { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-hero::after { /* 글씨가 잘 보이도록 아래·오른쪽 어둡게 */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 25, 35, 0) 35%, rgba(15, 25, 35, .92) 100%),
    linear-gradient(90deg, rgba(15, 25, 35, 0) 60%, rgba(15, 25, 35, .85) 100%);
}
.map-outline {
  position: absolute; z-index: 1;
  left: 24px; top: 28px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 120px; font-weight: 700; line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .35);
  user-select: none;
  white-space: nowrap;
}
.map-hero-info { position: absolute; z-index: 2; left: 36px; right: 36px; bottom: 32px; }
.map-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  padding: 3px 10px;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  background: rgba(15, 25, 35, .75);
  border: 1px solid var(--line);
}
.badge.red { color: #fff; background: var(--red); border-color: var(--red); }
.map-name { margin-top: 12px; font-family: "Black Han Sans", sans-serif; font-size: 96px; font-weight: 400; line-height: 1; }
.map-coords { margin-top: 8px; font-family: "Chakra Petch", sans-serif; font-size: 16px; font-weight: 600; letter-spacing: .08em; color: rgba(236, 232, 225, .7); }

/* 오른쪽: 미니맵 */
.map-side { position: relative; z-index: 2; display: flex; flex-direction: column; padding: 28px 28px 16px; min-height: 0; }
.map-side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-side-head h2 { display: flex; align-items: baseline; gap: 10px; font-family: "Black Han Sans", sans-serif; font-size: 22px; font-weight: 400; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { width: 16px; height: 16px; accent-color: var(--red); }
.minimap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  aspect-ratio: 1;
  max-width: 100%;
  align-self: center;
  background: rgba(236, 232, 225, .03);
  border: 1px solid rgba(236, 232, 225, .08);
}
.minimap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .9; }
.callouts { position: absolute; inset: 0; }
.callout {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 1px 5px;
  font-size: 10.5px; font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: rgba(15, 25, 35, .82);
  border: 1px solid rgba(23, 233, 225, .55);
  transition: opacity .2s;
  pointer-events: none;
}
.callout.dim { opacity: .15; }
.region-chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chip {
  height: 30px;
  padding: 0 10px;
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
}
.chip b { margin-left: 4px; font-family: "Chakra Petch", sans-serif; color: var(--accent); }
.chip:hover { color: var(--text); border-color: rgba(236, 232, 225, .4); }
.chip[aria-pressed="true"] { color: #fff; background: rgba(23, 233, 225, .18); border-color: var(--accent); }
.no-callouts { font-size: 13px; color: var(--muted); }
.map-side .source { margin-top: 8px; padding: 0; border-top: 0; }

/* 2D / 3D 전환 */
.view-switch { display: inline-flex; border: 1px solid var(--line); }
.view-switch button {
  min-width: 46px;
  height: 32px;
  padding: 0 12px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 0;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.view-switch button + button { border-left: 1px solid var(--line); }
.view-switch button:hover { color: var(--text); }
.view-switch button[aria-selected="true"] { color: #fff; background: var(--red); }
.view-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.map-tools { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.map3d-tools { display: inline-flex; gap: 6px; }
.tool-btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
}
.tool-btn:hover { color: var(--text); border-color: rgba(236, 232, 225, .4); }

/* 3D 지도 */
.map3d { position: absolute; inset: 0; overflow: hidden; }
.minimap.is-3d { background: radial-gradient(70% 70% at 50% 45%, rgba(23, 233, 225, .08), transparent 70%), rgba(236, 232, 225, .02); }
.map3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; touch-action: none; }
.map3d-canvas:active { cursor: grabbing; }
.map3d-labels { position: absolute; inset: 0; pointer-events: none; }
.map3d-label {
  position: absolute; left: 0; top: 0;
  padding: 1px 5px;
  font-size: 10.5px; font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: rgba(15, 25, 35, .82);
  border: 1px solid rgba(23, 233, 225, .55);
  will-change: transform;
  transition: opacity .2s;
}
.map3d-label.dim { opacity: .12; }
.map3d-status {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  padding: 24px;
  font-size: 14px; text-align: center;
  color: var(--muted);
  background: rgba(15, 25, 35, .6);
}
.map3d-status[hidden] { display: none; }
.map3d-hint {
  position: absolute; left: 8px; bottom: 6px; z-index: 1;
  font-size: 11px;
  color: rgba(236, 232, 225, .45);
  pointer-events: none;
}
/* 크게 보기(전체 화면) */
.minimap:fullscreen { background: var(--bg); border: 0; aspect-ratio: auto; }
.minimap:fullscreen .map3d-label { font-size: 13px; }

@media (max-width: 960px) {
  .map-detail { grid-template-columns: 1fr; height: auto; }
  .map-hero { height: 380px; }
  .map-name { font-size: 64px; }
  .map-outline { font-size: 80px; }
  .minimap { flex: none; width: 100%; }
}
@media (max-width: 640px) {
  .map-item { width: 180px; height: 84px; }
  .maps .roster-nav { height: 88px; }
  .map-hero { height: 300px; }
  .map-name { font-size: 48px; }
}

/* =================== 셋업 =================== */
body[data-view="setups"] main { place-items: start center; padding-top: 32px; }
.setups { position: relative; z-index: 1; width: 100%; max-width: 1280px; min-width: 0; }

/* 1차 선택: 요원·맵 탭과 같은 카드(.roster-item / .map-item) + 셋업 영상 개수 */
.setups .roster-wrap { margin-bottom: 6px; }

/* 요원 검색 (요원별로 보기) — 보기 버튼 바로 왼쪽 */
.agent-search {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  height: 36px;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: border-color .15s;
}
.agent-search[hidden] { display: none; }
.agent-search:not([hidden]) + .role-tabs { margin-left: 0; }
.agent-search:focus-within { border-color: var(--accent); }
.agent-search svg { flex: none; width: 18px; height: 18px; margin: 0 8px 0 11px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.agent-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding-right: 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}
.agent-search input::placeholder { color: rgba(236, 232, 225, .35); }
.agent-search input::-webkit-search-cancel-button { filter: invert(.7); cursor: pointer; }
.search-empty { display: grid; place-items: center; height: 104px; padding: 0 24px; font-size: 14px; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  .agent-search { order: 3; width: 100%; margin-left: 0; }
}
.pick-count {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  min-width: 22px; padding: 0 6px;
  font-family: "Chakra Petch", sans-serif; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  color: var(--bg); background: var(--accent);
}
.map-item .pick-count { right: auto; left: 8px; top: 8px; } /* 맵 카드는 오른쪽 위에 "경쟁전" 표시가 있어 왼쪽에 */

/* 2차 거르기 */
.setup-filter { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-bottom: 10px; }
.setup-filter .chip { display: inline-flex; align-items: center; gap: 6px; }
.setup-filter .chip img { width: 20px; height: 20px; object-fit: cover; }

/* 영상 보드 */
.setup-board {
  position: relative;
  min-height: 560px;
  padding: 22px 24px 26px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.setup-board::before {
  content: "";
  position: absolute; left: -1px; right: -1px; top: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--accent));
}
.setup-board-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.setup-board-head h2 { font-family: "Black Han Sans", sans-serif; font-size: 30px; font-weight: 400; }
.setup-board-sub { font-size: 14px; color: var(--muted); }
.video-group { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 10px; font-family: "Black Han Sans", sans-serif; font-size: 20px; font-weight: 400; }
.video-group:first-child { margin-top: 0; }
.video-group b { font-family: "Chakra Petch", sans-serif; font-size: 14px; color: var(--accent); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color .15s;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, filter .2s; }
.video-play {
  position: absolute; left: 50%; top: 50%;
  width: 52px; height: 52px; padding: 12px;
  transform: translate(-50%, -50%);
  fill: #fff;
  background: rgba(255, 70, 85, .9);
  border-radius: 50%;
  opacity: .85;
  transition: opacity .15s, transform .15s;
}
.video-tags { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.video-tags i { padding: 1px 7px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: rgba(15, 25, 35, .85); }
.video-tags i.atk { background: var(--red); }
.video-tags i.def { color: var(--bg); background: var(--accent); }
.video-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-sub { font-size: 12px; color: var(--muted); }

/* 요원별로 보기: 맵 타일 (2×2, 사진이 칸을 가득 채움) */
.map-tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.map-tile {
  position: relative;
  height: 230px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .15s;
}
.map-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); transition: transform .4s, filter .2s; }
.map-tile::after { /* 이름이 잘 보이게 아래쪽만 살짝 어둡게 */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 25, 35, 0) 50%, rgba(15, 25, 35, .8) 100%);
}
.map-tile-name {
  position: absolute; z-index: 1; left: 18px; bottom: 14px;
  font-family: "Black Han Sans", sans-serif; font-size: 36px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}
.map-tile .map-item-badge { z-index: 1; top: 12px; right: 12px; }
.map-tile-count {
  position: absolute; z-index: 1; right: 14px; bottom: 16px;
  padding: 3px 10px;
  font-size: 13px; font-weight: 700;
  color: var(--bg); background: var(--accent);
}
.map-tile-count.none { color: var(--text); background: rgba(15, 25, 35, .8); }
.map-tile:hover { border-color: rgba(236, 232, 225, .6); }
.map-tile:hover img { transform: scale(1.05); filter: brightness(.95); }
.map-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile-pager { margin-top: 18px; padding: 0; }
.back-btn {
  margin-bottom: 14px;
  height: 34px;
  padding: 0 14px;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
}
.back-btn:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 760px) {
  .map-tile-grid { grid-template-columns: 1fr; }
  .map-tile { height: 180px; }
}

.setup-videos.empty { display: grid; place-items: center; min-height: 440px; }
.setup-empty { text-align: center; }
.setup-empty-title { font-family: "Black Han Sans", sans-serif; font-size: 24px; }
.setup-empty-hint { margin-top: 8px; font-size: 14px; color: var(--muted); }
.setup-empty-hint code { font-family: "Chakra Petch", monospace; color: var(--accent); }

/* 영상 카드: 열기 + 저장 버튼 */
.video-card { position: relative; display: block; }
.video-open {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--text);
  background: none;
  border: 0;
  cursor: pointer;
}
.video-open:hover .video-thumb { border-color: rgba(236, 232, 225, .5); }
.video-open:hover .video-thumb img { transform: scale(1.04); filter: brightness(1.08); }
.video-open:hover .video-play { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
.video-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.save-btn {
  position: absolute; z-index: 2; top: 8px; right: 8px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  padding: 0;
  background: rgba(15, 25, 35, .8);
  border: 1px solid rgba(236, 232, 225, .3);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.save-btn svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.save-btn:hover { border-color: #fff; }
.save-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.save-btn[aria-pressed="true"] svg { fill: var(--bg); stroke: var(--bg); }
.save-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.video-tags { left: 8px; right: 48px; } /* 저장 버튼과 안 겹치게 */

/* 셋업 화면의 "저장된 셋업" 버튼 */
.saved-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 14px 0 12px;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(23, 233, 225, .5);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.saved-link svg { width: 15px; height: 15px; fill: var(--accent); }
.saved-link b { min-width: 20px; padding: 0 5px; font-family: "Chakra Petch", sans-serif; font-size: 12px; line-height: 18px; text-align: center; color: var(--bg); background: var(--accent); }
.saved-link b[hidden] { display: none; }
.saved-link:hover { background: rgba(23, 233, 225, .12); border-color: var(--accent); }

/* 저장된 셋업 화면 */
body[data-view="saved"] main { place-items: start center; padding-top: 32px; }
.saved { position: relative; z-index: 1; width: 100%; max-width: 1280px; min-width: 0; }
.saved .role-tabs { margin-left: auto; }
.setup-empty .back-btn { margin-top: 18px; }
.inline-save { color: var(--accent); }

/* 잠깐 뜨는 알림 */
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: 28px;
  padding: 10px 18px;
  font-size: 14px; font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 영상 재생 창 */
.video-modal {
  width: min(960px, calc(100vw - 32px));
  margin: auto; /* 전역 margin:0 초기화 때문에 가운데 정렬이 풀려서 다시 지정 */
  padding: 0;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.video-modal::backdrop { background: rgba(5, 10, 15, .75); }
.video-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; }
.video-modal-head h2 { font-size: 16px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-open { display: inline-block; margin: 10px 18px 14px; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.video-open:hover { text-decoration: underline; }

/* =================== 반응형 =================== */
@media (max-width: 1024px) {
  .cc-grid { grid-template-columns: 1fr; }
  .cc-card { min-height: 0; }
  /* 세로로 쌓이는 화면: 한 페이지 4개 고정, 마지막 페이지가 적어도 높이 유지 */
  #card-official { contain: none; }
  #card-official .video-list { flex: none; } /* 높이는 app.js가 4개 기준으로 고정 */
}
@media (max-width: 760px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-intro { border-right: 0; border-bottom: 1px solid rgba(236, 232, 225, .08); padding: 28px 24px; }
  .auth-intro .switch { margin-top: 4px; }
  .auth-form { padding: 24px; }
  .patch-list { grid-template-columns: 1fr; }
  .patch.latest a { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .site-header { padding: 6px 8px 0 16px; }
  .site-header .site-logo { height: 18px; } /* 폰: 로고와 마이페이지·메뉴 버튼이 한 줄에 들어가게 */
  .hbtn span { display: none; } /* 좁은 화면에선 마이페이지는 아이콘만 */
  .hbtn { padding: 0; width: 44px; justify-content: center; }
  main { padding: 32px 16px; }
  .marquees { gap: 64px; }
  .row-2 { grid-template-columns: 1fr; }
  .auth-intro h1, .community-head h1 { font-size: 36px; }
}
