@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  --lamp-red: #ff5a4e;
  --lamp-amber: #ffb340;
  --lamp-green: #30d158;
  --housing: #0e0e0e;
  --housing-line: #2e2e2e;
  --lamp-off: #2a2a2a;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --topbar: 60px;
  --sidebar: 248px;
  --side: 368px;
  --gap: 12px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --shell: #202020;
  --panel: #191919;
  --line: #363636;
  --line-soft: #2a2a2a;
  --selected: #414141;
  --pill: #454546;
  --pill-line: #5a5a5a;
  --pill-text: #f2f2f2;
  --raise: #2a2a2a;
  --raise-hover: #333333;
  --hover: #222222;
  --text: #efefef;
  --muted: #9e9e9e;
  --faint: #6f6f6f;
  --code: #141414;
  --dot-off: #3a3a3a;
  --red: #ff6b60;
  --amber: #ffbe5c;
  --green: #4cd774;
  --red-tint: rgba(255, 90, 78, 0.14);
  --amber-tint: rgba(255, 179, 64, 0.14);
  --green-tint: rgba(48, 209, 88, 0.13);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --scrim: rgba(0, 0, 0, 0.55);
  --primary-bg: #efefef;
  --primary-text: #191919;
}

:root[data-theme='light'] {
  color-scheme: light;
  --shell: #ededeb;
  --panel: #ffffff;
  --line: #e0e0dc;
  --line-soft: #ececea;
  --selected: #dcdcd8;
  --pill: #f0f0ee;
  --pill-line: #d2d2ce;
  --pill-text: #191919;
  --raise: #f7f7f5;
  --raise-hover: #ffffff;
  --hover: #f5f5f3;
  --text: #191919;
  --muted: #6b6b68;
  --faint: #9a9a96;
  --code: #f6f6f4;
  --dot-off: #d3d3cf;
  --red: #d93a2f;
  --amber: #b97100;
  --green: #18884a;
  --red-tint: rgba(229, 55, 43, 0.1);
  --amber-tint: rgba(212, 136, 6, 0.12);
  --green-tint: rgba(31, 157, 79, 0.1);
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.14), 0 2px 8px rgba(20, 20, 20, 0.06);
  --scrim: rgba(20, 20, 20, 0.28);
  --primary-bg: #191919;
  --primary-text: #f2f2f2;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  background: var(--shell);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
}

input, textarea, .selectable, .selectable * { user-select: text; -webkit-user-select: text; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.dim { color: var(--muted); }
.sep { color: var(--faint); padding: 0 6px; }
.ic { width: 18px; height: 18px; flex: none; }

:focus { outline: none; }
html.kbd :focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: var(--r-sm); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar);
  flex: none;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(200px, 560px) minmax(max-content, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 calc(var(--gap) + 4px);
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-right { justify-content: flex-end; }

.brand { display: flex; align-items: center; gap: 10px; margin-right: 10px; min-width: 0; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-round {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--raise);
  color: var(--text);
  border: 1px solid var(--line-soft);
  transition: background 120ms ease, color 120ms ease, opacity 160ms ease;
  flex: none;
}
.btn-round:hover { background: var(--raise-hover); }
.btn-round .ic { width: 16px; height: 16px; }
.btn-round:disabled { opacity: 0.4; cursor: default; }
.btn-round:disabled:hover { background: var(--raise); }

[data-theme='dark'] .ic-sun { display: none; }
[data-theme='light'] .ic-moon { display: none; }

.search-pill {
  width: 100%;
  min-width: 0;
  height: 40px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 14px;
  border-radius: 12px;
  background: var(--raise);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}
.search-pill:hover { background: var(--raise-hover); border-color: var(--line); }
.search-pill .ic { width: 16px; height: 16px; }
.search-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }

.kbd-hint {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  flex: none;
}

.btn-pill {
  height: 34px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  flex: none;
}
.btn-pill .ic { width: 15px; height: 15px; }
.btn-ghost { background: var(--raise); border: 1px solid var(--line-soft); }
.btn-ghost:hover { background: var(--raise-hover); }
.btn-soft { background: var(--pill); border: 1px solid var(--pill-line); color: var(--pill-text); }
.btn-soft:hover { filter: brightness(1.08); }
.btn-primary { background: var(--primary-bg); color: var(--primary-text); border: 1px solid var(--primary-bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-block { width: 100%; height: 40px; }

.btn-icon { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); }
.btn-icon:hover { background: var(--raise); color: var(--text); }
.btn-icon .ic { width: 15px; height: 15px; }

.frame {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--side);
  gap: var(--gap);
  padding: 0 var(--gap) var(--gap) 0;
}
.frame-noside { grid-template-columns: var(--sidebar) minmax(0, 1fr); }

.sidebar {
  display: flex; flex-direction: column;
  padding: 4px 10px 12px 12px;
  min-width: 0;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px; font-weight: 500;
  transition: background 120ms ease;
  min-width: 0;
}
.nav-item:hover { background: var(--hover); }
[data-theme='dark'] .nav-item:hover { background: #292929; }
.nav-item.is-active { background: var(--selected); }
.nav-item .ic { width: 17px; height: 17px; color: var(--muted); }
.nav-item.is-active .ic { color: var(--text); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { font-size: 12px; color: var(--muted); }
.nav-badge[data-light='red'] { color: var(--red); }
.nav-badge[data-light='amber'] { color: var(--amber); }
.nav-item .lamp { margin: 0 4px; }

.nav-section { margin-top: 20px; }
.nav-h {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 12px; margin-bottom: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--faint);
}
.nav-h .ic { width: 13px; height: 13px; transition: transform 160ms ease; }
.nav-h[aria-expanded='false'] .ic { transform: rotate(-90deg); }
[data-collapsible][hidden] { display: none; }
.nav-empty { padding: 4px 12px; color: var(--faint); font-size: 12.5px; }
.nav-item.recent .road-ic { width: 17px; display: grid; place-items: center; }

.sidebar-foot {
  margin-top: auto;
  padding: 16px 12px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px;
  color: var(--faint); font-size: 12px;
}
.foot-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.foot-link:hover { color: var(--text); }
.foot-links { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot-link .ic { width: 14px; height: 14px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.panel-main { padding: 28px 32px 40px; }
.panel-side { padding: 24px 22px 32px; }

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-titles { min-width: 0; }
.panel-title { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.panel-title-road { font-size: 26px; letter-spacing: -0.02em; }
.panel-title-road .mono { letter-spacing: -0.03em; }
.panel-sub { margin-top: 8px; color: var(--muted); font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.panel-sub .sep { padding: 0 8px; }
.panel-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.panel-head-side { align-items: center; margin-bottom: 16px; }
.side-title { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }

.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border-radius: 10px;
  background: var(--raise);
  border: 1px solid var(--line-soft);
  font-size: 13px; font-weight: 500;
}
.live-pill .lamp { animation: pulse 2.4s ease-in-out infinite; }
.live-pill.is-stale .lamp { animation: none; background: var(--lamp-amber); box-shadow: none; }
.live-updated { color: var(--faint); font-size: 12px; font-family: var(--mono); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.lamp {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot-off);
  flex: none;
  display: inline-block;
}
.lamp[data-light='red'] { background: var(--lamp-red); box-shadow: 0 0 0 3px var(--red-tint); }
.lamp[data-light='amber'] { background: var(--lamp-amber); box-shadow: 0 0 0 3px var(--amber-tint); }
.lamp[data-light='green'] { background: var(--lamp-green); box-shadow: 0 0 0 3px var(--green-tint); }

.tl {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: var(--housing);
  box-shadow: inset 0 0 0 1px var(--housing-line);
  border-radius: 999px;
  flex: none;
}
.tl i { display: block; border-radius: 50%; background: var(--lamp-off); transition: background 200ms ease, box-shadow 200ms ease; }
.tl[data-light='red'] i:nth-child(1) { background: var(--lamp-red); box-shadow: 0 0 6px rgba(255, 90, 78, 0.7); }
.tl[data-light='amber'] i:nth-child(2) { background: var(--lamp-amber); box-shadow: 0 0 6px rgba(255, 179, 64, 0.65); }
.tl[data-light='green'] i:nth-child(3) { background: var(--lamp-green); box-shadow: 0 0 6px rgba(48, 209, 88, 0.6); }
.tl-sm { width: 9px; height: 23px; padding: 2px 0; }
.tl-sm i { width: 5px; height: 5px; }
.tl-md { width: 14px; height: 34px; padding: 3px 0; }
.tl-md i { width: 8px; height: 8px; }
.tl-lg { width: 30px; height: 74px; padding: 6px 0; }
.tl-lg i { width: 18px; height: 18px; }
.tl-lg[data-light='red'] i:nth-child(1) { box-shadow: 0 0 16px rgba(255, 90, 78, 0.75); }
.tl-lg[data-light='amber'] i:nth-child(2) { box-shadow: 0 0 16px rgba(255, 179, 64, 0.7); }
.tl-lg[data-light='green'] i:nth-child(3) { box-shadow: 0 0 16px rgba(48, 209, 88, 0.6); }

.cond { font-weight: 600; }
.cond[data-light='red'] { color: var(--red); }
.cond[data-light='amber'] { color: var(--amber); }
.cond[data-light='green'] { color: var(--green); }
.cond[data-light='off'] { color: var(--muted); font-weight: 500; }

.strip {
  display: grid;
  grid-template-columns: repeat(24, minmax(30px, 1fr));
  gap: 2px;
  margin: 0 -6px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 6px 4px;
}
.strip::-webkit-scrollbar { display: none; }
.strip-cell {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 9px 0 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  min-width: 0;
}
.strip-cell:hover { background: var(--hover); }
.strip-cell.is-now { border-color: var(--line); background: var(--raise); }
.strip-hour { font-size: 17px; font-weight: 500; color: var(--text); }
.strip-cell:not(.is-now) .strip-hour { color: var(--muted); }
.strip-sub { height: 16px; display: grid; place-items: center; font-size: 11.5px; color: var(--text); font-weight: 600; }

.summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--raise);
  border: 1px solid var(--line-soft);
  font-size: 16px;
  margin-bottom: 24px;
}
.summary-lead { font-weight: 500; margin-right: 4px; }
.summary-and { color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border-radius: 10px;
  font-weight: 600; font-size: 14.5px;
  white-space: nowrap;
  transition: filter 120ms ease;
}
.chip:hover { filter: brightness(1.12); }
.chip .lamp { box-shadow: none; }
.chip[data-light='red'] { background: var(--red-tint); color: var(--red); }
.chip[data-light='amber'] { background: var(--amber-tint); color: var(--amber); }
.chip[data-light='green'] { background: var(--green-tint); color: var(--green); }

.group + .group { margin-top: 18px; }
.group-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--faint);
  padding: 0 10px 8px;
}
.group-h .lamp { width: 6px; height: 6px; box-shadow: none; }
.group-n { margin-left: auto; font-size: 12px; }

.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 10px;
  border-radius: 12px;
  transition: background 120ms ease;
}
.row:hover { background: var(--hover); }
.row-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.road { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.act {
  font-size: 11.5px; color: var(--muted);
  padding: 1px 6px; border-radius: 5px;
  background: var(--raise); border: 1px solid var(--line-soft);
  flex: none;
}
.row-label { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--muted); min-width: 0; }
.row-meta .cond { font-size: 13px; }
.row-meta > .mono { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  margin-left: 10px;
  border-radius: 7px;
  background: var(--raise);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.tag .ic { width: 12px; height: 12px; }
.panel-sub .tag { margin-left: 0; }

.mini { display: inline-grid; grid-template-columns: repeat(24, 3px); gap: 1.5px; align-items: end; height: 16px; }
.mini i { height: 100%; border-radius: 1.5px; background: var(--line-soft); }
.mini i[data-light='red'] { background: var(--lamp-red); }
.mini i[data-light='amber'] { background: var(--lamp-amber); }
.mini i[data-light='green'] { background: var(--lamp-green); opacity: 0.55; }

.tl-cycle i { animation: cycle 3.6s steps(1, end) infinite; }
.tl-cycle i:nth-child(1) { animation-delay: -2.4s; }
.tl-cycle i:nth-child(2) { animation-delay: -1.2s; }
.tl-cycle i:nth-child(3) { animation-delay: 0s; }
@keyframes cycle {
  0% { background: var(--lamp-green); box-shadow: 0 0 14px rgba(48, 209, 88, 0.55); }
  33.333% { background: var(--lamp-off); box-shadow: none; }
  100% { background: var(--lamp-off); box-shadow: none; }
}
.tl-cycle i:nth-child(1) { animation-name: cycle-red; }
.tl-cycle i:nth-child(2) { animation-name: cycle-amber; }
@keyframes cycle-red {
  0% { background: var(--lamp-red); box-shadow: 0 0 14px rgba(255, 90, 78, 0.6); }
  33.333% { background: var(--lamp-off); box-shadow: none; }
  100% { background: var(--lamp-off); box-shadow: none; }
}
@keyframes cycle-amber {
  0% { background: var(--lamp-amber); box-shadow: 0 0 14px rgba(255, 179, 64, 0.6); }
  33.333% { background: var(--lamp-off); box-shadow: none; }
  100% { background: var(--lamp-off); box-shadow: none; }
}

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 56px 16px; }
.empty-title { font-size: 17px; font-weight: 600; margin-top: 6px; }
.empty-sub { color: var(--muted); max-width: 320px; }
.empty-page { padding-top: 14vh; }

.feed + .feed { margin-top: 26px; }
.feed-h { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--faint); margin-bottom: 8px; }
.feed-empty { color: var(--faint); font-size: 13px; padding: 4px 0; }
.feed-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 9px 8px; margin: 0 -8px;
  border-radius: 10px;
  transition: background 120ms ease;
}
.feed-item:hover { background: var(--hover); }
.feed-item .tl { margin-top: 2px; }
.feed-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.feed-title { font-size: 14px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; min-width: 0; }
.feed-meta .cond { font-size: 12.5px; }
.feed-meta .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-detour { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); margin-top: 2px; min-width: 0; }
.feed-detour > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-detour .ic { width: 13px; height: 13px; color: var(--muted); }
.detour-badge { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--raise); border: 1px solid var(--line-soft); color: var(--muted); flex: none; }
.detour-badge .ic { width: 14px; height: 14px; }
.pct { color: var(--text); font-size: 12.5px; }

.feed-line {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 7px 8px; margin: 0 -8px;
  border-radius: 8px;
  font-size: 13px;
}
.feed-line:hover { background: var(--hover); }
.feed-line .lamp { width: 7px; height: 7px; box-shadow: none; }
.feed-line-road { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-line-src { color: var(--faint); font-size: 12px; }
.feed-line time { color: var(--muted); font-size: 12px; min-width: 52px; text-align: right; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 180px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 40;
}
.menu-item {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 34px; padding: 0 10px;
  border-radius: 8px;
  font-size: 13.5px; text-align: left; white-space: nowrap;
}
.menu-item:hover { background: var(--raise); }
.menu-item .ic { width: 14px; height: 14px; color: var(--muted); }

.status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--raise);
  border: 1px solid var(--line-soft);
  margin-bottom: 14px;
}
.status-main { min-width: 0; }
.status-cond { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.status-cond .cond { font-size: 24px; letter-spacing: -0.02em; font-weight: 650; }
.status-since { font-size: 13px; }
.status-say { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.stats { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 26px; }
.stat dt { font-size: 11.5px; color: var(--faint); font-weight: 500; letter-spacing: 0.02em; }
.stat dd { font-size: 19px; font-weight: 500; margin-top: 2px; }

.note {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 14px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  color: var(--muted); font-size: 13px;
}

.section { margin-top: 30px; }
.section-h { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.info { display: inline-grid; place-items: center; color: var(--faint); cursor: help; }
.info .ic { width: 15px; height: 15px; }

.bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; height: 120px; align-items: end; padding: 0 2px; }
.bar { height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.bar-stack { width: 100%; height: var(--h); min-height: 2px; display: flex; flex-direction: column-reverse; border-radius: 4px; overflow: hidden; background: var(--line-soft); gap: 1px; }
.bar-stack i { flex: var(--s) 1 0; min-height: 2px; }
.bar-stack i[data-light='red'] { background: var(--lamp-red); }
.bar-stack i[data-light='amber'] { background: var(--lamp-amber); }
.bar-stack i[data-light='green'] { background: var(--lamp-green); opacity: 0.7; }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table td .lamp { width: 7px; height: 7px; box-shadow: none; margin-right: 6px; vertical-align: 1px; }
.table .num { text-align: right; }

.fine { display: flex; gap: 8px; align-items: flex-start; color: var(--faint); font-size: 12.5px; margin-top: 18px; }
.fine .ic { width: 14px; height: 14px; margin-top: 1px; }
.fine-error { color: var(--red); }

.detour { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.detour:first-child { padding-top: 0; }
.detour:last-child { border-bottom: 0; }
.detour-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.detour-note { color: var(--muted); font-size: 13px; margin: 8px 0 0 36px; }
.detour-rate { display: flex; align-items: center; gap: 10px; margin: 10px 0 0 36px; font-size: 12.5px; }
.meter { width: 64px; height: 5px; border-radius: 5px; background: var(--line-soft); overflow: hidden; flex: none; }
.meter i { display: block; height: 100%; width: var(--p); background: var(--lamp-green); border-radius: 5px; }

.code { border: 1px solid var(--line); border-radius: 12px; background: var(--code); overflow: hidden; margin-top: 10px; }
.code-h { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); font-family: var(--mono); }
.code-h-bare { justify-content: flex-end; height: 0; border: 0; padding: 0; position: relative; }
.code-h-bare .btn-copy { position: absolute; top: 6px; right: 6px; background: var(--code); }
.code pre { margin: 0; padding: 14px 16px; font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; }
.btn-copy .ic-done { display: none; }
.btn-copy.is-done .ic-done { display: block; color: var(--green); }
.btn-copy.is-done .ic:not(.ic-done) { display: none; }

.steps { display: flex; flex-direction: column; gap: 28px; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 16px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); border: 1px solid var(--line); font-size: 13px; }
.step-h { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-top: 3px; }
.step-p { color: var(--muted); margin-top: 4px; max-width: 640px; }

.tabs { margin-top: 12px; }
.tab-list { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line-soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tab-list::-webkit-scrollbar { display: none; }
.tab { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--pill); color: var(--pill-text); box-shadow: inset 0 0 0 1px var(--pill-line); }

.side-p { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.key-out { margin-top: 4px; }
.tool { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.tool:last-child { border-bottom: 0; }
.tool-name { font-size: 13px; }
.ticks { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { width: 15px; height: 15px; color: var(--green); margin-top: 2px; }

.row-detour { grid-template-columns: 28px minmax(0, 1fr) auto; }
.rank { color: var(--faint); font-size: 13px; text-align: center; }
.detour-kind { font-weight: 500; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }

.log { display: flex; flex-direction: column; }
.log-entry { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--line-soft); }
.log-entry:first-child { border-top: 0; padding-top: 4px; }
.log-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.log-version { font-weight: 500; }
.log-title { font-size: 19px; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 10px; }
.log-list { display: flex; flex-direction: column; gap: 7px; color: var(--muted); }
.log-list li { padding-left: 16px; position: relative; }
.log-list li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }

.prose { display: flex; flex-direction: column; gap: 14px; max-width: 640px; color: var(--muted); font-size: 15px; }
.prose p:first-child { color: var(--text); }

.palette { position: fixed; inset: 0; z-index: 60; background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-box { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; height: 58px; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.palette-input input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; }
.palette-input input::placeholder { color: var(--faint); }
.palette-list { max-height: min(420px, 56vh); overflow: auto; padding: 6px; }
.palette-item { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; text-align: left; }
.palette-item.is-active { background: var(--raise); }
.palette-item .road { font-size: 14px; }
.palette-item .ic { width: 15px; height: 15px; color: var(--muted); }
.palette-empty { padding: 18px; color: var(--faint); font-size: 13.5px; }

.tip {
  position: fixed; z-index: 80;
  max-width: 280px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--text); color: var(--panel);
  font-size: 12px; font-weight: 500; line-height: 1.4;
  pointer-events: none;
  opacity: 0; transform: translateY(2px);
  transition: opacity 100ms ease, transform 100ms ease;
}
.tip.is-on { opacity: 1; transform: none; }

.map { --dot: 1.3; }
.mstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 18px; }
.mstat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-soft); min-width: 0; }
.mstat-n { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.mstat-n .lamp { box-shadow: none; }
.mstat-k { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 2px 16px; font-size: 12.5px; color: var(--muted); }
.legend-i { display: inline-flex; align-items: center; gap: 7px; }
.legend-i .lamp { box-shadow: none; }
.legend-note { margin-left: auto; color: var(--faint); }
.districts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.district { padding: 16px 16px 18px; border-radius: 16px; background: var(--raise); border: 1px solid var(--line-soft); min-width: 0; }
.district-h { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.district-h .lamp { box-shadow: none; }
.district-n { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--faint); }
.district-red { color: var(--red); }
.dots { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 28px; }
.dot { position: relative; display: block; border-radius: 50%; background: var(--dot-off); flex: none; transition: background 400ms ease, box-shadow 400ms ease, transform 160ms ease; }
.dot:hover { transform: scale(1.25); }
.dot.s1 { width: calc(10px * var(--dot)); height: calc(10px * var(--dot)); }
.dot.s2 { width: calc(13px * var(--dot)); height: calc(13px * var(--dot)); }
.dot.s3 { width: calc(17px * var(--dot)); height: calc(17px * var(--dot)); }
.dot.s4 { width: calc(22px * var(--dot)); height: calc(22px * var(--dot)); }
.dot[data-light='green'] { background: var(--lamp-green); box-shadow: 0 0 10px rgba(48, 209, 88, 0.45); }
.dot[data-light='amber'] { background: var(--lamp-amber); box-shadow: 0 0 12px rgba(255, 179, 64, 0.55); }
.dot[data-light='red'] { background: var(--lamp-red); box-shadow: 0 0 14px rgba(255, 90, 78, 0.6); animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 8px rgba(255, 90, 78, 0.45); } 50% { box-shadow: 0 0 20px rgba(255, 90, 78, 0.85); } }
[data-theme='light'] .dot[data-light='green'] { box-shadow: 0 0 6px rgba(48, 209, 88, 0.3); }
[data-theme='light'] .dot[data-light='amber'] { box-shadow: 0 0 6px rgba(255, 179, 64, 0.35); }
[data-theme='light'] .dot[data-light='red'] { box-shadow: 0 0 6px rgba(255, 90, 78, 0.35); animation-name: breathe-light; }
@keyframes breathe-light { 0%, 100% { box-shadow: 0 0 3px rgba(255, 90, 78, 0.25); } 50% { box-shadow: 0 0 10px rgba(255, 90, 78, 0.5); } }
.dot.ping::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid currentColor; animation: ping 1.4s ease-out forwards; pointer-events: none; }
.dot[data-light='green'].ping { color: var(--lamp-green); }
.dot[data-light='amber'].ping { color: var(--lamp-amber); }
.dot[data-light='red'].ping { color: var(--lamp-red); }
.dot[data-light='off'].ping { color: var(--muted); }
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
.ticker { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-soft); min-width: 0; }
.ticker-h { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; flex: none; }
.ticker-h .lamp { animation: pulse 2.4s ease-in-out infinite; box-shadow: none; }
.ticker-track { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; mask-image: linear-gradient(to right, #000 85%, transparent); }
.ticker-track::-webkit-scrollbar { display: none; }
.tick { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; flex: none; }
.tick .lamp { width: 7px; height: 7px; box-shadow: none; }
.tick-road { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tick .cond { font-size: 12.5px; }
.tick-src { color: var(--faint); font-size: 12px; }
.tick time { color: var(--muted); font-size: 12px; }
.tick.is-new { animation: tickIn 500ms ease-out; }
@keyframes tickIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.map:fullscreen { --dot: 1.7; background: var(--panel); padding: 40px 56px; overflow: auto; }
.map:fullscreen .panel-title { font-size: 44px; }
.map:fullscreen .districts { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 899px) {
  .legend-note { margin-left: 0; width: 100%; }
  .mstat-n { font-size: 22px; }
  .ticker { flex-direction: column; align-items: flex-start; }
  .ticker-track { width: 100%; }
}

.early { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--green-tint); color: var(--green); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.early .lamp { width: 7px; height: 7px; box-shadow: none; }
.early-inline { display: block; flex-basis: 100%; height: auto; padding: 0; background: none; font-size: inherit; }

.field {
  width: 100%; min-width: 0; height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--code);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit; font-size: 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field.mono { font-family: var(--mono); font-size: 13.5px; }
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--pill-line); box-shadow: 0 0 0 3px var(--line-soft); }
.field-area { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.field-select { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.field-select > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-select .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.counter { font-size: 11.5px; color: var(--faint); }
.counter.is-over { color: var(--red); }
.field-row { display: flex; gap: 8px; margin-top: 14px; max-width: 520px; }
.field-row .btn-pill { height: 40px; padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.menu-block { left: 0; right: 0; min-width: 0; max-height: 280px; overflow: auto; }
.menu-block .menu-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu-item.is-active { background: var(--raise); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }

.step.is-waiting .step-h, .step.is-waiting .step-n { color: var(--faint); }
.step.is-waiting .btn-pill:disabled { opacity: 0.45; cursor: default; }
.step-body { min-width: 0; }
.step-body > .tabs { margin-top: 14px; }
.kv { display: flex; gap: 22px; margin-top: 12px; font-size: 13px; }
.kv dt { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.kv dd { margin-top: 2px; }
.verify-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.verify-status { color: var(--muted); font-size: 13px; min-width: 0; }
.verify-status[data-state='no'] { color: var(--amber); }
.verify-status[data-state='error'] { color: var(--red); }
.claim-done { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 16px; padding: 18px 20px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-soft); max-width: 560px; }
.claim-done-h { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; }
.claim-done [data-owner-key] { width: 100%; }
.claim-done .fine { margin-top: 10px; }

.claim-link { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; transition: background 120ms ease, color 120ms ease; }
.claim-link:hover { background: var(--hover); color: var(--text); }
.claim-link > span { flex: 1; min-width: 0; }
.claim-link .ic { width: 16px; height: 16px; flex: none; }
.tag-verified { color: var(--green); }

.notice { padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-soft); box-shadow: inset 3px 0 0 var(--lamp-green); }
.notice-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.notice-h .ic { width: 16px; height: 16px; color: var(--green); flex: none; }
.notice-h time { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 400; }
.notice-badge { font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 999px; background: var(--green-tint); color: var(--green); }
.notice-body { margin-top: 6px; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.notice-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--muted); max-width: 100%; }
.notice-link:hover { color: var(--text); }
.notice-link .ic { width: 13px; height: 13px; flex: none; }
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item { padding: 12px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line-soft); min-width: 0; }
.notice-item.is-editing { border-color: var(--pill-line); }
.notice-item-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.notice-item-h .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-item-h time { color: var(--faint); font-size: 12px; flex: none; }
.notice-item .notice-body { font-size: 13.5px; }
.notice-actions { display: flex; gap: 6px; margin-top: 10px; }

.btn-ask { overflow: hidden; transition: background 120ms ease, color 120ms ease, padding 180ms cubic-bezier(.2, .8, .2, 1); }
.btn-ask.is-asking { background: var(--red-tint); border-color: transparent; color: var(--red); padding-left: 18px; padding-right: 18px; }

.score-n { font-size: 46px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; min-width: 72px; }
.score[data-light='green'] .score-n { color: var(--green); }
.score[data-light='amber'] .score-n { color: var(--amber); }
.score[data-light='red'] .score-n { color: var(--red); }
.score .status-cond { align-items: center; gap: 8px; }
.score .status-cond .cond { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; color: var(--text); }
.score .status-cond .lamp { box-shadow: none; }
.panel-main { container-type: inline-size; }
@container (max-width: 760px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 720px) {
  .score { grid-template-columns: auto minmax(0, 1fr); }
  .score .stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
}
@container (max-width: 420px) {
  .score .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bars-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; height: 132px; }
.bars-days .bar-stack { border-radius: 6px; }
.bar-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 8px; padding: 0 2px; }
.bar-labels span { text-align: center; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-labels .is-now { color: var(--text); }

.share-list { display: flex; flex-direction: column; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.share-row:last-child { border-bottom: 0; }
.share-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.share-main .lamp { width: 8px; height: 8px; box-shadow: none; }
.share-title { font-weight: 500; }
.share-sub { color: var(--muted); font-size: 12.5px; min-width: 0; overflow-wrap: anywhere; }
.share-sub a:hover { color: var(--text); }
.share-end { display: flex; align-items: center; gap: 10px; flex: none; }
.share-end .pct { width: 40px; text-align: right; }
.share-n { width: 44px; text-align: right; }
.meter[data-light='amber'] i { background: var(--lamp-amber); }
.meter[data-light='red'] i { background: var(--lamp-red); }
.table-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.claim-link-next { margin-top: 10px; }
.inline-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.key-out { margin-top: 12px; }
.key-out .code { margin-top: 6px; }
.signin-card { max-width: 560px; padding: 22px 24px; border-radius: 16px; background: var(--raise); border: 1px solid var(--line-soft); }
.signin-card .field-row { max-width: none; }

.days { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; }
.day { height: 30px; border-radius: 5px; background: var(--dot-off); min-width: 0; }
.day[data-light='green'] { background: var(--lamp-green); opacity: 0.75; }
.day[data-light='amber'] { background: var(--lamp-amber); }
.day[data-light='red'] { background: var(--lamp-red); }
.day.is-now { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--pill-line); }
.days-ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--faint); }
.hist-h { margin-top: 18px; }
.changes { display: flex; flex-direction: column; }
.change { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; min-width: 0; }
.change:last-child { border-bottom: 0; }
.change .lamp { width: 8px; height: 8px; box-shadow: none; flex: none; }
.change-cond { font-weight: 500; }
.change time { margin-left: auto; color: var(--faint); font-size: 12px; flex: none; }

.watch-form { padding: 18px 20px; border-radius: 16px; background: var(--raise); border: 1px solid var(--line-soft); }
.watch-fields { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.6fr) minmax(0, 1.6fr); gap: 10px; }
.watch-fields .field-label { margin-top: 0; }
.watches { display: flex; flex-direction: column; gap: 10px; }
.watch { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--raise); min-width: 0; }
.watch-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.watch-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.watch-main .road:hover { text-decoration: underline; text-underline-offset: 3px; }
.watch-url { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-actions { display: flex; gap: 6px; }
.watch-actions .ic { width: 13px; height: 13px; }
.watch-log { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.log-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; min-width: 0; flex-wrap: wrap; }
.log-line .lamp { width: 7px; height: 7px; box-shadow: none; }
.log-what { font-weight: 500; }
.log-at { margin-left: auto; color: var(--faint); font-size: 11.5px; }
.tag-ok { color: var(--green); }
.tag-bad { color: var(--red); }
.tag .lamp { width: 6px; height: 6px; box-shadow: none; }
.tag .sep { padding: 0 4px; color: var(--faint); }
.tag time { font-size: inherit; color: var(--faint); }

.plan-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--raise); font-size: 13px; }
.plan-name { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.plan-name strong { color: var(--text); font-weight: 600; }
.plan-name .lamp { width: 7px; height: 7px; box-shadow: none; }
.plan-note { color: var(--muted); }
.plan-thanks { color: var(--green); }
.plan-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.lock-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px 18px; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--pill-line); background: var(--panel); }
.lock-ic { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--raise); color: var(--muted); }
.lock-ic .ic { width: 17px; height: 17px; }
.lock-text { font-size: 14px; font-weight: 500; }
.lock-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.lock-note .fine { grid-column: 1 / -1; margin-top: 4px; }
.locked { position: relative; opacity: 0.38; filter: blur(2.5px) grayscale(0.6); pointer-events: none; user-select: none; }
.watch-form.is-locked .watch-fields, .watch-form.is-locked .form-actions { opacity: 0.38; pointer-events: none; filter: grayscale(0.6); }
.watch-form.is-locked .lock-note { margin-bottom: 14px; }

.early-row { margin-bottom: 18px; height: auto; min-height: 30px; padding: 6px 12px; white-space: normal; max-width: 100%; line-height: 1.35; }
.plan-card .btn-pill { white-space: normal; height: auto; min-height: 40px; padding: 8px 14px; text-align: center; line-height: 1.3; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 16px; border: 1px solid var(--line-soft); background: var(--raise); min-width: 0; }
.plan-card.is-featured { border-color: var(--pill-line); box-shadow: 0 0 0 1px var(--pill-line) inset; }
.plan-h { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.plan-for { color: var(--muted); font-size: 13px; margin-top: -10px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price-amt { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; }
.price-per { color: var(--muted); font-size: 13px; }
.plan-card .ticks { margin-top: 2px; }
.pricing > .fine { margin-top: 14px; }

.scrim { display: none; }

@media (max-width: 1439px) {
  .hide-md { display: none !important; }
}

@media (max-width: 1279px) {
  .app { min-height: 100dvh; }
  .frame, .frame-noside { grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
  .panel { overflow: visible; }
  .panel-side { grid-column: 2; }
  .sidebar { position: sticky; top: 0; max-height: 100dvh; overflow: auto; }
}

@media (min-width: 1280px) {
  .app { height: 100dvh; overflow: hidden; }
  .frame { grid-template-rows: minmax(0, 1fr); }
  .sidebar { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
}

@media (max-width: 899px) {
  :root { --gap: 10px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 0 var(--gap); }
  .hide-sm { display: none !important; }
  .brand-name { display: none; }
  .brand { margin-right: 2px; }
  .search-pill { width: 100%; }
  .search-pill .kbd-hint { display: none; }
  .frame, .frame-noside { grid-template-columns: minmax(0, 1fr); padding: 0 var(--gap) var(--gap); }
  .panel-side { grid-column: 1; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    width: min(300px, 86vw); max-height: none;
    background: var(--shell);
    border-right: 1px solid var(--line);
    padding-top: 16px;
    transform: translateX(-102%);
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
    overflow: auto;
  }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  .app.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .panel-main { padding: 22px 18px 28px; }
  .panel-side { padding: 20px 18px 26px; }
  .panel-title { font-size: 28px; }
  .panel-title-road { font-size: 21px; }
  .mini { display: none; }
  .row { grid-template-columns: auto minmax(0, 1fr); }
  .row-detour { grid-template-columns: 24px minmax(0, 1fr); }
  .row-detour .row-end { grid-column: 2; }
  .status { grid-template-columns: auto minmax(0, 1fr); }
  .stats { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .log-entry { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .summary { font-size: 15px; }
  .field-row { flex-direction: column; }
  .field-row .btn-pill { width: 100%; }
  .score-n { font-size: 38px; min-width: 0; }
  .score .status-cond .cond { font-size: 17px; }
  .btn-fit { width: 34px; padding: 0; }
  .watch-fields { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan-actions { margin-left: 0; }
  .panel-head { flex-wrap: wrap; }
  .panel-titles { flex: 1 1 220px; min-width: 0; }
  .watch-top { grid-template-columns: auto minmax(0, 1fr); }
  .watch-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .days { gap: 2px; }
  .day { height: 26px; border-radius: 3px; }
  .share-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .share-end { justify-content: flex-end; }
  .share-end .meter { flex: 1; width: auto; }
  .bars-days, .bar-labels { gap: 6px; }
}

@media (min-width: 900px) and (max-width: 1279px) {
  .app.nav-collapsed .frame { grid-template-columns: minmax(0, 1fr); padding-left: var(--gap); }
  .app.nav-collapsed .sidebar { display: none; }
  .app.nav-collapsed .panel-side { grid-column: 1; }
}

@media (min-width: 1280px) {
  .app.nav-collapsed .frame { grid-template-columns: minmax(0, 1fr) var(--side); padding-left: var(--gap); }
  .app.nav-collapsed .frame-noside { grid-template-columns: minmax(0, 1fr); }
  .app.nav-collapsed .sidebar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.flag { width: 18px; height: 12px; flex: none; border-radius: 2px; clip-path: inset(0 round 2px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.menu-lang { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
