/* SPDX-License-Identifier: GPL-3.0-or-later · Trenalia */
/* /simulacion: «Máquina del tiempo» en el mapa (sprints 064 y 065: paso a paso y tres capas). Colores de styles.css; el lienzo lo pinta simulacion-map.js */
.sim-tm { scroll-margin-top: 70px; --tm-obs: #7a3fd1; }
:root[data-theme="dark"] .sim-tm { --tm-obs: #c9a5ff; }
.sim-tm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.sim-tm-head .sim-h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.sim-tm-ico { width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; }
.sim-tm-sub { margin: 4px 0 10px; }
.sim-tm-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); }
.sim-tm-map { width: 100%; height: max(330px, 55vh); background: var(--map-bg); }
@media (min-width: 760px) { .sim-tm-map { height: max(470px, 62vh); } }
.sim-tm-map.is-over { cursor: pointer; }
.sim-tm-map .leaflet-container, .sim-tm-map.leaflet-container { font: 12px var(--sans); background: var(--map-bg); }
.sim-tm-canvas { position: absolute; left: 0; top: 0; z-index: 450; pointer-events: none; }
.sim-tm-map .leaflet-control-attribution { background: var(--glass); color: var(--muted); font-size: 10.5px; }
.sim-tm-map .leaflet-control-attribution a { color: var(--blue); }
.sim-tm-map .leaflet-bar a { background: var(--panel); color: var(--text); border-color: var(--line); }
.sim-tm-load { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 14px; z-index: 460; pointer-events: none; }
/* Reloj grande sobre el mapa */
.sim-tm-clock { position: absolute; z-index: 600; right: 10px; top: 10px; display: grid; justify-items: end; gap: 0; padding: 6px 12px 7px; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--line); box-shadow: 0 2px 10px var(--shadow); pointer-events: none; }
.sim-tm-clock b { font: 800 30px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sim-tm-clock small { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sim-tm.is-playing .sim-tm-clock b { color: var(--blue); }
/* Ficha del tren elegido */
.sim-tm-card { position: absolute; z-index: 650; left: 10px; bottom: 26px; width: min(300px, calc(100% - 20px)); padding: 10px 12px; border-radius: 14px; background: var(--modal-bg); border: 1px solid var(--line); box-shadow: 0 6px 22px var(--shadow); font-size: 13px; display: grid; gap: 6px; }
.sim-tm-card-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sim-tm-card-h b { font-size: 17px; }
.sim-tm-card-h > span:not(.sim-bd) { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sim-tm-card-h .sim-x { width: 30px; height: 30px; font-size: 18px; flex: none; }
.sim-tm-card-d { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.sim-tm-card-d.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px; }
.sim-tm-card-d .d { display: grid; gap: 1px; min-width: 0; padding: 6px 8px; border-radius: 10px; background: var(--panel-2); --c: var(--green); border-left: 4px solid var(--c); }
.sim-tm-card-d .d.a { --c: var(--amber); } .sim-tm-card-d .d.r { --c: var(--red); } .sim-tm-card-d .d.na { --c: var(--line); }
.sim-tm-card-d .d small { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.15; }
.sim-tm-card-d.three .d { padding: 5px 6px; }
.sim-tm-card-d.three .d small { text-transform: none; letter-spacing: 0; }
.sim-tm-card-d .d small .sim-tm-li { flex: none; }
.sim-tm-card-d .d b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sim-tm-arr { color: var(--muted); font-weight: 800; }
.sim-tm-card-w, .sim-tm-card-c { margin: 0; overflow-wrap: anywhere; }
.sim-tm-card-c { color: var(--muted); font-size: 12.5px; }
/* Controles: reproducir, reloj y deslizador */
.sim-tm-ctl { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 12px; }
.sim-tm-play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--blue); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 12px color-mix(in srgb, var(--blue) 35%, transparent); }
.sim-tm-play svg { width: 26px; height: 26px; fill: currentColor; }
.sim-tm-play .i-pause { display: none; }
.sim-tm-play.is-on .i-pause { display: block; } .sim-tm-play.is-on .i-play { display: none; }
.sim-tm-play:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.sim-tm-time { display: grid; gap: 4px; min-width: 0; }
.sim-tm-sl input { width: 100%; height: 32px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.sim-tm-ends { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sim-tm-jumps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 68px; }
.sim-tm-jumps:not(:has(:not([hidden]))) { display: none; }
@media (max-width: 420px) { .sim-tm-jumps { margin-left: 0; } }
.sim-chip.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
/* Velocidad y Base / Escenario / Ambos */
.sim-tm-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; }
.sim-tm-seg { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.sim-tm-seg-g { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.sim-tm-seg-o { position: relative; cursor: pointer; min-width: 0; }
.sim-tm-seg-o input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sim-tm-seg-o > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 44px; padding: 2px 6px; border-radius: 9px; text-align: center; color: var(--muted); }
.sim-tm-seg-o b { font-size: 14px; color: var(--text); }
.sim-tm-seg-o small { font-size: 11px; line-height: 1.15; }
.sim-tm-seg-o input:checked + span { background: var(--on); color: var(--on-fg); }
.sim-tm-seg-o input:checked + span b { color: var(--on-fg); }
.sim-tm-seg-o input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 1px; }
.sim-tm-mi { display: inline-block; width: 22px; height: 10px; position: relative; }
.sim-tm-mi::before, .sim-tm-mi::after { content: ''; position: absolute; top: 0; width: 10px; height: 10px; border-radius: 50%; }
.sim-tm-mi.base::before { left: 6px; border: 1.5px dashed currentColor; box-sizing: border-box; }
.sim-tm-mi.scen::before { left: 6px; background: var(--green); }
.sim-tm-mi.both::before { left: 0; border: 1.5px dashed currentColor; box-sizing: border-box; }
.sim-tm-mi.both::after { left: 12px; background: var(--amber); }
/* Leyenda */
.sim-tm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.sim-tm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); border: 1.5px solid var(--panel); box-shadow: 0 0 0 1px var(--hover-line); }
.lg-dot.g { background: var(--green); } .lg-dot.a { background: var(--amber); } .lg-dot.r { background: var(--red); }
.lg-dot.big { width: 14px; height: 14px; border: 2px solid var(--text); box-shadow: none; }
.lg-dot.sm { width: 8px; height: 8px; }
.lg-dot.sq { border-radius: 3px; }
.lg-dot.ghost { background: transparent; border: 1.5px dashed var(--faint); box-shadow: none; }
.lg-sec { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: -3px; background: var(--hover-line); }
.lg-sec.n1 { background: var(--blue); height: 5px; } .lg-sec.n2 { background: var(--amber); height: 6px; } .lg-sec.n3 { background: var(--red); height: 7px; margin-right: 2px; }
.sim-tm-note { margin: 6px 0 0; }
.sim-tm-off { margin: 4px 0 12px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); }
/* Vista a pantalla completa */
.sim-tm.is-full { position: fixed; inset: 0; z-index: 70; margin: 0; border-radius: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.sim-tm.is-full .sim-tm-main { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(260px, 1fr) auto auto; }
.sim-tm.is-full .sim-tm-wrap { min-height: 260px; display: flex; }
.sim-tm.is-full .sim-tm-map { height: auto; flex: 1 1 auto; min-height: 260px; }
.sim-tm.is-full .sim-tm-sub, .sim-tm.is-full .sim-tm-note { display: none; }
body.sim-noscroll { overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 420px) {
  .sim-tm-map { height: max(330px, 55vh); }
  .sim-tm-clock b { font-size: 24px; }
  .sim-tm-ctl { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
  .sim-tm-play { width: 52px; height: 52px; }
  .sim-tm-seg { flex-basis: 100%; }
}
/* ── Sprint 065: paso a paso, «Lo que pasó» y panel del paso ── */
/* Rejilla: en móvil mapa, controles y panel uno debajo de otro; en escritorio (paso a paso) el panel va al lado */
.sim-tm-main { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "under" "side"; column-gap: 16px; }
.sim-tm-wrap { grid-area: map; }
.sim-tm-under { grid-area: under; min-width: 0; }
.sim-tm-side { grid-area: side; min-width: 0; display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
@media (min-width: 1000px) {
  .sim-tm-main { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "map side" "under side"; }
  .sim-tm-side { margin-top: 0; align-self: start; }
  .sim-tm.is-full .sim-tm-main { grid-template-rows: minmax(260px, 1fr) auto; }
  .sim-tm.is-full .sim-tm-side { align-self: stretch; overflow-y: auto; }
}
/* Controles del paso a paso: ◀ ▶ grandes a los lados del deslizador */
.sim-tm-nav { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); place-items: center; cursor: pointer; padding: 0; }
.sim-tm-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sim-tm-nav:hover { border-color: var(--blue); color: var(--blue); }
.sim-tm-nav:focus-visible, .sim-tm-stepbtn:focus-visible, .sim-tm-ev:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sim-tm.is-step .sim-tm-nav { display: grid; }
.sim-tm.is-step .sim-tm-ctl { grid-template-columns: 56px 46px minmax(0, 1fr) 46px; gap: 8px; }
.sim-tm-ends b { font-size: 13px; color: var(--text); font-weight: 800; white-space: nowrap; }
.sim-tm:not(.is-step) .sim-tm-ends b { display: none; }
.sim-tm.is-step .sim-tm-ends b { order: -1; flex-basis: 100%; text-align: center; }
.sim-tm-modebar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; margin-top: 10px; }
.sim-tm-stepbtn { min-height: 44px; font-size: 14px; font-weight: 700; padding: 0 14px; }
.sim-tm-stepbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sim-tm-stepbtn.is-on { background: var(--on); color: var(--on-fg); border-color: var(--on); }
.sim-tm-stepsz { flex: 0 1 240px; }
.sim-tm-stepsz .sim-tm-seg-o > span { min-height: 40px; }
.sim-tm:not(.is-step) .sim-tm-stepsz, .sim-tm:not(.is-step) .sim-tm-hint, .sim-tm.is-step .sim-tm-speed { display: none; }
.sim-tm-hint { margin: 6px 0 0; }
/* «Lo que pasó»: interruptor debajo de Base / Escenario / Ambos */
.sim-tm-obs { position: relative; display: block; cursor: pointer; }
.sim-tm-obs input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sim-tm-obs-in { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.sim-tm-obs-in > span { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.sim-tm-obs-in b { font-size: 14px; }
.sim-tm-obs-in small { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.sim-tm-obs-sw { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--hover-line); position: relative; }
.sim-tm-obs-sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 3px var(--shadow); }
.sim-tm-obs input:checked + .sim-tm-obs-in { border-color: var(--tm-obs); background: color-mix(in srgb, var(--tm-obs) 10%, var(--panel)); }
.sim-tm-obs input:checked + .sim-tm-obs-in .sim-tm-obs-sw { background: var(--tm-obs); }
.sim-tm-obs input:checked + .sim-tm-obs-in .sim-tm-obs-sw::after { left: 19px; }
.sim-tm-obs input:focus-visible + .sim-tm-obs-in { outline: 3px solid var(--blue); outline-offset: 2px; }
.sim-tm-obs.is-off { cursor: not-allowed; }
.sim-tm-obs.is-off .sim-tm-obs-in { opacity: .6; border-style: dashed; }
/* Iconos de capa y de leyenda */
.sim-tm-li { display: inline-block; flex: none; width: 12px; height: 12px; box-sizing: border-box; }
.sim-tm-li.o { width: 10px; height: 10px; margin: 1px 2px; border: 2.4px solid var(--tm-obs); transform: rotate(45deg); }
.sim-tm-li.ring { border-radius: 50%; border: 2.2px solid var(--red); width: 13px; height: 13px; }
.sim-tm-li.arrow { width: 20px; height: 10px; position: relative; }
.sim-tm-li.arrow::before { content: ''; position: absolute; left: 0; right: 5px; top: 4px; height: 2.2px; background: var(--amber); border-radius: 2px; }
.sim-tm-li.arrow::after { content: ''; position: absolute; right: 0; top: 1px; border-left: 7px solid var(--amber); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.sim-tm-li.cut { width: 20px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--red) 0 5px, transparent 5px 8px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 26%, transparent); }
/* Panel del paso */
.sim-tm-log { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); }
.sim-tm-sum { margin: 0; padding: 9px 12px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--red); font-size: 15px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.sim-tm-log .sim-h4 { margin: 2px 0 0; }
.sim-tm-evs { list-style: none; margin: 0; padding: 0 2px 0 0; display: grid; gap: 5px; overflow-y: auto; max-height: 300px; min-height: 0; }
.sim-tm-ev { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; min-height: 46px; padding: 6px 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 500 13px/1.3 var(--sans); text-align: left; cursor: pointer; }
.sim-tm-ev:hover { border-color: var(--blue); }
.sim-tm-ev.is-sel { border-color: var(--blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 30%, transparent); }
.sim-tm-ev:disabled { cursor: default; }
.sim-tm-evt { min-width: 0; overflow-wrap: anywhere; }
.sim-tm-evt small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.sim-tm-evk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; --k: var(--amber); color: var(--k); background: color-mix(in srgb, var(--k) 15%, var(--panel)); }
.k-intervention .sim-tm-evk { --k: var(--red); }
.k-priority .sim-tm-evk, .k-turnaround .sim-tm-evk { --k: var(--blue); }
.k-phantom .sim-tm-evk, .k-propagated .sim-tm-evk { --k: var(--muted); }
.k-recovered .sim-tm-evk { --k: var(--green); }
.sim-tm-evi { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.sim-tm-evm { font: 800 12.5px var(--sans); white-space: nowrap; padding: 3px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.sim-tm-evm.up { color: color-mix(in srgb, var(--red) 72%, var(--text)); background: color-mix(in srgb, var(--red) 14%, var(--panel)); }
.sim-tm-evm.down { color: color-mix(in srgb, var(--green) 72%, var(--text)); background: color-mix(in srgb, var(--green) 14%, var(--panel)); }
.sim-tm-ev-empty { padding: 10px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.sim-tm-cum { min-width: 0; padding-top: 4px; border-top: 1px solid var(--line); }
.sim-tm-cumsvg { cursor: pointer; }
.sim-tm-cum-ln { fill: none; stroke-width: 2; stroke-linejoin: round; }
.sim-tm-cum-ln.aff { stroke: var(--blue); } .sim-tm-cum-ln.min { stroke: var(--red); }
.sim-tm-cum-area { fill: var(--red); opacity: .13; }
.sim-tm-cum-pt { stroke: var(--panel); stroke-width: 2; }
.sim-tm-cum-pt.aff { fill: var(--blue); } .sim-tm-cum-pt.min { fill: var(--red); }
.sim-tm-cum-cur { stroke: var(--text); stroke-width: 1.4; stroke-dasharray: 3 3; }
.sim-tm-cum-lb { fill: var(--muted); font: 700 11px var(--sans); }
.sim-tm-cum-v { font: 800 12px var(--sans); font-variant-numeric: tabular-nums; }
.sim-tm-cum-v.aff { fill: var(--blue); } .sim-tm-cum-v.min { fill: color-mix(in srgb, var(--red) 80%, var(--text)); }
/* Sucesos del tren en la ficha */
.sim-tm-card-ev { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; }
.sim-tm-card-ev li { display: flex; align-items: flex-start; gap: 6px; }
.sim-tm-card-ev .sim-tm-evi { width: 14px; height: 14px; margin-top: 2px; color: var(--muted); }
.sim-tm-card-ev b.up { color: color-mix(in srgb, var(--red) 75%, var(--text)); white-space: nowrap; } .sim-tm-card-ev b.down { color: color-mix(in srgb, var(--green) 75%, var(--text)); white-space: nowrap; }
/* Lista de trenes junto al mapa */
.sim-tm-trains { min-width: 0; padding: 10px 12px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); }
.sim-tm-trtog { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.sim-tm-trtog .sim-h4 { margin: 0; color: var(--text); font-size: 14.5px; }
.sim-tm-trtog small { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.sim-tm-trtog svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; transition: transform .15s; }
.sim-tm-trtog:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.sim-tm-trains.is-closed .sim-tm-trtog svg { transform: rotate(-90deg); }
.sim-tm-trains.is-closed .sim-tm-trbody { display: none; }
.sim-tm-trf { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.sim-tm-trf .sim-chip[aria-pressed="true"] { background: var(--on); color: var(--on-fg); border-color: var(--on); }
.sim-tm-jumps .sim-chip .sim-tm-evi { width: 15px; height: 15px; }
.sim-tm-tls { list-style: none; margin: 0; padding: 0 2px 0 0; display: grid; gap: 5px; max-height: min(460px, 52vh); overflow-y: auto; }
.sim-tm-tl { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 9px; align-items: start; width: 100%; padding: 7px 9px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 500 12.5px/1.3 var(--sans); text-align: left; cursor: pointer; }
.sim-tm-tl:hover, .sim-tm-tl:focus-visible { border-color: var(--blue); }
.sim-tm-tl:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.sim-tm-tl.is-sel { border-color: var(--blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 30%, transparent); }
.sim-tm-sw { width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; background: var(--green); border: 1.5px solid var(--panel); box-shadow: 0 0 0 1px var(--hover-line); }
.sim-tm-sw.a { background: var(--amber); } .sim-tm-sw.r { background: var(--red); } .sim-tm-sw.na { background: var(--faint); }
.sim-tm-sw.sq { border-radius: 3px; } .sim-tm-sw.big { width: 14px; height: 14px; border: 2px solid var(--text); box-shadow: none; }
.sim-tm-tl-m { display: grid; gap: 2px; min-width: 0; }
.sim-tm-tl-h { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.sim-tm-tl-h b { font-size: 14px; }
.sim-tm-tl-h span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-tm-tl-r { color: var(--muted); overflow-wrap: anywhere; }
.sim-tm-tl-ds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sim-tm-tl-d { display: inline-flex; align-items: baseline; gap: 3px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; border-left: 3px solid var(--green); }
.sim-tm-tl-d.a { border-left-color: var(--amber); } .sim-tm-tl-d.r { border-left-color: var(--red); } .sim-tm-tl-d.na { border-left-color: var(--line); }
.sim-tm-tl-d small { font-weight: 600; color: var(--muted); font-size: 10.5px; }
.sim-tm-tl-c { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) {
  .sim-tm.is-step .sim-tm-ctl { grid-template-columns: 50px 42px minmax(0, 1fr) 42px; gap: 6px; }
  .sim-tm.is-step .sim-tm-play { width: 50px; height: 50px; }
  .sim-tm-nav { width: 42px; height: 42px; }
  .sim-tm-stepsz { flex-basis: 100%; }
  .sim-tm-stepbtn { width: 100%; justify-content: center; }
  .sim-tm-evs { max-height: 340px; }
}
@media print { .sim-tm, .sim-tm-off { display: none !important; } }
