/* ============================================================
   먹고또먹고 · Joy's Diary — 디자인 시스템 (복제 원본 v1.0 에서 시작, 2026-10-12 팔레트 교체)
   CSS 변수 + 타이포그래피 + 레이아웃 + 컴포넌트
   · 먹고또먹고 팔레트: docs/자료/10-폴더자료.md 6절 — 로고에서 뽑은 노랑·남색 + 크림 바탕
   · Joy's Diary: <body data-site="diary"> 이면 아래 「다이어리 토큰」이 같은 이름의 토큰을 덮는다
     (컴포넌트 CSS 는 하나 — 토큰만 바꾼다. 화면마다 색을 따로 칠하지 말 것)
   · 이 파일은 공통 파일 — 기반·통합 담당만 고친다(다른 에이전트는 docs/공통파일-요청.md)
   ============================================================ */

/* ── 글꼴: 웹폰트를 쓰지 않는다 ─────────────────────────────
   기기에 이미 깔린 글꼴만 쓴다. 이유는 둘이다.
   ① 한글 웹폰트는 조각이 수백 개라, 그걸 미리 받게 하는 응답 헤더가
      웹서버 한도를 넘겨 사이트 전체가 10분간 죽은 사고가 형제 앱에 있었다.
   ② 어르신 손님이 많은 매장이다. 웹폰트는 받는 동안 글자가 안 보이거나
      늦게 튀는데(FOUT), 기기 글꼴은 첫 순간부터 또렷하다.
   바꿀 수 있는 것은 '글씨 크기'뿐이고, 그건 --font-scale 로 연다. */

/* ── CSS 변수 (디자인 토큰) ──────────────────────────────── */
:root {
  /* 먹고또먹고 팔레트 원본 (로고 sad.png 에서 뽑은 색 — 10-폴더자료.md 6절) */
  --muk-yellow: #FECD69;   /* 주색 · 집밥 노랑 — 위 글자는 반드시 남색/먹색(흰 글자 금지) */
  --muk-slate:  #475865;   /* 보조 · 도시락 남색 — 흰 바탕 명암비 7.6 */
  --muk-orange: #F08A3C;   /* 포인트 · 따끈 주황 — 한 화면에 한 곳만 */
  --muk-cream:  #FFF9ED;   /* 배경 · 쌀밥 크림(메뉴판 종이색) */
  --muk-ink:    #2E3740;   /* 글자 · 먹색 — 크림 바탕 명암비 약 12 */

  /* 브랜드 컬러 (컴포넌트는 이 이름만 쓴다) */
  --brand-primary:      var(--muk-yellow);
  --brand-primary-deep: var(--muk-slate);     /* 흰·크림 바탕 위 글씨·단추 바탕 */
  --on-primary:         var(--muk-ink);       /* 노랑(--brand-primary) 바탕 위 글자 */
  --on-primary-deep:    #FFFFFF;              /* 남색(--brand-primary-deep) 바탕 위 글자 */
  --brand-accent:       var(--muk-orange);
  --brand-bg:           #FFFFFF;              /* 카드·입력칸 바탕 */
  --brand-bg-soft:      var(--muk-cream);     /* 페이지 바탕·옅은 칸 */
  --brand-ink:          var(--muk-ink);
  --brand-ink-soft:     #5A6570;
  --brand-line:         #EFE4CC;
  --brand-warn:         #C8641E;              /* 주황 계열, 흰 글자 명암비 4.6 */
  --brand-ok:           #5BB89A;
  --brand-tint:         rgba(254,205,105,.22); /* 노랑 옅은 칠(선택·강조 바탕) */
  --brand-focus:        rgba(71,88,101,.22);   /* 입력칸 초점 테두리 그림자 */
  --brand-page:         var(--muk-cream);     /* 공개 화면 페이지 바탕 */

  /* 의미론적 컬러 */
  --color-danger:       #E05757;
  --color-info:         var(--brand-primary);
  --color-success:      var(--brand-ok);
  --color-warning:      var(--brand-warn);

  /* 타이포그래피 */
  /* 기기별로 이미 있는 한글 글꼴을 순서대로 찾는다 (윈도우→맥→안드로이드) */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
               'Malgun Gothic', '맑은 고딕', 'Noto Sans KR', 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-h1-m: 28px;
  --font-size-h1-d: 36px;
  --font-size-h2-m: 22px;
  --font-size-h2-d: 26px;
  --font-size-h3-m: 17px;
  --font-size-h3-d: 19px;
  --font-size-body: 16px;
  --font-size-small: 14px;
  --font-size-xs: 14px;   /* 12px 는 어르신 눈에 안 읽혔다 — 손님 화면에서 301곳 */
  --line-height: 1.65;
  --letter-spacing: -0.01em;

  /* 간격 (8px 그리드) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* 레이아웃 */
  --max-width: 1100px;
  --content-width: 720px;
  --sidebar-width: 260px;
  --header-height: 60px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  /* 그림자 */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);

  /* 전환 */
  --transition: 180ms ease;

  /* 글씨 크기 배율 — 어르신 손님이 많은 매장이라 본문을 키울 수 있어야 한다.
     글꼴 자체는 못 바꾸고(기기 글꼴 고정), 크기만 연다. 화면에서 고르면
     <html data-scale="크게">가 붙고 아래 규칙이 배율을 바꾼다. */
  --font-scale: 1;

  /* 관리 화면 전용 색.
     사이드바는 밝은 모드에서도 '어두운 바탕'이 디자인이다. 그래서 --brand-ink 같은
     글자색 토큰을 배경으로 빌려 쓰면 안 된다 — 다크모드에서 그 토큰이 밝게 뒤집히는
     순간 흰 글자가 흰 바탕에 얹혀 메뉴가 통째로 사라진다(2026-09-23 실측). */
  --admin-sidebar-bg:  #2E3740;   /* 먹색 — 글자색 토큰을 빌리지 않고 값으로 둔다(어두운 모드 뒤집힘 방지) */
  --admin-sidebar-ink: rgba(255,255,255,.80);
  --admin-sidebar-dim: rgba(255,255,255,.35);
  --admin-canvas:      #F7F3EA;
}

html[data-scale="크게"]   { --font-scale: 1.125; }
html[data-scale="더크게"] { --font-scale: 1.25; }

/* ── 어두운 화면 ───────────────────────────────────────────
   색을 토큰 한 곳에서만 뒤집는다. 컴포넌트 CSS는 손대지 않는다 —
   화면마다 따로 손보면 반드시 한 곳이 빠져서 글자가 안 보이게 된다.
   기기 설정을 따라가되, 사람이 고른 값이 있으면 그것이 이긴다. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --brand-bg:        #14191E;
    --brand-bg-soft:   #1B222A;
    --brand-ink:       #E8EEF3;
    --brand-ink-soft:  #A3B1BC;
    --brand-line:      #2C3742;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.45);
    --shadow-md: 0 4px 16px rgba(0,0,0,.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.55);
    --admin-sidebar-bg:  #0E1318;
    --admin-sidebar-ink: rgba(255,255,255,.82);
    --admin-sidebar-dim: rgba(255,255,255,.38);
    --admin-canvas:      #0F141A;
    --brand-tint:        rgba(254,205,105,.16);
    --brand-page:        #14191E;
  }
}
html[data-theme="dark"] {
  --brand-bg:        #14191E;
  --brand-bg-soft:   #1B222A;
  --brand-ink:       #E8EEF3;
  --brand-ink-soft:  #A3B1BC;
  --brand-line:      #2C3742;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.45);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.55);
  --admin-sidebar-bg:  #0E1318;
  --admin-sidebar-ink: rgba(255,255,255,.82);
  --admin-sidebar-dim: rgba(255,255,255,.38);
  --admin-canvas:    #0F141A;
  --brand-tint:      rgba(254,205,105,.16);
  --brand-page:      #14191E;
}

/* ── 리셋 & 기반 ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* 두 모드를 다 지원한다고 브라우저에 알린다.
   이 선언이 없으면 안드로이드 브라우저의 '강제 어둡게'가 색을 제멋대로
   뒤집는다 — 우리가 고른 색이 아니라 기계가 계산한 색이 나온다. */
html { color-scheme: light dark; font-size: calc(var(--font-size-body) * var(--font-scale)); scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--brand-page, var(--brand-bg));
  color: var(--brand-ink);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  -webkit-font-smoothing: antialiased;
}
/* hidden 속성은 언제나 숨긴다 — .btn·display:flex 칸에 hidden 을 줘도 다시 보이던 것(빈 카카오 단추) */
[hidden] { display: none !important; }
a { color: var(--brand-primary-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── 타이포그래피 ─────────────────────────────────────────── */
h1 { font-size: var(--font-size-h1-m); font-weight: 700; line-height: 1.25; }
h2 { font-size: var(--font-size-h2-m); font-weight: 600; line-height: 1.35; }
h3 { font-size: var(--font-size-h3-m); font-weight: 600; line-height: 1.4; }
p  { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  h1 { font-size: var(--font-size-h1-d); }
  h2 { font-size: var(--font-size-h2-d); }
  h3 { font-size: var(--font-size-h3-d); }
}

/* ── 레이아웃 유틸리티 ────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--sp-5); }
.container--narrow { max-width: var(--content-width); }
.section { padding: var(--sp-12) 0; }
.section--sm { padding: var(--sp-8) 0; }

.flex { display: flex; }

.flex-wrap { flex-wrap: wrap; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-6); }

@media (max-width: 767px) {
  .grid-3 { grid-template-columns: 1fr; }

}

.text-center { text-align: center; }

.text-soft   { color: var(--brand-ink-soft); }

.mt-8 { margin-top: var(--sp-8); }

.hidden { display: none !important; }

/* ── 헤더 ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-bg);
  border-bottom: 1px solid var(--brand-line);
  height: var(--header-height);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-ink);
  text-decoration: none;
}
.site-logo img { height: 36px; width: auto; }
.site-logo span { display: none; }
@media (min-width: 480px) { .site-logo span { display: block; } }

.site-nav { display: flex; gap: var(--sp-1); align-items: center; }
.site-nav a {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--font-size-small);
  font-weight: 500;
  color: var(--brand-ink-soft);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.site-nav a:hover, .site-nav a.active {
  color: var(--brand-primary-deep);
  background: var(--brand-bg-soft);
  text-decoration: none;
}
@media (max-width: 767px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0; background: var(--brand-bg); padding: var(--sp-6); gap: var(--sp-2); overflow-y: auto; z-index: 99; }
  .site-nav.open a { font-size: 18px; padding: var(--sp-4); border-radius: var(--radius-md); }
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--sp-2); }
@media (max-width: 767px) { .nav-toggle { display: flex; flex-direction: column; gap: 5px; } }
.nav-toggle span { width: 22px; height: 2px; background: var(--brand-ink); border-radius: 1px; transition: var(--transition); }

/* ── 배너 공지 띠 ─────────────────────────────────────────── */
.notice-bar {
  background: var(--brand-primary);
  color: var(--on-primary);
  text-align: center;
  font-size: var(--font-size-small);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.notice-bar:hover { background: var(--brand-primary-deep); color: var(--on-primary-deep); }
.notice-bar .close-btn {
  position: absolute;
  right: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.8;
}

/* ── 영업 배지 ────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.status-badge.open { background: #e6f9f0; color: #2d8a5f; }
.status-badge.closed { background: #fef0e7; color: #c05c0f; }
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── 버튼 ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-body);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-primary-deep); color: var(--on-primary-deep); }
.btn-primary:hover { background: var(--brand-primary-deep); filter: brightness(.92); box-shadow: 0 4px 12px var(--brand-focus); text-decoration: none; color: var(--on-primary-deep); }
.btn-secondary { background: var(--brand-bg); color: var(--brand-primary-deep); border-color: var(--brand-primary-deep); }
.btn-secondary:hover { background: var(--brand-bg-soft); text-decoration: none; }
.btn-warn { background: var(--brand-warn); color: #fff; }
.btn-warn:hover { background: #d08020; box-shadow: 0 4px 12px rgba(232,155,60,.35); text-decoration: none; color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-ink-soft); border-color: var(--brand-line); }
.btn-ghost:hover { background: var(--brand-bg-soft); color: var(--brand-ink); text-decoration: none; }

.btn-lg { padding: 15px 32px; font-size: 18px; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 14px; font-size: var(--font-size-small); border-radius: var(--radius-sm); }
.btn-xs { padding: 5px 10px; font-size: var(--font-size-xs); border-radius: var(--radius-sm); }
.btn-full { width: 100%; }
.btn-kakao { background: #FEE500; color: #3A1D1D; border-color: #FEE500; }
.btn-kakao:hover { background: #f0d800; text-decoration: none; color: #3A1D1D; }
.btn-phone { background: var(--brand-ok); color: #fff; }
.btn-phone:hover { background: #4aa085; text-decoration: none; color: #fff; }

/* ── 카드 ─────────────────────────────────────────────────── */
.card {
  background: var(--brand-bg);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card--link:hover { transform: translateY(-2px); cursor: pointer; }
.card-img { border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden; aspect-ratio: 4/3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: var(--sp-4); }

/* ── 폼 ───────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-5); }
.form-label { display: block; font-size: var(--font-size-small); font-weight: 600; color: var(--brand-ink); margin-bottom: var(--sp-2); }
.form-label .required { color: var(--color-danger); margin-left: 2px; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--brand-line);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-body);
  color: var(--brand-ink);
  background: var(--brand-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-primary-deep);
  box-shadow: 0 0 0 3px var(--brand-focus);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: var(--font-size-xs); color: var(--brand-ink-soft); margin-top: var(--sp-1); }

.form-check { display: flex; align-items: flex-start; gap: var(--sp-2); cursor: pointer; }
.form-check input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--brand-primary-deep); }

/* ── 배지 ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.badge-primary { background: var(--brand-tint); color: var(--brand-primary-deep); }
.badge-warn { background: rgba(232,155,60,.15); color: #b57020; }
.badge-ok { background: rgba(91,184,154,.15); color: #3a8a6a; }
.badge-danger { background: rgba(224,87,87,.12); color: #c03030; }
.badge-gray { background: rgba(91,103,112,.1); color: var(--brand-ink-soft); }

/* ── 별점 ─────────────────────────────────────────────────── */
.stars { color: #F5A623; letter-spacing: 2px; font-size: 18px; }

.star-input label { cursor: pointer; font-size: 28px; color: #ccc; transition: color var(--transition); }
.star-input input { display: none; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #F5A623; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }

/* ── 히어로 ───────────────────────────────────────────────── */
.hero {
  background: var(--brand-bg-soft);
  padding: var(--sp-12) 0;
  text-align: center;
}
.hero--gradient {
  background: linear-gradient(rgba(0,25,55,0.58), rgba(0,25,55,0.58)),
              url('/assets/images/muktto/store-front.webp') center 30%/cover no-repeat;
}
.hero--gradient h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero--gradient p  { color: rgba(255,255,255,.88); text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.hero-badge { font-size: var(--font-size-small); font-weight: 600; color: rgba(255,255,255,.92); background: rgba(255,255,255,.15); padding: 4px 14px; border-radius: 20px; backdrop-filter: blur(4px); margin-bottom: var(--sp-3); display: inline-block; }
.hero h1 { margin-bottom: var(--sp-4); }
/* (옛 규칙 제거: 이 줄이 위의 흰 글자 규칙을 덮어써서 사진 위 부제가 묻혔다.
    이제 문단 색은 아래 '디자인 개편' 층에서 한 곳으로 정한다.) */
.hero p { max-width: 34em; margin: 0 auto var(--sp-8); }
.hero-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ── 섹션 헤더 ────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: var(--sp-10); }
.section-header h2 { margin-bottom: var(--sp-3); }
.section-header p { color: var(--brand-ink-soft); max-width: 480px; margin: 0 auto; }

/* ── 상품 카드 그리드 ────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: var(--sp-6); }
.product-card { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); background: var(--brand-bg); border: 1px solid var(--brand-line); }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card a { display: block; color: inherit; text-decoration: none; }
.product-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--brand-bg-soft); position: relative; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.product-card-cat { font-size: var(--font-size-xs); color: var(--brand-primary-deep); font-weight: 700; margin-bottom: var(--sp-1); text-transform: uppercase; letter-spacing: .03em; }
.product-card-name { font-weight: 700; font-size: 16px; margin-bottom: var(--sp-1); }
.product-card-desc { font-size: var(--font-size-small); color: var(--brand-ink-soft); margin-bottom: var(--sp-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }

/* ── 카테고리 필터 칩 ─────────────────────────────────────── */
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--sp-8); }
.cat-filter .btn { border-radius: var(--radius-pill); }

/* ── 상품 상세 페이지 ─────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-10); }
@media (min-width: 900px) {
  .detail-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}
.detail-gallery-main { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: var(--brand-bg-soft); border: 1px solid var(--brand-line); margin-bottom: var(--sp-3); }
.detail-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbs { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.detail-thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--brand-line); cursor: pointer; background: var(--brand-bg-soft); transition: border-color var(--transition); flex-shrink: 0; }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumb.active { border-color: var(--brand-primary-deep); }

.detail-cat { display: inline-block; font-size: var(--font-size-xs); font-weight: 700; color: var(--brand-primary-deep); text-transform: uppercase; letter-spacing: .04em; margin-bottom: var(--sp-2); }
.detail-name { margin-bottom: var(--sp-3); }
.detail-badges { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-6); }

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-6); }
.spec-table tr { border-bottom: 1px solid var(--brand-line); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th { width: 96px; text-align: left; padding: 12px 0; font-size: var(--font-size-small); font-weight: 600; color: var(--brand-ink-soft); vertical-align: top; white-space: nowrap; }
.spec-table td { padding: 12px 0; font-size: var(--font-size-small); color: var(--brand-ink); }
.spec-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.spec-chip { display: inline-block; padding: 4px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--brand-line); font-size: var(--font-size-xs); font-weight: 600; color: var(--brand-ink); }

.detail-cta { background: var(--brand-bg-soft); border: 1px solid var(--brand-line); border-radius: var(--radius-md); padding: var(--sp-5); margin-bottom: var(--sp-6); }
.detail-cta p { font-size: var(--font-size-small); color: var(--brand-ink-soft); margin-bottom: var(--sp-4); }
.detail-cta-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.detail-desc { margin-top: var(--sp-10); padding-top: var(--sp-8); border-top: 1px solid var(--brand-line); }
.detail-desc h2 { margin-bottom: var(--sp-5); }

@media (max-width: 767px) {
  .detail-gallery-main { aspect-ratio: 1/1; }
}

/* ── 지도 섹션 ────────────────────────────────────────────── */
.map-section { background: var(--brand-bg-soft); }
.map-frame { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--brand-line); }
.map-frame iframe { width: 100%; height: 380px; border: none; display: block; }
.map-info { padding: var(--sp-6) 0; }
.map-info-row { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.map-info-icon { width: 20px; flex-shrink: 0; color: var(--brand-primary-deep); margin-top: 2px; }
.map-btns { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }
.map-btns a { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 10px 18px; border-radius: var(--radius-md); font-weight: 600; font-size: var(--font-size-small); border: 2px solid var(--brand-line); color: var(--brand-ink); transition: var(--transition); text-decoration: none; background: var(--brand-bg); }
.map-btns a:hover { border-color: var(--brand-primary-deep); color: var(--brand-primary-deep); background: var(--brand-bg-soft); }

/* ── SNS 채널 그리드 ─────────────────────────────────────── */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: var(--sp-4); }
.channel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  border-radius: var(--radius-md);
  border: 2px solid var(--brand-line);
  background: var(--brand-bg);
  text-decoration: none;
  color: var(--brand-ink);
  font-weight: 600;
  font-size: var(--font-size-small);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.channel-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; color: var(--brand-ink); }
.channel-card svg { width: 40px; height: 40px; }

/* ── 후기 카드 ────────────────────────────────────────────── */
.review-card { padding: var(--sp-5); border-radius: var(--radius-md); border: 1px solid var(--brand-line); background: var(--brand-bg); }
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--sp-3); }
.review-name { font-weight: 600; font-size: var(--font-size-small); }
.review-date { font-size: var(--font-size-xs); color: var(--brand-ink-soft); }
.review-body { font-size: var(--font-size-small); line-height: 1.6; color: var(--brand-ink); }

/* ── 공지 카드 ────────────────────────────────────────────── */
.notice-card { border-left: 4px solid var(--brand-primary); padding: var(--sp-5); background: var(--brand-bg-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-bottom: var(--sp-4); }
.notice-card h3 { margin-bottom: var(--sp-2); }
.notice-card .notice-meta { font-size: var(--font-size-xs); color: var(--brand-ink-soft); margin-bottom: var(--sp-3); }

/* ── 푸터 ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-ink);
  color: rgba(255,255,255,.75);
  padding: var(--sp-10) 0 var(--sp-6);
}
.footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-10); margin-bottom: var(--sp-8); }
@media (max-width: 767px) { .footer-top { grid-template-columns: 1fr; gap: var(--sp-6); } }
.footer-brand .logo-white { filter: brightness(0) invert(1); height: 40px; margin-bottom: var(--sp-4); }
.footer-info p { font-size: var(--font-size-small); margin-bottom: var(--sp-2); }
.footer-info a { color: rgba(255,255,255,.9); }
.footer-info a:hover { color: #fff; }
.footer-tel { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: var(--sp-2); }
.footer-snsiconrow { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap; }
.footer-sns-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.footer-sns-icon:hover { background: rgba(255,255,255,.25); }
.footer-sns-icon svg { width: 18px; height: 18px; fill: #fff; }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.1); margin-bottom: var(--sp-5); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-3); font-size: var(--font-size-xs); color: rgba(255,255,255,.45); }
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* 매장 관리자 들어가는 문.
   손님 눈앞에 둘 것은 아니지만, **없는 것처럼 보여서도 안 된다.**
   전에는 12px·투명도 .5 를 이미 흐린 .45 글씨 위에 얹어 놓아서
   실효 대비가 3:1 도 안 됐다. 어르신 눈에는 그냥 없는 것이다.
   그래서 맨 아래 자리는 그대로 두되, 테두리를 줘서 '누르는 것'으로 보이게 한다.
   크기는 rem 이라 '글씨 크게'를 누르면 이것도 같이 커진다. */
.footer-admin {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .45em .95em; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3);
  font-size: .9rem; line-height: 1.2; white-space: nowrap;
}
.footer-bottom a.footer-admin { color: rgba(255,255,255,.82); }      /* 대비 10:1 */
.footer-bottom a.footer-admin:hover,
.footer-bottom a.footer-admin:focus-visible {
  color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.55);
}
.footer-admin svg { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* ── 플로팅 버튼 (전화/카톡) ─────────────────────────────── */
.floating-btns {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  z-index: 90;
}
.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.floating-btn:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.floating-btn-phone { background: var(--brand-ok); color: #fff; }
.floating-btn-kakao { background: #FEE500; color: #3A1D1D; }
.floating-btn svg { width: 22px; height: 22px; }

/* ── 알림 토스트 ──────────────────────────────────────────── */
.toast-container { position: fixed; top: var(--sp-6); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: var(--sp-3); pointer-events: none; }
.toast {
  background: var(--brand-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-small);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s, transform .25s;
  pointer-events: auto;
  max-width: 360px;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--brand-ok); }
.toast.error { background: var(--color-danger); }

/* ── 모달 ─────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; display: flex; align-items: center; justify-content: center; padding: var(--sp-5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--brand-bg); border-radius: var(--radius-lg); padding: var(--sp-8); width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); transform: scale(.96); transition: transform .2s; }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-6); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--brand-ink-soft); line-height: 1; }
.modal-footer { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-6); flex-wrap: wrap; }

/* ── 페이지 헤더 ──────────────────────────────────────────── */
.page-header { background: var(--brand-bg-soft); padding: var(--sp-10) 0 var(--sp-8); border-bottom: 1px solid var(--brand-line); }
.page-header h1 { margin-bottom: var(--sp-2); }
.page-header p { color: var(--brand-ink-soft); }
.breadcrumb { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--font-size-xs); color: var(--brand-ink-soft); margin-bottom: var(--sp-4); }
.breadcrumb a { color: var(--brand-ink-soft); }
.breadcrumb a:hover { color: var(--brand-primary-deep); }
.breadcrumb-sep { opacity: 0.4; }

/* ── 관리자 레이아웃 ─────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-ink);
  flex-shrink: 0;
  overflow-y: auto;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
}
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .25s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; }
}
.admin-brand { padding: var(--sp-6); border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: var(--sp-3); }
.admin-brand img { height: 32px; filter: brightness(0) invert(1); }
.admin-brand-text { font-weight: 700; font-size: 14px; color: #fff; }
.admin-brand-text span { display: block; font-size: 14px; font-weight: 400; opacity: 0.6; margin-top: 1px; }
.admin-nav { flex: 1; padding: var(--sp-4) 0; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-5);
  font-size: 14px;
  color: rgba(255,255,255,.7);
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(254,205,105,.14);
  color: #fff;
  text-decoration: none;
}
.admin-nav a.active { border-right: 3px solid var(--brand-primary); }
.admin-nav svg { width: 18px; height: 18px; opacity: .8; }
.admin-main { margin-left: var(--sidebar-width); flex: 1; background: var(--admin-canvas); min-height: 100vh; }
.admin-topbar {
  background: var(--brand-bg);
  border-bottom: 1px solid var(--brand-line);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 var(--sp-6);
  gap: var(--sp-4);
  position: sticky;
  top: 0;
  z-index: 70;
  box-shadow: var(--shadow-sm);
}
.admin-topbar h1 { font-size: 18px; flex: 1; }
.admin-content { padding: var(--sp-6); max-width: 1200px; }

/* ── 관리자 카드 ──────────────────────────────────────────── */
.admin-card { background: var(--brand-bg); border-radius: var(--radius-md); padding: var(--sp-5); box-shadow: var(--shadow-sm); margin-bottom: var(--sp-5); }
.admin-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--brand-line); }
.admin-card-header h2 { font-size: 16px; font-weight: 600; }

/* ── 테이블 ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--font-size-small); }
th { background: var(--brand-bg-soft); font-weight: 600; color: var(--brand-ink-soft); text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--brand-line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--brand-line); vertical-align: middle; }
tr:hover td { background: var(--brand-bg-soft); }
.td-actions { display: flex; gap: var(--sp-2); }

/* ── 탭 ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--brand-line); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.tab-btn {
  padding: 10px 18px;
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--brand-ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn.active { color: var(--brand-primary-deep); border-bottom-color: var(--brand-primary-deep); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── 체크리스트 ───────────────────────────────────────────── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  border: 2px solid var(--brand-line);
  margin-bottom: var(--sp-3);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.checklist-item.checked { border-color: var(--brand-ok); background: rgba(91,184,154,.07); }
.checklist-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand-ok); flex-shrink: 0; }
.checklist-item label { flex: 1; cursor: pointer; font-weight: 500; }
.checklist-item.checked label { text-decoration: line-through; color: var(--brand-ink-soft); }

/* ── 스켈레톤 로딩 ────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #e8edf0 25%, #d0dae0 50%, #e8edf0 75%); background-size: 200% 100%; animation: skeleton-anim 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-anim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-img { aspect-ratio: 4/3; }

/* ── 페이지네이션 ─────────────────────────────────────────── */
.pagination { display: flex; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-8); flex-wrap: wrap; }

/* ── 텍스트 에디터 (마크다운 미리보기) ──────────────────── */
.md-preview { line-height: 1.8; }
.md-preview h1,.md-preview h2,.md-preview h3 { margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.md-preview p { margin-bottom: var(--sp-4); }
.md-preview ul,.md-preview ol { padding-left: var(--sp-6); margin-bottom: var(--sp-4); }
.md-preview li { margin-bottom: var(--sp-1); }
.md-preview strong { font-weight: 700; }
.md-preview a { color: var(--brand-primary-deep); }
.md-preview blockquote { border-left: 3px solid var(--brand-primary); padding-left: var(--sp-4); color: var(--brand-ink-soft); margin: var(--sp-4) 0; }

/* ── 반응형 헬퍼 ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .container { padding: 0 var(--sp-4); }
  .hero { padding: var(--sp-8) 0; }
  .section { padding: var(--sp-8) 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .admin-content { padding: var(--sp-4); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: var(--sp-4); }
  .modal { padding: var(--sp-6); }
}

/* ── 프린트 스타일 ────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .floating-btns, .admin-sidebar { display: none !important; }
  .admin-main { margin-left: 0 !important; }
  body { font-size: 14px; }
}
/* ── 누를 수 있는 것은 손가락에 맞춘다 ─────────────────────
   44px. 이 아래로 내려가면 어르신 손가락이 헛누른다. 헛누름은
   "안 된다"로 읽히고, 그 다음은 전화가 온다.
   형제 앱들은 이 값을 토큰으로 못박아 두고 단추마다 참조한다. */
:root { --touch-min: 44px; }
.btn, .tab-btn, .rv-act, .floating-btn, .pagination button, .pagination a {
  min-height: var(--touch-min);
}
/* 작은 단추는 **관리 화면 안에서만** 허용한다.
   손님이 보는 화면에서는 예외를 두지 않는다 — 어르신 손님이 누르는 곳이다.
   (사장님·직원은 같은 화면을 매일 쓰므로 촘촘한 표가 오히려 편하다.) */
.admin-main .btn-xs, .admin-main .btn-sm, .admin-sidebar .btn-sm { min-height: 36px; }

/* ── 지금 어디에 있는지 보이게 ─────────────────────────────
   키보드(탭 키)로 쓰는 사람과, 마우스를 잘 못 쓰는 분에게는
   '지금 선택된 것'이 보이지 않으면 화면이 통째로 미로가 된다.
   :focus 가 아니라 :focus-visible 을 쓴다 — 마우스로 눌렀을 때는
   테두리가 안 뜨고, 키보드로 옮겨 다닐 때만 뜬다. */
:focus-visible {
  outline: 3px solid var(--brand-primary-deep);
  outline-offset: 2px;
  border-radius: 4px;
}
/* 마우스 사용자에게 테두리를 강요하지 않는다 */
:focus:not(:focus-visible) { outline: none; }

/* ── 움직임을 줄여 달라고 한 기기에서는 멈춘다 ─────────────
   어지럼증·멀미가 있는 분은 기기 설정에서 이것을 켜 둔다.
   그 설정을 무시하면 우리 화면만 유독 불편해진다. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 본문으로 건너뛰기 ─────────────────────────────────────
   읽어 주는 기계나 키보드로 오는 분은 화면마다 메뉴 열몇 개를
   매번 지나야 본문에 닿는다. 첫 번째 탭에서 이 단추가 튀어나와
   한 번에 본문으로 보낸다. 평소에는 화면 밖에 숨어 있다. */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  padding: 12px 18px; border-radius: 0 0 10px 10px;
  background: var(--brand-primary-deep); color: var(--on-primary-deep); font-weight: 700;
  transition: top .15s;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ── 글씨 크기·화면 밝기 고르는 단추 ───────────────────────
   밀대(슬라이더)나 숫자 입력은 어르신에게 어렵다. 단추 세 개뿐이고,
   지금 어느 것인지 눈에 보인다. 고른 것은 이 기기에 남는다. */
.view-prefs { display: inline-flex; gap: 6px; align-items: center; }
.view-prefs button {
  min-width: var(--touch-min); min-height: var(--touch-min);
  padding: 0 12px; border: 1px solid var(--brand-line); border-radius: 22px;
  background: transparent; color: var(--brand-ink-soft);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.view-prefs button[aria-pressed="true"] {
  background: var(--brand-primary-deep); border-color: var(--brand-primary-deep); color: var(--on-primary-deep);
}
.view-prefs .vp-label { font-size: 14px; color: var(--brand-ink-soft); margin-right: 2px; }

/* ── 넓은 표는 가로로 민다 ─────────────────────────────────
   칸이 다섯을 넘는 표를 좁은 화면에 밀어 넣으면 글자가 세로로
   한 줄씩 서 버린다(형제 앱 26-07 실제 사고). 표에 최소 폭을 주고
   칸이 아니라 표 전체를 밀게 한다. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 720px; }

/* ── 종이로 뽑을 때 ────────────────────────────────────────
   어르신은 화면보다 종이를 믿는다. 메뉴·단추·떠 있는 것은 빼고
   본문만 남긴다. 링크는 주소를 괄호로 같이 찍어 준다 —
   종이에서는 누를 수 없으니 주소가 보여야 쓸모가 있다. */
@media print {
  .skip-link, .view-prefs, .modal-overlay, .toast, .pagination,
  .tabs, .rv-actions, .rv-form, form { display: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 14px; color: #555; }
  .card, .admin-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc; }
  .table-wrap table { min-width: 0; }
}

/* ══════════════════════════════════════════════════════════════════
   디자인 개편 (2026-09)

   이 매장은 어르신 손님이 많다. 그 한 가지 사실에서 아래가 전부 나온다.

     · 글자는 크게. 기본 17px — 작게 보이는 화면은 아예 안 읽힌다.
     · 줄은 짧게. 한 줄이 길면 다음 줄 첫 글자를 눈이 못 찾는다(줄 잃음).
     · 위계는 또렷하게. 제목과 본문이 비슷하면 어디부터 읽을지 모른다.
     · 대비는 재서 확인. "잘 보이는 것 같다"는 근거가 아니다.

   글자 크기는 전부 rem(뿌리 크기의 배수)이다. 그래서 손님이 '더크게'를
   고르면 글자만이 아니라 여백과 단추까지 같이 커진다 — 글자만 키우면
   칸이 터진다.
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* ── 글자 사다리 ────────────────────────────────────────────
     화면 폭에 따라 자연스럽게 커지되(clamp), 아주 작아지지도
     터무니없이 커지지도 않게 아래위를 막았다.
     가운데 값(vw)이 폭을 따라가는 부분이다. */
  --fs-display: clamp(1.9rem, 1.2rem + 3.2vw, 3rem);    /* 히어로 큰 제목 */
  --fs-h1:      clamp(1.7rem, 1.2rem + 2.2vw, 2.4rem);
  --fs-h2:      clamp(1.35rem, 1.1rem + 1.2vw, 1.8rem);
  --fs-h3:      clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --fs-lead:    clamp(1.02rem, 0.98rem + 0.35vw, 1.18rem); /* 소개 문단 */
  --fs-body:    1rem;
  --fs-small:   0.875rem;

  /* ── 세로 리듬 ──────────────────────────────────────────────
     구역 사이 여백도 폭에 따라 움직인다. 폰에서 48px, 큰 화면에서 88px. */
  --section-y: clamp(3rem, 6vw, 5.5rem);

  /* ── 읽기 폭 ────────────────────────────────────────────────
     한 줄에 한글 34~40자. 이보다 길면 눈이 줄을 잃는다. */
  --measure: 36em;
}

/* 뿌리 글씨를 17px 로 올린다.
   16px 는 '읽을 수는 있는' 크기고 17px 는 '편한' 크기다. 그 1px 이
   어르신 화면에서는 안경을 벗고 보느냐 쓰고 보느냐를 가른다.
   (--font-scale 은 여기에 곱해진다 — 보통/크게/더크게) */
:root { --font-size-body: 17px; --line-height: 1.7; }

/* ── 제목 ─────────────────────────────────────────────────────
   굵기를 800 까지 올린다. 한글은 영문보다 획이 많아 같은 굵기여도
   덜 굵어 보인다. 그리고 제목은 줄간격을 좁혀야 덩어리로 읽힌다. */
h1 { font-size: var(--fs-h1); line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.3;  font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.4;  font-weight: 700; }

/* 본문 문단은 읽기 폭을 넘지 않는다. */
p { max-width: var(--measure); }
/* 가운데 정렬 구역에서는 문단도 가운데로 모은다. */
[style*="text-align:center"] > p, .center > p, .hero p, .section-header p { margin-left: auto; margin-right: auto; }

/* ── 구역 ─────────────────────────────────────────────────── */
.section { padding: var(--section-y) 0; }

/* 구역 머리 — 작은 눈썹글 + 제목 + 한 줄 설명.
   세 화면에 같은 모양을 따로 적어 두지 않으려고 한 벌로 만든다. */
.section-header { text-align: center; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }

.section-header h2 { margin-bottom: .5rem; }
.section-header p { font-size: var(--fs-lead); color: var(--brand-ink-soft); }

/* ── 히어로 ───────────────────────────────────────────────────
   ⚠ 여기 진짜 고장이 있었다. 사진 위에 얹는 흰 글자 규칙을
     그 아래 줄의 회색 규칙이 덮고 있었다(우선순위가 같으면 나중 것이 이긴다).
     그래서 부제가 사진에 묻혀 거의 안 보였다 — 적혀 있는데 무시되는 상태.
     아래에서 더 구체적인 선택자로 못 박는다. */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0; text-align: center; }
.hero h1 { font-size: var(--fs-display); margin-bottom: .75rem; }
.hero--gradient {
  /* 사진 위 글자는 사진이 밝든 어둡든 읽혀야 한다. 그래서 위아래로
     어두운 천을 한 겹 덮는다. 가운데를 더 어둡게 해 글자 뒤가 가장 진하다. */
  background:
    linear-gradient(rgba(6,22,40,.72), rgba(6,22,40,.62) 45%, rgba(6,22,40,.78)),
    url('/assets/images/muktto/store-front.webp') center 30%/cover no-repeat;
}
.hero--gradient h1,
.hero--gradient p,
.hero--gradient .hero-lead {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.hero--gradient .hero-quote { color: rgba(255,255,255,.92); font-style: normal; }
.hero .hero-lead { font-size: var(--fs-lead); max-width: 34em; margin: 0 auto 1.75rem; }
.hero-badge {
  font-size: var(--fs-small); font-weight: 700; color: #fff;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28);
  padding: .4em 1.1em; border-radius: var(--radius-pill);
  margin-bottom: 1rem; display: inline-block; backdrop-filter: blur(6px);
}
.hero-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ── 단추 ─────────────────────────────────────────────────────
   누를 수 있는 것은 누를 수 있게 생겨야 한다. 테두리 대비를 3:1 이상으로
   둔다 — 표 구분선 색으로 단추를 그리면 단추가 배경에 녹는다. */
.btn {
  border-radius: var(--radius-pill); font-weight: 700;
  padding: .7em 1.6em; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-primary-deep); color: #fff; border-color: var(--brand-primary-deep); }
.btn-primary:hover { background: var(--brand-primary-deep); filter: brightness(.92); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--brand-primary-deep); border-color: var(--brand-primary-deep); }
.btn-secondary:hover { background: var(--brand-bg-soft); text-decoration: none; }
.hero--gradient .btn-secondary { color: #fff; border-color: rgba(255,255,255,.85); }
.hero--gradient .btn-secondary:hover { background: rgba(255,255,255,.14); }
.btn-lg { font-size: var(--fs-lead); padding: .8em 2em; }

/* ── 카드 ─────────────────────────────────────────────────────
   그림자를 옅게, 테두리를 또렷하게. 어르신 화면에서는 그림자보다
   선이 잘 보인다(대비가 있으므로). 떠오르는 효과는 마우스에서만. */
.card {
  background: var(--brand-bg); border: 1px solid var(--brand-line);
  border-radius: var(--radius-md); padding: clamp(1.15rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}
a.card, .card--link { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.card:hover, .card--link:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--brand-primary); text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  a.card:hover, .card--link:hover, .btn:active { transform: none; }
}

/* ── 입력칸 ───────────────────────────────────────────────────
   칸이 칸처럼 보여야 한다. 밑줄만 있는 입력칸은 어르신이 못 찾는다. */
.form-input, .form-select, .form-textarea {
  font-size: var(--fs-body); padding: .75em .9em;
  border: 1.5px solid var(--brand-line); border-radius: var(--radius-sm);
  background: var(--brand-bg); color: var(--brand-ink);
  min-height: var(--touch-min);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-primary-deep);
  box-shadow: 0 0 0 3px var(--brand-focus);
  outline: none;
}
.form-label { font-weight: 700; font-size: var(--fs-body); margin-bottom: .4em; display: block; }
.required { color: var(--color-danger); }

/* ── 아무것도 없을 때 ─────────────────────────────────────────
   빈 화면은 '고장'으로 읽힌다. 왜 비었는지와, 지금 무엇을 하면 되는지를
   같이 적는다. 화면마다 다른 말로 적지 않으려고 한 벌로 둔다. */
.empty {
  text-align: center; padding: clamp(2rem, 6vw, 3.5rem) 1rem;
  background: var(--brand-bg-soft); border: 1px dashed var(--brand-line);
  border-radius: var(--radius-md); color: var(--brand-ink-soft);
}
.empty .empty-icon { font-size: 2.5rem; line-height: 1; margin-bottom: .6rem; display: block; }
.empty strong { display: block; color: var(--brand-ink); font-size: var(--fs-h3); margin-bottom: .35rem; }

/* ── 불러오는 중 ──────────────────────────────────────────────
   회색 막대가 깜빡인다. 빈 화면보다 낫다 — '오고 있다'가 보인다. */
.skeleton { background: var(--brand-bg-soft); border-radius: var(--radius-sm);
            animation: fzpulse 1.4s ease-in-out infinite; }
.skeleton-line { height: 1em; margin-bottom: .6em; }
.skeleton-card { height: 9rem; border-radius: var(--radius-md); }
@keyframes fzpulse { 0%,100% { opacity: 1 } 50% { opacity: .5 } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none } }

/* ── 머리말 줄 ────────────────────────────────────────────────
   고르는 단추가 메뉴 사이에 끼어 답답했다. 살짝 떼어 놓고 작게 만든다. */
.site-nav .view-prefs { margin-left: .5rem; padding-left: .75rem; border-left: 1px solid var(--brand-line); }
.site-nav .view-prefs button { font-size: .875rem; padding: 0 .6rem; min-width: 2.4rem; }
/* ⚠ 한때 여기서 '글씨' 이름표를 숨겼다. 자리를 아끼려던 것인데,
   그러면 단추에 '보통 크게 더크게'만 남아 **무엇이 보통인지** 알 수 없다.
   자리를 아끼는 것보다 뜻이 통하는 것이 먼저다. 이름표는 남기고
   글자만 작게 한다. */
.site-nav .view-prefs .vp-label { font-size: .875rem; opacity: .75; }

/* ── 좁은 화면 ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-actions .btn { width: 100%; }      /* 손가락 하나로 정확히 누르게 */
  .section-header p { font-size: var(--fs-body); }
}

/* ══════════════════════════════════════════════════════════════════
   관리 화면 개편 (2026-09)

   이 앱은 자원을 관리자 70 : 손님 20 : 연동 10 으로 쓰기로 했다.
   실제로 매일 오래 보는 화면이 여기다. 그런데 그동안 손을 덜 댔다.

   ★여기서 찾은 가장 큰 문제.★
   관리 화면의 글자 크기가 전부 **px 로 못 박혀** 있었다. 그래서 사장님이
   손님 화면에서 '글씨 크게'를 골라도 **관리 화면만 그대로**였다.
   정작 매일 몇 시간을 보는 화면이 안 커진 것이다.
   전부 rem(뿌리 크기의 배수)으로 바꾼다 — 이제 같이 커진다.
   ══════════════════════════════════════════════════════════════════ */

/* ── 옆 메뉴 ──────────────────────────────────────────────────
   항목 높이가 38px 이었다. 폰에서 옆 메뉴를 열고 누르면 자주 빗나간다.
   44px 로 올리고, 글자도 뿌리 크기를 따라가게 한다. */
.admin-nav a {
  font-size: .95rem;
  min-height: var(--touch-min);
  padding: .7rem 1.25rem;
}

.admin-brand-text { font-size: .9rem; }
.admin-brand-text span { font-size: .875rem; }

/* 지금 어느 화면인지 더 또렷하게. 색만으로 표시하면 놓친다. */
.admin-nav a.active {
  background: rgba(254,205,105,.18);
  border-right: 4px solid var(--brand-primary);
  font-weight: 700;
}
/* 7개 묶음. 펼쳐진 묶음은 제목을 굵게 + 옆에 ▾ 로 '열려 있다'를 글자로도 알린다. */
.admin-nav a.admin-nav-group { font-weight: 600; color: rgba(255,255,255,.85); }
.admin-nav a.admin-nav-group.is-open { color: #fff; font-weight: 700; }
.admin-nav a.admin-nav-group.is-open::after { content: '▾'; margin-left: auto; opacity: .7; }
.admin-nav-subs { padding: 0 0 .35rem; background: rgba(0,0,0,.14); }
.admin-nav a.admin-nav-sub { padding-left: 2.25rem; font-size: .9rem; }

/* ── 윗줄 ─────────────────────────────────────────────────────
   화면 이름이 18px 로 고정이라 본문보다 겨우 1px 컸다. 제목처럼 안 보인다. */
/* ★플렉스 칸은 기본적으로 '내용보다 작아지지 않는다'.★
   그래서 375px 폰에서도 .admin-main 이 676px 로 부풀어 화면이 옆으로 밀렸다.
   min-width:0 을 주어야 비로소 줄어든다. 이것을 빠뜨리면 안에서 아무리
   반응형으로 짜도 바깥이 안 줄어든다 — 원인이 눈에 안 보이는 종류의 고장이다. */
.admin-main, .admin-content { min-width: 0; }
.admin-content { max-width: 1200px; }

/* 숫자 타일 줄: 칸 수를 못 박지 않고 폭에 맞춰 접히게 한다. */
.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin-bottom: 1.25rem; }

/* 두 칸 배치는 넓을 때만. '1fr 1fr' 로 못 박으면 폰에서 두 칸이 그대로
   버티면서 화면이 옆으로 밀린다(회계 화면이 375px 에서 525px 이었다). */
.two-col { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
/* 두 칸이 접히면 위아래 간격이 필요하다 — 붙어 있으면 한 덩어리로 보인다. */
.two-col > * { min-width: 0; }

/* 그림은 칸을 넘지 않는다. canvas 는 기본 폭이 300px 로 박혀 있어
   가만두면 좁은 칸을 뚫고 나간다 — 그림 하나 때문에 화면 전체가 밀린다. */
.admin-card canvas, .card canvas { max-width: 100%; height: auto; display: block; }

.admin-topbar { height: auto; min-height: 3.5rem; padding: .6rem 1.25rem; flex-wrap: wrap; }
/* 화면 이름은 본문보다 확실히 커야 제목으로 읽힌다.
   처음엔 1.05rem 으로 뒀는데 본문(1rem)보다 겨우 0.85px 커서 제목처럼
   보이지 않았다 — 재 보고 올렸다. */
.admin-topbar h1 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); font-weight: 800; }

/* ── 카드 ─────────────────────────────────────────────────── */
.admin-card {
  border: 1px solid var(--brand-line);
  padding: clamp(1rem, 2vw, 1.5rem);
}
.admin-card-header h2 { font-size: 1.05rem; font-weight: 800; }

/* ── 숫자 타일 ────────────────────────────────────────────────
   숫자는 크게 { border: 1px solid var(--brand-line); }

/* ── 표 ───────────────────────────────────────────────────────
   관리 화면의 본체는 표다. 세 가지를 고친다.
     ① 머리줄이 스크롤해도 붙어 있게 — 한참 내리면 무슨 칸인지 잊는다.
     ② 줄을 번갈아 칠하지 않는다. 대신 줄 사이 선을 또렷하게 —
        얼룩말 무늬는 어두운 화면에서 지저분해진다.
     ③ 누르는 줄은 손가락 높이. */
.admin-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-content thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--brand-bg-soft); color: var(--brand-ink);
  font-size: .875rem; font-weight: 800; text-align: left;
  padding: .7rem .75rem; border-bottom: 2px solid var(--brand-line);
  white-space: nowrap;
}
.admin-content tbody td { padding: .75rem; border-bottom: 1px solid var(--brand-line); vertical-align: middle; }
.admin-content tbody tr:hover { background: var(--brand-bg-soft); }

/* ── 좁은 화면에서는 표를 카드로 ──────────────────────────────
   칸이 다섯을 넘는 표를 폰에 밀어 넣으면 글자가 세로 한 줄로 선다
   (형제 앱에서 실제로 난 일). 가로로 미는 것도 방법이지만, 사장님은
   폰으로 급히 확인하는 일이 많아 '한 건 = 한 장'이 더 빠르다.

   칸 이름은 각 칸의 data-label 에서 가져온다. 표를 그리는 쪽에서
   그 표시만 붙여 주면 이 규칙이 알아서 카드로 만든다. */
@media (max-width: 720px) {
  .admin-content table.cards-on-phone thead { display: none; }
  .admin-content table.cards-on-phone,
  .admin-content table.cards-on-phone tbody,
  .admin-content table.cards-on-phone tr,
  .admin-content table.cards-on-phone td { display: block; width: 100%; }
  .admin-content table.cards-on-phone tr {
    border: 1px solid var(--brand-line); border-radius: var(--radius-md);
    margin-bottom: .75rem; padding: .35rem .25rem; background: var(--brand-bg);
  }
  .admin-content table.cards-on-phone td {
    border: none; display: flex; gap: .75rem; align-items: baseline;
    padding: .45rem .75rem;
  }
  .admin-content table.cards-on-phone td::before {
    content: attr(data-label);
    flex: 0 0 5.5rem; font-size: .875rem; font-weight: 700;
    color: var(--brand-ink-soft);
  }
  .admin-content table.cards-on-phone td:empty { display: none; }
  /* '기록이 없습니다' 같은 한 칸짜리 줄은 카드로 만들지 않는다 —
     이름표 없이 가운데 그대로 두는 편이 읽기 좋다. */
  .admin-content table.cards-on-phone tr.no-card { border: none; background: none; }
  .admin-content table.cards-on-phone tr.no-card td { display: block; text-align: center; }
  .admin-content table.cards-on-phone tr.no-card td::before { content: none; }
  .table-wrap table { min-width: 0; }
}

/* ── 불러오는 중 (표) ─────────────────────────────────────────
   '로딩 중…' 글자 한 줄보다 { padding: .85rem .75rem; }

/* ── 관리 화면에서도 글씨·밝기를 고를 수 있게 ────────────────
   사장님이 제일 오래 보는 화면이 여기다. 손님 화면에만 달아 두면
   정작 필요한 분이 못 쓴다. */
/* 윗줄 오른쪽 도구 묶음(걸러보기·새로 만들기·글씨).
   줄바꿈을 막아 두면 폰에서 화면이 옆으로 밀린다 — 실제로 375px 에서
   문서가 655px 이 됐다. 좁으면 아랫줄로 내려가게 둔다. */
.topbar-tools { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.topbar-tools .form-select { min-width: 7rem; }
@media (max-width: 720px) {
  .topbar-tools { width: 100%; margin-left: 0; }
  .topbar-tools .form-select { flex: 1 1 8rem; width: auto; }
}
.admin-topbar .view-prefs { margin-left: auto; flex-wrap: wrap; }
.admin-topbar .view-prefs .vp-label { font-size: .875rem; opacity: .75; }
.admin-topbar .view-prefs button { font-size: .875rem; padding: 0 .6rem; min-width: 2.4rem; }

/* ── 관리 화면 도구 셋 (알림함·검색·의견) ─────────────────────
   윗줄 오른쪽에 아이콘 셋. 눌러야 열리고, 하나 열면 나머지는 닫힌다 —
   두 상자가 겹쳐 뜨면 화면을 덮어 아무것도 못 한다. */
.adm-tools { display: flex; gap: .25rem; align-items: center; }
.adm-tool { position: relative; }
.adm-iconbtn {
  position: relative; min-width: var(--touch-min); min-height: var(--touch-min);
  border: 1px solid var(--brand-line); border-radius: var(--radius-sm);
  background: var(--brand-bg); font-size: 1.05rem; cursor: pointer; line-height: 1;
}
.adm-iconbtn:hover { border-color: var(--brand-primary); }

/* 안 읽은 개수. 색만으로 알리지 않고 숫자를 적는다. */
.adm-badge {
  position: absolute; top: -6px; right: -6px; min-width: 1.25rem; height: 1.25rem;
  padding: 0 .3rem; border-radius: var(--radius-pill);
  background: var(--color-danger); color: #fff;
  font-size: .875rem; font-weight: 800; line-height: 1.25rem; text-align: center;
}

.adm-pop {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 90;
  width: min(22rem, calc(100vw - 2rem));
  background: var(--brand-bg); border: 1px solid var(--brand-line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden;
}

.adm-pop-head {
  display: flex; align-items: center; gap: .5rem; padding: .7rem .85rem;
  border-bottom: 1px solid var(--brand-line); background: var(--brand-bg-soft);
}
.adm-pop-body { max-height: min(26rem, 60vh); overflow-y: auto; }

.adm-notif { display: block; padding: .75rem .85rem; border-bottom: 1px solid var(--brand-line); color: inherit; }
.adm-notif:hover { background: var(--brand-bg-soft); text-decoration: none; }
/* 안 읽은 것은 왼쪽에 색 막대 — 굵기만으로 구분하면 놓친다. */
.adm-notif.unread { border-left: 4px solid var(--brand-primary); background: var(--brand-bg-soft); }
.adm-notif-title { font-weight: 700; font-size: .92rem; }
.adm-notif-body { font-size: .875rem; color: var(--brand-ink-soft); margin-top: .15rem;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-notif-time { font-size: .875rem; color: var(--brand-ink-soft); margin-top: .25rem; }

.adm-group { border-bottom: 1px solid var(--brand-line); }
.adm-group-name { padding: .5rem .85rem .25rem; font-size: .875rem; font-weight: 800;
                  letter-spacing: .04em; color: var(--brand-ink-soft); }
.adm-hit { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .85rem; color: inherit; }
.adm-hit:hover { background: var(--brand-bg-soft); text-decoration: none; }
.adm-hit-label { font-weight: 700; font-size: .92rem; }
.adm-hit-sub { font-size: .875rem; color: var(--brand-ink-soft); }

/* ── 상품 문의 ────────────────────────────────────────────────
   Q 와 A 를 나란히 두되, 답은 한 칸 들여 색을 달리한다 —
   누가 한 말인지 글을 읽기 전에 눈으로 먼저 알아야 한다. */
.qna { margin-top: var(--section-y); border-top: 1px solid var(--brand-line); padding-top: 2rem; }
.qna h2 { margin-bottom: .35rem; }
.qna-lead { color: var(--brand-ink-soft); margin-bottom: 1.25rem; }
.qna-waiting { font-size: .9rem; color: var(--brand-warn); font-weight: 700; margin-bottom: .75rem; }

.qna-item { border: 1px solid var(--brand-line); border-radius: var(--radius-md);
            margin-bottom: .85rem; overflow: hidden; background: var(--brand-bg); }
.qna-q, .qna-a { display: flex; gap: .75rem; padding: .9rem 1rem; }
.qna-a { background: var(--brand-bg-soft); border-top: 1px solid var(--brand-line); }
.qna-badge {
  flex: 0 0 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .875rem;
  background: var(--brand-line); color: var(--brand-ink);
}
.qna-badge--a { background: var(--brand-primary-deep); color: #fff; }
.qna-meta { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; font-size: .9rem; }
.qna-time { font-size: .875rem; color: var(--brand-ink-soft); }
.qna-text { margin-top: .25rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.qna-hidden { color: var(--brand-ink-soft); font-style: italic; }
.qna-pending { padding: .7rem 1rem; font-size: .88rem; color: var(--brand-ink-soft);
               background: var(--brand-bg-soft); border-top: 1px dashed var(--brand-line); }

.qna-form { margin-top: 1.5rem; display: grid; gap: .5rem;
            border: 1px solid var(--brand-line); border-radius: var(--radius-md); padding: 1rem; }
.qna-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.qna-row .form-input { flex: 1 1 10rem; min-width: 0; }
.qna-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.qna-note { font-size: .875rem; color: var(--brand-ink-soft); }

/* ── 되풀이되던 인라인 style 을 이름 붙여 모은다 ────────────────
   같은 style="…" 이 스무 곳 넘게 흩어져 있으면, 글씨 크기 하나를 바꾸려
   해도 스무 곳을 찾아 고쳐야 하고 반드시 한 곳이 빠진다.
   가장 자주 나오던 것부터 이름을 준다. */
.t-soft   { font-size: .875rem; color: var(--brand-ink-soft); }

.row      { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.pad-box  { text-align: center; padding: 2rem 1rem; color: var(--brand-ink-soft); }

/* ── 대시보드 (참출판사 네 칸 구성) ───────────────────────────
   ① 오늘 할 일 ② 손님 응대 흐름 ③ 월별 추이 ④ 후속 연락거리.
   숫자는 크게, 할 일 있는 칸만 주황. 다 주황이면 아무것도 안 급해 보인다. */
.dash-h { font-size: 1rem; font-weight: 700; color: var(--brand-ink-soft); margin: 0 0 .6rem; }
.dash-card-h { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
.dash-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.dash-card-top .dash-card-h { margin: 0; }
.dash-error { background: var(--dash-err-bg); color: var(--dash-err-ink); border: 1px solid var(--color-danger); border-radius: var(--radius-md); padding: .8rem 1rem; font-weight: 600; margin-bottom: 1rem; }
.admin-content > section { margin-bottom: 1.5rem; }

.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.todo-card { display: flex; flex-direction: column; gap: .2rem; min-height: 96px; padding: .9rem 1rem;
  background: var(--brand-bg); border: 1px solid var(--brand-line); border-radius: var(--radius-md); color: inherit; }
.todo-card:hover, .todo-card:focus-visible { border-color: var(--brand-primary); text-decoration: none; }
.todo-card.urgent { background: var(--dash-warn-bg); border-color: var(--brand-warn); }
.todo-label { font-size: .95rem; color: var(--brand-ink-soft); }
.todo-value { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.2rem); font-weight: 800; line-height: 1.1; }
.todo-card.urgent .todo-value { color: var(--dash-warn-ink); }
.todo-sub { font-size: .875rem; color: var(--dash-warn-ink); }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.flow-step { display: flex; flex-direction: column; align-items: center; min-width: 104px; min-height: var(--touch-min);
  padding: .55rem .8rem; background: var(--brand-bg); border: 1px solid var(--brand-line); border-radius: var(--radius-md); color: inherit; }
.flow-step:hover, .flow-step:focus-visible { border-color: var(--brand-primary); text-decoration: none; }
.flow-step span { font-size: .9rem; color: var(--brand-ink-soft); }
.flow-step strong { font-size: 1.35rem; }
.flow-arrow { color: var(--brand-ink-soft); font-size: 1.1rem; }
.flow-bar { width: 1px; align-self: stretch; background: var(--brand-line); margin: 0 .5rem; }

.dash-two, .dash-three { display: grid; gap: .9rem; }
/* 옆 메뉴(약 240px)가 자리를 먹으므로 세 칸은 넓은 화면에서만. minmax(0,…) 이어야 긴 글이 칸을 밀어내지 않는다. */
@media (min-width: 900px) { .dash-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .dash-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) and (max-width: 1179px) { .dash-three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .55rem 0; border-bottom: 1px solid var(--brand-line); font-size: .95rem; }
.dash-list li:last-child { border-bottom: 0; }
.dash-list li > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list .muted { color: var(--brand-ink-soft); font-size: .875rem; }
.dash-list .late { color: var(--color-danger); }
.dash-empty { color: var(--brand-ink-soft); }

/* 주황·빨강 칸도 어두운 화면에서 눈부시지 않게. 색은 한 곳에서만 바꾼다. */
:root { --dash-warn-bg: #FFF6EA; --dash-warn-ink: #9A4F00; --dash-err-bg: #FDECEC; --dash-err-ink: #8A1F1F; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { --dash-warn-bg: rgba(232,155,60,.16); --dash-warn-ink: #FFC27A; --dash-err-bg: rgba(224,87,87,.16); --dash-err-ink: #FFB3B3; }
}
html[data-theme="dark"] { --dash-warn-bg: rgba(232,155,60,.16); --dash-warn-ink: #FFC27A; --dash-err-bg: rgba(224,87,87,.16); --dash-err-ink: #FFB3B3; }

/* 제목이 도구 칸에 밀려 '대/시/보/드' 한 글자씩 세로로 찌그러지던 것.
   제목은 줄어들지 않게 하고, 모자라면 도구 칸이 아랫줄로 내려간다. */
.admin-topbar h1 { flex: 1 0 auto; white-space: nowrap; }
/* 좁은 화면: 가게 상태·글씨 단추가 한 글자씩 세로로 쪼개지지 않게 */
.admin-topbar .status-badge, .admin-topbar .view-prefs button, .admin-topbar .vp-label { white-space: nowrap; }
@media (max-width: 720px) { .admin-topbar .view-prefs { margin-left: 0; } }
/* 선이 둘 이상이면 무엇이 무슨 색인지 적어 둔다 */
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 0; font-size: .95rem; color: var(--brand-ink-soft); }
.chart-legend i { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; margin-right: .35rem; vertical-align: -.1rem; }
/* ── 통계 화면 ─────────────────────────────────────────────── */
.range-bar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.range-quick, .range-dates { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.range-dates label { display: flex; gap: .4rem; align-items: center; font-weight: 600; }
.range-dates .form-input { width: auto; }
.range-quick .btn.is-on { background: var(--brand-primary); color: var(--on-primary); border-color: var(--brand-primary); }
.range-note { flex-basis: 100%; margin: 0; }
.dist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.bar-list li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; }
.bar-k { overflow-wrap: anywhere; }
.bar-v { font-weight: 700; white-space: nowrap; }
.bar { grid-column: 1 / -1; height: .6rem; border-radius: 99px; background: var(--brand-primary); }
.todo-card .cmp { font-size: .95rem; color: var(--brand-ink-soft); }
.range-quick .btn { border: 1px solid var(--brand-line); }
@media (max-width: 520px) { .range-quick { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } }
/* 알림·검색에서 고른 한 건 */
.one-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between;
  padding: .85rem 1rem; margin-bottom: 1rem; border-radius: var(--radius-md);
  background: var(--dash-warn-bg); color: var(--dash-warn-ink); border: 1px solid currentColor; font-size: 1.05rem; }
.row-flash { outline: 3px solid var(--brand-warn); outline-offset: -3px; }
/* ── 알림·검색 (참출판사와 같은 동작) — 어르신 눈에 맞춰 글씨를 한 치수 키웠다 ── */
.adm-notif-title { font-size: 1rem; }
.adm-notif-body { font-size: .95rem; }
.adm-notif-time, .adm-group-name { font-size: .88rem; }
.adm-badge { font-size: .875rem; }
.adm-iconbtn--sm { min-width: 2.4rem; min-height: 2.4rem; font-size: 1rem; border: 0; background: none; }
.adm-empty { padding: 1.5rem 1rem; text-align: center; color: var(--brand-ink-soft); margin: 0; }
.adm-pop-foot { display: block; padding: .8rem; text-align: center; border-top: 1px solid var(--brand-line);
  font-weight: 700; color: var(--brand-primary-deep); }
.adm-notif-toast { position: fixed; left: 1rem; right: 1rem; bottom: 1.25rem; z-index: 200; margin: 0 auto; max-width: 28rem;
  display: flex; gap: .5rem; align-items: flex-start; padding: 1rem; border-radius: var(--radius-md);
  background: var(--brand-bg); border: 2px solid var(--brand-primary); box-shadow: var(--shadow-lg); }
.adm-notif-toast a { flex: 1; min-width: 0; display: grid; gap: .25rem; color: inherit; text-decoration: none; }
.adm-notif-toast-k { font-size: .9rem; font-weight: 800; color: var(--brand-primary-deep); }
.adm-notif-toast-b { white-space: pre-line; overflow-wrap: anywhere; }
.adm-notif-toast-k2 { font-size: .88rem; color: var(--brand-ink-soft); }
.adm-search-overlay { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 1rem 1rem; background: rgba(0,0,0,.45); }
.adm-search-overlay[hidden] { display: none; }
.adm-search-box { width: 100%; max-width: 36rem; background: var(--brand-bg); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; }
.adm-search-head { display: flex; align-items: center; gap: .5rem; padding: 0 .75rem; border-bottom: 1px solid var(--brand-line); }
.adm-search-head input { flex: 1; min-width: 0; min-height: var(--touch-min); border: 0; background: none; color: inherit; font-size: 1.1rem; padding: .75rem 0; outline: none; }
.adm-search-body { max-height: 55vh; overflow-y: auto; padding: .25rem 0; }
/* 결과는 두 줄(이름 / 내용 앞부분) — 한 줄에 밀어 넣으면 폰에서 내용이 잘려 안 보인다 */
.adm-hit { padding: .7rem .85rem; }
.adm-hit:focus { background: var(--brand-bg-soft); }
.adm-hit-label { font-size: 1rem; }
.adm-hit-sub { font-size: .92rem; }

/* ── 전체 알림 · 알림 자세히 ── */
.notif-page { max-width: 44rem; }
.notif-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.notif-item { display: grid; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--brand-line); border-radius: var(--radius-md);
  background: var(--brand-bg); color: inherit; }
.notif-item:hover { text-decoration: none; border-color: var(--brand-primary); }
.notif-item.unread { border-color: var(--brand-primary); border-left-width: 5px; }
.notif-item:not(.unread) .notif-title { font-weight: 500; color: var(--brand-ink-soft); }
.notif-title { font-weight: 800; font-size: 1.05rem; display: flex; justify-content: space-between; gap: .5rem; }
.notif-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--color-danger); flex: none; align-self: center; }
.notif-body { color: var(--brand-ink-soft); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.notif-time { font-size: .9rem; color: var(--brand-ink-soft); margin: 0; }
.notif-more { text-align: center; margin-top: 1rem; }
.notif-back { display: inline-block; margin-bottom: 1rem; font-weight: 700; }
.notif-detail h2 { font-size: 1.35rem; margin: .25rem 0 .75rem; }
.notif-full { white-space: pre-line; line-height: 1.8; margin: 0 0 1.5rem; }
/* ── 도움말 ── */
.adm-help { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.help { max-width: 52rem; font-size: 1.05rem; line-height: 1.8; }
.help-lead { font-size: 1.1rem; margin: 0 0 1rem; }
.help-toc { background: var(--brand-bg); border: 1px solid var(--brand-line); border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.help-toc ol { margin: .5rem 0 0; padding-left: 1.5rem; columns: 2 14rem; }
.help h2, .help-h { font-size: 1.35rem; margin: 0 0 .75rem; }
.help h3 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.help article h3 { margin-top: 0; }
.help ul, .help ol { padding-left: 1.4rem; margin: 0; }
.help li { margin: .3rem 0; }
.help section[id], .help article[id] { scroll-margin-top: 5rem; }
.help-faq dt { font-weight: 800; margin-top: .9rem; }
.help-faq dd { margin: .2rem 0 0; }
@media print {
  .admin-sidebar, .admin-topbar, .help-toc { display: none !important; }
  .admin-main { margin: 0 !important; }
  .help .admin-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
.admin-logout { display: block; width: calc(100% - 2rem); margin: 1.25rem 1rem 2rem; min-height: var(--touch-min); border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius-sm); background: none; color: inherit; font-size: 1rem; cursor: pointer; }
.admin-logout:hover { background: rgba(255,255,255,.08); }
/* ★창이 화면보다 길면 위아래가 잘려 [저장]을 누를 수 없었다.★ 창 안에서 굴러가게 한다.
   (노트북 높이 800 에서 상담 기록·상품 추가 창의 저장 단추가 화면 밖이었다. 글씨 '크게'면 더 심했다) */
.modal { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
.adm-export { white-space: nowrap; }
/* ── 엑셀 올리기 ── */
.imp { display: grid; gap: .75rem; }
.imp-how { margin: 0; padding-left: 1.3rem; line-height: 1.8; }
.imp-sum { padding: .75rem 1rem; border-radius: var(--radius-md); background: var(--brand-bg-soft); border: 1px solid var(--brand-line); }
.imp-sum.bad { background: var(--dash-err-bg); color: var(--dash-err-ink); }
.imp-err { margin: .25rem 0; padding-left: 1.2rem; color: var(--dash-err-ink); max-height: 12rem; overflow: auto; }
.imp-h { font-size: 1.05rem; margin: .5rem 0 0; }
.imp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.imp-list li { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); flex-wrap: wrap; }
/* 폰: 윗줄 단추가 한 줄에 다 안 들어가면 아랫줄로. 엑셀 단추 글자도 줄인다(화면이 옆으로 밀려 전체가 작아졌다) */
.adm-tools { flex-wrap: wrap; }
@media (max-width: 600px) {
  .adm-export { font-size: 0; padding: 0 .6rem; }
  .adm-export::before { font-size: .9rem; content: attr(data-short); }
}

/* ── 어르신 읽기 보강 (2026-09-30, 폰 390px 에서 재서 고침) ─────────────
   재는 법: tests/elder-audit.mjs — 14px 미만 글씨·명암비 4.5 미만·44px 미만 단추를 센다. */
/* 어두운 바탕에서는 밝은 쪽이 더 잘 보인다 — 남색 대신 노랑을 '진한 색' 자리에, 그 위 글자는 먹색 */
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --brand-primary-deep: var(--muk-yellow); --on-primary-deep: var(--muk-ink); --brand-focus: rgba(254,205,105,.3); } }
html[data-theme="dark"] { --brand-primary-deep: var(--muk-yellow); --on-primary-deep: var(--muk-ink); --brand-focus: rgba(254,205,105,.3); }
.btn-primary:hover { filter: brightness(.92); }
.btn-phone { background: #257A5C; }                                 /* 전화 단추: 흰 글씨 명암비 2.4 → 5.2 */
.btn-phone:hover { background: #1c604a; }
.notice-bar { background: var(--brand-primary-deep); }              /* 맨 위 알림 띠: 옅은 하늘색 위 흰 글씨(2.0) */
.notice-bar:hover { background: #1d6282; }
.site-footer .view-prefs button { color: #fff; border-color: rgba(255,255,255,.55); }   /* 글씨 크게 단추가 제일 안 보였다(2.5) */
.site-footer .view-prefs .vp-label { color: rgba(255,255,255,.9); font-size: 14px; }
.view-prefs .vp-label { font-size: 14px; }
.nav-toggle { min-width: var(--touch-min); min-height: var(--touch-min); align-items: center; justify-content: center; }
.footer-sns-icon { width: var(--touch-min); height: var(--touch-min); }
.notice-bar .close-btn { min-width: var(--touch-min); min-height: var(--touch-min); }
/* 폰에서 손가락으로 누르기 쉬운 크기(44px) — 발 아래 링크 줄, 후기의 도움됐어요·답글·원본 */
.site-footer li a, .site-footer nav a { display: inline-flex; align-items: center; min-height: var(--touch-min); }
[data-helpful], [data-reply-to], .review-card .btn, .review-card a.btn { min-height: var(--touch-min); }
.review-card a[target="_blank"] { display: inline-flex; align-items: center; min-height: var(--touch-min); }
/* ★폰에서 종·의견 상자가 왼쪽 화면 밖으로 잘렸다.★ 단추 오른쪽 끝에 붙여 펼치니 좁은 화면에선
   상자 대부분이 밖으로 나갔다(소리 켜고 끄기 단추도 안 보였다). 폰에서는 화면 폭에 맞춰 편다 — 참출판사와 같은 방식. */
@media (max-width: 600px) {
  /* 아래에서 올라오는 판 — 윗줄 단추들을 가리지 않고, 엄지가 닿는 자리다 */
  .adm-pop { position: fixed; left: .5rem; right: .5rem; top: auto; bottom: .5rem; width: auto; max-height: 70dvh; overflow: auto; z-index: 160; }
}
/* 띄어쓰기 없는 긴 이름(손님이 그렇게 적을 수 있다)이 칸을 밀어 폰 화면이 옆으로 넓어졌다 — 칸 안에서 … 로 자른다 */
.dash-list li > :first-child { max-width: 100%; }
.dash-two > *, .dash-three > *, .todo-grid > * { min-width: 0; }

/* 관리 화면도 14px 아래로 내려가지 않게 — 윗줄 글씨 단추·숫자 딱지·이름표 */
.admin-topbar .view-prefs button { font-size: .9rem; }
.admin-topbar .view-prefs .vp-label { font-size: .9rem; opacity: 1; }
.admin-brand-text span, .adm-badge { font-size: .875rem; }
.badge { font-size: .875rem; }
/* 목록 줄 끝 단추들이 표 밖으로 밀리지 않게(후기의 「원본」이 PC 에서도 화면 밖이었다) */
.row-acts { white-space: normal; min-width: 7rem; }
.row-acts > * { margin: 2px 4px 2px 0; }

/* ── 외부 자료 확인 목록 ── */
.inbox-lead { margin: 0 0 1rem; line-height: 1.8; }
.inbox-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.inbox-item { display: grid; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--brand-line); border-radius: var(--radius-md); background: var(--brand-bg); color: inherit; }
.inbox-item:hover { text-decoration: none; border-color: var(--brand-primary-deep); }
.inbox-top { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: 1.05rem; }
.inbox-detail h2 { font-size: 1.25rem; margin: 0 0 .25rem; }
.inbox-acts { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.help-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
.help-table th, .help-table td { border: 1px solid var(--brand-line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.inbox-detail th, .inbox-detail td { white-space: nowrap; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
/* 폰 머리의 「글씨 크게」 한 단추 (PC 는 메뉴줄에 세 단추가 이미 있다) */
.font-cycle { display: none; }
@media (max-width: 767px) {
  .font-cycle { display: inline-flex; align-items: center; gap: .3rem; margin-left: auto; margin-right: .5rem;
    min-height: var(--touch-min); padding: 0 .75rem; border: 2px solid var(--brand-primary-deep); border-radius: 22px;
    background: var(--brand-bg); color: var(--brand-primary-deep); font-weight: 800; font-size: .95rem; cursor: pointer; white-space: nowrap; }
  .font-cycle b { font-size: 1.15rem; }
}
/* ── 손가락 크기(44px) 마무리 — 폰에서 재어 남은 것 (2026-10-06) ── */
.rv-act, .rv-src, .breadcrumb a, .footer-admin, .footer-bottom a { display: inline-flex; align-items: center; min-height: var(--touch-min); }
.rv-act { padding-left: .9rem; padding-right: .9rem; }
.site-logo { min-height: var(--touch-min); min-width: var(--touch-min); }
.footer-bottom a { color: rgba(255,255,255,.8); }                  /* 어두운 바탕 위 0.45 는 흐렸다 */
.notice-bar { min-height: var(--touch-min); display: flex; align-items: center; justify-content: center; }
input[type="checkbox"], input[type="radio"] { width: 1.4rem; height: 1.4rem; accent-color: var(--brand-primary-deep); }
.site-footer a[href^="tel:"] { display: inline-flex; align-items: center; min-height: var(--touch-min); }
/* ★어두운 화면에서 발밑이 통째로 안 보였다.★ 바탕을 글씨색(--brand-ink)으로 칠했는데, 어두운 화면에서는
   그 색이 밝은 회색으로 뒤집혀 흰 글씨가 밝은 바탕에 묻혔다. 발밑은 어느 화면에서나 짙은 색으로 고정한다. */
.site-footer { background: #1F2A33; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .site-footer { background: #0B1116; border-top: 1px solid #26313B; } }
html[data-theme="dark"] .site-footer { background: #0B1116; border-top: 1px solid #26313B; }


/* ══════════════════════════════════════════════════════════════════
   Joy's Diary 토큰 — <body data-site="diary"> (공개 /diary/ 아래)
   아기자기한 파스텔이되 단순·통일: 분홍 하나를 주색으로, 민트·라벤더·버터는 작은 칠에만.
   컴포넌트 CSS 는 먹고또먹고와 같은 것을 쓴다 — 여기서는 토큰만 덮는다.
   글자색 대비: --brand-ink #3B3346 / 바탕 #FFFBF7 약 12:1, --brand-primary-deep #7A4E86 / 흰 바탕 약 7:1.
   ══════════════════════════════════════════════════════════════════ */
body[data-site="diary"] {
  --diary-pink:     #F7B9C8;   /* 주색 · 볼터치 분홍 */
  --diary-plum:     #7A4E86;   /* 진한 색 · 자두(글씨·단추 바탕) */
  --diary-mint:     #BFE6D6;   /* 작은 칠 · 민트 */
  --diary-lavender: #DCD3F2;   /* 작은 칠 · 라벤더 */
  --diary-butter:   #FFEAA6;   /* 작은 칠 · 버터(먹고또먹고 노랑의 옅은 사촌 — 두 사이트를 잇는 색) */
  --diary-paper:    #FFFBF7;   /* 종이 */
  --diary-sky:      #CFE6F8;   /* 감정 스티커 · 하늘(슬픔·토닥토닥) — 글자는 --diary-ink */
  --diary-apricot:  #F9D3C4;   /* 감정 스티커 · 살구(고마움·화남) — 글자는 --diary-ink */
  --diary-ink:      #3B3346;

  --brand-primary:      var(--diary-pink);
  --brand-primary-deep: var(--diary-plum);
  --on-primary:         var(--diary-ink);
  --on-primary-deep:    #FFFFFF;
  --brand-accent:       #F08AA5;
  --brand-bg:           #FFFFFF;
  --brand-bg-soft:      #FFF1F4;
  --brand-page:         var(--diary-paper);
  --brand-ink:          var(--diary-ink);
  --brand-ink-soft:     #6B6177;
  --brand-line:         #F1E0E7;
  --brand-warn:         #B4546E;
  --brand-ok:           #4E9C82;
  --brand-tint:         rgba(247,185,200,.26);
  --brand-focus:        rgba(122,78,134,.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body[data-site="diary"] {
    --brand-primary-deep: var(--diary-pink); --on-primary-deep: var(--diary-ink);
    --brand-bg: #1E1A24; --brand-bg-soft: #26202E; --brand-page: #17131C;
    --brand-ink: #F1EAF4; --brand-ink-soft: #BDB1C6; --brand-line: #3A3144;
    --brand-tint: rgba(247,185,200,.16); --brand-focus: rgba(247,185,200,.3);
  }
}
html[data-theme="dark"] body[data-site="diary"] {
  --brand-primary-deep: var(--diary-pink); --on-primary-deep: var(--diary-ink);
  --brand-bg: #1E1A24; --brand-bg-soft: #26202E; --brand-page: #17131C;
  --brand-ink: #F1EAF4; --brand-ink-soft: #BDB1C6; --brand-line: #3A3144;
  --brand-tint: rgba(247,185,200,.16); --brand-focus: rgba(247,185,200,.3);
}

/* ── 두 사이트 오가기 단추 (머리 한 곳, main.js renderHeader) ───────────── */
.site-switch {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--touch-min, 44px); padding: 0 14px; margin-left: auto; margin-right: var(--sp-2);
  border-radius: var(--radius-pill); border: 2px solid var(--brand-primary);
  background: var(--brand-tint); color: var(--brand-ink);
  font-size: var(--font-size-small); font-weight: 700; white-space: nowrap; text-decoration: none;
}
.site-switch:hover, .site-switch:focus-visible { background: var(--brand-primary); color: var(--on-primary); text-decoration: none; }
.site-switch .site-switch-icon { font-size: 1.1em; line-height: 1; }
.site-switch + .font-cycle { margin-left: 0; }
.site-nav a, .site-logo span, .site-nav .view-prefs button, .site-nav .view-prefs .vp-label { white-space: nowrap; }
.site-header .container { gap: var(--sp-2); }
@media (max-width: 1400px) { .site-switch .site-switch-long { display: none; } }
/* 폰(≤480px): 머리에 로고·오가기·글씨·메뉴 네 개가 한 줄에 들어가야 한다 — 글씨 단추는 「가」만 남긴다(뜻은 aria-label) */
@media (max-width: 480px) {
  .site-switch { padding: 0 10px; font-size: .875rem; gap: 4px; }
  .site-switch + .font-cycle span { display: none; }
  .site-switch + .font-cycle { padding: 0 .6rem; }
}

/* ── 엔진 화면(<be-*>·<ci-collector>) 디자인 값 → 앱 토큰 ───────────────────
   요소 자신에 둔다: --brand-* 는 body(사이트)마다 다르므로, :root 에서 계산해 버리면 다이어리에서 안 바뀐다.
   표는 vendor/engines/block-elements/README.md 4절. 엔진 화면이 앱과 달라 보이면 여기만 고친다. */
be-workspace, be-page, be-database, be-view, be-shared, be-form, ci-collector {
  --be-font: var(--font-sans);
  --be-font-size: 1rem;
  --be-fg: var(--brand-ink);
  --be-fg-muted: var(--brand-ink-soft);
  --be-bg: var(--brand-bg);
  --be-surface: var(--brand-bg);
  --be-side: var(--brand-bg-soft);
  --be-hover: var(--brand-tint);
  --be-border: var(--brand-line);
  --be-accent: var(--brand-primary-deep);
  --be-accent-bg: var(--brand-tint);
  --be-accent-fg: var(--on-primary-deep);
  --be-danger: var(--color-danger);
  --be-radius: var(--radius-sm);
  display: block;
}
be-workspace { --be-height: calc(100vh - 140px); min-height: 520px; }
.engine-slot { background: var(--brand-bg); border: 1px solid var(--brand-line); border-radius: var(--radius-md); padding: var(--sp-4); }
.engine-slot[data-state="error"] { border-color: var(--color-danger); }
.engine-note { color: var(--brand-ink-soft); font-size: var(--font-size-small); margin: 0 0 var(--sp-3); }

/* ── 유튜브 썸네일 카드(yt-preview.js · 2026-10-12) ─────────────────────────
   썸네일은 i.ytimg.com 공식 그림, 재생은 누를 때만 youtube-nocookie. 엔진 클래스(bu-bookmark·bu-cell-link·bu-gallery-card)는 읽기만 하고
   그림은 ::before 로 그린다(엔진 React 가 관리하는 자리에 노드를 끼워 넣지 않는다). 영상 위 덮개 색만 아래 토큰 두 개. */
:root { --yt-scrim: rgba(0,0,0,.55); --yt-on-scrim: #FFFFFF; }
.yt-card { display: flex; flex-direction: column; max-width: 480px; border: 1px solid var(--brand-line); border-radius: var(--radius-md); overflow: hidden; background: var(--brand-bg); color: var(--brand-ink); text-decoration: none; }
.yt-card:hover, .yt-card:focus-visible { border-color: var(--brand-primary-deep); }
.yt-card-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--brand-bg-soft); overflow: hidden; }
.yt-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; min-width: 44px; border-radius: 50%; background: var(--yt-scrim); color: var(--yt-on-scrim); display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.yt-badge { position: absolute; right: 8px; top: 8px; background: var(--yt-scrim); color: var(--yt-on-scrim); border-radius: 999px; padding: 2px 10px; font-size: var(--font-size-small); }
.yt-card-text { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); }
.yt-card-text strong { font-size: 1rem; line-height: 1.4; }
.yt-card-text span { color: var(--brand-ink-soft); font-size: var(--font-size-small); }
.yt-card-text .yt-card-hint { font-size: var(--font-size-small); }
.yt-card-wrap { margin: var(--sp-3) 0; }
.yt-frame { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; background: var(--brand-bg-soft); border-radius: var(--radius-md); overflow: hidden; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-modal { width: min(92vw, 880px); padding: 0; border: 0; border-radius: var(--radius-md); background: var(--brand-bg); }
.yt-modal::backdrop { background: var(--yt-scrim); }
.yt-modal-head { display: flex; justify-content: flex-end; padding: var(--sp-2); }
.yt-modal .yt-frame { max-width: none; border-radius: 0; }
/* 엔진 본문의 웹 북마크(유튜브) → 노션처럼 썸네일 카드 */
a.bu-bookmark[data-yt-kind="bm"] { display: block; max-width: 480px; }
a.bu-bookmark[data-yt-kind="bm"]::before { content: "▶"; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; margin-bottom: var(--sp-2); border-radius: var(--radius-sm); background: var(--yt-thumb) center / cover no-repeat, var(--brand-bg-soft); color: var(--yt-on-scrim); font-size: 28px; text-shadow: 0 0 12px var(--yt-scrim); }
/* 장부 url 칸 → 글자 앞 작은 썸네일 */
a[data-yt-kind="cell"]::before, a[data-yt-kind="inline"]::before { content: ""; display: inline-block; width: 64px; height: 36px; margin-right: 6px; vertical-align: middle; border-radius: 4px; background: var(--yt-thumb) center / cover no-repeat, var(--brand-bg-soft); }
/* 갤러리 보기 표지 → 썸네일 */
.bu-gallery-card[data-yt-kind="gallery"] .bu-gallery-cover { background: var(--yt-thumb) center / cover no-repeat, var(--brand-bg-soft); color: transparent; cursor: pointer; }
