
* {
  -webkit-tap-highlight-color: transparent !important;
}
/* ==============================
   FONT 
   ============================== */
@font-face {
  font-family:'Pretendard';
  font-weight:100;
  src:url('font/Pretendard-Thin.woff2') format('woff2');
}
@font-face {
  font-family:'Pretendard';
  font-weight:200;
  src:url('font/Pretendard-ExtraLight.woff2') format('woff2');
}
@font-face {
  font-family:'Pretendard';
  font-weight:300;
  src:url('font/Pretendard-Light.woff2') format('woff2');
}
@font-face {
  font-family:'Pretendard';
  font-weight:400;
  src:url('font/Pretendard-Medium.woff2') format('woff2');
}
@font-face {
  font-family:'Griffiths';
  src:url('font/Griffiths.woff2') format('woff2');
  font-weight:normal;
  font-style:normal;
}

/* ==============================
   RESET / BASE
   ============================== */
*{margin:0;padding:0;box-sizing:border-box;}
html,body{height:100%;}
body{
  font-family:'Pretendard',sans-serif;
  font-weight:300;
  line-height:1.3;
  color:#000;
  background:#fff;
}

html, body {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE, old Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, Edge */
}

/* ==============================
   LAYOUT
   ============================== */
.gallery-page{
  min-height:100svh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  position:relative;
  padding-top:max(env(safe-area-inset-top), 8px);
}

/* ==============================
   TITLE (Griffiths)
   ============================== */
.title-container {
  display: flex;
  align-items: center;
  justify-content: center;   /* 가운데 정렬 추가 */
  width: 100%;
  max-width: 450px;
  margin-top: 25px;
  margin-bottom: 16px;
  padding: 0 30px;
}

.title-line {
  display: none;    /* 선 제거 */
}

.title-container h1.title {
  font-family: 'Griffiths', serif;
  font-size: 2em;
  font-weight: normal;
  color: transparent;
  -webkit-text-stroke: 0.5px #000;
  letter-spacing: 1px;
  flex-shrink: 0;
}


/* ==============================
   FOOTER (다른 페이지랑 스타일 통일)
   ============================== */
.gallery-footer{
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);

  font-family: 'Pretendard', sans-serif;  /* info / folder / schedule와 통일 */
  font-weight: 200;                       /* 너무 얇지도, 두껍지도 않게 */
  font-size: 11px;
  line-height: 1;
  color: #b5b5b5;
  pointer-events: none;
}

/* 모바일에서 살짝만 위로 & 작게 */
@media (max-width: 480px){
  .gallery-footer{
    bottom: 14px;
    font-size: 10px;
  }
}


/* ==============================
   FILTER AREA
   ============================== */
.gallery-filter{
  width:100%;
  max-width:450px;
  padding:0 30px;
}

/* 검색바 (mock처럼 둥근 박스) */
.search-bar{
  width:100%;
  height:40px;
  border-radius:999px;
  border:1px solid #dcdcdc;
  display:flex;
  align-items:center;
  padding:0 10px 0 12px;
  margin-bottom:14px;
  background:#fff;
}

.search-notice-icon{
  width:20px;
  height:20px;
  flex-shrink:0;
  margin-right:8px;
}

.hash-prefix{
  font-size:0.9rem;
  font-weight:400; 
  color:#000;
  margin-right:4px;
}

#tag-input{
  flex:1;
  border:none;
  background:transparent;
  font-size:0.9rem;
  font-weight:400;   
  color:#333;
}
#tag-input::placeholder{
  color:#b3b3b3;
}
#tag-input:focus{
  outline:none;
}

#tag-search-btn{
  border:none;
  background:transparent;
  padding:0 2px 0 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.search-icon{
  width:18px;
  height:18px;
}

/* ==============================
   TAG CHIPS (두 줄 정렬)
   ============================== */
.tag-chip-wrap{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:20px;
}

.tag-chip-row{
  display:flex;
  gap:8px;
}

.tag-chip{
  flex:0 0 auto;
  padding:6px 12px;
  border-radius:999px;
  border:none;
  background:#f2f2f2;
  font-size:0.75rem;
  font-weight:400;
  color:#333;
  cursor:pointer;
  white-space:nowrap;
}

/* 선택된 태그 */
.tag-chip.active{
  background:#000;
  color:#fff;
}

/* ==============================
   GALLERY GRID
   ============================== */
.gallery-grid{
  width:100%;
  max-width:450px;
  padding:0 30px 80px;
  display:grid;
  grid-template-columns:repeat(2, 1fr); /* 인스타처럼 3열이면 더 느낌 남, 2열이면 유지해도 됨 */
  gap:8px;
}

/* 썸네일: 1:1 정사각 + 살짝 둥근 모서리 */
.gallery-item{
  border:none;
  padding:0;
  background:#e1e1e1;
  border-radius:14px;        /* ← 살짝만 둥글게 */
  overflow:hidden;
  cursor:pointer;
  width:100%;
  aspect-ratio:1 / 1;        /* ← 1:1 정사각 */
  position:relative;
}

/* 이미지가 박스 꽉 채우면서 잘리는 느낌 (인스타 스타일) */
.gallery-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ==============================
   DETAIL OVERLAY (썸네일 클릭 시 상세 카드)
   ============================== */

/* 전체 오버레이 레이어 */
.gallery-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2000;
}

/* 활성화 시 */
.gallery-overlay.active{
  opacity: 1;
  pointer-events: auto;
}

/* 배경 블러 */
.gallery-overlay .overlay-backdrop{
  position:absolute;
  inset:0;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(3px);
}

/* 가운데 카드 감싸는 래퍼 */
.gallery-detail-wrapper{
  position: relative;
  width: min(420px, calc(100% - 40px));
  max-height: calc(100vh - 60px);
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* 실제 상세 카드 */
.gallery-detail-card{
  width: 100%;
  background:#fff;
  border-radius:18px;
  box-shadow:0 20px 40px rgba(0,0,0,0.18);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* 위쪽 사진/영상 영역 */
.gallery-detail-photo-area{
  position:relative;
  background:#000;
}

.gallery-detail-photo{
  display:block;
  width:100%;
  height:auto;
  max-height: min(70vh, 540px);
  object-fit:cover;
}

/* 사진 위 얹히는 텍스트 */
.gallery-detail-text-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:10px 14px 12px;
  background:linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.4) 45%,
    rgba(0,0,0,0.75) 100%
  );
  color:#fff;
  font-size:0.8rem;
}

.gallery-detail-date{
  opacity:0.9;
  margin-bottom:3px;
}

.gallery-detail-label{
  font-size:0.85rem;
  font-weight:400;
}

/* 아래쪽 태그 라인 */
.gallery-detail-bottom{
  padding:10px 16px 14px;
}

.gallery-detail-tags{
  font-size:0.78rem;
  color:#555;
  line-height:1.5;
  word-break:keep-all;
}

/* 닫기 버튼 */
.gallery-detail-close{
  position:absolute;
  top:10px;
  right:10px;
  width:20px;   
  height:20px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,0.4);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:9999;
}

.gallery-detail-close img{
  width:20px;
  height:20px;
  display:block;
  pointer-events:none;
}

/* ← → 화살표 (lightbox 느낌으로 수정한 버전) */
.gallery-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:none;
  cursor:pointer;
  z-index:1300;
  background:rgba(255,255,255,0.4);
  border-radius:50%;
  width:auto;
  height:auto;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter:none;
}

.gallery-arrow img{
  width:20px;
  height:20px;
  display:block;
  pointer-events:none;
}

.left-arrow{
  left:10px;   /* 기존 위치 그대로 유지 */
}

.right-arrow{
  right:10px;
}

.gallery-video-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

@keyframes fadeIn{
  from{opacity:0; transform:scale(0.98);}
  to{opacity:1; transform:scale(1);}
}

/* 작은 화면 튜닝 */
@media (max-width:400px){
  .gallery-detail-wrapper{
    width:calc(100% - 32px);
  }
  .gallery-detail-photo{
    max-height:60vh;
  }
}
  /* ==============================
   TAG SUGGEST DROPDOWN
   ============================== */
.tag-suggest {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 2px 0 10px;
}

.tag-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 4px;

  max-height: 220px;
  overflow-y: auto;

  background: #fff;
  border-radius: 16px;
  border: 1px solid #ededed;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);

  padding: 6px 6px;
  display: none;
  z-index: 1200;
}

.tag-suggest.open .tag-suggest-list {
  display: block;
}

.tag-suggest-item{
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;

  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 400;   
  color: #333;
  cursor: pointer;
}

.tag-suggest-item span {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-suggest-item:hover {
  background: #f5f5f5;
}


/* ==============================
   NOTICE 오버레이
   ============================== */

.notice-overlay{
  position: fixed;
  inset: 0;
  z-index: 2600;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;

  display: flex;
  justify-content: center;
  align-items: flex-start; 
  padding-top: 90px;
}

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

.notice-dialog{
  position: relative;
  z-index: 1;

  max-width: 320px;
  width: calc(100% - 40px);

  padding: 14px 25px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  font-size: 0.78rem;
  font-weight: 300;
  color: #222;
}

.notice-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
}


/* 닫기 버튼 (오른쪽 위 동그라미) */
.notice-close{
  position:absolute;
  top:8px;
  right:8px;
  width:24px;
  height:24px;
  border-radius:50%;
  border:none;
  background: rgba(255,255,255,0.7);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  cursor:pointer;
}

.notice-close img{
  width:20px;
  height:20px;
  display:block;
}

.notice-text p{
  margin: 4px 0;

  line-height: 1.4;
}

.notice-mail-row{
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none; 
  border: none;
  cursor: pointer;
}

.notice-mail-icon{
  width:15px;
  height:15px;
  display:block;
  opacity:0.9;
}

/* 메일 텍스트 */
.notice-mail-text{
  font-size:0.78rem;
  font-weight:400;
  color:#222;
  user-select:none;
}


/* notice 아이콘 커서 */
.search-notice-icon{
  cursor: pointer;
}


/* ==============================
   좌하단 고정 글로벌 메뉴
   ============================== */

.global-fab{
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 2500;
  font-family:'Pretendard', sans-serif;
}

/* 동그란 버튼 */
.global-fab-btn{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: transparent;
  background: #fff;
  box-shadow: 0 0px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

/* 메뉴 아이콘 (이미지) */
.global-fab-icon-img{
  width: 15px;
  height: 15px;
  display: block;
}

/* 팝업 패널 */
.global-fab-panel{
  position: absolute;
  left: 0;
  bottom: 50px;

  padding: 10px 12px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.16);
  border: 1px solid #ececec;

  display: none;
  flex-direction: column;
  gap: 6px;

  min-width: 110px; /* 🔥 가로폭 확 줄임 */
  width: fit-content;
}

.global-fab.open .global-fab-panel{
  display: flex;
}

.global-fab-panel a{
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 400;
  color:#222;
  padding: 2px 2px;
}

.global-fab-panel a:hover{
  color:#000;
}

/* 모바일에서 버튼 위치 조금만 위로 */
@media (max-width:480px){
  .global-fab{
    left: 14px;
    bottom: 14px;
  }
}
