:root {
  --bg: #faf7f2;
  --ink: #161310;
  --muted: #7a7168;
  --accent: #c24a12;
  --card: #ffffff;
  --line: #e8ddd0;
  --gold: #9a7424;
  --kakao: #fee500;
  --soft: #ece4da;
  --radius: 16px;
  --radius-sm: 12px;
  --top: 56px;
  --tab: 64px;
  --page: 1120px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body.guest {
  font-family: Pretendard, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.038em; }
p { margin: 0; }

.bar-inner,
.main:not(.main-flush),
.flash-list,
.tabbar-inner,
.map-sheet {
  width: min(100%, var(--page));
  margin-left: auto;
  margin-right: auto;
}
.main:not(.main-flush) { padding: calc(var(--top) + 20px) var(--gutter) calc(var(--tab) + 28px); }
.main-flush { padding: var(--top) 0 var(--tab); }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--top);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
.bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 9px; }
.logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-style: italic;
  font-weight: 800;
  font-size: 16px;
  font-family: "Times New Roman", Times, serif;
}
.logo.lg { width: 52px; height: 52px; font-size: 28px; border-radius: 13px; margin: 0 auto 16px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.05em; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--card);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.tabbar-inner {
  height: var(--tab);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 4px;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #a39a91;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-on { color: var(--accent); }

.hero-share {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px 0 4px;
  margin-bottom: 36px;
}
.hero-copy h1 {
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.12;
  font-weight: 700;
  max-width: 7.4em;
}
.kicker {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}
.lede { color: var(--muted); line-height: 1.7; margin-top: 14px; font-size: 15px; }
.lede.tight { margin-top: 8px; }
.hero-share .lede { max-width: 26em; }
.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 999px;
  min-height: 46px;
}

.block { margin: 0 0 40px; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.block-head h2 { font-size: 17px; font-weight: 700; }
.block-head a { color: var(--muted); font-size: 13px; font-weight: 600; }

.cover { background: var(--soft); overflow: hidden; position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-wide { aspect-ratio: 16 / 9; border-radius: 18px; }
.cover-store { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.cover-photo { aspect-ratio: 4 / 3; }
.cover-event { aspect-ratio: 16 / 10; }
.cover-sm { width: 76px; height: 76px; flex: none; border-radius: 0; aspect-ratio: auto; }
.cover-thumb { width: 120px; height: 90px; flex: none; border-radius: var(--radius-sm); aspect-ratio: auto; }

.off-badge {
  position: absolute;
  left: 10px; top: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.event-card, .deal-card, .product-card, .coupon-card, .profile-card, .store-row, .review-list li, .ticket {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.event-card { display: grid; }
.event-body { padding: 18px 18px 20px; }
.event-body h3, .event-title { font-size: 20px; margin: 10px 0 6px; font-weight: 700; }
.event-page .cover-wide { margin-bottom: 18px; }
.event-page .event-title { font-size: 26px; margin: 8px 0 6px; }
.event-page .pill { margin-top: 0; }
.pill {
  display: inline-flex;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.round-meta { font-size: 13px; font-weight: 600; margin: 14px 0 8px; font-variant-numeric: tabular-nums; color: var(--muted); }
.round-meta.lg { font-size: 17px; margin: 18px 0 10px; color: var(--ink); font-weight: 700; }
.round-bar { height: 3px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.round-bar i { display: block; height: 100%; background: var(--ink); }

.deal-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: none;
}
.deal-rail::-webkit-scrollbar { display: none; }
.deal-card { flex: 0 0 196px; scroll-snap-align: start; }
.deal-body, .product-body { padding: 12px 13px 14px; }
.nearby-body { padding: 12px 2px 0; }
.deal-store, .meta-line { color: var(--muted); font-size: 12px; margin-top: 2px; }
.deal-body h3, .nearby-body h3, .product-body h3 { font-size: 15px; font-weight: 700; margin-top: 2px; }
.off {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.deal-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.deal-price s { color: #b3aaa2; font-size: 12px; font-weight: 500; }
.deal-price strong { font-size: 15px; font-weight: 800; }

.nearby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; }
.nearby-card { display: block; }
.one-line {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips-lg { margin-top: 0; gap: 8px; }
.chip, .chip-btn {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover, .chip-btn:hover { border-color: #cfc3b6; }
.chip-btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.page-title { font-size: 24px; margin: 0 0 18px; letter-spacing: -0.045em; font-weight: 700; }
.empty { color: var(--muted); padding: 36px 8px; text-align: center; grid-column: 1 / -1; font-size: 14px; }

.search-form { display: flex; gap: 8px; margin: 0 0 28px; }
.search-form input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  min-height: 50px;
}
.search-form input:focus,
.stack input:focus,
.stack select:focus,
.stack textarea:focus,
select:focus,
textarea:focus { border-color: #c9b6a6; }
.search-form button, .btn {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  min-height: 46px;
}
.search-form button { background: var(--ink); color: #fff; }

.store-page { margin-bottom: 4px; }
.store-hero { margin: -20px calc(var(--gutter) * -1) 0; }
.store-hero .cover-wide {
  border-radius: 0;
  aspect-ratio: 4 / 3;
  max-height: 52vh;
}
.store-head { display: flex; justify-content: space-between; align-items: flex-start; margin: 18px 0 8px; }
.store-head h1 { font-size: 26px; font-weight: 700; }
.intro { font-size: 15px; line-height: 1.7; margin: 6px 0 10px; color: #3a342f; }
.heart {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: #d4c8bc;
  flex: none;
}
.heart svg { width: 22px; height: 22px; }
.heart.is-on { color: var(--ink); }
.heart.is-on svg { fill: currentColor; }
.addr-copy {
  background: transparent; border: 0; padding: 0;
  color: var(--muted); font-size: 14px; cursor: pointer; text-align: left;
  margin: 6px 0 10px;
}
.cta-stack { margin: 20px 0 36px; }
.cta-row { display: grid; grid-template-columns: 1fr 1.45fr; gap: 8px; }
.cta-row form { margin: 0; }
.cta-note { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 12px 0 10px; }
.channel-row { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--card); border: 1px solid var(--line) !important; color: var(--ink); }
.btn-outline { background: transparent; border: 1.5px solid var(--ink) !important; color: var(--ink); }
.btn-sm { width: auto; padding: 8px 12px; font-size: 13px; margin-top: 8px; min-height: 36px; }
.btn-kakao { background: var(--kakao); color: #191600; width: 100%; border-radius: 14px; }
.full { width: 100%; margin-top: 18px; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.deal-share { margin-top: 10px; }
.mini-seg {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 8px;
}
.mini-seg label {
  text-align: center; font-size: 12px; font-weight: 700; padding: 7px 4px; border-radius: 8px; cursor: pointer;
}
.mini-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mini-seg label.is-on,
.mini-seg label:has(input:checked) { background: var(--card); border: 1px solid var(--line); }

.review-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.review-list li { padding: 16px 18px; }
.review-meta { color: var(--muted); font-size: 12px; margin-bottom: 6px; }

.ticket-box, .enter-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0 0;
}
.ticket-box h2, .enter-box h2 { font-size: 16px; margin-bottom: 8px; }
.ticket-stat { font-size: 13px; font-weight: 600; margin-top: 10px; font-variant-numeric: tabular-nums; }
.qty-form { display: flex; gap: 8px; margin-top: 12px; align-items: end; }
.qty-form label { flex: 1; font-size: 13px; color: var(--muted); }
.qty-form input, .stack input, .stack select, .stack textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card);
  outline: none;
}
.qty-form .btn { width: auto; flex: none; padding: 12px 16px; }
.cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.pick-card {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pick-card:hover { background: var(--card); }

.result { text-align: center; padding: 48px 24px 28px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.result h1 { font-size: 26px; margin: 8px 0 10px; font-weight: 700; }
.result .cta-row { margin: 22px auto 0; max-width: 320px; }

.map-canvas { height: calc(100dvh - var(--top) - var(--tab)); width: 100%; }
.dongne-pin { background: transparent; border: 0; }
.pin-dot {
  display: block; width: 14px; height: 14px; border-radius: 50% 50% 50% 0;
  background: var(--ink);
  transform: rotate(-45deg);
}
.map-sheet {
  position: fixed;
  left: 50%; bottom: calc(var(--tab) + 16px);
  transform: translateX(-50%);
  padding: 0 var(--gutter);
  z-index: 15;
}
.mini-card {
  display: flex; gap: 12px; padding: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}

.seg {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 16px;
}
.seg-2 { grid-template-columns: 1fr 1fr; }
.seg a {
  text-align: center; padding: 10px 6px; border-radius: 11px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.seg a.is-on { background: var(--ink); color: #fff; }
.coupon-list { display: grid; grid-template-columns: 1fr; gap: 12px; }

.ticket {
  display: grid;
  grid-template-columns: 84px 14px 1fr;
  align-items: stretch;
}
.ticket .cover-sm {
  width: 100%; height: 100%; border-radius: 0; min-height: 92px;
}
.ticket-cut {
  background:
    radial-gradient(circle at 7px -1px, var(--bg) 7px, transparent 7.5px) top,
    radial-gradient(circle at 7px calc(100% + 1px), var(--bg) 7px, transparent 7.5px) bottom,
    repeating-linear-gradient(to bottom, transparent 0 5px, var(--line) 5px 7px);
  background-repeat: no-repeat, no-repeat, repeat-y;
  background-position: top, bottom, 6px 10px;
  background-size: 14px 14px, 14px 14px, 2px calc(100% - 20px);
}
.ticket-body { padding: 14px 14px 14px 4px; min-width: 0; }
.ticket-body h3 { font-size: 15px; }
.coupon-card { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.ticket + .stack,
.ticket + .notice { margin-top: 18px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { font-size: 13px; font-weight: 700; }
.apply-box, .notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card-form .apply-box { border: 0; padding: 4px 0 0; background: transparent; }
.notice { text-align: center; }
.notice p { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 16px; }
.apply-box .price { font-size: 22px; font-weight: 800; margin-top: 8px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; line-height: 1.55; }

.profile-card { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 12px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; background: var(--soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { font-size: 18px; font-weight: 700; }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.kpi-row > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kpi { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 6px; }
.gold { color: var(--gold); }
.menu-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.menu-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.menu-list a:last-child { border-bottom: 0; }
.menu-list a::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid #cfc3b6; border-top: 1.6px solid #cfc3b6; transform: rotate(45deg); }

.login-page { text-align: center; padding: 28px 0 20px; max-width: 400px; margin: 0 auto; }
.login-page h1 { font-size: 26px; margin-bottom: 8px; font-weight: 700; }
.login-page .stack { text-align: left; margin: 24px 0 12px; }
.login-page .btn { margin-top: 4px; }
.card-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.auth-switch { margin-top: 22px; font-size: 14px; color: var(--muted); }
.auth-switch a { font-weight: 700; color: var(--ink); }
.or-line { color: var(--muted); font-size: 13px; margin: 16px 0; }
.coming-wait { text-align: center; padding: 88px 16px 40px; }
.coming-wait h1 { font-size: 24px; margin: 20px 0 0; font-weight: 700; }
.wait-brand { display: inline-flex; }
.wait-brand .logo.lg { margin-bottom: 0; }
body.wait-page .main { padding-bottom: 40px; padding-top: 48px; }
.share-done {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 22px;
  text-align: center;
}
.share-done .logo { margin: 0 auto 14px; }
.share-done .coupon-card, .share-done .ticket { text-align: left; margin: 18px 0; }
.share-url {
  background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 12px; word-break: break-all; margin: 12px 0;
  color: var(--muted);
}
.share-form, .stack.tight { margin-top: 10px; }
select, textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
  outline: none;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
}
.choice input { margin: 0; accent-color: var(--ink); }

.flash-list { padding: calc(var(--top) + 10px) var(--gutter) 0; }
.flash {
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; margin: 8px 0;
}
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + 20px);
  transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 999px; font-size: 14px; z-index: 40;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.no-tabs .tabbar { display: none; }
body.no-tabs .main:not(.main-flush) { padding-bottom: 36px; }
.store-list { display: flex; flex-direction: column; gap: 12px; }
.store-row { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }

@media (min-width: 760px) {
  :root { --gutter: 32px; --top: 60px; }
  .hero-share {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 36px 0 8px;
    margin-bottom: 48px;
  }
  .store-hero { margin: 0; }
  .store-hero .cover-wide {
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    max-height: 440px;
  }
  .event-card { grid-template-columns: 1.15fr 1fr; }
  .cover-event { aspect-ratio: 16 / 9; min-height: 240px; }
  .deal-card { flex: 0 0 calc((100% - 24px) / 3); }
  .nearby-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px 18px; }
  .product-grid { grid-template-columns: 1fr 1fr 1fr; }
  .coupon-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
  .home-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 12px;
  }
  .home-grid .block { margin-bottom: 0; }
  .deal-rail {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    gap: 14px;
  }
  .deal-card { flex: none; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
