/* Расписание автобусов (/avtobusy/) */
#tema-portal .tb-main{padding-bottom:20px}
#tema-portal .tb-main h1>span,#tema-portal .tb-about h2>span{color:var(--accent)}
#tema-portal .tb-preview-note{margin:16px 0 0;padding:10px 14px;border-radius:10px;background:#fff4e5;color:#8a4b00;font-size:13px}
#tema-portal .tb-app{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#fff}
#tema-portal .tb-bar{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
#tema-portal .tb-live{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
#tema-portal .tb-live:before{content:"";width:9px;height:9px;border-radius:50%;background:#22a447;box-shadow:0 0 0 0 rgba(34,164,71,.6);animation:tb-pulse 1.6s infinite}
@keyframes tb-pulse{70%{box-shadow:0 0 0 8px rgba(34,164,71,0)}100%{box-shadow:0 0 0 0 rgba(34,164,71,0)}}
#tema-portal .tb-clock{margin-left:auto;font-size:13px;color:#76716a}
#tema-portal .tb-clock strong{font-size:18px;color:#1c1b19;font-variant-numeric:tabular-nums}
#tema-portal .tb-chips{display:flex;gap:6px;padding:10px 16px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line);background:#fbfaf7}
#tema-portal .tb-chips::-webkit-scrollbar{display:none}
#tema-portal .tb-chip{flex:none;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:3px;font:600 13px/1 inherit;cursor:pointer;color:#1c1b19}
#tema-portal .tb-chip small{color:#76716a;font-weight:500;padding-right:8px}
#tema-portal .tb-chip-all{padding:8px 14px}
#tema-portal .tb-chip.is-on{border-color:#1c1b19;box-shadow:inset 0 0 0 1px #1c1b19}
#tema-portal .tb-chip.is-off{opacity:.45}
#tema-portal .tb-num{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:14px;color:#fff;font-size:12px;font-weight:700;line-height:1;vertical-align:middle}
#tema-portal .tb-stage{position:relative;height:min(72vh,680px);min-height:440px}
#tema-portal .tb-map{position:absolute;inset:0;background:#e9e6df;font:inherit}
#tema-portal .tb-map .leaflet-tile-pane{filter:saturate(.3) brightness(1.04) contrast(.92)}
#tema-portal .tb-busicon{display:grid;place-items:center;border-radius:50%;color:#fff;font:800 11px/1 system-ui,sans-serif;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.35);transition:transform .2s}
#tema-portal .tb-busicon.is-sel{transform:scale(1.35)}
#tema-portal .tb-timebar{position:absolute;z-index:500;left:12px;bottom:14px;display:flex;align-items:center;gap:10px;background:#fff;border-radius:14px;box-shadow:0 6px 24px rgba(0,0,0,.15);padding:8px 12px;width:min(500px,calc(100% - 390px))}
#tema-portal .tb-timebar input{flex:1;min-width:0;accent-color:var(--accent)}
#tema-portal .tb-timebar button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 11px;font:600 12px/1 inherit;cursor:pointer;white-space:nowrap;color:#1c1b19}
#tema-portal .tb-timebar button.is-on{background:#1c1b19;color:#fff;border-color:#1c1b19}
#tema-portal .tb-timebar output{font-weight:700;font-size:14px;font-variant-numeric:tabular-nums;width:44px}
#tema-portal .tb-panel{position:absolute;z-index:1000;top:12px;right:12px;width:350px;max-height:calc(100% - 24px);overflow:auto;background:#fff;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.15);padding:16px}
#tema-portal .tb-panel h2{font-size:19px!important;line-height:1.25!important;margin:0 34px 3px 0}
#tema-portal .tb-sub{color:#76716a;font-size:13px;margin-bottom:12px}
#tema-portal .tb-x{position:absolute;top:10px;right:10px;border:0;background:#f1eee8;width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:19px;line-height:1;color:#1c1b19}
#tema-portal .tb-stat{display:flex;gap:8px;margin:10px 0 12px}
#tema-portal .tb-stat div{flex:1;background:#f6f3ee;border-radius:12px;padding:10px;font-size:12px;color:#76716a}
#tema-portal .tb-stat b{display:block;font-size:21px;color:#1c1b19}
#tema-portal .tb-hint{color:#76716a;font-size:13px}
#tema-portal .tb-dep{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;width:100%;padding:9px 0;border:0;border-top:1px solid var(--line);background:none;text-align:left;cursor:pointer;font:inherit;color:#1c1b19}
#tema-portal .tb-dep:hover .tb-to{color:var(--accent)}
#tema-portal .tb-dep .tb-num{border-radius:8px}
#tema-portal .tb-to{font-weight:600;font-size:14px}
#tema-portal .tb-to small,#tema-portal .tb-in small{display:block;color:#76716a;font-weight:400;font-size:12px}
#tema-portal .tb-in{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
#tema-portal .tb-in.is-soon{color:#22a447}
#tema-portal .tb-stops{list-style:none;margin:0;padding:0 0 0 4px;position:relative}
#tema-portal .tb-stops:before{content:"";position:absolute;left:9px;top:14px;bottom:14px;width:4px;border-radius:2px;background:var(--c)}
#tema-portal .tb-stops li{position:relative;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 0 5px 24px;margin:0;font-size:14px}
#tema-portal .tb-stops li:before{content:"";position:absolute;left:0;top:50%;margin-top:-8px;width:10px;height:10px;border-radius:50%;background:#fff;border:3px solid var(--c)}
#tema-portal .tb-stops li button{border:0;background:none;padding:0;font:inherit;color:inherit;text-align:left;cursor:pointer}
#tema-portal .tb-stops li button:hover{color:var(--accent)}
#tema-portal .tb-stops li span{font-variant-numeric:tabular-nums;color:#76716a;font-size:13px}
#tema-portal .tb-stops li.is-past{color:#aaa}
#tema-portal .tb-stops li.is-past:before{border-color:#ccc}
#tema-portal .tb-stops li.is-bus{font-weight:700}
#tema-portal .tb-stops li.is-bus:before{background:var(--c);transform:scale(1.3)}
#tema-portal .tb-about{margin-top:34px;max-width:760px}
#tema-portal .tb-about h2{font-size:27px!important;margin-bottom:12px}
#tema-portal .tb-about ul{margin:0 0 14px;padding-left:20px;line-height:1.6}
#tema-portal .tb-about li{margin:4px 0}
#tema-portal .tb-muted{color:#76716a;font-size:13px;line-height:1.6}
@media(max-width:680px){
  #tema-portal .tb-app{border-radius:14px;margin:0 -4px}
  #tema-portal .tb-bar{padding:10px 12px}
  #tema-portal .tb-clock span{display:none}
  #tema-portal .tb-chips{padding:8px 12px}
  #tema-portal .tb-stage{height:76vh;min-height:520px}
  #tema-portal .tb-map .leaflet-control-zoom{display:none}
  #tema-portal .tb-timebar{left:8px;right:8px;width:auto;bottom:auto;top:8px;padding:6px 10px}
  #tema-portal .tb-panel{top:auto;bottom:0;left:0;right:0;width:auto;max-height:50%;border-radius:18px 18px 0 0;padding:14px 16px 18px}
  #tema-portal .tb-panel.is-intro .tb-stat{display:none}
}
#tema-portal .tb-others{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:-2px 0 12px;font-size:12px;color:#76716a}
#tema-portal .tb-others button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 10px;font:600 12px/1.2 inherit;color:#1c1b19;cursor:pointer}
#tema-portal .tb-others button.is-on{background:#1c1b19;border-color:#1c1b19;color:#fff}
#tema-portal .tb-head{position:sticky;top:-16px;z-index:2;background:#fff;margin:-16px -16px 6px;padding:16px 16px 4px;border-bottom:1px solid var(--line)}
#tema-portal .tb-head .tb-x{top:10px;right:10px}
#tema-portal .tb-head .tb-others{margin-bottom:8px}
@media(max-width:680px){#tema-portal .tb-head{top:-14px;margin:-14px -16px 6px;padding:14px 16px 4px}}
/* Classic timetable under the map */
#tema-portal .tb-tt{margin-top:34px;scroll-margin-top:70px}
#tema-portal .tb-tt-head h2{font-size:27px!important}
#tema-portal .tb-tt-head h2>span{color:var(--accent)}
#tema-portal .tb-tt-head p{margin-top:4px}
#tema-portal .tb-tt-lines{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0}
#tema-portal .tb-tt-route{display:flex;align-items:center;gap:12px;margin-bottom:14px}
#tema-portal .tb-tt-route .tb-num{min-width:40px;height:40px;border-radius:12px;font-size:16px}
#tema-portal .tb-tt-route b{display:block;font-size:17px}
#tema-portal .tb-tt-route small{display:block;color:#76716a;font-size:13px}
#tema-portal .tb-tt-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-bottom:14px}
#tema-portal .tb-tt-stop{display:flex;flex-direction:column;gap:4px;flex:1 1 260px;max-width:380px;font-size:12px;color:#76716a}
#tema-portal .tb-tt-stop select{appearance:none;border:1px solid var(--line);border-radius:12px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23df7411' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/18px no-repeat;padding:12px 40px 12px 14px;font:600 15px/1.2 inherit;color:#1c1b19;cursor:pointer}
#tema-portal .tb-tt-days{display:inline-flex;background:#efebe4;border-radius:14px;padding:4px;gap:2px}
#tema-portal .tb-tt-days button{border:0;background:none;border-radius:10px;padding:7px 14px;font:600 14px/1.2 inherit;color:#1c1b19;cursor:pointer;text-align:center}
#tema-portal .tb-tt-days button small{display:block;font-weight:400;font-size:11px;color:#76716a}
#tema-portal .tb-tt-days button.is-on{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.12)}
#tema-portal .tb-tt-next{margin:0 0 14px;padding:10px 14px;border-radius:12px;background:#eaf6ee;color:#1e6b35;font-size:14px}
#tema-portal .tb-tt-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}
#tema-portal .tb-tt-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px 18px}
#tema-portal .tb-tt-card h3{font-size:17px!important;margin:0 0 10px}
#tema-portal .tb-tt-card dl{margin:0}
#tema-portal .tb-tt-row{display:grid;grid-template-columns:44px 1fr;align-items:start;padding:6px 0;border-top:1px solid #f1eee8}
#tema-portal .tb-tt-row dt{font-weight:800;font-size:17px;font-variant-numeric:tabular-nums;line-height:28px}
#tema-portal .tb-tt-row dd{margin:0;display:flex;flex-wrap:wrap;gap:4px}
#tema-portal .tb-tt-row dd span{min-width:34px;height:28px;display:grid;place-items:center;border-radius:8px;background:#f6f3ee;font-weight:600;font-size:14px;font-variant-numeric:tabular-nums}
#tema-portal .tb-tt-row dd span.is-past{background:none;color:#bbb}
#tema-portal .tb-tt-row dd span.is-next{background:var(--accent);color:#fff;box-shadow:0 2px 8px rgba(223,116,17,.4)}
#tema-portal .tb-tt-row.is-past dt{color:#bbb}
#tema-portal .tb-tt-empty{padding:18px;border-radius:14px;background:#f6f3ee;color:#76716a}
#tema-portal .tb-tt-link{display:block;border:0;background:none;padding:0;margin:-6px 0 8px;color:var(--accent);font:600 13px/1.4 inherit;cursor:pointer}
@media(max-width:680px){#tema-portal .tb-tt-days{width:100%}#tema-portal .tb-tt-days button{flex:1;padding:7px 6px}#tema-portal .tb-tt-stop{max-width:none}#tema-portal .tb-tt-cards{grid-template-columns:1fr}}
#tema-portal .tb-tt-stop select{font-size:15px!important;font-weight:600!important;font-family:inherit!important;height:auto!important;line-height:1.2!important}
#tema-portal .tb-tt-fold{display:block;width:100%;border:1px dashed var(--line);background:#fbfaf7;border-radius:10px;padding:8px;margin:0 0 6px;font:600 13px/1.2 inherit;color:#76716a;cursor:pointer}
#tema-portal .tb-tt-fold:hover{color:var(--accent);border-color:var(--accent)}
/* Stop pickers inside each direction card */
#tema-portal .tb-tt-pick{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px}
#tema-portal .tb-tt-pick label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#76716a;min-width:0}
#tema-portal .tb-tt-pick label i{font-style:normal;color:#aaa}
#tema-portal .tb-tt-pick select{appearance:none;width:100%;border:1px solid var(--line);border-radius:12px;background:#fbfaf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23df7411' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat;padding:10px 32px 10px 12px;font:600 14px/1.2 inherit!important;height:auto!important;color:#1c1b19;cursor:pointer;text-overflow:ellipsis}
#tema-portal .tb-tt-pick select:focus{outline:2px solid var(--accent);outline-offset:1px}
#tema-portal .tb-tt-card .tb-tt-next{margin:0 0 10px;padding:8px 12px;font-size:13px}
#tema-portal .tb-tt-trips{list-style:none;margin:0;padding:0}
#tema-portal .tb-tt-trips li{display:flex;align-items:baseline;gap:8px;padding:8px 10px;margin:0;border-top:1px solid #f1eee8;font-variant-numeric:tabular-nums}
#tema-portal .tb-tt-trips li b{font-size:17px}
#tema-portal .tb-tt-trips li small{margin-left:auto;color:#76716a;font-size:12px}
#tema-portal .tb-tt-arrow{color:var(--accent);font-weight:700}
#tema-portal .tb-tt-trips li.is-past{color:#bbb}
#tema-portal .tb-tt-trips li.is-next{background:#fff3e6;border-radius:10px;border-top-color:transparent}
#tema-portal .tb-tt-trips li.is-next b:first-child{color:var(--accent)}
@media(max-width:680px){#tema-portal .tb-tt-pick{grid-template-columns:1fr}}
/* Keep the map's own layers (panel, Leaflet panes) below the sticky site menu */
#tema-portal .tb-app{position:relative;isolation:isolate;z-index:0}
/* Line table (stops × trips) */
#tema-portal .tb-lt{margin-top:40px}
#tema-portal .tb-lt-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:14px}
#tema-portal .tb-lt-dirs{display:flex;flex-wrap:wrap;gap:6px}
#tema-portal .tb-lt-dirs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;font:600 13px/1.2 inherit;color:#1c1b19;cursor:pointer}
#tema-portal .tb-lt-dirs button.is-on{background:#1c1b19;border-color:#1c1b19;color:#fff}
#tema-portal .tb-lt-scroll{overflow:auto;max-height:78vh;border:1px solid var(--line);border-radius:16px;background:#fff;overscroll-behavior-x:contain}
#tema-portal .tb-lt-table{border-collapse:separate;border-spacing:0;font-size:13px;font-variant-numeric:tabular-nums;width:max-content;margin:0}
#tema-portal .tb-lt-table th,#tema-portal .tb-lt-table td{padding:6px 8px;border:0;border-bottom:1px solid #f1eee8;text-align:center;white-space:nowrap;background:#fff}
#tema-portal .tb-lt-table tbody th{position:sticky;left:0;z-index:2;text-align:left;font-weight:600;min-width:150px;max-width:190px;overflow:hidden;text-overflow:ellipsis;border-right:1px solid var(--line);box-shadow:4px 0 8px -6px rgba(0,0,0,.15)}
#tema-portal .tb-lt-table thead th{position:sticky;top:0;z-index:1;height:30px;font-size:11px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:.02em;border-bottom:1px solid var(--line)}
#tema-portal .tb-lt-table thead th:first-child{left:0;z-index:3;text-align:left;color:#76716a;text-transform:none;font-size:12px;border-right:1px solid var(--line)}
#tema-portal .tb-lt-table td.is-odd{background:#fbfaf7}
#tema-portal .tb-lt-table td.is-past{color:#c4c0b8}
#tema-portal .tb-lt-table td.is-run,#tema-portal .tb-lt-table th.is-run{background:#eaf6ee;color:#1e6b35;font-weight:700}
#tema-portal .tb-lt-table td.is-next,#tema-portal .tb-lt-table th.is-next{background:#fff3e6;font-weight:700}
#tema-portal .tb-lt-table th.is-run{color:#1e6b35}
#tema-portal .tb-lt-table tbody tr:hover th,#tema-portal .tb-lt-table tbody tr:hover td{background:#fdf1e4}
#tema-portal .tb-lt-no{color:#d6d2ca}
#tema-portal .tb-lt-table sup{color:#76716a;font-size:10px}
#tema-portal .tb-lt-note{margin-top:8px}
@media(max-width:680px){#tema-portal .tb-lt-table tbody th{min-width:118px;max-width:130px;font-size:12px}#tema-portal .tb-lt-scroll{max-height:70vh;border-radius:12px}}
/* "Обратно" button in the corner of a direction card */
#tema-portal .tb-tt-card{position:relative;transition:box-shadow .3s,border-color .3s}
#tema-portal .tb-tt-card.is-flash{border-color:var(--accent);box-shadow:0 0 0 3px rgba(223,116,17,.25)}
#tema-portal .tb-tt-card h3{padding-right:110px}
#tema-portal .tb-tt-swap{position:absolute;top:12px;right:12px;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 12px 7px 9px;font:600 13px/1 inherit;color:#1c1b19;cursor:pointer;transition:background .15s,border-color .15s}
#tema-portal .tb-tt-swap svg{width:18px;height:18px;fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s}
#tema-portal .tb-tt-swap:not(:disabled):hover{border-color:var(--accent)}
#tema-portal .tb-tt-swap:not(:disabled):hover svg{transform:rotate(180deg)}
#tema-portal .tb-tt-swap:disabled{opacity:.4;cursor:default}
#tema-portal .tb-tt-noback{margin:0 0 10px;padding:8px 12px;border-radius:10px;background:#fff4e5;color:#8a4b00;font-size:13px}
/* Text part for search engines and readers: crumbs, line list, per-line summary */
#tema-portal .tb-crumbs{margin-top:18px;font-size:13px;color:#76716a}
#tema-portal .tb-crumbs a{color:#76716a}
#tema-portal .tb-crumbs a:hover{color:var(--accent)}
#tema-portal .tb-seo{margin-top:40px}
#tema-portal .tb-seo h2{font-size:27px!important;margin:0 0 14px}
#tema-portal .tb-seo h2>span{color:var(--accent)}
#tema-portal .tb-seo-lines{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px;margin-bottom:14px}
#tema-portal .tb-seo-line{display:flex;gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;color:#1c1b19;text-decoration:none;transition:border-color .15s}
#tema-portal .tb-seo-line:hover{border-color:var(--accent)}
#tema-portal .tb-seo-line .tb-num{min-width:38px;height:38px;border-radius:11px;font-size:15px;flex:none}
#tema-portal .tb-seo-line b{display:block;font-size:14px;line-height:1.3}
#tema-portal .tb-seo-line small{display:block;color:#76716a;font-size:12px;margin-top:2px}
#tema-portal .tb-seo-days{border-collapse:collapse;margin:0 0 12px;min-width:min(480px,100%);background:#fff;border-radius:14px;overflow:hidden;border:1px solid var(--line)}
#tema-portal .tb-seo-days th,#tema-portal .tb-seo-days td{padding:10px 14px;border-bottom:1px solid #f1eee8;text-align:left;font-variant-numeric:tabular-nums}
#tema-portal .tb-seo-days thead th{font-size:12px;color:#76716a;font-weight:600}
#tema-portal .tb-seo-stops{columns:3 200px;margin:0;padding-left:22px;line-height:1.8}
#tema-portal .tb-tt-pick{align-items:end}
#tema-portal .tb-tt-pick label span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tema-portal .tb-seo .tb-muted+h2{margin-top:32px}
