/* =========================
   BASE / BACKGROUND FIX
========================= */

/* remove default page overlays */
body[data-page="log"] .pp-main::before,
body[data-page="log"] .art-main::before{
  display: none !important;
}

/* global box sizing */
*{
  box-sizing: border-box;
}

/* theme */
:root{
  --bg: #05060a;
  --fg: rgba(74, 74, 74, 0.95);
  --muted: rgba(234, 234, 236, 0.68);
}

/* root + body background (prevent white bleed) */
html,
body{
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior: none; /* iOS / Chrome white flash fix */
}

/* body typography */
body{
  font-family: "Inter", "Pretendard", system-ui, -apple-system,
               "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  color: var(--fg);
}

/* header */
body[data-page="log"] header{
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent !important;
  color: var(--fg) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding-top: 10px !important;
  z-index: 3000;
}

body[data-page="log"] header .logo-brand,
body[data-page="log"] header .logo-roman,
body[data-page="log"] header .logo-korean{ color: var(--fg) !important; }

body[data-page="log"] header .search-icon,
body[data-page="log"] header .shop-toggle{ display: none !important; }

/* 메뉴 텍스트 */
.main-nav a{
  color:  rgba(74, 74, 74, 0.95);
}

/* | 구분선 */
.main-nav a::before{
  background:  rgba(74, 74, 74, 0.95);
}

.list-toggle{
  position: fixed;
  top: 12px;
  right: 24px;
  width: 28px;
  height: 28px;
  z-index: 3500;
  cursor: pointer;
  color: var(--fg);
  opacity: 0.9;
}

.ic-list{ width: 24px; height: 24px; }

/* layout, scroll 덜 하게 */
.art-page{
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 66px 20px 20px;
  gap: 6px;
}

.viewer{ width: min(720px, 92vw); }
.viewer-wrap{ width: 100%; display: grid; justify-items: center; }

/* image button, 돋보기 커서 제거 */
.art-img-btn{
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/* stage */
.stage{
  width: 100%;
  perspective: 1400px;
  display: grid;
  place-items: center;
}

/* flip, 그림 높이 살짝 줄임 */
.flip-track{
  width: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 820ms cubic-bezier(0.18, 0.95, 0.2, 1);
  will-change: transform;
  max-height: 50svh;
}

.flip-track::before{
  content: "";
  display: block;
  padding-top: 128%;
}

.face{
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}
.face-front{ transform: rotateY(0deg); }
.face-back{ transform: rotateY(180deg); }

.flip-track.is-flipped{ transform: rotateY(180deg); }

.face img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  border: 0;
}

/* swap 위치, 클릭 우선순위 보장 */
.swap-between{
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 0px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.swap-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(107, 107, 107, 0.95);
  border-radius: 999px;
  cursor: pointer;
  width: 46px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
}

.ic-swap{ width: 20px; height: 20px; }

/* info, 글 영역 더 넓게 */
.art-info{
  width: min(920px, 94vw);
  text-align: center;
  padding-bottom: 0;
}

.art-title{
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: 0.02em;
  color:   rgba(234,234,236,0.78);
}

.art-meta{
  font-size: 11px;
  color: rgba(234,234,236,0.66);
  margin: 0 0 10px;
  line-height: 1.55;
}

.art-desc{
  font-size: 12.2px;
  line-height: 1.75;
  color: rgba(234,234,236,0.82);
  max-width: 880px;
  margin: 30px auto;
}

.art-desc .ko{
  margin-top: 20px;
  color: rgba(234,234,236,0.78);
}

/* =======================================================
   ABOVE SLIDER LINK
   ======================================================= */
/* 공통 박스 스타일 */
.above-slider-link {
  text-align: center;
  margin: 40px auto 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* 공통 링크 스타일 — 최중요! */
.above-slider-link a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: rgba(234,234,236,0.82);
  font-size: 10px;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.25s ease, color 0.25s ease;
}

/* hover 효과 */
.above-slider-link a:hover {
  color: #a4b128;
  opacity: 1;
}

/* 아이콘 */
.ic-arrow,
.ic-insta {
  width: 11px;
  height: 11px;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* =========================
   MODAL
========================= */
.modal{
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}
.modal.is-open{ display: block; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(6px);
}

/* panel */
.modal-panel{
  position: relative;
  width: 98vw;
  height: 94svh;
  margin: 3svh auto 0;
  background:transparent;
  border: 0;
  border-radius: 18px;
  box-shadow: transparent;
  overflow: hidden;
}

/* close button */
.modal-close{
  position: fixed;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 40px;
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 6000;
  opacity: 0.7;
  pointer-events: auto;
}


/* body */
.modal-body{
  height: 100%;
  padding: 58px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   MODAL STAGE
========================= */
.stage-shell-modal{
  position: relative;
  width: min(1280px, 94vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stage-modal{
  position: relative;
  z-index: 1; /* flip 영역 */
}

.stage-modal .flip-track{
  max-height: 80svh;
}

/* =========================
   MODAL ACTIONS (SWAP)
========================= */
.modal-actions{
  position: relative;
  z-index: 200;          /* flip-track보다 위 */
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  pointer-events: auto;
}

#swapBtnModal{
  position: relative;
  z-index: 210;
  pointer-events: auto;
  margin-top: 10px;
}

@media (max-width: 768px){
  .art-page{ padding-top: 84px; padding-bottom: 36px; }
  .flip-track{ max-height: 48svh; }
  .art-info{ width: min(940px, 94vw); }
  .stage-modal .flip-track{ max-height: 82svh; }
}


