/* ══════════════════════════════════════════════════════
 *  공통 부품 — 기반 (R4, 2026-11-09)
 *  /css/components/base.css
 *
 *  새 화면 틀(inc/layout/head.php)이 tokens.css · 테마 다음에 로드한다. 옛 global.css 는 로드하지 않는다.
 *  출처: 리디자인 시안 v1 (docs/01.시안작업/dgdg-redesign-v1/assets/style.css · app.css)
 *  색은 전부 토큰 — 강조색 --accent 는 테마의 --brand-* 를 따른다(테마를 바꾸면 같이 바뀜).
 *  규칙: outline:none 금지 · 카드 왼쪽 색띠 금지 · 아이콘 버튼 aria-label 필수
 * ══════════════════════════════════════════════════════ */
:root {
  --accent:    var(--brand-600, #4F46E5);
  --accent-lt: var(--brand-50,  #EEF2FF);
  --accent-md: var(--brand-100, #E0E7FF);
  --accent-dk: var(--brand-800, #3730A3);
  --card-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 6px 24px rgba(17, 24, 39, .05);
  --font-serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ui-v1 {
  margin: 0; background: var(--warm); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  letter-spacing: -0.01em; word-break: keep-all; -webkit-font-smoothing: antialiased;
}
/* 요소 기본값은 :where() 로 우선순위 0 — 부품 클래스(.btn-white 등)의 색을 덮지 않게 */
:where(.ui-v1) img { display: block; max-width: 100%; }
:where(.ui-v1) a { color: inherit; text-decoration: none; }
:where(.ui-v1) button { font: inherit; color: inherit; cursor: pointer; }
:where(.ui-v1) :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--font-serif); letter-spacing: -0.02em; }
/* hidden 속성은 언제나 숨김 — .pill·.btn 처럼 display 를 정한 부품에 hidden 을 줘도 보이던 문제 (R4-5) */
.ui-v1 [hidden] { display: none !important; }

/* 아이콘 — bl_icon() 은 <svg class="s-ico" width=24 …> (stroke=currentColor). 크기는 여기서 맞춘다 */
.ui-v1 .s-ico { width: 20px; height: 20px; flex: none; }
.ui-v1 .s-ico.ico-sm { width: 16px; height: 16px; }
.ui-v1 .s-ico.ico-lg { width: 28px; height: 28px; }
.ui-v1 .s-ico.flip-x { transform: scaleX(-1); }   /* chevron-left 대용 (R4-5 calendar → R4-6b 공용) */
.hrt { font-style: normal; color: var(--accent); }          /* 커플 이름 사이 ♥ (R4-4~ 공용) */

/* 로고 */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 19px; letter-spacing: -0.04em; color: var(--logo-ink, #191F32); }
/* 2026-11-18 새 로고 — 심볼 이미지(/img/brand/logo-mark.svg) + 브랜드명 글자 */
.logo-mark { width: 34px; height: 28px; display: grid; place-items: center; flex-shrink: 0; }
.logo-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.logo small { font-size: 10.5px; font-weight: 700; color: var(--accent); letter-spacing: .16em; }

/* 아바타 · 배지 */
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-md); color: var(--accent-dk); display: inline-grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-lg { width: 48px; height: 48px; font-size: 17px; }
.nbadge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }

/* 그리드 */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.g-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.mt { margin-top: 20px; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .g4 { gap: 10px; }
  .hide-m { display: none !important; }
}
/* 숨긴 칸(hidden)은 격자에서도 자리를 차지하지 않게 — .card 의 display 가 브라우저 기본 [hidden] 을 이기는 것 방지 (2026-11-17) */
.card[hidden] { display: none !important; }
.g2:has(> .card[hidden]) { grid-template-columns: minmax(0, 1fr); }
