:root {
  --background: #f4f7fb;
  --foreground: #18202f;
  --muted: #697386;
  --line: #d8e0ec;
  --panel: #ffffff;
  --ink: #101828;
  --accent-2: #0b63ce;
}

/* Modern Johor UI v8 */
@keyframes johorFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes johorFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

body.johor-page {
  background:
    linear-gradient(180deg, #eef3f8 0, #f7f9fc 320px, #f7f9fc 100%);
  color: #182230;
}

.johor-page .awani-shell {
  width: min(1440px, calc(100% - 44px));
  padding: 28px 0 64px;
}

.johor-hero-card {
  position: relative;
  margin-bottom: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, #111827 0%, #17324f 48%, #0f5b53 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.2);
  isolation: isolate;
}

.johor-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 82%, transparent);
  opacity: 0.26;
}

.johor-nav {
  padding: 18px 26px 0;
}

.johor-nav a {
  color: #f9d978;
}

.johor-hero-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 500px);
  gap: 42px;
  padding: 42px 36px 34px;
}

.johor-kicker {
  color: #f9d978;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.johor-hero-card h1 {
  max-width: 900px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: 0;
}

.johor-lede {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
}

.johor-stats {
  align-self: end;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.johor-stats div {
  background: rgba(255, 255, 255, 0.08);
}

.johor-stats strong {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.johor-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  align-items: center;
  margin-bottom: 22px;
  padding: 8px 0;
  background: rgba(247, 249, 252, 0.86);
  backdrop-filter: blur(16px);
}

.johor-search,
.johor-filter {
  border-color: #e1e7ef;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(21, 34, 50, 0.06);
}

.johor-search input {
  background: #ffffff;
  border-radius: 9px;
}

.johor-filter button {
  border-radius: 10px;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.johor-filter button:hover {
  transform: translateY(-1px);
}

.johor-filter button.active,
.johor-filter button:hover {
  background: #111827;
  border-color: #111827;
}

.johor-page .awani-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.johor-page .awani-card {
  position: relative;
  border: 1px solid #e3e9f1;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(21, 34, 50, 0.08);
  animation: johorFadeUp 420ms ease both;
  animation-delay: calc(var(--card-index, 0) * 42ms);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.johor-page .awani-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--winner-color, #0b63ce), #ffffff 55%);
  box-shadow: 0 24px 60px rgba(21, 34, 50, 0.14);
}

.johor-page .awani-card-top {
  height: 5px;
}

.johor-page .awani-card-header {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px 18px 16px;
  background: #ffffff;
}

.johor-page .seat-label {
  display: grid;
  gap: 9px;
}

.johor-page .seat-label span {
  width: fit-content;
  margin: 0;
  color: #667085;
  background: #f2f5f9;
  border-radius: 8px;
}

.johor-page .seat-label h2 {
  font-size: 1.08rem;
}

.johor-page .awani-brand,
.johor-page .share-icons {
  display: none;
}

.seat-badges {
  gap: 6px;
}

.seat-badge {
  min-height: 24px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.johor-page .awani-majority {
  margin-top: 2px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
  border: 1px solid #e7edf4;
  border-radius: 12px;
}

.johor-page .awani-majority strong {
  font-size: 2.1rem;
}

.johor-page .awani-table-head {
  padding-top: 14px;
}

.johor-page .awani-candidate {
  grid-template-columns: 6px minmax(0, 1fr) 30px 82px;
  min-height: 66px;
}

.johor-page .candidate-party-bar {
  width: 6px;
  height: 46px;
}

.candidate-share {
  display: block;
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: 999px;
}

.candidate-share i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left;
  animation: johorFill 720ms ease both;
  animation-delay: calc(var(--card-index, 0) * 35ms + 140ms);
}

.johor-page .winner-check {
  width: 26px;
  height: 26px;
}

.johor-page .winner-check::after {
  left: 7px;
  top: 3px;
  width: 8px;
  height: 15px;
}

.johor-page .awani-meta {
  border-top: 1px solid #e7edf4;
  background: #ffffff;
}

.johor-page .awani-meta strong {
  background: #f8fafc;
}

.seat-history {
  background: #fbfcfe;
}

.seat-history div {
  border-radius: 10px;
}

.johor-page .awani-card-footer {
  border-top: 1px solid #e7edf4;
}

@media (max-width: 1320px) {
  .johor-page .awani-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .johor-page .awani-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .johor-page .awani-shell {
    width: min(100% - 20px, 1440px);
  }

  .johor-hero-card {
    border-radius: 12px;
  }

  .johor-hero-layout {
    padding: 30px 18px 18px;
  }

  .johor-toolbar {
    position: static;
    padding-top: 0;
  }

  .johor-page .awani-card-grid {
    grid-template-columns: 1fr;
  }

  .johor-page .awani-card-header {
    grid-template-columns: 1fr;
  }
}

/* No top header v11 */
.johor-hero-card[hidden] {
  display: none;
}

.johor-page .awani-shell {
  padding-top: 16px;
}

.johor-map-panel {
  margin-top: 0;
}

/* Centered plain header v12 */
.johor-page .awani-shell {
  padding-top: 22px;
}

.johor-hero-card {
  display: block;
  max-width: 920px;
  margin: 0 auto 18px;
  padding: 0;
  color: #182230;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.johor-hero-card::before {
  display: none;
}

.johor-nav {
  justify-content: center;
  padding: 0;
  margin-bottom: 12px;
}

.johor-hero-layout {
  display: block;
  padding: 0;
  border: 0;
}

.johor-kicker {
  margin: 0 0 8px;
  color: #9b7444;
}

.johor-hero-card h1 {
  margin: 0 auto;
  color: #182230;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.03;
}

.johor-lede {
  max-width: 760px;
  margin: 12px auto 0;
  color: #596579;
}

.johor-stats {
  display: none;
}

/* Compact election-map header v10 */
body.johor-page {
  background: #f4f6f9;
}

.johor-page .awani-shell {
  width: min(1500px, calc(100% - 40px));
  padding-top: 22px;
}

.johor-hero-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0;
  color: #172033;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.johor-hero-card::before {
  display: none;
}

.johor-nav {
  padding: 0;
  color: #667085;
}

.johor-nav a {
  color: #9b7444;
}

.johor-nav span {
  color: #667085;
}

.johor-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 0 0 14px;
  border-bottom: 1px solid #d9e0ea;
}

.johor-kicker {
  margin-bottom: 7px;
  color: #9b7444;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.johor-hero-card h1 {
  max-width: none;
  color: #182230;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.02;
}

.johor-lede {
  max-width: 780px;
  margin-top: 10px;
  color: #596579;
  font-size: 0.98rem;
  line-height: 1.45;
}

.johor-stats {
  display: flex;
  gap: 8px;
  align-self: end;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.johor-stats div {
  min-width: 140px;
  min-height: 76px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(21, 34, 50, 0.06);
}

.johor-stats span {
  color: #667085;
  font-size: 0.68rem;
  line-height: 1.25;
}

.johor-stats strong {
  margin-top: 8px;
  color: #182230;
  font-size: 1.8rem;
}

.johor-map-panel {
  margin-top: 0;
  border-radius: 16px;
}

.map-stage {
  min-height: 680px;
}

#johor-map {
  height: 680px;
}

@media (max-width: 980px) {
  .johor-hero-layout {
    grid-template-columns: 1fr;
  }

  .johor-stats {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .johor-page .awani-shell {
    width: min(100% - 20px, 1500px);
  }

  .johor-stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .johor-stats div {
    min-width: 0;
  }

  .map-stage,
  #johor-map {
    height: 430px;
    min-height: 430px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .johor-page .awani-card,
  .candidate-share i,
  .johor-filter button {
    animation: none;
    transition: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(7, 39, 85, 0.06), transparent 380px),
    var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 22px;
  align-items: stretch;
  min-height: 330px;
  padding: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 24%, rgba(255, 207, 77, 0.34), transparent 20%),
    linear-gradient(135deg, #071f49 0%, #0c4a6e 45%, #12372a 100%);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 360px;
  height: 260px;
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(255, 255, 255, 0.16) 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 0 46%, rgba(255, 255, 255, 0.16) 46% 54%, transparent 54%);
  background-size: 54px 54px;
  transform: rotate(-8deg);
  opacity: 0.7;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #d9f99d;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #dce9f5;
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 0 16px;
  color: #071f49;
  background: #d9f99d;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.hero-link:hover {
  background: #ffffff;
}

.hero-panel {
  display: grid;
  align-content: end;
  gap: 12px;
}

.hero-panel div {
  min-height: 92px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.metric-label,
.panel-heading span,
.search-box span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-panel .metric-label {
  color: #bdd7ee;
}

.hero-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 16px;
  align-items: start;
  margin: 18px 0;
}

.search-box,
.state-tabs,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-box {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.12);
}

.state-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px;
}

.state-tabs button {
  min-height: 38px;
  padding: 0 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.state-tabs button.active,
.state-tabs button:hover {
  color: #ffffff;
  background: #102a43;
  border-color: #102a43;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
}

.panel {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.party-bars {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.party-row {
  display: grid;
  grid-template-columns: 86px 1fr 34px;
  gap: 12px;
  align-items: center;
}

.party-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.party-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.bar-track {
  height: 14px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
}

.state-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.state-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 12px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.state-card:hover,
.state-card.selected {
  border-color: #102a43;
  box-shadow: inset 0 0 0 1px #102a43;
}

.state-card span {
  color: var(--ink);
  font-weight: 800;
}

.state-card strong {
  font-size: 1.45rem;
}

.state-card small,
.table-row small {
  color: var(--muted);
}

.results-panel {
  margin-top: 18px;
}

.results-table {
  overflow-x: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 1.35fr 1.15fr 0.55fr 0.7fr 0.7fr 0.72fr;
  gap: 14px;
  min-width: 900px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid #edf2f7;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-row > span:first-child {
  display: grid;
  gap: 3px;
}

mark {
  display: inline-flex;
  min-width: 62px;
  justify-content: center;
  padding: 5px 8px;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 800;
}

.status {
  display: inline-flex;
  min-width: 84px;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
  font-size: 0.82rem;
}

.status.rasmi {
  color: #0f5132;
  background: #dcfce7;
}

.status.mengira {
  color: #7a4b00;
  background: #fef3c7;
}

.status.menunggu {
  color: #475569;
  background: #e2e8f0;
}

footer {
  padding: 18px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.johor-shell {
  width: min(1240px, calc(100% - 32px));
}

.johor-hero {
  background:
    radial-gradient(circle at 88% 24%, rgba(244, 162, 97, 0.34), transparent 20%),
    linear-gradient(135deg, #061a40 0%, #0b3d91 42%, #7f1d1d 100%);
}

.johor-controls {
  grid-template-columns: minmax(260px, 390px) 1fr;
}

.johor-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.compact-stat {
  padding: 16px;
}

.compact-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.compact-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
}

.hot-seat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hot-seat-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.hot-seat-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #102a43, #0f4c81);
}

.hot-seat-header span,
.majority-box span,
.winner-strip span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hot-seat-header span,
.majority-box span {
  color: #bdd7ee;
}

.hot-seat-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: 0;
}

.majority-box {
  min-width: 126px;
  padding: 10px 12px;
  text-align: right;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.majority-box strong {
  display: block;
  margin-top: 4px;
  font-size: 1.65rem;
}

.winner-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  background: #f8fafc;
  border-left: 7px solid #0b63ce;
  border-bottom: 1px solid var(--line);
}

.winner-strip span {
  color: var(--muted);
}

.winner-strip strong {
  color: var(--ink);
}

.candidate-list {
  padding: 16px 18px 6px;
}

.candidate-head,
.candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 14px;
}

.candidate-head {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.candidate-head span:last-child,
.vote-info {
  text-align: right;
}

.candidate-row {
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #edf2f7;
}

.candidate-info {
  min-width: 0;
}

.candidate-info strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.candidate-info small,
.vote-info small {
  display: block;
  margin-top: 3px;
  font-weight: 800;
}

.vote-info strong {
  color: var(--ink);
}

.vote-bar {
  grid-column: 1 / -1;
  height: 8px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.vote-bar span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.seat-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 10px 0 0;
  background: var(--line);
}

.seat-meta div {
  padding: 13px 18px;
  background: #fbfdff;
}

.seat-meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.seat-meta dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 920px) {
  .hero,
  .control-strip,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .state-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .johor-summary-grid,
  .hot-seat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    padding: 22px;
  }

  .hero-panel,
  .state-map {
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    min-height: 78px;
  }

  .hero-panel strong {
    font-size: 1.6rem;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .party-row {
    grid-template-columns: 72px 1fr 28px;
  }

  .johor-shell {
    width: min(100% - 20px, 1240px);
  }

  .johor-summary-grid,
  .hot-seat-list,
  .seat-meta {
    grid-template-columns: 1fr;
  }

  .hot-seat-header,
  .winner-strip {
    grid-template-columns: 1fr;
  }

  .hot-seat-header {
    flex-direction: column;
  }

  .majority-box {
    text-align: left;
  }
}

/* Johor hot-seat route: Astro Awani-inspired card layout */
.awani-page {
  background: #ffffff;
  color: #414042;
}

.awani-shell {
  width: min(1320px, calc(100% - 42px));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.awani-title {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 34px;
  text-align: center;
  text-transform: uppercase;
}

.awani-title p {
  margin: 0;
  color: #40434a;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.awani-title h1 {
  margin: 0;
  max-width: none;
  color: #c49a6c;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.awani-title span {
  width: 92px;
  height: 4px;
  margin-top: 6px;
  background: #c49a6c;
}

.awani-card-grid {
  column-count: 3;
  column-gap: 22px;
}

.awani-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
  break-inside: avoid;
}

.awani-card-top {
  height: 9px;
  background: #000080;
}

.awani-card.party-ph .awani-card-top,
.awani-card.is-close .awani-card-top {
  background: #e31b2f;
}

.awani-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 132px;
  gap: 12px;
  align-items: start;
  padding: 18px 18px 12px;
}

.seat-label {
  align-self: end;
  padding-top: 38px;
}

.seat-label span {
  display: block;
  margin-bottom: 5px;
  color: #414042;
  font-size: 0.95rem;
  font-weight: 900;
}

.seat-label h2 {
  margin: 0;
  color: #414042;
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
}

.awani-brand {
  justify-self: end;
  width: 54px;
  padding: 3px 4px 4px;
  color: #ffffff;
  background: linear-gradient(180deg, #a31722 0 44%, #f05a28 44% 100%);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
}

.awani-brand strong {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}

.awani-majority {
  grid-column: 3;
  justify-self: end;
  margin-top: 36px;
  text-align: right;
}

.awani-majority span {
  display: block;
  margin-bottom: 3px;
  color: #8b8d91;
  font-size: 0.94rem;
}

.awani-majority strong {
  color: #000080;
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 950;
  line-height: 1;
}

.awani-card.party-ph .awani-majority strong,
.awani-card.is-close .awani-majority strong {
  color: #e31b2f;
}

.awani-table-head {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 12px;
  padding: 5px 18px 6px;
  color: #85878b;
  border-bottom: 1px solid #d9dce1;
  font-size: 0.95rem;
}

.awani-table-head span:last-child {
  text-align: right;
}

.awani-candidates {
  padding: 0 18px;
}

.awani-candidate {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 72px 94px;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  border-bottom: 1px solid #e2e5ea;
}

.candidate-party-bar {
  width: 10px;
  height: 44px;
}

.awani-candidate-name {
  min-width: 0;
}

.awani-candidate-name span {
  display: block;
  color: #4d4f54;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.06;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.awani-candidate-name strong {
  display: block;
  color: #36383d;
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.winner-check {
  justify-self: center;
  position: relative;
  width: 46px;
  height: 46px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.winner-check::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 5px;
  width: 15px;
  height: 27px;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: rotate(42deg);
}

.awani-vote {
  text-align: right;
}

.awani-vote strong {
  display: block;
  color: #414042;
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1.05;
}

.awani-vote span {
  display: block;
  margin-top: 2px;
  color: #414042;
  font-size: 0.88rem;
  font-weight: 700;
}

.awani-meta {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  color: #414042;
  background: #f0f3f7;
  font-size: 1rem;
  line-height: 1.25;
}

.awani-meta strong {
  font-weight: 950;
}

.awani-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px 18px;
  background: #ffffff;
}

.awani-card-footer span {
  display: block;
  color: #8b8d91;
  font-size: 0.92rem;
}

.awani-card-footer strong {
  display: block;
  margin-top: 3px;
  color: #6f7277;
  font-size: 0.95rem;
  font-weight: 700;
}

.share-icons {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #c49a6c;
  font-weight: 950;
}

.share-icons span {
  display: inline-flex;
  color: #c49a6c;
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 1100px) {
  .awani-card-grid {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  .awani-shell {
    width: min(100% - 22px, 1320px);
    padding-top: 28px;
  }

  .awani-title {
    margin-bottom: 24px;
  }

  .awani-card-grid {
    column-count: 1;
  }

  .awani-card-header {
    grid-template-columns: minmax(0, 1fr) 54px 104px;
    padding: 15px 14px 10px;
  }

  .seat-label {
    padding-top: 32px;
  }

  .seat-label h2 {
    font-size: 1.05rem;
  }

  .awani-majority {
    margin-top: 34px;
  }

  .awani-majority strong {
    font-size: 1.85rem;
  }

  .awani-table-head,
  .awani-candidates,
  .awani-meta,
  .awani-card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .awani-candidate {
    grid-template-columns: 9px minmax(0, 1fr) 42px 82px;
    gap: 8px;
  }

  .winner-check {
    width: 34px;
    height: 34px;
    border-width: 3px;
  }

  .winner-check::after {
    left: 9px;
    top: 4px;
    width: 11px;
    height: 19px;
    border-right-width: 3px;
    border-bottom-width: 3px;
  }

  .share-icons {
    display: none;
  }
}

/* Refined Johor hot-seat route */
body.johor-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(188, 148, 88, 0.12), transparent 360px),
    #f5f7fb;
  color: #23262d;
}

.johor-page .awani-shell {
  width: min(1280px, calc(100% - 36px));
  padding: 26px 0 56px;
}

.johor-hero-card {
  overflow: hidden;
  margin-bottom: 16px;
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(178, 35, 48, 0.94), rgba(16, 40, 84, 0.98) 54%, rgba(22, 91, 69, 0.92)),
    #102854;
  border-radius: 8px;
  box-shadow: 0 22px 55px rgba(21, 32, 53, 0.18);
}

.johor-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.johor-nav a {
  color: #ffdf9a;
  text-decoration: none;
}

.johor-nav a:hover {
  color: #ffffff;
}

.johor-nav span {
  color: rgba(255, 255, 255, 0.72);
}

.johor-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: end;
  padding: 42px 32px 32px;
}

.johor-kicker {
  margin: 0 0 10px;
  color: #ffdf9a;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.johor-hero-card h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 0.94;
}

.johor-lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.04rem;
  line-height: 1.58;
}

.johor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.johor-stats div {
  min-height: 108px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.johor-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.73rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.johor-stats strong {
  display: block;
  margin-top: 12px;
  color: #ffffff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}

.johor-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 0 0 18px;
}

.johor-search,
.johor-filter {
  background: #ffffff;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(26, 39, 62, 0.07);
}

.johor-search {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.johor-search span {
  color: #6a7280;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.johor-search input {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  color: #111827;
  background: #f8fafc;
  border: 1px solid #dce4ef;
  border-radius: 6px;
  outline: none;
}

.johor-search input:focus {
  border-color: #b22330;
  box-shadow: 0 0 0 3px rgba(178, 35, 48, 0.12);
}

.johor-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  padding: 14px;
}

.johor-filter button {
  min-height: 40px;
  padding: 0 14px;
  color: #354052;
  background: #f8fafc;
  border: 1px solid #dce4ef;
  border-radius: 999px;
  font-weight: 850;
}

.johor-filter button.active,
.johor-filter button:hover {
  color: #ffffff;
  background: #172554;
  border-color: #172554;
}

.johor-page .awani-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  column-count: auto;
}

.johor-page .awani-card {
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dde5ee;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(22, 34, 52, 0.09);
}

.johor-page .awani-card-top {
  height: 7px;
  background: var(--winner-color, #0b63ce);
}

.johor-page .awani-card.party-ph .awani-card-top,
.johor-page .awani-card.is-close .awani-card-top {
  background: var(--winner-color, #d62828);
}

.johor-page .awani-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff, #fbfcff);
}

.johor-page .seat-label {
  align-self: auto;
  padding-top: 0;
}

.johor-page .seat-label span {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 8px;
  color: #5f6876;
  background: #eef3f8;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.johor-page .seat-label h2 {
  color: #1f2937;
  font-size: 1.12rem;
  font-weight: 950;
  line-height: 1.18;
}

.johor-page .awani-brand {
  justify-self: end;
  width: 54px;
  min-height: 39px;
  padding: 5px 4px;
  border-radius: 4px;
}

.johor-page .awani-majority {
  grid-column: 1 / -1;
  justify-self: stretch;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 13px 14px;
  text-align: left;
  background: #f3f6fa;
  border-radius: 8px;
}

.seat-badges {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.seat-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #344054;
  background: #eef3f8;
  border: 1px solid #dce4ef;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.seat-badge.hot {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.seat-badge.stronghold {
  color: #7c2d12;
  background: #fff7ed;
  border-color: #fed7aa;
}

.seat-badge.changed {
  color: #075985;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.seat-badge.official {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.johor-page .awani-majority span {
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.johor-page .awani-majority strong {
  color: var(--winner-color, #0b63ce);
  font-size: 2rem;
}

.johor-page .awani-table-head {
  grid-template-columns: 1fr 106px;
  padding: 12px 18px 8px;
  color: #777f8d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.johor-page .awani-candidates {
  padding: 0 18px;
}

.johor-page .awani-candidate {
  grid-template-columns: 8px minmax(0, 1fr) 34px 88px;
  gap: 10px;
  min-height: 60px;
}

.johor-page .candidate-party-bar {
  width: 8px;
  height: 40px;
  border-radius: 999px;
}

.johor-page .awani-candidate-name span {
  color: #374151;
  font-size: 0.88rem;
  font-weight: 800;
}

.johor-page .awani-candidate-name strong {
  margin-top: 4px;
  color: var(--winner-color, #1f2937);
  font-size: 0.84rem;
}

.johor-page .winner-check {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.johor-page .winner-check::after {
  left: 7px;
  top: 3px;
  width: 9px;
  height: 16px;
  border-right-width: 3px;
  border-bottom-width: 3px;
}

.johor-page .awani-vote strong {
  color: #111827;
  font-size: 1rem;
}

.johor-page .awani-vote span {
  color: #667085;
  font-size: 0.8rem;
}

.johor-page .awani-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: auto;
  padding: 0;
  background: #dce4ef;
}

.johor-page .awani-meta strong {
  min-height: 68px;
  padding: 12px;
  color: #273244;
  background: #f8fafc;
  font-size: 0.82rem;
  line-height: 1.32;
}

.seat-history {
  display: grid;
  gap: 9px;
  padding: 14px 18px;
  background: #ffffff;
  border-top: 1px solid #e7edf4;
}

.seat-history h3 {
  margin: 0 0 2px;
  color: #1f2937;
  font-size: 0.84rem;
  font-weight: 950;
}

.seat-history div {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  background: #f8fafc;
  border: 1px solid #e7edf4;
  border-radius: 8px;
}

.seat-history span,
.seat-history small {
  color: #697386;
  font-size: 0.76rem;
  font-weight: 800;
}

.seat-history strong {
  color: #273244;
  font-size: 0.82rem;
  line-height: 1.25;
}

.johor-page .awani-card-footer {
  padding: 13px 18px 16px;
}

.johor-page .share-icons {
  gap: 7px;
}

.johor-page .share-icons span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #8a6d3f;
  background: #fff7e8;
  border-radius: 50%;
  font-size: 0.74rem;
}

.johor-empty {
  margin: 22px 0 0;
  padding: 22px;
  color: #667085;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

@media (max-width: 1120px) {
  .johor-page .awani-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .johor-hero-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .johor-page .awani-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 12px;
  }

  .johor-hero-layout,
  .johor-nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .johor-hero-layout {
    padding-top: 30px;
  }

  .johor-stats,
  .johor-toolbar,
  .johor-page .awani-card-grid,
  .johor-page .awani-meta {
    grid-template-columns: 1fr;
  }

  .johor-stats div {
    min-height: 86px;
  }

  .johor-page .awani-card-header {
    grid-template-columns: minmax(0, 1fr) 54px;
    padding: 16px 14px;
  }

  .johor-page .awani-majority {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .johor-page .awani-table-head,
  .johor-page .awani-candidates,
  .johor-page .awani-card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .johor-page .awani-candidate {
    grid-template-columns: 7px minmax(0, 1fr) 28px 78px;
    gap: 8px;
  }

  .johor-page .share-icons {
    display: none;
  }
}

/* Final modern Johor overrides v8 */
body.johor-page {
  background: linear-gradient(180deg, #eef3f8 0, #f7f9fc 320px, #f7f9fc 100%);
  color: #182230;
}

.johor-page .awani-shell {
  width: min(1440px, calc(100% - 44px));
  padding: 28px 0 64px;
}

.johor-hero-card {
  position: relative;
  margin-bottom: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827 0%, #17324f 48%, #0f5b53 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.2);
  isolation: isolate;
}

.johor-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 82%, transparent);
  opacity: 0.26;
}

.johor-hero-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 500px);
  gap: 42px;
  padding: 42px 36px 34px;
}

.johor-hero-card h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: 0;
}

.johor-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  align-items: center;
  margin-bottom: 22px;
  padding: 8px 0;
  background: rgba(247, 249, 252, 0.86);
  backdrop-filter: blur(16px);
}

.johor-filter button {
  border-radius: 10px;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.johor-filter button:hover {
  transform: translateY(-1px);
}

.johor-filter button.active,
.johor-filter button:hover {
  background: #111827;
  border-color: #111827;
}

.johor-page .awani-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.johor-page .awani-card {
  position: relative;
  border: 1px solid #e3e9f1;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(21, 34, 50, 0.08);
  animation: johorFadeUp 420ms ease both;
  animation-delay: calc(var(--card-index, 0) * 42ms);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.johor-page .awani-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--winner-color, #0b63ce), #ffffff 55%);
  box-shadow: 0 24px 60px rgba(21, 34, 50, 0.14);
}

.johor-page .awani-card-header {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px 18px 16px;
  background: #ffffff;
}

.johor-page .awani-brand,
.johor-page .share-icons {
  display: none;
}

.johor-page .awani-majority {
  margin-top: 2px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
  border: 1px solid #e7edf4;
  border-radius: 12px;
}

.johor-page .awani-candidate {
  grid-template-columns: 6px minmax(0, 1fr) 30px 82px;
  min-height: 66px;
}

.candidate-share {
  display: block;
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: 999px;
}

.candidate-share i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left;
  animation: johorFill 720ms ease both;
  animation-delay: calc(var(--card-index, 0) * 35ms + 140ms);
}

@media (max-width: 1320px) {
  .johor-page .awani-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .johor-page .awani-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .johor-page .awani-shell {
    width: min(100% - 20px, 1440px);
  }

  .johor-toolbar {
    position: static;
    padding-top: 0;
  }

  .johor-page .awani-card-grid,
  .johor-hero-layout {
    grid-template-columns: 1fr;
  }
}

/* Interactive Johor map */
.johor-map-panel {
  margin: 0 0 22px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(21, 34, 50, 0.08);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7edf4;
}

.map-mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #4b5563;
}

.map-mode strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  color: #ffffff;
  background: #c29a68;
  border-radius: 8px;
  font-size: 0.9rem;
}

.map-tools {
  display: flex;
  gap: 9px;
}

.map-tools button {
  min-width: 40px;
  min-height: 38px;
  padding: 0 12px;
  color: #8a642f;
  background: #fff8ee;
  border: 1px solid #ead6bd;
  border-radius: 10px;
  font-weight: 900;
}

.map-tools button:hover {
  color: #ffffff;
  background: #a77942;
}

.map-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 50%, rgba(17, 24, 39, 0.05), transparent 44%),
    #ffffff;
}

#johor-map {
  display: block;
  width: 100%;
  height: 620px;
}

.map-coast {
  fill: rgba(6, 59, 142, 0.06);
  stroke: rgba(12, 30, 66, 0.12);
  stroke-width: 2;
}

.map-seat {
  stroke: #172033;
  stroke-width: 1.4;
  cursor: pointer;
  transition:
    opacity 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.map-seat.is-muted {
  opacity: 0.16;
}

.map-seat:hover,
.map-seat.is-selected {
  filter: brightness(1.18);
  stroke: #ffffff;
  stroke-width: 3;
}

.map-label {
  fill: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
  text-anchor: middle;
}

.map-label.is-muted {
  opacity: 0.2;
}

.map-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 230px;
  max-width: 310px;
  padding: 12px 13px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 10px;
  box-shadow: 0 20px 55px rgba(17, 24, 39, 0.2);
  pointer-events: none;
}

.map-tooltip strong,
.map-tooltip span,
.map-tooltip p,
.map-tooltip small {
  display: block;
}

.map-tooltip strong {
  padding-bottom: 8px;
  border-bottom: 1px solid #e7edf4;
}

.map-tooltip span {
  width: fit-content;
  margin-top: 10px;
  padding: 4px 8px;
  color: #ffffff;
  background: #063b8e;
  border-radius: 6px;
  font-weight: 900;
}

.map-tooltip p {
  margin: 8px 0 0;
  font-weight: 900;
}

.map-tooltip small {
  margin-top: 6px;
  color: #667085;
  font-weight: 800;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  color: #4b5563;
  border-top: 1px solid #e7edf4;
  font-size: 0.86rem;
  font-weight: 800;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.map-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

@media (max-width: 760px) {
  .johor-map-panel {
    padding: 12px;
  }

  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-stage {
    min-height: 390px;
  }

  #johor-map {
    height: 390px;
  }

  .map-tooltip {
    min-width: 210px;
  }
}

/* Absolute final header fix v13: no card, no banner */
body.johor-page .johor-hero-card {
  display: block !important;
  width: min(920px, 100%) !important;
  max-width: 920px !important;
  margin: 0 auto 18px !important;
  padding: 0 !important;
  color: #182230 !important;
  text-align: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.johor-page .johor-hero-card::before,
body.johor-page .johor-hero-card::after {
  display: none !important;
  content: none !important;
}

body.johor-page .johor-nav {
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 0 10px !important;
}

body.johor-page .johor-hero-layout {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
}

body.johor-page .johor-kicker {
  margin: 0 0 8px !important;
  color: #9b7444 !important;
}

body.johor-page .johor-hero-card h1 {
  max-width: 780px !important;
  margin: 0 auto !important;
  color: #182230 !important;
  font-size: clamp(2rem, 4vw, 3.7rem) !important;
  line-height: 1.03 !important;
}

body.johor-page .johor-lede {
  max-width: 760px !important;
  margin: 12px auto 0 !important;
  color: #596579 !important;
  font-size: 0.98rem !important;
}

body.johor-page .johor-stats {
  display: none !important;
}

body.johor-page .johor-map-panel {
  margin-top: 0 !important;
}

/* Global font v14 */
html,
body,
button,
input,
select,
textarea {
  font-family: "Montserrat", Arial, Helvetica, sans-serif !important;
}

/* Negeri Sembilan pending-state page */
body.ns-page .johor-kicker {
  color: #7c5f35 !important;
}

body.ns-page .johor-map-panel {
  border-color: #dce3ed;
}

body.ns-page .ns-map-outline {
  fill: rgba(37, 99, 235, 0.055);
  stroke: rgba(30, 41, 59, 0.12);
}

body.ns-page .ns-map-seat {
  fill: #2563eb;
}

body.ns-page .ns-map-seat.is-muted {
  fill: #94a3b8;
  opacity: 0.22;
}

body.ns-page .ns-map-seat:hover {
  fill: #f59e0b;
}

body.ns-page .ns-card .awani-card-top {
  background: #64748b;
}

body.ns-page .ns-card .awani-majority strong {
  color: #475569;
  font-size: 1.35rem;
}

body.ns-page .seat-badge.pending {
  color: #854d0e;
  background: #fffbeb;
  border-color: #fde68a;
}

body.ns-page .ns-placeholder-row .candidate-party-bar {
  background: #cbd5e1;
}

body.ns-page .ns-note strong {
  font-size: 0.78rem;
}

.hero-link + .hero-link {
  margin-left: 10px;
}

.hero-link.state-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

@media (max-width: 640px) {
  .hero-link + .hero-link {
    margin-left: 0;
  }
}

.state-directory-panel {
  margin: 18px 0;
}

.state-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.state-directory a {
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 14px;
  color: #1f2937;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #dce4ef;
  border-radius: 8px;
}

.state-directory a:hover {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

.state-directory span {
  font-weight: 900;
}

.state-directory strong {
  color: inherit;
  font-size: 0.9rem;
}

body.pending-state-page .johor-stats {
  display: none !important;
}

body.pending-state-page .johor-hero-card h1 {
  max-width: 920px !important;
}

@media (max-width: 900px) {
  .state-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .state-directory {
    grid-template-columns: 1fr;
  }
}

.legacy-dashboard-controls {
  display: none;
}

.state-picker-section {
  margin: 18px 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.state-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e7edf4;
}

.state-picker-head span {
  display: block;
  color: #697386;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state-picker-head h2 {
  margin: 5px 0 0;
  color: #101828;
  font-size: 1.35rem;
  line-height: 1.15;
}

.state-picker-head strong {
  white-space: nowrap;
  color: #9b7444;
}

.state-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.state-picker-grid a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: end;
  min-height: 94px;
  padding: 14px;
  color: #172033;
  text-decoration: none;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #dce4ef;
  border-radius: 10px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.state-picker-grid a::after {
  content: "Buka";
  position: absolute;
  right: 12px;
  top: 12px;
  color: #9b7444;
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.state-picker-grid a:hover {
  transform: translateY(-2px);
  background: #111827;
  border-color: #111827;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.18);
}

.state-picker-grid a:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.state-picker-grid a:hover span,
.state-picker-grid a:hover strong,
.state-picker-grid a:hover small {
  color: #ffffff;
}

.state-picker-grid span {
  grid-column: 1 / -1;
  color: #101828;
  font-weight: 900;
  line-height: 1.2;
}

.state-picker-grid strong {
  color: #102a43;
  font-size: 2rem;
  line-height: 1;
}

.state-picker-grid small {
  color: #697386;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .state-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .state-picker-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .state-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .state-picker-grid {
    grid-template-columns: 1fr;
  }
}

/* Homepage no-card layout v18 */
body:not(.johor-page) {
  background: #f7f9fc !important;
}

body:not(.johor-page) .site-shell {
  width: min(1360px, calc(100% - 42px));
  padding-top: 34px;
}

body:not(.johor-page) .hero {
  display: block;
  min-height: 0;
  padding: 0 0 24px;
  color: #172033;
  background: transparent !important;
  border-radius: 0;
  overflow: visible;
}

body:not(.johor-page) .hero::after {
  display: none;
}

body:not(.johor-page) .hero-copy {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

body:not(.johor-page) .eyebrow {
  margin: 0 auto 14px;
  color: #9b7444;
  background: transparent;
  border-color: #d8c4a6;
}

body:not(.johor-page) h1 {
  max-width: 940px;
  margin: 0 auto;
  color: #101828;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

body:not(.johor-page) .hero-copy p {
  max-width: 760px;
  margin: 18px auto 0;
  color: #596579;
}

body:not(.johor-page) .hero-link {
  justify-content: center;
  margin-top: 24px;
  color: #ffffff;
  background: #111827;
  border-radius: 10px;
}

body:not(.johor-page) .hero-panel {
  display: none;
}

body:not(.johor-page) .state-picker-section {
  margin-top: 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:not(.johor-page) .state-picker-head {
  justify-content: center;
  padding: 0 0 16px;
  text-align: center;
  border-bottom: 0;
}

body:not(.johor-page) .state-picker-head > strong {
  display: none;
}

body:not(.johor-page) .state-picker-grid {
  padding: 0;
}

body:not(.johor-page) .state-picker-grid a {
  background: transparent;
  border: 1px solid #dce4ef;
  box-shadow: none;
}

body:not(.johor-page) .state-picker-grid a:hover {
  background: #111827;
}

.state-flag {
  grid-column: 1 / -1;
  display: block;
  width: 52px;
  height: 32px;
  margin-bottom: 4px;
  overflow: hidden;
  background: #e5e7eb;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.state-picker-grid a:hover .state-flag {
  border-color: rgba(255, 255, 255, 0.5);
}

.flag-perlis {
  background: linear-gradient(180deg, #f7d117 0 50%, #123f8c 50% 100%);
}

.flag-kedah {
  background:
    radial-gradient(circle at 50% 50%, #f7d117 0 18%, transparent 19%),
    #c8102e;
}

.flag-kelantan {
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 15%, transparent 16%),
    #d71920;
}

.flag-terengganu {
  background:
    linear-gradient(90deg, #ffffff 0 18%, transparent 18% 82%, #ffffff 82% 100%),
    linear-gradient(180deg, #ffffff 0 20%, #111827 20% 80%, #ffffff 80% 100%);
}

.flag-pulau-pinang {
  background:
    radial-gradient(circle at 50% 52%, #16a34a 0 12%, transparent 13%),
    linear-gradient(90deg, #5b8def 0 33%, #ffffff 33% 66%, #f7d117 66% 100%);
}

.flag-perak {
  background: linear-gradient(180deg, #ffffff 0 33%, #f7d117 33% 66%, #111827 66% 100%);
}

.flag-pahang {
  background: linear-gradient(180deg, #ffffff 0 50%, #111827 50% 100%);
}

.flag-selangor {
  background:
    radial-gradient(circle at 70% 30%, #ffffff 0 11%, transparent 12%),
    linear-gradient(90deg, #f7d117 0 50%, #c8102e 50% 100%);
}

.flag-negeri-sembilan {
  background:
    linear-gradient(135deg, #111827 0 34%, transparent 34%),
    linear-gradient(45deg, #c8102e 0 34%, transparent 34%),
    #f7d117;
}

.flag-melaka {
  background:
    linear-gradient(90deg, #0b63ce 0 50%, transparent 50%),
    linear-gradient(180deg, #ffffff 0 50%, #c8102e 50% 100%);
}

.flag-johor {
  background:
    radial-gradient(circle at 27% 36%, #ffffff 0 8%, transparent 9%),
    linear-gradient(135deg, #0b3d91 0 38%, transparent 39%),
    #c8102e;
}

.flag-sabah {
  background:
    linear-gradient(180deg, #5bc0eb 0 33%, #ffffff 33% 66%, #d71920 66% 100%);
}

.flag-sarawak {
  background:
    linear-gradient(145deg, transparent 0 38%, #111827 39% 52%, transparent 53%),
    linear-gradient(160deg, transparent 0 44%, #c8102e 45% 59%, transparent 60%),
    #f7d117;
}

.state-flag-img {
  grid-column: 1 / -1;
  display: block;
  width: 64px;
  height: 40px;
  margin-bottom: 4px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.state-picker-grid a:hover .state-flag-img {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.visitor-badge {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: grid;
  min-width: 124px;
  gap: 3px;
  padding: 10px 13px;
  color: #101828;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(14px);
  animation: visitorEnter 0.45s ease both;
}

.visitor-badge span {
  color: #697386;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.visitor-badge strong {
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.05;
}

.visitor-badge--bump {
  animation: visitorBump 0.55s ease both;
}

@keyframes visitorEnter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes visitorBump {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.13);
  }
  45% {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.2);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.13);
  }
}

@media (max-width: 640px) {
  .visitor-badge {
    top: auto;
    right: 10px;
    bottom: 10px;
    min-width: 112px;
  }
}

.seo-copy {
  max-width: 860px;
  margin: 44px auto 0;
  text-align: center;
}

.seo-copy h2 {
  margin: 0;
  color: #111827;
  font-size: 1.25rem;
}

.seo-copy p {
  margin: 12px auto 0;
  color: #596579;
  font-size: 0.98rem;
  line-height: 1.75;
}

.ad-slot {
  width: min(100%, 970px);
  min-height: 92px;
  margin: 26px auto;
  padding: 10px 0 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ad-slot span {
  display: block;
  margin-bottom: 8px;
  color: #98a2b3;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.ad-slot .adsbygoogle {
  display: block;
  min-height: 80px;
}
