/* PlanB Media Kit — styles
 * 베이스: DESIGN.md (Airbnb 화이트 + 14px 라운드) + Instagram 그라데이션 액센트
 * 모바일 우선: 480 (baseline) → 768 → 1024
 */

:root {
  /* Colors */
  --canvas: #ffffff;
  --surface-soft: #f7f7f7;
  --surface-strong: #f2f2f2;
  --ink: #222222;
  --body: #3f3f3f;
  --muted: #6a6a6a;
  --muted-soft: #929292;
  --hairline: #ebebeb;
  --hairline-strong: #dddddd;
  --primary: #e1306c;
  --primary-active: #c1275a;
  --primary-soft: #fce4ec;
  --gradient-brand: linear-gradient(135deg, #833ab4 0%, #fd1d1d 55%, #fcb045 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(131,58,180,0.08), rgba(253,29,29,0.06), rgba(252,176,69,0.10));
  --scrim: rgba(17, 24, 39, 0.55);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 4px 8px rgba(0,0,0,0.06), 0 12px 24px rgba(0,0,0,0.10);
  --shadow-modal: 0 20px 50px rgba(0,0,0,0.18);

  /* Layout */
  --container-max: 1080px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { padding: 0; margin: 0; list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 20px;
}

/* ─── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--gradient-brand);
  color: #ffffff;
  padding: 64px 20px 48px;
  text-align: center;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin: 0 0 12px;
  color: #ffffff;
}
.hero-subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 32px;
  color: rgba(255,255,255,0.92);
}
.hero-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background-color: rgba(255,255,255,0.15);
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.hero-cover.empty::after {
  content: '커버 이미지';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* ─── Intro Callout ─────────────────────────────────── */
.intro-section { padding-top: 32px; padding-bottom: 16px; }
.intro-callout {
  background: var(--gradient-brand-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.intro-bullets li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 15px;
  color: var(--body);
  line-height: 1.6;
}
.intro-bullets li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

/* ─── Section / Cards ───────────────────────────────── */
.section-block {
  padding-top: 40px;
  padding-bottom: 8px;
}
.section-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
  color: var(--ink);
}
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms ease;
  position: relative;
}
.card-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--surface-strong);
  background-size: cover;
  background-position: center;
  position: relative;
}
.card-photo.empty::after {
  content: '이미지';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-soft);
  font-size: 13px;
}
.card-body {
  padding: 18px 18px 20px;
}
.card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--ink);
}
.card-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  margin: 0;
  color: var(--muted);
  white-space: pre-line;  /* 원본 description 의 \n 줄바꿈 유지 */
}

/* ─── Contact ───────────────────────────────────────── */
.contact-section { padding-top: 32px; padding-bottom: 32px; }
.contact-card {
  background: var(--surface-soft);
  border-radius: var(--r-md);
  padding: 24px 22px 28px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}
.contact-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
}
.contact-row:first-child { border-top: none; }
.contact-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.contact-value {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  word-break: break-word;
}

/* ─── Footer ────────────────────────────────────────── */
.site-footer {
  padding: 32px 20px 56px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.footer-copy {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}
.admin-trigger-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.admin-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  color: var(--muted-soft);
  transition: color 150ms ease, background-color 150ms ease;
}
.admin-trigger:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

/* ─── 어드민 편집 모드 ──────────────────────────────── */
body.edit-mode [data-edit],
body.edit-mode [data-edit-list] li {
  outline: 1px dashed transparent;
  outline-offset: 4px;
  border-radius: 4px;
  transition: outline-color 150ms ease, background-color 150ms ease;
}
body.edit-mode [data-edit]:hover,
body.edit-mode [data-edit-list] li:hover {
  outline-color: var(--primary);
  background: rgba(225, 48, 108, 0.04);
}
body.edit-mode [contenteditable="true"]:focus {
  outline: 1.5px solid var(--primary);
  background: var(--canvas);
}
body.edit-mode .image-edit-btn {
  display: inline-flex;
}
.image-edit-btn {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 2;
}
.image-edit-btn:hover { background: #ffffff; }

.edit-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  z-index: 3;
}

/* item add/remove buttons (편집 모드에서만) */
.item-controls {
  display: none;
  gap: 8px;
  margin-top: 8px;
}
body.edit-mode .item-controls { display: flex; }
.item-controls button {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--canvas);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
}
.item-controls button.danger { color: var(--primary); border-color: var(--primary-soft); }
.section-controls {
  display: none;
  margin-top: 12px;
}
body.edit-mode .section-controls { display: flex; }
.section-controls button {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: var(--canvas);
  border: 1px dashed var(--hairline-strong);
  color: var(--muted);
}

/* ─── Floating Save Bar — 우측 하단 (footer 점3개 admin-trigger 와 충돌 회피) ── */
.save-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  background: var(--canvas);
  border-radius: var(--r-full);
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow-modal);
  z-index: 100;
  align-items: center;
}
/* 모바일 좁은 화면에선 좌우 가장자리에 붙이지 않고 약간 여백 */
@media (max-width: 480px) {
  .save-bar {
    right: 12px;
    bottom: 12px;
    padding: 6px 6px 6px 14px;
  }
  .save-bar::before { font-size: 12px; margin-right: 4px; }
}
.save-bar::before {
  content: '편집 중';
  font-size: 13px;
  color: var(--muted);
  margin-right: 6px;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  border-radius: var(--r-full);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.30);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-full);
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ─── Modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal-panel {
  background: var(--canvas);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-modal);
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}
.modal-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-form label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.modal-form input[type="text"],
.modal-form input[type="password"] {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 150ms ease;
}
.modal-form input:focus {
  outline: none;
  border-color: var(--primary);
}
.modal-error {
  font-size: 13px;
  color: var(--primary);
  min-height: 18px;
  margin-top: 4px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.modal-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.modal-menu-list button {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  transition: background 120ms ease;
}
.modal-menu-list button:hover { background: var(--surface-strong); }
.modal-menu-list button.danger { color: var(--primary); }

/* ─── Loading / Empty ───────────────────────────────── */
.loading-state {
  text-align: center;
  padding: 96px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ─── Responsive ────────────────────────────────────── */
@media (min-width: 768px) {
  .container { padding: 64px 32px; }
  .hero { padding: 96px 32px 64px; }
  .hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 17px; margin-bottom: 40px; }
  .section-title { font-size: 28px; margin-bottom: 24px; }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .contact-row {
    grid-template-columns: 96px 1fr;
  }
}

@media (min-width: 1024px) {
  .container { padding: 80px 48px; }
  .hero { padding: 112px 48px 80px; }
  .hero-title { font-size: 44px; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
  }
}
