@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

:root{
  --navy:#061e30;
  --navy2:#0a3448;
  --teal:#0f7778;
  --ivory:#fbf8f1;
  --paper:#fffdfa;
  --gold:#d2b36d;
  --gold2:#f2dda2;
  --ink:#122334;
  --muted:#65717d;
  --line:rgba(6,30,48,.12);
  --shadow:0 18px 50px rgba(6,30,48,.12);
  --max:1160px;
  --ok:#2f7d69;
}

*{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  color:var(--ink);
  background:linear-gradient(180deg,var(--paper) 0%,var(--ivory) 100%);
  font-family:"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",Arial,sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input,
select,
textarea{
  font:inherit;
}

/* =========================================================
   MEMBER HEADER
========================================================= */

.header{
  position:sticky;
  top:0;
  z-index:50;
  min-height:58px;
  background:rgba(255,253,250,.94);
  border-bottom:1px solid rgba(6,30,48,.08);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.header-inner{
  width:min(var(--max),calc(100% - 28px));
  min-height:58px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--navy);
  font-size:.73rem;
  font-weight:900;
  letter-spacing:.11em;
  white-space:nowrap;
}

.brand-logo{
  display:block;
  width:32px;
  height:32px;
  object-fit:contain;
}

.mark{
  width:32px;
  height:32px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#e2c77e,#9b752d);
  color:var(--navy);
  font-weight:900;
  border:1px solid rgba(210,179,109,.85);
  box-shadow:0 6px 16px rgba(155,117,45,.24);
  letter-spacing:0;
}

.tools{
  display:flex;
  align-items:center;
  gap:3px;
}

.tool{
  width:40px;
  height:40px;
  border:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:transparent;
  color:var(--navy);
  font-size:1.1rem;
  cursor:pointer;
}

/* =========================================================
   MEMBER DRAWER
========================================================= */

.overlay{
  position:fixed;
  inset:0;
  z-index:80;
  background:rgba(6,30,48,.44);
  opacity:0;
  pointer-events:none;
  transition:.22s ease;
}

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

.drawer{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  z-index:90;
  width:min(84vw,340px);
  display:flex;
  flex-direction:column;
  background:var(--paper);
  box-shadow:-18px 0 50px rgba(6,30,48,.18);
  transform:translateX(100%);
  transition:.24s ease;
  overflow-y:auto;
}

.drawer.open{
  transform:translateX(0);
}

.drawer-head{
  padding:20px 18px;
  color:#fff;
  background:linear-gradient(145deg,var(--navy),var(--teal));
}

.drawer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.drawer-top strong{
  font-size:.8rem;
  letter-spacing:.1em;
}

.close{
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:1rem;
  cursor:pointer;
}

.drawer-user{
  margin-top:18px;
}

.drawer-user small{
  display:block;
  color:var(--gold2);
  font-size:.68rem;
  font-weight:900;
}

.drawer-user h3{
  margin:4px 0 0;
  font-size:1.1rem;
}

.drawer nav{
  padding:12px 0;
}

.drawer nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(6,30,48,.06);
  color:var(--navy);
  font-size:.82rem;
  font-weight:850;
}

.drawer nav a span{
  color:var(--teal);
}

.drawer nav form{
  margin:0;
}

.drawer-logout{
  width:100%;
  border:0;
  border-bottom:1px solid rgba(6,30,48,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  background:transparent;
  color:var(--navy);
  font-size:.82rem;
  font-weight:850;
  text-align:left;
  cursor:pointer;
}

.drawer-logout span{
  color:var(--teal);
}

/* =========================================================
   MEMBER FOOTER
========================================================= */

footer{
  padding:29px 0 calc(27px + env(safe-area-inset-bottom));
  background:#041522;
  color:rgba(255,255,255,.58);
}

.footer-inner{
  width:min(var(--max),calc(100% - 28px));
  margin:auto;
  display:grid;
  gap:18px;
}

.footer-brand{
  margin-bottom:9px;
  color:#fff;
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.12em;
}

.links{
  display:flex;
  flex-wrap:wrap;
  gap:8px 15px;
  margin-bottom:10px;
  font-size:.73rem;
}

.copy,
.release{
  font-size:.69rem;
}

.release strong{
  display:block;
  color:var(--gold2);
  font-size:.73rem;
  letter-spacing:.1em;
}

@media (min-width:740px){
  .header,
  .header-inner{
    min-height:66px;
  }

  .brand{
    font-size:.82rem;
  }

  .brand-logo,
  .mark{
    width:35px;
    height:35px;
  }

  .footer-inner{
    grid-template-columns:1fr auto;
    align-items:end;
  }

  .release{
    text-align:right;
  }
}


/* SHOP_008 · 공통 장터운영자 헤더 연결 */
.header-operator {
  position:relative;
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid rgba(210,179,109,.82);
  background:var(--paper);
  box-shadow:0 5px 14px rgba(6,30,48,.12);
}

.header-operator-image,
.header-operator-fallback {
  display:block;
  width:32px;
  height:32px;
  border-radius:50%;
}

.header-operator-image {
  object-fit:cover;
}

.header-operator-fallback {
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,var(--navy),var(--teal));
  color:var(--gold2);
  font-weight:900;
}

.header-operator-badge {
  position:absolute;
  right:-4px;
  bottom:-4px;
  min-width:25px;
  padding:1px 4px;
  border-radius:8px;
  background:var(--teal);
  color:#fff;
  font-size:7px;
  font-weight:900;
  line-height:1.4;
  text-align:center;
}

.drawer-operator-profile {
  display:flex;
  align-items:center;
  gap:11px;
}

.drawer-operator-image,
.drawer-operator-fallback {
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:50%;
  border:2px solid rgba(242,221,162,.9);
}

.drawer-operator-image {
  object-fit:cover;
}

.drawer-operator-fallback {
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.08);
  color:var(--gold2);
  font-size:1.2rem;
  font-weight:900;
}

.drawer-operator-profile .drawer-user h3,
.drawer-operator-profile h3 {
  margin-top:2px;
}

.drawer-member-no {
  margin:10px 0 0;
  color:rgba(255,255,255,.72);
  font-size:.68rem;
  font-weight:700;
}


/* =========================================================
   MOBILE CROSSCHECK UI V1
   공통 Glass Drawer + 햄버거 터치/가독성 보정
========================================================= */

#menuBtn{
  width:44px;
  height:44px;
  font-family:Arial,"Noto Sans KR",sans-serif;
  font-size:1.42rem;
  font-weight:800;
  line-height:1;
}

@media (max-width:739px){

  .overlay{
    background:rgba(2,16,27,.50);
    -webkit-backdrop-filter:blur(3px);
    backdrop-filter:blur(3px);
  }

  .drawer{
    width:min(86vw,360px);
    padding:
      max(12px, env(safe-area-inset-top))
      12px
      max(18px, env(safe-area-inset-bottom));
    overflow-y:auto;
    color:#fff;
    background:
      radial-gradient(circle at 100% 0%,rgba(210,179,109,.15),transparent 32%),
      linear-gradient(155deg,rgba(6,30,48,.94),rgba(9,64,73,.88));
    border-left:1px solid rgba(242,221,162,.20);
    box-shadow:-24px 0 60px rgba(2,16,27,.32);
    -webkit-backdrop-filter:blur(26px) saturate(128%);
    backdrop-filter:blur(26px) saturate(128%);
  }

  .drawer-head{
    padding:18px 14px 20px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:22px;
    background:rgba(255,255,255,.055);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  }

  .drawer-top strong{
    color:#fff;
    font-size:.88rem;
    letter-spacing:.12em;
  }

  .close{
    width:42px;
    height:42px;
    color:#fff;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.08);
    font-size:1.12rem;
  }

  .drawer-user{
    margin-top:22px;
  }

  .drawer-user small{
    color:var(--gold2);
    font-size:.76rem;
    letter-spacing:.02em;
  }

  .drawer-user h3{
    margin-top:7px;
    color:#fff;
    font-size:1.08rem;
    line-height:1.4;
    overflow-wrap:anywhere;
  }

  .drawer-menu{
    display:grid;
    gap:8px;
    padding:14px 2px 0 !important;
  }

  .drawer nav a,
  .drawer-logout{
    min-height:54px;
    padding:0 16px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:15px;
    color:rgba(255,255,255,.94);
    background:rgba(255,255,255,.055);
    font-size:.94rem;
    font-weight:900;
    letter-spacing:-.015em;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  }

  .drawer nav a:active,
  .drawer-logout:active{
    background:rgba(210,179,109,.12);
    transform:scale(.99);
  }

  .drawer nav a span,
  .drawer-logout span{
    color:var(--gold2);
    font-size:1.12rem;
  }

  .drawer-account-link{
    margin-top:7px;
    border-color:rgba(210,179,109,.20) !important;
  }

  .drawer-logout-form{
    margin-top:0 !important;
  }

  .drawer-logout{
    color:rgba(255,255,255,.74);
  }
}

@media (min-width:740px){
  #menuBtn{
    width:42px;
    height:42px;
    font-size:1.28rem;
  }
}


/* =========================================================
   MOBILE DRAWER COMPACT BRAND V1
   - 오른쪽 Drawer 유지
   - 폭만 축소
   - 하단 정심정도 제거 / 우수리 + MAPAE 심벌
========================================================= */

@media (max-width:739px){
  .drawer{
    /* 기존 86vw / 360px → 조금 더 슬림하게 */
    width:min(72vw,320px);
    min-width:278px;
  }

  .drawer-head{
    padding-left:13px;
    padding-right:13px;
  }

  .drawer nav a,
  .drawer-logout{
    padding-left:14px;
    padding-right:13px;
  }

  .drawer-brand-marks{
    margin-top:auto;
    min-height:78px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    padding:16px 12px 10px;
    border-top:1px solid rgba(242,221,162,.13);
  }

  .drawer-brand-marks img{
    display:block;
    width:39px;
    height:39px;
    object-fit:contain;
    filter:drop-shadow(0 6px 10px rgba(0,0,0,.20));
  }

  .drawer-brand-marks span{
    width:1px;
    height:28px;
    background:linear-gradient(
      180deg,
      transparent,
      rgba(242,221,162,.50),
      transparent
    );
  }
}

@media (max-width:390px){
  .drawer{
    width:min(74vw,304px);
    min-width:272px;
  }

  .drawer-brand-marks img{
    width:36px;
    height:36px;
  }
}


/* =========================================================
   TODAY WOOSURI LIVE V1.8
   Drawer compact + TODAY official entry
========================================================= */

@media (max-width:739px){

  /* 메뉴 전체 위/아래 공간만 압축 */
  .drawer{
    padding-top:max(8px, env(safe-area-inset-top));
    padding-bottom:max(10px, env(safe-area-inset-bottom));
  }

  .drawer-head{
    padding-top:13px;
    padding-bottom:14px;
  }

  .drawer-user{
    margin-top:14px;
  }

  .drawer-menu{
    gap:5px;
    padding-top:10px !important;
  }

  /* 글자 크기는 유지, 카드 높이/패딩만 축소 */
  .drawer nav a,
  .drawer-logout{
    min-height:46px;
    padding-top:0;
    padding-bottom:0;
  }

  .drawer-account-link{
    margin-top:4px;
  }

  .drawer-brand-marks{
    min-height:62px;
    padding-top:10px;
    padding-bottom:6px;
  }

  .drawer-brand-marks img{
    width:34px;
    height:34px;
  }

  /* 오늘의 우수리: 첫 번째 공식 입구 */
  .drawer-today-link{
    position:relative;
    overflow:hidden;
    border-color:rgba(242,215,135,.38) !important;
    background:
      radial-gradient(circle at 0% 50%,rgba(255,63,104,.10),transparent 28%),
      linear-gradient(110deg,rgba(210,179,109,.13),rgba(255,255,255,.055)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.04),
      0 0 0 1px rgba(210,179,109,.03);
  }

  .drawer-today-link::after{
    content:"";
    position:absolute;
    inset:-80% -35%;
    pointer-events:none;
    background:linear-gradient(
      108deg,
      transparent 33%,
      rgba(255,229,150,0) 38%,
      rgba(255,238,185,.38) 46%,
      rgba(255,249,220,.72) 50%,
      rgba(255,218,112,.38) 56%,
      rgba(255,229,150,0) 62%,
      transparent 67%
    );
    transform:translateX(-82%);
    animation:drawerTodaySweep 5.2s linear infinite;
  }

  .drawer-today-label{
    position:relative;
    z-index:1;
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#fff;
  }

  .drawer-today-dot{
    width:7px;
    height:7px;
    flex:0 0 7px;
    border-radius:50%;
    background:#ff3f68;
    box-shadow:
      0 0 0 4px rgba(255,63,104,.14),
      0 0 11px rgba(255,63,104,.75);
    animation:drawerTodayPulse 1.15s ease-in-out infinite;
  }

  .drawer-today-link > span:last-child{
    position:relative;
    z-index:1;
    color:#f2d787 !important;
  }

  @keyframes drawerTodayPulse{
    0%,100%{
      opacity:.64;
      transform:scale(.84);
    }
    50%{
      opacity:1;
      transform:scale(1.18);
    }
  }

  @keyframes drawerTodaySweep{
    0%,58%{
      transform:translateX(-82%);
      opacity:0;
    }
    63%{opacity:.42}
    69%{opacity:1}
    82%{
      transform:translateX(82%);
      opacity:.86;
    }
    87%,100%{
      transform:translateX(82%);
      opacity:0;
    }
  }
}


/* =========================================================
   DRAWER DESKTOP CONSISTENCY FIX V1 · 2026-08-12
   기존 디자인/모바일 규칙 유지, PC에서만 깨짐 보정
========================================================= */
@media (min-width:740px){
  .drawer{
    overflow-x:hidden;
  }

  .drawer-menu{
    flex:0 0 auto;
  }

  .drawer-brand-marks{
    margin-top:auto;
    width:100%;
    min-height:74px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    padding:14px 18px 16px;
    overflow:hidden;
    border-top:1px solid rgba(6,30,48,.08);
  }

  .drawer-brand-marks img{
    display:block;
    width:36px;
    height:36px;
    max-width:36px;
    object-fit:contain;
  }

  .drawer-brand-marks span{
    width:1px;
    height:28px;
    flex:0 0 1px;
    background:linear-gradient(
      180deg,
      transparent,
      rgba(210,179,109,.55),
      transparent
    );
  }

  /* 모바일의 '오늘의 우수리' 강조 표현을 PC에도 동일 적용 */
  .drawer-today-link{
    position:relative;
    overflow:hidden;
    border-color:rgba(210,179,109,.24) !important;
    background:
      radial-gradient(circle at 0% 50%,rgba(255,63,104,.08),transparent 28%),
      linear-gradient(110deg,rgba(210,179,109,.10),rgba(255,255,255,.02)) !important;
  }

  .drawer-today-link::after{
    content:"";
    position:absolute;
    inset:-80% -35%;
    pointer-events:none;
    background:linear-gradient(
      108deg,
      transparent 33%,
      rgba(255,229,150,0) 38%,
      rgba(255,238,185,.28) 46%,
      rgba(255,249,220,.55) 50%,
      rgba(255,218,112,.28) 56%,
      rgba(255,229,150,0) 62%,
      transparent 67%
    );
    transform:translateX(-82%);
    animation:drawerTodaySweep 5.2s linear infinite;
  }

  .drawer-today-label{
    position:relative;
    z-index:1;
    display:inline-flex;
    align-items:center;
    gap:8px;
  }

  .drawer-today-dot{
    width:7px;
    height:7px;
    flex:0 0 7px;
    border-radius:50%;
    background:#ff3f68;
    box-shadow:
      0 0 0 4px rgba(255,63,104,.12),
      0 0 10px rgba(255,63,104,.60);
    animation:drawerTodayPulse 1.15s ease-in-out infinite;
  }

  .drawer-today-link > span:last-child{
    position:relative;
    z-index:1;
    color:var(--teal) !important;
  }
}


/* RELEASE1A DRAWER INFO LINKS V1 */
.drawer-menu .drawer-info-link{
  border-color:rgba(210,179,109,.42) !important;
  background:linear-gradient(110deg,rgba(210,179,109,.13),rgba(255,255,255,.045)) !important;
  color:#f5e2a6 !important;
}
.drawer-menu .drawer-info-link span{
  color:#f2d787 !important;
}
.drawer-menu .drawer-info-woosuri{
  margin-top:8px !important;
  border-top-color:rgba(242,215,135,.55) !important;
}
.drawer-menu .drawer-info-sangdure{
  background:linear-gradient(110deg,rgba(15,119,120,.30),rgba(255,255,255,.045)) !important;
  border-color:rgba(113,207,198,.34) !important;
  color:#d9f3ef !important;
}


/* RELEASE1A DRAWER SPACING V6 */
.drawer-menu{
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
}
.drawer-menu > a{
  margin:0 !important;
  min-height:44px !important;
  height:44px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  box-sizing:border-box !important;
}
.drawer-menu .drawer-info-woosuri{
  margin-top:0 !important;
}
.drawer-menu .drawer-info-link{
  min-height:44px !important;
  height:44px !important;
}


/* RELEASE1A DRAWER COMPACT GAP V7 */
.drawer-menu{
  gap:3px !important;
}
.drawer-menu > a{
  margin:0 !important;
  min-height:42px !important;
  height:42px !important;
}
.drawer-menu .drawer-info-link{
  min-height:42px !important;
  height:42px !important;
  margin:0 !important;
}


/* RELEASE1A DRAWER DESKTOP INFO LINKS FIX V2 · 2026-08-13
   모바일 디자인 유지. PC에서 소개/상두레 링크의 흰 글씨/강한 그라데이션 충돌만 보정. */
@media (min-width:740px){
  .drawer-menu .drawer-info-link{
    color:var(--navy) !important;
    border:1px solid rgba(6,30,48,.08) !important;
    background:#fffaf0 !important;
  }
  .drawer-menu .drawer-info-link span{
    color:#9b7730 !important;
  }
  .drawer-menu .drawer-info-sangdure{
    color:var(--navy) !important;
    border-color:rgba(15,119,120,.16) !important;
    background:#f1faf8 !important;
  }
  .drawer-menu .drawer-info-sangdure span{
    color:var(--teal) !important;
  }
}
