:root {
  --sheet: #f1f3f4;
  --ink: #17222b;
  --rule: #8a98a3;
  --faint: #d9dfe3;
  --mark: #f5b700;
  --muted: #4d5b66;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sheet: #141b21; --ink: #e9eef1; --rule: #6c7b86; --faint: #26313a; --muted: #a4b1ba;
  }
}
:root[data-theme="dark"] {
  --sheet: #141b21; --ink: #e9eef1; --rule: #6c7b86; --faint: #26313a; --muted: #a4b1ba;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background-color: var(--sheet);
  background-image:
    linear-gradient(var(--faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px 48px; }

/* 안내 띠 (미리보기 표시) */
.note {
  display: none; margin: 0 -16px; padding: 8px 16px;
  background: var(--ink); color: var(--sheet); font-size: 13px; text-align: center;
}
.note.on { display: block; }

/* 맨 위 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.ask {
  display: inline-block; padding: 9px 14px; border: 2px solid var(--ink); color: var(--ink);
  font-weight: 700; font-size: 14px; text-decoration: none; background: var(--sheet);
}
.ask:hover { background: var(--mark); }
.ask[hidden] { display: none; }

/* 첫 화면 */
.hero { padding: 26px 0 6px; }
h1 { margin: 0; font-size: clamp(30px, 8.6vw, 54px); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.dim { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--muted); font-size: 15px; font-weight: 500; }
.dim::before, .dim::after {
  content: ""; flex: 1 1 12px; height: 11px;
  border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  background: linear-gradient(var(--rule), var(--rule)) 0 50% / 100% 1px no-repeat;
}
.dim::before { border-right: 0; }
.dim::after { border-left: 0; }
.dim span { flex: 0 1 auto; text-align: center; }

h2 { margin: 36px 0 12px; font-size: 19px; font-weight: 800; }

/* 카드 목록: 썸네일이 주인공 */
.grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (min-width: 900px) { .grid { grid-template-columns: 1fr 1fr 1fr; gap: 26px; } }

.card { display: block; background: var(--sheet); border: 2px solid var(--ink); color: inherit; text-decoration: none; }
a.card:hover .plate { background: var(--mark); }
a.card:hover .chip { background: var(--ink); color: var(--sheet); }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; container-type: inline-size; background: var(--faint); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 임시 썸네일 (실제 이미지가 있으면 쓰이지 않음) */
.ph { position: absolute; inset: 0; padding: 8cqw 0 0 8cqw; background: var(--bg); color: var(--fg); }
.ph-head { margin: 0; font-weight: 800; line-height: 1.2; white-space: pre-line; font-size: 22px; letter-spacing: -0.02em; max-width: 60%; }
.ph-sub { margin: 10px 0 0; color: var(--ac); font-weight: 700; font-size: 13px; }
.ph-phone {
  position: absolute; right: 7%; bottom: -14%; width: 29%; aspect-ratio: 9 / 17;
  border: 3px solid var(--ac); border-radius: 14px; padding: 9% 9% 0;
  display: flex; flex-direction: column; gap: 7%;
  background: color-mix(in srgb, var(--bg) 82%, #fff 18%);
}
.ph-phone i { display: block; height: 6%; border-radius: 3px; background: var(--fg); opacity: .55; }
.ph-phone i:nth-child(1) { width: 62%; background: var(--ac); opacity: 1; }
.ph-phone i:nth-child(3) { width: 80%; }
.ph-phone i:nth-child(5) { width: 70%; }
@supports (font-size: 1cqw) {
  .ph-head { font-size: 6.4cqw; }
  .ph-sub { font-size: 3.4cqw; margin-top: 2.6cqw; }
}
.badge { position: absolute; top: 8px; left: 8px; display: none; padding: 3px 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; }
.badge.on { display: block; }

/* 카드 아래 이름표 */
.plate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 2px solid var(--ink); }
.plate h3 { margin: 0; font-size: 17px; font-weight: 800; }
.plate p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.chip { flex: 0 0 auto; padding: 4px 10px; background: var(--mark); color: #17222b; font-weight: 700; font-size: 13px; }
.chip.go { background: var(--ink); color: var(--sheet); }

/* 문의 / 사업자 정보 */
.contact { margin-top: 44px; padding-top: 22px; border-top: 2px solid var(--ink); }
.contact h2 { margin: 0 0 6px; }
.contact p { margin: 0; color: var(--muted); font-size: 15px; }
.btns a {
  display: inline-block; margin: 12px 10px 0 0; padding: 12px 18px;
  border: 2px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; background: var(--sheet);
}
.btns a:hover { background: var(--mark); }
footer { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
#biz { display: none; margin: 0 0 10px; line-height: 1.7; }
#biz.on { display: block; }
footer p { margin: 0; }

/* ---- 앱 소개 페이지 ---- */
.back { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }

.app-hero { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 18px 0 4px; }
@media (min-width: 760px) { .app-hero { grid-template-columns: minmax(0, 460px) 1fr; gap: 34px; align-items: center; } }
.app-hero .pic { border: 2px solid var(--ink); }
.app-hero h1 { font-size: clamp(34px, 9vw, 52px); }
.app-hero .lead { margin: 10px 0 0; font-size: 17px; color: var(--muted); font-weight: 500; }
.points { list-style: none; margin: 20px 0 0; padding: 0; }
.points li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--rule); font-weight: 700; }
.points li:first-child { border-top: 1px solid var(--rule); }
.points li::before { content: ""; position: absolute; left: 2px; top: 1.1em; width: 9px; height: 9px; background: var(--mark); border: 1px solid var(--ink); }

figure { margin: 0; }
.shot { width: 100%; max-width: 640px; margin: 0 auto; border: 2px solid var(--ink); }
.shot-cap { max-width: 640px; margin: 8px auto 0; color: var(--muted); font-size: 13px; }

.steps { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 720px; }
.steps li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--rule); }
.steps .n { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--sheet); font-weight: 800; }
.steps h3 { margin: 0; font-size: 17px; font-weight: 800; }
.steps p { margin: 3px 0 0; color: var(--muted); font-size: 15px; }
.aside { max-width: 720px; margin-top: 16px; padding: 14px 16px; border: 2px solid var(--ink); background: var(--sheet); border-left: 8px solid var(--mark); }
.aside h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.aside ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.aside li + li { margin-top: 4px; }

.shelf-note { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.shelf { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shelf button { flex: 0 0 min(72vw, 300px); padding: 0; border: 2px solid var(--ink); background: var(--sheet); cursor: zoom-in; scroll-snap-align: start; }
.shelf img { width: 100%; height: auto; }

.lightbox { position: fixed; inset: 0; z-index: 50; display: none; overflow: auto; -webkit-overflow-scrolling: touch; background: rgba(10, 16, 21, .92); padding: 64px 12px 28px; }
.lightbox.on { display: block; }
.lightbox img { display: block; margin: 0 auto; max-width: none; width: auto; height: auto; border: 2px solid var(--sheet); background: #fff; }
.lightbox .lb-hint { position: fixed; left: 12px; top: calc(14px + env(safe-area-inset-top, 0px)); margin: 0; color: #fff; font-size: 13px; opacity: .85; }
.lightbox button { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; padding: 10px 14px; border: 2px solid var(--sheet); background: var(--ink); color: var(--sheet); font-weight: 700; font-size: 15px; cursor: pointer; }
img.zoom { cursor: zoom-in; }

/* ---- 반장수첩 상세 이미지 ---- */
.stack { display: grid; gap: 18px; max-width: 760px; margin: 0 auto; }
.stack img { width: 100%; border: 2px solid var(--ink); }

/* ---- 사장님용: 세로 이미지가 있는 첫 화면 ---- */
.app-hero.tall .pic { max-width: 340px; width: 100%; margin: 0 auto; }
@media (max-width: 759px) { .app-hero.tall > div { order: -1; } }
@media (min-width: 760px) { .app-hero.tall { grid-template-columns: minmax(0, 340px) 1fr; } }

/* ---- 사장님용: 기능 카드 ---- */
.features { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (min-width: 940px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature { border: 2px solid var(--ink); background: var(--sheet); }
.feature .pic { aspect-ratio: 51 / 58; background: #eeebdf; overflow: hidden; }
.feature .pic img { width: 100%; height: 100%; object-fit: cover; }
.feature .txt { border-top: 2px solid var(--ink); padding: 14px 14px 16px; }
.feature h3 { margin: 0; font-size: 18px; font-weight: 800; }
.feature ul { margin: 8px 0 0; padding: 0; list-style: none; }
.feature li { position: relative; padding: 4px 0 4px 16px; color: var(--muted); font-size: 15px; }
.feature li::before { content: ""; position: absolute; left: 0; top: .85em; width: 7px; height: 7px; background: var(--mark); border: 1px solid var(--ink); }

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

.logo { width: 26px; height: auto; flex: 0 0 auto; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: 90vw; padding: 12px 16px; background: #111; color: #fff; font-size: 14px; font-weight: 700; border-radius: 6px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.on { opacity: 1; }
.video-wrap { max-width: 340px; margin: 14px auto 0; aspect-ratio: 9 / 16; border: 2px solid var(--ink); }
.video-wrap iframe { width: 100%; height: 100%; border: 0; }
.video-wide { max-width: 720px; aspect-ratio: 16 / 9; margin-top: 12px; border: 2px solid var(--ink); }
.video-wide iframe { width: 100%; height: 100%; border: 0; }

/* ---- PC 상단 대문(빌보드) ---- */
.billboard { display: none; }
@media (min-width: 900px) {
  .billboard { display: block; position: relative; margin-top: 18px; height: 400px; overflow: hidden; border: 2px solid var(--ink); background: #0b0f12; color: #fff; }
  .bb-slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 460px; align-items: center; gap: 36px; padding: 0 64px 0 56px; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
  .bb-slide.on { opacity: 1; visibility: visible; }
  .bb-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) brightness(.42) saturate(1.2); transform: scale(1.1); }
  .bb-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.25) 60%, rgba(0,0,0,0) 100%); }
  .bb-text, .bb-pic { position: relative; z-index: 1; }
  .bb-tag { margin: 0; color: var(--bb-ac); font-weight: 800; font-size: 13px; letter-spacing: .2em; }
  .bb-text h2 { margin: 10px 0 0; font-size: 40px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
  .bb-text p.copy { margin: 14px 0 0; color: rgba(255,255,255,.82); font-size: 17px; max-width: 30em; }
  .bb-go { display: inline-block; margin-top: 24px; padding: 13px 24px; background: var(--bb-ac); color: #111; font-weight: 800; text-decoration: none; border: 2px solid var(--bb-ac); }
  .bb-go:hover { background: transparent; color: #fff; }
  .bb-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 18px 50px rgba(0,0,0,.55); }
  .bb-arrow { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 26px; cursor: pointer; }
  .bb-arrow:hover { background: rgba(0,0,0,.7); }
  .bb-prev { left: 0; } .bb-next { right: 0; }
  .bb-dots { position: absolute; left: 56px; bottom: 18px; z-index: 3; display: flex; gap: 8px; }
  .bb-dots button { width: 34px; height: 5px; padding: 0; border: 0; background: rgba(255,255,255,.35); cursor: pointer; overflow: hidden; position: relative; }
  .bb-dots button.on { background: rgba(255,255,255,.35); }
  .bb-dots button.on::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: bbfill var(--bb-ms, 5500ms) linear forwards; }
  .billboard.paused .bb-dots button.on::after, .billboard.still .bb-dots button.on::after { animation-play-state: paused; }
  .billboard.still .bb-dots button.on::after { animation: none; }
  @keyframes bbfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---- 폰: 대문도 같은 방식, 좌우로 밀어서 넘김 ---- */
@media (max-width: 899px) {
  .billboard { display: block; position: relative; margin-top: 14px; height: 512px; overflow: hidden; border: 2px solid var(--ink); background: #0b0f12; color: #fff; touch-action: pan-y; }
  .bb-slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; padding: 14px 14px 44px; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
  .bb-slide.on { opacity: 1; visibility: visible; }
  .bb-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.4) saturate(1.2); transform: scale(1.1); }
  .bb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%); }
  .bb-text, .bb-pic { position: relative; z-index: 1; }
  .bb-pic { order: -1; display: block; }
  .bb-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
  .bb-tag { margin: 0; color: var(--bb-ac); font-weight: 800; font-size: 12px; letter-spacing: .16em; }
  .bb-text h2 { margin: 6px 0 0; font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
  .bb-text p.copy { margin: 8px 0 0; color: rgba(255,255,255,.82); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .bb-go { display: inline-block; margin-top: 12px; padding: 10px 18px; background: var(--bb-ac); color: #111; font-weight: 800; font-size: 14px; text-decoration: none; }
  .bb-arrow { display: none; }
  .bb-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; gap: 6px; justify-content: center; }
  .bb-dots button { width: 26px; height: 4px; padding: 0; border: 0; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
  .bb-dots button.on::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: bbfill var(--bb-ms, 5500ms) linear forwards; }
  .billboard.still .bb-dots button.on::after { animation: none; }
  @keyframes bbfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .hero { padding-top: 16px; }
  .hero h1 { font-size: 30px; }
}

.kind-tag { position: absolute; right: 8px; top: 8px; padding: 3px 9px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; }
.kind { display: inline-block; margin: 0 0 8px; padding: 3px 10px; background: var(--mark); color: #111; font-size: 12px; font-weight: 800; }

/* 다른 판매처 배너 */
.channels { margin-top: 26px; padding: 18px 16px; border: 2px solid var(--ink); background: var(--sheet); }
.ch-lead { margin: 0 0 12px; font-weight: 800; font-size: 15px; }
.ch-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .ch-row { grid-template-columns: 1fr 1fr; } }
.ch-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--ink); text-decoration: none; color: inherit; background: var(--faint); }
a.ch-item:hover { background: var(--mark); }
.ch-item b { font-size: 20px; font-weight: 800; }
.ch-item span { flex: 1; color: var(--muted); font-size: 14px; }
.ch-item i { font-style: normal; font-weight: 800; font-size: 13px; padding: 4px 10px; background: var(--ink); color: var(--sheet); }
.ch-item.kmong b { color: #d9a400; }
.ch-item.daangn b { color: #e8590c; }

.channels[hidden] { display: none; }

.channels[hidden] { display: none; }
@media (min-width: 560px) { .ch-row { grid-template-columns: 1fr; } }
.ch-item b { min-width: 2.2em; }
