*{box-sizing:border-box}
body{margin:0;font-family:Arial,"Noto Sans KR",sans-serif;color:#181818;background:#f3f4f6}
.app{display:grid;grid-template-columns:330px minmax(520px,1fr) 360px;height:100vh}
.panel{background:#fff;border-right:1px solid #e5e7eb;padding:16px;overflow:auto}
#map{height:100vh;width:100%;background:#e8eaed}
h1{font-size:19px;margin:0 0 7px;color:#0f172a}
.desc{font-size:12px;line-height:1.55;color:#666;margin-bottom:15px}
.section{border-top:1px solid #ddd;padding-top:12px;margin-top:14px}
.section:first-of-type{border-top:0;padding-top:0;margin-top:0}
.section-title{font-size:13px;font-weight:800;margin-bottom:8px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.field{margin-bottom:9px}
label{font-size:12px;font-weight:700;display:block;margin-bottom:4px}
input,select{width:100%;padding:9px;border:1px solid #bbb;border-radius:6px;background:#fff}
button{width:100%;padding:10px;border:0;border-radius:6px;font-weight:700;cursor:pointer;margin-top:5px}
button:disabled{opacity:.55;cursor:wait}
.primary{background:#0f766e;color:#fff}
.secondary{background:#e6fffb;color:#115e59}
.status{font-size:11px;background:#f0f1f3;border-radius:6px;padding:8px;margin:9px 0;line-height:1.5}
.card{border:1px solid #e5e7eb;border-radius:10px;padding:11px;margin:8px 0;cursor:pointer;background:#fff;transition:.15s}
.card:hover{background:#f0fdfa;border-color:#99f6e4}
.card-title{font-size:13px;font-weight:700}
.meta{font-size:11px;color:#555;line-height:1.55;margin-top:3px}
.detail{border-top:2px solid #222;margin-top:16px;padding-top:10px}
.detail h2{font-size:16px;margin:0 0 8px}
.info-row{font-size:11px;line-height:1.6;border-bottom:1px solid #eee;padding:4px 0}
.info-row b{display:inline-block;width:115px;vertical-align:top}
.popup{background:#fff;padding:9px;border:1px solid #aaa;border-radius:7px;min-width:210px;box-shadow:0 2px 10px rgba(0,0,0,.18)}
.popup strong{font-size:12px}
.popup div{font-size:10px;margin-top:3px;line-height:1.4}
.right-panel{background:#f8fafc;border-left:1px solid #e5e7eb;padding:16px;overflow:auto}
.right-headbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;min-height:36px}
.right-title{font-size:14px;font-weight:800;color:#0f172a;margin:0;white-space:nowrap}
.header-weather{margin-left:auto;min-width:0;display:flex;align-items:center;gap:7px;padding:6px 9px;border:1px solid #fde68a;border-radius:11px;background:#fffbeb;color:#92400e}
.header-weather.loading{border-color:#e2e8f0;background:#fff;color:#94a3b8}
.header-weather-icon{font-size:16px;line-height:1}
.header-weather-main{font-size:12px;font-weight:900;white-space:nowrap}
.header-weather-sub{font-size:9px;color:#78716c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}
.empty-detail{border:1px dashed #cbd5e1;border-radius:12px;padding:24px 16px;color:#64748b;font-size:12px;line-height:1.6;background:#fff;text-align:center}
.hero{width:100%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#e2e8f0;margin-bottom:12px}
.hero img{width:100%;height:100%;object-fit:cover;display:block}
.facility-head{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:13px;margin-bottom:10px}
.facility-head h2{font-size:17px;margin:0 0 7px;color:#0f172a}
.facility-address{font-size:11px;color:#64748b;line-height:1.5}
.chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.chip{font-size:10px;padding:4px 7px;border-radius:999px;background:#ecfeff;color:#155e75;border:1px solid #a5f3fc}
.info-block{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:12px;margin-bottom:10px}
.info-block h3{font-size:12px;margin:0 0 9px;color:#334155}
.status-grid{display:grid;grid-template-columns:1fr;gap:7px}
.status-card{border:1px solid #e2e8f0;border-radius:9px;padding:9px;background:#f8fafc}
.status-card strong{display:block;font-size:11px;color:#0f172a;margin-bottom:3px}
.status-main{font-size:12px;font-weight:800;color:#0f766e}
.status-sub{font-size:10px;color:#64748b;line-height:1.45;margin-top:3px}
.context-loading{font-size:11px;color:#64748b;padding:10px 0}
.context-list{display:grid;grid-template-columns:1fr;gap:9px}
.context-card{position:relative;border:1px solid #dbe4ea;border-left:5px solid #0f766e;border-radius:13px;padding:12px 13px;background:#fff;box-shadow:0 2px 7px rgba(15,23,42,.05)}
.context-card.parking{border-left-color:#2563eb;background:linear-gradient(90deg,#eff6ff 0,#fff 38%)}
.context-card.festival{border-left-color:#db2777;background:linear-gradient(90deg,#fdf2f8 0,#fff 38%)}
.context-card.toilet{border-left-color:#0f766e;background:linear-gradient(90deg,#f0fdfa 0,#fff 38%)}
.context-head{display:flex;align-items:center;gap:9px;margin-bottom:7px}
.context-icon{width:34px;height:34px;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;flex:0 0 auto;box-shadow:0 1px 4px rgba(15,23,42,.08)}
.context-title{font-size:12px;font-weight:900;color:#0f172a}
.context-main{font-size:19px;font-weight:900;color:#0f766e;margin-top:5px;line-height:1.2;letter-spacing:-.2px}
.context-sub{font-size:10px;color:#64748b;line-height:1.55;margin-top:5px}
.context-item{border-top:1px solid #e5e7eb;padding-top:8px;margin-top:8px}
.context-item:first-of-type{border-top:0;padding-top:0;margin-top:0}
.context-empty{font-size:10px;color:#64748b;margin-top:8px;line-height:1.5;word-break:break-word}
.context-badge{display:inline-block;margin-top:7px;padding:4px 8px;border-radius:999px;background:#ecfdf5;color:#0f766e;font-size:9px;font-weight:900}
.route-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.route-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:auto;padding:6px 9px;margin:0;border-radius:8px;text-decoration:none;font-size:10px;font-weight:900;border:1px solid #cbd5e1;background:#fff;color:#0f172a;transition:.15s;cursor:pointer}
.route-btn:hover{transform:translateY(-1px);box-shadow:0 2px 6px rgba(15,23,42,.10)}
.route-btn.walk{border-color:#86efac;background:#f0fdf4;color:#166534}
.route-btn.car{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.mapwrap{position:relative}
.route-summary{display:none;position:absolute;left:16px;bottom:16px;z-index:20;min-width:240px;max-width:330px;padding:11px 12px;border:1px solid #bfdbfe;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 6px 18px rgba(15,23,42,.16);backdrop-filter:blur(4px)}
.route-summary.show{display:block}
.route-summary-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.route-summary-title{font-size:12px;font-weight:900;color:#0f172a}
.route-summary-close{width:25px;height:25px;margin:0;padding:0;border-radius:50%;background:#f1f5f9;color:#475569;font-size:13px}
.route-summary-main{font-size:15px;font-weight:900;color:#1d4ed8;margin-top:6px}
.route-summary-sub{font-size:10px;color:#64748b;line-height:1.45;margin-top:4px}
.kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.kpi{background:#f8fafc;border-radius:9px;padding:9px;border:1px solid #e2e8f0}
.kpi-label{font-size:10px;color:#64748b}
.kpi-value{font-size:13px;font-weight:800;color:#0f172a;margin-top:3px;word-break:break-word}

.radius-presets{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:4px}
.radius-btn{padding:8px 2px;margin:0;background:#f8fafc;color:#475569;border:1px solid #cbd5e1;font-size:10px}
.radius-btn.active{background:#0f766e;color:#fff;border-color:#0f766e}
.visual-tabs{display:grid;grid-template-columns:1fr;gap:7px;margin-bottom:8px}
.visual-card{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff}
.visual-card .visual-label{font-size:10px;font-weight:800;padding:7px 8px;color:#334155;background:#f8fafc}
.visual-card img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;cursor:pointer}
.visual-thumb-wrap{position:relative;cursor:pointer}
.visual-thumb-wrap::after{content:"클릭해서 크게 보기";position:absolute;right:8px;bottom:8px;padding:5px 8px;border-radius:999px;background:rgba(15,23,42,.72);color:#fff;font-size:10px;font-weight:800}
.visual-placeholder{width:100%;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;background:#eef2f7;color:#334155;font-size:12px;font-weight:800;cursor:pointer}
model-viewer{width:100%;height:230px;background:#eef2f7;border-radius:10px}
.ride-summary{font-size:11px;color:#475569;line-height:1.5;margin-bottom:8px}
.ride-card{display:grid;grid-template-columns:88px 1fr;gap:9px;border:1px solid #e2e8f0;border-radius:10px;padding:8px;margin:7px 0;background:#fff}
.ride-thumb{width:88px;height:78px;border-radius:8px;object-fit:cover;background:#e2e8f0;cursor:pointer}
.ride-noimg{width:88px;height:78px;border-radius:8px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;text-align:center;color:#94a3b8;font-size:9px}
.ride-title{font-size:11px;font-weight:800;color:#0f172a;line-height:1.35}
.ride-sub{font-size:9px;color:#64748b;margin-top:2px}
.ride-guide{font-size:10px;color:#475569;line-height:1.45;margin-top:5px}
.ride-guide b{color:#0f766e}
.special-list{display:grid;gap:6px}
.special-row{display:grid;grid-template-columns:88px 1fr;gap:7px;font-size:10px;line-height:1.4;padding:7px 0;border-bottom:1px solid #f1f5f9}
.special-row:last-child{border-bottom:0}
.special-label{font-weight:800;color:#334155}.special-value{color:#475569}
.validity{display:inline-block;margin-top:5px;padding:3px 6px;border-radius:999px;font-size:9px;font-weight:800}
.validity.valid{background:#dcfce7;color:#166534}.validity.expired{background:#fee2e2;color:#991b1b}.validity.today{background:#fef3c7;color:#92400e}.validity.unknown{background:#f1f5f9;color:#64748b}
.photo-modal{position:fixed;inset:0;background:rgba(15,23,42,.82);z-index:9999;display:none;align-items:center;justify-content:center;padding:24px}
.photo-modal.open{display:flex}.photo-modal-inner{width:min(1180px,94vw);max-height:90vh;position:relative}.photo-modal img{max-width:100%;max-height:82vh;border-radius:12px;display:block;background:#fff}.photo-modal-viewer-wrap{display:none;width:100%;height:min(78vh,820px);background:#fff;border-radius:12px;overflow:hidden}.photo-modal-viewer-wrap model-viewer{width:100%;height:100%;border-radius:0;background:#eef2f7;--poster-color:#eef2f7}.photo-modal-title{color:#fff;font-size:12px;margin-top:8px;text-align:center}.photo-modal-close{position:absolute;right:-10px;top:-44px;width:38px;height:38px;border-radius:50%;background:#fff;color:#111;margin:0;font-size:18px}

@media(max-width:850px){
 .app{grid-template-columns:1fr;grid-template-rows:44vh auto auto}
 .panel{order:2;border-right:0;border-top:1px solid #ddd}
 .mapwrap{order:1}
 .panel{order:2}
 .right-panel{order:3;border-left:0;border-top:1px solid #e5e7eb}
 #map{height:44vh}
}
.fab-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 20; background: #fff; border: 1px solid #cbd5e1; border-radius: 999px; padding: 10px 16px; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-size: 13px; font-weight: 800; color: #475569; cursor: pointer; transition: 0.2s; }
.fab-toggle.active { background: #0f766e; color: #fff; border-color: #0f766e; }
.fab-toggle:hover { transform: translateY(-2px); }
.chip.active { background: #0f766e; color: #fff; border-color: #0f766e; }