:root {
  --primary: #f97316;       /* 따뜻한 오렌지 */
  --primary-hover: #ea580c;
  --primary-light: #ffedd5;
  --secondary: #0ea5e9;     /* 산뜻한 스카이블루 */
  --accent: #f59e0b;        /* 앰버 골드 */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Nav */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.brand span.sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--border);
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 4px;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
}

.nav-btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.nav-btn:hover:not(.active) {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
}

/* Main Container */
main.container {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ================= 룰렛 페이지 (오늘점심은!?) ================= */
.roulette-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .roulette-layout {
    grid-template-columns: 1fr;
  }
}

/* 필터 패널 */
.panel-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-card,
.toggle-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.checkbox-card:hover,
.toggle-card:hover {
  background: #f1f5f9;
}

.toggle-card.active,
.toggle-card:has(input:checked) {
  border-color: var(--primary);
  background: #fff7ed;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.toggle-card.active .label-main,
.toggle-card:has(input:checked) .label-main {
  color: var(--primary-hover);
}

.checkbox-card input[type="checkbox"],
.toggle-card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-card .label-box,
.toggle-card .label-box {
  flex: 1;
}

.checkbox-card .label-main,
.toggle-card .label-main {
  font-size: 0.95rem;
  font-weight: 600;
  display: block;
}

.checkbox-card .label-sub,
.toggle-card .label-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.checkbox-card .badge-count,
.toggle-card .badge-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

.toggle-card.active .badge-count,
.toggle-card:has(input:checked) .badge-count {
  background: var(--primary);
  color: white;
}

/* 슬라이더 바 그룹 스타일 */
.toggle-card-group {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  overflow: hidden;
}

.toggle-card-group .toggle-card {
  border: none;
  background: transparent;
  margin-bottom: 0;
  border-radius: 0;
}

.toggle-card-group:has(input:checked) {
  border-color: var(--primary);
  background: #fff7ed;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.slider-control-box {
  padding: 0.5rem 1rem 0.85rem;
  border-top: 1px dashed #fed7aa;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.slider-title {
  color: var(--text-muted);
  font-weight: 600;
}

.slider-val-badge {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.custom-range-slider {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #e2e8f0;
  outline: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

/* 태그 제외 토글 칩 컨테이너 */
.tag-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-exclude-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.tag-exclude-chip:hover {
  background: #e2e8f0;
}

.tag-exclude-chip.excluded {
  background: var(--danger-light);
  border-color: #fca5a5;
  color: var(--danger);
  text-decoration: line-through;
}

.tag-exclude-chip .tag-icon {
  font-size: 0.95rem;
}

.summary-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-box.warn {
  background: #fef2f2;
  border-color: #fecaca;
}

.summary-box .count-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--success);
}

.summary-box.warn .count-num {
  color: var(--danger);
}

/* 룰렛 캔버스 영역 */
.roulette-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.roulette-header-tip {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-align: center;
}

.canvas-wrapper {
  position: relative;
  width: min(480px, 90vw);
  height: min(480px, 90vw);
  margin: 1rem auto;
}

#rouletteCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: block;
}

/* 룰렛 핀 (포인터 인디케이터) */
.roulette-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 44px;
  z-index: 10;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  transition: transform 0.05s ease;
  pointer-events: none;
}

.roulette-pointer svg {
  width: 100%;
  height: 100%;
}

.roulette-pointer.bounce {
  transform: translateX(-50%) scale(1.15) rotate(5deg);
}

/* 중앙 SPIN 버튼 */
.center-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, #f97316 0%, #ea580c 100%);
  border: 5px solid #ffffff;
  color: white;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.4), inset 0 2px 4px rgba(255,255,255,0.4);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}

.center-spin-btn:hover {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.6);
}

.center-spin-btn:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.center-spin-btn:disabled {
  background: #94a3b8;
  border-color: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  transform: translate(-50%, -50%) !important;
}

.spin-subtext {
  font-size: 0.6rem;
  opacity: 0.9;
  letter-spacing: 0.05em;
}

/* 하단 큰 돌리기 버튼 (모바일 편의성) */
.big-spin-action {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45);
}

.btn-primary:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* ================= 음식점 데이터 페이지 ================= */
.data-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-filter-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 600px;
}

.search-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: white;
  outline: none;
  transition: border 0.15s;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.tag-filter-select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: white;
  outline: none;
  cursor: pointer;
}

/* 음식점 그리드 */
.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.restaurant-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  width: 100%;
  height: 180px;
  background: #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-placeholder {
  font-size: 3.5rem;
  opacity: 0.6;
}

.card-last-visit-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.badge-tag {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-menu {
  font-size: 0.9rem;
  color: #334155;
  background: #f8fafc;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.card-memo {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.btn-card-action {
  flex: 1;
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-card-action:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.btn-card-action.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #fca5a5;
}

/* ================= 모달 팝업 공통 ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: white;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* 당첨 연출 모달 특화 */
.winner-modal-body {
  text-align: center;
  padding: 2.2rem 2rem 2rem;
}

.winner-crown {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  animation: bounceHead 1s infinite alternate;
}

@keyframes bounceHead {
  from { transform: translateY(0) rotate(-4deg); }
  to { transform: translateY(-8px) rotate(4deg); }
}

.winner-tagline {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.winner-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.winner-img-wrap {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.winner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-details {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.winner-details-row {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.winner-details-row:last-child {
  margin-bottom: 0;
}

.winner-details-label {
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.winner-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* 폼 스타일 */
.modal-form-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-form-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-form-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.15s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.quick-tag-btn {
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  cursor: pointer;
  color: #475569;
  font-weight: 600;
}

.quick-tag-btn:hover {
  background: #e2e8f0;
}

/* 이미지 업로드 영역 */
.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}

.upload-dropzone:hover,
.upload-dropzone:focus,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: #fff7ed;
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.upload-preview {
  max-height: 140px;
  border-radius: 8px;
  margin-top: 0.5rem;
  display: none;
}

.modal-form-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
}

/* 토스트 메시지 */
#toastContainer {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

/* 방문 기록 섹션 */
.visits-list {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.visit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.visit-item:last-child {
  border-bottom: none;
}

.visit-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.visit-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= 폼 전용 페이지 (추가/수정 화면 전환) ================= */
.form-page-container {
  max-width: 680px;
  margin: 0 auto;
}

.form-page-header {
  margin-bottom: 1.5rem;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: all 0.15s;
}

.btn-back:hover {
  background: var(--primary-light);
}

.form-page-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.form-page-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.form-page-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ================= 상세 정보 보기 팝업 (수정 불가) ================= */
.detail-modal-card {
  max-width: 820px;
  width: 95vw;
  max-height: 92vh;
  border-radius: 20px;
  overflow-y: auto;
  background: white;
  box-shadow: var(--shadow-lg);
}

.detail-img-wrap {
  width: 100%;
  height: auto;
  min-height: 220px;
  max-height: 60vh;
  background: #0f172a; /* 메뉴판 텍스트가 잘 대비되는 다크 배경 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.detail-img {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  object-fit: contain !important; /* 이미지 절대 잘림 없이 전체 메뉴가 100% 표시 */
  display: block;
  transition: opacity 0.2s;
}

.detail-img:hover {
  opacity: 0.95;
}

.zoom-hint-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.detail-body-content {
  padding: 1.5rem;
}

.detail-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.detail-price-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.detail-info-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-info-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-info-text {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.45;
}

.detail-actions-footer {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-map-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: #03c75a;
  color: white;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.15s;
}

.btn-map-action:hover {
  background: #02b150;
  transform: translateY(-1px);
}

/* 이미지 전체화면 라이트박스 */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 1rem;
  animation: fadeInLightbox 0.15s ease;
}

@keyframes fadeInLightbox {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-overlay img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.lightbox-close-btn {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
