:root {
  --bg: #f4f8fc;
  --bg2: #e8f4ff;
  --panel: #ffffff;
  --ink: #1a2b3c;
  --muted: #5a6f82;
  --accent: #0d8bd9;
  --accent-deep: #0767a8;
  --warm: #ff8a3d;
  --warm-soft: #fff3e8;
  --green: #2e9e6a;
  --line: #d5e3ef;
  --shadow: 0 10px 30px rgba(26, 80, 120, 0.08);
  --radius: 16px;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 10% -5%, #c8e7ff 0%, transparent 55%),
    radial-gradient(700px 360px at 95% 8%, #ffe8d2 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(213, 227, 239, 0.9);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 12px; }
.logo {
  font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.02em;
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent-deep); }
.nav-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: .95rem; }
.nav-links a { color: var(--muted); font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--accent-deep); }

.hero {
  padding: 52px 0 28px;
  position: relative;
}
.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #123048;
}
.hero p { color: var(--muted); margin: 0 0 22px; max-width: 36em; font-size: 1.02rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; cursor: pointer;
  font: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #19a0ef, #0d7ec4);
  color: #fff;
  box-shadow: 0 8px 18px rgba(13, 139, 217, 0.28);
}
.btn-primary:hover { background: linear-gradient(135deg, #2aabf5, #0c74b8); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { border-color: #b7d3ea; color: var(--accent-deep); }

.grid-2 { display: grid; gap: 22px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.1fr .9fr; align-items: start; } }

.card {
  background: var(--panel);
  border: 1px solid rgba(213, 227, 239, 0.95);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 14px; font-size: 1.2rem; color: #123048; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
input, select, textarea {
  width: 100%; border-radius: 12px; border: 1px solid #c9dbea;
  background: #f8fbfe; color: var(--ink); padding: 11px 12px; font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(13, 139, 217, 0.25);
  border-color: #8ec8ef;
  background: #fff;
}
.row-2 { display: grid; gap: 10px; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  border: 1px solid #cfe3f5;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .85rem;
  color: var(--accent-deep);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(26, 80, 120, 0.04);
}

.section { padding: 20px 0 36px; }
.section h2 { margin: 0 0 8px; color: #123048; letter-spacing: -0.02em; }
.section .lead { color: var(--muted); margin: 0 0 18px; max-width: 48em; }
.section h3 { color: #234560; font-size: 1.05rem; }

.feature-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.feature strong { display: block; margin-bottom: 6px; color: #123048; }
.feature span { color: var(--muted); font-size: .9rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.7));
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: .9rem;
  margin-top: 12px;
}
.note { font-size: .82rem; color: var(--muted); margin-top: 10px; }

.toast {
  display: none; margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #e8f7ee; border: 1px solid #8fd0a8; color: #1b5e3a; font-size: .9rem;
}
.toast.show { display: block; }
.toast.error { background: #fdecea; border-color: #f0b4ae; color: #8a2b22; }

/* 차량·갤러리 카드 */
.media-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.media-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.media-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(26, 80, 120, 0.12);
}
.media-thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, #dff1ff, #fff4e8); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-body { padding: 14px 16px 16px; }
.media-body strong { display: block; margin-bottom: 4px; color: #123048; }
.media-body .meta { color: var(--accent); font-size: .85rem; font-weight: 700; }
.media-body p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }

.info-list { margin: 0; padding-left: 1.15em; color: var(--muted); }
.info-list li { margin: 6px 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 120px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 1.15rem; color: #123048; }
.stat span { font-size: .8rem; color: var(--muted); }
.source-note { font-size: .78rem; color: var(--muted); margin-top: 12px; }

/* 스팸 미끼 칸 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 관리자 견적 목록 */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chip-btn { background: #fff; cursor: pointer; font: inherit; font-size: .85rem; }
.chip-on { border-color: var(--accent); color: var(--accent-deep); background: #eaf6ff; }
.warn-banner {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: .88rem;
  background: var(--warm-soft); border: 1px solid #ffd0a8; color: #8a4b12;
}
.warn-banner code { background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 5px; }
.quote-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px;
  box-shadow: var(--shadow);
}
.quote-card > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 14px 16px; cursor: pointer; font-size: .92rem; list-style: none;
}
.quote-card > summary::-webkit-details-marker { display: none; }
.quote-card > summary::before { content: "▸"; color: var(--muted); }
.quote-card[open] > summary::before { content: "▾"; }
.quote-card[open] > summary { border-bottom: 1px solid var(--line); }
.q-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.q-route { font-weight: 700; color: #123048; }
.q-people, .q-phone { color: var(--muted); }
.badge { margin-left: auto; border-radius: 999px; padding: 3px 10px; font-size: .8rem; border: 1px solid var(--line); }
.badge-new { background: #eaf6ff; border-color: #9fd0f5; color: #0767a8; }
.badge-consulting { background: var(--warm-soft); border-color: #ffd0a8; color: #a85a12; }
.badge-contracted { background: #e8f7ee; border-color: #8fd0a8; color: #1b5e3a; }
.badge-canceled { background: #f3f4f6; border-color: #d1d5db; color: #6b7280; }
.quote-body { padding: 14px 16px 16px; }
.quote-grid { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; }
.quote-grid dt { font-size: .78rem; color: var(--muted); margin: 0; }
.quote-grid dd { margin: 2px 0 0; font-weight: 600; }
.quote-memo { background: #f8fbfe; border-radius: 10px; padding: 10px 12px; color: var(--muted); }
.quote-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.admin-memo { width: 100%; margin-top: 8px; }
.gallery-links {
  margin-top: 12px; padding: 12px; border-radius: 12px;
  background: #eef8ff; border: 1px solid #c5e4fa;
}
.gallery-links label { margin-top: 8px; }
.gallery-links input { font-size: .82rem; }
.gl-row { display: flex; gap: 8px; align-items: center; }
.gl-row input { flex: 1 1 auto; min-width: 0; }
.gl-row .gl-copy { flex: 0 0 auto; padding: 8px 12px; font-size: .82rem; white-space: nowrap; }

/* ---------------------------------------------- 관리자 CMS (메뉴·페이지·공지) */
.tab-bar { margin-bottom: 16px; }

.form-row { display: grid; gap: 12px; }
@media (min-width: 720px) { .form-row { grid-template-columns: 1fr 1fr; } }

.check-line {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: .9rem; color: var(--ink);
}
.check-line input { width: auto; margin: 0; }

.menu-row {
  display: grid; gap: 8px; align-items: center;
  grid-template-columns: auto 1fr; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
}
@media (min-width: 900px) {
  .menu-row { grid-template-columns: auto 1.1fr 1.6fr auto auto auto; }
  .menu-row .check-line { margin-top: 0; }
}
.menu-row input[type="text"], .menu-row input:not([type]) { margin: 0; }
.menu-move { display: flex; gap: 4px; }
.menu-move .btn { padding: 6px 9px; line-height: 1; }
.menu-row .btn { padding: 8px 12px; font-size: .85rem; }

.editor-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.editor-tools button {
  padding: 6px 10px; font-size: .82rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.editor-tools button:hover { border-color: var(--accent); color: var(--accent-deep); }

#pe-body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }

.editor-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.preview-box {
  margin-top: 14px; padding: 16px; border-radius: 12px;
  background: #f7fbff; border: 1px dashed #9fd0f5;
}

/* ---------------------------------------------- 공개 페이지·공지 */
.page-body h3 { margin: 22px 0 8px; font-size: 1.02rem; color: #123048; }
.page-body p { margin: 0 0 10px; }
.page-body ul { margin: 0 0 12px; padding-left: 20px; }
.page-body li { margin-bottom: 4px; }

.notice-list { margin-top: 14px; }
.notice-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; overflow: hidden;
}
.notice-item > summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.notice-item > summary::-webkit-details-marker { display: none; }
.notice-item > summary .meta { margin-left: auto; color: var(--muted); font-size: .84rem; }
.notice-item[open] > summary { border-bottom: 1px solid var(--line); }
.notice-body { padding: 14px 16px; }
.nav-links a.on { color: var(--accent-deep); }

/* ---------------------------------------------- 연락 블록 */
.contact-grid {
  display: grid; gap: 14px; margin-top: 6px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.contact-card {
  display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.contact-card:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(26, 80, 120, 0.12); border-color: #b7d3ea;
}
.contact-icon { font-size: 1.4rem; line-height: 1; }
.contact-card strong { font-size: 1.06rem; color: #123048; }
.contact-card span:not(.contact-icon) { color: var(--muted); font-size: .88rem; }
.contact-soon { opacity: .72; border-style: dashed; }

.footer-links { margin-top: 10px; }
.footer-links a { color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--accent-deep); }
