/* 뜬딜 집 — 둥실 라임 (design/DESIGN.md) */
:root{
  --bg:#F1F7F5; --surface:#FFFFFF; --ink:#182820; --sub:#5D7066; --lime:#C8F560; --green:#17745A;
  --warn:#8A480B; --warn-bg:#FFF1D6; --line:#D6E2DC; --lime-soft:#E8FACB; --off:#E7ECE9; --mint-info:#E3F3EE;
  --r-chip:8px; --r-btn:14px; --r-card:16px; --r-sheet:20px; --r-hero:24px;
  --sh:0 4px 16px rgba(24,40,32,.08); --sh-float:0 2px 8px rgba(24,40,32,.14); --sh-sheet:0 -8px 32px rgba(24,40,32,.12);
  --nav-h:64px; --top-h:56px; --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:"Pretendard",system-ui,-apple-system,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;color:var(--ink);background:var(--bg);
  font-size:16px;line-height:24px;-webkit-text-size-adjust:100%;word-break:keep-all}
a{color:var(--green)}
.num{font-variant-numeric:tabular-nums}
.nowrap{white-space:nowrap}
button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--green);outline-offset:3px}

/* 상단 바 */
.top{position:sticky;top:0;z-index:30;height:var(--top-h);display:flex;align-items:center;gap:8px;padding:0 16px;background:rgba(241,247,245,.94);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.top.solid{background:var(--surface);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink);font-weight:750;font-size:18px;letter-spacing:-.02em}
.brand svg{width:26px;height:26px}
.top .title{flex:1;text-align:center;font-weight:700;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .grow{flex:1}
.pill{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:999px;border:1px solid var(--green);color:var(--green);
  font-size:13px;font-weight:600;background:var(--surface);white-space:nowrap}
.icon-btn{width:48px;height:48px;min-width:48px;display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;border-radius:999px;cursor:pointer;color:var(--ink);text-decoration:none}
.icon-btn svg{width:24px;height:24px}
.icon-btn:active{background:var(--off)}

/* 레이아웃 */
.page{max-width:560px;margin:0 auto;padding:0 20px calc(var(--nav-h) + var(--safe-b) + 24px)}
h1{font-size:28px;line-height:36px;font-weight:750;letter-spacing:-.02em;margin:16px 0 4px}
h2{font-size:20px;line-height:28px;font-weight:700;margin:28px 0 12px;letter-spacing:-.01em}
.lead{color:var(--sub);margin:0;font-size:16px}
.small{font-size:14px;line-height:20px;color:var(--sub)}
.tiny{font-size:12px;line-height:18px;color:var(--sub)}

/* 히어로 */
.hero{position:relative;margin:16px 0 0;border-radius:var(--r-hero);overflow:hidden;background:linear-gradient(180deg,#DDF0EC 0%,#EEF7F3 70%,#F1F7F5 100%);height:210px}
.hero svg.art{position:absolute;inset:0;width:100%;height:100%}
.hero .tag{position:absolute;right:14px;top:14px;background:var(--lime);color:var(--ink);font-weight:700;font-size:14px;padding:6px 12px;border-radius:999px;box-shadow:var(--sh-float)}
.hero a.go{position:absolute;left:14px;bottom:14px;display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 16px;border-radius:999px;background:rgba(255,255,255,.94);
  color:var(--ink);font-weight:650;text-decoration:none;box-shadow:var(--sh-float)}

/* 카드·표 */
.card{background:var(--surface);border-radius:var(--r-card);box-shadow:var(--sh);padding:16px;margin:12px 0}
table.sum{width:100%;border-collapse:collapse}
table.sum th,table.sum td{text-align:left;vertical-align:top;padding:11px 0;border-bottom:1px solid var(--line);font-size:15px;line-height:22px}
table.sum tr:last-child th,table.sum tr:last-child td{border-bottom:0}
table.sum th{width:92px;color:var(--sub);font-weight:500;font-size:14px;padding-right:8px}
table.sum td b{font-weight:700}
.pg{display:inline-block;font-size:12px;line-height:18px;color:var(--sub);margin-left:4px;white-space:nowrap}
table.grid{width:100%;border-collapse:collapse;font-size:14px;line-height:20px}
table.grid th,table.grid td{padding:8px 6px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
table.grid th:first-child,table.grid td:first-child{text-align:left}
table.grid thead th{color:var(--sub);font-weight:500;font-size:13px}
.scroll-x{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* 버튼 */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;height:52px;padding:0 20px;border-radius:var(--r-btn);border:0;background:var(--lime);color:var(--ink);
  font-weight:650;font-size:16px;text-decoration:none;cursor:pointer;width:100%}
.btn:active{filter:brightness(.95)}
.btn[disabled]{background:var(--off);color:var(--sub);cursor:not-allowed}
.btn2{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:48px;padding:0 16px;border-radius:var(--r-btn);border:1px solid var(--green);background:var(--surface);
  color:var(--green);font-weight:600;font-size:15px;text-decoration:none;cursor:pointer}
.row{display:flex;gap:8px;align-items:center}
.row > *{flex:1}
.link-out{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:0 4px;color:var(--green);font-weight:600;text-decoration:none;border-bottom:1px solid var(--line)}
.link-out:last-child{border-bottom:0}
.link-out small{color:var(--sub);font-weight:500}

/* 칩 */
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 10px;border-radius:var(--r-chip);background:var(--off);font-size:14px;font-weight:500;white-space:nowrap}
.chip.lime{background:var(--lime-soft)}
.chip.est{background:var(--warn-bg);color:var(--warn);font-size:12px;height:24px;padding:0 8px}
.tchip{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);
  font-weight:500;cursor:pointer;white-space:nowrap;text-decoration:none;color:var(--ink)}
.tchip[aria-pressed="true"],.tchip.on{background:var(--lime);border-color:var(--lime);font-weight:700}

/* 안내 박스 */
.note{display:flex;gap:10px;padding:12px 14px;border-radius:12px;background:var(--mint-info);font-size:14px;line-height:20px}
.note.warn{background:var(--warn-bg);color:var(--warn)}
.note svg{flex:0 0 20px;width:20px;height:20px;margin-top:0}
.note p{margin:0}

/* 타입 카드(가로) */
.types{display:flex;gap:12px;overflow-x:auto;padding:4px 2px 8px;margin:0 -20px;padding-left:20px;padding-right:20px;scroll-snap-type:x mandatory}
.tcard{flex:0 0 74%;max-width:300px;scroll-snap-align:start;background:var(--surface);border-radius:var(--r-card);box-shadow:var(--sh);padding:14px;text-decoration:none;color:var(--ink);
  display:flex;flex-direction:column;gap:8px;border:2px solid transparent}
.tcard:active{border-color:var(--green)}
.tcard .hd{display:flex;align-items:baseline;justify-content:space-between}
.tcard .hd b{font-size:22px;line-height:28px}
.tcard .plan{height:128px;background:#F6FAF8;border-radius:12px;display:flex;align-items:center;justify-content:center}
.tcard .plan svg{max-width:92%;max-height:116px}
.tcard .go{display:flex;align-items:center;justify-content:space-between;font-weight:650;color:var(--green)}

/* 하단 내비 */
.nav{position:fixed;left:0;right:0;bottom:0;z-index:40;height:calc(var(--nav-h) + var(--safe-b));padding-bottom:var(--safe-b);background:var(--surface);border-top:1px solid var(--line);
  display:flex}
.nav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-decoration:none;color:var(--sub);font-size:12px;line-height:16px;font-weight:500;margin:6px 4px;border-radius:14px}
.nav a svg{width:24px;height:24px}
.nav a[aria-current="page"]{background:var(--lime-soft);color:var(--ink);font-weight:700}

/* 3D 화면 */
.stage{position:fixed;left:0;right:0;top:var(--top-h);bottom:calc(var(--nav-h) + var(--safe-b));overflow:hidden;background:#DCEAE9;touch-action:none}
.stage canvas{display:block;width:100%;height:100%;touch-action:none}
.ov{position:absolute;z-index:5;background:rgba(255,255,255,.94);border-radius:12px;box-shadow:var(--sh-float)}
.ov-legend{left:12px;top:12px;padding:8px 10px;font-size:12px;line-height:18px}
.ov-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.ov-north{right:12px;top:12px;width:44px;height:44px;border-radius:999px;display:flex;align-items:center;justify-content:center}
.ov-north svg{width:30px;height:30px;transition:transform .1s linear}
.ctrls{position:absolute;right:12px;z-index:5;display:flex;flex-direction:column;gap:8px}
.ctrls button{width:48px;height:48px;border-radius:999px;border:0;background:rgba(255,255,255,.94);box-shadow:var(--sh-float);display:flex;align-items:center;justify-content:center;cursor:pointer}
.ctrls button svg{width:22px;height:22px}
.ctrls button[aria-pressed="true"]{background:var(--lime)}
.hint{position:absolute;left:50%;transform:translateX(-50%);z-index:5;background:rgba(255,255,255,.94);border-radius:999px;padding:6px 14px;font-size:13px;box-shadow:var(--sh-float);white-space:nowrap;pointer-events:none;transition:opacity .4s}
.disc{position:absolute;left:12px;z-index:5;font-size:12px;line-height:16px;color:var(--ink);background:rgba(255,255,255,.88);padding:4px 8px;border-radius:8px;pointer-events:none}
.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;z-index:8;background:#DCEAE9;font-weight:600;color:var(--sub)}
.loading .bar{width:160px;height:6px;border-radius:6px;background:rgba(255,255,255,.7);overflow:hidden}
.loading .bar i{display:block;height:100%;width:0;background:var(--green);transition:width .2s}

/* 3D 라벨 */
.lbl{background:rgba(255,255,255,.94);color:var(--ink);border-radius:10px;padding:4px 8px;font-size:13px;line-height:17px;font-weight:700;text-align:center;box-shadow:var(--sh-float);white-space:nowrap;pointer-events:auto;cursor:pointer}
.lbl small{display:block;font-weight:500;color:var(--sub);font-size:12px}
.lbl.sel{background:var(--lime)}
.lbl.room{pointer-events:none;cursor:default}
.lbl.room small{color:var(--ink);font-variant-numeric:tabular-nums}

/* 바텀시트 */
.sheet{position:absolute;left:0;right:0;bottom:0;z-index:12;background:var(--surface);border-radius:var(--r-sheet) var(--r-sheet) 0 0;box-shadow:var(--sh-sheet);padding:8px 20px 16px;
  transition:transform .22s ease;max-height:55%;overflow:auto}
.sheet .handle{display:block;width:100%;height:20px;border:0;background:transparent;cursor:pointer;position:relative}
.sheet .handle::before{content:"";position:absolute;left:50%;top:6px;width:32px;height:4px;margin-left:-16px;border-radius:4px;background:var(--line)}
.sheet.hidden{transform:translateY(110%)}
.sheet h3{margin:0 0 4px;font-size:22px;line-height:30px}
.sheet .meta{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}

/* 피커 */
.picker{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:8px 0 12px}
.pcol{border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.pcol .ph{height:36px;display:flex;align-items:center;justify-content:center;background:var(--off);font-size:14px;font-weight:600}
.pcol ul{list-style:none;margin:0;padding:0;height:176px;overflow-y:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:y proximity}
.pcol li button{display:block;width:100%;height:44px;border:0;background:transparent;font-size:16px;cursor:pointer;scroll-snap-align:center;font-variant-numeric:tabular-nums}
.pcol li button[aria-selected="true"]{background:var(--lime);font-weight:700}

/* 실내 */
.typebar{position:fixed;left:0;right:0;top:var(--top-h);height:52px;z-index:20;display:flex;align-items:center;gap:8px;padding:0 12px;background:var(--surface);border-bottom:1px solid var(--line);overflow-x:auto}
.typebar .tchip{min-height:40px;padding:0 14px}
.typebar .sep{width:1px;height:24px;background:var(--line);flex:0 0 1px}
.typebar select{height:40px;border-radius:999px;border:1px solid var(--line);background:var(--surface);padding:0 12px;font:inherit;font-weight:600}
.stage.room{top:calc(var(--top-h) + 52px)}
.minimap{position:absolute;right:12px;top:12px;z-index:6;width:124px;padding:6px;background:rgba(255,255,255,.94);border-radius:12px;box-shadow:var(--sh-float);cursor:pointer}
.minimap .mh{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:600;margin:0 2px 2px}
.minimap svg{width:100%;height:auto;display:block}
.joy{position:absolute;left:20px;bottom:20px;z-index:6;width:92px;height:92px;border-radius:999px;background:rgba(255,255,255,.7);box-shadow:var(--sh-float);touch-action:none}
.joy i{position:absolute;left:27px;top:27px;width:38px;height:38px;border-radius:999px;background:var(--lime);box-shadow:var(--sh-float)}
.joy span{position:absolute;left:0;right:0;bottom:-20px;text-align:center;font-size:12px;font-weight:600}
.rbtns{position:absolute;right:12px;bottom:20px;z-index:6;display:flex;flex-direction:column;gap:8px;align-items:flex-end}
.rbtns a,.rbtns button{display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 14px;border-radius:999px;border:0;background:rgba(255,255,255,.94);box-shadow:var(--sh-float);
  font-weight:650;font-size:14px;color:var(--ink);text-decoration:none;cursor:pointer}
.rbtns a.lime{background:var(--lime)}

/* 큰 평면도 모달 */
.modal{position:fixed;inset:0;z-index:60;background:rgba(24,40,32,.45);display:flex;align-items:flex-end;justify-content:center}
.modal[hidden]{display:none}
.modal .box{background:var(--surface);width:100%;max-width:640px;max-height:92dvh;overflow:auto;border-radius:var(--r-sheet) var(--r-sheet) 0 0;padding:12px 16px calc(16px + var(--safe-b))}
.modal .box header{display:flex;align-items:center;justify-content:space-between}
.modal .box h3{margin:0;font-size:20px}
.modal svg.plan{width:100%;height:auto;margin:8px 0}

/* 창밖 */
.winbar{position:absolute;left:0;right:0;top:0;z-index:6;display:flex;justify-content:space-between;align-items:center;padding:12px}
.face{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 12px;border-radius:999px;background:rgba(255,255,255,.94);box-shadow:var(--sh-float);font-weight:650;font-size:14px}
.face svg{width:20px;height:20px}

/* 목록(/) */
.dcard{display:block;text-decoration:none;color:var(--ink);background:var(--surface);border-radius:var(--r-card);box-shadow:var(--sh);overflow:hidden;margin:16px 0}
.dcard .art{height:150px;background:linear-gradient(180deg,#DDF0EC,#F1F7F5)}
.dcard .art svg{width:100%;height:100%}
.dcard .bd{padding:14px 16px 16px}
.dcard .bd b{font-size:20px;line-height:28px;display:block}

.foot{margin:28px 0 0;font-size:12px;line-height:18px;color:var(--sub)}
.foot a{color:var(--sub)}
details.more{margin:8px 0}
details.more summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600;color:var(--green)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media (min-width:900px){
  .stage .sheet{left:auto;right:16px;bottom:16px;width:380px;border-radius:var(--r-sheet);max-height:70%}
}
.btn svg,.btn2 svg,.hero a.go svg{width:22px;height:22px;flex:0 0 22px}
.hero a.go{white-space:nowrap}
.pr{display:block}.pr .num{white-space:nowrap}

/* ── 아스트라 검수 반영(11/17) ── */
.top .title{font-size:20px}
.btn2{font-size:16px}
.sheet h3{font-size:20px;line-height:28px}
.sheet .handle{height:44px;min-height:44px;margin-top:-8px}
.sheet .handle::before{top:12px}
.sheet .x{position:absolute;right:8px;top:4px}
.sheet.min .full{display:none}
.chip.ro{background:#E7ECE9}
.minimap{width:112px;min-height:128px}
.minimap #miniSvg > svg{width:100%;height:auto;display:block}
.minimap .mh{height:24px}
.minimap .mh > svg{width:20px;height:20px;flex:0 0 20px}
.rbtns svg{width:22px;height:22px;flex:0 0 22px}
.rbtns a,.rbtns button{min-height:48px}
.typebar{height:56px}
.typebar .tchip,.typebar select{min-height:44px}
.typebar select{border-color:#5D7066}
.stage.room{top:calc(var(--top-h) + 56px)}
.tchip{border-color:#9AABA2}
.lbl{min-width:44px;min-height:44px;display:flex;flex-direction:column;justify-content:center}
.lbl.room{min-height:0}
.hint{max-width:calc(100% - 32px);white-space:normal;text-align:center}
.disc{pointer-events:auto;font-size:12px;line-height:18px;background:rgba(255,255,255,.94)}
.disc a{display:inline-block;min-height:24px;color:var(--green);font-weight:600}
.pcol ul{height:132px}
.nowcard{display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:999px;background:rgba(255,255,255,.94);box-shadow:var(--sh-float);font-size:12px;line-height:18px;font-weight:600;margin-bottom:8px}
.prr{display:flex;flex-wrap:wrap;gap:0 4px}
