/* ============================================================
   모바일 서랍
   ------------------------------------------------------------
   카덴스 기본 서랍은 «디자인된 적이 없었다». 우리 테마가 손댄 건 글자 크기
   한 줄뿐이고, 바탕·구분선·화살표 상자·간격이 전부 카덴스 기본값이었다.
   그래서 사이트의 따뜻한 오프화이트와 와인 강조를 하나도 안 쓰고,
   순수 검정에 가까운 판에 줄마다 가로줄이 그어진 2010년대 목록 화면이었다.

   고친 것 넷
     ① 바탕 — 사이트와 같은 밝은 면. 열어도 눈이 안 뒤집힌다
     ② 가로줄을 걷는다 — 간격과 굵기로 나눈다
     ③ 위계를 바로잡는다 — 하위가 있는 항목이 «더 작던» 것을 되돌린다
     ④ 화살표를 가두던 세로줄·상자를 없앤다

   머리·바닥은 inc/drawer.php 가 카덴스 갈고리에 붙인다.
   ============================================================ */

/* ── 판 ── */

/*
  ── 안쪽 여백은 상단 헤더와 «같은 식»으로 ── (2026-09-15)
  서랍은 24px, 헤더 로고는 28px, 닫기 ✕ 는 12px 로 셋이 다 달랐다.
  헤더의 28px 은 우연한 숫자가 아니라 계산이다.

    site-container 의 padding(--artium-space = 16px)
    + 가운데 정렬로 남는 margin(--artium-side 의 절반 = 12px)

  같은 식을 쓰면 여백 조절기로 값을 바꿔도 둘이 함께 움직인다.
    390px → 28px    360px → 26px    (헤더와 한 픽셀도 안 어긋난다)
*/
/*
  ⚠ 2026-09-16 — 헤더가 바뀌어서 이 식도 같이 바뀐다.
  헤더의 .site-container 가 1024px 이하에서는 폭 제한을 풀고 좌우 여백을
  --artium-space 만 쓰도록 고쳤다(layout-chrome.css). 그러니 «가운데 정렬로
  남는 margin» 이 더는 없다 — 그 몫(--artium-side / 2)을 여기서도 빼야 맞는다.
  안 빼면 1024px 에서 헤더 로고는 28px, 서랍은 81px 로 어긋난다.
*/
#mobile-drawer { --drawer-inset: var(--artium-space); }

@media (min-width: 1025px) {
  #mobile-drawer { --drawer-inset: calc(var(--artium-space) + var(--artium-side) / 2); }
}

/*
  ── 태블릿에서 너무 넓던 것 ── (2026-09-16)
  카덴스 기본은 `max-width: 90%` 하나뿐이라 화면이 커질수록 서랍도 같이 커졌다.
  1024px 에서 922px — 사실상 전체 화면이라, 오른손 엄지로 여닫이 화살표까지
  닿기 어려웠다(사장님 지적).

  폰에서는 90% 가 맞다(390px → 351px). 그 위로만 상한을 건다.
  400px 은 «한 손에 잡히는 옆 판»의 흔한 폭이고, 이 서랍의 바닥에 있는
  단추 셋이 한 칸 133px 씩 나눠 가져도 넉넉하다.
*/
#mobile-drawer .drawer-inner { max-width: min(90%, 400px); }

#mobile-drawer .drawer-inner {
  background: var(--artium-bg);
  color: var(--artium-ink);
  /* 머리 / 메뉴 / 바닥 — 바닥이 아래에 붙도록 세로로 세운다 */
  display: flex;
  flex-direction: column;
  height: 100%;
}
#mobile-drawer .drawer-overlay { background: color-mix(in srgb, var(--artium-ink) 55%, transparent); }

/* 닫기 — 카덴스가 그리는 두 줄짜리 ✕. 색만 우리 먹으로 */
/* ✕ 도 같은 세로줄에 선다 — 전에는 혼자 12px 이라 가장자리에 붙어 보였다 */
#mobile-drawer .drawer-header { padding: var(--sp-5) var(--drawer-inset) 0; }
#mobile-drawer .menu-toggle-close .toggle-close-bar { background: var(--artium-ink); }

#mobile-drawer .drawer-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
/* 메뉴와 바닥 사이 최소 숨 — 바닥은 margin-top:auto 로 아래에 붙으므로 여기서 준다 */
#mobile-drawer .drawer-content > .site-header-item { margin-bottom: var(--sp-7); }

/* ── ① 머리 — 어디에 있나 ── */
.artium-drawer__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-4) var(--drawer-inset) var(--sp-7);
}
.artium-drawer__brand {
  font-family: var(--artium-sans);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--artium-ink);
  text-decoration: none;
}
.artium-drawer__branch {
  font-size: var(--fs-sm);
  color: var(--artium-accent);
  letter-spacing: .02em;
}

/* ── ② 메뉴 — 줄을 걷고 간격으로 나눈다 ── */
#mobile-drawer .mobile-navigation,
#mobile-drawer .mobile-menu-container { flex: 1 1 auto; }

#mobile-drawer .menu {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 var(--drawer-inset);
  list-style: none;
}
#mobile-drawer .menu-item { border: 0; }
#mobile-drawer .menu-item > a,
#mobile-drawer .drawer-nav-drop-wrap > a {
  /* ③ 위계 — 하위가 있든 없든 같은 층이면 같은 크기다.
        전에는 하위를 «가진» 항목이 51px·가늘게, 없는 항목이 62px·굵게로
        뒤집혀 있었다. */
  display: block;
  padding: var(--sp-4) 0;
  border: 0 !important;
  font-family: var(--artium-sans);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--artium-ink);
  text-decoration: none;
}
#mobile-drawer .menu-item > a:hover,
#mobile-drawer .menu-item > a:focus-visible { color: var(--artium-accent); }

/* 지금 보고 있는 곳 — 밑줄 대신 색과 점으로 */
#mobile-drawer .current-menu-item > a,
#mobile-drawer .current-menu-parent > a,
#mobile-drawer .current-menu-ancestor > a {
  color: var(--artium-accent);
  text-decoration: none;
}
#mobile-drawer .current-menu-item > a::before {
  content: '';
  display: inline-block;
  width: .375rem; height: .375rem;
  margin-right: .5rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--artium-accent);
}

/* ── ④ 화살표 — 가두던 상자와 세로줄을 없앤다 ── */
#mobile-drawer .drawer-nav-drop-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border: 0 !important;
}
#mobile-drawer .drawer-nav-drop-wrap > a { flex: 1 1 auto; }
#mobile-drawer .drawer-sub-toggle,
#mobile-drawer .drawer-nav-drop-wrap button {
  flex: none;
  width: 44px; height: 44px;          /* 손가락 자리 */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: 0 !important;
  background: none;
  color: var(--artium-ink);
  opacity: .5;
  transition: opacity var(--artium-dur) var(--artium-ease),
              transform var(--artium-dur) var(--artium-ease);
}
#mobile-drawer .drawer-sub-toggle:hover { opacity: 1; }
/* 펼치면 화살표가 돌아 «지금 열려 있다»를 형태로 말한다 */
#mobile-drawer .drawer-sub-toggle[aria-expanded="true"] { opacity: 1; transform: rotate(180deg); }
#mobile-drawer .drawer-sub-toggle svg { width: 18px; height: 18px; }

/* ── 펼친 하위 — 강조색 세로선 옆에 들여쓴다 ── */
#mobile-drawer .sub-menu {
  margin: 0 0 var(--sp-5) var(--sp-3);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  border-left: 1px solid color-mix(in srgb, var(--artium-accent) 35%, transparent);
  list-style: none;
}
#mobile-drawer .sub-menu .menu-item > a {
  padding: var(--sp-3) 0;
  font-size: var(--fs-md);
  font-weight: 400;
  color: color-mix(in srgb, var(--artium-ink) 78%, transparent);
}

/* ── 바닥 — 무엇을 할 수 있나 ── */
.artium-drawer__foot {
  flex: none;
  /* 판 «바닥»에 붙는다 — 메뉴가 짧아도 아래에 남는다 */
  margin-top: auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px;
  background: var(--artium-line);
  border-top: 1px solid var(--artium-line);
}
.artium-drawer__act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 64px;
  padding: var(--sp-4) var(--sp-2);
  background: var(--artium-bg);
  color: var(--artium-ink);
  font-size: var(--fs-xs);
  text-decoration: none;
}
.artium-drawer__act .artium-fa__icon { width: 20px; height: 20px; opacity: .8; }
.artium-drawer__act--booking { color: var(--artium-accent); font-weight: 600; }
.artium-drawer__act:hover { background: var(--artium-surface); }
.artium-drawer__act:focus-visible { outline: 2px solid var(--artium-accent); outline-offset: -3px; }

/* ============================================================
   폰·태블릿에서는 «옆판»이 아니라 «한 장» (2026-09-16 · 세종스노우 참고)
   ------------------------------------------------------------
   1024px 이하(카덴스가 모바일 헤더로 바뀌는 구간 전부): 화면 전체를 브랜드 빛으로 채우고, 가운데 큰 글자
   몇 줄만 둔다. 상위를 누르면 아코디언으로 «펼치는» 게 아니라 목록을
   통째로 하위 목록으로 «바꿔 끼운다»(맨 위 「뒤로」 알약). 그래서 항목이
   많아도 화면이 길어지지 않고, 엄지가 닿는 자리도 늘 같다.

   처음엔 폰(719px 이하)만 한 장이고 태블릿은 400px 옆판을 남겼는데, 원장님이
   «태블릿도 모바일과 통일»을 원해 1024px 까지 올렸다(2026-09-16). 위의 400px
   옆판 규칙은 1025px 이상, 즉 데스크톱 헤더 구간에서만 남아 사실상 안 쓰인다.

   마크업은 카덴스 것 그대로. 바꿔 끼우기는 assets/js/drawer-sheet.js 가
   .is-subview(서랍) · .is-sub-open(항목) 두 클래스로 말한다.
   ============================================================ */
@media (max-width: 1024px) {
  #mobile-drawer .drawer-inner {
    max-width: none;
    width: 100%;
    /* 브랜드 빛 — 강조색을 아주 옅게. 세종은 제 하늘색을 그대로 깔지만 우리 와인은 진하면 분홍이 된다 */
    background:
      radial-gradient(120% 70% at 50% 0%, color-mix(in oklab, var(--artium-accent) 16%, var(--artium-bg)), transparent 70%),
      color-mix(in oklab, var(--artium-accent) 9%, var(--artium-bg));
  }
  #mobile-drawer .drawer-overlay { display: none; }

  /* 머리 — 왼쪽 위 이름, 오른쪽 위 ✕ 를 «한 줄»에 */
  #mobile-drawer .drawer-header {
    position: absolute; top: 0; right: 0;
    padding: var(--sp-4) var(--drawer-inset) 0;
  }
  .artium-drawer__head { padding: var(--sp-5) var(--drawer-inset) 0; }

  /* 메뉴 — 남는 높이의 한가운데 */
  #mobile-drawer .drawer-content { overflow-y: auto; }
  #mobile-drawer .drawer-content > .site-header-item { margin-bottom: 0; flex: 1 1 auto; display: flex; }
  #mobile-drawer .mobile-navigation { display: flex; align-items: center; justify-content: center; }
  #mobile-drawer .menu { padding: var(--sp-7) var(--drawer-inset); text-align: center; gap: var(--sp-1); }
  #mobile-drawer .menu-item > a,
  #mobile-drawer .drawer-nav-drop-wrap > a {
    padding: .6rem 0;                      /* 줄 높이 ≥ 44px — 손가락 자리 */
    font-size: clamp(1.5rem, 6.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -.02em;
  }
  #mobile-drawer .drawer-nav-drop-wrap { justify-content: center; }
  #mobile-drawer .drawer-nav-drop-wrap > a { flex: none; }
  /* 여닫이 화살표는 안 쓴다 — 상위 이름 자체가 하위로 가는 단추다 */
  #mobile-drawer .drawer-sub-toggle,
  #mobile-drawer .drawer-nav-drop-wrap button { display: none !important; }   /* 카덴스 규칙을 이긴다 */
  #mobile-drawer .current-menu-item > a::before { display: none; }

  /* 하위는 바꿔 끼울 때만 보인다 */
  #mobile-drawer .sub-menu { display: none !important; margin: 0; padding: 0; border: 0; }
  #mobile-drawer.is-subview .menu > .menu-item:not(.is-sub-open) { display: none; }
  #mobile-drawer.is-subview .is-sub-open > .drawer-nav-drop-wrap { display: none; }
  #mobile-drawer.is-subview .is-sub-open > .sub-menu {
    display: flex !important; flex-direction: column; gap: var(--sp-1);
    animation: artium-sheet-in var(--artium-dur) var(--artium-ease);
  }
  #mobile-drawer .sub-menu .menu-item > a {
    padding: .6rem 0;
    font-size: clamp(1.5rem, 6.2vw, 1.75rem);
    font-weight: 700;
    color: var(--artium-ink);
  }
  @keyframes artium-sheet-in { from { opacity: 0; transform: translateY(8px); } }

  /* 「뒤로」 알약 — 하위 목록 맨 위 */
  .artium-drawer__back { display: flex; justify-content: center; margin-bottom: var(--sp-3); }
  .artium-drawer__back button {
    min-height: 44px;
    padding: var(--sp-2) var(--sp-5);
    border: 1.5px solid var(--artium-ink);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--artium-ink);
    font: 600 var(--fs-base) var(--artium-sans);
    letter-spacing: .02em;
  }
  .artium-drawer__back button:focus-visible { outline: 2px solid var(--artium-accent); outline-offset: 3px; }

  /* 바닥 — 띠 대신 알약 셋 */
  .artium-drawer__foot {
    gap: var(--sp-2);
    padding: 0 var(--drawer-inset) var(--sp-7);
    background: transparent;
    border-top: 0;
  }
  .artium-drawer__act {
    min-height: 48px;
    flex-direction: row;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-3);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--artium-bg) 70%, transparent);
    font-size: var(--fs-sm);
    font-weight: 600;
  }
  .artium-drawer__act--booking { background: var(--artium-ink); color: var(--artium-bg); }
  .artium-drawer__act--booking .artium-fa__icon { opacity: 1; }
  .artium-drawer__act:hover { background: color-mix(in srgb, var(--artium-bg) 90%, transparent); }
  .artium-drawer__act--booking:hover { background: var(--artium-ink); }
}
/* 「뒤로」 알약은 폰 한 장 화면의 것 — 태블릿 옆판(카덴스 아코디언)에서는 안 나온다 */
@media (min-width: 1025px) { .artium-drawer__back { display: none; } }
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  #mobile-drawer.is-subview .is-sub-open > .sub-menu { animation: none; }
}

/* ── 지점 고르기 — 서랍 머리 아래 (2026-09-16) ──
   헤더 위의 띠를 걷으면서 폰의 지점 고르기가 여기로 왔다. 지점이 하나면 안 그려진다. */
.artium-drawer__branches {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin: 0 0 var(--sp-5); padding: 0 var(--artium-space);
}
.artium-drawer__branchpick {
  display: block;
  padding: var(--sp-2) var(--sp-5);
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: var(--radius-pill);
  color: inherit; text-decoration: none;
  font-size: var(--fs-base);
  opacity: .7;
}
.artium-drawer__branchpick.is-current {
  background: var(--artium-accent);
  border-color: transparent;
  color: #fff;
  opacity: 1;
}
