/* Simulator, strategy editor (weather and safety car rows), stat tooltips */
/* ===== Simulator ===== */
.track-box { position: relative; overflow: hidden; }
.sim-tag { display: none; position: absolute; top: 18px; left: 20px; z-index: 2; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: #3fd0ff; border: 1px solid #3fd0ff; border-radius: 4px; padding: 2px 8px; background: #06111c; }
.track-box.sim { border-color: #1d5a78; }
.track-box.sim .sim-tag { display: inline-block; }
.sc-banner { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: #111; background: #ffd60a; padding: 4px 18px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.sc-banner.y { font-size: 15px; background: rgba(255,214,10,.85); }
@media (prefers-reduced-motion: no-preference) { .sc-banner:not(.y) { animation: scBlink 1s steps(2) infinite; } @keyframes scBlink { 50% { background: #ff9f0a; } } }
.track-box.sim::after { content: ""; position: absolute; inset: 10px; pointer-events: none; border-radius: 4px;
  background: repeating-linear-gradient(0deg, rgba(63, 208, 255, 0.05) 0 1px, transparent 1px 3px); }
.sim-banner { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid #1d5a78; border-radius: 10px; background: color-mix(in srgb, #3fd0ff 6%, var(--panel)); font-size: 14px; color: var(--muted); }
.sim-banner b { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: #3fd0ff; }
.sim-dot { width: 8px; height: 8px; border-radius: 50%; background: #3fd0ff; box-shadow: 0 0 8px #3fd0ff; align-self: center; }
@media (prefers-reduced-motion: no-preference) { .sim-dot { animation: simblink 1.6s ease-in-out infinite; } }
@keyframes simblink { 50% { opacity: 0.3; } }

/* ===== Strategy editor ===== */
.strat { gap: 10px; }
.st-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(160px, 1.2fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.st-head { display: flex; align-items: center; gap: 8px; }
.st-head b { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.st-head select { flex: 1; min-width: 0; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.st-info { font-size: 13px; color: var(--muted); }
.st-info.warn { color: #f2c94c; }
.st-info.bad { color: #e5484d; font-weight: 500; }
.st-danger { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid #e5484d; background: color-mix(in srgb, #e5484d 12%, var(--asphalt)); color: #ffb4b4; font-size: 14px; }
.region-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.region-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.track-grid button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; min-height: 66px; }
.track-grid .tg-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track-grid .tg-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-grid .tg-txt small { font-size: 12px; opacity: 0.75; display: flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.track-grid .thumb, .h-thumb .thumb { flex: none; }
.h-thumb { display: inline-flex; vertical-align: middle; margin-right: 12px; color: var(--muted, #9aa0a6); }
.h-meta { display: block; font-family: var(--body, inherit); font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted, #9aa0a6); margin-top: 4px; }
.h-meta .flag, .tg-txt .flag { width: 18px; height: 12px; vertical-align: -1px; }
.wx { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border: 1px solid #2c4a6e; border-radius: 10px; background: color-mix(in srgb, #5b8def 7%, transparent); }
.wx-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: center; }
.wx-climate { font-size: 13px; color: var(--muted, #9aa0a6); }
.wx-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wx-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; background: rgba(255,255,255,0.03); }
.wx-part { font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted, #9aa0a6); }
.wx-icon { font-size: 26px; line-height: 1.1; }
.wx-cell b { font-family: 'IBM Plex Mono', monospace; font-size: 18px; font-weight: 500; }
.wx-cell small { font-size: 12px; color: var(--muted, #9aa0a6); }
.wx-react { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
/* Weather and safety car calls: labels on the left, every row's buttons in the same column */
.wx-react.wx-rules { display: grid; grid-template-columns: minmax(180px, 290px) minmax(0, 1fr); gap: 14px 16px; align-items: start; padding-top: 10px; border-top: 1px solid var(--line); }
.wx-rl { padding-top: 7px; line-height: 1.3; }
.wx-rc { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wx-rc .choice { display: flex; flex-wrap: wrap; gap: 6px; }
.wx-rc .choice button { display: inline-flex; align-items: center; gap: 6px; }
.wx-note { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.wx-step { display: inline-flex; align-items: center; gap: 8px; }
.wx-step b { min-width: 28px; text-align: center; font-family: var(--display); font-size: 22px; line-height: 1; }
@media (max-width: 620px) { .wx-react.wx-rules { grid-template-columns: minmax(0, 1fr); gap: 6px; } .wx-rl { padding-top: 10px; } }
.call-rain { display: inline-block; color: #8fb4ff; }
.rel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; border: 1px solid var(--line, #2a2e35); border-radius: 10px; font-size: 14px; }
.rel .label { margin-right: 4px; }
.rel-item { cursor: help; white-space: nowrap; }
.rel-item b { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
#rows .row.out { opacity: 0.55; }
.st-danger b { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: #e5484d; }
.st-info { font-variant-numeric: tabular-nums; }
.st-info small { color: var(--muted); margin-left: 6px; }
.st-row:last-of-type .st-info { grid-column: 2 / -1; }
@media (max-width: 700px) { .st-row { grid-template-columns: minmax(0, 1fr); } .st-row:last-of-type .st-info { grid-column: auto; } }

.entries-strip { display: flex; flex-direction: column; gap: 8px; }
.echips { display: flex; gap: 8px; flex-wrap: wrap; }
.echips button { text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.echips button b { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; color: var(--flag); }
.echips button[aria-pressed="true"] { border-color: var(--flag); background: color-mix(in srgb, var(--flag) 10%, var(--asphalt)); }
.echips .add { color: var(--muted); border-style: dashed; }
.entry-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.entry-row > span:first-child { flex: 1; min-width: 200px; }
.entry-row small { display: block; color: var(--muted); font-size: 12px; }
.entry-row button { font-size: 13px; padding: 5px 10px; }
.entry-row button.danger { border-color: var(--flag); color: #ff8a96; }
.entry-row button.danger[data-sure] { background: var(--flag); color: #fff; }
.staff select { width: 100%; font-size: 13px; padding: 6px; }
.staffs { grid-template-columns: minmax(0, 1fr); }
.lic { font-size: 12px; color: var(--muted); }

/* ===== Stat tooltips ===== */
[data-tip] { cursor: help; }
.dc-stats [data-tip] { border-radius: 4px; }
.dc-ic[data-tip]:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; }
.dc-stats [data-tip]:hover, .dc-stats [data-tip]:focus-visible { background: color-mix(in srgb, var(--fg) 8%, transparent); outline: none; }
#tip { position: fixed; z-index: 50; max-width: 240px; padding: 9px 12px; border-radius: 8px; background: #0d0f12; border: 1px solid var(--line);
  color: var(--fg); font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 2px; }
#tip b { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--flag); }

.call { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, #3fc79a 45%, var(--line)); background: color-mix(in srgb, #3fc79a 7%, var(--asphalt)); }
.call > div { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.call b { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.03em; }
.call-ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #14161a; flex-shrink: 0; }
.call-ic svg { width: 22px; height: 22px; }
.call button { font-size: 13px; padding: 6px 12px; }
.call-q { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; margin-left: 4px; vertical-align: 1px; }

