/* ══════════════════════════════════════
   common.css  —  公共变量与基础样式 | 공통 변수 및 기본 스타일 | Common Variables & Base Styles
   对齐新版 edit 页视觉语言（白底、金色点缀）| edit 페이지 디자인 언어 통일（흰 배경, 금색 포인트）| Aligned with edit page visual language (white bg, gold accent)
   ══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&family=Noto+Sans+Display:ital,wght@0,100..900;1,100..900&family=Noto+Sans+Linear+A&family=Noto+Sans+SC:wght@100..900&family=Noto+Serif+KR:wght@200..900&display=swap');

:root {
  /* ── 颜色 token（与 edit 页对齐）| 색상 토큰（edit 페이지 통일）| Color Tokens (aligned with edit page) */
  --ink:        #1c1a18;
  --ink-2:      #5a5650;
  --ink-3:      #3d3d3d;
  --ink-4:      #837e77;
  --gold:       #b8965a;
  --gold-l:     #cca96e;
  --gold-t:     #5c461d;
  --bg:         #f5f5f5;
  --bg-alt:     #f7f5f2;
  --surface:    #ffffff;
  --border:     rgba(0,0,0,.08);
  --border-md:  rgba(0,0,0,.13);
  --slot-empty: #ede9e3;
  --rust:       #d94f40;

  /* ── 旧变量别名（向下兼容其他页）| 구 변수 별칭（하위 호환）| Legacy Variable Aliases (backwards compatibility) */
  --paper:      var(--bg-alt);
  --cream:      var(--slot-empty);
  --muted:      var(--ink-3);
  --white:      var(--surface);
  --gold-light: var(--gold-l);
  --shadow:     rgba(28,26,24,.10);
  --sage:       #5a6b55;

  /* ── 布局 | 레이아웃 | Layout */
  --header-h: 60px;
  --nav-h:    48px;

  /* ── 状态色 | 상태 색상 | Status Colors */
  --status-draft:     var(--ink-3);
  --status-submitted: var(--gold);
  --status-published: var(--sage);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Display', sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

/* ── 状态标签 | 상태 뱃지 | Status Badge */
.status-badge {
  display: inline-block;
  font-size: 12px; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 2px;
}
.status-badge.draft            { background: rgba(154,148,140,.13); color: var(--ink); }
.status-badge.submitted        { background: rgba(184,150,90,.15);  color: var(--gold-t); }
.status-badge.manager_approved { background: rgba(90,107,170,.13);  color: #4a5a9a; }
.status-badge.published        { background: rgba(90,107,85,.13);   color: var(--sage); }

/* ── 通用按钮 | 공통 버튼 | Common Buttons */
.btn-primary {
  background: var(--ink); color: #fff;
  border: none; padding: 9px 22px;
  font-family: 'Noto Sans Display', sans-serif; font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background .2s;
  border-radius: 2px;
}
.btn-primary:hover { background: var(--gold); }

.btn-outline {
  background: none;
  border: 1.5px solid var(--border-md);
  color: var(--ink-2);
  padding: 7px 18px;
  font-family: 'Noto Sans Display', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  border-radius: 2px;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--ink); color: var(--ink); background: rgba(0,0,0,.03); }

.btn-danger {
  background: none; border: 1.5px solid rgba(217,79,64,.3);
  color: var(--rust); padding: 7px 18px;
  font-family: 'Noto Sans Display', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, border-color .2s; border-radius: 2px;
}
.btn-danger:hover { background: var(--rust); color: #fff; border-color: var(--rust); }

.btn-gold {
  background: var(--gold); color: #fff;
  border: none; padding: 7px 20px;
  font-family: 'Noto Sans Display', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background .2s; border-radius: 2px;
}
.btn-gold:hover { background: var(--gold-l); }
.btn-gold:disabled { opacity: .55; cursor: not-allowed; }

/* ── 提示消息条 | 토스트 메시지 | Toast */
#toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: #fff;
  padding: 10px 24px; font-size: 11px; letter-spacing: .07em;
  border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.15);
  opacity: 0; transition: opacity .3s, transform .3s;
  pointer-events: none; z-index: 9999;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 通用 header（毛玻璃风格，对齐 edit 页）| 공통 헤더（유리 효과, edit 페이지 통일）| Common Header (glassmorphism, aligned with edit page) */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(247,245,242,.96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px; transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 1px 24px rgba(0,0,0,.07); border-bottom-color: var(--border-md); }
.site-header .logo {
  font-family: "Archivo", sans-serif; font-size: 18px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-decoration: none; transition: color .2s;
  display: flex; align-items: center; gap: 8px;
}
.site-header .logo img { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
.site-header .logo span { color: var(--gold); }
.site-header .logo:hover { color: var(--gold); }
.site-header .header-right { display: flex; gap: 10px; align-items: center; }
.site-header .user-info {
  font-size: 12px; color: var(--ink-3); letter-spacing: .04em;
}

/* ── 弹窗 | 모달 | Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center;
  pointer-events: none; transition: background .3s;
}
.modal-backdrop.open { background: rgba(0,0,0,.35); pointer-events: all; }
.modal {
  background: var(--surface); border: 1px solid var(--border-md); border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0,0,0,.14); padding: 40px; max-width: 400px; width: 90%;
  transform: translateY(20px) scale(.97); opacity: 0;
  transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .32s;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal h3 { font-family: 'Noto Sans Display', serif; font-size: 22px; margin-bottom: 22px; }
.modal input {
  width: 100%; border: 1.5px solid var(--border-md); border-radius: 6px;
  padding: 10px 14px; background: var(--bg); font-family: 'Noto Sans Display', sans-serif;
  font-size: 14px; color: var(--ink); margin-bottom: 12px; outline: none; transition: border-color .2s;
}
.modal input::placeholder { color: var(--ink-3); }
.modal input:focus { border-color: var(--gold); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

@media (max-width: 768px) {
  .site-header {
    padding: 0 20px;
  }

  .site-header .logo {
    width: 120px;
    font-size: 12px;
    gap: 2px;
  }

  .site-header .logo img {
    width: 20px;
    height: 20px;
    margin-right: 4px;
  }

  .site-header .header-right {
    gap: 6px;
  }

  .site-header .user-info {
    font-size: 8px;
  }

  .lang-switch {
  display: flex; gap: 2px;
  background: var(--border); border-radius: 5px; padding: 2px;
  }
  .lang-btn {
    padding: 1.5px 4px;
    font-size: 8px;
  }

  .btn-outline {
    padding: 4px 9px;
}

.btn-danger {
  padding: 4px 9px;
}

.btn-gold {
  padding: 4px 9px;
}

.status-badge {
    font-size: 8px;
}
}

/* ── 语言切换按钮 | 언어 전환 버튼 | Language Switch Button */
.lang-switch {
  display: flex; gap: 2px;
  background: var(--border); border-radius: 5px; padding: 2px;
}
.lang-btn {
  background: none; border: none; border-radius: 3px;
  padding: 3px 8px; cursor: pointer;
  font-family: 'Noto Sans Display', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--ink-3); letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
