/* LOOQ client cabinet: prototype styles.
   Gold Veins tokens: D:/Repos/looq-docs/brand/tokens.json (check: python D:/Repos/looq-docs/brand/check_colors.py <this folder>). */

@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-cyrillic.woff) format('woff');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-math.woff2) format('woff2');
  unicode-range: U+2190, U+2192, U+2194-21AE, U+2213-2214, U+2216-22FF, U+00D7; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }
/* Japanese: Zen Kaku Gothic New (SIL OFL), cut to the characters the prototype uses (tools/fonts.py). */
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/zen-400.woff) format('woff'); unicode-range: U+3000-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/zen-700.woff) format('woff'); unicode-range: U+3000-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }

:root {
  --ink: #081521; --slate: #5B6C82; --muted: #8592A3;
  --white: #FFFFFF; --paper: #F6F8FB; --mist: #E3EBF6; --haze: #ECF0FF;
  --line: #DDE3F1; --line-strong: #C6D3EC;
  --blue: #2D5BFF; --deep: #0100D7; --sky: #8AA7FF; --on-deep: #D9E1FF;
  --lime: #D9FF47; --lime-ink: #5C7330; --on-lime: #2B3A08; --lime-tint: #F4FFD0;
  --night: #050A14; --night-2: #0B1424; --night-line: #1B2740; --night-text: #C9D4E8; --navy: #102338;
  --green: #267A65; --amber: #EFB641; --alert: #B8412C;
  --ok-tint: #DDEFEA; --warn-tint: #FFF6E2; --warn-ink: #7A5410; --no-tint: #FBEDEA;
  --font: Onest, 'Zen Kaku Gothic New', 'Yu Gothic UI', Meiryo, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --shadow: 0 6px 18px rgba(8, 21, 33, .08);
  --shadow-sheet: -14px 0 34px rgba(8, 21, 33, .09);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --side: 256px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/1.45 var(--font); color: var(--ink); background: var(--white);
  font-feature-settings: "ss01" 1; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.eb-lime { color: var(--lime); }
h1, h2, h3 { margin: 0; font-weight: 700; }
.page-title { font-size: 34px; line-height: 1.04; letter-spacing: -.045em; margin-top: 8px; }
.lead { color: var(--slate); font-size: 15px; line-height: 1.5; max-width: 66ch; margin: 10px 0 0; }
.muted { color: var(--slate); }
.small { font-size: 12.5px; }
.nw { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; background: var(--night); }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--night); color: var(--night-text);
  display: flex; flex-direction: column; padding: 28px 16px 18px; border-right: 1px solid var(--night-line); }
.side .logo { height: 20px; width: auto; color: var(--white); margin: 0 10px 28px; flex: none; }
.org { margin: 0 4px 22px; padding: 14px; border: 1px solid var(--night-line); border-radius: 12px; background: var(--night-2); }
.org .eyebrow { font-size: 10px; letter-spacing: .18em; color: var(--lime); }
.org b { display: block; color: var(--white); font-size: 15px; font-weight: 650; letter-spacing: -.01em; margin-top: 6px; }
.org span { display: block; font-size: 12px; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10px; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; color: rgba(201, 212, 232, .6);
  margin: 18px 12px 8px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px; color: var(--night-text);
  text-decoration: none; font-weight: 500; transition: background .14s var(--ease), color .14s var(--ease); }
.nav a:hover { background: var(--night-2); color: var(--white); }
.nav a[aria-current="page"] { background: var(--night-2); color: var(--white); font-weight: 600; }
.nav .mk { width: 6px; height: 6px; border-radius: 1.5px; background: var(--night-line); flex: none; transition: background .14s; }
.nav a[aria-current="page"] .mk { background: var(--lime); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--navy);
  color: var(--white); font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.nav .count.new { background: var(--lime); color: var(--on-lime); }
.me { margin-top: auto; padding: 16px 6px 0; border-top: 1px solid var(--night-line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center;
  font-size: 12px; font-weight: 650; flex: none; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; color: var(--white); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { display: block; font-size: 11.5px; color: var(--night-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me button { border: 1px solid var(--night-line); background: transparent; color: var(--night-text); height: 30px; padding: 0 10px;
  border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.me button:hover { color: var(--white); border-color: var(--slate); }

.main { min-width: 0; padding: 32px 40px 72px; background: var(--white); }
.main-inner { max-width: 1280px; margin: 0 auto; }
.mtop { display: none; }
.scrim-nav { display: none; }

.viewas { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--haze);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 10px 16px; margin-bottom: 24px; font-size: 13.5px; }
.viewas b { font-weight: 650; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--slate); margin-bottom: 10px; }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid transparent; font: 650 14px/1 var(--font); letter-spacing: -.005em; cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background .14s var(--ease), border-color .14s var(--ease), color .14s var(--ease); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--deep); }
.btn-secondary { background: var(--white); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--slate); }
.btn-ghost { background: transparent; color: var(--blue); padding: 0 10px; }
.btn-ghost:hover { background: var(--haze); }
.btn-danger { background: var(--white); border-color: var(--line-strong); color: var(--alert); }
.btn-danger:hover { border-color: var(--alert); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { height: 32px; padding: 0 14px; border: 0; background: transparent; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--slate); cursor: pointer; transition: color .14s var(--ease), background .14s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }

.picker { position: relative; }
.picker > button { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--white); font-size: 13.5px; font-weight: 600; cursor: pointer; max-width: 320px; }
.picker > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 7px; height: 7px; border-right: 1.5px solid var(--slate); border-bottom: 1.5px solid var(--slate); transform: rotate(45deg) translateY(-2px); flex: none; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 280px; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.menu button:hover, .menu button[aria-checked="true"] { background: var(--paper); }
.menu button small { color: var(--slate); font-size: 12px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.field { display: block; margin-top: 16px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.field > small { display: block; font-size: 12px; color: var(--slate); margin-top: 6px; }
.input, .field input, .field select, .field textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--white); font-size: 14px; transition: border-color .14s var(--ease); }
.field textarea { height: 88px; padding: 10px 14px; resize: vertical; }
.field input:hover, .field select:hover { border-color: var(--slate); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field input[aria-invalid="true"] { border-color: var(--alert); }
.err { color: var(--alert); font-size: 12.5px; margin-top: 6px; }
.pw { position: relative; }
.pw input { padding-right: 96px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--blue);
  font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pw-toggle:hover { background: var(--haze); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.choice label { position: relative; display: block; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; transition: border-color .14s var(--ease), background .14s var(--ease); }
.choice label small { display: block; font-weight: 400; color: var(--slate); font-size: 12px; margin-top: 2px; }
.choice input { position: absolute; opacity: 0; }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--haze); }
.choice label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }

/* ---------- pills, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  white-space: nowrap; letter-spacing: .005em; }
.pill i { width: 6px; height: 6px; border-radius: 1.5px; background: currentColor; flex: none; }
.pill-ok { background: var(--ok-tint); color: var(--green); }
.pill-warn { background: var(--warn-tint); color: var(--warn-ink); }
.pill-no { background: var(--no-tint); color: var(--alert); }
.pill-info { background: var(--haze); color: var(--deep); }
.pill-neutral { background: var(--mist); color: var(--slate); }
.pill-lime { background: var(--lime); color: var(--on-lime); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px; background: var(--white);
  border: 1px solid var(--line); font-size: 12px; font-weight: 550; color: var(--ink); white-space: nowrap; }
.chip .g { width: 14px; height: 14px; color: var(--blue); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--muted); flex: none; }
.dot-ok { background: var(--green); } .dot-warn { background: var(--amber); } .dot-no { background: var(--alert); } .dot-off { background: var(--line-strong); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---------- surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 0; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.card h2, .panel h2 { font-size: 19px; line-height: 1.15; letter-spacing: -.03em; }
.card .sub, .panel .sub { color: var(--slate); font-size: 13px; margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 0; }
.section-title h2 { font-size: 21px; letter-spacing: -.035em; }
.callout { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; margin-bottom: 16px; }
.callout-warn { background: var(--warn-tint); color: var(--warn-ink); }
.callout-info { background: var(--haze); color: var(--ink); }
.callout .dot { margin-top: 5px; }
.callout b { font-weight: 650; }

/* ---------- hero band ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: var(--night-text); border-radius: 16px;
  padding: 32px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 34px 34px; background-position: -1px -1px; }
.hero::after { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -220px; top: -380px;
  background: radial-gradient(closest-side, rgba(45, 91, 255, .34), rgba(45, 91, 255, 0)); }
.hero .eyebrow { color: var(--lime); }
.big { font-size: 96px; line-height: .86; letter-spacing: -.06em; font-weight: 750; color: var(--lime); margin-top: 22px; }
.hero .cap { margin-top: 16px; font-size: 14px; max-width: 46ch; }
.hero .cap b { color: var(--white); font-weight: 650; }
.live { border-left: 1px solid var(--night-line); padding-left: 32px; display: flex; flex-direction: column; min-width: 0; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-head .eyebrow { display: flex; align-items: center; gap: 10px; }
.live-head small { font-size: 12px; color: var(--night-text); }
.pulse { width: 8px; height: 8px; border-radius: 2px; background: var(--lime); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.live-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.live-stats b { display: block; color: var(--white); font-size: 32px; font-weight: 700; letter-spacing: -.045em; line-height: 1; transition: color .24s; }
.live-stats span { display: block; font-size: 12px; margin-top: 6px; line-height: 1.3; }
.spark { display: block; width: 100%; height: 56px; margin-top: auto; padding-top: 16px; }
.spark-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--night-text); margin-top: 4px; }
.hero-off { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.hero-off b { color: var(--white); font-size: 18px; font-weight: 650; letter-spacing: -.02em; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 18px; min-height: 156px; display: flex; flex-direction: column; min-width: 0; }
.k-label { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.k-value { font-size: 40px; line-height: 1; font-weight: 750; letter-spacing: -.05em; margin-top: auto; padding-top: 18px; }
.k-value small { font-size: 20px; letter-spacing: -.02em; font-weight: 650; margin-left: 3px; }
.k-sub { font-size: 12.5px; color: var(--slate); margin-top: 8px; }
.k-sub b { color: var(--ink); font-weight: 600; }
.term { position: relative; cursor: help; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.term:hover, .term:focus-visible { text-decoration-color: var(--blue); }
.term[data-tip]:hover::after, .term[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 30; left: 0; top: calc(100% + 8px); width: 240px; max-width: 70vw; padding: 10px 12px; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.45; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: normal; pointer-events: none; }

/* ---------- column chart ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--slate); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.sw-a { background: var(--blue); } .sw-b { background: var(--line-strong); }
.sw-nd { background: var(--white); box-shadow: inset 0 0 0 1px var(--line-strong); }
.sw-tr { width: 2px; height: 12px; border-radius: 1px; background: var(--slate); }
.cc { position: relative; height: 264px; margin-top: 24px; }
.cc-grid, .cc-cols { position: absolute; left: 48px; right: 0; top: 0; bottom: 26px; }
.cc-gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.cc-gl.base { border-top-color: var(--line-strong); }
.cc-gl span { position: absolute; right: calc(100% + 10px); top: -8px; font-size: 11px; color: var(--slate); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-cols { display: flex; align-items: stretch; }
.cc-col { flex: 1 1 0; min-width: 0; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.cc-col::before { content: ""; position: absolute; inset: 0 1px; border-radius: 8px; background: transparent; transition: background .14s var(--ease); }
.cc-col.hot::before { background: rgba(45, 91, 255, .07); }
.cc-bar { position: relative; width: min(24px, 64%); display: flex; flex-direction: column-reverse; gap: 2px; }
.cc-a { background: var(--blue); }
.cc-b { background: var(--line-strong); }
.cc-bar > :last-child { border-radius: 4px 4px 0 0; }
.cc-col.partial .cc-a { background: var(--sky); }
.cc-nd { position: relative; width: 10px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--white); margin-bottom: -5px; }
.cc-warn { position: absolute; top: -12px; left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 1.5px; background: var(--amber); }
.cc-x { position: absolute; left: 48px; right: 0; bottom: 0; height: 18px; display: flex; }
.cc-x span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--slate); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-x span.hide { visibility: hidden; }
.cc-x span.we { color: var(--ink); font-weight: 600; }
.trains { position: relative; height: 34px; margin-left: 48px; border-top: 1px solid var(--line); margin-top: 10px; }
.trains-l { position: absolute; right: calc(100% + 10px); top: 9px; font-size: 11px; color: var(--slate); white-space: nowrap; }
.trains i { position: absolute; top: 10px; width: 2px; height: 14px; border-radius: 1px; background: var(--slate); }
.trains-note { font-size: 12.5px; color: var(--slate); margin: 12px 0 0 48px; }
.tip { position: absolute; z-index: 25; pointer-events: none; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  padding: 10px 12px; font-size: 12.5px; min-width: 200px; transform: translate(-50%, calc(-100% - 10px)); }
.tip b { display: block; font-size: 12.5px; font-weight: 650; margin-bottom: 6px; }
.tip .r { display: flex; justify-content: space-between; gap: 16px; color: var(--slate); padding: 1px 0; }
.tip .r span:last-child { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tip .r .sw { margin-right: 6px; vertical-align: -1px; }
.tip .note { color: var(--warn-ink); margin-top: 6px; font-size: 12px; }
.ctable { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
.ctable th { text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.ctable td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ctable td:not(:first-child), .ctable th:not(:first-child) { text-align: right; }
.ctable-wrap { max-height: 300px; overflow: auto; }

/* ---------- bars ---------- */
.bars { margin-top: 18px; }
.hb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); }
.hb:first-child { border-top: 0; padding-top: 0; }
.hb .t { font-size: 13.5px; }
.hb .v { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb .v small { color: var(--slate); font-weight: 500; font-size: 12.5px; margin-left: 6px; }
.track { grid-column: 1 / -1; height: 8px; background: var(--mist); border-radius: 0 4px 4px 0; }
.fill { height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; min-width: 2px; }
.fill.dim { background: var(--sky); }
.ages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 132px; margin-top: 8px; }
.age { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.age .v { font-size: 12px; font-weight: 650; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.age .bar { width: min(24px, 70%); background: var(--blue); border-radius: 4px 4px 0 0; }
.age .bar.low { background: var(--white); box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: 2px; height: 10px !important; }
.age .l { width: 100%; text-align: center; font-size: 11.5px; color: var(--slate); border-top: 1px solid var(--line-strong); padding-top: 6px; margin-top: 0; white-space: nowrap; }
.split-title { font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-top: 22px; }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--slate); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.privacy .dot { background: var(--blue); margin-top: 5px; }
.facts { margin-top: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 2px 16px; }
.fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; min-width: 0; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact span { font-size: 13px; color: var(--ink); line-height: 1.35; min-width: 0; }
.fact b { font-size: 20px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fact b small { font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--slate); margin-left: 4px; }

/* ---------- insights ---------- */
.ins-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.ins { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ins-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ins h3 { font-size: 20px; line-height: 1.18; letter-spacing: -.035em; }
.parts { display: grid; gap: 14px; }
.part p { margin: 0; font-size: 14px; line-height: 1.5; }
.pl { font-size: 10.5px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--slate); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.pl::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--blue); }
.ins-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); margin-top: auto; }
.ins-meta .base { font-size: 12.5px; color: var(--slate); }
.ins-meta .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ins.wait { background: var(--white); }
.ins.feature { background: var(--night); border-color: var(--night); color: var(--night-text); position: relative; overflow: hidden; isolation: isolate; }
.ins.feature::after { content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; left: -260px; bottom: -420px;
  background: radial-gradient(closest-side, rgba(45, 91, 255, .30), rgba(45, 91, 255, 0)); }
.ins.feature h3 { color: var(--white); font-size: 26px; letter-spacing: -.04em; max-width: 30ch; }
.ins.feature .pl { color: var(--night-text); }
.ins.feature .pl::before { background: var(--lime); }
.ins.feature .part p { color: var(--white); }
.ins.feature .eyebrow { color: var(--lime); }
.ins.feature .ins-meta { border-top-color: var(--night-line); }
.ins.feature .ins-meta .base { color: var(--night-text); }
.ins.feature .chip { background: var(--night-2); border-color: var(--night-line); color: var(--night-text); }
.ins.feature .chip .g { color: var(--lime); }
.ins.feature .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ins.feature .btn-secondary { background: transparent; color: var(--white); border-color: var(--night-line); }
.ins.feature .btn-secondary:hover { border-color: var(--night-text); }
.ins.feature .btn-ghost { color: var(--night-text); }
.ins.feature .btn-ghost:hover { background: var(--night-2); }
.progress { height: 8px; background: var(--haze); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.prog-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--slate); margin-top: 8px; }
.prog-row b { color: var(--ink); font-weight: 600; }
.mini { display: flex; flex-direction: column; gap: 0; }
.mini-item { padding: 16px 0; border-top: 1px solid var(--line); }
.mini-item:first-child { border-top: 0; padding-top: 4px; }
.mini-item h3 { font-size: 15.5px; line-height: 1.3; letter-spacing: -.02em; margin-top: 6px; }
.mini-item p { margin: 6px 0 0; font-size: 13px; color: var(--slate); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.fchip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--slate); display: inline-flex; align-items: center; gap: 8px; }
.fchip b { color: var(--ink); font-weight: 650; }
.fchip:hover { border-color: var(--slate); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.fchip[aria-pressed="true"] b { color: var(--lime); }

/* ---------- sources ---------- */
.src-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.src { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.src-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.glyph { width: 44px; height: 44px; border-radius: 8px; background: var(--haze); display: grid; place-items: center; flex: none; }
.glyph svg { width: 26px; height: 26px; color: var(--blue); }
.src.on .glyph { background: var(--night); }
.src.on .glyph svg { color: var(--lime); }
.src h3 { font-size: 16.5px; letter-spacing: -.02em; line-height: 1.25; }
.src p { margin: 0; font-size: 13.5px; color: var(--slate); line-height: 1.5; }
.src .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.src .foot .btn-ghost { margin-left: auto; }
.src-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; font-weight: 550; }
.uses { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- places ---------- */
.place-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.place { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px 24px; min-width: 0; }
.place h3 { font-size: 18px; letter-spacing: -.03em; line-height: 1.2; }
.place .w { font-size: 13px; color: var(--slate); margin-top: 4px; }
.place .stats { display: flex; gap: 24px; margin-top: 16px; flex-wrap: wrap; }
.place .stats b { display: block; font-size: 20px; letter-spacing: -.035em; font-weight: 700; }
.place .stats span { font-size: 12px; color: var(--slate); }
.place .act { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; flex-wrap: wrap; }
.mbars { display: flex; align-items: flex-end; gap: 4px; height: 72px; }
.mbars i { flex: 1; background: var(--blue); border-radius: 3px 3px 0 0; min-height: 2px; }
.mbars-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--slate); margin-top: 6px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); text-align: left; padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--paper); }
.table tr.click:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .name b { display: block; font-weight: 650; }
.table .name span { display: block; font-size: 12.5px; color: var(--slate); margin-top: 2px; }
.table .acts { text-align: right; white-space: nowrap; }
.table .acts .btn + .btn { margin-left: 6px; }
.table .warnv { color: var(--warn-ink); font-weight: 650; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 6px; flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--paper); }
.stat b { display: block; font-size: 28px; letter-spacing: -.045em; font-weight: 750; line-height: 1; }
.stat span { display: block; font-size: 12.5px; color: var(--slate); margin-top: 8px; }
.stat.dark { background: var(--night); border-color: var(--night); }
.stat.dark b { color: var(--lime); }
.stat.dark span { color: var(--night-text); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 20px; overflow-x: auto; }
.tabs a { padding: 12px 14px; color: var(--slate); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.tabs a small { color: var(--slate); font-weight: 500; margin-left: 4px; }
.empty { border: 1px solid var(--line); border-radius: 14px; padding: 40px 24px; text-align: left; background: var(--paper); }
.empty h3 { font-size: 18px; letter-spacing: -.03em; }
.empty p { margin: 6px 0 16px; color: var(--slate); max-width: 56ch; }
.req { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.req:first-child { border-top: 0; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(5, 10, 20, .44); animation: fade .18s var(--ease); }
.dialog { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  overflow: auto; background: var(--white); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; animation: pop .2s var(--ease); }
.dialog h2 { font-size: 22px; letter-spacing: -.035em; line-height: 1.15; }
.dialog .lead { font-size: 14px; margin-top: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.x { position: absolute; right: 16px; top: 16px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.x::before, .x::after { content: ""; position: absolute; left: 9px; top: 15px; width: 14px; height: 1.5px; background: var(--slate); }
.x::before { transform: rotate(45deg); } .x::after { transform: rotate(-45deg); }
.x:hover { background: var(--paper); }
.sheet { position: fixed; z-index: 51; right: 0; top: 0; bottom: 0; width: min(460px, 100vw); background: var(--white); box-shadow: var(--shadow-sheet);
  padding: 28px; overflow: auto; animation: slide .24s var(--ease); }
.sheet h2 { font-size: 22px; letter-spacing: -.035em; line-height: 1.15; margin-top: 16px; }
.sheet .glyph { width: 52px; height: 52px; }
.sheet section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.sheet section h3 { font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.cred { background: var(--night); color: var(--night-text); border-radius: 12px; padding: 18px 20px; margin-top: 18px; position: relative; }
.cred dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; align-items: baseline; }
.cred dt { font-size: 12px; }
.cred dd { margin: 0; color: var(--white); font-family: var(--mono); font-size: 15px; word-break: break-all; }
.cred dd.pw-big { color: var(--lime); font-size: 18px; font-weight: 500; letter-spacing: .02em; }
.gen { display: flex; gap: 8px; align-items: center; }
.gen output { flex: 1; height: 44px; display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
  font-family: var(--mono); font-size: 15px; letter-spacing: .02em; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--night); color: var(--white); border-radius: 12px;
  padding: 12px 18px; font-size: 13.5px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; animation: rise .24s var(--ease); max-width: calc(100vw - 32px); }
.toast i { width: 8px; height: 8px; border-radius: 2px; background: var(--lime); flex: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.proto { position: fixed; z-index: 40; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 12px;
  border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 11.5px; color: var(--slate); font-weight: 600; }
.proto button { border: 0; background: var(--paper); border-radius: 999px; height: 22px; padding: 0 9px; font-size: 11.5px; font-weight: 600; color: var(--slate); cursor: pointer; }
.proto button:hover { color: var(--ink); background: var(--mist); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.login-art { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: var(--night-text); padding: 44px 56px 40px;
  display: flex; flex-direction: column; min-height: 100vh; }
.login-art::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 34px 34px; background-position: -1px -1px; }
.login-art::after { content: ""; position: absolute; z-index: -1; width: 900px; height: 900px; left: -300px; bottom: -560px;
  background: radial-gradient(closest-side, rgba(45, 91, 255, .38), rgba(45, 91, 255, 0)); }
.login-art .logo { height: 28px; width: auto; color: var(--white); align-self: flex-start; }
.login-copy { margin-top: auto; }
.login-copy h1 { color: var(--white); font-size: 54px; line-height: 1; letter-spacing: -.05em; max-width: 13ch; margin-top: 16px; }
.login-copy p { font-size: 16px; line-height: 1.5; max-width: 44ch; margin: 18px 0 0; }
.login-fig { width: 100%; max-width: 560px; height: auto; margin: 36px 0 0; display: block; }
.login-priv { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--night-line); }
.login-priv i { width: 8px; height: 8px; border-radius: 2px; background: var(--lime); flex: none; }
.login-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; gap: 24px; }
.form { width: 100%; max-width: 380px; }
.form h2 { font-size: 30px; letter-spacing: -.045em; line-height: 1.05; }
.form > p { margin: 8px 0 0; color: var(--slate); }
.form .btn-block { margin-top: 24px; height: 46px; font-size: 15px; }
.form .help { font-size: 13px; color: var(--slate); margin-top: 16px; }
.alert { margin-top: 18px; background: var(--no-tint); color: var(--alert); border-radius: 8px; padding: 12px 14px; font-size: 13.5px; }
.rules { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 13px; color: var(--slate); }
.rules li { display: flex; align-items: center; gap: 10px; }
.rules li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.rules li.ok { color: var(--ink); }
.rules li.ok::before { background: var(--green); box-shadow: none; }
.demo-box { width: 100%; max-width: 380px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); }
.demo-box p { margin: 6px 0 12px; font-size: 13px; color: var(--slate); }
.demo-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-box .mono { white-space: nowrap; }

/* ---------- language switch ---------- */
.langs { display: inline-flex; gap: 2px; }
.langs button { height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; background: transparent;
  color: var(--slate); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { color: var(--ink); background: var(--white); border-color: var(--line-strong); }
.langs.on-night button { color: var(--night-text); }
.langs.on-night button:hover { color: var(--white); }
.langs.on-night button[aria-pressed="true"] { color: var(--white); background: var(--night-2); border-color: var(--night-line); }
.login-art > .langs { position: absolute; top: 44px; right: 56px; }
.side > .langs { margin: 14px 0 0; }

/* ---------- Japanese ---------- */
/* Japanese glyphs are square: no tight tracking, more line height, line breaks between phrases. */
html:lang(ja) body { line-height: 1.6; line-break: strict; }
html:lang(ja) :is(h1, h2, h3, .page-title, .org b, .hero-off b, .fact b, .btn) { letter-spacing: 0; }
html:lang(ja) :is(h1, h2, h3, .page-title) { line-height: 1.3; }
html:lang(ja) :is(.eyebrow, .org .eyebrow, .nav-label, .ctable th, .split-title, .pl, .table th, .sheet section h3) { letter-spacing: .04em; }
/* Break between phrases, not inside a word (Chrome; other browsers break between characters as usual). */
html:lang(ja) :is(h1, h2, h3, .page-title, .lead, p, .k-sub, .live-stats span, .fact span, .ins-meta .base, .prog-row, .callout, .login-priv) { word-break: auto-phrase; }
html:lang(ja) .login-copy h1 { font-size: 46px; line-height: 1.22; max-width: 11em; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis, .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s3, .s4, .s5, .s6, .s7, .s8 { grid-column: span 12; }
  .src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ins.feature .parts { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .24s var(--ease); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim-nav { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(5, 10, 20, .44); }
  .mtop { display: flex; position: sticky; top: 0; z-index: 35; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px;
    background: var(--night); border-bottom: 1px solid var(--night-line); }
  .mtop .logo { height: 18px; width: auto; color: var(--white); }
  .mtop button { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--night-line); background: transparent; color: var(--white); font-size: 13px; font-weight: 600; }
  .main { padding: 24px 20px 72px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .live { border-left: 0; padding-left: 0; border-top: 1px solid var(--night-line); padding-top: 24px; }
  .place-grid, .ins-grid, .src-wide { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { min-height: 0; padding: 28px 24px 28px; }
  .login-art > .langs { top: 28px; right: 24px; }
  .login-copy { margin-top: 40px; }
  .login-copy h1 { font-size: 38px; }
  html:lang(ja) .login-copy h1 { font-size: 32px; }
  .login-fig { display: none; }
}
@media (max-width: 640px) {
  .page-title { font-size: 28px; }
  .head { align-items: stretch; }
  .head-tools { width: 100%; }
  .picker, .picker > button { max-width: 100%; }
  .seg { width: 100%; } .seg button { flex: 1; padding: 0 8px; }
  .hero { padding: 24px 20px; }
  .big { font-size: 64px; }
  .k-value { font-size: 32px; }
  .kpi { min-height: 0; padding: 16px; }
  .card, .ins { padding: 18px; }
  .src-grid { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .place { grid-template-columns: minmax(0, 1fr); }
  .cc { height: 220px; }
  .cc-grid, .cc-cols, .cc-x { left: 40px; }
  .trains, .trains-note { margin-left: 40px; }
  .cc-x span.hm { visibility: hidden; }
  .cols2 { grid-template-columns: minmax(0, 1fr); }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 5px 16px; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--slate); font-size: 12.5px; text-align: left; flex: none; }
  .table td.name { display: block; text-align: left; }
  .table td.name::before { display: none; }
  .table .acts { justify-content: flex-start; }
  .table .acts::before { display: none; }
  .dialog, .sheet { padding: 22px 18px; }
  .live-stats b { font-size: 26px; }
  .stat b { font-size: 24px; }
}
@media (max-width: 359px) {
  .login-art > .langs { position: static; align-self: flex-start; margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
