/* 로스트 리프 홈페이지 — 축제풍 황혼 테마
   한 줄 방향: 보랏빛 황혼 하늘 아래, 금테 두른 나무 메뉴와 보라 프레임 안에 크림색 카드가 촘촘히 놓이고,
   첫 화면 풀밭에는 직접 찍은 도트 모험가와 몬스터가 줄지어 선다.
   그림은 전부 코드로 그린 오리지널 (docs/site/ip-check.md). 순흑·순백은 쓰지 않는다. 모바일 먼저. */

/* 메이플스토리 서체: ㈜넥슨코리아 무료 배포본을 수정 없이 그대로 사용 (assets/fonts/메이플스토리서체_저작권안내.txt).
   파일이 커서 메뉴·버튼·제목·숫자 강조에만 쓴다. 본문은 Noto Sans KR. */
@font-face {
  font-family: "Maplestory";
  src: url("../fonts/Maplestory%20Bold.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Maplestory";
  src: url("../fonts/Maplestory%20Light.ttf") format("truetype");
  font-weight: 100 399;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* 황혼 하늘 */
  --dusk-1: #2B2350;
  --dusk-2: #5B3F8C;
  --dusk-3: #9C5FA8;
  --dusk-4: #F29B8A;
  --dusk-5: #FFC98A;
  --navy: #141A33;
  --navy-2: #1F2848;
  /* 프레임 */
  --frame: #3A2A63;
  --frame-2: #2E2150;
  --frame-ink: #F3ECFB;
  --frame-muted: #CDBEE8;
  /* 나무·금 */
  --wood: #8A5A3A;
  --wood-dark: #5C3A22;
  --wood-light: #C08A55;
  --gold: #F2C14E;
  --gold-2: #E0A43A;
  --gold-light: #FFE7A3;
  /* 카드 */
  --cream: #FFF8E7;
  --cream-2: #F3E3C3;
  --ink: #3B2414;
  --ink-soft: #6B4A33;
  /* 포인트 */
  --maple: #E8742C;
  --maple-red: #C9452F;
  --maple-yellow: #F2A33A;
  --pink: #F2668B;
  --blue: #3F7BE0;
  --purple: #7B4FD0;
  --grass: #6DBB4E;
  --grass-dark: #3F8A33;
  --dirt: #9C6A3E;
  --dirt-dark: #6E4527;
  --frost: #DCEBF2;
  --night: #1F2A4A;
  --tip: #2B3352;
  --ok: #4E9A3E;
  /* 예전 테마 이름 (기존 구성 요소 호환) */
  --sky-pale: #F3ECFB;
  --cloud: #FFFDF6;
  --dirt-old: #B07A4A;

  --radius: 16px;
  --max: 1160px;
  --font-display: "Maplestory", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-script: "Dancing Script", "Maplestory", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.7;
  word-break: keep-all; overflow-wrap: anywhere;
  background-color: var(--dusk-2);
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 20%, #F29B8A55, transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 12%, #9C5FA888, transparent 70%),
    linear-gradient(180deg, var(--dusk-1) 0, var(--dusk-2) 420px, #6E4C9E 1200px, var(--dusk-2) 100%);
  background-attachment: fixed;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: #B5481F; text-underline-offset: 3px; }
a:hover { color: var(--maple-red); }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; line-height: 1.3; margin: 0 0 .45em; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--cream); padding: 8px 12px; z-index: 50; border-radius: 10px; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 16px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 14px; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= 머리글: 네이비 글로벌 바 + 금테 나무 메뉴 ================= */
.site-header { position: relative; z-index: 30; }
.topbar { background: var(--navy); color: #C9CFE6; font-size: .8rem; border-bottom: 1px solid #ffffff14; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.topbar .world { display: inline-flex; align-items: center; gap: 6px; color: #F3ECFB; text-decoration: none; font-family: var(--font-display); white-space: nowrap; flex: none; background: var(--navy-2); border: 1px solid #ffffff22; border-radius: 10px; padding: 2px 10px; }
.topbar .world img { width: auto; height: 20px; }
.topbar .worlds { display: flex; align-items: center; gap: 8px; flex: none; padding: 5px 0; }
.topbar .world { opacity: .7; font-size: .92rem; padding: 4px 14px 4px 10px; border-radius: 12px; min-height: 32px; transition: opacity .15s, background .15s; }
.topbar .world img { height: 24px; }
.topbar .world:hover { opacity: 1; }
.topbar .world[aria-current] { opacity: 1; background: #3A3270; border-color: var(--gold-light); box-shadow: inset 0 -2px 0 #00000040; }
.topbar .world svg { width: 26px; height: 22px; }
.topbar .world-heroes[aria-current] { background: #24306A; }
.topbar .not-official { opacity: .8; font-size: .72rem; text-align: right; line-height: 1.3; }
.topbar a.top-link { color: #F3ECFB; text-decoration: none; }
.subnav-wrap { padding: 8px 0 0; background: linear-gradient(180deg, var(--navy) 0, transparent 100%); }
.subnav {
  display: flex; flex-direction: column; gap: 6px; padding: 7px 10px;
  background: linear-gradient(180deg, #B07A45, #8A5A30 55%, #7A4E2A);
  border: 2px solid var(--gold); border-radius: 16px;
  box-shadow: inset 0 2px 0 #E2B07A, inset 0 -3px 0 #5C3A22, 0 6px 14px #140f2a88;
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; align-self: flex-start; }
.brand .script { font-family: var(--font-script); font-weight: 700; font-size: 1.55rem; line-height: 1; color: #FFF6E0; text-shadow: 0 2px 0 #5C3A22, 0 0 8px #FFE7A388; }
.brand .ko { font-family: var(--font-display); font-size: .78rem; color: var(--gold-light); }
.brand svg { width: 22px; height: 22px; transform: rotate(-14deg); }
.nav { overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 2px 10px 3px; }
.nav::-webkit-scrollbar { display: none; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.nav a {
  display: block; padding: 4px 12px; border-radius: 999px; font-family: var(--font-display); font-size: .92rem;
  color: #FFF4DE; text-decoration: none; text-shadow: 0 1px 0 #4A2E1A; transition: background .15s, transform .1s;
}
.nav a:hover { background: #ffffff22; }
.nav a[aria-current="page"] { background: linear-gradient(180deg, #FFFBEF, #F3E3C3); color: var(--wood-dark); text-shadow: none; box-shadow: inset 0 -2px 0 #D9C090, 0 2px 0 #5C3A22; }

/* ================= 버튼: 광택 알약 ================= */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 22px; border-radius: 999px; overflow: hidden;
  font-family: var(--font-display); font-size: 1.02rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  border: 2px solid #ffffffaa; box-shadow: 0 4px 0 #0000003d, 0 8px 18px #1a103855;
  transition: transform .08s ease, filter .15s;
}
.btn::before { /* 광택 */
  content: ""; position: absolute; left: 10%; right: 10%; top: 3px; height: 42%; border-radius: 999px;
  background: linear-gradient(180deg, #ffffffcc, #ffffff22); pointer-events: none;
}
.btn::after { /* 왼쪽 위 반짝 점 */
  content: ""; position: absolute; left: 14px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9;
}
.btn:hover { filter: brightness(1.07) saturate(1.06); transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0000003d; }
.btn small { font-family: var(--font-body); font-size: .74rem; opacity: .95; position: relative; }
.btn > * { position: relative; }
.btn-pink, .btn-play { background: linear-gradient(180deg, #FF9DB5, var(--pink) 55%, #D9406A); color: #fff; text-shadow: 0 1px 0 #9C2A4A; }
.btn-play.is-soon { background: linear-gradient(180deg, #FF9DB5, var(--pink) 55%, #D9406A); }
.btn-blue { background: linear-gradient(180deg, #8FB8FF, var(--blue) 55%, #2A58B8); color: #fff; text-shadow: 0 1px 0 #1E3F7A; }
.btn-cream { background: linear-gradient(180deg, #FFFDF6, var(--cream-2)); color: var(--wood-dark); border-color: var(--gold); }
.btn-cream::after { background: var(--gold); }
.btn-green { background: linear-gradient(180deg, #A8DC85, var(--grass) 55%, #3F8A33); color: #fff; text-shadow: 0 1px 0 #2F5A2A; }
.btn[aria-disabled="true"] { filter: grayscale(.7); opacity: .7; pointer-events: none; }
.sparkle { overflow: visible; }

/* ================= 히어로 카드 (메인) ================= */
.hero-outer { padding: 12px 0 0; }
.hero {
  position: relative; overflow: hidden; border-radius: 22px; min-height: 560px;
  border: 2px solid #ffffff2a; box-shadow: 0 14px 40px #120c2899;
  background: #5B3F8C url("../img/ai/hero-sm.webp") center 70% / cover no-repeat; /* Topview AI 생성 배경 (ip-check.md) */
}
.garland { position: absolute; left: 0; right: 0; top: 0; height: 110px; width: 100%; pointer-events: none; z-index: 1; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 11px; border-radius: 2px; opacity: .9; animation: confetti 9s linear infinite; }
.confetti i:nth-child(1) { left: 6%;  background: #FFE7A3; animation-delay: -1s; }
.confetti i:nth-child(2) { left: 18%; background: #8FD0F0; animation-delay: -4s; animation-duration: 11s; }
.confetti i:nth-child(3) { left: 31%; background: #F2668B; animation-delay: -7s; }
.confetti i:nth-child(4) { left: 47%; background: #A8DC85; animation-delay: -2.5s; animation-duration: 12s; }
.confetti i:nth-child(5) { left: 63%; background: #FFE7A3; animation-delay: -5.5s; }
.confetti i:nth-child(6) { left: 78%; background: #F2A33A; animation-delay: -8s; animation-duration: 10s; }
.confetti i:nth-child(7) { left: 91%; background: #8FD0F0; animation-delay: -3s; }
@keyframes confetti { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(620px) rotate(540deg); } }
.twinkles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.twinkles b { position: absolute; color: #FFF6CF; font-size: 14px; animation: twinkle 3s ease-in-out infinite; text-shadow: 0 0 8px #FFE7A3; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.1); } }

.hero-content { position: relative; z-index: 3; text-align: center; padding: 70px 14px 0; }
.logo { margin: 0; line-height: .95; }
.logo .script {
  display: inline-block; position: relative; font-family: var(--font-script); font-weight: 700; font-size: 3.6rem;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF3D6 35%, #E9D6FF 65%, #FFE7A3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #4A2E7A) drop-shadow(0 0 10px #E9D6FFaa);
  padding: 0 .25em;
}
.logo .logo-leaf { position: absolute; width: .5em; height: .5em; right: -.12em; top: -.08em; transform: rotate(18deg); filter: drop-shadow(0 2px 0 #4A2E7A); }
.logo .ko { display: block; font-family: var(--font-display); font-size: 1.15rem; color: #FFF6E0; margin-top: 6px; letter-spacing: .02em; text-shadow: 0 2px 0 #3A2463, 0 0 6px #3A246399; }
.logo .ko small { font-family: var(--font-body); font-size: .8rem; color: var(--frame-muted); }
.countdown {
  margin: 16px -14px 0; padding: 8px 14px; background: linear-gradient(90deg, transparent, #2A1F48cc 15%, #2A1F48cc 85%, transparent);
  color: #F3ECFB;
}
.countdown .dday { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--gold-light); text-shadow: 0 2px 0 #3A2463; }
.countdown .when { font-size: .82rem; color: #E2D6F5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.hero-note { margin: 12px auto 0; font-size: .8rem; color: #F3ECFB; background: #2A1F4899; display: table; padding: 3px 12px; border-radius: 999px; }

/* 보물상자와 풀밭 무대 */
.stage { position: relative; z-index: 2; height: 190px; margin-top: 12px; }
.chest { position: absolute; left: 50%; bottom: 52px; width: 210px; transform: translateX(-50%); filter: drop-shadow(0 6px 10px #1a103888); }
.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58px;
  background:
    radial-gradient(ellipse at 20% 40%, #ffffff14 0 20px, transparent 21px) 0 14px / 90px 40px,
    linear-gradient(180deg, #7ACB58 0, #5FAE45 14px, var(--dirt) 15px, var(--dirt-dark) 100%);
  box-shadow: inset 0 3px 0 #A8DC85;
}
.ground::before { /* 둥근 잔디 덤불 */
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 16px;
  background: radial-gradient(circle at 12px 16px, #7ACB58 12px, transparent 13px) 0 0 / 24px 16px repeat-x;
}
.lineup { position: absolute; left: 0; right: 0; bottom: 52px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 8px; pointer-events: none; }
.lineup .grp { display: flex; align-items: flex-end; gap: 0; }
.sprite { width: auto; height: 86px; animation: hop 1.6s ease-in-out infinite; transform-origin: bottom center; filter: drop-shadow(0 0 1.5px #FFF8E7) drop-shadow(0 0 1px #FFF8E7) drop-shadow(0 4px 2px #2A1F4877); }
.sprite.mon { height: 58px; }
.sprite.flip { scale: -1 1; }
.sprite:nth-child(2n) { animation-delay: -.8s; }
.sprite:nth-child(3n) { animation-delay: -.4s; }
.sprite.mon { animation-duration: 1.2s; }
@keyframes idle { 0% { translate: 0 0; } 100% { translate: 0 -3px; } }
/* 치비 캐릭터: 살짝 통통 튀는 제자리 동작 (아래를 기준으로 눌렸다 펴짐) */
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-6px) scale(.98, 1.03); } 70% { transform: translateY(0) scale(1.04, .96); } }
.lineup .hide-sm { display: none; }

/* ================= 보라 프레임 (본문 판) ================= */
.frame-outer { padding: 18px 0 0; }
.frame {
  position: relative; background: linear-gradient(180deg, var(--frame), var(--frame-2));
  border: 3px solid var(--gold-2); border-radius: 20px; padding: 18px 0 26px; color: var(--frame-ink);
  box-shadow: inset 0 0 0 3px #5C3A22, inset 0 0 0 5px #F2C14E55, 0 14px 40px #120c2899;
}
.frame::before, .frame::after { /* 금 모서리 장식 */
  content: ""; position: absolute; top: -9px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF3C4, var(--gold) 50%, #B07A25); box-shadow: 0 2px 0 #5C3A22;
}
.frame::before { left: -9px; } .frame::after { right: -9px; }
.frame .muted { color: var(--frame-muted); }
.frame a { color: var(--gold-light); }
.frame :is(.panel, .paper, .table-wrap, details.fold, .slot, .bubble, .sign, .empty, .notice, .grade-chip, .qcard, .scard, .ncard, .ecard, .dl-card, .timeline) { color: var(--ink); }
.frame :is(.panel, .paper, .table-wrap, details.fold, .slot, .bubble, .sign, .empty, .notice, .qcard, .scard, .ncard, .ecard, .dl-card, .timeline) .muted { color: var(--ink-soft); }
.frame :is(.panel, .paper, .table-wrap, details.fold, .slot, .bubble, .sign, .notice, .qcard, .ncard, .ecard, .dl-card, .timeline) a { color: #B5481F; }
.frame a:is(.bcard, .qcard, .ncard, .job-chip) { color: var(--ink); }
.frame .bcard .mini { color: var(--ink); }
.frame .btn { color: inherit; }
.frame .btn-pink, .frame .btn-play, .frame .btn-blue, .frame .btn-green { color: #fff; }
.frame .btn-cream { color: var(--wood-dark); }

.section { padding: 18px 0; }
/* 리본 제목 */
.section-title {
  display: table; margin: 4px auto 16px; padding: 7px 34px; position: relative;
  font-family: var(--font-display); font-size: 1.15rem; color: #fff; text-align: center;
  background: linear-gradient(180deg, #9C7BEA, var(--purple) 55%, #5A35A8);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  text-shadow: 0 2px 0 #3A2463;
}
.section-title::before, .section-title::after { content: "✦"; position: absolute; top: 50%; transform: translateY(-50%); color: var(--gold-light); font-size: .8rem; }
.section-title::before { left: 18px; } .section-title::after { right: 18px; }
.section-title.blue { background: linear-gradient(180deg, #8FB8FF, var(--blue) 55%, #2A58B8); }
.section-title.gold { background: linear-gradient(180deg, #FFE7A3, var(--gold) 55%, #C99A2E); color: var(--ink); text-shadow: 0 1px 0 #FFF6CF; }
.section-title.gold::before, .section-title.gold::after { color: var(--maple-red); }
.lead { color: var(--frame-muted); max-width: 46em; margin: 0 auto 1em; text-align: center; }
.dots-sep { border: 0; border-top: 3px dotted #ffffff26; margin: 22px 0 8px; }

/* ================= 카드 공통 ================= */
.panel {
  position: relative; background: var(--cream); border: 2px solid var(--gold-2); border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; padding: 18px 16px 16px; margin-top: 4px;
}
.panel > :last-child { margin-bottom: 0; }
.panel h3 { color: var(--wood-dark); }
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
/* 칸 안 그림·aspect-ratio 칸이 열 너비를 밀어내지 않게 minmax(0, 1fr) */
.grid > * { min-width: 0; }

/* 상태 카드 (지금 / 출시 예정 / …) */
.status { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scard { background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; text-align: center; padding: 0 8px 10px; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; overflow: hidden; }
.scard .lab { display: block; margin: 0 -8px 8px; padding: 3px 0; background: linear-gradient(180deg, #FFE7A3, var(--gold)); font-family: var(--font-display); font-size: .82rem; color: var(--wood-dark); }
.scard b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; color: var(--ink); line-height: 1.3; }
.scard span.sub { font-size: .78rem; color: var(--ink-soft); }

/* 바로가기 카드 (도트 아이콘) */
.quick { display: grid; gap: 10px; grid-template-columns: 1fr; }
.qcard { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; text-decoration: none; background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; padding: 8px 12px; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; transition: transform .12s; }
.qcard:hover { transform: translateY(-3px); }
.qcard .icons { display: flex; align-items: flex-end; justify-content: center; height: 48px; }
.qcard .icons img { width: auto; height: 46px; }
.qcard .icons img + img { height: 34px; margin-left: -4px; }
.qcard b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.08rem; color: var(--ink); }
.qcard span { font-size: .8rem; color: var(--ink-soft); }

/* 한눈에 보기 (표) */
.dl-card { background: var(--cream); border: 2px solid var(--gold-2); border-radius: 16px; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; padding: 6px 16px; }
.dl-card dl { margin: 0; }
.dl-card .row { display: grid; grid-template-columns: 6.2em 1fr; gap: 10px; padding: 11px 0; border-bottom: 2px dotted #E8D7B0; font-size: .9rem; }
.dl-card .row:last-child { border-bottom: 0; }
.dl-card dt { font-family: var(--font-display); color: var(--purple); }
.dl-card dd { margin: 0; }

/* 일정 타임라인 */
.timeline { background: var(--cream); border: 2px solid var(--gold-2); border-radius: 16px; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; padding: 14px 16px 6px; }
.timeline ol { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline ol::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 14px; width: 3px; background: #D8C8F2; border-radius: 3px; }
.timeline li { position: relative; padding: 0 0 14px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 3px #E9DDFB; }
.timeline li.past::before { background: #B9A6DA; }
.timeline li.next::before { background: var(--maple); box-shadow: 0 0 0 3px #FFD9B8, 0 0 10px var(--maple); }
.timeline li.future::before { background: #fff; border: 3px solid var(--purple); }
.timeline .date { font-size: .78rem; color: var(--ink-soft); }
.timeline .ttl { display: block; font-family: var(--font-display); font-size: 1rem; }
.timeline .ttl .tag { margin-left: 4px; }
.timeline .desc { font-size: .82rem; color: var(--ink-soft); }

/* 이벤트 카드 */
.events { display: grid; gap: 12px; grid-template-columns: 1fr; }
.ecard { background: var(--cream); border: 2px solid var(--gold-2); border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; }
.ecard .thumb { position: relative; height: 92px; background: linear-gradient(135deg, #7B4FD0, #F2668B 60%, #FFC98A); display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding-bottom: 6px; overflow: hidden; }
.ecard .thumb.t2 { background: linear-gradient(135deg, #2A58B8, #8FD0F0); }
.ecard .thumb.t3 { background: linear-gradient(135deg, #3F8A33, #A8DC85 60%, #FFE7A3); }
.ecard .thumb.t4 { background: linear-gradient(135deg, #C9452F, #F2A33A); }
.ecard .thumb.t5 { background: linear-gradient(135deg, #3A2A63, #9C5FA8); }
.ecard .thumb img { width: auto; height: 66px; filter: drop-shadow(0 2px 0 #0000003a); }
.ecard .thumb .flag { position: absolute; left: 0; right: 0; top: 0; height: 22px; background: repeating-linear-gradient(90deg, #FFE7A3 0 12px, transparent 12px 14px, #8FD0F0 14px 26px, transparent 26px 28px, #F2668B 28px 40px, transparent 40px 42px); clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%); opacity: .9; }
.ecard .body { padding: 10px 12px 12px; }
.ecard b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.02rem; }
.ecard .period { font-size: .78rem; color: var(--purple); font-family: var(--font-display); }
.ecard p { font-size: .84rem; margin: 4px 0 0; color: var(--ink-soft); }

/* 공지 카드 */
.ncards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.ncard { display: block; text-decoration: none; background: var(--cream); border: 2px solid var(--gold-2); border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; transition: transform .12s; color: var(--ink); }
.ncard:hover { transform: translateY(-3px); }
.ncard .thumb { position: relative; height: 84px; background: linear-gradient(135deg, #5B3F8C, #9C5FA8 55%, #F29B8A); display: grid; place-items: center; }
.ncard .thumb .script { font-family: var(--font-script); font-weight: 700; font-size: 1.6rem; color: #FFF3D6; text-shadow: 0 2px 0 #3A2463; }
.ncard .thumb .cat { position: absolute; left: 10px; bottom: 8px; }
.ncard .body { padding: 8px 12px 12px; }
.ncard .date { font-size: .78rem; color: var(--ink-soft); }
.ncard b { display: block; font-family: var(--font-display); font-weight: 400; line-height: 1.4; }

/* 여섯 계열 카드 (AI 일러스트 + 도트) */
.branch-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.bcard { display: grid; grid-template-columns: 112px 1fr; text-decoration: none; color: var(--ink); background: var(--cream); border: 2px solid var(--gold-2); border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 2px #FFF3D4, 0 4px 0 #0000002e; transition: transform .12s; }
.bcard:hover { transform: translateY(-3px); }
.bcard .art img { width: 100%; height: 100%; object-fit: cover; }
.bcard .body { padding: 10px 12px; border-left: 4px solid var(--c); }
.bcard b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--c); }
.bcard b small { font-family: var(--font-body); font-size: .74rem; color: var(--ink-soft); }
.bcard .pair { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.bcard .mini { display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-display); font-size: .86rem; }
.bcard .mini img { width: auto; height: 44px; }
.branch-art { width: 100%; max-width: 320px; border-radius: 14px; border: 2px solid var(--gold-2); box-shadow: 0 4px 0 #0000002e; }
.banner-photo { background-size: cover; background-position: center 60%; }
.banner-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #2A1F4866, #2A1F4822 40%, #2A1F4855); }

/* 12직업 도트 줄 */
.job-row { display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job-chip { display: flex; flex-direction: column; align-items: center; text-decoration: none; padding: 6px 2px 8px; border-radius: 12px; background: #fff; border: 2px solid color-mix(in srgb, var(--c) 45%, #fff); transition: transform .12s; }
.job-chip:hover { transform: translateY(-3px); }
.job-chip img { width: 52px; image-rendering: pixelated; animation: idle 1.2s steps(2) infinite; }
.job-chip:nth-child(2n) img { animation-delay: -.6s; }
.job-chip b { font-family: var(--font-display); font-weight: 400; font-size: .82rem; color: var(--c); line-height: 1.2; text-align: center; }
.job-chip span { font-size: .68rem; color: var(--ink-soft); }
@media (min-width: 720px) { .job-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .job-row { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

/* 첫 화면이 게임 화면일 때: 글자가 읽히게 위아래를 살짝 어둡게 */
.hero.hero-game { background-position: center 40%; }
.hero.hero-game::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #2A1F48bb 0, #2A1F4866 34%, #2A1F4800 58%, #2A1F4800 78%, #2A1F4866 100%); }
.hero .garland { z-index: 2; }
/* 풀밭 위 게임 컷 카드 줄 */
.lineup.cap-row { z-index: 1; bottom: 34px; justify-content: center; gap: 8px; align-items: flex-end; padding: 0 10px; }
.cap { margin: 0; width: 25%; max-width: 132px; background: var(--cream); border: 3px solid var(--gold); border-radius: 12px; padding: 4px 4px 2px; box-shadow: 0 6px 10px #1a103866; rotate: -2deg; animation: hop 2.2s ease-in-out infinite; transform-origin: bottom center; }
.cap:nth-child(2n) { rotate: 2deg; animation-delay: -.7s; }
.cap img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
.cap figcaption { font-family: var(--font-display); font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; color: var(--ink); line-height: 1.5; }
.lineup.cap-row .hide-sm { display: none; }
/* 직업 카드의 게임 장면 */
.job-shot { margin: -4px -4px 12px; border-radius: 12px; overflow: hidden; border: 2px solid var(--cream-2); }
.job-shot img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: center 70%; }
.job-top.no-figure { grid-template-columns: 1fr; }
/* 몬스터 카드의 게임 컷 */
.mcard .pic img.photo { width: 76px; height: 76px; max-height: none; object-fit: cover; border-radius: 12px; border: 2px solid var(--cream-2); animation: none; }
.mcard.boss .pic img.photo { width: 110px; height: 110px; }

/* 게임 화면 갤러리 (site/assets/img/game/) */
.gallery { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.shot-card { margin: 0; background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 #0000002e; color: var(--ink); }
.shot-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot-card figcaption { font-size: .82rem; padding: 6px 10px 8px; }
.empty-shot { display: grid; place-items: center; aspect-ratio: 16 / 9; background: repeating-linear-gradient(45deg, #FFF8E7 0 14px, #F3E3C3 14px 28px); color: var(--ink-soft); font-family: var(--font-display); font-size: .9rem; }
/* 몬스터 카드 */
.monsters-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mcard { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; padding: 8px 6px 10px; box-shadow: 0 4px 0 #0000002e; color: var(--ink); }
.mcard .pic { height: 76px; display: flex; align-items: flex-end; }
.mcard .pic img { max-height: 72px; width: auto; max-width: 100%; animation: hop 1.8s ease-in-out infinite; transform-origin: bottom center; }
.mcard .no-pic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--gold-2); font-size: .66rem; color: var(--ink-soft); line-height: 1.2; }
.mcard b { font-family: var(--font-display); font-weight: 400; font-size: .92rem; line-height: 1.3; margin-top: 4px; }
.mcard .lv { font-family: var(--font-display); color: var(--purple); font-size: .8rem; }
.mcard .where { font-size: .7rem; color: var(--ink-soft); }
.mcard.boss { grid-column: span 3; flex-direction: row; justify-content: center; gap: 14px; background: linear-gradient(180deg, #ECE4F8, var(--cream)); }
.mcard.boss .pic { height: 110px; } .mcard.boss .pic img { max-height: 108px; }
.ground-card .shot { margin: -4px 0 10px; border-radius: 10px; overflow: hidden; border: 2px solid var(--cream-2); }
.ground-card .shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.site-footer .rights { color: #E2E6F3; font-weight: 700; }

/* ================= 기존 구성 요소 (다른 페이지) ================= */
.tip { background: color-mix(in srgb, var(--tip) 94%, transparent); color: #EEF2F6; border: 2px solid #8C96B8; border-radius: 12px; box-shadow: inset 0 0 0 2px #1A2036, 0 6px 14px #1F2A4A40; padding: 12px 14px; }
.tip .tip-name { font-family: var(--font-display); color: var(--gold-light); font-size: 1.05rem; display: block; margin-bottom: 4px; }
.tip ul { margin: 0; padding: 0; list-style: none; }
.tip li { padding: 3px 0; border-top: 1px dashed #ffffff22; font-size: .9rem; }
.tip li:first-child { border-top: 0; }
.tip .lv { display: inline-block; min-width: 3.4em; color: #9FD3F2; font-family: var(--font-display); }
.bubble { position: relative; display: inline-block; background: var(--cloud); color: var(--ink); border: 2px solid var(--gold-2); border-radius: 18px; padding: 10px 16px; box-shadow: 0 4px 0 #0000002e; }
.bubble::after { content: ""; position: absolute; left: 28px; bottom: -12px; width: 18px; height: 12px; background: var(--cloud); border-left: 2px solid var(--gold-2); border-bottom: 2px solid var(--gold-2); transform: skewX(-30deg); border-bottom-left-radius: 6px; }
.tag { display: inline-block; padding: 0 9px; border-radius: 999px; font-size: .74rem; line-height: 1.8; font-family: var(--font-display); background: var(--wood); color: var(--cream); vertical-align: middle; }
.tag-공지 { background: #6B5BB8; } .tag-패치노트 { background: var(--grass-dark); } .tag-이벤트 { background: var(--pink); } .tag-점검 { background: #8A6E3A; }
.tag-soon { background: #9C8A78; } .tag-gold { background: var(--gold); color: var(--ink); } .tag-sky { background: #4F9FD6; } .tag-next { background: var(--maple); }
ul.leafy { list-style: none; padding: 0; margin: 0 0 1em; }
ul.leafy li { position: relative; padding-left: 24px; margin-bottom: 6px; }
ul.leafy li::before { content: ""; position: absolute; left: 0; top: .4em; width: 16px; height: 16px; background: url("../img/leaf.svg") center / contain no-repeat; transform: rotate(-15deg); }
.notice { position: relative; background: #FFF1C9; border: 2px solid var(--maple-yellow); border-radius: 14px; padding: 12px 16px 12px 46px; margin: 0 0 18px; box-shadow: 0 4px 0 #0000002e; }
.notice::before { content: "!"; position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--maple); color: #FFF8EC; font-family: var(--font-display); text-align: center; line-height: 24px; }
.notice > :last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: 14px; border: 2px solid var(--gold-2); background: var(--cream); box-shadow: 0 4px 0 #0000002e; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .92rem; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 2px dotted #E8D7B0; }
thead th { background: linear-gradient(180deg, #8C6BD8, var(--purple)); color: #fff; font-family: var(--font-display); font-weight: 400; white-space: nowrap; border-bottom: 0; }
tbody tr:last-child td { border-bottom: 0; }
td.price { white-space: nowrap; color: var(--ink-soft); }
details.fold { background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; margin-bottom: 10px; box-shadow: 0 4px 0 #0000002e; }
details.fold > summary { cursor: pointer; padding: 12px 46px 12px 16px; font-weight: 700; position: relative; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--purple); color: #fff; font-family: var(--font-display); text-align: center; line-height: 24px; }
details.fold[open] > summary::after { content: "−"; background: var(--maple); }
details.fold[open] > summary { border-bottom: 2px dotted #E8D7B0; }
.fold-body { padding: 12px 16px 6px; }
.cloud { display: none; }

/* 안쪽 페이지 배너 (작은 히어로) */
.banner { position: relative; overflow: hidden; border-radius: 20px; margin-top: 12px; min-height: 230px; padding: 56px 16px 104px; text-align: center; border: 2px solid #ffffff2a; box-shadow: 0 14px 30px #120c2888; background: #5B3F8C url("../img/hero-twilight.svg") center 78% / cover no-repeat; }
.banner .garland { height: 80px; }
.banner h1 { position: relative; z-index: 2; font-size: 2rem; color: #FFF6E0; text-shadow: 0 3px 0 #3A2463, 0 0 12px #E9D6FF88; margin-bottom: .35em; }
.banner p { position: relative; z-index: 2; max-width: 44em; margin: 0 auto; color: #F3ECFB; font-size: .92rem; text-shadow: 0 1px 0 #2A1F48; background: #2A1F4899; border-radius: 12px; padding: 6px 12px; display: inline-block; }
.banner p strong { color: var(--gold-light); }
.banner .ground { height: 34px; }
.banner .lineup { bottom: 30px; }
.banner .sprite { height: 66px; } .banner .sprite.mon { height: 46px; }

/* 공지 게시판 */
.board { background: linear-gradient(180deg, #B07A45, #8A5A30); border: 3px solid var(--gold-2); border-radius: 18px; padding: 16px 12px 14px; box-shadow: 0 6px 0 #0000004d; position: relative; margin-bottom: 10px; }
.board-title { font-family: var(--font-display); font-size: 1.3rem; color: #FFF6E0; text-shadow: 0 2px 0 var(--wood-dark); margin: 0 0 10px 4px; }
.paper { background: var(--cream); border-radius: 8px; padding: 14px 14px 10px; position: relative; box-shadow: 0 3px 0 #00000022; }
.news-mini { list-style: none; margin: 0; padding: 0; }
.news-mini li { border-bottom: 2px dotted #E8D7B0; padding: 8px 0; }
.news-mini li:last-child { border-bottom: 0; }
.news-mini a { text-decoration: none; color: var(--ink); display: block; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-soft); }
.post-title { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.post { border-bottom: 2px dotted #E8D7B0; }
.post:last-child { border-bottom: 0; }
.post > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 6px; align-items: center; border-radius: 10px; }
.post > summary::-webkit-details-marker { display: none; }
.post > summary:hover, .post[open] > summary { background: #FFF1C9; }
.post .no { grid-row: span 2; font-family: var(--font-display); color: var(--wood-light); font-size: 1.05rem; min-width: 2em; text-align: center; }
.post-body { padding: 4px 8px 18px; }
.post-body h3 { margin: 1em 0 .4em; font-size: 1.08rem; color: var(--purple); }
.post-body ul { padding-left: 1.2em; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.filters button { font-family: var(--font-display); font-size: .92rem; cursor: pointer; padding: 3px 14px; border-radius: 999px; border: 2px solid var(--gold-2); background: #fff; color: var(--wood-dark); }
.filters button[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }

/* 직업 */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 10px; margin: 0 -14px 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; font-family: var(--font-display); font-size: .98rem; cursor: pointer; color: #FFFDF6; padding: 6px 14px 6px 10px; border-radius: 999px; border: 2px solid #ffffff66; background: var(--c, var(--wood)); box-shadow: 0 3px 0 #00000040; display: inline-flex; gap: 6px; align-items: center; opacity: .78; transition: opacity .15s, transform .1s; }
.tabs button small { font-family: var(--font-body); font-size: .72rem; opacity: .9; }
.tabs button[aria-selected="true"] { opacity: 1; transform: translateY(-2px); border-color: var(--gold-light); box-shadow: 0 5px 0 #00000040, 0 0 0 2px var(--gold); }
.tabs button .dot { width: 9px; height: 9px; border-radius: 50%; background: #FFFDF6; }
.branch-intro { display: grid; gap: 12px; align-items: center; margin-bottom: 16px; }
.branch-intro .bubble { justify-self: start; }
.branch-intro .oath { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-light); }
.branch-intro h2 { color: var(--frame-ink) !important; }
.jobs-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.job { --c: var(--wood); }
.job-top { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: end; }
.job-figure { width: 96px; height: 108px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #FFFDF6, color-mix(in srgb, var(--c) 22%, var(--cream)) 75%); border: 2px solid var(--c); display: grid; place-items: end center; overflow: hidden; padding-bottom: 6px; }
.job-figure img { width: auto; height: 100px; animation: hop 1.8s ease-in-out infinite; transform-origin: bottom center; }
.job h3 { font-size: 1.45rem; margin: 0 0 4px; color: var(--c); }
.job .branch-name { font-size: .82rem; color: var(--ink-soft); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; padding: 1px 9px; border-radius: 999px; background: #fff; border: 2px solid var(--cream-2); color: var(--ink-soft); }
.chip b { font-family: var(--font-display); font-weight: 400; color: var(--ink); }
.stars { color: var(--maple-yellow); letter-spacing: 1px; }
.job .summary { margin: 12px 0; }
.empty { text-align: center; padding: 26px 16px; border: 2px dashed var(--gold-2); border-radius: var(--radius); background: var(--cream); color: var(--ink-soft); }

/* 모험 지도 */
.route { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.route::before { content: ""; position: absolute; left: 33px; top: 20px; bottom: 30px; width: 0; border-left: 6px dotted #C9B3EE; }
.stop { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.stop .pin { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; text-align: center; line-height: 1; background: var(--tone, var(--grass)); color: #FFFDF6; font-family: var(--font-display); font-size: .8rem; border: 3px solid #FFFDF6; box-shadow: 0 0 0 3px var(--gold-2), 0 4px 0 3px #00000040; }
.stop .pin b { display: block; font-size: .95rem; font-weight: 400; letter-spacing: -.03em; }
.stop .panel { margin-top: 0; padding-top: 14px; }
.stop h3 { margin: 0 0 4px; }
.lv { font-family: var(--font-display); }
.tone-1 { --tone: #E8742C; } .tone-2 { --tone: #F2A33A; } .tone-3 { --tone: #D9622B; } .tone-4 { --tone: #5FAE8C; } .tone-5 { --tone: #8A8E96; } .tone-6 { --tone: #8FB3C9; } .tone-7 { --tone: #5E7F99; }
.ground-card .monsters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.ground-card .monsters li { background: #fff; border: 2px solid var(--cream-2); border-radius: 999px; padding: 0 10px; font-size: .84rem; display: inline-flex; align-items: center; gap: 4px; }
.ground-card .monsters li img { width: auto; height: 26px; }
.ground-card .monsters li b { font-family: var(--font-display); font-weight: 400; color: var(--tone); }
.ground-card .band { height: 8px; border-radius: 6px; background: var(--tone); margin: -4px 0 10px; }
.boss-card { background: linear-gradient(180deg, #ECE4F8, var(--cream)); }
.hp { height: 18px; border-radius: 999px; background: #3B2414; border: 2px solid var(--wood-dark); overflow: hidden; margin: 6px 0 14px; position: relative; }
.hp i { position: absolute; inset: 2px; border-radius: 999px; background: linear-gradient(90deg, var(--maple-red), var(--maple) 60%, var(--maple-yellow)); }
.hp em { position: absolute; top: -1px; bottom: -1px; width: 3px; background: #FFFDF6; font-style: normal; }
.phase { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: start; }
.phase .when { font-family: var(--font-display); background: var(--purple); color: #fff; border-radius: 10px; padding: 2px 10px; white-space: nowrap; }
.art-slot { display: grid; place-items: center; text-align: center; aspect-ratio: 16 / 9; border: 2px dashed var(--gold-2); border-radius: var(--radius); color: var(--frame-muted); font-size: .88rem; padding: 12px; background: #ffffff10; }
.talk .bubble { display: block; }
.talks { display: grid; gap: 30px; grid-template-columns: 1fr; }
.talk { display: grid; gap: 10px; }
.talk .who { display: flex; align-items: center; gap: 10px; padding-left: 14px; }
.talk .who i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--grass)); border: 3px solid var(--gold-light); font-style: normal; font-family: var(--font-display); color: #FFFDF6; font-size: 1.15rem; }
.talk .who b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.signs { display: grid; gap: 12px; grid-template-columns: 1fr; }
.sign { background: linear-gradient(180deg, #D9A66E, #C08A55); border: 2px solid var(--gold); border-radius: 12px; padding: 12px 14px; box-shadow: 0 4px 0 var(--wood-dark); color: var(--ink); }
.sign h3 { margin: 0 0 4px; font-size: 1.05rem; color: #3B2414; }
.sign p { margin: 0; font-size: .9rem; }

/* 시즌 패스 */
.pass-hero { background: linear-gradient(180deg, #3A4E8C, var(--night)); color: var(--cream); border-radius: 20px; border: 2px solid var(--gold-2); box-shadow: 0 6px 0 #0000004d; padding: 20px 16px; position: relative; overflow: hidden; }
.pass-hero h2 { color: var(--frost); font-size: 1.7rem; }
.pass-hero .snow { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(#EEF6FA 1.2px, transparent 1.6px), radial-gradient(#EEF6FA 1px, transparent 1.4px); background-size: 46px 46px, 31px 31px; background-position: 0 0, 15px 20px; opacity: .45; }
.pass-hero > * { position: relative; }
.track-wrap { overflow-x: auto; margin: 16px -16px 6px; padding: 8px 16px 14px; scrollbar-width: thin; }
.track { display: grid; grid-template-rows: auto auto auto; grid-auto-flow: column; grid-auto-columns: 128px; gap: 8px; }
.track .row-label { font-family: var(--font-display); font-size: .88rem; display: flex; align-items: center; }
.node { border-radius: 12px; padding: 7px 8px; font-size: .78rem; line-height: 1.35; min-height: 72px; }
.node.free { background: #FFFDF6; color: var(--ink); border: 2px solid var(--cream-2); }
.node.prem { background: #2E3C6E; color: #E6EDF8; border: 2px solid #8FD0F0; }
.node.box { box-shadow: 0 0 0 3px var(--gold), 0 0 14px #F2C14E88; }
.lvl { font-family: var(--font-display); text-align: center; color: var(--gold-light); font-size: 1rem; border-bottom: 3px dotted #8FD0F099; padding-bottom: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82rem; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.legend .l-free::before { background: #FFFDF6; } .legend .l-prem::before { background: #2E3C6E; border: 2px solid #8FD0F0; } .legend .l-box::before { background: var(--gold); }
.slots { display: grid; gap: 12px; grid-template-columns: 1fr; }
.slot { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; padding: 10px 12px; box-shadow: 0 4px 0 #0000002e; }
.slot .icon { width: 60px; height: 60px; border-radius: 12px; background: var(--bg, var(--cream-2)); border: 3px solid var(--bd, var(--wood)); display: grid; place-items: center; font-family: var(--font-display); color: var(--ink); font-size: 1rem; box-shadow: inset 0 -4px 0 #00000018; }
.slot b { font-family: var(--font-display); font-weight: 400; font-size: 1.04rem; display: block; }
.slot .meta { font-size: .84rem; color: var(--ink-soft); }
.slot .price-tag { display: inline-block; margin-top: 3px; font-size: .76rem; background: var(--cream-2); border-radius: 999px; padding: 0 9px; }
.cat-cos { --bg: #F7B26A; --bd: #D9622B; } .cat-conv { --bg: #BFE3F2; --bd: #5AA8D6; } .cat-boost { --bg: #B9E0A0; --bd: #5E9E4A; } .cat-gacha { --bg: #E7C79E; --bd: #9A6A3E; }

/* 확률: 등급 색 */
.grade-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 20px; }
.grade-chip { border-radius: 14px; padding: 10px 8px; text-align: center; background: #FFFDF6; border: 3px solid var(--g); box-shadow: 0 4px 0 var(--gd); }
.grade-chip b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--gd); }
.grade-chip .dots { color: var(--g); letter-spacing: 2px; font-size: .78rem; }
[data-grade="1"] { --g: #A89880; --gd: #5E5244; } [data-grade="2"] { --g: #6FAE5A; --gd: #2F5A2A; } [data-grade="3"] { --g: #4A86D9; --gd: #1E3F7A; }
[data-grade="4"] { --g: #8C5BC2; --gd: #3E2366; } [data-grade="5"] { --g: #E8742C; --gd: #7A2E10; } [data-grade="6"] { --g: #E8742C; --gd: #5A1E18; }
.grade-chip[data-grade="6"] { border-color: transparent; background: linear-gradient(#FFFDF6, #FFFDF6) padding-box, linear-gradient(90deg, #C9302F, #E8742C, #F2B544, #E8742C, #C9302F) border-box; background-size: 100% 100%, 300% 100%; animation: myth 6s linear infinite; }
@keyframes myth { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 300% 0; } }
.gacha-tables tbody tr[data-grade] td:first-child { border-left: 8px solid var(--g); font-family: var(--font-display); color: var(--gd); }
.gacha-tables tbody tr[data-grade="6"] td:first-child { border-image: linear-gradient(#C9302F, #E8742C, #F2B544) 1; }
.gacha-tables h3 { color: var(--gold-light); }

/* ================= 바닥글 ================= */
.site-footer { margin-top: 28px; padding: 26px 0 30px; color: #B9BFD8; font-size: .82rem; background: var(--navy); border-top: 3px solid var(--gold-2); }
.site-footer a { color: var(--gold-light); }
.disclaimer { background: #ffffff0d; border: 1px solid #ffffff1f; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.disclaimer strong { color: #F3ECFB; }
.disclaimer > :last-child { margin-bottom: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 0 0 12px; }

/* ================= 넓은 화면 ================= */
@media (min-width: 720px) {
  [id] { scroll-margin-top: 110px; }
  .site-header { position: sticky; top: 0; }
  .topbar .not-official { font-size: .8rem; }
  body { font-size: 16px; }
  .subnav { flex-direction: row; align-items: center; gap: 14px; padding: 6px 12px; }
  .nav { margin: 0; padding: 0; }
  .hero { min-height: 600px; background-image: url("../img/ai/hero.webp"); background-position: center 72%; }
  .branch-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bcard { grid-template-columns: 1fr; }
  .bcard .art img { aspect-ratio: 4 / 3; height: auto; }
  .bcard .body { border-left: 0; border-top: 4px solid var(--c); }
  .hero-content { padding-top: 90px; }
  .logo .script { font-size: 5.4rem; }
  .logo .ko { font-size: 1.35rem; }
  .countdown .dday { font-size: 1.6rem; }
  .btn { min-height: 50px; font-size: 1.08rem; padding: 8px 26px; }
  .chest { width: 300px; bottom: 50px; }
  .sprite { height: 136px; } .sprite.mon { height: 84px; }
  .lineup { padding: 0 24px; }
  .lineup .hide-sm { display: block; }
  .lineup.cap-row .hide-sm { display: block; }
  .cap { width: 15%; max-width: 150px; }
  .cap figcaption { font-size: .78rem; }
  .lineup.cap-row { gap: 14px; }
  .stage { height: 240px; }
  .status { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
  .events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .monsters-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mcard.boss { grid-column: span 5; }
  .ncards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jobs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .branch-intro { grid-template-columns: 1fr auto; }
  .branch-intro:has(.branch-art) { grid-template-columns: 240px 1fr auto; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .talks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .signs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
  .banner { min-height: 260px; padding-top: 70px; padding-bottom: 96px; }
  .banner h1 { font-size: 2.6rem; }
  .wrap { padding: 0 20px; }
  .frame { padding: 24px 0 34px; }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ncards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .events { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .branch-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logo .script { font-size: 6.4rem; }
  .hero { min-height: 640px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

/* ===== 영웅원정대 (두 번째 월드) — heroes.html, heroes/gacha.html =====
   생성 도구: docs/hero-tactics/monetization/tools/build_heroes_page.py, build_gacha_page.py */
:root { --rare: #3F7BE0; --elite: #7B4FD0; --legend: #E8742C; }
/* 영웅원정대 전용 메뉴: 남색 판 + 금테, 지금 페이지는 금빛 알약 */
.subnav-heroes { background: linear-gradient(180deg, #3A4F94, #26346A 55%, #1E2858); box-shadow: inset 0 2px 0 #6A82C8, inset 0 -3px 0 #121835, 0 6px 14px #140f2a88; }
.subnav-heroes .nav a { text-shadow: 0 1px 0 #0D1330; }
.subnav-heroes .nav a[aria-current="page"] { background: linear-gradient(180deg, #FFF1B8, #F7C548); color: #3B1E05; box-shadow: inset 0 -2px 0 #C9790C, 0 2px 0 #121835; }
.brand-heroes img { display: block; height: 34px; width: auto; filter: drop-shadow(0 2px 2px #0b0820aa); }
/* 소개 페이지 배너 */
.heroes-banner { background: radial-gradient(circle at 50% 30%, #3A4D8C 0, #2B2350 55%, #1F2848 100%); padding-top: 72px; }
.heroes-banner h1 { margin: 0 0 .2em; line-height: 0; }
.hb-logo { width: min(460px, 90%); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 12px #0b0820aa); }
/* 배경 그림(리프레 숲·혼테일·영웅들)이 있으면 영웅이 버튼 아래로 보이게 아래를 더 띄운다 */
.heroes-banner.has-bg { background-color: #1F2848; background-size: cover; background-position: center bottom; padding-bottom: 150px; }
@media (min-width: 720px) { .heroes-banner.has-bg { padding-bottom: 210px; } }
.hb-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.banner .hb-launch { margin-top: 10px; }
/* 특징 카드 */
.feats .feat { background: var(--cream); border: 2px solid var(--gold-2); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 #0000002e; color: var(--ink); }
.feat-shot { margin: 0; }
.feat-shot:not(.has-shot) { display: none; }
.feat-shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feat h3 { margin: 10px 12px 4px; color: var(--wood-dark); }
.feat p { margin: 0 12px 12px; font-size: .9rem; }
/* 영웅 36명 */
.roster table { min-width: 560px; }
.roster th[scope="row"] { white-space: nowrap; }
.hr-family { display: block; font-family: var(--font-display); color: var(--wood-dark); }
.hr-jobs { display: block; font-size: .74rem; color: var(--ink-soft); font-weight: 400; }
.hr-title { display: block; font-size: .78rem; color: var(--ink-soft); }
.roster thead .g-r { border-bottom: 4px solid var(--rare); } .roster thead .g-e { border-bottom: 4px solid var(--elite); } .roster thead .g-l { border-bottom: 4px solid var(--legend); }
/* 확률 공개 표 */
.hx-toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hx-toc a { background: var(--navy-2, #1F2848); color: #F3ECFB; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .86rem; font-family: var(--font-display); }
.hx-panel h3 { margin-top: 1.2em; }
.hx-panel h3:first-child { margin-top: 0; }
.hx-panel .table-wrap { box-shadow: none; border-width: 1px; }
.hx-panel table.compact { min-width: 0; }
.hx-panel caption { text-align: left; font-weight: 700; padding: 8px 10px; background: var(--cream-2); }
.hx-panel td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-panel :is(th, td):first-child { white-space: nowrap; }
.hx-panel tr.g-r > :first-child { border-left: 6px solid var(--rare); }
.hx-panel tr.g-e > :first-child { border-left: 6px solid var(--elite); }
.hx-panel tr.g-l > :first-child { border-left: 6px solid var(--legend); }
.hx-panel code { font-size: .74rem; background: var(--cream-2); padding: 1px 4px; border-radius: 4px; }
.hx-panel ul.dots { padding-left: 20px; } .hx-panel ul.dots li { margin: 4px 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 0 0 12px; }
.facts div { background: #FFFDF6; border: 1px solid var(--cream-2); border-radius: 10px; padding: 10px 12px; }
.facts b { display: block; font-family: var(--font-display); color: var(--wood-dark); }
.facts span { display: block; font-size: .88rem; }
@media (max-width: 560px) {
  .roster table { min-width: 0; font-size: .82rem; }
  .roster :is(th, td) { padding: 6px 6px; }
  .roster th[scope="row"] { white-space: normal; word-break: keep-all; }
  .hr-jobs { display: none; }
  .hr-title { font-size: .7rem; }
  .hx-panel .approx, .hx-panel .id { display: none; }
  .hx-panel table { min-width: 0; font-size: .84rem; }
  .hx-panel :is(th, td) { padding: 6px 6px; word-break: keep-all; }
}

/* ===== 문의하기 (contact.html, heroes/contact.html) · 운영자 문의함 (admin.html) — 생성: docs/site/tools/build_contact_page.py ===== */
.inq { max-width: 760px; margin: 0 auto; }
.inq-form { display: grid; gap: 14px; }
.inq-row { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .inq-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fld { display: grid; gap: 6px; font-family: var(--font-display); color: var(--ink); }
.fld > span { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.fld input, .fld select, .fld textarea, .admin-edit select, .admin-edit textarea {
  width: 100%; font: inherit; font-family: "Noto Sans KR", sans-serif; font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid var(--cream-2); border-radius: 12px; padding: 10px 12px; min-height: 46px;
}
.fld textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .admin-edit textarea:focus { outline: 3px solid #3F7BE055; border-color: var(--blue); }
.fld.is-bad input, .fld.is-bad select, .fld.is-bad textarea { border-color: var(--maple-red); background: #FFF1EE; }
.inq-agree.is-bad { color: var(--maple-red); }
.inq-tip { margin: -4px 0 0; background: #EEF4FF; border-left: 4px solid var(--blue); border-radius: 8px; padding: 8px 12px; }
.inq-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inq-privacy { background: var(--cream); border: 2px solid var(--cream-2); border-radius: 12px; padding: 10px 14px; }
.inq-privacy p { margin: 0 0 4px; }
.inq-privacy ul { margin: 0 0 8px; padding-left: 1.2em; }
.inq-agree { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.inq-agree input { width: 20px; height: 20px; }
.notice-mini { margin: 0; color: var(--maple-red); }
.inq-captcha { min-height: 65px; }
.inq-msg { margin: 0; min-height: 1.4em; font-weight: 700; }
.inq-msg.is-ok { color: var(--ok); }
.inq-msg.is-err { color: var(--maple-red); }
.inq-off { margin: 0; text-align: center; font-family: var(--font-display); }
.inq-form .btn { justify-self: start; }
.admin-page { background: var(--navy); }
.admin { padding: 24px 14px 60px; color: var(--frame-ink); }
.admin h1 { font-family: var(--font-display); }
.admin-login { max-width: 420px; display: grid; gap: 12px; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.admin-tabs button { font: inherit; font-family: var(--font-display); padding: 6px 14px; border-radius: 999px; border: 2px solid #ffffff33; background: var(--navy-2); color: var(--frame-ink); cursor: pointer; }
.admin-tabs button[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.admin-list { display: grid; gap: 12px; }
.admin-item { border-left: 6px solid var(--blue); }
.admin-item.s-doing { border-left-color: var(--gold-2); }
.admin-item.s-done { border-left-color: var(--ok); opacity: .85; }
.admin-meta { margin: 0 0 4px; color: var(--ink-soft); }
.admin-body { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border-radius: 10px; padding: 10px 12px; }
.admin-edit { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; align-items: center; }
@media (min-width: 720px) { .admin-edit { grid-template-columns: 140px minmax(0, 1fr) auto auto; } }
.admin > .muted, .admin [data-admin-box] > .muted { color: var(--frame-muted); }
.admin-item { color: var(--ink); }
.admin-item .admin-body { color: var(--ink); }
.admin-list > p { color: var(--frame-muted); }
