/* 달려라 행진 공통 스타일 — 숨고·짐싸 톤(흰 카드·연회색 바탕) + 행진 컬러(블루·옐로·핑크) */
:root{
  --p:#2F80FF;--p2:#5B9BFF;--pl:#EAF2FF;--y:#FFE066;--pk:#FF5C8A;
  --bg:#F5F6FA;--card:#fff;--tx:#1B1D2A;--mu:#6B7280;--bd:#E9EBF2;
  --ok:#16A34A;--warn:#F59E0B;--r:16px;
  --st-new:#6B7280;--st-accepted:#2F80FF;--st-doing:#F59E0B;--st-done:#16A34A;
}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--tx);font-family:Pretendard,Inter,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;line-height:1.55;font-feature-settings:"tnum";padding-bottom:84px}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
input,select,textarea{font-family:inherit;font-size:16px}
.wrap{max-width:520px;margin:0 auto;padding:0 16px}
.hidden{display:none!important}

/* 헤더 */
.top{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--bd)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;height:56px}
.brand{display:flex;align-items:center;gap:8px;font-weight:900;font-size:19px;letter-spacing:-.5px}
.brand img{width:32px;height:32px}
.brand b{color:var(--p)}
.top .back{width:40px;height:40px;border:0;background:none;font-size:22px;margin-left:-10px}
.top .title{font-weight:700;font-size:17px}
.call{display:inline-flex;align-items:center;gap:6px;background:var(--pl);color:var(--p);font-weight:700;border-radius:999px;padding:7px 12px;font-size:14px}

/* 히어로 */
.hero{background:linear-gradient(160deg,#2F80FF 0%,#1E5FD6 100%);color:#fff;padding:26px 0 30px;position:relative;overflow:hidden}
.hero .wrap{display:flex;align-items:center;gap:12px}
.hero .txt{flex:1}
.hero .tag{display:inline-block;background:var(--y);color:#1B1D2A;font-weight:800;font-size:12px;padding:3px 10px;border-radius:999px;transform:rotate(-3deg);margin-bottom:10px}
.hero h1{margin:0 0 8px;font-size:30px;line-height:1.15;font-weight:900;letter-spacing:-1px}
.hero h1 span{color:var(--y)}
.hero p{margin:0;font-size:14px;opacity:.92}
.hero img{width:128px;height:128px;flex:none;filter:drop-shadow(0 8px 16px rgba(0,0,0,.25))}

/* 섹션·카드 */
.sec{padding:22px 0 0}
.sec h2{margin:0 0 12px;font-size:17px;font-weight:800;display:flex;justify-content:space-between;align-items:center}
.sec h2 a{font-size:13px;color:var(--mu);font-weight:500}
.card{background:var(--card);border-radius:var(--r);box-shadow:0 1px 2px rgba(27,29,42,.04),0 6px 20px rgba(27,29,42,.05);padding:16px}
.card+.card{margin-top:12px}

/* 카테고리 그리드 */
.cats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.cat{background:#fff;border-radius:var(--r);padding:16px 8px 12px;text-align:center;box-shadow:0 1px 2px rgba(27,29,42,.04),0 6px 20px rgba(27,29,42,.05);border:2px solid transparent;transition:.15s}
.cat:active,.cat.on{border-color:var(--p);background:var(--pl)}
.cat .ic{width:52px;height:52px;margin:0 auto 8px;border-radius:14px;display:grid;place-items:center;font-size:26px}
.cat .ic.b{background:#EAF2FF}.cat .ic.y{background:#FFF6CC}.cat .ic.o{background:#FFE9DB}.cat .ic.g{background:#E3F6EC}.cat .ic.p{background:#F0E9FF}.cat .ic.r{background:#FFE4E4}
.cat .nm{font-weight:800;font-size:15px}
.cat .ds{font-size:11px;color:var(--mu);margin-top:2px}

/* 리스트 행 */
.row{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border-radius:var(--r);box-shadow:0 1px 2px rgba(27,29,42,.04),0 6px 20px rgba(27,29,42,.05)}
.row+.row{margin-top:10px}
.row .ic{width:44px;height:44px;border-radius:12px;background:var(--pl);display:grid;place-items:center;font-size:22px;flex:none}
.row .bd{flex:1;min-width:0}
.row .t{font-weight:700;font-size:15px}
.row .s{font-size:12px;color:var(--mu);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .ar{color:#C4C7D0;font-size:18px}

/* 신뢰 3줄 */
.trust{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.trust div{background:#fff;border-radius:12px;padding:10px 6px;text-align:center;font-size:12px;font-weight:600;color:var(--mu)}
.trust div b{display:block;color:var(--tx);font-size:13px}

/* 버튼 */
.btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:52px;border:0;border-radius:14px;background:var(--p);color:#fff;font-size:16px;font-weight:800}
.btn:disabled{background:#C9D6EE;cursor:not-allowed}
.btn.sub{background:var(--pl);color:var(--p)}
.btn.line{background:#fff;color:var(--tx);border:1.5px solid var(--bd)}
.btn.sm{height:40px;font-size:14px;border-radius:10px;width:auto;padding:0 14px}
.fix{position:fixed;left:0;right:0;bottom:0;padding:10px 16px calc(14px + env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(245,246,250,0),var(--bg) 40%);z-index:15}
.fix .btn{max-width:488px;margin:0 auto;box-shadow:0 8px 24px rgba(47,128,255,.35)}
.hint{font-size:12px;color:var(--mu);text-align:center;margin:8px 0 0}

body:has(.fix){padding-bottom:120px}
/* 하단 탭 */
.tabs{position:fixed;left:0;right:0;bottom:0;height:64px;background:#fff;border-top:1px solid var(--bd);display:flex;z-index:20;padding-bottom:env(safe-area-inset-bottom)}
.tabs a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;color:var(--mu);font-weight:600}
.tabs a svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabs a.on{color:var(--p)}

/* 폼 */
.f{margin-bottom:18px}
.f label{display:block;font-weight:700;font-size:14px;margin-bottom:8px}
.f label small{color:var(--mu);font-weight:500;margin-left:4px}
.f input,.f select,.f textarea{width:100%;border:1.5px solid var(--bd);border-radius:12px;padding:13px 14px;background:#fff;outline:0}
.f input:focus,.f select:focus,.f textarea:focus{border-color:var(--p)}
.f textarea{min-height:96px;resize:vertical}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1.5px solid var(--bd);background:#fff;border-radius:999px;padding:9px 14px;font-size:14px;font-weight:600}
.chip.on{border-color:var(--p);background:var(--pl);color:var(--p)}
.opts{display:grid;gap:8px}
.opt{display:flex;align-items:center;gap:10px;border:1.5px solid var(--bd);background:#fff;border-radius:12px;padding:13px 14px;font-size:15px;font-weight:600;text-align:left}
.opt small{color:var(--mu);font-weight:500;font-size:12px;display:block}
.opt.on{border-color:var(--p);background:var(--pl)}
.agree{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:var(--mu);margin-top:6px}
.agree input{width:18px;height:18px;margin:2px 0 0}
.agree a{color:var(--p);text-decoration:underline}

/* 단계 표시 */
.steps{display:flex;align-items:center;justify-content:center;gap:0;margin:14px 0 20px}
.steps div{display:flex;flex-direction:column;align-items:center;font-size:11px;color:var(--mu);width:72px}
.steps div i{width:26px;height:26px;border-radius:50%;background:#E3E6EE;color:#fff;font-style:normal;font-weight:800;display:grid;place-items:center;font-size:12px;margin-bottom:4px}
.steps div.on i{background:var(--p)}.steps div.on{color:var(--p);font-weight:700}
.steps div.ok i{background:var(--ok)}
.steps hr{width:34px;border:0;border-top:2px dashed #D6DAE5;margin:0 0 16px}
.q{font-size:20px;font-weight:900;letter-spacing:-.5px;margin:6px 0 4px}
.q b{color:var(--p)}
.qs{font-size:13px;color:var(--mu);margin:0 0 18px}

/* 사진 업로드 */
.photos{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.photos .ph{aspect-ratio:1;border-radius:12px;overflow:hidden;background:#EEF0F5;position:relative}
.photos .ph img{width:100%;height:100%;object-fit:cover}
.photos .ph .x{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;border:0;font-size:13px;line-height:1}
.photos .add{aspect-ratio:1;border:1.5px dashed #C9CDD8;border-radius:12px;display:grid;place-items:center;color:var(--mu);font-size:12px;background:#fff;text-align:center}
.photos .add b{display:block;font-size:22px;line-height:1}

/* 상태 배지 */
.st{display:inline-block;flex:none;white-space:nowrap;font-size:11px;font-weight:800;padding:3px 9px;border-radius:999px;color:#fff;background:var(--st-new)}
.st.accepted{background:var(--st-accepted)}.st.doing{background:var(--st-doing)}.st.done{background:var(--st-done)}

/* 완료 화면 */
.finish{text-align:center;padding:36px 0 10px}
.finish .ck{width:72px;height:72px;border-radius:50%;background:var(--p);color:#fff;display:grid;place-items:center;font-size:36px;margin:0 auto 18px;box-shadow:0 10px 30px rgba(47,128,255,.35)}
.finish h1{font-size:22px;margin:0 0 6px;font-weight:900}
.finish p{color:var(--mu);margin:0;font-size:14px}
.code{display:inline-block;margin-top:14px;background:var(--pl);color:var(--p);font-weight:800;padding:8px 16px;border-radius:10px;font-size:15px}
.mascot-line{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#EAF2FF,#FFF6CC);border-radius:var(--r);padding:12px 16px;margin-top:20px}
.mascot-line img{width:64px;height:64px}
.mascot-line b{display:block;font-size:14px}.mascot-line span{font-size:12px;color:var(--mu)}
.ul{list-style:none;padding:0;margin:14px 0 0;font-size:14px;text-align:left}
.ul li{padding:8px 0;border-bottom:1px solid var(--bd);display:flex;gap:8px}
.ul li:last-child{border:0}
.ul li::before{content:"✓";color:var(--p);font-weight:900}

/* 빈 상태 */
.empty{text-align:center;padding:48px 16px;color:var(--mu)}
.empty img{width:96px;opacity:.9;margin-bottom:10px}
.empty b{display:block;color:var(--tx);font-size:16px;margin-bottom:4px}
.empty .btn{margin-top:18px}

/* 사례 피드 */
.feed{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.case{background:#fff;border-radius:var(--r);overflow:hidden;box-shadow:0 1px 2px rgba(27,29,42,.04),0 6px 20px rgba(27,29,42,.05)}
.case img{width:100%;aspect-ratio:1;object-fit:cover;display:block;background:#EEF0F5}
.case .b{padding:10px 12px 12px}
.case .b b{display:block;font-size:14px}.case .b span{font-size:12px;color:var(--mu)}
.case .lb{position:absolute}

/* 별점 */
.stars{display:flex;gap:6px;justify-content:center}
.stars button{border:0;background:none;font-size:32px;color:#D6DAE5;padding:0}
.stars button.on{color:#F5B301}

/* 푸터 */
.foot{padding:28px 0 12px;font-size:11px;color:#9AA0AE;line-height:1.7}
.foot a{text-decoration:underline}

/* 토스트 */
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#1B1D2A;color:#fff;padding:10px 16px;border-radius:999px;font-size:13px;z-index:50;opacity:0;transition:.2s;pointer-events:none}
.toast.on{opacity:1}

/* PC — 짐싸 방식: 모바일 컬럼을 가운데 세우고 왼쪽에 "앱으로 열기" 패널. 관리자 화면은 제외 */
.side{display:none}
@media (min-width:768px){
  html{background:#EEF2FF}
  body:not(.admin){max-width:600px;margin:0 auto;background:var(--bg);min-height:100vh;box-shadow:0 0 0 1px var(--bd),0 20px 60px rgba(27,29,42,.08)}
  body:not(.admin) .tabs,body:not(.admin) .fix{left:50%;right:auto;transform:translateX(-50%);width:100%;max-width:600px}
}
@media (min-width:1100px){
  .side{display:block;position:fixed;top:50%;transform:translateY(-50%);left:calc(50% - 300px - 300px);width:260px;text-align:center;color:var(--mu);font-size:14px;line-height:1.6}
  .side img.m{width:120px;height:120px}
  .side .wm{font-weight:900;font-size:24px;letter-spacing:-.5px;color:var(--tx);margin:4px 0 2px}
  .side .wm b{color:var(--p)}
  .side h3{margin:0 0 14px;font-size:18px;color:var(--tx);font-weight:800}
  .side .qr{width:150px;height:150px;background:#fff;border-radius:16px;padding:12px;box-shadow:0 6px 20px rgba(27,29,42,.08);margin:0 auto 14px;display:block}
  .side p{margin:0 0 10px}
  .side a.hp{display:inline-block;margin-top:6px;color:var(--p);font-weight:700}
}
