/* =============================================
   모아 (moa) — 서브페이지 공통 디자인 (매거진 · 개구리 테마)
   메인 index.html :root 와 색 5종 동일하게 유지
   ============================================= */

:root {
  /* 로고/제목 = Jua(둥글둥글), 본문 = Noto Sans KR, 손글씨 악센트 = Gaegu */
  --katuri: 'Jua','Noto Sans KR',sans-serif;
  --round:  'Jua','Noto Sans KR',sans-serif;
  --hand:   'Gaegu','Noto Sans KR',cursive;

  /* ⬇⬇ 색 5종 — 메인 index.html :root 와 같은 값 ⬇⬇ */
  --main:        #8fd189;
  --main-dark:   #63ab5c;
  --main-deep:   #4f9a49;
  --main-light:  #e3f4dd;
  --bg:     #dbefce;
  --card:   #ffffff;
  --char:   url('/fan.png');   /* 로딩화면 마스코트 = 팬캐릭터 */

  --logo:        #4f9a49;
  --text:        #41533d;   /* 초록 잉크 본문 */
  --text-soft:   #7e9c78;
  --text-mid:    #5f7a59;
  --white:       #ffffff;
  --radius-lg:   24px;
  --radius-md:   16px;
  --radius-sm:   12px;
  --shadow:      0 10px 30px -14px rgba(60,110,55,0.35), 0 2px 6px rgba(60,110,55,.06);
  --shadow-hover:0 18px 44px -18px rgba(60,110,55,0.5);
  --transition:  0.2s ease;
  --page-width: 1100px;
}

/* ── 다크모드 (밝은 라임 글자 + 어두운 숲 배경) ── */
body.dark {
  --main:        #9ad893;
  --main-dark:   #bdecb7;
  --main-deep:   #cdeec8;
  --main-light:  #2a3a23;
  --bg:     #141a11;
  --card:   #1b2318;
  --logo:        #bdecb7;
  --text:        #dff2db;
  --text-soft:   #8fa88a;
  --text-mid:    #a9c3a2;
  --white:       #1b2318;
  --shadow:      0 10px 30px -14px rgba(0,0,0,0.6);
  --shadow-hover:0 18px 44px -18px rgba(0,0,0,0.7);
}
body { transition: background var(--transition), color var(--transition); }

/* ── 다크모드 세로 토글 (nav 오른쪽) ── */
.theme-switch {
  flex-shrink: 0; margin-left: 7px;
  position: relative;
  width: 22px; height: 33px; border-radius: 999px;
  border: 1.5px solid var(--main-light); background: #eef6ea;
  cursor: pointer; padding: 0; transition: background var(--transition);
}
.theme-switch .knob {
  position: absolute; left: 1.5px; top: 1.5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 9px; transition: top var(--transition), background var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
body.dark .theme-switch { background: #20281b; }
body.dark .theme-switch .knob { top: 14px; background: #1b2318; }

/* 다크 고정색 보정 */
body.dark footer { color: var(--text-soft) !important; }
body.dark .input { background: var(--card); color: var(--text); }
body.dark .page-btn { background: var(--card); color: var(--text); }
body.dark .badge-white { background: var(--card); }
body.dark tr:hover td { background: #22301c; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  padding: clamp(16px,3.2vw,52px) clamp(14px,4.5vw,64px);
  -webkit-font-smoothing: antialiased;
  /* ── 풀블리드 고정 배경 (§0.0.6: body 배경 레이어 + fixed) ── */
  background-color: var(--bg);
  background-image: url('bg.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}
body.dark {
  background-color: #141a11;
  background-image: linear-gradient(rgba(17,22,14,.72), rgba(17,22,14,.80)), url('bg.jpg');
  background-repeat: no-repeat, no-repeat;
  background-position: center center;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
}

/* ── 상단 네비게이션 (매거진 워드마크 느낌) ── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(240,248,235,0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--main-light);
  display: flex; justify-content: center;
}
body.dark .nav { background: rgba(18,24,15,0.86); }
.nav-inner {
  display: flex; align-items: center;
  max-width: var(--page-width); width: 100%;
  padding: 0 14px;
  gap: 2px;
}
a.nav-logo {
  font-family: var(--katuri);
  font-size: 30px !important; color: var(--logo) !important;
  margin-right: auto;
  padding: 12px 12px 10px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 7px;
}
.nav a {
  font-family: var(--round);
  padding: 18px 15px;
  font-size: 16px; font-weight: 400;
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap; letter-spacing: .5px;
}
.nav a:hover { color: var(--main-deep); }
.nav a.active {
  color: var(--main-deep);
  border-bottom-color: var(--main);
}

/* ── 본문 컨테이너 ── */
.container {
  position: relative; z-index: 1;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 30px 16px 84px;
  display: flex; flex-direction: column;
  gap: 16px;
}

/* ── 공통 카드 ── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--main-light);
  box-shadow: var(--shadow);
  padding: 24px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); }

.card-title {
  font-family: var(--round);
  font-size: 15px; font-weight: 400;
  color: var(--main-deep);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: '';
  display: block; width: 4px; height: 16px;
  background: var(--main);
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── 섹션 헤더 ── */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--round);
  font-size: 18px; font-weight: 400;
  color: var(--main-deep);
}

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; border: none;
  text-decoration: none; font-family: var(--round);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary { background: var(--main); color: #fff; }
.btn-primary:hover { background: var(--main-dark); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--main-light);
  color: var(--main-deep);
}
.btn-outline:hover { background: var(--main-light); }
.btn-danger { background: #ffe0e0; color: #e05; border: none; }
.btn-danger:hover { background: #ffc5c5; }

/* ── 배지/태그 ── */
.badge {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-pink { background: var(--main-light); color: var(--main-deep); }
.badge-white { background: #fff; color: var(--main-deep); border: 1px solid var(--main-light); }

/* ── 테이블 ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
th {
  padding: 11px 12px;
  background: var(--main-light);
  color: var(--main-deep); font-weight: 700;
  text-align: left; font-size: 12px;
  letter-spacing: 0.03em;
}
th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
th:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--main-light);
  color: var(--text-mid);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--main-light); }

/* ── 폼 인풋 ── */
.input {
  width: 100%; padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--main-light);
  font-size: 14px; font-family: inherit;
  outline: none; background: #fff; color: var(--text);
  transition: border-color var(--transition);
}
.input:focus { border-color: var(--main); }
.input-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--main-deep); letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.form-field { margin-bottom: 12px; }

/* ── 토스트 ── */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--main-dark); color: #fff;
  padding: 12px 28px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  opacity: 0; transition: all 0.3s;
  pointer-events: none; z-index: 999; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 빈 상태 ── */
.empty {
  text-align: center; padding: 44px 20px;
  color: var(--text-soft); font-size: 14px;
}
.empty-icon { font-size: 38px; margin-bottom: 10px; }

/* ── 페이지 타이틀 ── */
.page-title {
  font-family: var(--round);
  font-size: 34px; color: var(--main-deep);
  text-align: center; margin-bottom: 4px; letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(255,255,255,.95), 0 1px 0 #fff, 0 2px 0 rgba(255,255,255,.7);
}
body.dark .page-title { text-shadow: 0 0 16px rgba(15,20,12,.95), 0 2px 5px rgba(0,0,0,.6); }
.page-subtitle {
  font-family: var(--hand);
  font-size: 16px; color: var(--main-deep);
  text-align: center; margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(255,255,255,.9), 0 1px 0 #fff;
}
body.dark .page-subtitle { color: var(--text-soft); text-shadow: 0 0 10px rgba(15,20,12,.85); }

/* ── 스피너 ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--main-light);
  border-top-color: var(--main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 스태거 등장 */
@keyframes staggerIn {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
.stagger > * { opacity:0; animation: staggerIn .4s ease forwards; }
.stagger > *:nth-child(1){animation-delay:.04s}
.stagger > *:nth-child(2){animation-delay:.08s}
.stagger > *:nth-child(3){animation-delay:.12s}
.stagger > *:nth-child(4){animation-delay:.16s}
.stagger > *:nth-child(5){animation-delay:.20s}
.stagger > *:nth-child(6){animation-delay:.24s}
.stagger > *:nth-child(7){animation-delay:.28s}
.stagger > *:nth-child(8){animation-delay:.32s}
.stagger > *:nth-child(n+9){animation-delay:.36s}

/* ── 페이지네이션 ── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.page-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--main-light);
  background: #fff; color: var(--text-mid);
  font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover, .page-btn.active {
  background: var(--main); color: #fff; border-color: var(--main);
}

/* ── 푸터 ── */
footer {
  text-align: center; padding: 26px;
  font-size: 12px; color: var(--text-soft); line-height: 1.7;
  position: relative; z-index: 1;
}
footer b { color: var(--main-deep); }

/* ── 반응형 ── */
@media (max-width: 560px) {
  a.nav-logo { font-size: 25px !important; padding: 12px 6px 10px; }
  .nav a { padding: 14px 9px; font-size: 14px; }
  .page-title { font-size: 28px; }
}
@media (max-width: 400px) {
  a.nav-logo { font-size: 22px !important; padding: 12px 4px 10px; }
  .nav a { padding: 13px 7px; font-size: 13px; }
  .container { padding: 22px 12px 64px; }
  .card { padding: 20px 16px; }
}

/* ═══════════════════════════════════════════════
   매거진 크롬 — 일정·업보·옷장을 메인/프로필과 통일
   (떠있는 흰 시트 + 마스트헤드 + 테이프 + 발문)
   ═══════════════════════════════════════════════ */
.mag-sheet{
  position:relative; max-width:1180px;
  margin: clamp(40px,6vh,84px) auto clamp(20px,4vh,44px);
  background:var(--card); border-radius:30px;
  box-shadow:0 34px 90px -30px rgba(55,105,50,.5), 0 4px 14px rgba(55,105,50,.1);
  padding: clamp(22px,2.6vw,44px) clamp(20px,3vw,44px) clamp(22px,2.6vw,36px);
  opacity:0; transform:translateY(10px) scale(.99);
  transition:opacity .5s ease, transform .5s ease;
}
body.ready .mag-sheet{ opacity:1; transform:none; }
.mag-tape{
  position:absolute; z-index:3; top:-15px; left:50%; transform:translateX(-50%) rotate(-1.5deg);
  width:168px; height:32px; border-radius:3px; opacity:.85; box-shadow:0 3px 8px rgba(70,120,60,.2);
  background:var(--main); background-image:radial-gradient(circle,rgba(255,255,255,.8) 2px,transparent 2.6px); background-size:12px 12px;
}
.mag-mast{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.mag-wordmark{ display:flex; align-items:baseline; gap:10px; text-decoration:none; }
.mag-wordmark .paw{ width:40px; height:40px; border-radius:13px; background:var(--main-light); display:flex; align-items:center; justify-content:center; font-size:20px; align-self:center; }
.mag-wordmark .nm{ font-family:var(--round); font-size:30px; color:var(--main-deep); letter-spacing:1px; }
.mag-wordmark .mg{ font-size:11px; font-weight:900; letter-spacing:3px; color:var(--text-soft); }
.mag-nav{ margin-left:auto; display:flex; align-items:flex-start; gap:clamp(10px,1.6vw,26px); flex-wrap:wrap; }
.mag-nav a{ font-family:var(--round); font-size:16px; letter-spacing:1px; color:var(--main-deep); text-decoration:none; position:relative; padding-bottom:4px; opacity:.9; transition:color .15s; white-space:nowrap; }
.mag-nav a:hover{ color:var(--main-dark); opacity:1; }
.mag-nav a.active::after{ content:'– ♥ –'; position:absolute; left:50%; transform:translateX(-50%); top:100%; font-size:10px; color:var(--main); white-space:nowrap; }
.mag-dk{ flex-shrink:0; width:44px; height:25px; border-radius:999px; position:relative; margin-left:4px; border:1.5px solid var(--main-light); background:#eef6ea; cursor:pointer; padding:0; }
.mag-dk .knob{ position:absolute; left:2px; top:1.5px; width:19px; height:19px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; font-size:10px; transition:left .2s; box-shadow:0 1px 4px rgba(0,0,0,.18); }
body.dark .mag-dk{ background:#20281b; } body.dark .mag-dk .knob{ left:21px; background:#20291b; }
.mag-rule{ height:2px; background:var(--main-light); margin:14px 0 10px; border-radius:2px; }
.mag-issue{ display:flex; flex-wrap:wrap; gap:14px; font-size:11px; font-weight:800; letter-spacing:2.5px; color:var(--text-soft); text-transform:uppercase; align-items:center; margin-bottom:8px; }
.mag-issue b{ color:var(--main-dark); }
.mag-issue .dday{ background:var(--main-light); color:var(--main-dark); border-radius:999px; padding:3px 12px; letter-spacing:1px; text-transform:none; }
.mag-colophon{ text-align:center; color:var(--text-soft); font-size:11.5px; letter-spacing:1px; line-height:1.8; margin-top:clamp(18px,2.6vh,28px); padding-top:14px; border-top:1.5px dashed var(--main-light); }

/* 시트 안에서는 container가 폭·여백을 다시 잡지 않게 */
.mag-sheet .container{ max-width:none; margin:0; padding:0; }
.mag-sheet .page-title{ text-shadow:none; margin-bottom:14px; }   /* 흰 시트 위 → 후광 불필요 */
body.dark .mag-sheet .page-title{ text-shadow:none; }

/* 문의 모달 (카테고리 공통) */
.iq-ov{ position:fixed; inset:0; background:rgba(30,45,26,.42); display:none; align-items:center; justify-content:center; z-index:900; padding:16px; }
.iq-ov.show{ display:flex; }
.iq-modal{ background:var(--card); border-radius:24px; width:100%; max-width:420px; padding:26px; box-shadow:0 24px 70px rgba(30,50,26,.4); color:var(--text); }
.iq-title{ font-family:var(--round); font-size:22px; color:var(--main-dark); margin-bottom:3px; }
.iq-desc{ font-size:13px; color:var(--text-soft); margin-bottom:16px; }
.iq-input{ width:100%; padding:12px 14px; border-radius:13px; border:1.5px solid var(--main-light); font-size:14px; outline:none; margin-bottom:10px; font-family:inherit; background:var(--card); color:var(--text); }
.iq-input:focus{ border-color:var(--main); }
.iq-btns{ display:flex; gap:8px; margin-top:4px; }
.iq-btns button{ flex:1; padding:12px; border-radius:13px; border:none; font-size:14px; font-weight:800; cursor:pointer; font-family:var(--round); }
.iq-send{ background:var(--main); color:#fff; } .iq-cancel{ background:var(--main-light); color:var(--main-dark); }

@media (max-width:560px){
  .mag-wordmark .mg{ display:none; }
  .mag-nav a.active::after{ content:'♥'; }
  .mag-nav{ gap:12px; }
}
