:root {
  --navy: #092f56;
  --ink: #233044;
  --muted: #6f788d;
  --gold: #c58a25;
  --gold-light: #f0c35b;
  --purple: #2d1b57;
  --cream: #fff8eb;
  --blue: #25aafc;
  --cell: clamp(30px, 5.9vw, 64px);
  --board-scene-height: clamp(520px, 72vh, 980px);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f5ead7, #eef3f0);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

body > :not(#penrose) {
  position: relative;
  z-index: 1;
}

#penrose {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

a {
  text-decoration: none;
}

.viking-header {
  display: flex;
  width: min(1180px, calc(100% - 36px));
  margin: 22px auto 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(240,195,91,0.18), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(232,244,249,0.58));
  box-shadow: 0 18px 44px rgba(5,33,62,0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font: 800 clamp(16px, 2.2vw, 22px)/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(12, 48, 82, 0.12);
  border-radius: 14px 14px 17px 17px;
  background: #fbf4e9;
  box-shadow: 0 8px 18px rgba(12, 48, 82, 0.16);
}

.brand-mark img {
  width: 41px;
  transform: translateY(-2px);
}

.viking-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-button {
  display: inline-flex;
  min-width: 126px;
  height: 44px;
  padding: 8px 16px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(9,47,86,0.26);
  border-radius: 999px;
  color: var(--navy);
  background:
    radial-gradient(circle at 18% 12%, rgba(244,199,93,0.22), transparent 34%),
    linear-gradient(135deg, rgba(255,253,247,0.9), rgba(229,242,250,0.72));
  box-shadow:
    0 8px 18px rgba(5,33,62,0.11),
    inset 0 1px 0 rgba(255,255,255,0.92);
  font: 700 15px/1 "Poppins", "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nav-button:hover,
.nav-button:focus-visible {
  border-color: rgba(161,62,62,0.5);
  box-shadow: 0 10px 22px rgba(106,38,54,0.14);
  transform: translateY(-1px);
}

.nav-button.primary {
  border-color: rgba(197,138,37,0.42);
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
}

.difficulty-control {
  display: grid;
  width: 176px;
  min-height: 44px;
  padding: 7px 12px 8px;
  border: 1.5px solid rgba(9,47,86,0.2);
  border-radius: 18px;
  color: var(--navy);
  background:
    radial-gradient(circle at 18% 12%, rgba(244,199,93,0.18), transparent 36%),
    linear-gradient(135deg, rgba(255,253,247,0.88), rgba(229,242,250,0.7));
  box-shadow:
    0 8px 18px rgba(5,33,62,0.1),
    inset 0 1px 0 rgba(255,255,255,0.9);
  gap: 3px;
}

.difficulty-control span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.difficulty-control strong {
  font-size: 13px;
  line-height: 1;
}

.difficulty-control input {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.viking-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 50px;
}

.hero-panel,
.board-card,
.rules-card {
  border: 1px solid rgba(255,255,255,0.78);
  background:
    radial-gradient(circle at 18% 8%, rgba(240,195,91,0.16), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.74), rgba(236,247,253,0.56));
  box-shadow:
    0 18px 44px rgba(5,33,62,0.14),
    inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font: 800 12px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--navy);
  font: 800 clamp(42px, 7vw, 78px)/0.92 Georgia, "Times New Roman", serif;
}

h2 {
  margin-bottom: 14px;
  color: var(--navy);
  font: 800 28px/1.05 Georgia, "Times New Roman", serif;
}

.intro {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.45;
}

.turn-card {
  min-width: min(290px, 100%);
  padding: 18px 20px;
  border: 1px solid rgba(9,47,86,0.14);
  border-radius: 22px;
  color: var(--navy);
  background: rgba(255,255,255,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
}

.turn-card span,
.score-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.turn-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.turn-card small {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(197,138,37,0.28);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255,248,235,0.74);
  font-size: 12px;
  font-weight: 800;
}

.turn-card.defenders {
  border-color: rgba(37,170,252,0.28);
}

.turn-card.finished {
  border-color: rgba(197,138,37,0.5);
  background: rgba(255,248,230,0.86);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

body.rules-hidden .game-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.rules-hidden .rules-card {
  display: none;
}

.board-card,
.rules-card {
  border-radius: 30px;
}

.board-card {
  padding: clamp(16px, 3vw, 28px);
  overflow-x: auto;
}

.board-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: min(100%, 1180px);
  min-width: 0;
  margin: 0 auto;
}

.board-capture-counter {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1px solid rgba(45, 27, 87, 0.14);
  border-radius: 20px;
  color: var(--navy);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 195, 91, 0.2), transparent 58%),
    linear-gradient(135deg, rgba(255, 252, 243, 0.78), rgba(232, 246, 255, 0.66));
  box-shadow:
    0 14px 28px rgba(5, 33, 62, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.board-capture-counter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.board-capture-counter strong {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(45, 27, 87, 0.16);
  border-radius: 16px;
  font-family: "Georgia", serif;
  font-size: 26px;
  line-height: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 235, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.tafl-board {
  display: grid;
  box-sizing: content-box;
  width: calc(var(--cell) * 11);
  grid-template-columns: repeat(11, var(--cell));
  grid-template-rows: repeat(11, var(--cell));
  margin: 0 auto;
  padding: 8px;
  border: 2px solid rgba(45,27,87,0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 50%, rgba(240,195,91,0.18), transparent 30%),
    linear-gradient(135deg, rgba(45,27,87,0.18), rgba(255,248,235,0.5));
  box-shadow:
    0 18px 36px rgba(5,33,62,0.16),
    inset 0 0 0 8px rgba(255,255,255,0.22);
}

.loki-chess-lab-page .tafl-board.tafl-board-3d {
  display: block;
  box-sizing: border-box;
  justify-self: center;
  grid-column: 1 / -1;
  width: min(100%, 1080px);
  height: var(--board-scene-height);
  min-height: 420px;
  padding: 0;
  border: 2px solid rgba(45, 27, 87, 0.22);
  border-radius: 22px;
  background: #10161b;
  box-shadow:
    0 22px 46px rgba(5, 33, 62, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  cursor: grab;
  outline: none;
  touch-action: none;
}

.loki-chess-lab-page .tafl-board.tafl-board-3d.tafl-board-top-view {
  aspect-ratio: 1 / 1;
  width: min(100%, 88dvh, 1080px);
  height: auto;
  min-height: 0;
  max-height: none;
}

.loki-chess-lab-page .tafl-board.tafl-board-3d:active {
  cursor: grabbing;
}

.notation-panel {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 14px;
  width: calc(var(--cell) * 11 + 20px);
  margin: 16px auto 0;
  padding: 14px;
  border: 1px solid rgba(9,47,86,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.notation-panel .eyebrow {
  margin-bottom: 4px;
}

.notation-panel p:last-child {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
}

.notation-panel ol {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 8px;
  align-items: center;
  list-style: none;
  overflow-x: auto;
}

.notation-panel li {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(9,47,86,0.1);
  border-radius: 999px;
  color: #3d465c;
  background: rgba(255,255,255,0.66);
  font-size: 12px;
  font-weight: 800;
}

.rules-card {
  padding: 24px;
}

.rule-section + .rule-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(9,47,86,0.12);
}

.rule-section h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font: 800 15px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
}

.rules-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.special-rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.special-rule-card {
  padding: 12px 14px;
  border: 1px solid rgba(9,47,86,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

.special-rule-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 14px;
}

.special-rule-card .special-rule-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.special-rule-card .special-rule-title .loki-token {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.special-rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.special-rule-card p + p {
  margin-top: 6px;
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.score-grid div {
  padding: 14px;
  border: 1px solid rgba(9,47,86,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.66);
}

.score-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 28px;
}

@media (max-width: 900px) {
  .viking-header,
  .hero-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .viking-actions {
    width: 100%;
    justify-content: stretch;
  }

  .nav-button {
    flex: 1 1 120px;
  }

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

@media (max-width: 560px) {
  :root {
    --cell: min(7.6vw, 38px);
  }

  .viking-header,
  .viking-shell {
    width: min(100% - 18px, 1180px);
  }

  .brand {
    font-size: 15px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-mark img {
    width: 35px;
  }

  .board-legend {
    display: none;
  }

  .notation-panel {
    width: calc(var(--cell) * 11 + 10px);
    grid-template-columns: 1fr;
  }

  .board-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .board-capture-counter {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 8px;
  }

  .board-capture-counter strong {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 22px;
  }

  .tafl-board {
    grid-column: 1 / -1;
    padding: 5px;
    border-radius: 18px;
  }
}


/* Loki Chess Lab: copied 2D Viking Chess base with lab-only visual tokens. */
.loki-chess-lab-page .brand span:last-child {
  letter-spacing: 0.02em;
}

.loki-chess-lab-page .hero-panel {
  overflow: hidden;
}

.loki-chess-lab-page .hero-panel::after {
  content: none;
  color: rgba(9, 47, 86, 0.06);
  font: 900 clamp(72px, 16vw, 180px)/1 "Poppins", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  position: absolute;
  right: clamp(16px, 4vw, 42px);
  bottom: -0.2em;
  pointer-events: none;
}

.loki-piece-key {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(9, 47, 86, 0.12);
}

.loki-token-grid {
  display: grid;
  gap: 10px;
}

.loki-token-grid span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.loki-token {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.54),
    inset 0 -5px 8px rgba(5, 33, 62, 0.28),
    0 5px 10px rgba(5, 33, 62, 0.18);
}

.loki-token::after {
  content: "";
  position: absolute;
  inset: 6px 8px 10px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(255, 255, 255, 0.34);
}

.loki-token.frost-troll {
  background: linear-gradient(135deg, #151716 0 44%, #d5902e 45% 56%, #f2ead7 57% 100%);
}

.loki-token.general {
  background: linear-gradient(135deg, #f4ddae, #b8772d);
}

.loki-token.knight-horse {
  background: linear-gradient(135deg, #fff1c7, #327982);
}

.loki-token.trickster {
  background: linear-gradient(135deg, #29305f, #d49a2c 52%, #52b7b9);
}


.loki-chess-lab-page .turn-card small + small {
  margin-left: 6px;
}

.loki-chess-lab-page .exchange-pawn-strip {
  display: grid;
  width: calc(var(--cell) * 11 + 20px);
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 14px;
}

.loki-chess-lab-page .action-card {
  width: 100%;
  appearance: none;
  border: 0;
  font: inherit;
  text-align: left;
}

.loki-chess-lab-page .action-card:not(:disabled) {
  cursor: pointer;
}

.loki-chess-lab-page .action-card:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.loki-chess-lab-page .action-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(211, 152, 47, 0.62);
  box-shadow:
    0 16px 28px rgba(5, 33, 62, 0.14),
    0 0 0 3px rgba(240, 195, 91, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.loki-chess-lab-page .exchange-pawn-side {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(45, 27, 87, 0.14);
  border-radius: 18px;
  color: var(--navy);
  background:
    radial-gradient(circle at 14% 0%, rgba(240, 195, 91, 0.18), transparent 52%),
    linear-gradient(135deg, rgba(255, 252, 243, 0.78), rgba(232, 246, 255, 0.66));
  box-shadow:
    0 12px 22px rgba(5, 33, 62, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.loki-chess-lab-page .exchange-pawn-side span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.loki-chess-lab-page .exchange-pawn-side strong {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 170, 252, 0.24);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 900;
}

.loki-chess-lab-page .exchange-pawn-side strong.is-empty {
  border-color: rgba(91, 112, 133, 0.26);
  color: #617082;
  background: rgba(245, 248, 250, 0.72);
}

.loki-chess-lab-page .exchange-pawn {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 30px;
  border-radius: 50% 50% 42% 42%;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.82) 0 12%, transparent 13%),
    linear-gradient(180deg, #f1bc54, #5a351d 68%, #241914);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.36),
    inset 0 -7px 9px rgba(0, 0, 0, 0.28),
    0 4px 7px rgba(5, 33, 62, 0.18);
}

.loki-chess-lab-page .exchange-pawn::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -3px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b2417, #d79a36, #3b2417);
}

.loki-chess-lab-page .exchange-pawn-defenders {
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.9) 0 12%, transparent 13%),
    linear-gradient(180deg, #fff0c6, #d5a047 58%, #3b8189);
}

.loki-chess-lab-page .exchange-pawn.spent {
  opacity: 0.25;
  filter: grayscale(0.8);
}

@media (max-width: 560px) {
  .loki-chess-lab-page .exchange-pawn-strip {
    width: calc(var(--cell) * 11 + 10px);
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .loki-chess-lab-page .exchange-pawn-side {
    min-height: 50px;
    padding: 9px 10px;
  }
}


.loki-chess-lab-page .general-record-strip {
  display: grid;
  width: calc(var(--cell) * 11 + 20px);
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -4px auto 14px;
}

.loki-chess-lab-page .general-record-card {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(197, 138, 37, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(240, 195, 91, 0.16), transparent 55%),
    linear-gradient(135deg, rgba(255, 248, 235, 0.78), rgba(232, 246, 255, 0.58));
  box-shadow:
    0 12px 22px rgba(5, 33, 62, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.loki-chess-lab-page .general-record-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.loki-chess-lab-page .general-record-card strong {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(37, 170, 252, 0.24);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 900;
}

.loki-chess-lab-page .general-record-card strong.is-used {
  border-color: rgba(197, 138, 37, 0.38);
  color: #7a4d18;
  background: rgba(255, 236, 181, 0.74);
}

.loki-chess-lab-page .general-record-card strong.is-empty {
  border-color: rgba(91, 112, 133, 0.26);
  color: #617082;
  background: rgba(245, 248, 250, 0.72);
}

.loki-chess-lab-page .general-record-card strong.is-taken {
  border-color: rgba(161, 62, 62, 0.35);
  color: #8f3535;
  background: rgba(255, 234, 232, 0.74);
}

@media (max-width: 560px) {
  .loki-chess-lab-page .general-record-strip {
    width: calc(var(--cell) * 11 + 10px);
    grid-template-columns: 1fr;
    gap: 8px;
  }
}


.loki-chess-lab-page .frost-freeze-strip,
.loki-chess-lab-page .horse-hop-strip {
  display: grid;
  width: calc(var(--cell) * 11 + 20px);
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -4px auto 14px;
}

.loki-chess-lab-page .horse-hop-strip {
  margin-top: -6px;
}

.loki-chess-lab-page .frost-freeze-card,
.loki-chess-lab-page .horse-hop-card {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(54, 150, 179, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(184, 238, 250, 0.2), transparent 55%),
    linear-gradient(135deg, rgba(247, 253, 255, 0.78), rgba(232, 246, 255, 0.6));
  box-shadow:
    0 12px 22px rgba(5, 33, 62, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.loki-chess-lab-page .horse-hop-card {
  border-color: rgba(219, 154, 49, 0.24);
  background:
    radial-gradient(circle at 10% 0%, rgba(240, 195, 91, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(255, 248, 230, 0.78), rgba(232, 246, 255, 0.6));
}

.loki-chess-lab-page .frost-freeze-card span,
.loki-chess-lab-page .horse-hop-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.loki-chess-lab-page .frost-freeze-card strong,
.loki-chess-lab-page .horse-hop-card strong {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(54, 150, 179, 0.28);
  border-radius: 999px;
  color: #165470;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 900;
}

.loki-chess-lab-page .horse-hop-card strong {
  border-color: rgba(219, 154, 49, 0.34);
  color: #775019;
}

.loki-chess-lab-page .frost-freeze-card strong.is-empty,
.loki-chess-lab-page .horse-hop-card strong.is-empty {
  border-color: rgba(91, 112, 133, 0.26);
  color: #617082;
  background: rgba(245, 248, 250, 0.72);
}

@media (max-width: 560px) {
  .loki-chess-lab-page .frost-freeze-strip,
  .loki-chess-lab-page .horse-hop-strip {
    width: calc(var(--cell) * 11 + 10px);
    grid-template-columns: 1fr;
    gap: 8px;
  }
}


#loki-premium-content[hidden], #loki-premium-gate[hidden] { display: none !important; }
.loki-premium-gate {
  max-width: 560px;
  margin: 12vh auto;
  padding: 32px;
  border-radius: 24px;
  background: #fffbed;
  color: #123c49;
  box-shadow: 0 12px 30px #123c4926;
  text-align: center;
}
.loki-premium-gate .nav-button { display: inline-block; margin-top: 12px; }
