
    :root{
      --bg:#f5efe2; --paper:#efe3c6; --ink:#4b3826; --soft:#a68b62; --line:#c9b38c;
      --accent:#7b5d36; --gold:#c79d47; --gray:#b9b0a0; --green:#52734d; --danger:#a5442f;
    }
    *{box-sizing:border-box}
    body{
      margin:0; font-family:"Noto Sans KR", system-ui, -apple-system, Segoe UI, sans-serif;
      background: radial-gradient(circle at top, #faf5e9 0%, var(--bg) 45%, #e8dcc1 100%);
      color:var(--ink);
    }
    .wrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;}
    .app{
      width:min(1100px, 100%); min-height:760px;
      background:linear-gradient(180deg,#f7ecd1 0%, #eadab6 100%);
      border:4px solid #b29062; border-radius:24px;
      box-shadow:0 20px 45px rgba(60,40,10,.18); overflow:clip; position:relative;
    }
    .top{
      padding:22px 28px; border-bottom:2px dashed var(--line);
      display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;
      background:rgba(255,255,255,.18);
    }
    .brand{font-size:28px; font-weight:900; letter-spacing:.04em;}
    .subtitle{font-size:13px; color:#6a553a; letter-spacing:.03em;}
    .topRight{display:flex; flex-direction:column; align-items:flex-end; gap:6px;}
    .userBar{display:none; align-items:center; gap:10px; font-size:13px; color:#6a553a;}
    .userBar.show{display:flex;}
    .userBar img{width:26px; height:26px; border-radius:50%; border:1px solid var(--line);}
    .linkBtn{background:none; border:1px solid var(--line); padding:5px 10px; border-radius:999px; font-size:12px; font-weight:700; color:var(--ink);}
    .saveState{font-size:12px; font-weight:700; color:#7a6344; min-height:16px;}
    .saveState.err{color:var(--danger);}
    .screen{display:none; padding:28px;}
    .screen.active{display:block;}
    .card{
      max-width:700px; margin:40px auto 0; background:rgba(255,250,238,.72);
      border:2px solid var(--line); border-radius:22px; padding:36px;
      box-shadow:0 10px 30px rgba(80,55,20,.08);
    }
    h1,h2,h3,p{margin:0}
    h1{font-size:40px; line-height:1.2; margin-bottom:10px;}
    .lead{margin-top:10px; color:#614e37; line-height:1.7;}
    .fields{margin-top:28px; display:grid; gap:18px;}
    .row2{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
    .field label,.fieldLabel{display:block; font-size:14px; margin-bottom:8px; font-weight:700; color:#624c31;}
    input[type="text"], input[type="number"], select{
      width:100%; border:2px solid #bfa37c; background:#fffaf0; border-radius:14px;
      padding:14px 16px; font-size:16px; color:var(--ink); outline:none; font-family:inherit;
    }
    select{appearance:none; background-image:linear-gradient(45deg,transparent 50%,#7b5d36 50%),linear-gradient(135deg,#7b5d36 50%,transparent 50%);
      background-position:calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size:6px 6px; background-repeat:no-repeat; padding-right:36px;}
    input:focus, select:focus{border-color:var(--accent);}
    .chips{display:flex; flex-wrap:wrap; gap:8px;}
    .chips label{margin:0;}
    .chips input{position:absolute; opacity:0; pointer-events:none;}
    .chips span{
      display:inline-block; padding:11px 18px; border-radius:999px; border:2px solid #bfa37c; background:#fffaf0;
      font-size:15px; font-weight:800; cursor:pointer; transition:.15s; user-select:none;
    }
    .chips input:checked + span{background:var(--accent); border-color:var(--accent); color:#fff9f0;}
    .chips input:focus-visible + span{outline:3px solid var(--gold); outline-offset:2px;}
    .hint{margin-top:8px; font-size:13px; color:#81684a; line-height:1.5;}
    .btns{display:flex; gap:12px; margin-top:26px; flex-wrap:wrap;}
    button{
      border:none; cursor:pointer; border-radius:14px; padding:14px 20px;
      font-weight:800; font-size:15px; transition:.18s ease; font-family:inherit;
    }
    button:hover{transform:translateY(-1px)}
    button:disabled{opacity:.6; cursor:default; transform:none;}
    .primary{background:var(--accent); color:#fff9f0;}
    .ghost{background:#fff7e4; color:var(--ink); border:2px solid var(--line);}
    .googleBtn{
      display:flex; align-items:center; justify-content:center; gap:10px; width:100%;
      background:#fff; color:#3c3c3c; border:2px solid #bfa37c; font-size:16px; padding:15px 20px;
    }
    .googleBtn svg{width:20px; height:20px;}
    .gsiBox{margin-top:24px; display:flex; flex-direction:column; align-items:flex-start; gap:10px; min-height:44px;}
    [hidden]{display:none !important;}
    .altLogin{border:none; text-decoration:underline; text-underline-offset:3px; color:#8c7656; padding:2px 0;}
    .notice{
      display:none; margin-top:18px; padding:14px 16px; border-radius:14px; background:#fbe9df;
      border:1px solid #e0b9a6; font-size:14px; line-height:1.65; color:#6b3423;
    }
    .notice.show{display:block;}
    .errMsg{margin-top:12px; font-size:14px; color:var(--danger); min-height:20px; line-height:1.5;}
    .loading{text-align:center; padding:120px 20px; color:#7a6344; font-weight:700;}
    .layout{display:grid; grid-template-columns:1.25fr .95fr; gap:22px; align-items:start;}
    .mapPanel{
      background:rgba(255,249,235,.68); border:2px solid var(--line);
      border-radius:22px; padding:20px;
    }
    .sectionTitle{font-size:22px; font-weight:900; margin-bottom:6px;}
    .sectionSub{font-size:14px; color:#7a6344; line-height:1.55; margin-bottom:16px;}
    .mapArea{
      position:relative; height:520px; border-radius:18px;
      background:
        linear-gradient(rgba(120,95,55,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120,95,55,.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.08));
      background-size:26px 26px, 26px 26px, 100% 100%;
      overflow:hidden; border:1px dashed #b9996f;
    }
    .church{
      position:absolute; left:58%; bottom:12px; transform:translateX(-50%); z-index:2;
      display:flex; flex-direction:column; align-items:center; gap:4px;
    }
    .churchIcon{width:70px; height:auto; display:block; filter:drop-shadow(0 8px 14px rgba(60,40,10,.18)); user-select:none; -webkit-user-drag:none;}
    .churchLabel{
      font-size:14px; font-weight:800; background:#fff7e7; padding:6px 12px;
      border-radius:999px; border:1px solid var(--line); box-shadow:0 4px 10px rgba(0,0,0,.06); white-space:nowrap;
    }
    .friend{
      position:absolute; z-index:5; transform:translate(-50%,-78%);
      display:flex; flex-direction:column; align-items:center; gap:2px;
      transition:left .6s ease, top .6s ease; pointer-events:none;
    }
    .friendIcon{font-size:50px; line-height:1; filter:drop-shadow(0 4px 8px rgba(0,0,0,.15));}
    .friendTag{
      font-size:13px; font-weight:800; background:#fff7e7; padding:4px 10px; border-radius:999px;
      border:1px solid var(--line); box-shadow:0 3px 8px rgba(0,0,0,.06); white-space:nowrap;
      max-width:140px; overflow:hidden; text-overflow:ellipsis;
    }
    .footPath{position:absolute; inset:0; z-index:1; pointer-events:none;}
    .trail{position:absolute; inset:0; width:100%; height:100%;}
    .trail path{fill:none; stroke:#c9b38c; stroke-width:3; stroke-dasharray:2 10; stroke-linecap:round;}
    .footstep{
      position:absolute; font-size:20px; line-height:1; user-select:none;
      transform:translate(-50%,-50%) rotate(var(--r));
      transition:opacity .3s ease, filter .3s ease, transform .3s ease;
    }
    .footstep.pending{opacity:.28; filter:grayscale(1);}
    .footstep.done{
      opacity:1; filter:drop-shadow(0 0 6px rgba(82,115,77,.55));
      transform:translate(-50%,-50%) rotate(var(--r)) scale(1.12);
    }
    /* 주차별 도착 게이지 (문 · 식탁 · 십자가와 교회) */
    .goals{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px;}
    .goal{position:relative; background:#fff7e5; border:1px solid var(--line); border-radius:16px; padding:12px 10px 10px; text-align:center; transition:background .3s, border-color .3s;}
    .goal .gIcon{font-size:30px; line-height:1.1; filter:grayscale(1); opacity:.45; transition:filter .4s, opacity .4s, transform .4s;}
    .goal .gName{font-size:14px; font-weight:900; margin-top:4px; word-break:keep-all;}
    .goal .gWeek{font-size:11px; font-weight:700; color:#8c7656;}
    .goal .gBar{height:8px; background:#e5d7bf; border-radius:999px; overflow:hidden; margin:8px 2px 6px;}
    .goal .gFill{height:100%; width:0; background:linear-gradient(90deg,#7aa06b,#57774f); transition:width .4s ease;}
    .goal .gNum{font-size:12px; font-weight:800; color:#7a6344;}
    .goal.part .gIcon{filter:grayscale(.4); opacity:.8;}
    .goal.arrived{background:#eef3e6; border-color:#9fb58f;}
    .goal.arrived .gIcon{filter:none; opacity:1; transform:scale(1.08);}
    .goal.arrived .gNum{color:var(--green);}
    .goal.arrived::after{content:"도착!"; position:absolute; top:-9px; right:-6px; background:var(--green); color:#fff; font-size:11px; font-weight:900; padding:3px 8px; border-radius:999px; box-shadow:0 3px 8px rgba(40,60,30,.25);}
    .progressBox{
      margin-top:16px; padding:14px 16px; border-radius:16px; background:#fff7e5;
      border:1px solid var(--line); font-size:14px; line-height:1.6;
    }
    .progressBar{height:12px; background:#e5d7bf; border-radius:999px; overflow:hidden; margin:10px 0 0;}
    .progressFill{height:100%; width:0%; background:linear-gradient(90deg,#7aa06b,#57774f); transition:.35s ease;}
    .weekBlock{margin-top:18px;}
    .scoreBox{display:flex; justify-content:space-between; align-items:center; background:#fff7e5; border:1px solid var(--line); border-radius:14px; padding:10px 14px; font-size:14px; font-weight:800; margin-top:4px;}
    .scoreBox strong{color:var(--green); font-size:16px;}
    .stage .pts{font-size:11px; font-weight:900; color:#8a6a2c; background:#f6e7c4; border-radius:999px; padding:2px 8px; margin-left:6px; vertical-align:2px; white-space:nowrap;}
    .weekBlock:first-of-type{margin-top:6px;}

    .stage{border:1px solid var(--line); border-radius:16px; background:rgba(255,250,240,.75); margin-top:10px; overflow:hidden;}
    .stage > summary{list-style:none; cursor:pointer; padding:12px 14px; display:flex; justify-content:space-between; align-items:center; gap:10px; font-weight:900; font-size:15px;}
    .stage > summary::-webkit-details-marker{display:none;}
    .stage > summary .sc{font-size:12px; font-weight:800; color:#7a6344; white-space:nowrap;}
    .stage > summary .sc.full{color:var(--green);}
    .stage > summary::before{content:"▸"; color:#9a7d55; margin-right:2px;}
    .stage[open] > summary::before{content:"▾";}
    .stage > summary .st{flex:1;}
    .stageBody{padding:0 12px 12px; display:grid; gap:8px;}
    .stage .step{padding:11px 13px; border-radius:12px;}
    .stage .stepTitle{font-size:14px; font-weight:700;}

    .stepToast{
      position:fixed; left:50%; bottom:28px; transform:translate(-50%, 20px); opacity:0; z-index:50;
      background:#52734d; color:#fff; padding:12px 18px; border-radius:999px; font-weight:900; font-size:15px;
      box-shadow:0 8px 20px rgba(40,60,30,.3); transition:opacity .25s, transform .25s; pointer-events:none; white-space:nowrap;
    }
    .stepToast.show{opacity:1; transform:translate(-50%, 0);}

    .guideList{display:grid; gap:10px;}
    .step{
      display:flex; gap:12px; align-items:center; padding:14px 16px; cursor:pointer;
      border:1px solid var(--line); border-radius:16px; background:#fffaf0; transition:background .2s;
    }
    .step:has(input:checked){background:#eef3e6; border-color:#9fb58f;}
    .step input{width:22px; height:22px; flex:none; accent-color:var(--green); margin:0;}
    .stepTitle{font-size:15px; font-weight:800; line-height:1.45;}

    .step.disabled{cursor:default; opacity:.75;}
    .step.disabled:has(input:checked){opacity:1;}

    /* 가이드 화면 */
    .guideWrap{max-width:980px; margin:0 auto;}
    /* 왼쪽 패널: 발자국 지도 ↔ 프로필 (탭 또는 옆으로 밀기) */
    .panelTabs{display:grid; grid-template-columns:1fr 1fr; gap:6px; background:#efe3c9; padding:4px; border-radius:14px; margin-bottom:14px;}
    .pTab{background:transparent; color:#7a6344; padding:10px 8px; border-radius:11px; font-size:14px;}
    .pTab:hover{transform:none;}
    .pTab.active{background:#fffaf0; color:var(--ink); box-shadow:0 2px 6px rgba(80,55,20,.12);}
    .slider{display:flex; align-items:flex-start; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scroll-behavior:smooth;
      scrollbar-width:none; -webkit-overflow-scrolling:touch; transition:height .3s ease; overscroll-behavior-x:contain;}
    .slider::-webkit-scrollbar{display:none;}
    .slide{flex:0 0 100%; min-width:0; scroll-snap-align:start; scroll-snap-stop:always;}
    .layout > *{min-width:0;}
    .pCard [hidden]{display:none !important;}
    .slideDots{display:flex; justify-content:center; gap:6px; margin-top:12px;}
    .slideDots span{width:7px; height:7px; border-radius:999px; background:#d8c8a8; transition:width .2s, background .2s;}
    .slideDots span.on{width:20px; background:var(--accent);}
    .pCard{background:#fff7e5; border:1px solid var(--line); border-radius:18px; padding:16px; margin-top:12px;}
    .pHead{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px;}
    .pTitle{font-size:17px; font-weight:900;}
    .pView{display:grid; gap:8px;}
    .pRow{display:grid; grid-template-columns:86px 1fr; gap:8px; font-size:14px; line-height:1.55; align-items:start;}
    .pRow .k{color:#8c7656; font-weight:800; font-size:13px; padding-top:1px;}
    .pRow .v{font-weight:700; white-space:pre-wrap; word-break:keep-all;}
    .pRow .v.empty{color:#b09a78; font-weight:600;}
    .pRow .v small{display:block; font-weight:600; color:#7a6344; font-size:12px; margin-top:2px;}
    .pEdit .fields{margin-top:6px; gap:14px;}
    .pEdit .btns{margin-top:14px;}
    .pCard .testLink{margin-top:12px;}
    .profCard{margin-top:10px;}
    /* 처음 화면 */
    #screenHome{padding:0;}
    .homeCard{padding:28px 28px 24px;}
    .homeIntro{max-width:850px; margin:0 auto 20px;}
    .homeIntro h1{font-size:clamp(26px,3.4vw,38px); letter-spacing:-.045em;}
    .homeIntro .lead{font-size:15px; margin-top:8px; word-break:keep-all;}
    .homeJourney{position:relative; isolation:isolate; max-width:850px; margin:auto; aspect-ratio:1; border-radius:24px; background:#f4e8cd;}
    .homeArtwork{position:absolute; inset:0; display:block; overflow:hidden; border-radius:inherit; pointer-events:none;}
    .homeArtwork img{display:block; width:100%; height:100%; object-fit:cover;}
    .homeShepherd{position:absolute; left:57%; top:55%; width:16%; height:auto; pointer-events:none;}
    .homeTile{position:absolute; z-index:1; width:40%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; text-align:center;
      padding:22px 18px; color:var(--ink); background:#fffaf0; border:3px solid #785a38;
      box-shadow:0 7px 0 #785a3810,0 12px 24px #5b411014; transition:transform .18s ease,background .18s ease,box-shadow .18s ease;}
    .homeGuide{left:6%; top:22%; border-radius:27px 23px 29px 20px; transform:rotate(-1.5deg);}
    .homeMission{right:6%; top:35.5%; padding:13px 18px; gap:5px; border-radius:24px 28px 21px 29px; transform:rotate(1.5deg);}
    .homePadlet{left:10%; top:calc(22% - 120px); width:32%; padding:12px 14px; gap:4px; border-radius:24px 20px 23px 18px; transform:rotate(-1.5deg); text-decoration:none; font-weight:800;}
    .homePadlet .htTitle{font-size:22px;}
    .homePadlet .htIcon{font-size:21px;}
    .homePadlet .htSub{font-size:12px; line-height:1.45;}
    .homeTile:hover{transform:translateY(-4px) rotate(0); box-shadow:0 9px 0 #785a3812,0 16px 28px #5b411020;}
    .homeTile:active{transform:translateY(1px) rotate(0);}
    .homeTile:focus-visible{outline:4px solid #52734d; outline-offset:7px;}
    .htHeading{display:flex; align-items:center; justify-content:center; gap:9px; white-space:nowrap;}
    .htIcon{font-size:clamp(20px,2.8vw,29px); line-height:1;}
    .htTitle{font-size:clamp(22px,3vw,32px); font-weight:900; letter-spacing:-.035em; line-height:1.2;}
    .htSub{font-size:14px; font-weight:700; color:#7a6344; line-height:1.55; word-break:keep-all;}
    .htBadge{font-size:13px; font-weight:900; color:#43643f; background:#eaf0dd; border:1px solid #d6e1c6; border-radius:999px; padding:3px 12px; white-space:nowrap;}
    .homeFoot{text-align:center; margin-top:20px;}
    .homeFoot .linkBtn{font-size:13px; padding:9px 18px; background:#fff7e4;}
    @media(max-width:900px){
      .homeCard{padding:22px 12px 20px;}
      .homeIntro{padding:0 4px; margin-bottom:18px;}
      .homeIntro h1{font-size:27px;}
      .homeIntro .lead{font-size:13px; line-height:1.75;}
      .homeJourney{aspect-ratio:2/3; border-radius:18px;}
      .homeShepherd{display:none;}
      .homeTile{width:47%; padding:14px 8px; gap:5px; border-width:2px;}
      .homeGuide{left:3%; top:26%; border-radius:20px 17px 22px 16px;}
      .homeMission{right:3%; top:39%; width:45%; padding:14px 8px; gap:5px; border-radius:17px 22px 17px 21px;}
      .homePadlet{left:6.5%; top:max(4px,calc(26% - 96px)); width:40%; padding:9px 6px; gap:3px; border-radius:17px 15px 19px 14px;}
      .homePadlet .htTitle{font-size:16px;}
      .homePadlet .htIcon{font-size:15px;}
      .homePadlet .htSub{font-size:11px; line-height:1.4;}
      .htHeading{gap:5px;}
      .htIcon{font-size:18px;}
      .htTitle{font-size:20px;}
      .htSub{font-size:12px; line-height:1.5;}
      .htBadge{font-size:11px; padding:3px 9px;}
      .homeFoot{margin-top:18px;}
    }
    @media(min-width:601px) and (max-width:900px){
      .homeIntro,.homeJourney{max-width:580px;}
      .htTitle{font-size:25px;}.htIcon{font-size:23px;}.htSub{font-size:14px;}.htBadge{font-size:13px;}
      .homeTile,.homeMission{padding:18px 12px;}
      .homePadlet{top:max(4px,calc(26% - 108px)); padding:10px;}
      .homePadlet .htTitle{font-size:20px;}.homePadlet .htIcon{font-size:19px;}.homePadlet .htSub{font-size:12px;}
    }
    @media(max-width:360px){
      .homeIntro h1{font-size:25px;}.htTitle{font-size:17px;}.htIcon{font-size:16px;}
      .htSub{font-size:11px;}.homeTile{padding:13px 6px;}.htBadge{font-size:10px;}
      .homeGuide{top:23%;}.homeMission{top:34%;}
      .homePadlet{top:max(4px,calc(23% - 90px)); padding:8px 6px;}
    }
    @media(prefers-reduced-motion:reduce){.homeTile{transition:none;}}
    .screenTop{margin-bottom:14px;}

    button.small{padding:8px 14px; font-size:13px;}
    textarea{width:100%; border:2px solid #bfa37c; background:#fffaf0; border-radius:14px; padding:14px 16px; font-size:15px; color:var(--ink); outline:none; font-family:inherit; line-height:1.6; resize:vertical;}
    textarea:focus{border-color:var(--accent);}
    .resultBox{display:none; margin-top:10px; padding:12px 14px; border-radius:14px; background:#f3ead6; border:1px solid var(--line); font-size:13px; line-height:1.6; color:#5d4a30;}
    .resultBox.show{display:block;}
    .resultBox b{font-size:15px; color:var(--ink);}
    .testLink{display:inline-block; margin-top:10px; padding:10px 14px; border-radius:12px; background:#fff7e4; border:2px solid var(--line); color:var(--ink); font-weight:800; font-size:14px; text-decoration:none;}
    .pendingNote{display:none; margin-top:14px; padding:12px 14px; border-radius:12px; background:#eef3e6; border:1px solid #9fb58f; color:#3d5a37; font-size:14px; font-weight:700;}
    .pendingNote.show{display:block;}
    .guideTop{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:18px;}

    .miniNote{
      margin-top:16px; padding:14px 16px; border-radius:14px; background:#fdf7ea;
      border:1px dashed var(--line); font-size:13px; line-height:1.7; color:#6e5a40;
    }
    .badge{
      display:inline-block; margin-top:8px; font-size:12px; padding:7px 10px; border-radius:999px;
      background:#f2e4c6; border:1px solid var(--line); font-weight:800;
    }
    .status{margin-top:8px; font-size:15px; font-weight:800; color:#5d4a30;}
    .tiny{font-size:12px; color:#8c7656; margin-top:8px; line-height:1.5;}
    @media (min-width: 901px){
      .mapPanel{position:sticky; top:16px;}   /* 긴 체크리스트를 내려도 지도가 보이게 */
      .mapPanel.onProfile{position:static;}  /* 프로필은 길어서 고정하지 않음 */
    }
    @media (max-width: 900px){
      .layout{grid-template-columns:1fr}
      .mapArea{height:440px}
    }
    @media (max-width: 600px){
      .wrap{padding:10px;}
      .app{min-height:auto; border-width:3px; border-radius:18px;}
      .top{padding:16px;}
      .brand{font-size:22px;}
      .topRight{align-items:flex-start;}
      .screen{padding:16px;}
      .card{padding:22px; margin-top:12px;}
      h1{font-size:28px}
      .mapPanel{padding:14px;}
      .mapArea{height:380px}
      .churchIcon{width:48px;}
      .church{left:68%;}
      .friendIcon{font-size:42px;}
      .footstep{font-size:14px;}
      .goals{gap:6px;}
      .goal{padding:10px 6px 8px;}
      .goal .gIcon{font-size:24px;}
      .goal .gName{font-size:12px;}
      .chips span{padding:10px 14px; font-size:14px;}
    }
  