/* V4.3 SAFE PIXEL POLISH — additive only, no layout hijack */
body.pixel-v4.v43safe{ --v43safe-cyan:#19e9ff; --v43safe-yellow:#ffe23f; --v43safe-pink:#ff28b8; --v43safe-green:#22f0a1; }
.v43safe-topstack{
  position:absolute; top:1.5%; right:1.3%; z-index:95;
  display:flex; flex-direction:column; align-items:flex-end; gap:6px;
  pointer-events:none;
}
.v43safe-topstack img{
  display:block; width:260px; max-width:18vw; min-width:180px; height:auto;
  image-rendering:pixelated; filter:drop-shadow(4px 4px 0 #000);
}
.v43safe-sub{
  background:#061425f0; border:2px solid var(--v43safe-cyan); box-shadow:4px 4px 0 #000;
  padding:4px 10px; color:#eef7ff; font:1000 12px/1.15 "Courier New",Consolas,monospace;
  text-transform:uppercase; max-width:340px; text-align:right;
}

.v43safe-mode{
  position:absolute; left:1.2%; top:13.5%; z-index:94;
  background:#061425f0; border:2px solid var(--v43safe-cyan); box-shadow:4px 4px 0 #000;
  padding:6px 10px; color:#eef7ff; font:1000 12px/1.05 "Courier New",Consolas,monospace;
  text-transform:uppercase; pointer-events:none;
}

.v43safe-area{
  position:absolute; left:1.2%; bottom:56px; z-index:72;
  display:none; flex-direction:column; gap:6px; width:30%; max-width:460px; min-width:250px;
  pointer-events:none;
}
.v43safe-area.on{ display:flex; }
.v43safe-area-head img{
  display:block; width:240px; max-width:85%; height:auto; image-rendering:pixelated; filter:drop-shadow(3px 3px 0 #000);
}
.v43safe-row{
  display:flex; align-items:center; gap:8px; background:#05111ef0;
  border:2px solid var(--v43safe-green); box-shadow:4px 4px 0 #000; padding:5px 8px;
  color:#eef7ff; font:1000 12px/1.15 "Courier New",Consolas,monospace;
}
.v43safe-row img{ width:22px; height:22px; image-rendering:pixelated; }
.v43safe-row b{ color:var(--v43safe-yellow); }

.v43safe-boss{
  position:absolute; left:1.2%; bottom:8px; z-index:73;
  display:flex; align-items:center; gap:10px; pointer-events:none;
}
.v43safe-boss img{
  display:block; width:200px; max-width:18vw; min-width:120px; height:auto;
  image-rendering:pixelated; filter:drop-shadow(3px 3px 0 #000);
}
.v43safe-boss span{
  color:#eef7ff; font:1000 12px/1.15 "Courier New",Consolas,monospace;
  text-transform:uppercase; text-shadow:2px 2px 0 #000;
}

.v43safe-icon{
  width:24px; height:24px; image-rendering:pixelated; filter:drop-shadow(2px 2px 0 #000);
  flex:0 0 auto;
}
.pixel-v4 .eventCard.v43safe-plus{ border-color:#22f0a1 !important; }
.pixel-v4 .eventCard.v43safe-minus{ border-color:#ff365f !important; }
.pixel-v4 .eventCard.v43safe-threshold{ border-color:#ffb42a !important; }
.pixel-v4 .eventCard.v43safe-overtake{ border-color:#19e9ff !important; }
.pixel-v4 .eventCard.v43safe-progress{ border-color:#8f39ff !important; }

#v42NewsLine .src{
  background:transparent !important; padding:0 !important;
}
#v42NewsLine .src img{
  display:block; height:100%; width:auto; image-rendering:pixelated;
}

.pixel-v4 .party .id::before{
  content:""; display:inline-block; vertical-align:middle;
  width:10px; height:10px; margin-right:6px; background:var(--pc); box-shadow:1px 1px 0 #000;
}
.pixel-v4 .party .head{ gap:.35vw; }

body[data-pixel-layout="9"] .v43safe-topstack{ top:1.6%; right:2.4%; }
body[data-pixel-layout="9"] .v43safe-topstack img{ width:42vw; max-width:none; min-width:0; }
body[data-pixel-layout="9"] .v43safe-sub{ font-size:1.55vw; max-width:52vw; }
body[data-pixel-layout="9"] .v43safe-mode{ left:3%; top:8.2%; font-size:1.55vw; }
body[data-pixel-layout="9"] .v43safe-area{ left:3%; bottom:10vh; width:58%; min-width:0; }
body[data-pixel-layout="9"] .v43safe-row{ font-size:1.5vw; }
body[data-pixel-layout="9"] .v43safe-boss{ left:3%; bottom:6.2vh; }
body[data-pixel-layout="9"] .v43safe-boss img{ width:32vw; max-width:none; min-width:0; }
body[data-pixel-layout="9"] .v43safe-boss span{ font-size:1.45vw; max-width:48vw; }

/* === V4.3A STREAM RESCUE === */
.v43safe-topstack{
  top:8.8% !important;
  right:1.45% !important;
  gap:0 !important;
}
.v43safe-topstack img{
  width:168px !important;
  max-width:168px !important;
  min-width:0 !important;
}
.v43safe-sub{ display:none !important; }
.v43safe-mode{ display:none !important; }
.v43safe-boss{ display:none !important; }

.pixel-v4 .party .id.v43-party-id{
  overflow:hidden !important;
  padding:0 !important;
  display:grid !important;
  place-items:center !important;
  font-size:0 !important;
  line-height:0 !important;
}
.pixel-v4 .party .id.v43-party-id .v43-party-emblem{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:contain !important;
  image-rendering:pixelated !important;
  filter:drop-shadow(1px 1px 0 #000);
}
.pixel-v4 .party .name{
  font-size:14px !important;
  letter-spacing:-.02em !important;
}

.v43-boss-card{
  border-color:#ffe23f !important;
  box-shadow:inset 0 0 0 1px #ffe23f33, 4px 4px 0 #000 !important;
}
.v43-boss-card::after{
  content:"175 = MAJORITET";
  position:absolute;
  right:10px; bottom:8px;
  color:#ffe23f;
  font:1000 11px/1 "Courier New",Consolas,monospace;
  text-shadow:1px 1px 0 #000;
  opacity:.9;
}

.v43-majority-ribbon{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:8px;
  padding-top:6px;
  border-top:1px solid #ffffff16;
}
.v43-majority-side{
  display:flex; align-items:center; gap:4px;
}
.v43-majority-side img{
  width:24px; height:24px; display:block;
  image-rendering:pixelated;
  filter:drop-shadow(1px 1px 0 #000);
}
.v43-majority-175{
  padding:4px 7px;
  background:#071425;
  border:2px solid #ffe23f;
  box-shadow:2px 2px 0 #000;
  color:#ffe23f;
  font:1000 12px/1 "Courier New",Consolas,monospace;
}

.v43-riksdag-panel{ overflow:hidden !important; }
.v43-riksdag-legend{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex-wrap:wrap;
  margin:8px auto 10px;
  padding:6px 8px;
  width:94%;
  background:#05111e88;
  border:1px solid #19e9ff44;
}
.v43-riksdag-chip{
  display:flex; align-items:center; gap:4px;
  color:#eef7ff;
  font:1000 11px/1 "Courier New",Consolas,monospace;
}
.v43-riksdag-chip img{
  width:22px; height:22px;
  image-rendering:pixelated;
}
.v43-riksdag-meta{
  width:94%;
  margin:0 auto 8px;
  display:flex;
  justify-content:space-between;
  color:#9fb9ce;
  font:1000 11px/1 "Courier New",Consolas,monospace;
  text-transform:uppercase;
}
.v43-seatmap{
  display:grid !important;
  grid-template-columns:repeat(29,minmax(0,1fr)) !important;
  grid-auto-rows:auto !important;
  gap:3px !important;
  width:94% !important;
  height:auto !important;
  max-height:none !important;
  margin:10px auto 0 !important;
  padding:8px !important;
  align-content:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  position:relative !important;
}
.v43-seatmap .seat,
.v43-seatmap > *{
  position:static !important;
  transform:none !important;
}
.v43-seatmap .seat{
  width:auto !important;
  min-width:0 !important;
  height:auto !important;
  aspect-ratio:1/1 !important;
  border:1px solid #02070c !important;
  box-shadow:inset 0 0 0 1px #ffffff10 !important;
}
.v43-seatmap .seat:not([style*="background"]){
  background:#163149 !important;
}

body[data-pixel-layout="9"] .v43safe-topstack{
  top:7.4% !important;
  right:2.5% !important;
}
body[data-pixel-layout="9"] .v43safe-topstack img{
  width:30vw !important;
  max-width:none !important;
}
body[data-pixel-layout="9"] .v43-riksdag-legend{ gap:1vw; }
body[data-pixel-layout="9"] .v43-riksdag-chip{ font-size:1.3vw; }
body[data-pixel-layout="9"] .v43-riksdag-chip img{ width:4vw; height:4vw; }
body[data-pixel-layout="9"] .v43-seatmap{
  grid-template-columns:repeat(19,minmax(0,1fr)) !important;
  gap:.5vw !important;
  padding:1vw !important;
}

/* === V4.3B VERTICAL RESCUE / CACHE-BUST === */

/* Absolutely remove legacy floating overlays */
.v43safe-boss,
body[data-pixel-layout="9"] .v43safe-boss{
  display:none !important;
  visibility:hidden !important;
}

/* Portrait status badge: compact, below native LIVE strip */
body[data-pixel-layout="9"] .v43safe-topstack{
  position:absolute !important;
  top:92px !important;
  right:24px !important;
  left:auto !important;
  width:auto !important;
  max-width:none !important;
  gap:0 !important;
  z-index:95 !important;
}
body[data-pixel-layout="9"] .v43safe-topstack img{
  width:220px !important;
  height:auto !important;
  max-width:none !important;
  min-width:0 !important;
}
body[data-pixel-layout="9"] .v43safe-sub,
body[data-pixel-layout="9"] .v43safe-mode{
  display:none !important;
}

/* Party cards: prevent giant typography in portrait */
body[data-pixel-layout="9"] .party .name{
  font-size:18px !important;
  line-height:1 !important;
  letter-spacing:-.02em !important;
}
body[data-pixel-layout="9"] .party .pct{
  font-size:38px !important;
}
body[data-pixel-layout="9"] .party .id{
  width:46px !important;
  height:46px !important;
}
body[data-pixel-layout="9"] .party .id .v43-party-emblem{
  width:46px !important;
  height:46px !important;
}

/* Local pulse, keep clear of ticker in portrait */
body[data-pixel-layout="9"] .v43safe-area{
  left:30px !important;
  right:auto !important;
  bottom:122px !important;
  width:560px !important;
  max-width:560px !important;
  min-width:0 !important;
}
body[data-pixel-layout="9"] .v43safe-row{
  font-size:18px !important;
}

/* Riksdagen portrait rebuild */
body[data-pixel-layout="9"] .v43-riksdag-panel{
  overflow:hidden !important;
}
body[data-pixel-layout="9"] .v43-riksdag-legend{
  width:94% !important;
  margin:10px auto 10px !important;
  gap:8px !important;
  padding:8px !important;
}
body[data-pixel-layout="9"] .v43-riksdag-chip{
  font-size:15px !important;
  gap:4px !important;
}
body[data-pixel-layout="9"] .v43-riksdag-chip img{
  width:28px !important;
  height:28px !important;
}
body[data-pixel-layout="9"] .v43-riksdag-meta{
  width:94% !important;
  margin:0 auto 8px !important;
  font-size:14px !important;
}
body[data-pixel-layout="9"] .v43-seatmap{
  display:grid !important;
  grid-template-columns:repeat(19,minmax(0,1fr)) !important;
  gap:4px !important;
  width:94% !important;
  height:auto !important;
  padding:8px !important;
  margin:6px auto 0 !important;
  box-sizing:border-box !important;
}
body[data-pixel-layout="9"] .v43-seatmap .seat{
  position:static !important;
  transform:none !important;
  width:auto !important;
  height:auto !important;
  aspect-ratio:1/1 !important;
}

/* Ensure event icons never make cards taller in portrait */
body[data-pixel-layout="9"] .v43safe-icon{
  width:28px !important;
  height:28px !important;
}

/* Normal browser QA: stream9 is always a 1080x1920 canvas fitted into viewport */
body.v43b-vertical-preview{
  margin:0 !important;
  overflow:hidden !important;
  background:#01040a !important;
}
body.v43b-vertical-preview .stage{
  width:1080px !important;
  height:1920px !important;
  min-width:1080px !important;
  min-height:1920px !important;
  max-width:none !important;
  max-height:none !important;
  position:absolute !important;
  margin:0 !important;
  transform-origin:top left !important;
  box-sizing:border-box !important;
}
