/* styles.css (single) – Freeunse unified */

/* =======================
   Tokens
======================= */

@font-face {
    font-family: 'Cafe24';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/Cafe24Ohsquare.woff') format('woff');
}
@font-face {
    font-family: 'GongGo';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicMedium.woff') format('woff');
}


@font-face {
    font-family: 'NanumPen';
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumBrush/NanumPen.eot);
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumBrush/NanumPen.eot?#iefix) format("embedded-opentype"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumBrush/NanumPen.woff) format("woff"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumBrush/NanumPen.ttf) format("truetype");
}
@font-face {
    font-family: 'NanumSquare';
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.eot);
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.eot?#iefix) format("embedded-opentype"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.woff2) format("woff2"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.woff) format("woff"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.ttf) format("truetype");
}


@font-face {
    font-family: 'NanumGothic';
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothic.eot);
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothic.eot?#iefix) format("embedded-opentype"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothic.woff) format("woff"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothic.ttf) format("truetype");
}

@font-face {
    font-family: 'NanumGothicBold';
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothicBold.otf) format("embedded-opentype"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothicBold.ttf) format("truetype"), url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumGothic/NanumGothicBold.woff) format("woff");
}



:root{
  --bg:#f8fafc;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --dark:#020617;

  --r-lg:28px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --shadow-soft: 0 1px 0 rgba(2,6,23,.04);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:NanumGothic,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;
  background:var(--bg);
  color:var(--text);
}

.safe-top{ padding-top: env(safe-area-inset-top); }
.safe-bottom{ padding-bottom: env(safe-area-inset-bottom); }

/* =======================
   Layout
======================= */
.container{
  width:100%;
  max-width:420px;
  margin:0 auto;
  padding:0 16px 40px;
}
.container--header{ padding-bottom:0; }

/* legacy wrapper support (푸터 고정 안 하므로 88px 제거) */
.wrap{ padding:16px; }

/* =======================
   Card (unified)
======================= */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:20px;
}
.xxcard--pad { padding:20px; }

/* =======================
   Header / Topbar (BLACK unified)
   - supports .header system + .topbar legacy
======================= */
.header,
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--dark);          /* ✅ 항상 검정 */
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.10);
  backdrop-filter:none;            /* ✅ 흰색 블러 제거 */
}

/* header variant */
.header__row{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
}

/* topbar legacy variant */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:5px 10px;
}


/* logo/brand */
.brand,
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#fff;                      /* ✅ 검정바 위 흰색 */
  font-weight:900;
  letter-spacing:-.02em;
}
.brand__name{ font-size:22px; font-weight:900; }
.logo{ font-size:18px; }

/* badge (header 기본: 다크 톤) */
.badge{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  color:#fff;
}

/* buttons – supports both */
.top-actions{ display:flex; gap:8px; }

.icon-btn,
.iconbtn{
  width:48px;
  height:48px;
  border:0;
  border-radius:18px;
  background:rgba(255,255,255,.10);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
}
.icon-btn:active,
.iconbtn:active{ transform:scale(.98); }

.iconbtn:hover { background:#cdcdcd; color:black; }

.icon-btn--light{ background:#f1f5f9; color:#0f172a; }

/* =======================
   Hero / Typography / UI
======================= */
.hero{ padding-top:18px; }

.hero__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.pill{
  padding:10px 12px;
  border-radius:16px;
  background:var(--dark);
  color:#fff;
  font-size:14px;
  font-weight:900;
}

.h1{
  margin:0;
  line-height:1.15;
  font-size:28px;
  font-weight:900;
  letter-spacing:-.02em;
}
.h1__emph{ font-size:30px; font-weight:1000; }

.sub{
  margin:12px 0 0;
  font-size:18px;
  font-weight:700;
  color:var(--muted);
}
.sub__strong{ color:var(--text); font-weight:900; font-size:19px; }

.h2{ margin:0; font-size:20px; font-weight:900; letter-spacing:-.02em; }

.hint{
  margin-top:14px;
  font-size:16px;
  font-weight:800;
  color:var(--muted);
}
.hint__strong{
  color:var(--text);
  font-weight:1000;
  font-size:18px;
}

/* Segment */
.seg{
  margin-top:18px;
  background:#f1f5f9;
  border-radius:18px;
  padding:6px;
  display:flex;
  gap:6px;
}
.seg__btn{
  flex:1;
  border:0;
  border-radius:16px;
  padding:14px 12px;
  font-size:18px;
  font-weight:900;
  background:transparent;
  color:#334155;
  cursor:pointer;
}
.seg__btn.is-active{
  background:#fff;
  box-shadow:var(--shadow-soft);
  color:#0f172a;
}

.seg__btn:hover { background:white; cursor:pointer; }

/* Sections */
.section{ margin-top:22px; }
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}
.date{ font-size:14px; font-weight:800; color:var(--muted); }

/* Grid */
.grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
}

.z-card{
  text-decoration:none;
  background:#fff;
  border:1px solid var(--border);
  border-radius:26px;
  box-shadow:var(--shadow-soft);
  padding:18px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.z-card__inner{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:6px;
}
.z-card:active{ transform:scale(.99); }
.z-emoji{ font-size:44px; line-height:1; }

.z-name{
  width:100%;
  text-align:center;
  font-size:20px;
  font-weight:900;
  letter-spacing:-.02em;
}
.z-sub{ font-size:14px; font-weight:800; color:var(--muted); }

.notice{
  margin:14px 0 0;
  font-size:14px;
  font-weight:700;
  color:var(--muted);
  line-height:1.5;
}

/* =======================
   Drawer system (new)
======================= */
.backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.42);
  z-index:60;
}

.drawer{
  position:fixed;
  top:0;
  right:0;
  height:100%;
  width:min(86%, 360px);
  background:#fff;
  z-index:70;
  box-shadow:-12px 0 40px rgba(2,6,23,.18);
  transform:translateX(100%);
  transition:transform .22s ease;
}
.drawer.is-open{ transform:translateX(0); }

.drawer__head{
  padding:18px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.drawer__title{ font-size:18px; font-weight:1000; }
.drawer__sub{ margin-top:6px; font-size:14px; font-weight:700; color:var(--muted); }

.drawer__nav{ padding:10px 10px 18px; }

.nav-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 14px;
  border-radius:18px;
  text-decoration:none;
  color:var(--text);
}
.nav-item:hover{ background:#f1f5f9; }

.nav-item__left{ font-size:16px; font-weight:1000; }
.nav-item__right{ font-size:14px; font-weight:800; color:var(--muted); }

.nav-item.is-active{
  background:#0f172a;
  color:#fff;
}
.nav-item.is-active .nav-item__right{ color:rgba(255,255,255,.85); }

.divider{ height:1px; background:var(--border); margin:10px 8px; }

/* =======================
   Sheet system (legacy)
======================= */
/* 딤 배경 */
.overlay{
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;

  background: rgba(0,0,0,0.45);

  display: none;           /* 기본 숨김 */
  z-index: 9000;           /* 메뉴보다 아래/위 관계는 아래 참고 */
  pointer-events: auto;    /* 클릭 받기 */
}

/* 메뉴 열렸을 때 overlay 표시 */
.overlay.is-open{
  display: block;
}


.sheet{
  position:fixed;
  inset:0;
  z-index:9100;
  background:rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition:.2s;
}
.sheet.open{
  opacity:1;
  pointer-events:auto;
}
.sheet .sheet-head,
.sheet .sheet-body{
  position:absolute;
  right:0;
  top:0;
  height:100%;
  width:min(320px,88vw);
  background:#fff;
}
.sheet-head{
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-left:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.sheet-body{
  top:56px;
  padding:12px 14px;
  border-left:1px solid var(--border);
  overflow:auto;
}

/* sheet 내 badge는 밝은 스타일을 유지(기존 유지) */
.sheet .badge{
  background:#eef2ff;
  color:#3730a3;
  font-weight:700;
}

.menulink{
  display:block;
  padding:12px 10px;
  border-radius:12px;
  text-decoration:none;
  color:var(--text);
}
.menulink:active{ background:#f1f5f9; }

.menubtn{
  width:100%;
  padding:12px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
}

.menubtn:hover { background:#f1f5f9; cursor:pointer; }


.section-title{ font-size:12px; color:var(--muted); margin:8px 4px; }

/* x 닫기 버튼 (menu top row) */
.menu-top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
}
.menu-top-row .home{
  font-size:16px;
  font-weight:600;
}
.closebtn{
  background:none;
  border:none;
  font-size:20px;
  font-weight:700;
  cursor:pointer;
  line-height:1;
}

/* =======================
   Footer (unified, NOT fixed)
======================= */
.footer{
  position:static;                 /* ✅ 고정 아님 */
  margin-top:26px;
  padding:18px 16px 24px;
  background:#fff;
  border-top:1px solid var(--border);
}
.footer-inner{ padding:10px 14px; }

.foot-title{ font-weight:800; font-size:13px; }
.foot-desc{ font-size:12px; color:var(--muted); margin-top:2px; }

.foot-links{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.foot-links a{ color:#475569; text-decoration:none; }

.foot-copy{
  margin-top:6px;
  font-size:11px;
  color:#94a3b8;
}

/* alt footer naming support */
.footer__links{
  display:flex;
  flex-wrap:wrap;
  gap:14px 18px;
  font-size:16px;
  font-weight:900;
}
.footer__links a{ color:#334155; text-decoration:none; }
.footer__links a:hover{ color:#0f172a; }

.footer__copy{
  margin-top:14px;
  font-size:14px;
  font-weight:800;
  color:var(--muted);
}



/* =======================
   Toast
======================= */
.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  background:#0f172a;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  opacity:0;
  transition:.2s;
  pointer-events:none;
  z-index:100;
}
.toast.show{ opacity:1; }


