:root {
  --ink: #15202b; --muted: #5d6874; --faint: #8a939d; --line: #e3e7eb; --soft: #f3f5f7; --bg: #ffffff;
  --brand: #0e7c66; --brand-ink: #0a5e4d; --brand-soft: #e7f3ef;
  --bad: #cc2f2f; --bad-soft: #fdeeee; --warn: #a96300; --warn-soft: #fff3df; --ok: #13804a;
  --blue: #2457d6; --blue-soft: #edf2fd;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.c-ok { color: var(--ok); } .c-bad { color: var(--bad); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: none; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d3d9df; background: #fff; border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:disabled { background: #b8c7c2; border-color: #b8c7c2; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.big { width: 100%; min-height: 48px; font-size: 15.5px; border-radius: 11px; }
.input { border: 1px solid #cfd6dd; border-radius: 9px; padding: 9px 12px; font: inherit; font-size: 14.5px; background: #fff; color: var(--ink); min-width: 0; }
.input.sm { padding: 4px 8px; font-size: 13px; border-radius: 7px; }

/* ---------- Phone stage ---------- */
body.is-app { background: #fff; }
body.is-app.framed { background: #e8ecf0; }
.stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 36px; padding: 24px 20px; position: relative; }
.device { position: relative; width: 390px; height: min(844px, calc(100vh - 48px)); min-height: 560px; border-radius: 46px; background: #fff; overflow: hidden; flex: none; box-shadow: 0 0 0 10px #14181d, 0 0 0 11px #3a3f47, 0 30px 70px rgba(16, 24, 40, .28); }
.stage-home { position: absolute; top: 18px; left: 22px; font-size: 13.5px; color: var(--muted); text-decoration: none; }
.stage-home::before { content: "‹ "; }
.dev { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #fff; overflow: hidden; }
.device .dev { height: 100%; }
.screen { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 18px; }
.screen::-webkit-scrollbar { display: none; }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #fff; padding-bottom: env(safe-area-inset-bottom); }
.device .tabbar { padding-bottom: 14px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; text-decoration: none; color: var(--faint); font-size: 11px; font-weight: 600; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--brand); }

/* side panel next to the phone (Korean, for the client) */
.side { width: 340px; max-height: calc(100vh - 48px); overflow: auto; background: #fff; border-radius: 16px; padding: 20px 20px 16px; box-shadow: 0 10px 30px rgba(16, 24, 40, .1); font-size: 13.5px; line-height: 1.55; }
.side h3 { margin: 0 0 6px; font-size: 16px; }
.side h4 { margin: 16px 0 6px; font-size: 13.5px; }
.side-lead { margin: 0 0 12px; color: var(--muted); }
.side-kv { display: grid; grid-template-columns: 82px 1fr; gap: 7px 10px; margin: 0 0 12px; }
.side-kv dt { color: var(--muted); }
.side-kv dd { margin: 0; }
.side-kv.wide { grid-template-columns: minmax(0, 1fr) auto; }
.side-kv.wide dd { text-align: right; font-variant-numeric: tabular-nums; }
.side-stat { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.side-stat span { color: var(--muted); }
.side-note { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.side-feed, .side-log { list-style: none; margin: 0; padding: 0; }
.side-feed li { padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; }
.side-feed li > span { color: var(--faint); font-variant-numeric: tabular-nums; grid-row: span 2; }
.side-feed li b { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.side-log li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.side-log li span { color: var(--faint); flex: none; width: 52px; }
.side-log li.new { color: var(--brand-ink); font-weight: 600; }
.side-link { color: var(--brand); font-weight: 600; text-decoration: none; }
.side-flow { margin: 0; padding: 0; list-style: none; counter-reset: f; }
.side-flow li { position: relative; padding: 0 0 12px 28px; color: var(--muted); }
.side-flow li::before { counter-increment: f; content: counter(f); position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: center; line-height: 19px; }
.side-flow li.on::before { background: var(--brand); color: #fff; }
.side-flow li b { display: block; color: var(--ink); }
.side-pre { background: #0f1720; color: #d6e2f0; border-radius: 9px; padding: 10px 12px; font-size: 11.5px; line-height: 1.45; overflow: auto; max-height: 300px; margin: 0; }

/* ---------- App header & common ---------- */
.ah { position: sticky; top: 0; z-index: 500; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 14px 8px 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.device .ah { padding-top: 14px; min-height: 64px; }
.ah-back { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; margin-left: -8px; color: var(--ink); }
.ah-back svg { width: 22px; height: 22px; stroke-width: 2.2; }
.ah-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ah-t b { font-size: 17px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-t small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.grp { font-size: 13px; color: var(--muted); font-weight: 700; margin: 18px 16px 8px; display: flex; align-items: center; gap: 6px; }
.grp span { font-weight: 600; color: var(--faint); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.row-btns .btn { flex: 1; min-height: 44px; }
.thumb { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--muted); }
.thumb svg { width: 20px; height: 20px; }
.c-palace { background: #f2ece4; color: #8a5a2b; } .c-street { background: #ecf1e8; color: #4d6b35; } .c-market { background: #fbeee4; color: #b0571d; } .c-view { background: #e8eefb; color: #3456a6; }
.c-food { background: #fdeee9; color: #b4442a; } .c-cafe { background: #f3ece6; color: #7a4e2c; } .c-dessert { background: #fcecf3; color: #a83e6e; } .c-museum { background: #eeecf8; color: #5c4aa8; }
.toast { position: absolute; left: 14px; right: 14px; bottom: 84px; z-index: 900; background: rgba(21, 28, 36, .93); color: #fff; border-radius: 11px; padding: 10px 13px; font-size: 13.5px; text-align: center; transition: opacity .3s; }
.toast.out { opacity: 0; }

/* map */
.mapbox { position: relative; height: 230px; background: #e9eef0; z-index: 1; }
.mapbox.short { height: 170px; }
.mapbox.live { height: 200px; }
.lmap { width: 100%; height: 100%; }
.mapfb { width: 100%; height: 100%; display: block; }
.leaflet-container { font: inherit; background: #e9eef0; }
.leaflet-control-attribution { font-size: 10px !important; }
.mk { display: flex !important; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 800; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.mk svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 2; }
.mk.bad { background: var(--bad); }
.mk.done { background: #8d969f; }
.mk.hotel { background: var(--ink); border-radius: 8px; }
.mk.cat { background: var(--brand); width: 34px !important; height: 34px !important; margin: -17px 0 0 -17px !important; }
.mk.cat svg { width: 18px; height: 18px; }
.mk.me { background: #2f6fed; width: 16px !important; height: 16px !important; margin: -8px 0 0 -8px !important; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 111, 237, .25); }
.mk.fac { border-radius: 8px; }
.mk.fac.wc { background: #2f6fed; } .mk.fac.smoke { background: #59626c; }

/* ---------- Plan ---------- */
.segs { display: flex; gap: 6px; padding: 10px 16px; }
.seg { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 6px; font-size: 13px; font-weight: 600; color: var(--muted); position: relative; }
.seg.on { border-color: var(--ink); color: var(--ink); background: var(--soft); }
.dotbad { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 4px; }
.sum > div { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.sum > div b { color: var(--ink); font-size: 15px; }
.sum > .sum-btns { flex: none; flex-wrap: nowrap; gap: 6px; }
.notice { display: flex; align-items: center; gap: 9px; margin: 10px 16px 2px; padding: 10px 12px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 600; }
.notice svg { width: 19px; height: 19px; flex: none; }
.notice span { flex: 1; }
.notice.bad { background: var(--bad-soft); color: #9e2222; }
.tl { list-style: none; margin: 10px 0 0; padding: 0 16px; }
.tl li { display: grid; grid-template-columns: 46px 30px minmax(0, 1fr) auto; column-gap: 8px; align-items: start; }
.tl-time { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 3px; display: flex; flex-direction: column; line-height: 1.25; }
.tl-time small { font-weight: 500; color: var(--faint); font-size: 12px; }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 1px 2px 0; }
.tl-dot.bad { background: var(--bad); } .tl-dot.warn { background: #d08a15; }
.tl-dot.hotel { background: var(--ink); border-radius: 8px; }
.tl-dot.hotel svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 2; }
.tl-body { display: flex; flex-direction: column; min-width: 0; padding-bottom: 2px; }
.tl-body b { font-size: 15px; line-height: 1.35; }
.tl-body small { color: var(--muted); font-size: 12.5px; }
.tl-stop { cursor: pointer; border-radius: 10px; padding: 6px 0; }
.tl-stop:hover .tl-body b { text-decoration: underline; text-decoration-color: #c3cad1; }
.tl-stop.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: #dff1ea; } 100% { background: transparent; } }
.tl-end { padding: 4px 0; }
.tl-end.bad .tl-time { color: var(--bad); }
.tl-leg { color: var(--muted); font-size: 12.5px; min-height: 30px; }
.tl-leg > div { display: flex; align-items: center; gap: 5px; padding: 5px 0; }
.tl-leg > div svg { width: 15px; height: 15px; }
.tl-line { justify-self: center; width: 0; height: 100%; min-height: 30px; border-left: 3px dotted #b9c3cc; }
.tl-line.subway { border-left: 3px solid #9fc6bb; }
.tl-line.taxi { border-left: 3px dashed #e3a37a; }
.tl-line.bus { border-left: 3px solid #b5c4e6; }
.ck { display: flex; align-items: flex-start; gap: 4px; font-style: normal; font-size: 12.5px; font-weight: 600; margin-top: 3px; line-height: 1.35; }
.ck svg { width: 14px; height: 14px; flex: none; margin-top: 1px; stroke-width: 2.2; }
.ck.ok { color: var(--ok); } .ck.warn { color: var(--warn); } .ck.bad { color: var(--bad); } .ck.rain { color: #2f6fed; }
.ed { display: flex; gap: 2px; align-self: center; }
.ed button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.ed button svg { width: 15px; height: 15px; }
.ed button:disabled { opacity: .35; }
.plan-foot { padding: 8px 16px 0 100px; }
.sponsor { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: calc(100% - 32px); margin: 16px 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.sponsor b { font-size: 14.5px; }
.sponsor small { font-size: 12.5px; color: var(--muted); }
.sp-l { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .3px; }

/* sheets inside the phone */
.sheet { position: absolute; inset: 0; z-index: 800; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet.center { justify-content: center; padding: 24px; }
.sheet-bg { position: absolute; inset: 0; background: rgba(12, 18, 26, .45); }
.sheet-body { position: relative; background: #fff; border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88%; overflow: auto; }
.sheet.center .sheet-body { border-radius: 16px; padding: 0 0 16px; overflow: hidden; }
.opt-run { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0 4px; }
.opt-run > b { font-size: 16.5px; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #d8e4e0; border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.opt-steps { list-style: none; padding: 0; margin: 4px 0 0; text-align: left; }
.opt-steps li { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--faint); font-size: 14px; transition: color .2s; }
.opt-steps li svg { width: 16px; height: 16px; opacity: 0; stroke-width: 2.4; color: var(--brand); }
.opt-steps li.on { color: var(--ink); }
.opt-steps li.on svg { opacity: 1; }
#optCount { font-size: 12.5px; min-height: 18px; font-variant-numeric: tabular-nums; margin: 0; }
.opt-head { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 12px; }
.opt-head svg { width: 22px; height: 22px; color: var(--brand); }
.opt-head.ok svg { color: var(--ok); }
.cmps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cmp { background: var(--soft); border-radius: 11px; padding: 10px 12px; display: flex; flex-direction: column; }
.cmp span { font-size: 12.5px; color: var(--muted); }
.cmp b { font-size: 16px; }
.cmp s { color: var(--faint); font-weight: 500; font-size: 13.5px; margin-right: 4px; }
.cmp em { font-style: normal; font-size: 12.5px; color: var(--ok); font-weight: 700; }
.opt-res h4 { font-size: 13.5px; margin: 16px 0 6px; color: var(--muted); }
.why { margin: 0; padding: 0 0 0 18px; font-size: 14px; }
.why li { margin: 5px 0; }
.opt-res .muted.small { margin: 12px 0 0; }

/* ---------- Saved ---------- */
.plist { list-style: none; margin: 0; padding: 0 16px; }
.plist li { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.plist li:last-child { border-bottom: 0; }
.plist li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plist li b { font-size: 14.5px; }
.plist li small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist li small.muted { color: var(--faint); }
.plist .when { font-size: 12px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.plist.compact { padding: 0; margin-top: 6px; }
.offer { display: flex; align-items: center; gap: 11px; margin: 14px 16px 0; padding: 12px; border-radius: 12px; background: var(--brand-soft); }
.offer > svg { width: 24px; height: 24px; color: var(--brand); flex: none; }
.offer > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.offer b { font-size: 14px; }
.offer small { font-size: 12.5px; color: var(--muted); }
.adslot { margin: 14px 16px 0; height: 84px; border: 1px dashed #c9d0d7; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--faint); background: #fafbfc; }
.adslot span, .bnr span { font-size: 10.5px; font-weight: 700; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; line-height: 15px; }
.bnr { display: flex; align-items: center; gap: 8px; width: calc(100% - 32px); margin: 14px 16px 0; padding: 14px; border: 0; border-radius: 12px; background: linear-gradient(100deg, #1f3a6e, #2b5aa8); color: #fff; text-align: left; }
.bnr b { font-size: 14px; }
.bnr span { color: #c7d6f5; }
.popup { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.popup-art svg { display: block; width: 100%; height: auto; }
.popup b { font-size: 16px; padding: 12px 16px 0; }
.popup .row-btns { padding: 0 16px; }

/* ---------- Place ---------- */
.pd { padding: 14px 16px 0; }
.pd-cat { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); }
.pd-src { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }
.pd-kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px 10px; margin: 14px 0 0; font-size: 14px; }
.pd-kv dt { color: var(--muted); }
.pd-kv dd { margin: 0; }
.pd-kv .ck { margin-top: 0; }
.pd .offer, .pd .adslot, .pd .bnr { margin-left: 0; margin-right: 0; width: 100%; }
.pd .grp { margin: 18px 0 6px; }
.book { list-style: none; margin: 0; padding: 0; }
.book li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.book li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.book li b { font-size: 14.5px; }
.book li small { font-size: 12.5px; color: var(--muted); }

/* ---------- Today ---------- */
.now { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px 6px; }
.now > div { display: flex; flex-direction: column; }
.now > div:first-child b { font-size: 20px; letter-spacing: -.3px; }
.now small { font-size: 12px; color: var(--faint); }
.now-next { text-align: right; align-items: flex-end; min-width: 0; }
.now-next b { font-size: 14.5px; }
.prog { list-style: none; margin: 4px 16px 10px; padding: 0; display: flex; }
.prog li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.prog li::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.prog li:first-child::before { display: none; }
.prog li i { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #c8d0d7; color: var(--muted); font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.prog li i svg { width: 12px; height: 12px; stroke-width: 3; }
.prog li.done i { background: var(--brand); border-color: var(--brand); color: #fff; }
.prog li.done + li::before { background: var(--brand); }
.prog li.next i { border-color: var(--brand); color: var(--brand); }
.prog li.bad i { border-color: var(--bad); color: var(--bad); }
.incs { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.inc { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.inc-h { display: flex; gap: 10px; }
.inc-h b { font-size: 14.5px; line-height: 1.35; display: block; }
.inc-h p { margin: 2px 0 0; font-size: 12.8px; color: var(--muted); }
.ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ic svg { width: 20px; height: 20px; }
.ic.rain { background: #e8f0fe; color: #2f6fed; } .ic.queue { background: #fdeee9; color: #b4442a; } .ic.train { background: #eef0f3; color: #3d4752; } .ic.shut { background: #fff3df; color: #a96300; }
.opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; }
.opt:hover { border-color: var(--brand); }
.opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-t b { font-size: 14px; }
.opt-t small { font-size: 12px; color: var(--muted); }
.opt-s { flex: none; width: 92px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.opt-s i { display: block; height: 4px; border-radius: 2px; background: var(--brand); align-self: flex-start; max-width: 100%; }
.opt-s em { font-style: normal; font-size: 11px; color: var(--muted); text-align: right; line-height: 1.2; }
.basis { font-size: 11.5px; color: var(--faint); margin: 8px 0 0; }
.inc.applied { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--brand-soft); border-color: transparent; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); }
.inc.applied > svg { width: 17px; height: 17px; stroke-width: 2.4; flex: none; }
.inc.applied span { flex: 1; }
.needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.need { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.need svg { width: 22px; height: 22px; }
.need.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.need-list { margin: 10px 16px 0; }
.need-list > b { font-size: 13px; color: var(--muted); }
.need-list ul { list-style: none; margin: 4px 0 0; padding: 0; }
.need-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.need-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.need-list li b { font-size: 14px; }
.need-list li small { font-size: 12px; color: var(--muted); }
.dist { text-align: right; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; }
.dist small { font-weight: 500; }
.fac-wc { background: #e8f0fe; color: #2f6fed; } .fac-smoke { background: #eef0f3; color: #59626c; }
.warnline { background: var(--warn-soft); color: #6e4300; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; margin: 8px 0 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rest { list-style: none; margin: 0; padding: 0 16px; }
.rest li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rest li.past { color: var(--faint); }
.rest li.home { cursor: default; border-bottom: 0; }
.rest .lt { width: 42px; flex: none; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rest li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rest li b { font-size: 14px; }
.rest li small { font-size: 12px; color: var(--muted); }

/* ---------- Add from SNS ---------- */
.drop { margin: 16px 16px 0; padding: 22px 14px; border: 2px dashed #c4ccd4; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--muted); }
.drop > svg { width: 34px; height: 34px; color: var(--brand); }
.drop b { color: var(--ink); font-size: 15.5px; }
.drop span { font-size: 13px; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.linkrow { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; }
.linkrow > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.linkrow .input { flex: 1; }
.pd .linkrow, .screen > .linkrow { margin-left: 16px; margin-right: 16px; }
.exs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px; }
.ex { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; font-size: 12.5px; font-weight: 600; }
.ex img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; display: block; background: var(--soft); }
.ex-link { aspect-ratio: 9 / 16; border-radius: 8px; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.ex-link svg { width: 28px; height: 28px; }
.ex-link small { font-size: 10.5px; font-weight: 500; }
.ex:hover { border-color: var(--brand); }
.an { padding: 14px 16px 0; }
.an-src { display: flex; gap: 12px; align-items: center; }
.an-src img { width: 64px; height: 114px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.an-link { width: 64px; height: 64px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.an-link svg { width: 26px; height: 26px; }
.an-src > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.an-src b { font-size: 13.5px; word-break: break-all; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; }
.steps li { display: flex; gap: 10px; padding: 6px 0; color: var(--faint); }
.steps li i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cfd6dc; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.steps li i svg { width: 12px; height: 12px; stroke-width: 3; }
.steps li.ok { color: var(--ink); }
.steps li.ok i { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps li.run i { border-color: var(--brand); border-top-color: transparent; animation: spin .7s linear infinite; }
.steps li.run { color: var(--ink); }
.steps li > div { display: flex; flex-direction: column; min-width: 0; }
.steps li b { font-size: 14px; }
.steps li small { font-size: 12.5px; color: var(--muted); }
.cands { list-style: none; margin: 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cands li { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; }
.cands li.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c3cbd2; margin-top: 2px; }
.cands li.on .radio { border: 5px solid var(--brand); }
.cd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cd-h { display: flex; align-items: center; gap: 8px; }
.cd-h b { flex: 1; font-size: 14.5px; min-width: 0; }
.cd-h em { font-style: normal; font-weight: 800; font-size: 14px; width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.conf { width: 56px; height: 5px; border-radius: 3px; background: var(--soft); overflow: hidden; flex: none; }
.conf i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.cd > small { font-size: 12.5px; color: var(--muted); }
.evs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 3px; }
.ev { font-size: 12px; background: var(--soft); border-radius: 6px; padding: 2px 7px; color: var(--ink); }
.ev i { font-style: normal; color: var(--faint); margin-right: 4px; font-size: 11px; }
.ev.neg { background: var(--bad-soft); color: #9e2222; }
.cd-info { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 6px; }
.screen > .btn.big { width: calc(100% - 32px); margin: 14px 16px 0; }
.screen > .muted.small { margin: 10px 16px 0; }
.json { margin: 12px 16px 0; font-size: 13px; }
.json summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.json pre { background: #0f1720; color: #d6e2f0; border-radius: 9px; padding: 10px 12px; font-size: 11.5px; overflow: auto; margin: 8px 0 0; }
.saved-ok { display: flex; gap: 10px; margin: 16px 16px 0; padding: 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.saved-ok > svg { width: 22px; height: 22px; flex: none; stroke-width: 2.4; }
.saved-ok > div { display: flex; flex-direction: column; }
.saved-ok span { font-size: 13.5px; color: var(--ink); }
.screen > .row-btns { padding: 0 16px; }

/* ---------- Admin ---------- */
body.is-admin { background: #f3f5f7; }
.adm-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.adm-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.adm-bar { height: 54px; display: flex; align-items: center; gap: 12px; }
.adm-bar .home { display: inline-flex; color: var(--muted); }
.adm-bar .home svg { width: 20px; height: 20px; }
.adm-bar b { font-size: 16px; flex: 1; }
.adm-date { font-size: 13px; color: var(--muted); }
.adm-tabs { display: flex; gap: 24px; height: 44px; align-items: stretch; overflow-x: auto; }
.adm-tabs a { display: inline-flex; align-items: center; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14.5px; white-space: nowrap; }
.adm-tabs a.on { color: var(--ink); border-color: var(--ink); font-weight: 700; }
.adm-body { padding-top: 20px; padding-bottom: 60px; }
.adm .btn.primary { background: var(--blue); border-color: var(--blue); }
.adm .link { color: var(--blue); }
.adm-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.adm-h h2 { font-size: 20px; margin: 0 0 4px; }
.adm-h h3 { font-size: 16px; margin: 0; }
.adm-h.sub { margin: 28px 0 10px; align-items: center; }
.lead { color: var(--muted); margin: 0; font-size: 14px; max-width: 760px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.stats > div { padding: 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.stats > div:last-child { border-right: 0; }
.stats span { font-size: 12.5px; color: var(--muted); }
.stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
.stats small { font-size: 12px; color: var(--faint); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.panel-h b { font-size: 15px; }
.legend { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gl { stroke: #edf0f3; stroke-width: 1; }
.chart .ax { fill: var(--faint); font-size: 10.5px; stroke: none; }
.chart .vl { fill: var(--ink); font-size: 11px; font-weight: 700; stroke: none; }
.chart .bar-g:hover rect { fill: rgba(36, 87, 214, .05); }
.chart .bar-g path, .chart .bar-g rect { stroke: none; }
.tip { position: absolute; background: var(--ink); color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 7px; pointer-events: none; white-space: nowrap; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 56px 92px minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.log li:last-child { border-bottom: 0; }
.log-t { color: var(--faint); font-size: 12.5px; }
.log-k { font-weight: 600; }
.log-x { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-m { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.log li.new { background: linear-gradient(90deg, var(--blue-soft), transparent); }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.mini-stats div { display: flex; flex-direction: column; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.mini-stats b { font-size: 19px; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.panel .tbl { border: 0; border-radius: 0; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .sub { display: block; color: var(--faint); font-size: 12px; }
.tbl .sub a { color: inherit; }
.tbl tbody tr[data-go] { cursor: pointer; }
.tbl tbody tr[data-go]:hover { background: #f7f9fc; }
.tbl tr.sel, .tbl tr.mine { background: var(--blue-soft); }
.tbl tr.new td { background: var(--blue-soft); }
.tbl.small { font-size: 13px; }
.tbl.small td, .tbl.small th { padding: 8px 10px; }
.st { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.ok { color: var(--ok); } .st.mid { color: var(--warn); } .st.off { color: #8a929c; }
.sw { width: 40px; height: 22px; border-radius: 11px; border: 0; background: #cdd3d9; position: relative; padding: 0; flex: none; transition: background .15s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.sw.on { background: var(--blue); }
.sw.on i { left: 21px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.split.has-pick { grid-template-columns: minmax(0, 1fr) 430px; }
.detail { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: sticky; top: 112px; }
.d-head { display: flex; justify-content: space-between; align-items: center; font-size: 15.5px; }
.detail h4 { font-size: 13.5px; margin: 14px 0 8px; }
.kv { display: grid; grid-template-columns: 80px 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.adm-form { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.adm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; min-width: 0; }
.adm-form label.chk { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; color: var(--ink); }
.adm-form .input { font-weight: 400; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.f-btns { display: flex; justify-content: flex-end; gap: 8px; }
.pick-places { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pick-places legend { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; padding: 0; }
.pick-places label { flex-direction: row; align-items: center; gap: 5px; color: var(--ink); font-weight: 500; font-size: 14px; }
.adm-form.flat { border: 0; padding: 0; flex-direction: row; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.adm-form.flat label { flex: 1; }
.ads-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rules { margin: 14px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.rules li { margin: 4px 0; }
.wf { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.wf-phone { width: 150px; border: 6px solid #1c2128; border-radius: 22px; background: #fff; padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; min-height: 280px; }
.wf-h { font-size: 11.5px; font-weight: 700; text-align: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.wf-row { height: 16px; border-radius: 4px; background: #eef1f4; }
.wf-row.short { width: 60%; }
.wf-map { height: 54px; border-radius: 6px; background: #e3ece9; }
.wf-btn { height: 20px; border-radius: 5px; background: var(--brand); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.wf-ad { height: 34px; border-radius: 5px; border: 2px dashed #f0a53a; background: #fff6e6; font-size: 10.5px; color: #8a5a00; font-weight: 700; display: flex; align-items: center; justify-content: center; text-align: center; }
.wf-ad.off { border-color: #c9d0d7; background: #f6f7f9; color: var(--faint); }
.wf-link { font-size: 11.5px; color: var(--blue); text-decoration: none; text-align: center; margin-top: auto; }

/* ---------- Landing ---------- */
body.is-landing { background: #e9edf1; }
.land { max-width: 1240px; margin: 0 auto; padding: 32px 24px 40px; }
.land header { text-align: center; margin-bottom: 24px; }
.land h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.5px; }
.land header p { margin: 0 auto; color: var(--muted); max-width: 720px; text-wrap: balance; }
.land-stage { display: flex; gap: 40px; justify-content: center; align-items: flex-start; }
.land figure { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.land figcaption { margin-top: 14px; text-align: center; display: flex; flex-direction: column; gap: 2px; max-width: 340px; }
.land figcaption a { color: var(--brand); font-weight: 700; text-decoration: none; font-size: 16px; }
.land figcaption span { font-size: 13.5px; color: var(--muted); }
.pframe { width: 304px; height: 624px; border-radius: 38px; overflow: hidden; background: #fff; box-shadow: 0 0 0 8px #14181d, 0 0 0 9px #3a3f47, 0 24px 50px rgba(16, 24, 40, .25); flex: none; }
.pframe iframe { width: 390px; height: 800px; border: 0; transform: scale(.78); transform-origin: 0 0; display: block; }
.land-admin { flex: 1; max-width: 820px; }
.land-admin figcaption { max-width: none; }
.bframe { width: 100%; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 44px rgba(16, 24, 40, .16); border: 1px solid #d5dbe2; }
.bbar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #f1f3f6; border-bottom: 1px solid #dde2e8; font-size: 12px; color: var(--muted); }
.bbar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd5dc; }
.bbar span { margin-left: 10px; }
.bview { position: relative; height: 590px; overflow: hidden; }
.bview iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }
.land-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 34px; }
.land-links a { display: flex; flex-direction: column; gap: 3px; padding: 14px 0; border-top: 1px solid #cfd6dd; text-decoration: none; }
.land-links b { font-size: 15px; color: var(--ink); }
.land-links b::after { content: " ›"; color: var(--brand); }
.land-links span { font-size: 13.5px; color: var(--muted); }
.land-links a:hover b { color: var(--brand); }
.land footer { margin-top: 26px; display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; text-align: center; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1180px) { .side { width: 300px; } }
@media (max-width: 1120px) { .land-stage { flex-direction: column; align-items: center; } .land-admin { width: 100%; } }
@media (max-width: 980px) {
  .grid2, .ads-grid { grid-template-columns: minmax(0, 1fr); }
  .split.has-pick { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats > div { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .adm-in { padding: 0 16px; }
  .adm-date { display: none; }
  .adm-h { flex-direction: column; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .f2, .f3 { grid-template-columns: minmax(0, 1fr); }
  .log li { grid-template-columns: 50px minmax(0, 1fr); }
  .log-k { grid-column: 2; } .log-x { grid-column: 2; } .log-m { grid-column: 2; }
  .log-t { grid-row: span 3; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .land { padding: 22px 16px 32px; }
  .land h1 { font-size: 23px; }
  .land-links { grid-template-columns: minmax(0, 1fr); }
  .adm-form.flat { flex-direction: column; align-items: stretch; }
}
.tbl td:first-child, .tbl .nw { white-space: nowrap; }
