/* templates/base.html의 <style>에서 옮김(2026-11-24) — 페이지마다 다시 받지 않게. 고치면 그 템플릿의 ?v=를 올린다. */
:root {
  --bg: #fff5f7;
  --bg-deep: #fde7ee;
  --surface: #fffefe;
  --surface-muted: #fff0f4;
  --line: #f2d7df;
  --text: #30262b;
  --muted: #7d6b72;
  --brand: #ea89a6;
  --brand-strong: #d9688d;
  /* 주 행동(구매) 전용. 벚꽃과 **같은 색상(340°)**이고 명도만 낮췄다.
     `--brand-strong`을 그대로 쓰지 못하는 이유는 흰 글씨 대비가 3.3:1이라
     WCAG AA(4.5:1)에 못 미치기 때문이다. 이 값은 4.7:1이다.
     빨강(#e8384f)을 쓰면 대비는 나오지만 353°라 경고색으로 읽혀 브랜드에서 벗어난다. */
  --brand-deep: #c04a72;
  --brand-deep-hover: #a83e62;
  --brand-soft: #ffe0e8;
  --accent: #ff7c6d;
  --shadow: 0 16px 40px rgba(164, 74, 110, 0.10);
  --radius: 20px;
}

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

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(234, 137, 166, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 124, 109, 0.12), transparent 24%),
    linear-gradient(180deg, #fffafc 0%, var(--bg) 34%, var(--bg-deep) 100%);
}

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

.wrap {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 40px;
}

.site-shell { display:grid; gap:14px; }
.site-shell > * { min-width: 0; }

.site-header-shell {
  position: relative;
  --site-header-visible-top: 10px;
  --site-header-hidden-top: calc((var(--site-header-height, 0px) + 12px) * -1);
  min-width: 0;
  overflow-anchor: none;
}

.site-header-shell.is-sticky-ready {
  position: sticky;
  top: var(--site-header-visible-top);
  z-index: 70;
  transition: top 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: top;
}

.site-header-shell.is-hidden {
  top: var(--site-header-hidden-top);
}

.site-header-shell.is-hidden .site-top {
  opacity: 0.02;
  pointer-events: none;
}

.site-header-shell.is-visible .site-top {
  opacity: 1;
  pointer-events: auto;
}

.site-top {
  background: rgba(255, 251, 253, 0.96);
  border: 1px solid rgba(242, 215, 223, 0.92);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 10px 14px 12px;
  backdrop-filter: blur(10px);
  transition: opacity 0.22s ease, box-shadow 0.22s ease;
}

.site-top-main {
  display: grid;
  grid-template-columns: auto minmax(240px, 460px) auto;
  gap: 12px;
  align-items: center;
}

.page-header {
  display: inline-flex;
  align-items: center;
  width: clamp(140px, 15vw, 168px);
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  overflow: visible;
}

.site-brand__logo {
  display: block;
  width: 100%;
  height: clamp(36px, 3vw, 40px);
  object-fit: contain;
  object-position: left center;
}

.site-header-search {
  width: 100%;
  justify-self: center;
  min-width: 0;
}

.site-header-search__form {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  gap: 0;
}

.site-header-search__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.site-header-search__input {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 46px 0 16px;
  border: 1px solid rgba(217, 104, 141, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  font-size: 0.95rem;
}

.site-header-search__input::placeholder {
  color: #9a8790;
}

.site-header-search__submit {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 16px rgba(217, 104, 141, 0.18);
}

.site-header-search__submit svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.staff-write-actions {
  display: contents;
}

/* ── 헤더 사용자 메뉴 ────────────────────────────────────────────────
   출석체크·포인트샵이 늘어나며 헤더가 붐볐다. 아바타 하나로 접고,
   자주 안 누르는 항목은 안으로 넣는다. 기능이 더 늘어도 헤더는 그대로다. */
.user-menu {
  position: relative;
  flex: 0 0 auto;
}

.user-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  margin: 0;
  padding: 4px 6px 4px 4px;
  border: 1px solid rgba(233, 122, 154, 0.26);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff6f9, #ffe8ef);
  color: var(--brand-strong);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(233, 122, 154, 0.12);
}

.user-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.user-menu__avatar--lg {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.user-menu__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.16s ease;
}

.user-menu[data-open="true"] .user-menu__chevron {
  transform: rotate(180deg);
}

.user-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(80, 50, 60, 0.18);
}

.user-menu__panel[hidden] {
  display: none;
}

/* 프로필 줄은 내 계정으로 가는 링크다.
   `.top-actions a`의 알약 버튼 스타일을 여기서도 끈다(선택자 두 개라 우선순위가 높다). */
.top-actions .user-menu__profile {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  margin-bottom: 4px;
  background: none;
  box-shadow: none;
  color: var(--text);
  font-weight: 400;
  font-size: inherit;
  line-height: normal;
  text-align: left;
}

.top-actions .user-menu__profile:hover {
  background: var(--surface-muted);
}

.user-menu__profile-go {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.user-menu__profile-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-menu__profile-text strong {
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.user-menu__profile-sub {
  color: var(--muted);
  font-size: 0.76rem;
}

.user-menu__profile-sub b {
  color: var(--brand-strong);
}

/* `.top-actions a`의 알약 버튼 스타일을 여기서는 끈다. 목록 항목이라 배경이 없어야 한다. */
.top-actions .user-menu__item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
}

.top-actions .user-menu__item:hover {
  background: var(--surface-muted);
}

.top-actions .user-menu__item--quiet {
  color: var(--muted);
  font-weight: 600;
}

.user-menu__divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: auto;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(233, 122, 154, 0.26);
  background: linear-gradient(135deg, #fff6f9, #ffe8ef);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(233, 122, 154, 0.12);
}

.flash-messages {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.flash-message {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(125, 107, 114, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 10px 22px rgba(48, 38, 43, 0.06);
  font-size: 14px;
  font-weight: 700;
}

.flash-message.success {
  border-color: rgba(34, 197, 94, 0.24);
  background: #f0fdf4;
  color: #166534;
}

.flash-message.error {
  border-color: rgba(239, 68, 68, 0.24);
  background: #fff1f2;
  color: #b91c1c;
}

/* 칸 수만큼 가로를 나눠 채운다(2026-11-17 — 5칸 고정이라 메뉴가 4개가 되자 오른쪽 한 칸이 비었다). */
.site-nav {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(0, 1fr);
  gap:10px;
  margin-top:12px;
}

.nav-link {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:10px 12px;
  border-radius:16px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav-link__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.nav-link__graphic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 11px;
  border: 1px solid rgba(217, 104, 141, 0.26);
  background: linear-gradient(160deg, #fff9fb, #ffdce7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 7px 14px rgba(217, 104, 141, 0.14);
}

.nav-link__graphic::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 232, 239, 0.2));
}

.nav-link__graphic::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand);
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 8px rgba(233, 122, 154, 0.2);
}

.nav-link__graphic svg {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  stroke: var(--brand-strong);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 운영자 할 일 띠 — 번호를 받아 보내야 하는 쿠폰 경품. 플래시 메시지와 본문 사이 한 줄. (CSS 주석은 페이지에 그대로 실린다 — 테스트가 찾는 문구를 여기 적지 말 것) */
.staff-todo { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 11px 14px; border: 1px solid #f0c36d; border-radius: 12px; background: #fff8e6; color: #5c3d00; font-size: .88rem; text-decoration: none; }
.staff-todo__icon { flex: 0 0 auto; font-size: 1.1rem; }
.staff-todo__text { flex: 1 1 auto; min-width: 0; line-height: 1.45; }
.staff-todo__go { flex: 0 0 auto; color: #a15c00; font-weight: 800; white-space: nowrap; }
.user-menu__item--todo { color: #a15c00; font-weight: 800; }
/* 오늘특가 탭의 스탬프 점 — "이 탭에서 사면 스탬프"라는 표시. 노출 대상(header_stamps_visible)에게만 붙는다. */
.nav-link__dot { display: inline-block; width: 7px; height: 7px; margin: 0 0 7px 3px; border-radius: 50%; background: var(--brand-deep, #c04a72); box-shadow: 0 0 0 2px #fff; vertical-align: baseline; }
.nav-link__label {
  min-width: 0;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}
/* 꼬리표(2026-11-17 운영자 요청) — 오늘특가·혜택이 무엇인지 메뉴만 보고는 알 수 없었다. 스탬프가 공개된 때만 붙는다.
   넓은 화면은 긴 말(스탬프 적립 · 스탬프로 선물), 좁아지면 짧은 말(적립 · 선물), 휴대폰은 칸 오른쪽 위 구석에. */
.nav-link__hint {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(192, 74, 114, .12);
  color: var(--brand-deep, #c04a72);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-link__hint-short { display: none; }
.nav-link:hover .nav-link__hint,
.nav-link.is-active .nav-link__hint { background: rgba(255, 255, 255, .24); color: #fff; }

@media (max-width: 1180px) and (min-width: 641px) {
  .site-nav {
    gap: 8px;
  }

  .nav-link {
    min-height: 50px;
    padding: 9px 8px;
    border-radius: 15px;
  }

  .nav-link__inner {
    gap: 6px;
  }

  .nav-link__graphic {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 10px;
  }

  .nav-link__label {
    font-size: 13px;
    letter-spacing: -0.04em;
  }
}

@media (max-width: 960px) and (min-width: 641px) {
  .site-nav {
    gap: 7px;
  }

  .nav-link {
    min-height: 48px;
    padding: 8px 6px;
  }

  .nav-link__inner {
    gap: 5px;
  }

  .nav-link__graphic {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .nav-link__label {
    font-size: 12px;
  }

  .nav-link__hint { padding: 3px 6px; font-size: 10px; }
  .nav-link__hint-full { display: none; }
  .nav-link__hint-short { display: inline; }
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 18px rgba(233, 122, 154, 0.22);
}

.nav-link:hover .nav-link__graphic,
.nav-link.is-active .nav-link__graphic {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 9px 18px rgba(130, 33, 67, 0.12);
}

.nav-link:hover .nav-link__graphic::before,
.nav-link.is-active .nav-link__graphic::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
}

.nav-link:hover .nav-link__graphic svg,
.nav-link.is-active .nav-link__graphic svg {
  stroke: #fff;
}

.nav-link:hover .nav-link__graphic::after,
.nav-link.is-active .nav-link__graphic::after {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 6px rgba(255, 255, 255, 0.18);
}

.site-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-subnav::-webkit-scrollbar { display: none; }

.site-subnav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(225, 215, 200, 0.95);
  background: #fffdfd;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  transition: 0.18s ease;
}

.site-subnav__link:hover {
  border-color: rgba(217, 104, 141, 0.32);
  color: var(--brand-strong);
  background: #fff7fa;
}

/* 🔥인기(홈 첫 화면, 2026-11-17) — 다른 탭과 같은 모양에 글자만 불꽃 색. 켜졌을 때는 다른 탭과 똑같이 칠한다. */
.site-subnav__link--popular:not(.is-active) { color: #d9480f; font-weight: 800; }
.site-subnav__link.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 16px rgba(217, 104, 141, 0.18);
}

.page-content {
  min-height: 320px;
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(225, 215, 200, 0.95);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7cfc2;
  border-radius: 10px;
  margin: 4px 0 10px;
  font: inherit;
  background: #fff;
  color: inherit;
}

button {
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
}

.site-footer {
  margin-top: 28px;
  padding: 24px 12px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer a {
  color: inherit;
  margin: 0 6px;
}

@media (max-width: 900px) {
  .wrap { width: min(100%, calc(100% - 20px)); }
  .site-top-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }
  .page-header {
    width: clamp(126px, 20vw, 150px);
  }
}

@media (max-width: 640px) {
  .wrap { padding-top:10px; }
  .site-header-shell { --site-header-visible-top: 8px; }
  .site-header-shell.is-sticky-ready { transition-duration: 0.38s; }
  .site-top { padding:9px 10px 10px; border-radius:20px; }
  .site-top-main { gap:8px; }
  .page-header {
    width: clamp(110px, 29vw, 132px);
  }
  .site-brand__logo {
    height: clamp(28px, 8vw, 32px);
  }
  .site-header-search__input {
    height: 38px;
    padding: 0 40px 0 12px;
    font-size: 0.84rem;
  }
  .site-header-search__submit {
    width: 30px;
    height: 30px;
    min-width: 30px;
    right: 4px;
  }
  .top-links {
    max-width: min(42vw, 220px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .top-links::-webkit-scrollbar { display: none; }
  /*
    사용자 메뉴가 열려 있는 동안에는 잘라내지 않는다.
    `overflow-x: auto`만 줘도 **세로가 함께 `auto`로 계산**되어(CSS overflow 규칙)
    아래로 펼쳐지는 드롭다운이 통째로 잘린다. 데스크탑에는 이 규칙이 없어서
    멀쩡하고 모바일에서만 "눌러도 아무것도 안 뜨는" 것으로 보였다(2026-08-01).
    열려 있을 때만 푸는 이유: 평소에는 로그아웃 상태의 버튼들이 넘칠 때 가로 스크롤이 필요하다.
  */
  .top-links.is-menu-open {
    overflow: visible;
  }
  .top-actions { gap:6px; }
  .top-actions a {
    padding:7px 10px;
    font-size:0.75rem;
  }
  .site-nav {
    gap:6px;
  }
  /* 휴대폰에서도 아이콘을 둔다(2026-11-17 운영자 요청 — 글자만 있으니 메뉴처럼 보이지 않았다).
     아이콘은 이름 **옆**이다 — 위아래로 쌓았더니 어색하다는 지적으로 같은 날 되돌렸다. 칸이 좁아(390px에서 83px) 아이콘은 작게, 구석 점은 뺀다. */
  .nav-link {
    min-height:46px;
    padding:8px 3px;
    font-size:12px;
    border-radius:13px;
  }
  .nav-link__inner { gap: 4px; }
  .nav-link__graphic {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 7px;
    box-shadow: none;
  }
  .nav-link__graphic::before { inset: 3px; border-radius: 5px; }
  .nav-link__graphic::after { display: none; }
  .nav-link__graphic svg { width: 13px; height: 13px; }
  .nav-link__label {
    font-size:12px;
    letter-spacing:-0.04em;
    white-space:nowrap;
  }
  .nav-link__hint {
    position: absolute;
    top: 2px;
    right: 3px;
    padding: 2px 4px;
    background: var(--brand-deep, #c04a72);
    color: #fff;
    font-size: 8.5px;
  }
  .nav-link__hint-full { display: none; }
  .nav-link__hint-short { display: inline; }
  .nav-link:hover .nav-link__hint,
  .nav-link.is-active .nav-link__hint { background: #fff; color: var(--brand-deep, #c04a72); }
  .site-subnav {
    gap: 6px;
    margin-top: 8px;
  }
  .site-subnav__link {
    min-height: 31px;
    padding: 0 11px;
    font-size: 0.76rem;
  }
}

/* 아주 좁은 화면(340px 이하)은 칸이 65px뿐이라 아이콘까지 두면 이름이 잘린다 — 이름만 남긴다. */
@media (max-width: 340px) {
  .nav-link__graphic { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header-shell.is-sticky-ready,
  .site-top {
    transition: none;
  }
}
