/* 에코비즈 고객용 모바일 웹. PC에서는 가운데 480px 폭의 앱 화면으로 보인다. */
:root {
  --green: #1f6f4a;
  --green-dark: #164f35;
  --green-soft: #e7f2ec;
  --accent: #f26b1d;
  --accent-soft: #fff1e8;
  --ink: #1d2320;
  --muted: #6b746f;
  --line: #e4e8e5;
  --bg: #f4f6f4;
  --card: #fff;
  --radius: 14px;
  --tab-h: 62px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px; line-height: 1.5; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.top, .page, .tabbar { max-width: 480px; margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 10; height: 54px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--green); letter-spacing: -.02em; }
.brand img { width: 26px; height: 26px; }
.top-sub { font-size: 13px; color: var(--muted); }

.page { min-height: 100vh; padding: 16px 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); background: var(--bg); }
@media (min-width: 520px) { body { background: #dfe5e1; } .page { box-shadow: 0 0 0 1px var(--line); } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--green); font-weight: 700; }

h1, h2 { letter-spacing: -.02em; }
.page-title { font-size: 22px; margin: 4px 0 14px; }
.kicker { margin: 8px 0 0; font-size: 13px; color: var(--green); font-weight: 700; }
.lead { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; }
.empty a { color: var(--green); font-weight: 700; }
.prose { white-space: pre-line; background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); }

.hero {
  background: linear-gradient(135deg, var(--green) 0%, #2f8f5f 100%); color: #fff;
  border-radius: 18px; padding: 22px 20px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-kicker { margin: 0; font-size: 13px; opacity: .85; }
.hero h1 { margin: 6px 0 14px; font-size: 23px; line-height: 1.35; }

.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 8px; }
.cats a { background: var(--card); border-radius: 12px; padding: 10px 0; text-align: center; font-size: 13px; font-weight: 600; }

section { margin-top: 20px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.sec-head h2 { font-size: 17px; margin: 0; }
.sec-head a { font-size: 13px; color: var(--muted); }

.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; padding: 7px 13px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 쿠폰 카드: 오른쪽 점선으로 티켓 느낌 */
.coupon {
  display: flex; background: var(--card); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
  border: 1px solid var(--line);
}
.coupon-main { flex: 1; padding: 14px 16px; min-width: 0; }
.coupon-store { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.coupon-benefit { font-size: 20px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; margin: 2px 0; }
.coupon-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coupon-side {
  width: 92px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--accent-soft); border-left: 2px dashed #f6c7a8; font-size: 13px; color: #a8470f; text-align: center; padding: 6px;
}
.coupon-side small { font-size: 11.5px; }
.coupon-off { opacity: .55; }
.coupon-off .coupon-side { background: #f0f0f0; color: var(--muted); border-color: #ddd; }

.pill { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px; background: var(--green-soft); color: var(--green); font-weight: 700; }
.pill-accent { background: var(--accent-soft); color: var(--accent); }

.event { display: block; background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); }
.event img { width: 100%; aspect-ratio: 2/1; object-fit: cover; }
.event-body { padding: 14px 16px; }
.event-host { font-size: 12.5px; color: var(--green); font-weight: 700; }
.event-title { font-size: 16px; font-weight: 700; margin: 2px 0; }
.event-sum { font-size: 14px; color: var(--muted); }
.event-date { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.store-list { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.store { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.store:last-child { border-bottom: 0; }
.store-thumb { width: 52px; height: 52px; border-radius: 12px; flex: none; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: 20px; overflow: hidden; }
.store-thumb img { width: 100%; height: 100%; object-fit: cover; }
.store-body { flex: 1; min-width: 0; }
.store-name { font-weight: 700; }
.store-meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 쿠폰 상세 티켓 */
.ticket { background: var(--card); border-radius: 18px; border: 1px solid var(--line); margin-bottom: 14px; }
.ticket-top { padding: 22px 20px 16px; text-align: center; }
.ticket-top .coupon-store { justify-content: center; }
.ticket-benefit { font-size: 30px; font-weight: 800; color: var(--accent); letter-spacing: -.03em; margin: 4px 0; }
.ticket-title { font-size: 16px; font-weight: 600; }
.ticket-cut { height: 0; border-top: 2px dashed var(--line); margin: 0 14px; position: relative; }
.ticket-cut::before, .ticket-cut::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket-cut::before { left: -26px; } .ticket-cut::after { right: -26px; }
.ticket-bottom { padding: 18px 20px 20px; text-align: center; }
.code { font-size: 32px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--green-dark); background: var(--green-soft); border-radius: 12px; padding: 12px 0; }
.code-used { color: var(--muted); background: #f0f0f0; text-decoration: line-through; }

.info { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px 0; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; white-space: pre-line; }
.info a { color: var(--green); font-weight: 600; }

.btn { display: inline-block; border: 0; border-radius: 12px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; background: var(--green); color: #fff; }
.btn:disabled { background: #c9cfcb; cursor: default; }
.btn-block { display: block; width: 100%; padding: 15px; font-size: 16px; }
.btn-accent { background: var(--accent); }
.btn-light { background: #fff; color: var(--green); }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); font-weight: 600; cursor: pointer; }

.form { display: grid; gap: 14px; background: var(--card); padding: 18px; border-radius: var(--radius); margin-bottom: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form label small { color: var(--muted); font-weight: 400; }
.form input:not([type=checkbox]) { font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.form input:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }

.flash { padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; background: var(--green-soft); color: var(--green-dark); }
.flash-warn { background: #fff6e0; color: #8a5a00; }
.flash-err { background: #fdeaea; color: #a32020; }

.join-cta { background: var(--card); border-radius: var(--radius); padding: 18px; text-align: center; font-size: 14px; }
.join-cta p { margin: 0 0 12px; color: var(--muted); }
.my-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; font-size: 17px; }
.error-page .page { padding-top: 80px; }

/* --- 2차: QR, FAQ, AI 질문, 알림·설치, 카카오 --- */
.qr { width: 190px; margin: 6px auto 12px; background: #fff; padding: 6px; border-radius: 12px; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.faq { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { padding: 13px 16px; font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 36px; }
.faq summary::after { content: "+"; position: absolute; right: 16px; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 16px 14px; color: var(--muted); white-space: pre-line; }
.ask { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.ask .sec-head h2 { display: flex; align-items: center; gap: 6px; }
.ask-log { display: grid; gap: 8px; margin-bottom: 10px; }
.ask-log:empty { display: none; }
.bubble { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; white-space: pre-line; }
.bubble.me { justify-self: end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { justify-self: start; background: var(--green-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble.wait { color: var(--muted); }
.bubble.err { background: #fdeaea; color: #a32020; }
#ask-form { display: flex; gap: 8px; }
#ask-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
#ask-form .btn:disabled { background: #c9cfcb; }
.app-tools { display: grid; gap: 8px; margin-bottom: 14px; }
.tool { display: grid; gap: 2px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; font: inherit; cursor: pointer; color: var(--ink); }
.tool small { color: var(--muted); font-size: 12.5px; }
.tool.on { border-color: var(--green); background: var(--green-soft); }
.tool-hint { margin: 0; font-size: 13px; color: var(--muted); background: var(--card); border-radius: 12px; padding: 11px 14px; }
.btn-kakao { background: #fee500; color: #191600; margin-bottom: 4px; text-align: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* --- 3·4차: 쿠폰 종류 배지, 학생, 단골, 스탬프 투어, 약관 --- */
.badge { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 18px; margin-right: 3px; vertical-align: 1px; }
.t-amount, .t-percent { background: #fff1e8; color: #c2510f; }
.t-free { background: #e7f2ec; color: #1f6f4a; }
.t-bogo { background: #efeafd; color: #5b3cc4; }
.t-etc { background: #eef0ef; color: #59615c; }
.t-student { background: #e6f0ff; color: #1d5bd8; }
.t-member { background: #fdf3d8; color: #8a6200; }
.chips-kind a.on { background: var(--accent); border-color: var(--accent); }
.chips-kind .k-student:not(.on) { color: #1d5bd8; border-color: #c9dcff; }
.student-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #e6f0ff; color: #1d5bd8; font-size: 13.5px; font-weight: 600; }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); margin-left: 4px; }
.btn-danger { background: #c62828; }
.heart-on { color: #e0245e; }
.store-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-title .page-title { margin-bottom: 4px; }
.fav-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.fav-btn .heart { color: #e0245e; font-size: 16px; }
.fav-btn.on { border-color: #f4b8cb; background: #fff0f5; }
.fav-hint { margin: 0 0 10px; }
.tour { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #fff8ec, #fff); border: 1px solid #f5dfb8; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.tour-icon { font-size: 30px; }
.tour-body { min-width: 0; }
.tour-mini { display: flex; justify-content: space-between; gap: 10px; background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); }
.tour-mini span { color: var(--accent); font-weight: 700; white-space: nowrap; }
.my-sec { margin-top: 6px; }
.my-links { display: flex; gap: 12px; align-items: center; }
.consent { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: #f6f8f7; }
.consent .check { align-items: flex-start !important; }
.consent .check input { margin-top: 4px; }
.consent a { color: var(--green); text-decoration: underline; }
.consent-detail summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.consent-detail p { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.form select { font: inherit; font-size: 16px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.foot a { color: var(--muted); }
.foot p { margin: 6px 0 0; line-height: 1.6; }
.legal { background: var(--card); border-radius: var(--radius); padding: 18px; font-size: 14px; }
.legal h2 { font-size: 15.5px; margin: 22px 0 6px; }
.legal p { margin: 0 0 8px; color: #39413d; }
.legal-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 13px; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
.legal-table th { background: #f6f8f7; white-space: nowrap; }
.reward-box { background: #fff8ec; border: 1px solid #f5dfb8; border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; font-size: 14.5px; }
.stamp-card { background: var(--card); border-radius: 16px; border: 1px solid var(--line); padding: 16px; margin-bottom: 8px; }
.stamp-head { display: flex; justify-content: space-between; align-items: baseline; }
.stamp-head span { font-size: 22px; font-weight: 800; color: var(--accent); }
.stamp-bar { height: 10px; background: #f0ece4; border-radius: 99px; margin: 8px 0 14px; overflow: hidden; }
.stamp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f6a04d, var(--accent)); border-radius: 99px; }
.stamp-card .done { font-size: 18px; font-weight: 800; text-align: center; color: var(--green-dark); }
.stamp-slot.on { background: var(--accent); color: #fff; }

/* --- 테이블 오더 · 선물하기 --- */
.table-chip { background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; border-radius: 99px; padding: 4px 11px; }
.tabs { position: sticky; top: 54px; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); margin: 0 -16px 12px; padding: 6px 16px; gap: 6px; }
.tabs a { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a b { color: var(--accent); font-size: 12px; }
.tabs a.on b { color: #ffd2b5; }
.notice { background: #fff8ec; border: 1px solid #f5dfb8; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin: 0 0 12px; }
.menu-cat { font-size: 16px; margin: 18px 0 8px; scroll-margin-top: 120px; }
.menu-list { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.menu-list.compact { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.menu-item.soldout { opacity: .5; }
.menu-body { flex: 1; min-width: 0; }
.menu-name { font-weight: 700; }
.menu-desc { font-size: 13px; color: var(--muted); }
.menu-price { font-weight: 700; color: var(--green-dark); margin-top: 2px; }
.soldout-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; flex: none; }
.stepper button { width: 36px; height: 36px; border: 0; background: #fff; font-size: 18px; cursor: pointer; color: var(--green); }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.stepper.has { border-color: var(--accent); } .stepper.has span { color: var(--accent); }
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); z-index: 9; max-width: 448px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 10px 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.cartbar[hidden] { display: none; }
.cartbar span { font-weight: 700; }
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-body { width: 100%; max-width: 480px; background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.sheet-body h3 { margin: 0; }
.sheet-body input, .gift-form input[name=message], .gift-form select { font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fbfcfb; }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 80px); z-index: 30; background: var(--green-dark); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: #b42318; }
.gift-in { background: linear-gradient(135deg, #fff1e8, #fff); border: 1.5px solid #f6c7a8; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; display: grid; gap: 8px; }
.gift-msg { margin: 0; font-size: 16px; font-weight: 700; color: #8a3b0c; }
.gift-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.gift-form { display: grid; gap: 10px; background: var(--card); border-radius: var(--radius); padding: 14px; }
.gift-form h3, #tab-gift h3, #tab-bill h3 { font-size: 15px; margin: 8px 0 0; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; background: #fff; }
.pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #a8470f; }
.pick input:focus-visible + span { outline: 2px solid var(--green); }
.presets { margin: 0; flex-wrap: wrap; }
.presets .preset { flex: none; padding: 7px 11px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font: inherit; font-size: 13px; cursor: pointer; }
.gift-sum { margin: 6px 0 0; font-weight: 700; color: var(--accent); }
.anon { font-size: 14px; display: flex; gap: 8px; align-items: center; }
.mini-list { background: var(--card); border-radius: 12px; overflow: hidden; margin-top: 6px; }
.mini-row { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini-row:last-child { border-bottom: 0; }
.st { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.st-accepted, .st-served { color: var(--green); } .st-pending { color: #b45309; } .st-rejected, .st-canceled, .st-declined { color: #b42318; }
.bill { display: grid; gap: 8px; }
.bill-order { background: var(--card); border-radius: 12px; padding: 10px 14px; }
.bill-order.st-rejected, .bill-order.st-canceled { opacity: .55; }
.bill-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.bill-line { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.bill-total { background: var(--card); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.bill-total > div { display: flex; justify-content: space-between; }
.bill-total .good { color: var(--green); }
.bill-total .due { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 17px; }
.bill-total .due b { color: var(--accent); font-size: 20px; }
.gifts-ok { display: flex; gap: 8px; align-items: center; background: var(--card); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }

/* --- 6차: 타임세일 · 즉석 뽑기 · 상권 지도 · 단체 예약 · 후기 · 친구 초대 --- */
.t-flash { background: #ffe7e0; color: #c2311f; }
.pill-flash { background: #ffe7e0; color: #c2311f; }
.countdown { font-size: 13px; color: #c2311f; }
.countdown.soon, [data-until].soon { color: #c2311f; font-weight: 800; }
.flash-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #ffe7e0; color: #a1281a; font-size: 14px; }
.map-cta, .draw-cta, .group-cta { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0 0; font-size: 14px; }
.map-cta span { font-size: 20px; } .map-cta b, .group-cta > b { margin-left: auto; color: var(--muted); }
.draw-cta { background: linear-gradient(135deg, #fff3d6, #ffe4ef); border-color: #f6d39b; margin-bottom: 10px; }
.draw-cta > span:nth-child(2), .group-cta > span:nth-child(2) { display: grid; min-width: 0; }
.draw-cta small, .group-cta small { color: var(--muted); font-size: 12.5px; }
.draw-emoji { font-size: 28px; }
.draw-go { margin-left: auto; background: var(--accent); color: #fff; font-weight: 800; border-radius: 99px; padding: 6px 14px; flex: none; }
.group-cta { margin: 0 0 12px; border-color: #c9dcff; background: #f3f8ff; }
.group-cta > span:first-child { font-size: 22px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.mini-store { flex: none; width: 120px; background: var(--card); border-radius: var(--radius); padding: 10px; display: grid; gap: 4px; border: 1px solid var(--line); }
.mini-store .store-thumb { width: 100%; height: 72px; }
.mini-store b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-store small { font-size: 12px; color: var(--muted); }

.title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seg { display: inline-flex; background: #e6ebe8; border-radius: 10px; padding: 3px; flex: none; }
.seg a { padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.store-pills { display: grid; gap: 4px; justify-items: end; flex: none; }
.open-dot { white-space: nowrap; }
.open-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: #9aa39e; }
.open-dot.st-open { color: var(--green); font-weight: 700; } .open-dot.st-open::before { background: #22a35a; }
.open-dot.st-dayoff { color: #b42318; } .open-dot.st-dayoff::before { background: #b42318; }
.star { color: #f5a524; }

.map-wrap { position: relative; margin: 0 -16px 8px; }
#map { height: calc(100vh - 54px - var(--tab-h) - 150px); min-height: 360px; background: #e8ece9; z-index: 0; }
.map-me { position: absolute; right: 12px; bottom: 16px; z-index: 500; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); font-size: 20px; color: #2a78d6; cursor: pointer; }
.map-card { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 600; background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.2); display: grid; gap: 8px; }
.map-card[hidden] { display: none; }
.map-card-head { display: flex; gap: 10px; align-items: flex-start; }
.map-card-head img, .map-card-head .store-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.map-card-head > div { flex: 1; min-width: 0; }
.map-close { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }
.map-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.map-card-tags:empty { display: none; }
.map-card-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.map-card-actions .btn { text-align: center; padding: 10px; }
.pin { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: #fff; border: 3px solid #9aa39e; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pin i { transform: rotate(45deg); font-style: normal; font-size: 17px; }
.pin.st-open { border-color: #22a35a; }
.pin.has-coupon { border-color: var(--accent); }
.pin.has-flash { border-color: #e0331f; }
.pin b { position: absolute; top: -8px; right: -8px; transform: rotate(45deg); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.pin.has-flash b { background: #e0331f; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form textarea { font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; resize: vertical; }
.preorder summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.preorder summary small { font-weight: 400; color: var(--muted); }
.consent-one { align-items: flex-start !important; font-size: 13.5px; }
.consent-one input { margin-top: 4px; }
.resv-card { background: var(--card); border-radius: 16px; padding: 18px; border: 1px solid var(--line); display: grid; gap: 6px; margin-bottom: 12px; }
.resv-status { font-weight: 800; font-size: 18px; color: #b45309; }
.st-confirmed .resv-status, .st-seated .resv-status { color: var(--green); }
.st-declined .resv-status, .st-canceled .resv-status, .st-noshow .resv-status { color: #b42318; }
.resv-when { font-size: 16px; font-weight: 700; }
.resv-reply { margin: 0; background: var(--green-soft); border-radius: 10px; padding: 9px 12px; }
.resv-st { font-size: 13px; font-weight: 700; color: #b45309 !important; }
.resv-st.st-confirmed, .resv-st.st-seated { color: var(--green) !important; }
.resv-st.st-declined, .resv-st.st-canceled, .resv-st.st-noshow { color: #b42318 !important; }
.sub-h { font-size: 15px; margin: 16px 0 6px; }
.mini-list a.mini-row { color: inherit; }

.review { background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.review p { margin: 6px 0 0; white-space: pre-line; font-size: 14.5px; }
.review-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.stars { color: #f5a524; letter-spacing: 1px; } .stars i { color: #dde2df; font-style: normal; }
.review-img { margin-top: 8px; max-height: 220px; border-radius: 10px; object-fit: cover; }
.review .reply { background: #f4f6f4; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.inline-right { margin-left: auto; display: inline; }
.star-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.star-pick label { font-size: 40px; color: #dde2df; cursor: pointer; display: block !important; line-height: 1; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: #f5a524; }
.star-pick input:focus-visible + label { outline: 2px solid var(--green); border-radius: 6px; }

.invite-card { background: linear-gradient(135deg, #e7f2ec, #fff); border: 1px solid #cfe5d8; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.invite-card p { margin: 4px 0 10px; font-size: 14px; }
.invite-link { display: flex; gap: 8px; margin-bottom: 6px; }
.invite-link input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }

.gacha { background: var(--card); border-radius: 18px; padding: 18px 16px; margin: 6px 0 14px; display: grid; gap: 12px; justify-items: center; border: 1px solid var(--line); }
.gacha .btn-block { width: 100%; }
.gacha-machine { width: 150px; display: grid; justify-items: center; }
.gacha-dome { position: relative; width: 140px; height: 120px; border-radius: 70px 70px 14px 14px; background: radial-gradient(circle at 35% 30%, #ffffffcc, #dff1ff 60%, #bfe3fb); border: 4px solid #2a78d6; overflow: hidden; }
.gacha-dome i { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(0,0,0,.08); }
.gacha-dome i:nth-child(1) { left: 12px; bottom: 6px; background: linear-gradient(#f26b1d 50%, #fff 50%); }
.gacha-dome i:nth-child(2) { left: 46px; bottom: 4px; background: linear-gradient(#22a35a 50%, #fff 50%); }
.gacha-dome i:nth-child(3) { left: 82px; bottom: 8px; background: linear-gradient(#e0245e 50%, #fff 50%); }
.gacha-dome i:nth-child(4) { left: 28px; bottom: 36px; background: linear-gradient(#f5a524 50%, #fff 50%); }
.gacha-dome i:nth-child(5) { left: 64px; bottom: 34px; background: linear-gradient(#5b3cc4 50%, #fff 50%); }
.gacha-dome i:nth-child(6) { left: 96px; bottom: 40px; background: linear-gradient(#2a78d6 50%, #fff 50%); }
.gacha-body { width: 150px; height: 64px; background: #2a78d6; border-radius: 0 0 16px 16px; display: grid; place-items: center; }
.gacha-slot { width: 46px; height: 26px; background: #164a8a; border-radius: 8px; }
.gacha.shaking .gacha-machine { animation: shake .35s ease-in-out infinite; }
.gacha.won .gacha-dome { border-color: #f26b1d; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .gacha.shaking .gacha-machine { animation: none; opacity: .6; } }
.gacha-result { width: 100%; text-align: center; border-radius: 12px; padding: 12px; display: grid; gap: 8px; justify-items: center; font-size: 17px; }
.gacha-result.win { background: #fff1e8; color: #a8470f; }
.gacha-result.lose { background: #f0f2f1; color: var(--muted); }
.gacha-result.err { background: #fdeaea; color: #a32020; font-size: 14px; }
/* 폼 칸이 화면 밖으로 밀려나지 않게 (2열 그리드 안의 날짜·시간 입력 포함) */
.form label, .row2 > * { min-width: 0; }
.form input:not([type=checkbox]):not([type=radio]), .form textarea, .form select { width: 100%; min-width: 0; max-width: 100%; }
.form input[type=date], .form input[type=time] { -webkit-appearance: none; appearance: none; min-height: 48px; }
