/* ACCVIBE mobile app — Olive Young 구조 참조, ACCVIBE 브랜드 톤(블랙+핑크) */
:root {
  --pink: #FF3E6C;
  --pink-soft: #FFEDF2;
  --black: #111111;
  --gray-9: #222;
  --gray-6: #666;
  --gray-4: #999;
  --gray-2: #E8E8E8;
  --gray-1: #F5F5F7;
  --gold: #D4A53C;
  --green: #14B86A;
  --radius: 14px;
  --nav-h: 60px;
  --hdr-h: 52px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: #fff; color: var(--black);
  max-width: 480px; margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
input { font-family: inherit; }
img { display: block; }

/* ---------- header ---------- */
#header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--gray-2);
}
.hdr-row { display: flex; align-items: center; justify-content: space-between; height: var(--hdr-h); padding: 0 14px; }
.logo { font-weight: 900; font-size: 21px; letter-spacing: -0.5px; cursor: pointer; }
.logo span { color: var(--pink); }
.hdr-icons { display: flex; gap: 4px; }
.icon-btn { font-size: 19px; padding: 7px; position: relative; }
.badge {
  position: absolute; top: 0; right: -2px; background: var(--pink); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.search-bar { display: flex; gap: 6px; padding: 0 14px 10px; }
.search-bar input {
  flex: 1; height: 38px; border: 1.5px solid var(--black); border-radius: 19px;
  padding: 0 16px; font-size: 14px; outline: none;
}

/* ---------- layout ---------- */
#page { padding: var(--hdr-h) 0 calc(var(--nav-h) + 20px); min-height: 100vh; }
.section { padding: 18px 14px 6px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.sec-more { font-size: 12px; color: var(--gray-4); font-weight: 600; }

/* ---------- bottom nav ---------- */
#bottomNav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--nav-h); z-index: 50;
  background: #fff; border-top: 1px solid var(--gray-2);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; font-weight: 600; color: var(--gray-4);
}
.nav-item .nav-ico { font-size: 19px; filter: grayscale(1) opacity(0.55); }
.nav-item.active { color: var(--black); }
.nav-item.active .nav-ico { filter: none; }

/* ---------- home: banner ---------- */
.banner-wrap { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 12px 14px 4px; scrollbar-width: none; }
.banner-wrap::-webkit-scrollbar { display: none; }
.banner {
  flex: 0 0 92%; scroll-snap-align: center; border-radius: var(--radius);
  height: 150px; padding: 20px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden;
}
.banner .b-tag { font-size: 11px; font-weight: 700; opacity: .85; letter-spacing: 1.5px; }
.banner .b-title { font-size: 21px; font-weight: 900; line-height: 1.2; margin: 4px 0 2px; }
.banner .b-sub { font-size: 12px; opacity: .9; }
.banner .b-deco { position: absolute; right: -10px; top: -18px; font-size: 90px; opacity: .25; }

/* ---------- home: category icons ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 6px; padding: 16px 14px 4px; }
.cat-ico { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--gray-9); }
.cat-ico .ci {
  width: 52px; height: 52px; border-radius: 18px; background: var(--gray-1);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}

/* ---------- event cards (home) ---------- */
.event-scroll { display: flex; gap: 11px; overflow-x: auto; padding: 4px 14px 14px; scrollbar-width: none; }
.event-scroll::-webkit-scrollbar { display: none; }
.event-card {
  flex: 0 0 188px; height: 116px; border-radius: var(--radius); padding: 14px 15px; color: #fff;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.event-card .ev-deco { position: absolute; right: -8px; top: -14px; font-size: 68px; opacity: .22; }
.event-card .ev-tag { font-size: 10px; font-weight: 800; letter-spacing: 1px; opacity: .9; }
.event-card .ev-title { font-size: 16px; font-weight: 900; line-height: 1.2; margin-top: auto; }
.event-card .ev-sub { font-size: 11px; opacity: .92; margin-top: 4px; }

/* ---------- guide strip (home) ---------- */
.guide-strip {
  margin: 10px 14px 4px; background: var(--gray-1); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.guide-strip .gs-title { font-size: 14px; font-weight: 800; }
.guide-strip .gs-sub { font-size: 11.5px; color: var(--gray-6); margin-top: 3px; }
.guide-strip .gs-go { font-size: 12px; font-weight: 700; color: var(--pink); white-space: nowrap; margin-left: 12px; }

/* ---------- coupon strip ---------- */
.coupon-strip {
  margin: 14px 14px 0; background: var(--black); color: #fff; border-radius: var(--radius);
  padding: 13px 16px; display: flex; align-items: center; justify-content: space-between;
}
.coupon-strip b { color: var(--pink); }
.coupon-strip .cs-go { background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 16px; }

/* ---------- product cards ---------- */
.h-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 14px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.pcard { flex: 0 0 132px; width: 132px; }
.pcard .pimg, .gcard .pimg {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--gray-1);
}
.pcard .pv, .gcard .pv { font-size: 10px; color: var(--gray-4); margin-top: 7px; font-weight: 700; text-transform: uppercase; }
.pcard .pt, .gcard .pt {
  font-size: 12px; line-height: 1.35; margin-top: 2px; height: 32px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.prow { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.poff { color: var(--pink); font-weight: 800; font-size: 14px; }
.pprice { font-weight: 800; font-size: 14px; }
.pcompare { color: var(--gray-4); font-size: 11px; text-decoration: line-through; }
.pbadges { display: flex; gap: 4px; margin-top: 5px; }
.pb { font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; }
.pb.sale { background: var(--pink-soft); color: var(--pink); }
.pb.new { background: #EAF6FF; color: #1B87D6; }
.pb.best { background: #FFF4DC; color: var(--gold); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 10px; padding: 4px 14px 16px; }
.gcard { position: relative; }
.rank-tag {
  position: absolute; top: 0; left: 0; width: 26px; height: 26px; background: var(--black); color: #fff;
  font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  border-radius: 10px 0 10px 0; z-index: 1;
}
.rank-tag.top3 { background: var(--pink); }
.cart-add {
  position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 15px;
  background: rgba(255,255,255,.95); box-shadow: 0 1px 5px rgba(0,0,0,.18); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.img-wrap { position: relative; }

/* ---------- chips & tabs ---------- */
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 12px 14px; scrollbar-width: none; position: sticky; top: var(--hdr-h); background: #fff; z-index: 10; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 17px; font-size: 13px; font-weight: 600;
  background: var(--gray-1); color: var(--gray-6); white-space: nowrap;
}
.chip.active { background: var(--black); color: #fff; }
.seg { display: flex; margin: 12px 14px 0; border-bottom: 2px solid var(--gray-2); }
.seg button { flex: 1; padding: 12px 0; font-size: 15px; font-weight: 800; color: var(--gray-4); border-bottom: 2.5px solid transparent; margin-bottom: -2px; }
.seg button.active { color: var(--black); border-color: var(--black); }

/* ---------- category list ---------- */
.cat-list { padding: 8px 14px; }
.cat-row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 4px;
  border-bottom: 1px solid var(--gray-1); text-align: left;
}
.cat-row .cr-ico { width: 42px; height: 42px; border-radius: 14px; background: var(--gray-1); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.cat-row .cr-name { font-size: 14px; font-weight: 700; flex: 1; }
.cat-row .cr-cnt { font-size: 12px; color: var(--gray-4); }

/* ---------- ranking list ---------- */
.rk-row { display: flex; gap: 12px; padding: 10px 14px; align-items: center; }
.rk-num { width: 26px; font-size: 16px; font-weight: 900; color: var(--gray-9); text-align: center; }
.rk-num.top3 { color: var(--pink); }
.rk-row img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--gray-1); }
.rk-info { flex: 1; min-width: 0; }
.rk-info .pt {
  height: auto; max-height: 34px; font-size: 12.5px; line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ---------- benefits ---------- */
.attend-card {
  margin: 14px; border-radius: var(--radius); background: linear-gradient(135deg, #1a1a1a, #333);
  color: #fff; padding: 18px; display: flex; align-items: center; justify-content: space-between;
}
.attend-card .ac-title { font-size: 15px; font-weight: 800; }
.attend-card .ac-sub { font-size: 12px; opacity: .75; margin-top: 3px; }
.btn-pink { background: var(--pink); color: #fff; font-size: 13px; font-weight: 800; padding: 10px 16px; border-radius: 20px; }
.btn-pink:disabled { background: #555; color: #999; }
.coupon-card {
  margin: 0 14px 12px; border: 1px solid var(--gray-2); border-radius: var(--radius);
  display: flex; overflow: hidden; position: relative;
}
.coupon-card .cc-left { flex: 1; padding: 15px 16px; }
.coupon-card .cc-val { font-size: 21px; font-weight: 900; color: var(--pink); }
.coupon-card .cc-name { font-size: 13px; font-weight: 700; margin-top: 3px; }
.coupon-card .cc-cond { font-size: 11px; color: var(--gray-4); margin-top: 4px; }
.coupon-card .cc-right {
  width: 86px; display: flex; align-items: center; justify-content: center;
  border-left: 1.5px dashed var(--gray-2); flex-direction: column; gap: 4px;
}
.coupon-card .cc-btn { background: var(--black); color: #fff; font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 16px; }
.coupon-card.owned .cc-btn { background: var(--gray-1); color: var(--gray-4); }
.tier-table { margin: 6px 14px 18px; border-radius: var(--radius); border: 1px solid var(--gray-2); overflow: hidden; font-size: 12.5px; }
.tier-table .tr { display: flex; padding: 11px 14px; border-bottom: 1px solid var(--gray-1); align-items: center; }
.tier-table .tr:last-child { border: 0; }
.tier-table .tr.me { background: var(--pink-soft); }
.tier-table b { width: 92px; }
.tier-table .tt-cond { color: var(--gray-4); flex: 1; }
.tier-table .tt-rate { font-weight: 800; color: var(--pink); }
.info-card { margin: 4px 14px 6px; border: 1px solid var(--gray-2); border-radius: var(--radius); padding: 4px 16px; }
.info-row { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--gray-1); align-items: flex-start; font-size: 13px; line-height: 1.45; }
.info-row.no-line { border-bottom: 0; }
.info-row .info-ico { font-size: 19px; width: 24px; text-align: center; flex: 0 0 auto; }
.info-row b { font-weight: 800; }
.info-row .info-sub { color: var(--gray-6); font-size: 12px; }

/* ---------- my page ---------- */
.member-card {
  margin: 14px; border-radius: 18px; padding: 20px;
  background: linear-gradient(135deg, #111 0%, #2b2b2b 60%, #4a1f2c 100%);
  color: #fff; position: relative; overflow: hidden;
}
.member-card .mc-tier { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--pink); }
.member-card .mc-name { font-size: 19px; font-weight: 800; margin-top: 4px; }
.member-card .mc-row { display: flex; gap: 24px; margin-top: 18px; }
.member-card .mc-col .v { font-size: 19px; font-weight: 900; }
.member-card .mc-col .k { font-size: 11px; opacity: .65; margin-top: 2px; }
.member-card .mc-deco { position: absolute; right: -14px; bottom: -24px; font-size: 110px; opacity: .12; }
.progress-wrap { margin: 0 14px 8px; padding: 14px 16px; background: var(--gray-1); border-radius: var(--radius); font-size: 12px; }
.progress-bar { height: 7px; background: var(--gray-2); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--pink); border-radius: 4px; transition: width .4s; }
.my-menu { padding: 6px 14px; }
.my-row { width: 100%; display: flex; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--gray-1); font-size: 14px; font-weight: 600; text-align: left; }
.my-row .mr-ico { width: 30px; font-size: 17px; }
.my-row .mr-val { margin-left: auto; color: var(--pink); font-weight: 800; }
.my-row .mr-arrow { margin-left: 8px; color: var(--gray-4); }
.hist-row { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--gray-1); font-size: 13px; }
.hist-row .h-pts { font-weight: 800; }
.hist-row .h-pts.plus { color: var(--green); }
.hist-row .h-pts.minus { color: var(--pink); }
.hist-row .h-date { color: var(--gray-4); font-size: 11px; margin-top: 2px; }

/* ---------- sheet (모달) ---------- */
#sheetOverlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; }
#sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 20px 20px 0 0; z-index: 95;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateX(-50%) translateY(40px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; background: var(--gray-2); border-radius: 2px; margin: 10px auto 0; }
.sheet-pad { padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); }

/* PDP */
.pdp-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--gray-1); }
.pdp-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-top: 12px; }
.pdp-earn { margin-top: 10px; background: var(--pink-soft); color: var(--pink); font-size: 12px; font-weight: 700; padding: 9px 12px; border-radius: 8px; display: inline-block; }
.pdp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pdp-tags .tg { font-size: 11px; background: var(--gray-1); color: var(--gray-6); padding: 4px 9px; border-radius: 11px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.qty-ctl { display: flex; align-items: center; border: 1px solid var(--gray-2); border-radius: 19px; }
.qty-ctl button { width: 36px; height: 36px; font-size: 17px; }
.qty-ctl span { width: 32px; text-align: center; font-weight: 800; }
.cta-row { display: flex; gap: 9px; margin-top: 16px; }
.cta { flex: 1; height: 50px; border-radius: 25px; font-size: 15px; font-weight: 800; }
.cta.dark { background: var(--black); color: #fff; }
.cta.pink { background: var(--pink); color: #fff; }
.cta.line { border: 1.5px solid var(--gray-2); }

/* cart */
.cart-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--gray-1); }
.cart-item img { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; background: var(--gray-1); }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-t { font-size: 12.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cart-item .ci-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cart-item .ci-x { color: var(--gray-4); font-size: 15px; padding: 2px 6px; }
.sum-box { background: var(--gray-1); border-radius: var(--radius); padding: 15px 16px; margin-top: 16px; font-size: 13px; }
.sum-box .sr { display: flex; justify-content: space-between; margin-bottom: 8px; }
.sum-box .sr.total { font-size: 16px; font-weight: 900; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--gray-2); }
.sum-box .sr .minus { color: var(--pink); font-weight: 700; }
.select-row {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--gray-2); border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 600; margin-top: 10px;
}
.pts-input { display: flex; gap: 8px; margin-top: 10px; }
.pts-input input { flex: 1; border: 1px solid var(--gray-2); border-radius: 10px; padding: 11px 13px; font-size: 14px; outline: none; }
.pts-input button { background: var(--black); color: #fff; border-radius: 10px; padding: 0 16px; font-size: 13px; font-weight: 700; }
.note { font-size: 11px; color: var(--gray-4); margin-top: 8px; line-height: 1.5; }

/* coupon picker */
.cp-row { width: 100%; text-align: left; border: 1px solid var(--gray-2); border-radius: 10px; padding: 13px 14px; margin-bottom: 9px; }
.cp-row.sel { border-color: var(--pink); background: var(--pink-soft); }
.cp-row .v { font-weight: 900; color: var(--pink); font-size: 15px; }
.cp-row .n { font-size: 12px; font-weight: 600; margin-top: 2px; }
.cp-row .c { font-size: 11px; color: var(--gray-4); margin-top: 2px; }
.cp-row.dis { opacity: .45; }

/* toast */
#toast {
  position: fixed; bottom: calc(var(--nav-h) + 18px); left: 50%; transform: translateX(-50%);
  background: rgba(17,17,17,.93); color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 20px; border-radius: 22px; z-index: 99; white-space: nowrap;
}
.empty { text-align: center; color: var(--gray-4); padding: 60px 20px; font-size: 14px; }
.empty .e-ico { font-size: 44px; margin-bottom: 12px; }
.skeleton { text-align: center; padding: 80px 0; color: var(--gray-4); font-size: 13px; }
