:root{
  --bg:#ffffff; --soft:#f5f7fb; --line:#e6eaf2; --ink:#14213d; --sub:#6b7891;
  --navy:#16305e; --gold:#c9a24a; --gold2:#f4e3b5;
  --z1:#8e7cc3; --z2:#3d9be9; --z3:#e0a526; --z4:#2fb59a; --z5:#ef6b6b; --z6:#7a8aa3;
  --shadow:0 10px 30px rgba(20,33,61,.12);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:"Pretendard",system-ui,sans-serif;overflow:hidden;word-break:keep-all}
body.intro #sheet,body.intro .tabbar,body.intro .top{opacity:0;pointer-events:none}
#sheet,.tabbar,.top{transition:opacity .5s}
#map{position:fixed;inset:0}
.cesium-viewer-bottom,.cesium-widget-credits{display:none!important}

/* 첫 화면 */
#hero{position:fixed;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center;
  background:linear-gradient(180deg,rgba(255,255,255,0) 30%,rgba(255,255,255,.92) 62%,#fff 78%);transition:opacity .6s}
#hero.hide{opacity:0;pointer-events:none}
.hero-in{width:min(520px,100%);padding:24px 22px calc(28px + env(safe-area-inset-bottom))}
.eyebrow{margin:0 0 6px;font-size:13px;font-weight:700;color:var(--gold);letter-spacing:.08em}
#hero h1{margin:0;font-size:32px;line-height:1.25;font-weight:800;letter-spacing:-.02em}
#hero h1 b{color:var(--navy);background:linear-gradient(transparent 62%,var(--gold2) 62%)}
.hero-sub{color:var(--sub);font-size:15px;line-height:1.55;margin:12px 0 18px}
#hero-go{width:100%;height:54px;border:0;border-radius:14px;background:var(--navy);color:#fff;font-size:17px;font-weight:700;cursor:pointer;box-shadow:var(--shadow)}
.hero-note{font-size:11.5px;color:var(--sub);text-align:center;margin:12px 0 0}

/* 위쪽 바 */
.top{position:fixed;top:0;left:0;right:0;z-index:20;display:flex;align-items:center;gap:10px;
  padding:calc(10px + env(safe-area-inset-top)) 12px 10px;background:linear-gradient(#fff 70%,rgba(255,255,255,0))}
.brand{display:flex;align-items:baseline;gap:6px;flex:none}
.logo{font-weight:800;font-size:20px;color:var(--navy);letter-spacing:-.02em}
.place{font-size:13px;font-weight:600;color:var(--gold)}
.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;flex:1}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;border:1px solid var(--line);background:#fff;border-radius:20px;padding:6px 11px;font-size:13px;font-weight:600;color:var(--ink);cursor:pointer;display:flex;align-items:center;gap:5px}
.chip i{width:8px;height:8px;border-radius:50%;display:inline-block}
.chip.on{border-color:var(--navy);background:var(--navy);color:#fff}
.me{flex:none;border:1px solid var(--line);background:#fff;border-radius:20px;padding:6px 10px;font-size:12.5px;color:var(--sub);cursor:pointer}

/* 아래 시트 */
#sheet{position:fixed;left:0;right:0;bottom:calc(62px + env(safe-area-inset-bottom));z-index:15;background:#fff;border-radius:20px 20px 0 0;box-shadow:0 -8px 30px rgba(20,33,61,.12);
  display:flex;flex-direction:column;transition:height .3s ease}
#sheet.peek{height:132px} #sheet.half{height:46vh} #sheet.full{height:calc(100vh - 140px)}
.grip{height:22px;display:flex;justify-content:center;align-items:center;cursor:pointer;flex:none}
.grip span{width:42px;height:5px;border-radius:3px;background:#d5dbe6}
.sheet-body{overflow:auto;padding:4px 18px 24px;flex:1}
h2{margin:2px 0 6px;font-size:20px;font-weight:800;letter-spacing:-.02em}
h3{margin:20px 0 8px;font-size:15px;font-weight:700}
.muted{color:var(--sub);font-size:13.5px;line-height:1.5;margin:0 0 10px}
.hint{color:var(--sub);font-size:12.5px;line-height:1.5}
.note{background:var(--soft);border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.5}
.back{border:0;background:none;color:var(--sub);font-size:13px;padding:2px 0 8px;cursor:pointer}

.zone-card{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;margin-bottom:8px;cursor:pointer;background:#fff}
.zone-card .zn{width:42px;height:42px;border-radius:12px;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;flex:none}
.zone-card .zt{flex:1;min-width:0}
.zone-card .zt b{display:block;font-size:15px}
.zone-card .zt span{font-size:12.5px;color:var(--sub)}
.bar{height:6px;background:var(--soft);border-radius:4px;margin-top:6px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:4px}
.zone-head{display:flex;align-items:center;gap:8px}
.dot{width:12px;height:12px;border-radius:50%}

.steps{list-style:none;padding:0;margin:12px 0;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:3px}
.steps li{font-size:9.5px;word-break:break-all;letter-spacing:-.03em;text-align:center;color:var(--sub);position:relative;padding-top:16px;line-height:1.2}
.steps li::before{content:"";position:absolute;top:4px;left:0;right:0;height:6px;border-radius:3px;background:var(--line)}
.steps li.done::before{background:var(--navy)}
.steps li.now{color:var(--navy);font-weight:800}
.steps li.now::before{background:var(--gold)}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.fact{background:var(--soft);border-radius:12px;padding:10px 12px}
.fact span{display:block;font-size:11.5px;color:var(--sub)}
.fact b{font-size:15px}

.box{background:var(--soft);border-radius:14px;padding:12px 14px;margin-top:6px}
.row{display:flex;justify-content:space-between;font-size:14px}
input[type=range]{width:100%;accent-color:var(--navy);margin:10px 0}
.dirs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.dirs button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px;font-size:13.5px;font-weight:600;color:var(--ink);cursor:pointer}
.dirs button:active{background:var(--navy);color:#fff}
.count{font-size:12px;color:var(--gold);font-weight:700}

.cards{display:flex;flex-direction:column;gap:10px}
.card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;cursor:pointer}
.card .ph{height:150px;background:var(--soft) center/cover;position:relative}
.card .ph em{position:absolute;left:10px;top:10px;background:rgba(20,33,61,.8);color:#fff;font-style:normal;font-size:11px;padding:3px 8px;border-radius:20px}
.card .in{padding:12px}
.card .p{font-size:18px;font-weight:800;color:var(--navy)}
.card .m{font-size:13.5px;margin-top:2px}
.card .tg{display:inline-block;font-size:11.5px;background:var(--gold2);color:#6b5114;border-radius:20px;padding:2px 8px;margin:6px 4px 0 0}
.card .co{font-size:12px;color:var(--sub);margin-top:8px}
.card .ac{display:flex;gap:6px;margin-top:10px}
.card .ac button{flex:1;border:1px solid var(--navy);background:#fff;color:var(--navy);border-radius:10px;padding:9px;font-weight:700;font-size:13px;cursor:pointer}
.card .ac button.fill{background:var(--navy);color:#fff}
.empty{border:1px dashed var(--line);border-radius:14px;padding:18px;text-align:center;color:var(--sub);font-size:13.5px}
.trades{list-style:none;padding:0;margin:0}
.trades li{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--line);font-size:13.5px}
.trades b{color:var(--navy)}

.primary{width:100%;height:50px;margin-top:14px;border:0;border-radius:12px;background:var(--navy);color:#fff;font-size:16px;font-weight:700;cursor:pointer}
.filters{display:flex;gap:8px;margin-bottom:12px}
select,input,textarea{width:100%;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:10px;font-size:15px;font-family:inherit}
label{display:block;font-size:12.5px;color:var(--sub);margin-top:10px}
label>select,label>input,label>textarea{margin-top:4px}
details{border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-top:10px}
summary{cursor:pointer;font-weight:700;font-size:15px;list-style:none}
summary::-webkit-details-marker{display:none}
summary::after{content:"＋";float:right;color:var(--sub)}
details[open] summary::after{content:"－"}
summary em{font-style:normal;font-size:11px;background:var(--gold2);color:#6b5114;border-radius:20px;padding:2px 7px;margin-left:6px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}
.seg label{margin:0}.seg input{display:none}
.seg span{display:block;text-align:center;border:1px solid var(--line);border-radius:10px;padding:10px;font-size:14px;font-weight:600;color:var(--ink)}
.seg input:checked+span{background:var(--navy);color:#fff;border-color:var(--navy)}
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.tags label{margin:0}.tags input{display:none}
.tags span{display:block;border:1px solid var(--line);border-radius:20px;padding:6px 11px;font-size:13px;color:var(--ink)}
.tags input:checked+span{background:var(--gold2);border-color:var(--gold);color:#6b5114}
.switch{display:flex;align-items:center;gap:8px;color:var(--ink);font-size:15px}
.switch input{width:auto}
.thumbs img{width:100%;max-height:200px;object-fit:cover;border-radius:10px;margin-top:8px}

/* 아래 탭 */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:25;height:calc(62px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);
  background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr)}
.tabbar button{border:0;background:none;color:var(--sub);font-size:11.5px;font-weight:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
.tabbar i{font-style:normal;font-size:19px;line-height:1}
.tabbar button.on{color:var(--navy)}
.tabbar .plus i{width:34px;height:34px;border-radius:12px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px}
#toast{position:fixed;left:50%;bottom:150px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:11px 16px;border-radius:12px;font-size:14px;z-index:99;box-shadow:var(--shadow);max-width:90vw}

/* PC: 시트를 오른쪽 패널로 */
@media (min-width:900px){
  #sheet,#sheet.peek,#sheet.half,#sheet.full{top:64px;right:16px;left:auto;bottom:16px;width:400px;height:auto;border-radius:20px}
  .grip{display:none}
  .tabbar{left:auto;right:16px;bottom:auto;top:12px;width:400px;height:44px;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
  .tabbar button{flex-direction:row;gap:5px;font-size:13px}
  .tabbar i{font-size:15px}
  .tabbar .plus i{width:22px;height:22px;font-size:14px;border-radius:7px}
  .top{right:440px}
  #hero{align-items:center;background:radial-gradient(circle at 30% 50%,rgba(255,255,255,.95) 0,rgba(255,255,255,.88) 38%,rgba(255,255,255,.2) 75%)}
  .hero-in{margin-right:auto;margin-left:6vw}
  #hero h1{font-size:44px}
}
