/* 校园导航：全屏地图 + 左上一个可收起的面板 + 右下一列工具图标。
   3D 模式（body.sf）是深色科幻 HUD，简图模式是浅色。 */
body.cnx { margin: 0; overflow: hidden; background: #eef1ea; height: 100vh; height: 100dvh; font-feature-settings: "tnum"; }
html:has(> body.cnx) { background: #03060d; }
.cnx .cn-map { position: fixed; inset: 0; touch-action: none; }
.cnx .cn-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; display: block; }
.cnx .cn-map canvas.drag { cursor: grabbing; }

.cn-glass {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 10px 34px rgba(15, 23, 42, .18), 0 1px 0 rgba(255, 255, 255, .7) inset;
  border-radius: 18px; color: var(--ds-text);
}

/* ---------- 左上面板 ---------- */
.cn-panel { position: fixed; top: 14px; left: 14px; width: 364px; max-height: calc(100vh - 28px); z-index: 15; display: flex; flex-direction: column; overflow: hidden; }
.cn-ph { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; min-height: 52px; box-sizing: border-box; }
.cn-ph .sp { flex: 1; }
.cn-brand b { font-size: 16px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.cn-livepill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(15, 23, 42, .06); font-size: 12px; color: var(--ds-text-2); white-space: nowrap; }
.cn-livepill i { width: 7px; height: 7px; border-radius: 50%; background: #9aa0a8; flex: none; }
.cn-livepill.on i { background: #10b981; animation: cnpulse 1.8s infinite; }
@keyframes cnpulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.cn-ibtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: inherit; cursor: pointer; flex: none; padding: 0; }
.cn-ibtn:hover { background: rgba(15, 23, 42, .07); }
.cn-ibtn svg { width: 19px; height: 19px; }
.cn-fold svg { transition: transform .25s ease; }
.cn-panel.collapsed .cn-fold svg { transform: rotate(180deg); }
.cn-panel.collapsed .cn-body { display: none; }
.cn-panel.collapsed { width: auto; }
.cn-body { display: flex; flex-direction: column; min-height: 0; flex: 1; border-top: 1px solid rgba(15, 23, 42, .07); }
.cn-tabs { display: flex; gap: 4px; padding: 10px 12px 0; }
.cn-tabs button { flex: 1; border: 0; background: transparent; padding: 7px 0; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ds-text-3); cursor: pointer; }
.cn-tabs button[aria-pressed="true"] { background: rgba(15, 23, 42, .06); color: var(--ds-text); }
.cn-sec { padding: 12px 14px 16px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.cn-sec[hidden] { display: none; }

.cn-stops { display: flex; flex-direction: column; gap: 7px; }
.cn-stop { display: flex; align-items: center; gap: 8px; }
.cn-stop .cn-mk { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; background: #64748b; }
.cn-stop .cn-mk.s { background: #047857; } .cn-stop .cn-mk.e { background: #e11d48; }
.cn-stop select, .cn-field select, .cn-speed, .cn-time, .cn-stop input.cn-dwell {
  font: inherit; font-size: 13.5px; color: inherit; background: rgba(255, 255, 255, .9); border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 10px; padding: 7px 9px; outline: none; min-width: 0; }
.cn-stop select { flex: 1; }
.cn-stop input.cn-dwell { width: 58px; padding: 7px 6px; font-size: 13px; }
.cn-stop .cn-x { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 50%; color: inherit; opacity: .55; cursor: pointer; display: grid; place-items: center; flex: none; }
.cn-stop .cn-x:hover { opacity: 1; background: rgba(15, 23, 42, .07); }
.cn-row2 { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cn-row2 .sp { flex: 1; }
.cn-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ds-text-3); }
.cn-field select { padding: 6px 8px; }
.cn-chip { border: 1px solid rgba(15, 23, 42, .1); background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; color: inherit; cursor: pointer; }
.cn-chip:hover { border-color: rgba(15, 23, 42, .25); }
.cn-go { border: 0; background: linear-gradient(135deg, #111827, #374151); color: #fff; border-radius: 12px; padding: 9px 18px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; box-shadow: 0 6px 16px rgba(17, 24, 39, .28); }
.cn-end { margin-top: 4px; width: 100%; border: 1px solid rgba(244, 63, 94, .4); background: rgba(244, 63, 94, .08); color: #e11d48; border-radius: 12px; padding: 9px; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }

.cn-result { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.cn-best { border-radius: 16px; padding: 14px 15px; color: #fff; background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%); position: relative; overflow: hidden; }
.cn-best .k { font-size: 12px; opacity: .75; display: flex; gap: 8px; align-items: center; }
.cn-best .k i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cn-best .big { font-size: 36px; font-weight: 720; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cn-best .big small { font-size: 15px; font-weight: 500; opacity: .7; margin-left: 4px; }
.cn-best .sub { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; margin-top: 6px; opacity: .9; }
.cn-best .tag { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.cn-best .tag.ok { background: rgba(16, 185, 129, .25); color: #6ee7b7; } .cn-best .tag.bad { background: rgba(244, 63, 94, .25); color: #fda4af; }
.cn-strats { display: flex; flex-direction: column; gap: 3px; }
.cn-st { display: grid; grid-template-columns: 12px 1fr auto; grid-template-rows: auto auto auto; column-gap: 9px; row-gap: 3px; align-items: center; padding: 7px 9px; border-radius: 12px; cursor: pointer; }
.cn-st:hover { background: rgba(15, 23, 42, .045); }
.cn-st.on { background: rgba(77, 107, 254, .09); }
.cn-st.off { opacity: .4; }
.cn-st .dot { width: 10px; height: 10px; border-radius: 50%; grid-row: 1 / 3; }
.cn-st .nm { font-size: 13px; font-weight: 600; }
.cn-st .vv { font-size: 13px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.cn-st .vv em { font-style: normal; font-weight: 500; opacity: .6; margin-left: 6px; font-size: 12px; }
.cn-st .meta { font-size: 11.5px; opacity: .6; grid-column: 2 / 4; display: flex; gap: 10px; }
.cn-st .bar { grid-column: 2 / 4; height: 4px; border-radius: 3px; background: rgba(15, 23, 42, .06); overflow: hidden; }
.cn-st .bar i { display: block; height: 100%; border-radius: 3px; }
.cn-tg { padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; display: inline-block; }
.cn-tg.ok { background: var(--ds-ok-weak); color: var(--ds-ok); } .cn-tg.warn { background: var(--ds-warn-weak); color: var(--ds-warn); } .cn-tg.bad { background: var(--ds-bad-weak); color: var(--ds-bad); }
.cn-legs { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(15, 23, 42, .07); padding-top: 10px; }
.cn-leg { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12.5px; padding: 4px 2px; }
.cn-leg b { font-weight: 600; } .cn-leg span { opacity: .6; font-size: 11.5px; }
.cn-leg .r { text-align: right; font-variant-numeric: tabular-nums; }

.cn-now { border-radius: 16px; padding: 13px 14px; background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; }
.cn-now .t { font-size: 28px; font-weight: 720; font-variant-numeric: tabular-nums; }
.cn-now .s { font-size: 12.5px; opacity: .72; margin-top: 2px; }
.cn-now .cd { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.cn-now .cd b { font-size: 18px; font-variant-numeric: tabular-nums; color: #fbbf24; }
.cn-h { font-size: 12px; font-weight: 650; opacity: .6; margin: 16px 2px 8px; display: flex; justify-content: space-between; letter-spacing: .04em; }
.cn-h span { font-weight: 500; letter-spacing: 0; }
.cn-blist, .cn-flist { display: flex; flex-direction: column; gap: 2px; }
.cn-b { display: grid; grid-template-columns: 76px 1fr 56px; gap: 4px 10px; align-items: center; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.cn-b:hover { background: rgba(15, 23, 42, .045); }
.cn-b .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-b .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cn-b .bar { height: 6px; border-radius: 4px; background: rgba(15, 23, 42, .06); overflow: hidden; }
.cn-b .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #fde68a, #f59e0b); }
.cn-b .ex { grid-column: 2 / 4; font-size: 11.5px; opacity: .6; margin-top: -2px; }
.cn-holes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cn-hole { border: 1px solid rgba(15, 23, 42, .1); background: rgba(255, 255, 255, .85); border-radius: 12px; padding: 7px 0 6px; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cn-hole b { font-size: 14px; } .cn-hole span { font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.cn-hole i { width: 22px; height: 4px; border-radius: 3px; background: #86efac; }
.cn-hole[aria-pressed="true"] { background: var(--ds-bad-weak); border-color: var(--ds-bad); }
.cn-hole[aria-pressed="true"] b { color: var(--ds-bad); text-decoration: line-through; }
.cn-params { margin-top: 14px; font-size: 13px; }
.cn-params summary { cursor: pointer; opacity: .75; font-weight: 600; padding: 4px 2px; }
.cn-sl { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 8px; margin: 6px 0; }
.cn-sl > span { font-size: 12.5px; opacity: .75; }
.cn-sl > b { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 右下工具列 ---------- */
.cn-dock { position: fixed; right: 16px; bottom: 18px; z-index: 16; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cn-dk { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .6); display: grid; place-items: center; cursor: pointer; padding: 0;
  background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #0f172a; box-shadow: 0 6px 18px rgba(15, 23, 42, .2); }
.cn-dk svg { width: 22px; height: 22px; }
.cn-dk[aria-expanded="true"] { box-shadow: 0 0 0 2px #38bdf8, 0 6px 18px rgba(15, 23, 42, .25); }
.cn-dk[hidden] { display: none; }
.cn-dk b { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: #f43f5e; color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; box-sizing: border-box; }
.cn-compass { width: 52px; height: 52px; cursor: grab; touch-action: none; }
.cn-compass svg { width: 40px; height: 40px; }
.cn-compass #cn-needle { transform-origin: 20px 20px; }
.cn-dkdot { position: absolute; right: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.cn-dkdot.off { background: #f59e0b; }
body.vec .cn-compass { display: none; }

.cn-fly { position: fixed; right: 76px; bottom: 18px; z-index: 17; padding: 12px 14px; width: 260px; font-size: 13px; }
.cn-fly[hidden] { display: none; }
.cn-fly-time { width: min(560px, calc(100vw - 110px)); }
.cn-fh { font-size: 12px; font-weight: 650; opacity: .6; margin: 2px 0 8px; letter-spacing: .04em; }
.cn-fh:not(:first-child) { margin-top: 14px; }
.cn-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(15, 23, 42, .06); }
.cn-seg button { border: 0; background: transparent; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 13px; color: inherit; opacity: .7; cursor: pointer; }
.cn-seg button[aria-pressed="true"] { background: #fff; opacity: 1; color: #0f172a; box-shadow: 0 1px 4px rgba(15, 23, 42, .14); font-weight: 600; }
.cn-sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cn-switch { width: 40px; height: 23px; border-radius: 12px; border: 0; background: rgba(148, 163, 184, .5); position: relative; cursor: pointer; flex: none; padding: 0; }
.cn-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.cn-switch[aria-pressed="true"] { background: #10b981; } .cn-switch[aria-pressed="true"]::after { transform: translateX(17px); }
.cn-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; opacity: .75; margin-top: 10px; }
.cn-legend i { flex: 1; height: 6px; border-radius: 4px; background: linear-gradient(90deg, #bbf7d0, #86efac, #fde047, #fb923c, #ef4444); order: 2; }
.cn-legend span:first-of-type { order: 1; } .cn-legend .sp { display: none; } .cn-legend span:last-of-type { order: 3; }
.cn-tt { display: flex; align-items: center; gap: 10px; }
.cn-tt .sp { flex: 1; }
.cn-clockbox { display: flex; flex-direction: column; }
.cn-clockbox b { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 720; }
.cn-clockbox span { font-size: 11px; opacity: .6; white-space: nowrap; }
.cn-tl { height: 54px; position: relative; cursor: pointer; touch-action: none; margin-top: 8px; }
.cn-tl canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cn-speed { padding: 5px 6px; font-size: 12.5px; }
.cn-algo-btns { display: flex; gap: 8px; }
.cn-algo { display: flex; gap: 8px; font-size: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; opacity: .85; }
.cn-algo .meter { flex: 1; min-width: 90px; height: 6px; border-radius: 4px; background: rgba(77, 107, 254, .2); position: relative; overflow: hidden; }
.cn-algo .meter i { position: absolute; left: 0; top: 0; bottom: 0; background: #a855f7; border-radius: 4px; }

/* ---------- 地图上的标签 ---------- */
.cn-badges { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cn-bd { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; transform-origin: 50% 100%; display: flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .92); box-shadow: 0 4px 14px rgba(15, 23, 42, .25); font-size: 12px; font-weight: 650; color: #0f172a; will-change: transform; }
.cn-bd::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; z-index: -1; }
.cn-bd .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.cn-bd .v { font-variant-numeric: tabular-nums; color: #b45309; }
.cn-bd.teach .ic { background: linear-gradient(135deg, #b45309, #92400e); }
.cn-bd.lib .ic { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.cn-bd.lib .v { color: #4f46e5; }
.cn-bd.food .ic { background: linear-gradient(135deg, #db2777, #be123c); }
.cn-bd.food .v { color: #be185d; }
.cn-bd.stop .ic { background: #047857; } .cn-bd.stop.e .ic { background: #e11d48; } .cn-bd.stop.m .ic { background: #64748b; }
.cn-bd.bus .ic { background: #2563eb; } .cn-busdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.cn-bd.small { font-size: 11px; padding: 3px 8px 3px 4px; } .cn-bd.small .ic { width: 16px; height: 16px; font-size: 10px; }
.cn-bd.hot { animation: cnhot 1.6s ease-in-out infinite; }
@keyframes cnhot { 0%, 100% { box-shadow: 0 4px 14px rgba(15, 23, 42, .25); } 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, .25), 0 4px 18px rgba(245, 158, 11, .45); } }
.cn-fl { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: rgba(6, 14, 30, .82); border-left: 3px solid #fbbf24; color: #fef3c7; font-size: 12px; font-variant-numeric: tabular-nums; }
.cn-fl b { color: #fbbf24; } .cn-fl span { font-size: 15px; font-weight: 700; } .cn-fl em { font-style: normal; opacity: .6; font-size: 11px; }
.cn-fl small { opacity: .6; font-size: 11px; margin-left: 4px; }

/* ---------- 详情 / 楼层面板 ---------- */
.cn-pop { position: fixed; z-index: 30; width: 300px; max-width: calc(100vw - 24px); padding: 14px 15px; font-size: 13px; }
.cn-pop h3 { margin: 0 0 4px; font-size: 16px; padding-right: 30px; }
.cn-pop .sub { font-size: 12px; opacity: .6; margin-bottom: 10px; }
.cn-pop .kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.cn-pop .kv div { background: rgba(15, 23, 42, .045); border-radius: 10px; padding: 7px 8px; }
.cn-pop .kv b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.cn-pop .kv span { font-size: 11px; opacity: .6; }
.cn-pop table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cn-pop td { padding: 4px 2px; border-top: 1px solid rgba(15, 23, 42, .06); }
.cn-pop td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.cn-pop .x { position: absolute; top: 8px; right: 8px; }
.cn-pop .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cn-pop.floor { top: 14px !important; right: 76px; left: auto !important; width: 320px; max-height: calc(100vh - 28px); overflow-y: auto; }
.cn-flr { padding: 8px 0; border-top: 1px solid rgba(15, 23, 42, .08); }
.cn-flr .hd { display: grid; grid-template-columns: 30px 1fr 48px; gap: 8px; align-items: center; }
.cn-flr .hd b { color: #d97706; } .cn-flr .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cn-flr .bar { height: 8px; border-radius: 4px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.cn-flr .bar i { display: block; height: 100%; border-radius: 4px; }
.cn-flr .sub { font-size: 11.5px; opacity: .6; margin: 3px 0 0 38px; }
.cn-flr .rm { display: grid; grid-template-columns: 48px 1fr 34px; gap: 6px; font-size: 11.5px; margin: 3px 0 0 38px; opacity: .85; }
.cn-flr .rm b { text-align: right; } .cn-flr .rm span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 3D：深色科幻 HUD ---------- */
.cnx .cn-3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
body.sf { background: #03060d; }
body.sf .cn-glass { background: rgba(6, 14, 30, .7); border-color: rgba(80, 200, 255, .22); color: #dbeafe;
  box-shadow: 0 0 0 1px rgba(80, 200, 255, .06) inset, 0 14px 40px rgba(0, 0, 0, .55), 0 0 24px rgba(56, 189, 248, .08); }
body.sf .cn-body { border-top-color: rgba(80, 200, 255, .14); }
body.sf .cn-brand b { color: #e0f2fe; }
body.sf .cn-livepill { background: rgba(56, 189, 248, .1); color: #bae6fd; }
body.sf .cn-ibtn:hover { background: rgba(56, 189, 248, .14); }
body.sf .cn-tabs button { color: #94a3b8; } body.sf .cn-tabs button[aria-pressed="true"] { background: rgba(56, 189, 248, .14); color: #e0f2fe; }
body.sf .cn-stop select, body.sf .cn-field select, body.sf .cn-speed, body.sf .cn-time, body.sf .cn-stop input.cn-dwell { background: rgba(15, 30, 55, .8); border-color: rgba(80, 200, 255, .22); color: #e0f2fe; }
body.sf select option { background: #0b1628; color: #e0f2fe; }
body.sf .cn-field { color: #7c93b5; }
body.sf .cn-chip { background: rgba(15, 30, 55, .7); border-color: rgba(80, 200, 255, .25); color: #bae6fd; }
body.sf .cn-go { background: linear-gradient(135deg, #0369a1, #4f46e5); box-shadow: 0 0 20px rgba(14, 165, 233, .45); }
body.sf .cn-end { background: rgba(244, 63, 94, .12); color: #fda4af; }
body.sf .cn-best { background: linear-gradient(135deg, rgba(14, 165, 233, .22), rgba(99, 102, 241, .18)); border: 1px solid rgba(80, 200, 255, .3); }
body.sf .cn-best .big { text-shadow: 0 0 18px rgba(56, 189, 248, .6); }
body.sf .cn-st:hover, body.sf .cn-b:hover { background: rgba(56, 189, 248, .08); } body.sf .cn-st.on { background: rgba(56, 189, 248, .14); }
body.sf .cn-st .bar, body.sf .cn-b .bar { background: rgba(148, 163, 184, .14); }
body.sf .cn-legs { border-top-color: rgba(80, 200, 255, .14); }
body.sf .cn-now { background: linear-gradient(135deg, rgba(14, 165, 233, .2), rgba(15, 23, 42, .6)); border: 1px solid rgba(80, 200, 255, .25); }
body.sf .cn-hole { background: rgba(15, 30, 55, .7); border-color: rgba(80, 200, 255, .2); }
body.sf .cn-tg.ok { background: rgba(16, 185, 129, .18); color: #6ee7b7; } body.sf .cn-tg.warn { background: rgba(245, 158, 11, .18); color: #fcd34d; } body.sf .cn-tg.bad { background: rgba(244, 63, 94, .18); color: #fda4af; }
body.sf .cn-dk { background: rgba(6, 14, 30, .75); border-color: rgba(80, 200, 255, .3); color: #bae6fd; box-shadow: 0 0 16px rgba(56, 189, 248, .15), 0 6px 18px rgba(0, 0, 0, .4); }
body.sf .cn-dkdot { box-shadow: 0 0 0 2px rgba(6, 14, 30, .9); }
body.sf .cn-seg { background: rgba(56, 189, 248, .1); }
body.sf .cn-seg button[aria-pressed="true"] { background: rgba(56, 189, 248, .28); color: #fff; box-shadow: 0 0 12px rgba(56, 189, 248, .35); }
body.sf .cn-bd { background: rgba(6, 14, 30, .8); color: #e0f2fe; border: 1px solid rgba(80, 200, 255, .3); box-shadow: 0 0 14px rgba(56, 189, 248, .2); }
body.sf .cn-bd::after { background: rgba(6, 14, 30, .8); }
body.sf .cn-bd .v { color: #fcd34d; } body.sf .cn-bd.food .v { color: #f9a8d4; } body.sf .cn-bd.lib .v { color: #c7d2fe; }
body.sf .cn-pop .kv div { background: rgba(56, 189, 248, .08); }
body.sf .cn-pop td, body.sf .cn-flr { border-top-color: rgba(80, 200, 255, .12); }
body.sf .cn-flr .hd b { color: #fbbf24; }

/* 逐间教室：选中楼层时每间头顶一个小牌子；面板里按间列出 */
.cn-rm { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; padding: 2px 7px 3px; border-radius: 6px; pointer-events: none; white-space: nowrap;
  background: rgba(6, 14, 30, .78); border-bottom: 2px solid rgba(251, 191, 36, .5); color: #fef3c7; font-size: 11px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.cn-rm b { color: #fbbf24; font-size: 11px; } .cn-rm span { font-size: 14px; font-weight: 750; } .cn-rm small { max-width: 92px; overflow: hidden; text-overflow: ellipsis; opacity: .7; font-size: 10px; }
.cn-rm.busy { border-bottom-color: #fbbf24; } .cn-rm.on { background: rgba(14, 116, 144, .92); border-bottom-color: #67e8f9; }
.cn-ico { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  background: rgba(6, 14, 30, .78); border: 1px solid rgba(148, 163, 184, .32); color: #e2e8f0; font-size: 10px; line-height: 1.3; }
.cn-ico i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.cn-ico-w i { background: #38bdf8; } .cn-ico-l i { background: #a78bfa; } .cn-ico-s i { background: #34d399; } .cn-ico-r i { background: #fb7185; }
.cn-wing { position: absolute; left: 0; top: 0; padding: 2px 8px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  background: rgba(6, 14, 30, .82); border: 1px solid rgba(56, 189, 248, .45); color: #7dd3fc; font-size: 11px; font-weight: 700; }
.cn-flr[data-floor] { cursor: pointer; } .cn-flr[data-floor]:hover .hd b { text-decoration: underline; }
.cn-rml { display: grid; grid-template-columns: 44px 1fr 40px; gap: 8px; align-items: center; padding: 6px 0 5px; border-top: 1px solid rgba(15, 23, 42, .08); cursor: pointer; }
.cn-rml > b { color: #d97706; font-variant-numeric: tabular-nums; } .cn-rml .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cn-rml .bar { height: 7px; border-radius: 4px; background: rgba(148, 163, 184, .18); overflow: hidden; } .cn-rml .bar i { display: block; height: 100%; border-radius: 4px; }
.cn-rml .c { grid-column: 2 / 4; font-size: 11.5px; opacity: .55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -2px; } .cn-rml .c.on { opacity: .9; }
.cn-crs { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 0 6px 10px; border-top: 1px solid rgba(15, 23, 42, .08); border-left: 3px solid transparent; }
.cn-crs span { grid-column: 1 / 3; font-size: 11px; opacity: .55; font-variant-numeric: tabular-nums; } .cn-crs em { font-style: normal; opacity: .6; font-size: 12px; }
.cn-crs.on { border-left-color: #fbbf24; background: rgba(251, 191, 36, .08); } .cn-crs.past { opacity: .5; }
body.sf .cn-rml, body.sf .cn-crs { border-top-color: rgba(80, 200, 255, .12); } body.sf .cn-rml > b { color: #fbbf24; }

/* ---------- 手机 ---------- */
@media (max-width: 900px) {
  .cn-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 52vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .cn-panel.collapsed { width: auto; }
  .cn-dock { right: 10px; bottom: auto; top: 14px; }
  .cn-dk { width: 42px; height: 42px; } .cn-compass { width: 48px; height: 48px; }
  .cn-fly { right: 62px; bottom: auto; top: 14px; }
  .cn-fly-time { width: calc(100vw - 80px); }
  .cn-pop.floor { top: 14px !important; right: 62px; left: 10px !important; width: auto; max-height: 34vh; padding: 10px 12px; }
  .cn-flr { padding: 5px 0; } .cn-flr .rm, .cn-flr .sub { display: none; }
  .cn-rm small { display: none; } .cn-rml { padding: 4px 0; } .cn-rml .c { font-size: 11px; }
}
