:root {
  --bg-deep: #0f1d27;
  --bg-mid: #183545;
  --sand: #f4ebd6;
  --paper: rgba(247, 241, 228, 0.92);
  --paper-strong: rgba(255, 249, 238, 0.98);
  --text: #1e2629;
  --muted: #5b676a;
  --gold: #d39b45;
  --ember: #ca6630;
  --green: #2f6b58;
  --line: rgba(38, 49, 54, 0.12);
  --shadow: 0 20px 54px rgba(6, 12, 16, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(211, 155, 69, 0.18), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(74, 160, 125, 0.2), transparent 24%),
    linear-gradient(145deg, var(--bg-deep), var(--bg-mid));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 78px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 78px);
  opacity: 0.32;
  pointer-events: none;
}

.portal-app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.portal-topbar,
.game-card,
.principle-card,
.domain-card {
  backdrop-filter: blur(12px);
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(16, 28, 35, 0.38);
  box-shadow: var(--shadow);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #f8f2e4;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #1f1910;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1.02rem;
}

.brand-copy span,
.topbar-note {
  color: rgba(248, 242, 228, 0.74);
  font-size: 0.94rem;
}

.portal-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  padding: 46px 0 40px;
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  row-gap: 22px;
  width: 100%;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.77rem;
  font-weight: 700;
  color: rgba(248, 242, 228, 0.7);
}

.hero-content > .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
  text-align: center;
}

.hero-content h1,
.section-head h2,
.principle-card h2,
.domain-card h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.hero-content h1 {
  grid-column: 2 / 12;
  margin: 0;
  max-width: none;
  color: #fff8ec;
  text-align: center;
  font-size: clamp(2.7rem, 5.4vw, 5.2rem);
  line-height: 0.95;
}

.hero-copy {
  grid-column: 3 / 11;
  max-width: none;
  margin: 0;
  color: rgba(248, 242, 228, 0.82);
  text-align: center;
  font-size: 1.08rem;
  line-height: 1.72;
}

.card-link,
.support-link,
.support-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.card-link {
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #21170f;
  box-shadow: 0 12px 28px rgba(130, 66, 18, 0.24);
}

.support-link,
.support-button {
  background: linear-gradient(135deg, #ffdc42, #f0b90a);
  color: #21170f;
  box-shadow: 0 12px 28px rgba(154, 109, 8, 0.2);
}

.support-link:hover,
.support-link:focus-visible,
.support-button:hover,
.support-button:focus-visible,
.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-1px);
}

.games-section,
.seo-section,
.support-section,
.principles-section {
  margin-top: 18px;
}

.seo-section {
  margin-top: 28px;
}

.support-section {
  margin-top: 28px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2,
.principle-card h2,
.domain-card h2 {
  margin: 0;
  color: #fff8ec;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.03;
}

.game-grid,
.seo-grid,
.principles-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.game-card,
.seo-card,
.principle-card,
.domain-card {
  border-radius: 30px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  background: var(--paper);
  height: 100%;
}

.seo-card {
  background: rgba(247, 241, 228, 0.9);
}

.seo-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.seo-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.seo-card a {
  color: #1b5f58;
  font-weight: 700;
}

.game-card.live {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.4), transparent 48%),
    var(--paper);
}

.game-card.upcoming {
  background:
    linear-gradient(165deg, rgba(47, 107, 88, 0.18), transparent 44%),
    var(--paper);
}

.game-card.puzzle {
  background:
    linear-gradient(165deg, rgba(211, 155, 69, 0.18), transparent 44%),
    var(--paper);
}

.game-card.duel {
  background:
    linear-gradient(165deg, rgba(242, 92, 74, 0.18), transparent 40%),
    var(--paper);
}

.card-icon {
  position: relative;
  min-height: 210px;
  height: 210px;
  padding: 14px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.52), transparent 26%),
    linear-gradient(145deg, rgba(20, 43, 53, 0.88), rgba(30, 60, 74, 0.98));
}

.card-copy {
  display: grid;
  align-content: start;
}

.board-icon {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 241, 213, 0.18), transparent 18%),
    linear-gradient(145deg, #16362f, #234c40 52%, #102923);
}

.board-icon svg {
  width: min(100%, 228px);
  height: auto;
}

.board-icon rect:not(.muehle-panel),
.board-icon line {
  fill: none;
  stroke: #5f4820;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.board-icon .muehle-panel {
  fill: #d1b27a;
  stroke: rgba(95, 72, 32, 0.22);
  stroke-width: 2;
}

.board-icon circle.board-piece.white {
  fill: #f7f1df;
  stroke: #d5b77d;
  stroke-width: 1.5;
}

.board-icon circle.board-piece.black {
  fill: #1f2528;
  stroke: #8d7455;
  stroke-width: 1.5;
}

.dame-icon,
.chess-icon,
.reversi-icon,
.go-icon,
.connect-icon,
.solitaire-icon,
.spider-icon,
.mahjong-icon,
.sudoku-icon,
.sokoban-icon,
.pool-icon {
  display: grid;
  place-items: center;
}

.pool-icon {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 248, 228, 0.18), transparent 18%),
    linear-gradient(145deg, #14302a, #214a42 54%, #102923);
}

.pool-mini-table {
  position: relative;
  width: min(100%, 268px);
  aspect-ratio: 1.6;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(145deg, #2ba07f, #176149 52%, #104a37);
  box-shadow:
    inset 0 0 0 12px rgba(103, 62, 33, 0.96),
    inset 0 0 0 20px rgba(73, 44, 24, 0.98);
}

.pool-pocket,
.pool-ball {
  position: absolute;
  display: block;
}

.pool-pocket {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10171a;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.08);
}

.pool-pocket.top-left {
  left: 8px;
  top: 8px;
}

.pool-pocket.top-middle {
  left: calc(50% - 9px);
  top: 5px;
}

.pool-pocket.top-right {
  right: 8px;
  top: 8px;
}

.pool-pocket.bottom-left {
  left: 8px;
  bottom: 8px;
}

.pool-pocket.bottom-middle {
  left: calc(50% - 9px);
  bottom: 5px;
}

.pool-pocket.bottom-right {
  right: 8px;
  bottom: 8px;
}

.pool-ball {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(12, 18, 20, 0.16);
}

.pool-ball.cue {
  left: 24%;
  top: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 34% 30%, #ffffff, #f4ecde 64%, #c7bba8);
}

.pool-ball.solid.yellow {
  left: 60%;
  top: 34%;
  background:
    radial-gradient(circle at 34% 30%, #fff6ca, #f6cc42 56%, #cb9917);
}

.pool-ball.solid.blue {
  left: 69%;
  top: 48%;
  background:
    radial-gradient(circle at 34% 30%, #dfe8ff, #3d66d7 56%, #23409b);
}

.pool-ball.eight {
  left: 60%;
  top: 62%;
  background:
    radial-gradient(circle at 34% 30%, #5f6673, #1b2227 58%, #07090d);
}

.pool-ball.stripe.red {
  left: 78%;
  top: 48%;
  background:
    linear-gradient(#f7f0e3 0 28%, #d8463f 28% 72%, #f7f0e3 72% 100%);
}

.dame-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 241, 213, 0.16), transparent 18%),
    linear-gradient(145deg, #2d1a11, #4c2b18 56%, #1d1009);
}

.chess-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 241, 213, 0.16), transparent 18%),
    linear-gradient(145deg, #2f241d, #48352a 56%, #1b1511);
}

.chess-mini-board {
  position: relative;
  width: min(100%, 194px);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 12px rgba(121, 83, 49, 0.9),
    inset 0 0 0 20px rgba(89, 58, 32, 0.96);
  background:
    linear-gradient(45deg, #ead8bb 25%, transparent 25%, transparent 75%, #ead8bb 75%, #ead8bb),
    linear-gradient(45deg, #ead8bb 25%, transparent 25%, transparent 75%, #ead8bb 75%, #ead8bb),
    linear-gradient(145deg, #9b6c46, #6d472f);
  background-size: 25% 25%, 25% 25%, auto;
  background-position: 0 0, 12.5% 12.5%, 0 0;
}

.chess-mini-piece {
  position: absolute;
  left: calc(var(--column) * 12.5% + 6.25%);
  top: calc(var(--row) * 12.5% + 6.25%);
  transform: translate(-50%, -50%);
  font-size: clamp(1.2rem, 2.8vw, 1.9rem);
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.chess-mini-piece.white {
  color: #fff7eb;
  text-shadow:
    -1px -1px 0 rgba(69, 46, 30, 0.42),
    1px -1px 0 rgba(69, 46, 30, 0.42),
    -1px 1px 0 rgba(69, 46, 30, 0.42),
    1px 1px 0 rgba(69, 46, 30, 0.42);
}

.chess-mini-piece.black {
  color: #1f1914;
  text-shadow:
    -1px -1px 0 rgba(255, 244, 231, 0.26),
    1px -1px 0 rgba(255, 244, 231, 0.26),
    -1px 1px 0 rgba(255, 244, 231, 0.26),
    1px 1px 0 rgba(255, 244, 231, 0.26);
}

.dame-mini-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 188px);
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #9a6b44, #633a20);
}

.dame-square {
  width: auto;
  height: auto;
  aspect-ratio: 1;
  display: block;
  position: relative;
}

.dame-square.light {
  background: #e8d6b7;
}

.dame-square.dark {
  background: #7d4d2d;
}

.dame-square.dark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.dame-square.dark.white-piece::after,
.dame-square.dark.black-piece::after {
  opacity: 1;
}

.dame-square.dark.white-piece::after {
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.84) 18%, transparent 19%),
    radial-gradient(circle at 34% 28%, #fff6e7 0, #efe0ca 44%, #d9c2a0 100%);
}

.dame-square.dark.black-piece::after {
  background:
    radial-gradient(circle at 34% 28%, #8c6f58 0 15%, rgba(140, 111, 88, 0.4) 15%, transparent 16%),
    radial-gradient(circle at 34% 28%, #4d3728 0, #32221a 46%, #0d0603 100%);
}

.reversi-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 18%),
    linear-gradient(145deg, #16362f, #245647 56%, #102923);
}

.reversi-mini-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 228px);
  aspect-ratio: 1;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #2b8b62, #1d6245);
}

.reversi-mini-cell {
  display: block;
  position: relative;
  border-radius: 14px;
  background: rgba(10, 24, 18, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.reversi-mini-cell::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.reversi-mini-cell.black::after,
.reversi-mini-cell.white::after {
  width: 70%;
  height: 70%;
}

.reversi-mini-cell.black::after {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle at 34% 28%, #4c544f 0, #1e2320 48%, #070809 100%);
}

.reversi-mini-cell.white::after {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.74) 24%, rgba(255, 255, 255, 0) 26%),
    radial-gradient(circle at 34% 28%, #ffffff 0, #f3f2ec 54%, #d4d5cf 100%);
}

.reversi-mini-cell.hint::after {
  width: 18%;
  height: 18%;
  background: rgba(215, 242, 203, 0.84);
}

.go-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 245, 225, 0.16), transparent 18%),
    linear-gradient(145deg, #5e3a1a, #7d4a20 58%, #3c2210);
}

.go-mini-board {
  --go-mini-padding: 18px;
  position: relative;
  width: min(100%, 228px);
  aspect-ratio: 1;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(145deg, #d6a663, #b97a34 62%, #8d5722);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    0 12px 22px rgba(29, 16, 7, 0.22);
}

.go-mini-board::before,
.go-mini-board::after {
  content: "";
  position: absolute;
  inset: var(--go-mini-padding);
  pointer-events: none;
}

.go-mini-board::before {
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 calc((100% - 2px) / 8 - 1px),
      rgba(64, 37, 14, 0.82) calc((100% - 2px) / 8 - 1px) calc((100% - 2px) / 8 + 1px)
    );
}

.go-mini-board::after {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 calc((100% - 2px) / 8 - 1px),
      rgba(64, 37, 14, 0.82) calc((100% - 2px) / 8 - 1px) calc((100% - 2px) / 8 + 1px)
    );
}

.go-mini-star,
.go-mini-stone {
  position: absolute;
  left: calc(var(--go-mini-padding) + (var(--column) * ((100% - (2 * var(--go-mini-padding))) / 8)));
  top: calc(var(--go-mini-padding) + (var(--row) * ((100% - (2 * var(--go-mini-padding))) / 8)));
  transform: translate(-50%, -50%);
}

.go-mini-star {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(64, 37, 14, 0.84);
}

.go-mini-stone {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 8px 14px rgba(18, 10, 5, 0.2);
}

.go-mini-stone.black {
  background: radial-gradient(circle at 30% 28%, #49505a, #1a1e24 58%, #08090c);
}

.go-mini-stone.white {
  background: radial-gradient(circle at 30% 28%, #ffffff, #f8f1e4 60%, #d4c2a5);
  border: 1px solid rgba(126, 102, 68, 0.18);
}

.connect-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 18%),
    linear-gradient(145deg, #173969, #0f2444 56%, #0a1830);
}

.connect-mini-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 8px);
  width: min(100%, 248px);
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #2c63d6, #163b8b);
}

.connect-hole {
  width: auto;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.06), rgba(2, 10, 28, 0.28) 58%, rgba(2, 10, 28, 0.54) 100%);
  position: relative;
  overflow: hidden;
}

.connect-hole::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  opacity: 0;
}

.connect-hole.red::after,
.connect-hole.yellow::after {
  opacity: 1;
}

.connect-hole.red::after {
  background:
    radial-gradient(circle at 34% 28%, #ffeae4 0 18%, rgba(255, 234, 228, 0.82) 18%, transparent 19%),
    radial-gradient(circle at 34% 28%, #ffddcf 0, #f47b69 42%, #af231d 100%);
}

.connect-hole.yellow::after {
  background:
    radial-gradient(circle at 34% 28%, #fff8da 0 18%, rgba(255, 248, 218, 0.82) 18%, transparent 19%),
    radial-gradient(circle at 34% 28%, #fff2a2 0, #ffd34a 44%, #d79d08 100%);
}

.solitaire-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 18%),
    linear-gradient(145deg, #245d4a, #154637 58%, #103327);
}

.solitaire-mini-board {
  width: min(100%, 276px);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 10px 12px;
}

.solitaire-mini-top {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.solitaire-slot,
.solitaire-foundation {
  display: grid;
  place-items: center;
  aspect-ratio: 0.72;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.solitaire-card,
.solitaire-tableau-card {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.72;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 18px rgba(4, 10, 12, 0.18);
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
}

.solitaire-card.back,
.solitaire-tableau-card.back {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(145deg, #d56240, #a53822);
  color: #f8f4eb;
  border-color: rgba(255, 255, 255, 0.12);
}

.solitaire-card.face,
.solitaire-tableau-card.face {
  background: linear-gradient(145deg, #fcf8ee, #fffdf8);
  color: #1d252a;
}

.solitaire-card.red,
.solitaire-tableau-card.red {
  color: #b04d3c;
}

.solitaire-card strong,
.solitaire-tableau-card strong {
  font-size: 0.95rem;
  line-height: 1;
}

.solitaire-card small,
.solitaire-tableau-card small {
  font-size: 0.82rem;
  line-height: 1;
}

.solitaire-slot .solitaire-card strong,
.solitaire-slot .solitaire-card small {
  font-size: 0.72rem;
}

.solitaire-foundation {
  color: rgba(248, 244, 235, 0.72);
  font-size: 1.05rem;
  font-weight: 800;
}

.solitaire-foundation.heart,
.solitaire-foundation.diamond {
  color: rgba(248, 214, 214, 0.86);
}

.solitaire-mini-tableau {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  align-items: start;
}

.solitaire-column {
  position: relative;
  min-height: 96px;
}

.solitaire-tableau-card {
  position: absolute;
  left: 0;
}

.solitaire-tableau-card.offset-0 {
  top: 0;
}

.solitaire-tableau-card.offset-1 {
  top: 14px;
}

.solitaire-tableau-card.offset-2 {
  top: 28px;
}

.spider-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 18%),
    linear-gradient(145deg, #274b62, #163545 58%, #0f2733);
}

.spider-mini-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 282px);
  height: 100%;
  align-items: start;
  padding: 12px 6px;
}

.spider-mini-column {
  position: relative;
  min-height: 86px;
}

.spider-mini-card {
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 0.72;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 18px rgba(4, 10, 12, 0.18);
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.spider-mini-card.back {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(145deg, #d56240, #a53822);
  border-color: rgba(255, 255, 255, 0.12);
}

.spider-mini-card.face {
  background: linear-gradient(145deg, #fcf8ee, #fffdf8);
  color: #1d252a;
}

.spider-mini-card.red {
  color: #b04d3c;
}

.spider-mini-card.offset-1 {
  top: 14px;
}

.spider-mini-card.offset-2 {
  top: 28px;
}

.mahjong-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(145deg, #28443f, #1b302c 58%, #10221f);
}

.mahjong-mini-stack {
  position: relative;
  width: min(100%, 220px);
  height: 150px;
}

.mahjong-mini-tile {
  position: absolute;
  width: 82px;
  height: 108px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), transparent 32%),
    linear-gradient(145deg, #fffaf0, #efe1c9);
  box-shadow:
    0 12px 22px rgba(10, 14, 15, 0.2),
    inset 0 0 0 1px rgba(91, 67, 48, 0.12);
}

.mahjong-mini-tile strong {
  font-size: 1.22rem;
}

.mahjong-mini-tile small {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(49, 39, 30, 0.64);
}

.mahjong-mini-tile.layer-1 {
  left: 18px;
  top: 22px;
}

.mahjong-mini-tile.layer-2 {
  left: 68px;
  top: 12px;
}

.mahjong-mini-tile.layer-3 {
  left: 120px;
  top: 2px;
}

.mahjong-mini-tile.back strong {
  color: #2d6a4f;
}

.mahjong-mini-tile.front strong {
  color: #8a2e28;
}

.sudoku-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(145deg, #294258, #1b3044 58%, #102231);
}

.sudoku-mini-board {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  width: min(100%, 228px);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(145deg, #f4f7fa, #dde8f2);
  border: 3px solid #263747;
  overflow: hidden;
}

.sudoku-mini-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid rgba(38, 55, 71, 0.18);
  border-bottom: 1px solid rgba(38, 55, 71, 0.18);
  background: #faf7f1;
  color: #17304a;
  font-size: 0.78rem;
  font-weight: 800;
}

.sudoku-mini-cell.given {
  background: #ede4d3;
  color: #201814;
}

.sudoku-mini-cell.selected {
  background: #dbe8f7;
}

.sudoku-mini-cell.box-line {
  border-right: 3px solid #263747;
}

.sudoku-mini-cell.box-bottom {
  border-bottom: 3px solid #263747;
}

.sokoban-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.22), transparent 18%),
    linear-gradient(145deg, #d6d2c6, #c8c2ae 58%, #bbb39b);
}

.soko-mini-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: min(100%, 250px);
  height: auto;
  gap: 0;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent),
    #d7cfab;
  border: 1px solid #bdb48b;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.mini-cell {
  width: auto;
  height: auto;
  aspect-ratio: 1;
  display: block;
  position: relative;
}

.mini-cell.floor,
.mini-cell.goal,
.mini-cell.player,
.mini-cell.box {
  background:
    radial-gradient(circle at 22% 28%, rgba(180, 171, 126, 0.14) 0 1px, transparent 1.3px),
    radial-gradient(circle at 75% 62%, rgba(180, 171, 126, 0.16) 0 1px, transparent 1.4px),
    radial-gradient(circle at 45% 76%, rgba(180, 171, 126, 0.14) 0 1px, transparent 1.2px),
    linear-gradient(145deg, #efe9c8, #e8e0b7);
}

.mini-cell.wall {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 16%),
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(85, 74, 34, 0.56) 12px 14px),
    repeating-linear-gradient(90deg, rgba(85, 74, 34, 0.56) 0 2px, transparent 2px 18px),
    linear-gradient(145deg, #b8ad67, #8f8343);
  box-shadow:
    inset 0 0 0 1px rgba(94, 84, 42, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.mini-cell.goal::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, #d79a8d 0 7px, rgba(215, 154, 141, 0.38) 7px 12px, transparent 12px);
}

.mini-cell.box::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #5a2a00;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(145deg, #f3a12c, #d56e06);
  box-shadow:
    inset 0 0 0 2px rgba(255, 226, 154, 0.55),
    0 2px 0 rgba(71, 39, 8, 0.12);
  z-index: 2;
}

.mini-cell.box::after {
  content: "";
  position: absolute;
  inset: 12px;
  background:
    linear-gradient(45deg, transparent calc(50% - 1.5px), #5a2a00 calc(50% - 1.5px), #5a2a00 calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(-45deg, transparent calc(50% - 1.5px), #5a2a00 calc(50% - 1.5px), #5a2a00 calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(0deg, transparent calc(50% - 1.5px), rgba(90, 42, 0, 0.7) calc(50% - 1.5px), rgba(90, 42, 0, 0.7) calc(50% + 1.5px), transparent calc(50% + 1.5px));
  z-index: 3;
}

.mini-cell.box.goal::before {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(145deg, #ffd37e, #d78f1b);
}

.mini-cell.player::before {
  content: "";
  position: absolute;
  inset: 5px;
  background:
    radial-gradient(circle at 50% 22%, #222d30 0 6px, transparent 6.5px),
    radial-gradient(circle at 50% 30%, #f1ddb0 0 8px, transparent 8.5px),
    linear-gradient(#e5e9ef 0 0) center 42% / 16px 7px no-repeat,
    linear-gradient(#7ea8d1 0 0) center 58% / 18px 12px no-repeat,
    linear-gradient(#2e4b78 0 0) center 77% / 14px 9px no-repeat,
    linear-gradient(#2c2b24 0 0) calc(50% - 5px) 100% / 3px 11px no-repeat,
    linear-gradient(#2c2b24 0 0) calc(50% + 5px) 100% / 3px 11px no-repeat,
    linear-gradient(#d1b563 0 0) center 15% / 14px 3px no-repeat;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 0 rgba(58, 49, 23, 0.16));
  z-index: 4;
}

.mini-cell.player::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 5px;
  border-radius: 999px;
  background: rgba(92, 71, 38, 0.18);
  filter: blur(2px);
}

.card-copy h3 {
  margin: 0 0 10px;
  font-size: 1.8rem;
}

.card-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.mode-badge,
.domain-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.mode-badge {
  background: rgba(19, 34, 41, 0.08);
  color: #324247;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
  display: grid;
  gap: 10px;
}

.card-link {
  width: 100%;
}

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.42fr);
  gap: 24px;
  padding: 26px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 220, 66, 0.14), rgba(255, 255, 255, 0.08)),
    rgba(16, 28, 35, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.support-copy {
  align-self: center;
}

.support-eyebrow {
  color: rgba(255, 220, 66, 0.82);
}

.support-copy h2 {
  margin: 0 0 14px;
  color: #fff8ec;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.02;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

.support-copy p {
  margin: 0;
  max-width: 58ch;
  color: rgba(248, 242, 228, 0.82);
  line-height: 1.7;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.support-link-copy {
  color: rgba(248, 242, 228, 0.7);
  font-weight: 700;
}

.support-qr-panel {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.support-qr-image {
  display: block;
  width: min(100%, 220px);
  height: auto;
  border-radius: 22px;
  background: #f2f2f2;
}

.principle-card {
  background: rgba(16, 28, 35, 0.42);
  border-color: rgba(255, 255, 255, 0.1);
}

.principle-card p,
.domain-card p {
  color: rgba(248, 242, 228, 0.8);
  line-height: 1.6;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.principle-grid div {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

.principle-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #fff8ec;
}

.domain-card {
  background:
    linear-gradient(145deg, rgba(211, 155, 69, 0.2), rgba(255, 255, 255, 0.08)),
    rgba(16, 28, 35, 0.42);
  border-color: rgba(255, 255, 255, 0.1);
}

.domain-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.domain-pills span {
  background: rgba(248, 242, 228, 0.14);
  color: #fff8ec;
}

@media (max-width: 960px) {
  .portal-hero,
  .principles-section,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    grid-column: 1 / -1;
  }

  .hero-copy {
    grid-column: 2 / 12;
  }

  .support-card {
    grid-template-columns: 1fr;
  }

  .support-copy {
    text-align: center;
  }

  .support-copy p {
    max-width: none;
  }

  .support-actions {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .portal-app {
    width: min(100% - 20px, 760px);
    padding: 18px 0 34px;
  }

  .card-icon {
    min-height: 190px;
    height: 190px;
  }

  .portal-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
  }

  .hero-content h1 {
    max-width: none;
  }

  .hero-copy,
  .hero-content h1,
  .hero-content > .eyebrow {
    grid-column: 1 / -1;
  }

  .card-meta,
  .domain-pills,
  .support-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .support-link,
  .support-button,
  .card-link {
    width: 100%;
  }
}
