/* ============================================================
   Корея и Япония · май 2027 — тема Zed
   Дизайн-система как в Menotes («Direction B», Zed-inspired):
   плоские поверхности, нулевые скругления, тонкие рамки,
   Inter + JetBrains Mono, тёмная тема по умолчанию.
   Цвета городов (--city-*) проверены на различимость для каждой темы
   (dataviz/validate_palette.js).
   ============================================================ */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/inter-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/inter-lat.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: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/jbmono-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/jbmono-lat.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; }

/* ── Токены: тёмная (по умолчанию) ─────────────────────────────── */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg:            #1b1d23;
  --sidebar:       #16181d;
  --surface:       #21242b;
  --surface-hi:    #2b2f38;
  --border:        #2f333c;
  --border-strong: #404551;

  --text:     #c8ccd4;
  --text-mid: #9096a1;
  --text-dim: #757b86;

  --accent:      #6690bb;
  --accent-soft: rgba(102, 144, 187, .14);
  --on-accent:   #10141b;

  --success: #98c379;  --success-soft: rgba(152, 195, 121, .12);
  --warn:    #e5c07b;  --warn-soft:    rgba(229, 192, 123, .12);
  --risk:    #e06c75;  --risk-soft:    rgba(224, 108, 117, .12);

  --city-seoul:  #3987e5;
  --city-busan:  #199e70;
  --city-jeju:   #c98500;
  --city-tokyo:  #cb4646;
  --city-kansai: #964bb4;

  --sea-1: #181b21; --sea-2: #15171c;
  --land: #23262e; --land-focus: #2b2f38; --land-stroke: #3d434f;
  --map-grid: rgba(255, 255, 255, .04); --map-halo: rgba(22, 24, 29, .9); --map-country: #555c69;

  --heat-lo: #222c3a; --heat-hi: #6d9fd8; --heat-ink: #c8ccd4; --heat-ink-hot: #10141b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .40);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, .50);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, .55);
  --backdrop: rgba(8, 9, 12, .6);

  --font-ui:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
  --radius-pill: 4px;
  --sidebar-w: 240px;
  --maxw: 1180px;
  --top-h: 0px;
  --c: var(--accent);
}

/* ── Токены: светлая ─────────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --bg:            #f5f6f8;
  --sidebar:       #eceef1;
  --surface:       #ffffff;
  --surface-hi:    #e8eaee;
  --border:        #d6d9df;
  --border-strong: #b7bcc5;

  --text:     #1c1e24;
  --text-mid: #565b64;
  --text-dim: #6a707a;

  --accent:      #206cd8;
  --accent-soft: rgba(47, 120, 224, .10);
  --on-accent:   #ffffff;

  --success: #477c37;  --success-soft: rgba(71, 124, 55, .10);
  --warn:    #8f6814;  --warn-soft:    rgba(201, 145, 20, .12);
  --risk:    #c8434f;  --risk-soft:    rgba(200, 67, 79, .09);

  --city-seoul:  #2a78d6;
  --city-busan:  #1baf7a;
  --city-jeju:   #eda100;
  --city-tokyo:  #e34948;
  --city-kansai: #4a3aa7;

  --sea-1: #e8edf3; --sea-2: #e2e8ef;
  --land: #f2f3f5; --land-focus: #ffffff; --land-stroke: #c5cbd4;
  --map-grid: rgba(20, 30, 50, .05); --map-halo: rgba(255, 255, 255, .92); --map-country: #a2a8b2;

  --heat-lo: #e4edfa; --heat-hi: #206cd8; --heat-ink: #1c1e24; --heat-ink-hot: #ffffff;

  --shadow-sm: 0 1px 2px rgba(20, 22, 28, .08);
  --shadow-md: 0 4px 14px rgba(20, 22, 28, .10);
  --shadow-lg: 0 12px 36px rgba(20, 22, 28, .14);
  --shadow-xl: 0 24px 60px rgba(20, 22, 28, .16);
  --backdrop: rgba(20, 22, 28, .35);
}

/* ── База ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 56px); }
body {
  margin: 0; overflow-x: clip; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font-ui); font-feature-settings: "ss01" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
body.has-modal { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; }
::selection { background: var(--text); color: var(--bg); }
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
.icon { flex: none; vertical-align: middle; }
.muted { color: var(--text-dim); }
.small { font-size: 12px; }
.grow { flex: 1; }
[hidden] { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Моноширинная подпись капсом — метка секций, полей, плиток */
.kicker, .eyebrow, .field-label, .block-head h2, .panel h3, .sub-head, .nav-label, .feed-day-label, .pool-head,
.lens-label, .sum-lead, .bars-note, .heat-corner, .strip-band, .modal-sub, .step-q {
  font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .12em;
}
.num, .nav-meta, .nav-step, .tab em, .stat, .sday b, .sday i, .bar-val, .hstat b, .stop-num, .ct-num, .rank-n, .mini-score, .level,
.price b, .feed-time, .heat td b {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "zero" 1;
}

/* ── Загрузка ─────────────────────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot span { width: 10px; height: 10px; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.boot-error { min-height: 100vh; }

/* ── Кнопки ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 0; background: var(--surface-hi); color: var(--text);
  font-weight: 500; font-size: 13px; text-decoration: none; white-space: nowrap; user-select: none; flex-shrink: 0;
  transition: opacity 120ms, background 120ms, border-color 120ms, color 120ms;
}
.btn:hover:not(:disabled) { border-color: var(--border-strong); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover:not(:disabled) { opacity: .88; border-color: var(--accent); }
.btn-secondary { background: transparent; border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-hi); }
.btn-quiet { background: var(--surface-hi); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-mid); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-hi); color: var(--text); border-color: transparent; }
.btn-danger { background: transparent; border-color: var(--risk); color: var(--risk); }
.btn-danger:hover:not(:disabled) { background: var(--risk-soft); border-color: var(--risk); }
.btn-sm { height: 26px; padding: 0 8px; font-size: 12px; gap: 5px; }
.btn-lg { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 0;
  background: transparent; color: var(--text-dim); transition: background 120ms, color 120ms;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-hi); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-dim); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--risk); }
.link-btn.warn { color: var(--warn); font-weight: 600; }
.link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 13px; font-weight: 500; text-decoration: none; }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Поля ─────────────────────────────────────────────────────── */
.input, .money-input, .link-input, .rating-input, .time-input, .sort select, .prio-extra textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 0; transition: border-color 120ms;
}
.input { width: 100%; min-height: 36px; padding: 7px 12px; outline: none; font-size: 13.5px; }
textarea.input, .prio-extra textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.input:hover, .money-input:hover, .link-input:hover { border-color: var(--border-strong); }
.input:focus, .money-input:focus-within, .link-input:focus-within, .rating-input:focus-within, .time-input:focus-within, .prio-extra textarea:focus { border-color: var(--accent); }
.input-lg { min-height: 44px; font-size: 15px; }
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--text-dim); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 10.5px; color: var(--text-dim); }
.field-label i { font-style: normal; text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-size: 12px; margin-left: 6px; }
.field-hint { margin: -8px 0 16px; font-size: 12px; color: var(--text-dim); min-height: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-narrow { max-width: 260px; }
.money-input { display: flex; align-items: stretch; overflow: hidden; }
.money-input input { flex: 1; min-width: 0; border: 0; outline: none; padding: 8px 12px; background: transparent; }
.money-input select { border: 0; border-left: 1px solid var(--border); background: var(--surface); padding: 0 10px; outline: none; max-width: 150px; color: var(--text); }
.money-row { display: flex; gap: 8px; flex-wrap: wrap; }
.money-row .money-input { flex: 1 1 220px; }
.link-input { display: flex; align-items: center; gap: 4px; padding: 3px 3px 3px 12px; color: var(--text-dim); }
.link-input .input { border: 0; padding: 6px; background: transparent; color: var(--text); min-height: 30px; }
.rating-input, .time-input { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--text-dim); align-self: flex-start; height: 36px; }
.rating-input input, .time-input input { border: 0; outline: none; padding: 0; width: 90px; background: transparent; color: var(--text); }
.rating-input i, .time-input i { font-style: normal; font-size: 12px; }
.time-input { margin-top: 8px; }
.time-input input { width: 110px; }
.form-error { display: flex; gap: 8px; align-items: flex-start; color: var(--risk); background: var(--risk-soft); border: 1px solid var(--risk); padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; padding: 0 12px; height: 34px; font-size: 13px; font-weight: 500; color: var(--text-mid); white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--accent-soft); color: var(--accent); }

/* ── Чипы, пилюли ─────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-pill);
  background: transparent; border: 1px solid var(--border); font-size: 13px; color: var(--text-mid);
  transition: background 120ms, border-color 120ms, color 120ms;
}
button.chip:not(.on):hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-sm { padding: 2px 8px; font-size: 12px; }
span.chip-sm { background: var(--surface-hi); border-color: transparent; }
.chip .lvl { font-family: var(--font-mono); letter-spacing: -1px; }
.day-chip { flex-direction: column; gap: 0; padding: 4px 9px; line-height: 1.2; min-width: 46px; font-family: var(--font-mono); }
.day-chip i { font-style: normal; font-size: 10px; opacity: .75; text-transform: uppercase; }
.suggest { margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.pill-ok { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.dot { width: 8px; height: 8px; background: var(--c); display: inline-block; flex: none; }
.new-dot { display: inline-flex; padding: 0 6px; border: 1px solid var(--risk); color: var(--risk); background: var(--risk-soft); font: 500 10px/16px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }

/* ── Аватары ──────────────────────────────────────────────────── */
.avatar {
  --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--m, var(--text-dim)); color: #fff;
  display: inline-grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 600; letter-spacing: .02em;
  flex: none; box-shadow: 0 0 0 2px var(--surface); line-height: 1;
}
.avatar-ghost { background: var(--surface-hi); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--border-strong); }
.avatar-more { background: var(--surface-hi); color: var(--text-mid); font-size: 10px; }
.avatar.faded { opacity: .4; filter: grayscale(.6); }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar + .avatar { margin-left: -6px; }

/* ── Каркас: боковая панель как в Zed ────────────────────────── */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px; padding: 14px 10px 12px;
}
.main { min-width: 0; overflow-x: clip; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 2px 4px; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); border: 1px solid var(--border-strong); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand-text small { font: 500 10px var(--font-mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 9.5px; color: var(--text-dim); padding: 12px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-left: 2px solid transparent;
  background: transparent; color: var(--text-mid); text-decoration: none; text-align: left; font-size: 13px; transition: background 120ms, color 120ms;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { font: 500 10px/16px var(--font-mono); padding: 0 5px; border: 1px solid var(--risk); color: var(--risk); border-radius: var(--radius-pill); }
.nav-step { font: 500 10px var(--font-mono); color: var(--text-dim); border: 1px solid var(--border); padding: 0 3px; }
.nav-meta { font: 11px var(--font-mono); color: var(--text-dim); }
.city-item { position: relative; }
.city-item .nav-step { border-color: color-mix(in srgb, var(--c) 60%, var(--border)); color: var(--c); }
.city-item.active { background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--text); border-left-color: var(--c); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.me-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; background: transparent; text-align: left; }
.me-row:hover { background: var(--surface); }
.me-row span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me-row b { font-size: 13px; font-weight: 600; }
.me-row small { font: 10px var(--font-mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }

.topbar {
  display: none; position: sticky; top: 0; z-index: 30; height: var(--top-h); align-items: center; gap: 12px; padding: 0 16px;
  background: var(--sidebar); border-bottom: 1px solid var(--border);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.bottomnav { display: none; }
.view { max-width: var(--maxw); margin: 0 auto; padding: 24px 28px 80px; outline: none; }

/* ── Общие блоки ──────────────────────────────────────────────── */
.display { font-weight: 600; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.025em; }
.display-sm { font-weight: 600; font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -.02em; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-dim); }
.lead { font-size: 14.5px; color: var(--text-mid); max-width: 640px; }
.block { margin-top: 28px; }
.block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.block-head h2 { font-size: 11px; color: var(--text-dim); }
.block-head .muted { font-size: 12px; }
.page-head { margin-bottom: 4px; }
.page-head .lead { margin-top: 8px; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 16px; }
.panel h3 { font-size: 10.5px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.panel h3 .icon { color: var(--text-mid); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; }
.sub-head { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-dim); margin-bottom: 8px; }
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-dim);
  background: var(--surface); border: 1px dashed var(--border-strong); }
.empty h3 { color: var(--text); font-size: 15px; }
.empty p { max-width: 440px; margin-bottom: 6px; font-size: 13px; }
.empty-sm { color: var(--text-dim); font-size: 13px; padding: 4px 0; }

/* ── Главная: герой ──────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: stretch; }
.hero-text { display: flex; flex-direction: column; }
.hero-text .display { margin: 8px 0 10px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: auto; padding-top: 20px; }
.hstat { background: var(--surface); border: 1px solid var(--border); margin: 0 -1px -1px 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.hstat b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.hstat span { order: -1; font: 500 10px var(--font-mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; }
.hstat-accent b { color: var(--accent); }
.map-card { border: 1px solid var(--border); background: var(--sea-1); overflow: hidden; }

.route-map { display: block; width: 100%; height: auto; }
.map-grid { stroke: var(--map-grid); stroke-width: 1; fill: none; }
.land-other { fill: var(--land); stroke: var(--land-stroke); stroke-width: .6; }
.land-focus { fill: var(--land-focus); stroke: var(--land-stroke); stroke-width: .9; stroke-linejoin: round; filter: none; }
.map-country { font: 500 13px var(--font-mono); letter-spacing: .35em; fill: var(--map-country); text-anchor: middle; }
.map-leg { fill: none; stroke: var(--text-mid); stroke-width: 1.6; stroke-dasharray: 2 6; stroke-linecap: round; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.map-leg-icon circle { fill: var(--surface); stroke: var(--border-strong); }
.map-leg-icon svg { color: var(--text-mid); }
.map-city { cursor: pointer; text-decoration: none; }
.map-hit { fill: transparent; }
.map-dot { fill: var(--c); stroke: var(--bg); stroke-width: 3; transition: r .15s; }
.map-city:hover .map-dot, .map-city:focus-visible .map-dot { r: 16; }
.map-num { fill: #fff; font: 600 12px var(--font-mono); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map-label { font: 600 20px var(--font-ui); fill: var(--text); paint-order: stroke; stroke: var(--map-halo); stroke-width: 5px; stroke-linejoin: round; letter-spacing: -.01em; }
.map-sub { font: 500 13px var(--font-mono); fill: var(--text-mid); paint-order: stroke; stroke: var(--map-halo); stroke-width: 4px; stroke-linejoin: round; }

/* ── Календарь по дням (сетка в полудни) ─────────────────────── */
.strip-scroll { overflow-x: auto; margin: 0 -28px; padding: 0 28px 14px; }
.strip { display: grid; grid-template-columns: repeat(var(--h), minmax(20px, 1fr)); row-gap: 4px; min-width: calc(var(--h) * 20px); }
.strip-band {
  grid-row: 1; margin: 0 1px; font-size: 10.5px; padding: 5px 8px; text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-top: 2px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
a.strip-band:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.strip-gap { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-dim); display: grid; place-items: center; padding: 3px 0; letter-spacing: .06em; }
.strip-home { border: 0; }
.sday {
  grid-row: 2; position: relative; margin: 0 1px; display: flex; flex-direction: column; align-items: center; padding: 6px 0 9px;
  border: 1px solid var(--border); line-height: 1.15;
  background: linear-gradient(90deg, var(--a) 50%, var(--b) 50%) bottom / 100% 3px no-repeat, var(--surface);
}
.sday.transfer {
  background:
    linear-gradient(90deg, var(--a) 50%, var(--b) 50%) bottom / 100% 3px no-repeat,
    linear-gradient(90deg, color-mix(in srgb, var(--a) 14%, var(--surface)) 50%, color-mix(in srgb, var(--b) 14%, var(--surface)) 50%);
}
.sday i { font: 500 9.5px var(--font-mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.sday b { font: 600 14px var(--font-mono); }
.sday.we i { color: var(--risk); }
.sday-badge {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 19px; height: 19px;
  display: grid; place-items: center; background: var(--surface-hi); color: var(--text); border: 1px solid var(--border-strong);
}

/* ── Главная: маршрут и боковая колонка ──────────────────────── */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px 24px; align-items: start; margin-top: 32px; }
.home-grid > .block { margin-top: 0; }
.stops { display: flex; flex-direction: column; }
.stop {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 14px 14px 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--c); transition: background 120ms, border-color 120ms;
}
.stop:hover { background: var(--surface-hi); border-color: var(--border-strong); border-left-color: var(--c); }
.stop-num, .ct-num {
  width: 28px; height: 28px; flex: none; background: var(--c); color: #fff; font: 600 12px var(--font-mono); display: grid; place-items: center;
}
.stop-main { flex: 1; min-width: 0; }
.stop-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stop-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.stop-country { display: inline-flex; align-items: center; gap: 6px; font: 500 10px var(--font-mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }
.flag { box-shadow: 0 0 0 1px var(--border-strong); flex: none; }
.stop-dates { display: flex; align-items: center; gap: 6px; font: 500 12px var(--font-mono); color: var(--text-mid); margin-top: 3px; }
.stop-blurb { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.stop-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.stat { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border: 1px solid var(--border); font-size: 12px; color: var(--text-mid); border-radius: var(--radius-pill); }
.stat-done { border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); background: var(--success-soft); }
.stat-todo { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); background: var(--warn-soft); }
.stop-prio { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; font-size: 12px; color: var(--text-dim); }
.stop-prio em { font-style: normal; color: var(--text-mid); }
.stop-go { align-self: center; color: var(--text-dim); }
.leg { display: flex; align-items: center; gap: 8px; margin-left: 29px; padding: 8px 0 8px 18px; border-left: 1px dashed var(--border-strong); font: 11.5px var(--font-mono); color: var(--text-dim); }
.leg span { color: var(--text-mid); }
.leg i { font-style: normal; }

.side { display: flex; flex-direction: column; gap: 12px; }
.todo-ic { width: 22px; height: 22px; display: grid; place-items: center; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); flex: none; }
.panel-todo h3 .icon { color: var(--warn); }
.panel-todo .muted { margin: 10px 0 12px; font-size: 13px; }
.todo-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.todo-segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
.todo-segs i { height: 4px; background: var(--surface-hi); }
.todo-segs i.on { background: var(--c); }
.todo-progress b { font: 500 11px var(--font-mono); color: var(--text-mid); white-space: nowrap; }
.todo-cities { display: flex; flex-direction: column; border: 1px solid var(--border); }
.todo-city { display: flex; align-items: center; gap: 10px; padding: 7px 10px; text-decoration: none; font-size: 13px; background: var(--bg); transition: background 120ms; }
.todo-city + .todo-city { border-top: 1px solid var(--border); }
.todo-go { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font: 11px var(--font-mono); color: var(--text-dim); }
@media (hover: hover) {
  .todo-city:hover { background: var(--surface-hi); }
  .todo-city:hover .todo-go { color: var(--accent); }
}
.panel-done .muted { margin-top: 8px; font-size: 13px; }
.feed-mini { display: flex; flex-direction: column; gap: 12px; }
.team { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.team-m { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.team-m i { font-style: normal; color: var(--text-dim); }
.team-empty { color: var(--text-dim); }

/* ── Город ────────────────────────────────────────────────────── */
.city-hero { position: relative; padding: 0 0 20px; }
.city-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 12.5px; color: var(--text-mid); }
.back:hover { color: var(--text); }
.city-steps { display: flex; }
.city-step { width: 28px; height: 26px; display: grid; place-items: center; font: 500 11px var(--font-mono); text-decoration: none;
  color: var(--text-dim); border: 1px solid var(--border); margin-left: -1px; background: var(--surface); }
.city-step:hover { color: var(--text); border-color: var(--border-strong); position: relative; }
.city-step.on { background: var(--c); border-color: var(--c); color: #fff; position: relative; }
.city-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.city-head .display { margin: 6px 0 8px; display: flex; align-items: center; gap: 12px; }
.city-head .display::before { content: ''; width: 12px; height: 12px; background: var(--c); flex: none; }
.city-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font: 500 12.5px var(--font-mono); color: var(--text-mid); }
.city-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.city-meta b { color: var(--text); font-weight: 600; }
.city-blurb { color: var(--text-mid); margin-top: 8px; max-width: 560px; font-size: 13.5px; }
.city-legs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font: 11.5px var(--font-mono); color: var(--text-dim); }
.city-legs span { display: inline-flex; align-items: center; gap: 6px; }
.city-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.city-prevnext { display: flex; gap: 6px; }

/* Вкладки — как вкладки редактора: активная поднята и отмечена цветом города */
.tabs {
  position: sticky; top: var(--top-h); z-index: 20; display: flex; overflow-x: auto; scrollbar-width: none;
  background: var(--sidebar); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  box-shadow: 0 0 0 100vmax var(--sidebar); clip-path: inset(0 -100vmax);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 38px; text-decoration: none; font-size: 13px;
  color: var(--text-mid); white-space: nowrap; border-right: 1px solid var(--border); position: relative;
}
.tab:first-child { border-left: 1px solid var(--border); }
.tab:hover { color: var(--text); background: var(--surface); }
.tab.on { background: var(--bg); color: var(--text); box-shadow: inset 0 2px 0 var(--c); }
.tab em { font-style: normal; font-size: 11px; color: var(--text-dim); border: 1px solid var(--border); padding: 0 4px; line-height: 16px; border-radius: var(--radius-pill); }
.tab.on em { color: var(--text-mid); border-color: var(--border-strong); }
.tab-body { padding-top: 20px; }

.list-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-left { flex: 1 1 320px; min-width: 0; }
.toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sort { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.sort select { height: 32px; padding: 0 10px; font-size: 13px; color: var(--text); outline: none; }
.lens { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lens-label { font-size: 10px; color: var(--text-dim); margin-right: 4px; }
.lens-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; border-radius: var(--radius-pill); }
.lens-chip i { font: normal 500 10.5px var(--font-mono); width: 18px; height: 18px; background: var(--c); color: #fff; display: grid; place-items: center; }
.lens-empty { color: var(--text-dim); font-size: 13px; background: var(--surface); border: 1px dashed var(--border-strong); padding: 7px 12px; }
.lens-empty a { color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; height: 30px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; color: var(--text-mid); border-radius: var(--radius-pill); }
.fchip i { font: normal 11px var(--font-mono); color: var(--text-dim); }
.fchip:not(.on):hover { border-color: var(--border-strong); color: var(--text); }
.fchip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.fchip.on i { color: var(--accent); }

/* ── Карточки ─────────────────────────────────────────────────── */
.grid { display: grid; gap: 12px; }
.grid-stay { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-act, .grid-food { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); transition: border-color 120ms; }
.card:hover { border-color: var(--border-strong); }
.card.flash { animation: flash 2s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 2px var(--c); } 100% { box-shadow: none; } }
.card-body { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-sub { font-size: 12.5px; color: var(--text-dim); margin-top: -3px; }
.card-foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border-top: 1px solid var(--border); background: var(--bg); }

.stay-media { position: relative; display: block; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--c) 10%, var(--surface-hi)); overflow: hidden; border-bottom: 1px solid var(--border); }
.stay-media img { width: 100%; height: 100%; object-fit: cover; }
.media-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-dim); font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; }
.site-badge { position: absolute; left: 0; top: 0; background: var(--sidebar); color: var(--text); padding: 3px 8px; font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chosen-badge { position: absolute; right: 0; top: 0; background: var(--success); color: var(--on-accent); padding: 3px 8px; font: 600 10px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; display: inline-flex; gap: 4px; align-items: center; }
.stay-card.is-chosen { border-color: var(--success); box-shadow: inset 0 0 0 1px var(--success); }
.title-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.match { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.match-ring { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-hi) 0);
  mask: radial-gradient(circle, transparent 60%, #000 61%); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); }
.match b { font: 600 11.5px var(--font-mono); }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--text-mid); }
.price b { font-size: 15px; color: var(--text); font-weight: 600; }
.price-row.muted { font-size: 12.5px; }
.ppn { color: var(--text-dim); font-size: 12px; }
.auto-src { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font: 11px var(--font-mono); color: var(--text-dim); margin-top: -3px; }
.auto-src .icon { color: var(--success); }
.auto-lines { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.auto-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-mid); }
.auto-line .icon { margin-top: 2px; color: var(--success); }
.auto-line.auto-miss, .auto-line.auto-miss .icon { color: var(--text-dim); }
.auto-hint { display: flex; align-items: flex-start; gap: 6px; color: var(--success); margin-top: -10px; }
.auto-hint .icon { margin-top: 2px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.check { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px 1px 5px; font-size: 12px; border: 1px solid transparent; border-radius: var(--radius-pill); }
.check i { font-style: normal; opacity: .8; font-family: var(--font-mono); font-size: 11px; }
.check-yes { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.check-partial { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.check-unknown { color: var(--text-dim); border: 1px dashed var(--border-strong); }
.card-note { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.author { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.author b { color: var(--text-mid); font-weight: 500; }
.comment { font-size: 13.5px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border-left: 2px solid var(--border-strong); padding: 7px 10px; }
.comment.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.comment.clamp.open { display: block; -webkit-line-clamp: unset; }
.chosen-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border-strong);
  background: transparent; font-size: 12.5px; color: var(--text-mid); transition: all 120ms;
}
.like-btn:not(.on):hover { border-color: var(--risk); color: var(--risk); }
.like-btn b { font: 600 11.5px var(--font-mono); }
.like-btn.on { background: var(--risk-soft); border-color: var(--risk); color: var(--risk); }
.like-btn.on svg { fill: currentColor; }

.act-head { display: flex; gap: 12px; align-items: flex-start; }
.type-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--border)); background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
.act-title { min-width: 0; }
.act-title .eyebrow { font-size: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-mid); }
.facts > span { display: inline-flex; align-items: center; gap: 5px; }
.facts .icon { color: var(--text-dim); }
.place { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--text-dim); }
.place .icon { margin-top: 2px; }
.meal-row { display: flex; flex-wrap: wrap; gap: 4px; }
.meal { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px 1px 5px; font: 500 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--border)); color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.food-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--text-mid); }
.level b { color: var(--text); letter-spacing: -1px; }
.level i { font-style: normal; color: var(--border-strong); letter-spacing: -1px; }
.must-try { font-size: 13px; background: var(--warn-soft); border-left: 2px solid var(--warn); padding: 6px 10px; color: var(--text); }
.must-try span { display: block; font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--warn); margin-bottom: 2px; }

/* Мини-строки для списков */
.mini-list { display: flex; flex-direction: column; border: 1px solid var(--border); }
.mini { display: flex; align-items: center; gap: 10px; padding: 7px 10px; text-decoration: none; background: var(--bg); min-width: 0; transition: background 120ms; }
.mini-list > * + * { border-top: 1px solid var(--border); }
.mini:hover { background: var(--surface-hi); }
.mini-img { width: 46px; height: 34px; object-fit: cover; flex: none; }
.mini-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--border)); color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.mini-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.mini-text b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text span { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-likes { display: inline-flex; align-items: center; gap: 3px; font: 500 11.5px var(--font-mono); color: var(--risk); }
.mini-wrap { position: relative; display: flex; align-items: center; gap: 8px; background: var(--bg); }
.mini-wrap .mini { flex: 1; }
.mini-score { font: 600 12px var(--font-mono); color: var(--text-mid); min-width: 44px; text-align: right; padding-right: 10px; }

/* Обзор города */
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ov-stay { grid-row: span 2; }
.ov-stay .muted { font-size: 13px; margin-bottom: 8px; }
.add-inline { margin-top: 10px; }
.chosen-wrap .card { border-color: var(--success); }
.chosen-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font: 500 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.city-note .note-text { white-space: pre-wrap; margin-bottom: 10px; font-size: 13.5px; }

/* ── Приоритеты ───────────────────────────────────────────────── */
.prio-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.prio-editor .muted { font-size: 13px; margin-bottom: 12px; }
.save-state { display: inline-flex; align-items: center; gap: 4px; font: 500 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }
.save-state.saved { color: var(--success); }
.save-state.error { color: var(--risk); }
.rank-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); }
.rank-item, .rank-slot { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; min-height: 48px; background: var(--bg); }
.rank-list > li + li { border-top: 1px solid var(--border); }
.rank-item { cursor: grab; }
.rank-item:hover { background: var(--surface-hi); }
.rank-item.dragging { opacity: .4; }
.rank-item.drop-target { box-shadow: inset 0 0 0 1px var(--c); }
.rank-slot { color: var(--text-dim); font-size: 13px; }
.rank-n { width: 24px; height: 24px; display: grid; place-items: center; font: 600 11.5px var(--font-mono); flex: none; background: var(--c); color: #fff; }
.rank-slot .rank-n { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-dim); }
.rank-ic { color: var(--text-mid); display: grid; place-items: center; }
.rank-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rank-text b { font-size: 13.5px; font-weight: 500; }
.rank-text small { font-size: 12px; color: var(--text-dim); }
.rank-btns { display: flex; }
.pool-head { font-size: 10px; color: var(--text-dim); margin-bottom: 8px; }
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; }
.pool-item { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); background: var(--bg); transition: border-color 120ms, background 120ms; }
.pool-item:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.pool-item:disabled { opacity: .4; cursor: default; }
.pool-item .icon { margin-top: 2px; color: var(--text-mid); }
.pool-item span { display: flex; flex-direction: column; line-height: 1.3; }
.pool-item b { font-size: 13px; font-weight: 500; }
.pool-item small { font-size: 11.5px; color: var(--text-dim); }
.prio-extra { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.prio-extra textarea { width: 100%; padding: 8px 12px; outline: none; color: var(--text); }
.prio-extra .field:last-child { margin-bottom: 0; }

.who-filled { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wf { position: relative; }
.wf.todo .avatar { opacity: .3; filter: grayscale(.7); }
.wf i { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--success); color: var(--on-accent); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) 30px; grid-template-areas: "label track val" ". who who"; align-items: center; gap: 4px 10px; }
.team-prio.compact .bar-row { grid-template-areas: "label track val"; }
.bar-label { grid-area: label; font-size: 13px; display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.bar-label i { font: normal 500 11px var(--font-mono); color: var(--text-dim); }
.bar-track { grid-area: track; height: 10px; background: var(--surface-hi); }
.bar-fill { display: block; height: 100%; background: var(--c); border-radius: 0 3px 3px 0; }
.bar-val { grid-area: val; font: 600 12.5px var(--font-mono); text-align: right; color: var(--text); }
.bar-who { grid-area: who; display: flex; gap: 14px; flex-wrap: wrap; padding-top: 2px; }
.pick { position: relative; display: inline-flex; }
.pick sup { position: absolute; right: -7px; top: -5px; background: var(--text); color: var(--bg); font: 600 9px var(--font-mono); width: 13px; height: 13px; display: grid; place-items: center; }
.bars-note { font-size: 10px; color: var(--text-dim); margin-top: 12px; letter-spacing: .06em; }
.budgets, .notes { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.budget-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-mid); }
.budget-line b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.budget-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.budget-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border: 1px solid var(--border); font: 12px var(--font-mono); border-radius: var(--radius-pill); }
.note-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.note-row p { background: var(--bg); border-left: 2px solid var(--border-strong); padding: 6px 10px; font-size: 13px; white-space: pre-wrap; flex: 1; }
.team-prio .link-more { margin-top: 12px; }

/* ── Итоги ────────────────────────────────────────────────────── */
.heat-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); }
.heat { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 640px; padding: 8px; }
.heat caption { caption-side: bottom; text-align: left; font-size: 12px; color: var(--text-dim); padding: 6px 12px 12px; }
.heat th { font-weight: 500; text-align: left; padding: 8px 10px; font-size: 13px; white-space: nowrap; }
.heat thead th { vertical-align: bottom; }
.heat thead th a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
.heat thead th small { display: block; font: 10.5px var(--font-mono); color: var(--text-dim); }
.heat tbody th { display: flex; align-items: center; gap: 8px; color: var(--text-mid); }
.heat td { text-align: center; padding: 9px 6px; font-size: 13px; min-width: 88px; color: var(--heat-ink);
  background: color-mix(in srgb, var(--heat-hi) var(--s, 0%), var(--heat-lo)); }
.heat td.hot { color: var(--heat-ink-hot); }
.heat td b { font-family: var(--font-mono); font-weight: 600; }
.heat td i { font: normal 500 10px var(--font-mono); margin-left: 4px; opacity: .85; }
.heat td.heat-empty { background: transparent; color: var(--border-strong); }
.heat-corner { color: var(--text-dim); font-size: 10px !important; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.sum-card { padding: 0; overflow: hidden; border-top: 2px solid var(--c); }
.sum-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; border-bottom: 1px solid var(--border); }
.sum-head:hover { background: var(--surface-hi); }
.sum-head > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.sum-head b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sum-head small { font: 11.5px var(--font-mono); color: var(--text-dim); }
.sum-section { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sum-section:last-child { border-bottom: 0; }
.sum-missing { margin-left: auto; display: inline-flex; gap: 2px; }
.sum-top { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 6px; }
.sum-top li { counter-increment: s; display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.sum-top li::before { content: counter(s); width: 20px; height: 20px; background: var(--c); color: #fff; font: 600 11px var(--font-mono); display: grid; place-items: center; }
.sum-top li i { margin-left: auto; font: normal 12px var(--font-mono); color: var(--text-dim); }
.sum-budget { margin-top: 10px; font-size: 12.5px; color: var(--text-mid); display: flex; gap: 6px; align-items: center; }
.sum-pick { display: flex; flex-direction: column; gap: 4px; }
.sum-lead { font-size: 10px; color: var(--text-dim); }
.sum-row { display: flex; gap: 18px; font-size: 13px; color: var(--text-mid); }
.sum-row span { display: inline-flex; align-items: center; gap: 6px; }
.sum-favs { display: flex; flex-direction: column; gap: 10px; }
.sum-favs small { display: block; font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin-bottom: 4px; }

/* ── Лента ────────────────────────────────────────────────────── */
.feed-day { margin-top: 20px; }
.feed-day-label { font-size: 10.5px; color: var(--text-dim); margin-bottom: 6px; }
.feed-list { padding: 0; }
.feed-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-left: 2px solid transparent; }
.feed-list .feed-row + .feed-row { border-top: 1px solid var(--border); }
.feed-row.is-new { border-left-color: var(--risk); background: var(--risk-soft); }
.feed-mini .feed-row { padding: 0; border: 0; background: none; }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.feed-text { font-size: 13.5px; color: var(--text-mid); }
.feed-text a { color: var(--text); text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.feed-text b { color: var(--text); font-weight: 600; }
.feed-time { color: var(--text-dim); font: 11.5px var(--font-mono); }
.feed-title { font-size: 13px; color: var(--text); margin-top: -4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-prio { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--text-mid); margin-top: -2px; }
.feed-mini .feed-prio { margin-top: -6px; }

/* ── Модальные окна ───────────────────────────────────────────── */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity .15s; }
.modal {
  position: relative; width: 100%; max-height: min(860px, calc(100vh - 48px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-xl); opacity: 0; transform: translateY(8px);
  transition: opacity .15s, transform .15s; outline: none;
}
.modal-wrap.in .modal-backdrop { opacity: 1; }
.modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 680px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--border); background: var(--sidebar); }
.modal-head h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.modal-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-dim); margin-top: 4px; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--sidebar); }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.confirm { padding-top: 20px; }
.confirm h3 { font-size: 15px; margin-bottom: 8px; }
.confirm p { color: var(--text-mid); font-size: 13.5px; }

.stepper { list-style: none; display: flex; margin: 0; padding: 0; border-bottom: 1px solid var(--border); background: var(--sidebar); }
.stepper li { flex: 1; }
.stepper li + li { border-left: 1px solid var(--border); }
.stepper button { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 14px; text-align: left; color: var(--text-dim); font-size: 12.5px; box-shadow: inset 0 -2px 0 transparent; }
.stepper button:disabled { cursor: default; }
.stepper li.done button { color: var(--text-mid); }
.stepper li.on button { color: var(--text); background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); }
.st-n { width: 18px; height: 18px; display: grid; place-items: center; font: 600 10.5px var(--font-mono); border: 1px solid var(--border-strong); flex: none; }
.stepper li.on .st-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stepper li.done .st-n { color: var(--success); border-color: var(--success); }
.st-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-q { font-size: 10.5px; color: var(--text-dim); margin: 2px 0 12px; }

.tiles { display: grid; gap: 4px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 1px solid var(--border); background: var(--bg); transition: border-color 120ms, background 120ms; }
.tile:hover { border-color: var(--border-strong); background: var(--surface-hi); }
.tile.on { border-color: var(--accent); background: var(--accent-soft); }
.tile b { font-size: 14px; font-weight: 600; }
.tile > span:last-child { font-size: 12.5px; color: var(--text-dim); }
.tile-ic { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border-strong); color: var(--accent); margin-bottom: 6px; }
.tiles-kind { grid-template-columns: repeat(3, 1fr); }
.tiles-city { grid-template-columns: 1fr; }
.city-tile { flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; border-left: 2px solid var(--c); }
.city-tile .ct-num { width: 26px; height: 26px; font-size: 11.5px; }
.ct-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.ct-text b { font-size: 15px; font-weight: 600; }
.ct-text span { font: 11.5px var(--font-mono); color: var(--text-dim); }
.city-tile > span.ct-count { font: 11px var(--font-mono); color: var(--text-dim); }
.tiles-type { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.type-tile { padding: 10px 12px; }
.type-tile .tile-ic { width: 30px; height: 30px; color: var(--text-mid); margin-bottom: 4px; }
.type-tile.on .tile-ic { color: var(--accent); border-color: var(--accent); }
.type-tile b { font-size: 13.5px; }
.type-tile > span:last-child { font-size: 12px; }
.type-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--bg); padding: 0 10px; height: 30px; font-size: 13px; margin-bottom: 14px; }
.type-pill i { font-style: normal; color: var(--accent); font-size: 12px; }
.recap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 16px; font-size: 13px; }
.recap span { color: var(--text-dim); }
.recap .link-btn { margin-left: auto; }

.lstat { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-size: 13px; margin: -4px 0 16px; border: 1px solid var(--border); background: var(--bg); }
.lstat-hint, .lstat-wait { color: var(--text-dim); }
.lstat-err { color: var(--risk); background: var(--risk-soft); border-color: color-mix(in srgb, var(--risk) 45%, transparent); }
.lstat-warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.lstat-warn a { font-weight: 600; color: inherit; }
.lstat-ok { color: var(--success); background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 40%, transparent); flex-direction: column; }
.lstat-dup { color: var(--risk); background: var(--risk-soft); border-color: color-mix(in srgb, var(--risk) 45%, transparent); flex-direction: column; }
.lstat-title { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.lstat .icon { margin-top: 1px; }
.preview { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); padding: 6px; width: 100%; color: var(--text); }
.preview img { width: 88px; height: 60px; object-fit: cover; flex: none; }
.preview div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.preview b { font-size: 13.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preview small { font-size: 12px; color: var(--text-dim); }
.dup-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; padding: 6px 10px 6px 6px; width: 100%; }
.dup-card img { width: 60px; height: 42px; object-fit: cover; flex: none; }
.dup-card span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.dup-card b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dup-card small { color: var(--text-dim); font-size: 12px; }
.dup-card:hover { border-color: var(--border-strong); }
.stay-hero { overflow: hidden; aspect-ratio: 16 / 7; margin-bottom: 14px; border: 1px solid var(--border); }
.stay-hero img { width: 100%; height: 100%; object-fit: cover; }
.facts-line { margin: -8px 0 14px; }
.chips-pick .chip { padding: 6px 11px; }

/* Меню «⋯» */
.menu { position: absolute; z-index: 120; min-width: 220px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); padding: 4px; display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; text-align: left; font-size: 13px; color: var(--text); }
.menu-item .icon { color: var(--text-dim); }
.menu-item:hover, .menu-item:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.menu-item:hover .icon { color: var(--accent); }
.menu-item.danger, .menu-item.danger .icon { color: var(--risk); }

/* Уведомления */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--surface-hi); color: var(--text); border: 1px solid var(--border-strong); border-left: 2px solid var(--success); padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: 13px;
  opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; max-width: calc(100vw - 32px); }
.toast .icon { color: var(--success); }
.toast.in { opacity: 1; transform: none; }
.toast-error { border-left-color: var(--risk); }
.toast-error .icon { color: var(--risk); }

/* Профиль */
.profile-top { display: flex; justify-content: center; margin: 4px 0 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--m); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.profile-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ── Вход ─────────────────────────────────────────────────────── */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: hidden; background: var(--sea-1); }
.login-map { position: absolute; inset: 0; display: grid; place-items: center; opacity: .7; }
.login-map svg { width: max(1200px, 110vw); height: auto; }
.login-map .map-city { pointer-events: none; }
.login-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border-strong); padding: 24px; box-shadow: var(--shadow-xl); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.login-brand .logo { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border-strong); color: var(--accent); }
.login-brand > span:last-child { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; line-height: 1.3; }
.login-brand small { font: 500 10px var(--font-mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; }
.login-title { font-size: 20px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; margin-bottom: 6px; }
.login-card > .muted { margin-bottom: 18px; font-size: 13.5px; }
.login-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.login-form .field { margin-bottom: 4px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; margin-bottom: 12px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border: 1px solid var(--border); background: var(--bg); font-size: 13px; transition: border-color 120ms, background 120ms; }
.who:hover { border-color: var(--accent); background: var(--accent-soft); }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.new-member { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.login-manage { margin-top: 16px; font-size: 12px; color: var(--text-dim); }
.login-manage summary { cursor: pointer; }
.login-manage .link-btn { margin: 8px 12px 0 0; }

/* ── Адаптивность ─────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .home-grid { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .prio-grid { grid-template-columns: 1fr; }
}

/* Планшет: панель скрывается, сверху — полоса с брендом */
@media (max-width: 1023px) {
  :root { --top-h: 52px; }
  .layout { display: block; }
  .sidebar { display: none; }
  .topbar { display: flex; }
  .view { padding: 20px 20px 80px; }
  .strip-scroll { margin: 0 -20px; padding: 0 20px 14px; }
  .hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .ov-grid { grid-template-columns: 1fr; }
  .ov-stay { grid-row: auto; }
}

/* Телефон: нижнее меню */
@media (max-width: 760px) {
  :root { --bottom-h: 60px; }
  .hide-sm { display: none; }
  .topbar { padding: 0 14px; }
  .view { padding: 16px 14px calc(var(--bottom-h) + 32px + env(safe-area-inset-bottom)); }
  .strip-scroll { margin: 0 -14px; padding: 0 14px 14px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom);
    background: var(--sidebar); border-top: 1px solid var(--border);
  }
  .bottomnav .nav-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; color: var(--text-dim); text-decoration: none; border: 0; background: none; border-top: 2px solid transparent; }
  .bottomnav .nav-link.on { color: var(--accent); border-top-color: var(--accent); }
  .bottomnav .nav-link em { position: absolute; top: 4px; left: calc(50% + 6px); font: normal 500 9.5px/14px var(--font-mono); padding: 0 4px; background: var(--risk); color: var(--on-accent); }
  .fab { align-self: center; justify-self: center; width: 44px; height: 44px; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
  #toasts { right: 12px; left: 12px; align-items: stretch; bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom)); }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hstat b { font-size: 20px; }
  .map-card { margin: 0 -14px; border-left: 0; border-right: 0; }
  .map-label { font-size: 30px; stroke-width: 7px; }
  .map-dot { r: 21px; stroke-width: 4; }
  .map-city:hover .map-dot { r: 23px; }
  .map-num { font-size: 20px; }
  .map-leg-icon { display: none; }
  .map-leg { stroke-width: 2.6; }
  .map-sub { display: none; }
  .block { margin-top: 24px; }
  .home-grid { margin-top: 24px; }
  .stop { padding: 12px; gap: 12px; }
  .stop-head h3 { font-size: 16px; }
  .stop-blurb, .stop-go { display: none; }
  .leg { margin-left: 25px; }
  .side { grid-template-columns: 1fr; }

  .city-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .city-hero-side { align-items: stretch; }
  .city-hero-side .btn-lg { width: 100%; }
  .city-prevnext { justify-content: space-between; }
  .tab { padding: 0 12px; }
  .grid-stay, .grid-act, .grid-food { grid-template-columns: 1fr; }
  .list-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { justify-content: space-between; }
  .bar-row { grid-template-columns: minmax(100px, 130px) minmax(0, 1fr) 26px; }
  .sum-grid { grid-template-columns: 1fr; }
  .pool { grid-template-columns: 1fr 1fr; }

  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { max-width: none !important; max-height: calc(100dvh - 24px); border-left: 0; border-right: 0; border-bottom: 0; transform: translateY(24px); }
  .modal-head { padding: 12px 10px 10px 16px; }
  .modal-body { padding: 14px 16px; }
  .modal-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .stepper button { padding: 8px 10px; }
  .tiles-kind { grid-template-columns: 1fr; }
  .tiles-kind .tile { flex-direction: row; align-items: center; gap: 12px; }
  .tiles-kind .tile-ic { margin: 0; flex: none; }
  .tiles-kind .tile b { min-width: 90px; }
  .tiles-type { grid-template-columns: 1fr 1fr; }
  .money-row { flex-direction: column; }
  .money-row .money-input { flex: none; }
  .money-row .seg { align-self: flex-start; }
  .field-narrow { max-width: none; }
  .login-card { padding: 20px; }
}

@media (max-width: 400px) {
  .pool, .tiles-type { grid-template-columns: 1fr; }
}
