/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   style.css — 음악일기 공통 스타일시트
   index.html / privacy.html / terms.html 공유
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━ 폰트 ━━━ */
@font-face {
  font-family: 'MissedGyuwon';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2510-1@1.0/Griun_Gyuwon-Rg.woff2') format('woff2');
  font-weight: normal;
  font-display: swap;
}

/* ━━━ CSS 변수 ━━━ */
:root {
  --primary:     #1DB954;
  --primary-dim: rgba(29, 185, 84, 0.12);
  --bg:          #F8F9FD;
  --bg-surface:  #FFFFFF;
  --bg-card:     #FFFFFF;
  --bg-border:   rgba(0, 0, 0, 0.07);
  --text:        #2D3436;
  --text-muted:  rgba(45, 52, 54, 0.55);
  --text-faint:  rgba(45, 52, 54, 0.3);
  --accent:      #1DB954;
  --font:        'MissedGyuwon', serif;
  --lp-spin:     12s;
}

/* ━━━ 리셋 & 기본 ━━━ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ━━━ 배경 노이즈 레이어 (index.html) ━━━ */
body.has-noise::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* ━━━ 스크롤바 ━━━ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ━━━ 스토어 버튼 (index.html + 공용) ━━━ */
.store-btn {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid var(--bg-border);
  background: var(--bg-card);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.store-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(29, 185, 84, 0.16);
  border-color: var(--primary);
}

.store-btn-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  border-right: 1.5px solid var(--bg-border);
  transition: background 0.22s;
}

.store-btn:hover .store-btn-icon {
  background: rgba(29, 185, 84, 0.08);
  border-right-color: var(--primary);
}

.store-btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  transition: border-color 0.22s;
  overflow: hidden;
}

.store-btn:hover .store-btn-circle {
  border-color: var(--primary);
}

.store-btn-circle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.store-btn-text {
  padding: 0 22px;
  text-align: left;
}

.store-btn-name {
  font-size: 1rem;
  color: var(--text);
  display: block;
  font-weight: bold;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ━━━ 푸터 (공통) ━━━ */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-lp {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-name {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--primary); }

.footer-link-bold {
  font-weight: bold;
  color: var(--text-muted) !important;
}

.footer-link-bold:hover { color: var(--primary) !important; }

.footer-brand {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-brand:hover { color: var(--primary); }

/* ━━━ 문서 페이지 헤더 (privacy.html, terms.html) ━━━ */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.doc-header-lp {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.doc-header-name {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: -0.02em;
}

.doc-header-back {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.doc-header-back:hover { color: var(--primary); }

.doc-header-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ━━━ 문서 공통 본문 (privacy.html, terms.html) ━━━ */
.doc-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.doc-eyebrow {
  font-size: 0.78rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.doc-title {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: -0.05em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-section {
  margin-bottom: 48px;
}

.section-num {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.doc-section h2 {
  font-size: 1.15rem;
  font-weight: bold;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.doc-section h3 {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text);
  margin: 20px 0 8px;
}

.doc-section p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 12px;
}

.doc-section ul,
.doc-section ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.doc-section li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 5px;
}

/* ━━━ 강조 박스 ━━━ */
.highlight {
  border-left: 3px solid var(--primary);
  background: rgba(29, 185, 84, 0.05);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.75;
}

/* ━━━ 요약/안내 박스 ━━━ */
.summary-box {
  background: var(--primary-dim);
  border: 1px solid rgba(29, 185, 84, 0.22);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 48px;
}

.summary-box p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 0;
}

.summary-box strong { color: var(--primary); }

/* ━━━ 표 ━━━ */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 12px;
  border: 1px solid var(--bg-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 500px;
}

th {
  background: rgba(29, 185, 84, 0.07);
  color: var(--text);
  font-weight: bold;
  padding: 13px 16px;
  border-bottom: 1px solid var(--bg-border);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.7;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: rgba(0, 0, 0, 0.015); }

/* ━━━ 연락처 박스 ━━━ */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 16px 0;
}

.contact-box p {
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-box .contact-name {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 12px;
}

.contact-box a {
  color: var(--primary);
  text-decoration: none;
}

.contact-box a:hover { text-decoration: underline; }

/* ━━━ 구제기관 그리드 ━━━ */
.agency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.agency-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 14px;
  padding: 18px 20px;
}

.agency-card .agency-name {
  font-size: 0.88rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 6px;
}

.agency-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.6;
}

.agency-card a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8rem;
}

/* ━━━ 공통 애니메이션 ━━━ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ━━━ 반응형 공통 ━━━ */
@media (max-width: 768px) {
  .doc-header { padding: 0 20px; }
  .doc-main   { padding: 36px 20px 60px; }
  .doc-title  { font-size: 1.5rem; }
  .agency-grid { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
}

@media (max-width: 480px) {
  .store-buttons { flex-direction: column; align-items: center; }
  .store-btn     { width: 100%; max-width: 260px; }
}