/* =========================================================================
   올바른 경영솔루션 — 관리자 설정 테마 (theme.css)
   - <html data-accent="..."> : 포인트색 프리셋 (gold = 기본, site.css 값 그대로)
   - <html data-pattern="..."> : 아이보리 섹션 · 아이보리 카드 배경 패턴
   - 관리자 사진 주입용 보조 스타일 (사진 자리 → 실제 사진)
   대비(WCAG): 다크 배경(#0a1e42) 위 300 · 흰 배경 위 600 · 아이보리 위 700 · 400 버튼 위 남색 글자
              모든 프리셋 4.5:1 이상 (blue 8.35/6.22/8.05/6.71 · emerald 8.39/5.84/7.48/6.77 · burgundy 7.41/6.78/8.54/5.94)
   ========================================================================= */

/* ---------- 1. 포인트색 프리셋 ---------- */
html[data-accent="blue"] {
  --accent-50: #eef5ff; --accent-100: #d9e8ff; --accent-200: #b8d4fb; --accent-300: #8ebcf5;
  --accent-400: #5e9be8; --accent-500: #3a7bd0; --accent-600: #2560b0; --accent-700: #1b4a8a;
  --accent-rgb: 58, 123, 208; --accent-rgb-400: 94, 155, 232; --accent-rgb-300: 142, 188, 245; --accent-glow: #f2f8ff;
}
html[data-accent="emerald"] {
  --accent-50: #ecf8f3; --accent-100: #d2efe3; --accent-200: #a8dec8; --accent-300: #78c9a8;
  --accent-400: #43ab84; --accent-500: #2a8c68; --accent-600: #1f7254; --accent-700: #175a42;
  --accent-rgb: 42, 140, 104; --accent-rgb-400: 67, 171, 132; --accent-rgb-300: 120, 201, 168; --accent-glow: #effcf6;
}
html[data-accent="burgundy"] {
  --accent-50: #fbf0f2; --accent-100: #f5dbe0; --accent-200: #ebb9c3; --accent-300: #e39aa9;
  --accent-400: #d27286; --accent-500: #b54d63; --accent-600: #9a3a50; --accent-700: #7a2c3e;
  --accent-rgb: 181, 77, 99; --accent-rgb-400: 210, 114, 134; --accent-rgb-300: 227, 154, 169; --accent-glow: #fff3f5;
}
/* site.css 에 금색 rgba 로 박힌 곳을 프리셋 색으로 */
html[data-accent]:not([data-accent="gold"]) .form-input:focus,
html[data-accent]:not([data-accent="gold"]) .calc__field:focus-within { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22); }
html[data-accent]:not([data-accent="gold"]) .radio-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .35); }
html[data-accent]:not([data-accent="gold"]) .total-box--policy { border-color: rgba(var(--accent-rgb-400), .55); background: rgba(var(--accent-rgb-400), .1); }
html[data-accent]:not([data-accent="gold"]) .hero .eyebrow {
  background-image: linear-gradient(100deg, var(--accent-400) 0%, var(--accent-400) 38%, var(--accent-glow) 50%, var(--accent-400) 62%, var(--accent-400) 100%);
}
html[data-accent]:not([data-accent="gold"]) .ba-stage__line { box-shadow: 0 0 18px 4px rgba(var(--accent-rgb-300), .65); }
html[data-accent]:not([data-accent="gold"]) .ba-concept__to em { background: linear-gradient(transparent 62%, rgba(var(--accent-rgb-400), .35) 62%); }

/* ---------- 2. 배경 패턴 (아이보리 섹션 · 아이보리 카드, 글자 대비에 영향 없게 아주 옅게) ---------- */
html[data-pattern="dots"] :is(.tone-ivory, .why-points__item, .visit__info, .tone-white .cmp-card) {
  background-image: radial-gradient(rgba(10, 30, 66, .085) 1.2px, transparent 1.7px);
  background-size: 20px 20px;
}
html[data-pattern="grid"] :is(.tone-ivory, .why-points__item, .visit__info, .tone-white .cmp-card) {
  background-image: linear-gradient(rgba(10, 30, 66, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 30, 66, .05) 1px, transparent 1px);
  background-size: 32px 32px;
}
html[data-pattern="diagonal"] :is(.tone-ivory, .why-points__item, .visit__info, .tone-white .cmp-card) {
  background-image: repeating-linear-gradient(135deg, rgba(10, 30, 66, .04) 0 1px, transparent 1px 14px);
}
html[data-pattern="waves"] :is(.tone-ivory, .why-points__item, .visit__info, .tone-white .cmp-card) {
  background-image: radial-gradient(circle at 50% 100%, transparent 54%, rgba(10, 30, 66, .055) 55%, rgba(10, 30, 66, .055) 63%, transparent 64%);
  background-size: 36px 18px;
}

/* ---------- 3. 관리자 사진 · 문구 주입 보조 ---------- */
[data-cms-reveal][hidden] { display: none !important; }
.photo-slot.photo-slot--has-img { padding: 0; border-style: solid; border-color: transparent; background: var(--brand-50); }
.photo-slot.photo-slot--has-img::before { display: none; }
.photo-slot--has-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot--contain > img { object-fit: contain; background: #fff; }
.hero__title[data-cms-custom] > span,
.hero__title[data-cms-custom] .hero__title-ghost > span,
.hero__title[data-cms-custom] .hero__title-stage > span { white-space: normal; overflow-wrap: anywhere; }
.site-footer__sns { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-footer__sns a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__sns a:hover { color: var(--accent-300); }
.site-footer__note { white-space: normal; }
.cms-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; font-size: 16px; color: var(--muted); }
