@import url('../fonts/pretendard/pretendard.min.css');
@import url('../fonts/nanum-gothic/nanum-gothic.css');

:root {
  --electric-blue: #3E6AE1;
  --brand-pink: #ED008C;
  --carbon-dark: #171A20;
  --graphite: #393C41;
  --pewter: #5C5E62;
  --silver-fog: #8E8E8E;
  --light-ash: #F4F4F4;
  --cloud-gray: #EEEEEE;
  --pale-silver: #D0D1D2;
  --transition: 0.33s cubic-bezier(0.5, 0, 0, 0.75);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #fff;
  color: var(--carbon-dark);
  -webkit-font-smoothing: antialiased;
}

/* ── Buttons ─────────────────────────────────────── */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 160px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  border: 3px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow 0.25s;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--electric-blue);
  color: #fff;
}

.btn-primary:hover {
  background-color: #2e58cf;
}

button.btn-primary:disabled {
  background-color: var(--pewter);
  border-color: var(--pewter);
  color: #fff;
  opacity: 0.6;
  cursor: not-allowed;
}

button.btn-primary:not(:disabled) {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

button.btn-primary:not(:disabled):hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: #fff;
  color: var(--graphite);
}

.btn-secondary:hover {
  background-color: var(--light-ash);
}

/* ── Write button 1 (bordered, gradient fill, corner accent) ── */
.btn-write-1 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 100px;
  padding: 0 20px;
  border-radius: 20px;
  border: 2px solid #ED008C;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF3FA 55%, #FCDCEF 100%);
  color: var(--carbon-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-write-1::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  height: 42%;
  background-color: #FBD9EE; /* 테두리(#ED008C)와 어울리는 연한 핑크톤 — 기존 회색 대체 */
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.btn-write-1:hover {
  background: linear-gradient(135deg, #FFF3FA 0%, #FCDCEF 55%, #FAC7E4 100%);
}

/* ── Write button 2 (solid gradient fill, corner accent) ─────── */
.btn-write-2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 100px;
  padding: 0 20px;
  border-radius: 20px;
  border: 2px solid #ED008C;
  background: linear-gradient(135deg, #ED008C 0%, #B8006B 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, border-color 0.25s, transform 0.2s ease, box-shadow 0.25s;
}

.btn-write-2::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  height: 42%;
  background-color: #830050; /* 테두리/배경과 어울리는 진한 핑크톤 코너 액센트 */
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.25s;
}

.btn-write-2:hover {
  background: linear-gradient(135deg, #FF1C9E 0%, #D2007F 100%);
  border-color: #FF1C9E;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(237, 0, 140, 0.35);
}

.btn-write-2:hover::after {
  opacity: 0.75;
}

.btn-write-2:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(237, 0, 140, 0.3);
}

button.btn-write-2:disabled {
  background: var(--pewter);
  border-color: var(--pewter);
  color: #fff;
  opacity: 0.6;
  cursor: not-allowed;
}

button.btn-write-2:disabled::after {
  opacity: 0;
}

button.btn-write-2:disabled:hover {
  background: var(--pewter);
  border-color: var(--pewter);
  transform: none;
  box-shadow: none;
}

/* ── Write button 3 (glossy pill + arrow, 바로가기형) ───────
 * btn-write-2 와 같은 핑크 그라데이션/높이/라운드를 쓰고,
 * 상단 유광 하이라이트 + 하단 음영 + 오른쪽 화살표(→)를 더한 이동용 버튼.
 * 사용: <button type="button" class="btn-write-3">목록</button>
 *       (화살표는 CSS 로 자동 추가 — 마크업에 아이콘 불필요)
 */
.btn-write-3 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 40px;         /* 높이·테두리·라운드는 btn-write-2 와 동일 */
  min-width: 0;             /* 너비는 화면의 등록 버튼(btn-write-2 !min-w-0 px-5)과 맞춤: */
  padding: 0 12px;          /*  글자 + 화살표(12) + 간격(4)을 좌우 12px 여백 안에 배치 */
  border-radius: 20px;
  border: 2px solid #ED008C;
  background:
    /* 상단 유광(절반 지점에서 끊어 유리 느낌) */
    linear-gradient(to bottom,
      rgba(255, 255, 255, 0.38) 0%,
      rgba(255, 255, 255, 0.10) 48%,
      rgba(255, 255, 255, 0) 50%),
    linear-gradient(135deg, #ED008C 0%, #B8006B 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),   /* 윗테두리 반사광 */
    inset 0 -3px 6px rgba(131, 0, 80, 0.35);   /* 아래쪽 음영 (#830050 계열) */
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(100, 0, 60, 0.35);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s ease;
}

/* 오른쪽 화살표 (currentColor 로 칠해짐) */
.btn-write-3::after {
  content: '';
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.btn-write-3:hover {
  background:
    linear-gradient(to bottom,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.12) 48%,
      rgba(255, 255, 255, 0) 50%),
    linear-gradient(135deg, #FF1C9E 0%, #D2007F 100%);   /* btn-write-2:hover 와 동일 */
  border-color: #FF1C9E;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 6px rgba(131, 0, 80, 0.3),
    0 6px 16px rgba(237, 0, 140, 0.35);
}

.btn-write-3:hover::after {
  transform: translateX(2px);
}

.btn-write-3:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(131, 0, 80, 0.35),
    0 2px 8px rgba(237, 0, 140, 0.3);
}

.btn-write-3:focus-visible {
  outline: 2px solid #ED008C;
  outline-offset: 2px;
}

button.btn-write-3:disabled,
button.btn-write-3:disabled:hover {
  background: var(--pewter);
  border-color: var(--pewter);
  color: #fff;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

button.btn-write-3:disabled::after {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn-write-3,
  .btn-write-3::after { transition: none; }
  .btn-write-3:hover,
  .btn-write-3:hover::after { transform: none; }
}

/* ── Navigation ───────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: background-color var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}

#site-header.nav-transparent {
  background-color: transparent;
}

#site-header.nav-white { /* nav-black 를 nav-white 로 수정 해야 한다 4군데 */
  background-color: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  width: 500px;
  height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--carbon-dark);
  text-transform: uppercase;
}

#site-header.nav-transparent .nav-logo-text,
#site-header.nav-transparent .nav-link,
#site-header.nav-transparent .nav-icon-btn,
#site-header.nav-transparent .nav-user-name,
#site-header.nav-white .nav-logo-text,
#site-header.nav-white .nav-link,
#site-header.nav-white .nav-icon-btn,
#site-header.nav-white .nav-user-name {
  color: #fff;
}

/* 메뉴 가로 스크롤 영역
 * 폭이 부족하면 .nav-links 가 가로 스크롤되고, 양 끝에 ‹ › 버튼이 나타난다.
 * (스크롤바는 숨김 → 버튼 / 마우스 휠 / 터치 스와이프로 이동)
 * 주의: overflow-x:auto 이면 overflow-y 도 visible 이 될 수 없으므로
 *       드롭다운은 position:fixed 로 스크롤 영역 밖에 띄운다(아래 Dropdown 참고). */
.nav-links-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-scroll-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 40px;
  padding: 0 4px;
  border: 0;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.nav-scroll-btn.prev {
  left: 0;
  justify-content: flex-start;
  background: linear-gradient(to right, rgba(14, 14, 14, 0.95) 45%, rgba(14, 14, 14, 0));
}
.nav-scroll-btn.next {
  right: 0;
  justify-content: flex-end;
  background: linear-gradient(to left, rgba(14, 14, 14, 0.95) 45%, rgba(14, 14, 14, 0));
}
.nav-scroll-btn:focus-visible {
  outline: 2px solid var(--brand-pink);
  outline-offset: -2px;
}
.nav-links-wrap.can-prev .nav-scroll-btn.prev,
.nav-links-wrap.can-next .nav-scroll-btn.next {
  opacity: 1;
  pointer-events: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;   /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.nav-links::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.nav-links > li {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 16px;
  min-height: 32px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--carbon-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

#site-header.nav-transparent .nav-link:hover,
#site-header.nav-white .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ── Dropdown ─────────────────────────────────────── */
.nav-chevron {
  margin-left: 3px;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.has-dropdown.is-open .nav-chevron {
  transform: rotate(180deg);
}

/* 드롭다운은 스크롤 영역(.nav-links)에 잘리지 않도록 fixed 로 띄우고,
 * 좌표(left/top)는 header.jsp 의 스크립트가 1depth 메뉴 위치로 계산해 넣는다.
 * (#site-header 의 backdrop-filter 로 기준 박스가 header 가 되지만,
 *  header 가 화면 0,0 에 고정이므로 뷰포트 좌표와 동일) */
.nav-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(-50%) translateY(-6px);
  list-style: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 6px 0;
  min-width: 136px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 150;
}

/* 1depth와 dropdown 사이 8px 간격을 투명하게 이어 hover가 끊기지 않도록 */
.nav-dropdown::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.has-dropdown.is-open .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
  display: block;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--graphite);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.nav-dropdown li a:hover {
  background: var(--light-ash);
  color: var(--carbon-dark);
}

.nav-dropdown li a.nav-active {
  color: #ED008C;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 10px;
  gap: 4px;
  border-radius: 4px;
  color: var(--carbon-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition);
}

.nav-icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.nav-guest,
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--carbon-dark);
  white-space: nowrap;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--carbon-dark);
  border-radius: 2px;
  transition: transform 0.33s, opacity 0.33s, background-color var(--transition);
}

#site-header.nav-transparent .hamburger span,
#site-header.nav-white .hamburger span {
  background-color: #fff;
}

/* 모바일 상단 아이콘 영역 (아이콘 + 라벨 텍스트) */
.mobile-nav-icons {
  display: none;
  align-items: center;
  gap: 18px;
}

.mobile-nav-icon-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--carbon-dark);
  text-decoration: none;
  cursor: pointer;
}

.mobile-nav-icon-group a,
.mobile-nav-icon-group svg {
  color: inherit;
}

#site-header.nav-transparent .mobile-nav-icon-group,
#site-header.nav-white .mobile-nav-icon-group {
  color: #fff;
}

.mobile-nav-icon-group.is-active {
  color: var(--brand-pink);
}

.mobile-nav-icon-group .hamburger {
  padding: 0;
  height: auto;
}

.mobile-nav-icon-label {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

/* Mobile drawer */
.mobile-drawer {
  visibility: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 200;
  transform: translateX(110%);
  transition: transform 0.33s cubic-bezier(0.5, 0, 0, 0.75), visibility 0s linear 0.33s;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.33s cubic-bezier(0.5, 0, 0, 0.75), visibility 0s linear 0s;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.33s;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cloud-gray);
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--graphite);
}

.drawer-nav {
  display: block;
  list-style: none;
  padding: 12px 0;
}

.drawer-nav > li {
  display: block;
}

.drawer-nav li a {
  display: block;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--carbon-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--cloud-gray);
  transition: background-color 0.2s;
}

.drawer-nav li a:hover {
  background-color: var(--light-ash);
}

.drawer-nav .drawer-1depth {
  font-weight: 600;
  color: var(--carbon-dark);
}

.drawer-nav .drawer-sub-item a {
  padding-left: 32px;
  font-size: 14px;
  color: var(--pewter);
  font-weight: 400;
}

.drawer-actions {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--carbon-dark);
}

/* ── Hero ─────────────────────────────────────────── */
.hero-section {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  padding-top: 56px;
}

.hero-title {
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Hero Swiper ──────────────────────────────────── */
.hero-swiper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide {
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* 슬라이드 내부 이미지는 각 슬라이드를 꽉 채움 */
.hero-swiper .swiper-slide .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* 오버레이가 슬라이드 컨트롤 클릭을 막지 않도록 */
.hero-overlay {
  pointer-events: none;
}

/* 화살표 & 페이지네이션은 오버레이 위로 */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-pagination {
  z-index: 20;
  color: #fff;
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  --swiper-navigation-size: 28px;
  transition: opacity 0.2s ease;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
  opacity: 0.7;
}

.hero-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
  width: 9px;
  height: 9px;
}

.hero-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* ── Category Cards ───────────────────────────────── */
.cards-section {
  padding: 20px 24px 80px;
  background: #fff;
}

.cards-section h2 {
  font-size: 22px;
  font-weight: 500;
  color: var(--brand-pink);
  margin-bottom: 32px;
  text-align: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16/9;
  text-decoration: none;
  display: block;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.5, 0, 0, 0.75);
}

.category-card:hover img {
  transform: scale(1.04);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  transition: background-color 0.33s;
}

.category-card:hover .category-card-overlay {
  background: rgba(0,0,0,0.35);
}

.category-card-label {
  position: absolute;
  top: 16px;
  left: 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  z-index: 1;
}

/* ── Footer ───────────────────────────────────────── */
#site-footer {
  background-color: var(--carbon-dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1023px) {
  .nav-links-wrap {
    display: none;
  }
  .nav-guest,
  .nav-user {
    display: none;
  }
  .hamburger {
    display: inline-flex;
  }
  .mobile-nav-icons {
    display: flex;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 36px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }
  .btn-primary,
  .btn-secondary {
    min-width: 100%;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .cards-section {
    padding: 15px 8px 48px;
  }
}

/* ── Shared page layout ───────────────────────────── */
.page-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 35vh;
  background-color: var(--light-ash);
  background-size: cover;
  background-position: center top;
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  font-size: 32px;
  font-weight: 500;
  color: #fff;
  margin-top: 30px;
  margin-bottom: 8px;
}

.page-hero p {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* 모바일: 본문 영역 좌/우 여백을 24px -> 12px (절반) */
@media (max-width: 767px) {
  .page-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ── Table / Board ────────────────────────────────── */
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.board-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: var(--pewter);
  border-bottom: 2px solid var(--cloud-gray);
  white-space: nowrap;
}

.board-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cloud-gray);
  color: var(--graphite);
}

/* bsw 여기는 주석 처리 하고 아래 세개 추가
.board-table tr:hover td {
  background-color: var(--light-ash);
}
*/
.board-table .board-link {
  color: var(--carbon-dark);
  cursor: pointer;
}
.board-table .board-link:hover {
  color: var(--electric-blue);
}
.board-table tr.is-notice td {
  border-bottom: 1px solid var(--pale-silver);
}


.page-btn.disabled {
  color: var(--pale-silver);
  cursor: default;
  pointer-events: none;
}
.board-table a {
  color: var(--carbon-dark);
  text-decoration: none;
  font-weight: 400;
}

.board-table a:hover {
  color: var(--electric-blue);
}

/* ── Pagination ───────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--graphite);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.page-btn:hover {
  background-color: var(--light-ash);
  border-color: var(--pale-silver);
}

.page-btn.active {
  background: linear-gradient(135deg, #FFF3FA 0%, #FCDCEF 55%, #FAC7E4 100%);
  color: var(--carbon-dark);
  border-color: #ED008C;
}

/* ── Form ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--graphite);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--pale-silver);
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Pretendard', sans-serif;
  color: var(--carbon-dark);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(62, 106, 225, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--silver-fog);
}

input.form-input:disabled,
input.form-input[readonly] {
  background-color: var(--light-ash);
  border-color: var(--pewter);
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;                        /* iOS Safari 기본 반투명 처리 제거 */
  -webkit-text-fill-color: #6b7280;  /* iOS에서 color가 무시되는 문제 대응 */
  user-select: none;
}

/* readonly는 포커스가 가능하므로 포커스 링 제거 */
input.form-input[readonly]:focus {
  outline: none;
  border-color: var(--pewter);
  box-shadow: none;
}

select.form-input,
select.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

/* ── Checkbox (MUI-style) ─────────────────────────── */
.ui-checkbox {
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.ui-checkbox-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ui-checkbox-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--pewter);
  flex-shrink: 0;
}

.ui-checkbox-icon::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: var(--electric-blue);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ui-checkbox:hover .ui-checkbox-icon::before {
  opacity: 0.08;
  transform: scale(1);
}

.ui-checkbox-input:focus-visible ~ .ui-checkbox-icon::before {
  opacity: 0.12;
  transform: scale(1);
}

.ui-checkbox-icon svg {
  position: relative;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ui-checkbox-icon .icon-checked {
  display: none;
}

.ui-checkbox-input:checked ~ .ui-checkbox-icon {
  color: var(--electric-blue);
}

.ui-checkbox-input:checked ~ .ui-checkbox-icon .icon-unchecked {
  display: none;
}

.ui-checkbox-input:checked ~ .ui-checkbox-icon .icon-checked {
  display: inline-flex;
}

/* ── Photo grid ───────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
  background: var(--light-ash);
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.5, 0, 0, 0.75);
}

.photo-item:hover img {
  transform: scale(1.06);
}

@media (max-width: 1023px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ── MIJI Renewal / Under Construction Page ─────────── */
.renewal-page {
  position: relative;
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f7f7f7;
}

.renewal-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/title_photos.png');
  background-size: cover;
  background-position: center center;
  opacity: 0.24;
  filter: grayscale(15%);
  transform: scale(1.02);
}

.renewal-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.60);
}

.renewal-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  padding: 32px 40px;
  text-align: center;
  transform: translateY(-50px);
}

.renewal-label {
  display: inline-block;
  margin-bottom: 22px;
  padding: 7px 18px;
  border: 1px solid rgba(237, 0, 140, 0.45);
  border-radius: 20px;
  color: var(--brand-pink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.65);
}

.renewal-title {
  margin: 0 0 16px;
  color: var(--carbon-dark);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.renewal-subtitle {
  margin: 0 0 34px;
  color: var(--graphite);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.03em;
}

.renewal-message {
  margin: 0 auto;
  color: var(--pewter);
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.renewal-highlight {
  display: inline-block;
  margin-top: 4px;
  color: var(--brand-pink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.8;
}

.renewal-message strong,
.renewal-wait strong {
  color: var(--brand-pink);
  font-weight: 600;
}

.renewal-line {
  width: 44px;
  height: 2px;
  margin: 30px auto;
  background: var(--brand-pink);
}

.renewal-wait {
  margin-top: 30px;
  color: var(--carbon-dark);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: -0.02em;
}

@media (max-width: 767px) {
  .renewal-content {
    width: calc(100% - 24px);
    padding: 32px 20px;
    transform: translateY(-30px);
  }

  .renewal-title {
    font-size: 30px;
  }

  .renewal-subtitle {
    font-size: 17px;
  }

  .renewal-message {
    font-size: 15px;
    line-height: 1.9;
  }

  .renewal-page::before {
    background-position: center center;
    opacity: 0.18;
  }
}

/* ── Login: 계정 안내 링크 (회원가입 / 아이디·비밀번호 문의) ── */
.login-help-links {
  margin-top: 24px;
  text-align: center;
}

.login-help-links p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--graphite);
}

.login-help-links p + p {
  margin-top: 6px;
}

.login-help-links a {
  color: var(--electric-blue);
  text-decoration: none;
}

.login-help-links a:hover {
  text-decoration: underline;
}

/* ── 회원가입 화면 카드 (sign.jsp) ─────────────────── */
.sign-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 48px;
  background: var(--light-ash);
}

.sign-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
}

/* 모바일: 좌/우 여백을 PC 값의 절반으로 (페이지 24→12px, 카드 내부 40→20px) */
@media (max-width: 767px) {
  .sign-page { padding: 80px 12px 48px; }
  .sign-card { padding: 40px 20px; }
}

/* reCAPTCHA(고정폭 304px)가 좁은 화면에서 잘리지 않도록 축소 */
.sign-recaptcha .g-recaptcha { transform-origin: 0 0; }
@media (max-width: 380px) {
  .sign-recaptcha .g-recaptcha { transform: scale(0.9); }
}
