:root {
  color-scheme: dark;
  --bg: #090d18;
  --surface: #111729;
  --surface-2: #171f34;
  --surface-3: #202940;
  --text: #f7f8fb;
  --muted: #939db3;
  --line: rgba(255, 255, 255, 0.09);
  --red: #ff4c5f;
  --red-strong: #e72e45;
  --lime: #b8f34a;
  --blue: #85b7ff;
  --amber: #ffc766;
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }

body {
  min-width: 320px;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 92% -10%, rgba(255, 76, 95, .12), transparent 34%),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, label, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

.tg-app { min-height: 100vh; max-width: 760px; margin: 0 auto; }

.tg-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(66px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 18px 10px;
  background: rgba(9, 13, 24, .88);
  border-bottom: 1px solid rgba(255,255,255,.055);
  backdrop-filter: blur(18px) saturate(150%);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.brand-lockup > span:last-child { min-width: 0; }

.brand-lockup strong { display: block; font-size: 16px; letter-spacing: -.02em; line-height: 1.05; }
.brand-lockup small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff6677, var(--red-strong));
  box-shadow: 0 8px 24px rgba(231, 46, 69, .25);
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 14px solid white;
  transform: rotate(-8deg);
}
.brand-mark::before { left: 5px; }
.brand-mark::after { right: 4px; bottom: 6px; border-left-width: 8px; border-right-width: 8px; border-bottom-width: 18px; opacity: .92; }
.brand-mark i { left: 12px; bottom: 5px; border-left-width: 5px; border-right-width: 5px; border-bottom-width: 10px; opacity: .55; }

.header-actions { display: flex; align-items: center; gap: 9px; }
.city-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d4d9e5;
  background: rgba(255,255,255,.035);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.city-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(184,243,74,.6); }
.city-chip b { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; }
.city-chip i { color: var(--muted); font-size: 10px; font-style: normal; }
.avatar-button { width: 34px; height: 34px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); }
.avatar-button img { width: 100%; height: 100%; object-fit: cover; }
.avatar-button span { font-size: 13px; font-weight: 800; }

.tg-main { padding: 0 16px calc(94px + var(--safe-bottom)); }
.mobile-location-panel { display: none; }
.app-view { display: none; animation: view-in .22s ease both; }
.app-view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.feed-intro { display: flex; align-items: flex-end; justify-content: space-between; padding: 30px 2px 22px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--red); font-size: 10px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(35px, 10vw, 50px); line-height: .94; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 24px; line-height: 1.05; letter-spacing: -.035em; }
h3 { margin-bottom: 6px; letter-spacing: -.025em; }
.round-add { width: 50px; height: 50px; border: 0; border-radius: 17px; background: var(--red); color: white; font-size: 31px; line-height: 1; box-shadow: 0 12px 28px rgba(231,46,69,.28); }

.search-box { position: relative; margin-bottom: 14px; }
.search-box svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; height: 52px; padding: 0 44px; border: 1px solid var(--line); border-radius: 17px; outline: 0; color: var(--text); background: var(--surface); }
.search-box input:focus { border-color: rgba(133,183,255,.48); box-shadow: 0 0 0 3px rgba(133,183,255,.09); }
.search-box input::placeholder { color: #6f788c; }

.filter-scroller { display: flex; gap: 8px; margin: 0 -16px 26px; padding: 0 16px 3px; overflow-x: auto; scrollbar-width: none; }
.filter-scroller::-webkit-scrollbar { display: none; }
.filter-scroller.with-grade-filter { margin-bottom: 9px; }
.grade-filter-scroller { margin-bottom: 26px; }
.filter-chip { flex: 0 0 auto; height: 36px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; }
.filter-chip.is-active { color: #0a0e18; border-color: var(--text); background: var(--text); }

.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; padding: 0 2px; }
.section-title-row .eyebrow { margin-bottom: 5px; color: var(--muted); }
.text-button { padding: 8px 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 750; }

.route-list { display: grid; gap: 13px; }
.route-card { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); width: 100%; min-height: 142px; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; background: var(--surface); box-shadow: 0 13px 32px rgba(0,0,0,.12); text-align: left; }
.route-card:active { transform: scale(.992); }
.route-photo { position: relative; min-height: 142px; background: linear-gradient(145deg, #27324c, #121827); overflow: hidden; }
.route-photo img { width: 100%; height: 100%; object-fit: cover; }
.route-photo-placeholder::before { content: ""; position: absolute; inset: 26px 41px 18px; border-radius: 40% 40% 15% 15%; border: 3px solid rgba(255,255,255,.2); transform: rotate(17deg); }
.route-photo-placeholder::after { content: ""; position: absolute; left: 47px; top: 35px; width: 16px; height: 16px; border-radius: 50%; background: var(--red); box-shadow: -17px 36px 0 -3px var(--lime), 13px 66px 0 -4px var(--blue); }
.route-grade { position: absolute; left: 9px; bottom: 9px; min-width: 42px; padding: 7px 9px; border-radius: 11px; color: #0b0e15; background: var(--lime); font-size: 14px; font-weight: 900; text-align: center; box-shadow: 0 5px 14px rgba(0,0,0,.25); }
.route-card-body { min-width: 0; padding: 15px 15px 13px; }
.route-location { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.route-card h3 { margin: 8px 0 5px; overflow: hidden; font-size: 18px; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.route-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 12px; color: #aab2c2; font-size: 11px; }
.route-meta span { display: inline-flex; align-items: center; gap: 4px; }
.route-meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--route-color, #8792a8); }
.route-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 8px; border-radius: 999px; color: #c3c9d6; background: rgba(255,255,255,.055); font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.status-badge.pending::before { background: var(--amber); }
.status-badge.disputed::before, .status-badge.archived::before { background: var(--red); }
.route-counts { color: #798397; font-size: 10px; white-space: nowrap; }

.route-skeleton { height: 142px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 20%, var(--surface-2) 40%, var(--surface) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }
.empty-state { padding: 38px 22px; border: 1px dashed rgba(255,255,255,.13); border-radius: var(--radius); text-align: center; color: var(--muted); background: rgba(255,255,255,.02); }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--text); font-size: 17px; }

.view-heading { padding: 32px 2px 24px; }
.view-heading h1 { margin-bottom: 13px; }
.view-heading p { max-width: 480px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.gym-grid { display: grid; gap: 13px; }
.gym-card { position: relative; width: 100%; min-height: 155px; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; background: linear-gradient(135deg, #1a2337, #111725); text-align: left; }
.gym-card.has-image { min-height: 190px; }
.gym-card-open { position: relative; width: 100%; min-height: inherit; display: flex; align-items: stretch; padding: 21px; border: 0; color: inherit; background: transparent; text-align: left; }
.gym-card.has-image .gym-card-open { align-items: flex-end; }
.gym-card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.gym-card.has-image::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 20%, rgba(8,12,22,.92)); }
.gym-card-content { position: relative; z-index: 1; width: 100%; }
.gym-card h3 { margin: 0 0 7px; font-size: 23px; }
.gym-card p { margin: 0; color: #adb5c5; font-size: 12px; }
.gym-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.gym-card-count { color: var(--lime); font-size: 12px; font-weight: 800; }
.gym-card-arrow { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.1); }
.gym-favorite { position: absolute; z-index: 4; top: 13px; right: 13px; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; color: #d9dfeb; background: rgba(9,13,24,.78); font-size: 21px; line-height: 1; backdrop-filter: blur(10px); }
.gym-favorite.is-active { color: var(--amber); border-color: rgba(255,199,102,.35); background: rgba(45,35,15,.84); }
.wide-outline-button { width: 100%; margin-top: 14px; padding: 16px; border: 1px dashed rgba(255,255,255,.18); border-radius: 17px; color: var(--muted); background: transparent; font-weight: 750; }

.add-heading { padding-bottom: 20px; }
.route-form { display: grid; gap: 13px; }
.photo-field { position: relative; min-height: 205px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 24px; border: 1px dashed rgba(133,183,255,.38); border-radius: var(--radius); color: var(--text); background: linear-gradient(145deg, rgba(133,183,255,.075), rgba(255,76,95,.04)); text-align: center; }
.photo-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-field-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 13px; border-radius: 17px; color: var(--blue); background: rgba(133,183,255,.12); font-size: 28px; transform: rotate(-25deg); }
.photo-field strong { font-size: 16px; }
.photo-field small { max-width: 260px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.photo-field img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; }
.photo-field.has-preview img { opacity: 1; }
.photo-field.has-preview::after { content: "Заменить фото"; position: absolute; right: 12px; bottom: 12px; padding: 8px 11px; border-radius: 10px; color: white; background: rgba(5,8,15,.78); font-size: 10px; font-weight: 800; backdrop-filter: blur(8px); }
.field-grid { display: grid; gap: 11px; }
.two-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form-field { display: grid; gap: 7px; }
.form-field > span { padding-left: 3px; color: #c5cad5; font-size: 11px; font-weight: 750; }
.form-field > span i { color: #6e778b; font-style: normal; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--text); background: var(--surface); }
.form-field textarea { min-height: 86px; padding-top: 13px; resize: vertical; }
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8490a6 50%), linear-gradient(135deg, #8490a6 50%, transparent 50%); background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: rgba(133,183,255,.48); box-shadow: 0 0 0 3px rgba(133,183,255,.08); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #606a7e; }
.form-note { padding: 13px 15px; border-radius: 14px; color: #a5aec0; background: rgba(255,199,102,.07); font-size: 11px; line-height: 1.45; }
.inline-suggestion { width: 100%; min-height: 40px; margin-top: -3px; border: 1px dashed rgba(133,183,255,.32); border-radius: 13px; color: var(--blue); background: rgba(133,183,255,.06); font-size: 11px; font-weight: 800; }
.primary-button { width: 100%; min-height: 52px; padding: 0 20px; border: 0; border-radius: 16px; color: white; background: linear-gradient(135deg, #ff576a, var(--red-strong)); font-weight: 850; box-shadow: 0 12px 28px rgba(231,46,69,.2); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.auth-inline { padding: 18px; border: 1px solid rgba(255,199,102,.22); border-radius: var(--radius); background: rgba(255,199,102,.07); }
.auth-inline p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

.mini-stats, .profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 16px; }
.stat-card { padding: 15px 10px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-align: center; }
.stat-card strong { display: block; font-size: 23px; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.segmented-control { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 15px; background: var(--surface); }
.segmented-control button { min-width: 0; padding: 10px 4px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; }
.segmented-control button.is-active { color: var(--text); background: var(--surface-3); }
.mine-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 24px 2px 13px; }
.mine-section-heading .eyebrow { margin-bottom: 5px; color: var(--muted); }
.mine-routes-heading { margin-top: 30px; }
.mine-gym-list { display: grid; gap: 10px; }
.mine-gym-list .empty-state { padding-top: 27px; padding-bottom: 27px; }
.gym-card.is-compact { min-height: 124px; }
.gym-card.is-compact .gym-card-open { min-height: 124px; padding: 17px; }
.gym-card.is-compact h3 { max-width: calc(100% - 44px); font-size: 19px; }
.gym-card.is-compact p { display: none; }
.gym-card.is-compact .gym-card-footer { margin-top: 15px; }

.profile-hero { display: flex; align-items: center; gap: 17px; padding: 34px 2px 24px; }
.profile-avatar { flex: 0 0 auto; width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border: 2px solid rgba(255,255,255,.14); border-radius: 24px; background: linear-gradient(145deg, #303b57, #151b2c); font-size: 24px; font-weight: 850; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero h1 { margin: 0 0 7px; font-size: 27px; line-height: 1; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.profile-hero .eyebrow { margin-bottom: 7px; }
.settings-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-card button { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 53px; padding: 0 17px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 13px; text-align: left; }
.settings-card button:last-child { border-bottom: 0; }
.settings-card b { color: var(--muted); }
.settings-card .danger-setting span { color: #f196a2; }
.independent-note { margin-top: 14px; padding: 17px; border-radius: 18px; color: #c1c7d4; background: rgba(255,255,255,.035); }
.independent-note strong { font-size: 12px; }
.independent-note p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.independent-note a { color: var(--blue); }
.dev-login, .web-login { width: 100%; display: block; margin-top: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: transparent; font-size: 11px; text-align: center; text-decoration: none; }

.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 35; width: min(100%, 760px); display: grid; grid-template-columns: repeat(5, 1fr); min-height: calc(70px + var(--safe-bottom)); padding: 7px 8px var(--safe-bottom); border-top: 1px solid rgba(255,255,255,.08); background: rgba(12,17,29,.93); transform: translateX(-50%); backdrop-filter: blur(18px) saturate(160%); }
.bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; color: #707a8e; background: transparent; }
.bottom-nav button > span { font-size: 21px; line-height: 1; }
.bottom-nav small { font-size: 8px; font-weight: 800; }
.bottom-nav button.is-active { color: var(--text); }
.bottom-nav button.is-active::before { content: ""; position: absolute; top: -7px; width: 24px; height: 2px; border-radius: 2px; background: var(--red); }
.bottom-nav .nav-add > span { width: 40px; height: 40px; display: grid; place-items: center; margin-top: -22px; border: 4px solid #0c111d; border-radius: 15px; color: white; background: var(--red); font-size: 28px; box-shadow: 0 8px 22px rgba(231,46,69,.3); }
.bottom-nav .nav-add::before { display: none; }

.sheet-backdrop, .modal-backdrop { position: fixed; inset: 0; z-index: 60; visibility: hidden; opacity: 0; background: rgba(2,5,12,.68); transition: .2s ease; backdrop-filter: blur(3px); }
.sheet-backdrop.is-open, .modal-backdrop.is-open { visibility: visible; opacity: 1; }
.bottom-sheet { position: fixed; left: 50%; bottom: 0; z-index: 65; width: min(100%, 760px); max-height: 92vh; overflow-y: auto; padding: 11px 16px calc(24px + var(--safe-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: #0e1423; transform: translate(-50%, 105%); transition: transform .3s cubic-bezier(.2,.75,.2,1); box-shadow: 0 -20px 60px rgba(0,0,0,.35); }
.bottom-sheet.is-open { transform: translate(-50%, 0); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 12px; border-radius: 3px; background: #3b455a; }
.sheet-close, .dialog-close { position: absolute; z-index: 3; right: 15px; top: 17px; width: 34px; height: 34px; border: 0; border-radius: 12px; color: #c3c9d5; background: rgba(7,10,18,.72); font-size: 21px; }
.route-detail-photo { position: relative; height: min(49vh, 420px); margin: 0 -5px 20px; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.route-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.route-detail-grade { position: absolute; left: 14px; bottom: 14px; min-width: 58px; padding: 10px 13px; border-radius: 14px; color: #0a0d13; background: var(--lime); font-size: 21px; font-weight: 950; text-align: center; }
.route-detail-status { position: absolute; top: 14px; left: 14px; }
.route-detail h2 { margin: 0 44px 8px 0; font-size: 30px; }
.route-detail-location { margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 17px; }
.detail-fact { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.detail-fact small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.detail-fact strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.detail-description { margin: 0 0 18px; color: #c0c6d2; font-size: 13px; line-height: 1.55; }
.route-state-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 14px; }
.state-button { min-height: 46px; padding: 7px 4px; border: 1px solid var(--line); border-radius: 14px; color: #adb5c5; background: var(--surface); font-size: 11px; font-weight: 800; }
.state-button.is-active { color: #090d15; border-color: var(--lime); background: var(--lime); }
.community-panel { margin-bottom: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.community-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.community-panel-head strong { font-size: 12px; }
.community-panel-head small { color: var(--muted); font-size: 10px; }
.grade-vote-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.grade-vote-row select { min-width: 0; height: 43px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-2); }
.grade-vote-row button, .confirm-button { min-height: 43px; padding: 0 14px; border: 0; border-radius: 12px; color: #0b0e15; background: var(--blue); font-size: 11px; font-weight: 850; }
.confirm-button { width: 100%; color: var(--text); border: 1px solid var(--line); background: var(--surface-2); }
.confirm-button.is-done { color: #0b0e15; background: var(--lime); }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-actions button, .detail-actions a { min-height: 48px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); font-size: 11px; font-weight: 800; text-decoration: none; }
.detail-actions .discussion-button { border-color: rgba(133,183,255,.25); background: rgba(133,183,255,.1); }
.detail-actions .report-button { color: #f1a0aa; }

.dialog { position: fixed; left: 50%; top: 50%; z-index: 75; visibility: hidden; width: min(calc(100% - 28px), 500px); max-height: 88vh; overflow-y: auto; padding: 24px 18px 20px; border: 1px solid var(--line); border-radius: 25px; opacity: 0; background: #111827; transform: translate(-50%, -46%) scale(.98); transition: .2s ease; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.dialog.is-open { visibility: visible; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dialog h2 { margin: 0 42px 18px 0; font-size: 25px; }
.dialog form { display: grid; gap: 9px; }
.dialog-context { margin: -8px 0 16px; color: var(--muted); font-size: 11px; }
.city-search-field { margin-bottom: 12px; }
.city-option-list { display: grid; gap: 7px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.city-option { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 57px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.025); text-align: left; }
.city-option span { display: grid; gap: 4px; }
.city-option strong { font-size: 13px; }
.city-option small { color: var(--muted); font-size: 9px; }
.city-option b { color: var(--muted); }
.city-option.is-active { border-color: rgba(184,243,74,.42); background: rgba(184,243,74,.07); }
.radio-card { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.radio-card:has(input:checked) { border-color: rgba(255,76,95,.55); background: rgba(255,76,95,.08); }
.radio-card input { accent-color: var(--red); }
.radio-card span { display: grid; gap: 3px; }
.radio-card b { font-size: 12px; }
.radio-card small { color: var(--muted); font-size: 9px; }
.consent-dialog > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 8px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: #c8cfdb; background: rgba(255,255,255,.025); font-size: 11px; line-height: 1.45; }
.consent-check input { margin-top: 2px; accent-color: var(--red); }
.consent-check a { color: var(--blue); }
.consent-later { min-height: 42px; border: 0; color: var(--muted); background: transparent; font-size: 11px; }

.moderation-heading { position: relative; padding-left: 46px; }
.back-button { position: absolute; left: 0; top: 36px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.moderation-list { display: grid; gap: 12px; }
.moderation-card { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.moderation-card h3 { margin: 0 0 5px; font-size: 16px; }
.moderation-card p { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.moderation-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.moderation-meta span { padding: 5px 8px; border-radius: 8px; color: #cbd1dc; background: var(--surface-3); font-size: 9px; }
.moderation-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.moderation-actions button { min-height: 39px; padding: 0 7px; border: 1px solid var(--line); border-radius: 11px; color: #cbd1dc; background: var(--surface-2); font-size: 9px; font-weight: 800; }
.moderation-actions .approve { color: #0a0e13; border: 0; background: var(--lime); }
.moderation-actions .danger { color: #ff9eaa; }

.toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-bottom)); z-index: 100; visibility: hidden; max-width: min(88%, 420px); padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; opacity: 0; color: white; background: rgba(30,39,60,.96); transform: translate(-50%, 12px); transition: .2s ease; box-shadow: 0 14px 34px rgba(0,0,0,.35); font-size: 11px; font-weight: 750; text-align: center; }
.toast.is-visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: rgba(120,28,43,.96); }

body.sheet-open, body.dialog-open { overflow: hidden; }

@media (min-width: 620px) {
  .tg-main { padding-left: 24px; padding-right: 24px; }
  .filter-scroller { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .route-list { grid-template-columns: 1fr 1fr; }
  .gym-grid { grid-template-columns: 1fr 1fr; }
  .route-card { grid-template-columns: 126px minmax(0, 1fr); }
}

@media (max-width: 619px) {
  .tg-header .city-chip { display: none; }
  .brand-lockup small { max-width: clamp(120px, 48vw, 205px); overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-location-panel { display: grid; gap: 7px; margin: 12px 0 0; }
  .mobile-city-button, .mobile-resume-gym { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 12px; border: 1px solid rgba(133,183,255,.25); border-radius: 17px; color: var(--text); background: linear-gradient(135deg, rgba(133,183,255,.11), rgba(255,255,255,.025)); text-align: left; }
  .mobile-location-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: rgba(133,183,255,.13); font-size: 22px; }
  .mobile-location-copy, .mobile-resume-gym > span { min-width: 0; display: grid; gap: 3px; }
  .mobile-location-copy small, .mobile-resume-gym small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-location-copy strong, .mobile-resume-gym strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-city-button > b { margin-left: auto; color: var(--blue); font-size: 10px; }
  .mobile-resume-gym { min-height: 48px; padding-left: 14px; border-color: var(--line); background: rgba(255,255,255,.025); }
  .mobile-resume-gym > span { flex: 1; }
  .mobile-resume-gym > b { color: var(--lime); font-size: 18px; }
  .feed-intro { padding-top: 24px; }
}

@media (max-width: 370px) {
  .route-card { grid-template-columns: 100px minmax(0, 1fr); }
  .route-card-body { padding-left: 12px; padding-right: 11px; }
  .route-counts { display: none; }
  .two-columns { grid-template-columns: 1fr; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
