/**
 * kyminfo 패밀리 공통 스타일 (common.css)
 * game.kyminfo.com 전용
 */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* ========================================================
   상단 사이트 헤더 (.site-header)
   ======================================================== */
.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(calc((100vw - 1200px) / 2 + 28px), 28px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.055em;
  font-size: 19px;
  white-space: nowrap;
  color: var(--ink);
}

.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(65, 105, 225, 0.23);
  user-select: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.main-nav a, .header-link {
  font-size: 13px;
  font-weight: 600;
  color: #596176;
  transition: color var(--transition-fast);
}

.main-nav a:hover, .header-link:hover, .site-footer nav a:hover {
  color: var(--blue);
}

.header-link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  white-space: nowrap;
}

.header-link span {
  font-size: 14px;
}

/* ========================================================
   패밀리 사이트 드롭다운 (.family-sites & .family-top)
   Shared Kymi family navigation (header opens down, footer opens up)
   ======================================================== */
.family-sites {
  position: relative;
  justify-self: end;
  align-self: end;
  color: var(--ink);
  font-size: 12px;
  z-index: 60;
}

.family-sites summary {
  min-width: 158px;
  min-height: 42px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface, #fff);
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  color: inherit;
  box-sizing: border-box;
  transition: border-color var(--transition-fast);
}

.family-sites summary::-webkit-details-marker {
  display: none;
}

.family-sites summary span {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.family-sites[open] summary span {
  transform: rotate(180deg);
}

.family-sites summary:hover {
  border-color: var(--accent, var(--blue, #4f68e5));
}

.family-sites summary:focus-visible,
.family-top > summary:focus-visible {
  outline: 3px solid #3d55c6;
  outline-offset: 3px;
}

/* 하단 푸터 드롭다운: 위쪽(bottom: calc(100% + 9px))으로 열림 */
.family-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  width: 190px;
  display: grid;
  gap: 3px;
  padding: 7px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(42, 57, 107, 0.16);
  z-index: 61;
}

.family-list a {
  display: block;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.family-list a:hover,
.family-list a[aria-current="page"] {
  background: var(--accent-soft, #eff2ff);
  color: var(--accent, var(--blue, #4f68e5));
}

.family-list a[aria-current="page"]:after {
  content: '현재 사이트';
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.7;
}

@media (max-width: 760px) {
  .family-sites {
    justify-self: start;
    align-self: start;
  }
  .family-list {
    right: auto;
    left: 0;
  }
}

/* 상단 헤더 드롭다운 (.family-top): 아래쪽(top: calc(100% + 10px))으로 열림 */
.family-top {
  position: relative;
  flex: none;
  margin-left: auto;
  font-size: 12px;
  color: #65718a;
  z-index: 60;
  min-width: 0;
  align-self: center;
}

.family-top > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px;
  border: 1px solid #e3e7f2;
  border-radius: 10px;
  background: var(--surface, #fff);
  color: inherit;
  min-width: 0;
  min-height: 0;
  font-weight: 700;
  box-sizing: border-box;
}

.family-top > summary::-webkit-details-marker {
  display: none;
}

.family-top .family-list {
  position: absolute;
  top: calc(100% + 10px);
  bottom: auto;
  right: 0;
  display: block;
  width: 205px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid #e3e7f2;
  border-radius: 13px;
  background: var(--surface, #fff);
  box-shadow: 0 12px 32px rgba(32, 48, 80, 0.12);
  z-index: 61;
}

.family-top .family-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  color: inherit;
  font-size: 13px;
  text-decoration: none;
}

.family-top .family-list a:hover,
.family-top .family-list a[aria-current] {
  background: #f1f3fe;
  color: #4f68e5;
}

@media (max-width: 900px) {
  .family-top {
    margin-left: auto;
  }
  .family-top > summary {
    padding: 8px 10px;
    font-size: 11px;
    gap: 9px;
  }
}

@media (max-width: 600px) {
  .site-header > .header-link {
    display: none;
  }
  .site-header > .family-top {
    margin-left: auto;
  }
  .family-top > summary {
    padding: 8px 10px;
  }
}

@media print {
  .family-top {
    display: none !important;
  }
}

/* ========================================================
   모바일 상단 네비게이션 (.mobile-nav)
   ======================================================== */
.mobile-nav {
  display: none;
  position: sticky;
  top: 62px;
  z-index: 40;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.mobile-nav::-webkit-scrollbar {
  display: none;
}

.mobile-nav a {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: #fff;
  color: #596176;
  font-size: 11px;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.mobile-nav a:hover, .mobile-nav a.active {
  color: var(--blue);
  border-color: #cbd5fc;
  background: #f8faff;
}

/* ========================================================
   메인 컨테이너
   ======================================================== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================================
   신뢰 스트립 (.trust-strip)
   ======================================================== */
.trust-strip {
  padding: 19px 27px;
  margin: 36px 0 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(40, 52, 91, 0.03);
}

.trust-strip > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon {
  flex: 0 0 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f0f3ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.trust-strip b, .trust-strip small {
  display: block;
}

.trust-strip b {
  font-size: 13px;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.trust-strip small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ========================================================
   하단 사이트 푸터 (.site-footer)
   ======================================================== */
.site-footer {
  padding: 0;
  text-align: left;
  background: white;
  border-top: 1px solid var(--line);
  color: #52617a;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: center;
}

.footer-brand {
  grid-column: 1;
  grid-row: 1;
  font-size: 16px;
}

.footer-inner > p {
  grid-column: 1;
  grid-row: 2;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.footer-inner > nav {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-inner > nav a {
  font-size: 12px;
  color: #52617a;
  transition: color var(--transition-fast);
}

.footer-inner > small {
  grid-column: 1;
  grid-row: 3;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #718096;
}

.footer-inner > .family-sites {
  grid-column: 2;
  grid-row: 3;
  margin-top: 19px;
}

/* ========================================================
   광고 슬롯 (.ad-slot - 준비 영역)
   ======================================================== */
.ad-slot {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  min-height: 90px;
  position: relative;
}

.ad-slot[hidden] {
  display: none !important;
}

.ad-badge {
  font-size: 9px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.ad-placeholder-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* ========================================================
   토스트 알림 (.toast-container)
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUpToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13px;
  color: var(--ink);
}

@keyframes slideUpToast {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  line-height: 1.4;
}

.toast-action {
  background: var(--blue);
  color: white;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.toast-close {
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}

/* ========================================================
   서브페이지 기본 스타일 (.simple-page)
   ======================================================== */
.simple-page {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 48px;
  padding-bottom: 70px;
  min-height: 65vh;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #52617a;
  font-size: 11px;
  margin-bottom: 16px;
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.simple-page h1 {
  font-size: 32px;
  letter-spacing: -0.06em;
  margin: 6px 0 12px;
  color: var(--ink-heading);
}

.simple-lead {
  font-size: 14px;
  color: #687186;
  margin-bottom: 28px;
}

.content-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  font-size: 16px;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--ink);
}

.content-card p, .content-card li {
  font-size: 13px;
  color: #52617a;
  line-height: 1.8;
}

.content-card ul, .content-card ol {
  padding-left: 20px;
  margin: 0;
}

.text-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.button-link, .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 700;
  transition: background var(--transition-fast);
}

.button-link:hover, .primary-button:hover {
  background: var(--blue-dark);
}

/* ========================================================
   미디어 쿼리 (반응형 최적화)
   ======================================================== */
@media (max-width: 900px) {
  .site-header {
    gap: 16px;
    padding: 0 20px;
    height: 68px;
  }
  .main-nav {
    gap: 16px;
  }
  .main-nav a {
    font-size: 12px;
  }
  .trust-strip {
    gap: 14px;
    padding: 16px 20px;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 62px;
    padding: 0 16px;
  }
  .main-nav {
    display: none;
  }
  .mobile-nav {
    display: flex;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
  .header-link {
    display: none;
  }
  .trust-strip {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    margin: 24px 0 40px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 16px;
  }
  .footer-inner > nav {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
  }
  .footer-inner > small {
    grid-column: 1;
    grid-row: 4;
  }
  .footer-inner > .family-sites {
    grid-column: 1;
    grid-row: 5;
    margin-top: 10px;
  }
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

[hidden]{display:none!important}.family-top .family-list{left:auto;right:0}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #4361ee;outline-offset:3px} @media(max-width:540px){.site-header{flex-wrap:wrap;gap:12px}.family-top{margin-left:auto}.game-grid{grid-template-columns:minmax(0,1fr)!important}.game-page,.content-card{min-width:0}.resume-info{min-width:0;overflow-wrap:anywhere}}

[role=button]:focus-visible,[role=grid]:focus-visible{outline:3px solid #4169e1;outline-offset:2px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
