:root {
  --ink: #eef2f7;
  --muted: #93a3b8;
  --faint: #5d6e84;
  --glass: rgba(10, 18, 29, 0.72);
  --glass-strong: rgba(10, 18, 29, 0.9);
  --line: rgba(160, 185, 215, 0.16);
  --live: #ff3b4e;
  --sim: #ffb000;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Georgia", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #08111c; color: var(--ink); font-family: var(--sans);
             font-variant-numeric: tabular-nums; }
button, select, input { font: inherit; color: inherit; }
#map { position: fixed; inset: 0; width: 100vw; height: 100vh; cursor: grab; display: block; }
#map:active { cursor: grabbing; }

.hud { position: fixed; z-index: 2; }
.sim-banner { position: fixed; z-index: 5; top: 0; left: 0; right: 0; background: var(--sim); color: #14100a; text-align: center;
              font-weight: 700; font-size: 12px; letter-spacing: .03em; padding: 5px 10px; text-transform: uppercase; }
body.sim .top { top: 30px; }

/* header */
.top { top: 14px; left: 18px; right: 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 24px;
       pointer-events: none; }
.top > * { pointer-events: auto; }
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center;
          gap: 10px; font-weight: 600; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: .12em; padding: 3px 8px; border-radius: 3px; display: inline-flex;
         align-items: center; gap: 6px; }
.badge.live { background: var(--live); color: #fff; }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.badge.sim { background: var(--sim); color: #14100a; }
@keyframes pulse { 50% { opacity: .2; } }
.brand h1 { font-family: var(--serif); font-weight: 700; font-size: 30px; margin: 6px 0 0; letter-spacing: -.01em;
            text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.brand h1 em { font-style: italic; font-weight: 400; color: #c8d4e3; }
.search { justify-self: center; position: relative; width: min(360px, 100%); margin-top: 6px; }
.search input { width: 100%; background: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 10px 16px 10px 38px;
                outline: none; backdrop-filter: blur(10px); font-size: 14px;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2393a3b8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E");
                background-repeat: no-repeat; background-position: 14px center; }
.search input:focus { border-color: rgba(200,220,245,.45); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; background: var(--glass-strong); border: 1px solid var(--line);
                  border-radius: 10px; overflow: hidden; backdrop-filter: blur(12px); }
.search-results button { display: flex; justify-content: space-between; width: 100%; text-align: left; background: none; border: 0;
                         padding: 9px 14px; cursor: pointer; font-size: 13px; }
.search-results button span { color: var(--muted); font-size: 12px; }
.search-results button:hover, .search-results button.on { background: rgba(255,255,255,.07); }
.count { background: var(--glass); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 250px;
         backdrop-filter: blur(10px); }
.count-num { display: flex; align-items: baseline; gap: 8px; }
.count-num strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.count-num span { color: var(--muted); font-size: 13px; }
.progress { height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; margin: 6px 0 8px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, #7fb3ff, #ffffff); transition: width .7s ease; }
.count-meta { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; color: var(--muted); }
.count-meta b { color: var(--ink); font-weight: 600; }

/* view switch */
.views { top: 120px; left: 18px; display: flex; flex-direction: column; gap: 6px; width: 190px; }
body.sim .views { top: 136px; }
.views button, .views select { background: var(--glass); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
                               text-align: left; cursor: pointer; font-size: 13px; color: #c7d2df; backdrop-filter: blur(10px);
                               display: flex; align-items: center; gap: 9px; }
.views select { appearance: none; }
.views button:hover, .views select:hover { border-color: rgba(200,220,245,.35); color: #fff; }
.views .on, .views select.on { background: #eef2f7; color: #0b1420; border-color: #eef2f7; }
.views .sep { height: 6px; }
.views .tool { font-size: 12px; padding: 7px 12px; color: var(--muted); }
.views a.tool { background: none; border: 0; padding: 4px 12px; text-decoration: none; display: block; }
.views a.tool:hover { color: #fff; text-decoration: underline; }
.source a { color: var(--muted); }
.ico { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex: none; }
.ico.win { background: conic-gradient(#1d84ce 0 50%, #e30613 0); }
.ico.chg { background: #2a3442; box-shadow: inset 0 0 0 2px #ffd23f; }
.ico.tur { background: linear-gradient(90deg, #1d3557, #7fb3ff); }

/* legend */
.legend { left: 18px; top: 448px; width: 190px; max-height: calc(100vh - 640px); overflow: hidden; background: var(--glass); border: 1px solid var(--line); border-radius: 10px;
          padding: 10px 12px; font-size: 12px; backdrop-filter: blur(10px); }
.legend .title { font-weight: 700; margin-bottom: 7px; font-size: 12px; letter-spacing: .02em; }
.legend .chips { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.legend .chip { display: inline-flex; align-items: center; gap: 5px; color: #d3dce7; }
.legend .chip i { width: 10px; height: 10px; border-radius: 2px; }
.legend .ramp { height: 8px; border-radius: 4px; }
.legend .ticks { display: flex; justify-content: space-between; color: var(--muted); margin-top: 4px; font-size: 11px; }
.legend .note { color: var(--muted); margin-top: 7px; line-height: 1.35; font-size: 11px; }
.legend .big { font-size: 22px; font-weight: 800; }

/* bottom: seats bar and ticker */
.bottom { left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 0; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.seats { margin: 0 18px 10px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px;
         backdrop-filter: blur(12px); }
.seats-bar { position: relative; height: 16px; display: flex; border-radius: 4px; overflow: visible; background: rgba(255,255,255,.08); }
.seats-bar .seg { height: 100%; transition: width .7s ease; }
.seats-bar .seg:first-of-type { border-radius: 4px 0 0 4px; }
.majority-mark { position: absolute; left: calc(176 / 350 * 100%); top: -5px; bottom: -5px; width: 2px; background: #fff; z-index: 2; }
.majority-mark span { position: absolute; top: -15px; left: -9px; font-size: 10px; color: var(--muted); font-weight: 700; }
.seats-parties { display: flex; gap: 6px 22px; flex-wrap: wrap; margin-top: 10px; }
.sp { display: flex; align-items: baseline; gap: 7px; }
.sp i { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.sp .n { font-size: 13px; color: #c7d2df; font-weight: 600; }
.sp .s { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sp .p { font-size: 12px; color: var(--muted); }
.ticker { display: flex; align-items: center; background: rgba(4, 9, 15, 0.92); border-top: 1px solid var(--line); height: 34px;
          font-size: 13px; overflow: hidden; }
.ticker-label { flex: none; background: var(--live); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .1em;
                text-transform: uppercase; padding: 0 12px; height: 100%; display: flex; align-items: center; }
body.sim .ticker-label { background: var(--sim); color: #14100a; }
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
#ticker-items { display: inline-block; padding-left: 100%; animation: tick 60s linear infinite; }
#ticker-items span { margin-right: 34px; color: #c7d2df; }
#ticker-items b { color: #fff; }
#ticker-items i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 6px 0 2px; }
@keyframes tick { to { transform: translateX(-100%); } }

/* simulation controls */
.sim-controls { align-self: flex-end; margin: 0 18px 8px; display: flex; align-items: center; gap: 10px; background: var(--glass);
                border: 1px solid rgba(255,176,0,.45); border-radius: 10px; padding: 7px 10px; backdrop-filter: blur(10px); font-size: 13px; }
.sim-controls[hidden] { display: none; }
.sim-controls button, .sim-controls select { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 6px;
                                             padding: 5px 10px; cursor: pointer; }
.sim-controls #sim-play { background: var(--sim); color: #14100a; border-color: var(--sim); font-weight: 700; min-width: 72px; }
.sim-controls input { width: 220px; accent-color: var(--sim); }
.sim-controls .clock { font-weight: 800; font-size: 16px; min-width: 46px; }

/* municipality card */
.card { top: 120px; right: 18px; width: 330px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 12px;
        padding: 14px 16px; backdrop-filter: blur(12px); font-size: 13px; max-height: calc(100vh - 330px); overflow-y: auto; }
body.sim .card { top: 144px; } body.sim .legend { top: 464px; }
.card h3 { margin: 0; font-family: var(--serif); font-size: 22px; }
.card .meta { color: var(--muted); font-size: 12px; margin: 3px 0 10px; }
.card .close, .drawer .close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted);
                               cursor: pointer; font-size: 15px; }
.card .verdict { background: rgba(255,255,255,.06); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 12.5px; }
.card .row { display: grid; grid-template-columns: 1fr auto 52px; gap: 8px; align-items: center; margin: 6px 0 2px; }
.card .row .name { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.card .row .name i { width: 10px; height: 10px; border-radius: 2px; }
.card .row .v { font-weight: 800; font-size: 15px; }
.card .row .d { font-size: 11.5px; text-align: right; }
.up { color: #5fd39b; } .down { color: #ff7a85; } .new { color: #ffd23f; font-weight: 700; }
.card .was { color: var(--muted); font-size: 11px; margin: -1px 0 3px 17px; }
.card .gone { margin-top: 10px; padding: 7px 9px; border-radius: 7px; background: rgba(255,255,255,.05); font-size: 12px; color: #c7d2df; }
.card .gone span { color: var(--muted); }
.card .bar { height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; position: relative; overflow: hidden; }
.card .bar b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.card .bar u { position: absolute; top: -1px; bottom: -1px; width: 2px; background: rgba(255,255,255,.65); text-decoration: none; }
.card .foot { color: var(--faint); font-size: 11px; margin-top: 10px; }
.card .share { display: flex; gap: 8px; margin-top: 12px; }
.card .share button { flex: 1; background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
                      cursor: pointer; font-size: 12.5px; font-weight: 600; }
.card .share button:hover:not(:disabled) { background: #eef2f7; color: #0b1420; }
.card .share button:disabled { opacity: .45; cursor: default; }
.toast { position: fixed; z-index: 7; left: 50%; bottom: 130px; transform: translateX(-50%); background: #eef2f7; color: #0b1420;
         font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.toast[hidden] { display: none; }

/* drawer */
.drawer { top: 0; right: 0; bottom: 0; width: 400px; background: var(--glass-strong); border-left: 1px solid var(--line); z-index: 4;
          padding: 18px 20px; overflow-y: auto; backdrop-filter: blur(14px); }
body.sim .drawer { top: 27px; } /* below the SIMULACIÓN / PRUEBA stripe */
.drawer h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.drawer h4 { margin: 18px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
#hemicycle { width: 100%; display: block; }
.majority { font-size: 12px; color: var(--muted); text-align: center; margin: 6px 0 12px; }
.majority b { color: var(--ink); }
.parties { width: 100%; border-collapse: collapse; font-size: 13px; }
.parties th { text-align: left; font-weight: 600; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
              padding: 0 4px 6px; border-bottom: 1px solid var(--line); }
.parties td { padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,.05); }
.parties .num { text-align: right; }
.parties td i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.parties td.s { font-weight: 800; font-size: 15px; }
.flow { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.flow i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin: 0 4px; }
.source { font-size: 11px; color: var(--faint); line-height: 1.5; margin-top: 18px; }

/* rankings («Lo más llamativo») */
.rank-note { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.rk-sec { margin-top: 16px; }
.rk-sec header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rk-sec h4 { margin: 0; }
.rk-sec header button { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
                        cursor: pointer; font-size: 11.5px; color: var(--muted); }
.rk-sec header button:hover { color: #0b1420; background: #eef2f7; }
.rk-sec .sub { color: var(--faint); font-size: 11px; margin: 0 0 4px; }
.rk-sec select { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.rk { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; width: 100%; text-align: left;
      background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.05); padding: 5px 2px; cursor: pointer; font-size: 12.5px; }
.rk:hover { background: rgba(255,255,255,.05); }
.rk .n { color: var(--faint); font-weight: 700; text-align: right; }
.rk .m b { font-weight: 700; } .rk .m span { display: block; color: var(--muted); font-size: 11px; }
.rk .v { font-weight: 800; white-space: nowrap; }
.rk i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 3px; }
.rk-empty { color: var(--faint); font-size: 12px; padding: 4px 0; }

/* pacts calculator */
.pact-parties { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.pact-parties button { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--line);
                       border-radius: 16px; padding: 5px 11px; cursor: pointer; font-size: 12.5px; color: #c7d2df; }
.pact-parties button i { width: 10px; height: 10px; border-radius: 2px; }
.pact-parties button b { font-weight: 800; color: #fff; }
.pact-parties button.on { background: #eef2f7; color: #0b1420; border-color: #eef2f7; }
.pact-parties button.on b { color: #0b1420; }
.pact-sum { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 4px 0; }
.pact-verdict { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.pact-verdict.ok { color: #5fd39b; } .pact-verdict.no { color: #ffd23f; }
.pact-bar { position: relative; height: 20px; background: rgba(255,255,255,.08); border-radius: 4px; display: flex; margin: 18px 0 6px; }
.pact-bar div { height: 100%; transition: width .4s ease; }
.pact-bar .majority-mark { top: -6px; bottom: -6px; }
.pact-tools { display: flex; gap: 8px; margin: 10px 0; }
.pact-tools button { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer;
                     font-size: 12px; color: #c7d2df; }
.pact-tools button:hover { background: #eef2f7; color: #0b1420; }
.pact-combos button { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; text-align: left; background: none; border: 0;
                      border-bottom: 1px solid rgba(255,255,255,.05); padding: 6px 2px; cursor: pointer; font-size: 12.5px; }
.pact-combos button:hover { background: rgba(255,255,255,.05); }
.pact-combos i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 4px 0 0; }
.pact-combos b { font-weight: 800; }

.tooltip { position: fixed; z-index: 6; pointer-events: none; background: var(--glass-strong); border: 1px solid var(--line);
           border-radius: 8px; padding: 8px 10px; font-size: 12px; backdrop-filter: blur(10px); max-width: 260px; }
.tooltip b { font-size: 13px; }
.tooltip .m { color: var(--muted); }
.waiting { position: fixed; z-index: 3; left: 50%; top: 46%; transform: translate(-50%, -50%); background: var(--glass-strong);
           border: 1px solid var(--line); border-radius: 12px; padding: 18px 24px; text-align: center; max-width: 380px;
           display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.waiting strong { color: var(--ink); font-size: 17px; }
.waiting[hidden] { display: none; }

/* kiosk (?kiosk): no controls, a tour with a caption; the public address as a discreet signature */
.kiosk-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 0 18px 10px; pointer-events: none; }
.kiosk-row:not(:has(:not([hidden]))) { display: none; }
.kiosk-caption { background: var(--glass-strong); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px;
                 backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 3px; max-width: 70%;
                 animation: cap-in .6s ease; }
.kiosk-caption[hidden], .site-mark[hidden] { display: none; }
.kiosk-caption small { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.kiosk-caption b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.kiosk-caption i { display: inline-block; width: .7em; height: .7em; border-radius: 3px; margin: 0 .3em 0 .1em; }
.kiosk-caption .hl { color: #ffd23f; }
@keyframes cap-in { from { opacity: 0; transform: translateY(8px); } }
.site-mark { margin-left: auto; font-size: 14px; font-weight: 700; color: rgba(238,242,247,.75); letter-spacing: .02em;
             text-shadow: 0 1px 8px rgba(0,0,0,.8); }
body.kiosk #map { cursor: none; }
body.kiosk .views, body.kiosk .search, body.kiosk .sim-controls, body.kiosk .card .close, body.kiosk .card .share,
body.kiosk .tooltip, body.kiosk .drawer { display: none !important; }
body.kiosk .legend { top: 120px; max-height: calc(100vh - 360px); }
body.kiosk.sim .legend { top: 140px; }

/* vertical (?vertical): 9:16 for recording, designed at 540×960 and scaled by --u (the real width / 540); in a
   landscape window, a 9:16 column in the middle (the transform makes it the frame of the fixed panels) */
html:has(body.vertical) { background: #000; }
body.vertical { --u: 1px; position: relative; width: min(100vw, calc(100vh * 9 / 16)); height: 100vh; margin: 0 auto;
                transform: translateZ(0); overflow: hidden; }
body.vertical #map { position: absolute; width: 100%; height: 100%; }
body.vertical .search, body.vertical .views, body.vertical .legend, body.vertical .card, body.vertical .drawer { display: none !important; }
body.vertical .sim-banner { font-size: calc(10 * var(--u)); padding: calc(5 * var(--u)) calc(8 * var(--u)); }
body.vertical .top { top: calc(16 * var(--u)); left: calc(16 * var(--u)); right: calc(16 * var(--u)); grid-template-columns: 1fr;
                     gap: calc(10 * var(--u)); }
body.vertical.sim .top { top: calc(36 * var(--u)); }
body.vertical .kicker { font-size: calc(10 * var(--u)); gap: calc(8 * var(--u)); }
body.vertical .badge { font-size: calc(9.5 * var(--u)); padding: calc(3 * var(--u)) calc(7 * var(--u)); }
body.vertical .brand h1 { font-size: calc(30 * var(--u)); margin-top: calc(6 * var(--u)); line-height: 1.08; }
body.vertical .brand h1 em { display: block; }
body.vertical .count { position: static; min-width: 0; padding: calc(9 * var(--u)) calc(14 * var(--u)); border-radius: calc(10 * var(--u)); }
body.vertical .count-num strong { font-size: calc(30 * var(--u)); }
body.vertical .count-num span, body.vertical .count-meta { font-size: calc(12.5 * var(--u)); }
body.vertical .progress { height: calc(5 * var(--u)); margin: calc(6 * var(--u)) 0 calc(8 * var(--u)); }
body.vertical .kiosk-row { margin: 0 calc(12 * var(--u)) calc(8 * var(--u)); gap: calc(10 * var(--u)); }
body.vertical .kiosk-caption { max-width: 100%; padding: calc(9 * var(--u)) calc(13 * var(--u)); border-radius: calc(10 * var(--u)); }
body.vertical .kiosk-caption small { font-size: calc(12 * var(--u)); }
body.vertical .kiosk-caption b { font-size: calc(21 * var(--u)); }
body.vertical .site-mark { position: absolute; right: calc(16 * var(--u)); bottom: 100%; margin-bottom: calc(6 * var(--u));
                           font-size: calc(12 * var(--u)); }
body.vertical .bottom { position: absolute; }
body.vertical .seats { margin: 0 calc(12 * var(--u)) calc(10 * var(--u)); padding: calc(12 * var(--u)) calc(14 * var(--u));
                       border-radius: calc(12 * var(--u)); }
body.vertical .seats-bar { height: calc(18 * var(--u)); }
body.vertical .majority-mark { top: calc(-5 * var(--u)); bottom: calc(-5 * var(--u)); width: calc(2 * var(--u)); }
body.vertical .majority-mark span { font-size: calc(10 * var(--u)); top: calc(-15 * var(--u)); left: calc(-9 * var(--u)); }
body.vertical .seats-parties { gap: calc(6 * var(--u)) calc(16 * var(--u)); margin-top: calc(12 * var(--u)); }
body.vertical .sp { gap: calc(6 * var(--u)); }
body.vertical .sp i { width: calc(10 * var(--u)); height: calc(10 * var(--u)); }
body.vertical .sp .n { font-size: calc(13 * var(--u)); }
body.vertical .sp .s { font-size: calc(22 * var(--u)); }
body.vertical .sp .p { font-size: calc(11 * var(--u)); }
body.vertical .ticker { height: calc(32 * var(--u)); font-size: calc(13 * var(--u)); }
body.vertical .ticker-label { font-size: calc(10 * var(--u)); padding: 0 calc(10 * var(--u)); }
body.vertical #ticker-items span { margin-right: calc(30 * var(--u)); }
body.vertical #ticker-items i { width: calc(9 * var(--u)); height: calc(9 * var(--u)); }
body.vertical .sim-controls { font-size: calc(12 * var(--u)); margin: 0 calc(12 * var(--u)) calc(8 * var(--u)); flex-wrap: wrap; }
body.vertical .sim-controls input { width: calc(150 * var(--u)); }
body.vertical .waiting { width: 86%; font-size: calc(13 * var(--u)); }
body.vertical .waiting strong { font-size: calc(17 * var(--u)); }

@media (max-width: 900px) {
  .top { grid-template-columns: 1fr; gap: 10px; }
  .brand h1 { font-size: 21px; }
  .search { justify-self: stretch; }
  .count { position: fixed; top: auto; bottom: 200px; right: 12px; min-width: 0; padding: 8px 10px; }
  .count-num strong { font-size: 22px; }
  .views { top: auto; bottom: 200px; left: 12px; width: auto; flex-direction: row; flex-wrap: wrap; max-width: 60vw; }
  .views .tool, .views .sep { display: none; }
  .legend { display: none; }
  .card { left: 12px; right: 12px; width: auto; top: auto; bottom: 200px; }
  .drawer { width: 100%; }
}
