:root {
  --bg: #fff8ef;
  --paper: #fffdf8;
  --paper-2: #fff1f5;
  --panel: #ffffff;
  --panel-2: #ffe8f0;
  --text: #3a2c35;
  --muted: #7b6670;
  --ink: #3a2c35;
  --line: #3a2c35;
  --sakura: #ffadc8;
  --ume: #ff6f9f;
  --momo: #ffd7e6;
  --matcha: #97d79b;
  --sky: #9ddbf8;
  --lemon: #ffe27a;
  --lavender: #c9b7ff;
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Trebuchet MS", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 173, 200, 0.34) 0 3px, transparent 4px),
    radial-gradient(circle at 46px 38px, rgba(157, 219, 248, 0.28) 0 2px, transparent 3px),
    linear-gradient(135deg, #fff8ef 0%, #fff0f7 46%, #edfaff 100%);
  background-size: 64px 64px, 64px 64px, auto;
  color: var(--text);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 96%, rgba(58, 44, 53, 0.06) 96% 100%),
    linear-gradient(0deg, transparent 0 96%, rgba(58, 44, 53, 0.06) 96% 100%);
  background-size: 28px 28px;
  opacity: 0.35;
}

body::after {
  content: "x  o  +  x  o  +  x";
  position: fixed;
  right: -48px;
  bottom: 26px;
  transform: rotate(-10deg);
  color: rgba(255, 111, 159, 0.28);
  font-size: 3rem;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 6px 0 rgba(255, 173, 200, 0.45);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.filter-row,
.results-bar,
.load-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark,
.feature-icon,
.mana-dot {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--lemon);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
}

.brand-mark {
  transform: rotate(-7deg);
}

.nav-links {
  gap: 8px;
  overflow-x: auto;
}

.nav-links a,
.live-chip {
  min-height: 38px;
  padding: 8px 12px;
  border: 2px dashed transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.live-chip {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper-2);
}

.hero,
.cards-shell,
.content-grid,
.site-footer {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 52px 0 34px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 34px;
  left: min(50%, 520px);
  width: 104px;
  height: 104px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--lemon);
  box-shadow: 8px 8px 0 var(--sakura);
  opacity: 0.65;
  transform: rotate(9deg);
  z-index: -1;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 12px;
  padding: 5px 10px;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--matcha);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(2.2rem, 7vw, 5.05rem);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 3px 3px 0 var(--momo);
}

h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.button:hover,
.filter-button:hover,
.card-tile:hover,
.feature-card:hover {
  transform: translate(-1px, -1px) rotate(-0.4deg);
}

.button:active,
.filter-button:active,
.card-tile:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.primary {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--lemon);
}

.secondary {
  color: var(--ink);
  background: var(--sky);
}

.hero-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1deg);
}

.hero-panel::before {
  content: "doodle picks";
  position: absolute;
  top: -18px;
  left: 18px;
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sakura);
  font-size: 0.8rem;
  font-weight: 900;
  transform: rotate(-4deg);
}

.preview-card {
  min-height: 132px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(58, 44, 53, 0.85);
}

.preview-card:nth-child(1) {
  transform: rotate(-2deg);
}

.preview-card:nth-child(2) {
  transform: rotate(1.5deg);
}

.preview-card:nth-child(3) {
  transform: rotate(-1deg);
}

.preview-card strong {
  font-size: 1.2rem;
}

.preview-card small {
  color: rgba(58, 44, 53, 0.72);
  font-weight: 800;
}

.preview-card.white {
  background: linear-gradient(135deg, #fffdf7, var(--lemon));
}

.preview-card.red {
  background: linear-gradient(135deg, #ffd5d0, var(--ume));
}

.preview-card.blue {
  background: linear-gradient(135deg, #e2fbff, var(--sky));
}

.section-band,
.live-section {
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.74), rgba(255, 244, 250, 0.9)),
    repeating-linear-gradient(-8deg, rgba(255, 173, 200, 0.25) 0 12px, rgba(157, 219, 248, 0.18) 12px 24px);
}

.section-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(16px, 4vw, 44px);
}

.live-band h2 {
  margin: 0;
}

.live-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(320px, 1.32fr);
  gap: 22px;
  align-items: center;
  padding: 34px clamp(16px, 4vw, 44px);
}

.live-copy {
  display: grid;
  gap: 12px;
}

.live-copy h2,
.live-copy p {
  margin: 0;
}

.live-copy p {
  color: var(--muted);
  line-height: 1.4;
}

.twitch-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #221b26;
  box-shadow: 7px 7px 0 var(--ink);
}

.twitch-frame::before {
  content: "live window";
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--lemon);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.twitch-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 38px 0;
}

.feature-card {
  position: relative;
  min-height: 190px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink);
}

.feature-card:nth-child(1) {
  background: #fff5bf;
  transform: rotate(-1deg);
}

.feature-card:nth-child(2) {
  background: #dff8e4;
  transform: rotate(0.8deg);
}

.feature-card:nth-child(3) {
  background: #e6f7ff;
  transform: rotate(-0.7deg);
}

.feature-card p {
  color: var(--muted);
  line-height: 1.4;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 38px;
  color: var(--muted);
  border-top: 3px dashed rgba(58, 44, 53, 0.34);
  font-weight: 800;
}

.cards-shell {
  padding: 34px 0 48px;
}

.cards-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.cards-top h1 {
  margin-bottom: 12px;
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}

.search-field,
.select-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.search-field input,
.select-grid select {
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: inset 2px 2px 0 rgba(255, 173, 200, 0.38);
}

.search-field input:focus,
.select-grid select:focus {
  outline: 3px solid rgba(157, 219, 248, 0.7);
}

.filter-row {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.filter-button[data-color="W"] {
  background: #fff8d4;
}

.filter-button[data-color="U"] {
  background: #dff5ff;
}

.filter-button[data-color="B"] {
  color: #fffdf8;
  background: #5a4c61;
}

.filter-button[data-color="R"] {
  background: #ffd0ca;
}

.filter-button[data-color="G"] {
  background: #dff6d6;
}

.filter-button.active {
  color: var(--ink);
  background: var(--lemon);
}

.select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.results-bar {
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-weight: 800;
}

.results-bar strong {
  color: var(--ink);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 16px;
}

.card-tile {
  min-height: 252px;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.card-tile:nth-child(3n + 1) {
  transform: rotate(-0.7deg);
}

.card-tile:nth-child(3n + 2) {
  transform: rotate(0.5deg);
}

.card-art {
  aspect-ratio: 5 / 7;
  display: grid;
  align-content: end;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  overflow: hidden;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.card-art.W {
  background: linear-gradient(135deg, #fffdf7, #ffe98b);
}

.card-art.U {
  background: linear-gradient(135deg, #def8ff, #8cccf6);
}

.card-art.B {
  color: #fffdf8;
  background: linear-gradient(135deg, #766782, #332738);
}

.card-art.R {
  background: linear-gradient(135deg, #ffd8d2, #ff8d94);
}

.card-art.G {
  background: linear-gradient(135deg, #e5ffd9, #8bd790);
}

.card-art.M {
  background: linear-gradient(135deg, #fff5b5, #b7ecff 45%, #ffc0ce);
}

.card-title {
  margin: 10px 0 4px;
  color: var(--ink);
  font-weight: 900;
}

.card-meta,
.card-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.card-text {
  margin: 8px 0 0;
}

.load-row {
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.card-dialog {
  width: min(720px, calc(100% - 28px));
  padding: 0;
  color: var(--text);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
}

.card-dialog::backdrop {
  background: rgba(58, 44, 53, 0.58);
}

.icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lemon);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.dialog-content {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
}

.dialog-content .card-art {
  min-height: 320px;
}

@media (max-width: 760px) {
  .site-header,
  .cards-top,
  .section-band,
  .live-section,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 32px;
  }

  .hero::before {
    top: 14px;
    right: 18px;
    left: auto;
    width: 72px;
    height: 72px;
  }

  .section-band {
    flex-direction: column;
  }

  .live-section {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-panel,
  .feature-card:nth-child(n),
  .card-tile:nth-child(n) {
    transform: none;
  }

  .content-grid,
  .select-grid,
  .dialog-content {
    grid-template-columns: 1fr;
  }

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

  .dialog-content .card-art {
    min-height: 210px;
  }
}

@media (max-width: 340px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-inline: 12px;
  }

  .hero,
  .cards-shell,
  .content-grid,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }
}

/* Reference-inspired kawaii polish */
:root {
  --bg: #fff7f0;
  --paper: #fffefe;
  --paper-2: #fff2f8;
  --text: #4a3342;
  --muted: #8b7482;
  --ink: #6f86c8;
  --line: #8fb9e6;
  --sakura: #ffb7d3;
  --ume: #ff74a6;
  --momo: #ffe2ec;
  --matcha: #aee3bd;
  --sky: #a9d8ff;
  --lemon: #ffeaa7;
  --lavender: #d8dcff;
}

body {
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 183, 211, 0.42) 0 5px, transparent 6px),
    radial-gradient(circle at 54px 42px, rgba(169, 216, 255, 0.36) 0 3px, transparent 4px),
    linear-gradient(135deg, #fff7dc 0%, #fff2f8 42%, #eef4ff 100%);
  background-size: 72px 72px, 72px 72px, auto;
}

.site-header {
  border-bottom-color: #9fc8ee;
  box-shadow: 0 7px 0 rgba(255, 183, 211, 0.42);
}

.brand-mark,
.feature-icon,
.mana-dot {
  border-color: #5e6aa8;
  box-shadow: 3px 3px 0 #5e6aa8;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.live-chip {
  border-color: #8fb9e6;
  background: #fff7fb;
}

.hero::before {
  background: #fff0a8;
  border-color: #ffffff;
  box-shadow: 0 0 0 4px #6f86c8, 10px 10px 0 rgba(255, 183, 211, 0.62);
}

.eyebrow {
  position: relative;
  color: #ffffff;
  border-color: #6f86c8;
  background: #7da6dd;
  box-shadow: 4px 4px 0 rgba(111, 134, 200, 0.45);
}

.eyebrow::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: -8px;
  height: 8px;
  background:
    radial-gradient(circle at 6px 0, transparent 0 6px, #7da6dd 7px),
    radial-gradient(circle at 18px 0, transparent 0 6px, #7da6dd 7px);
  background-size: 24px 8px;
}

h1 {
  text-shadow: 3px 3px 0 #ffffff, 6px 6px 0 rgba(255, 183, 211, 0.72);
}

.button,
.filter-button,
.card-tile,
.feature-card,
.filter-panel,
.card-dialog {
  border-color: #6f86c8;
  box-shadow: 0 0 0 5px #ffffff, 7px 7px 0 rgba(111, 134, 200, 0.36);
}

.primary {
  background: #ffeaa7;
}

.secondary {
  background: #dff3ff;
}

.hero-panel {
  overflow: visible;
  border-color: #9fc8ee;
  background:
    linear-gradient(45deg, rgba(159, 200, 238, 0.22) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.22) 75%),
    linear-gradient(45deg, rgba(159, 200, 238, 0.22) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.22) 75%),
    #fffefe;
  background-position: 0 0, 18px 18px, 0 0;
  background-size: 36px 36px;
  box-shadow: 0 0 0 10px #ffffff, 10px 10px 0 rgba(111, 134, 200, 0.34);
}

.hero-panel::before {
  top: -30px;
  left: 18px;
  color: #ffffff;
  border-color: #6f86c8;
  background: #7da6dd;
  box-shadow: 4px 4px 0 rgba(111, 134, 200, 0.45);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 20px;
  width: 74px;
  height: 74px;
  border: 3px solid #9fc8ee;
  border-radius: 18px;
  background:
    radial-gradient(circle at 16px 16px, #ffb7d3 0 5px, transparent 6px),
    radial-gradient(circle at 44px 44px, #a9d8ff 0 5px, transparent 6px),
    #fffefe;
  box-shadow: 0 0 0 6px #ffffff, 5px 5px 0 rgba(111, 134, 200, 0.24);
  transform: rotate(9deg);
}

.preview-card,
.card-art {
  border-color: #ffffff;
  box-shadow: 0 0 0 4px #6f86c8, 6px 6px 0 rgba(111, 134, 200, 0.32);
}

.preview-card.white {
  background: linear-gradient(135deg, #fffef8, #ffeaa7 78%);
}

.preview-card.red {
  background: linear-gradient(135deg, #fff0f6, #ffb7d3 78%);
}

.preview-card.blue {
  background: linear-gradient(135deg, #f4fcff, #a9d8ff 78%);
}

.live-section {
  background:
    radial-gradient(circle at 28px 28px, rgba(255, 255, 255, 0.9) 0 4px, transparent 5px),
    linear-gradient(90deg, #fff2c7 0%, #fff7fb 48%, #eaf4ff 100%);
  background-size: 38px 38px, auto;
  border-color: #9fc8ee;
}

.twitch-frame {
  border-color: #ffffff;
  box-shadow: 0 0 0 5px #6f86c8, 10px 10px 0 rgba(111, 134, 200, 0.3);
}

.twitch-frame::before {
  color: #ffffff;
  border-color: #6f86c8;
  background: #7da6dd;
}

.feature-card {
  border-color: #ffffff;
}

.feature-card:nth-child(1) {
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 183, 211, 0.58) 0 12px, transparent 13px),
    #fff4bd;
}

.feature-card:nth-child(2) {
  background:
    radial-gradient(circle at 86% 22%, rgba(169, 216, 255, 0.64) 0 12px, transparent 13px),
    #e4f8e9;
}

.feature-card:nth-child(3) {
  background:
    radial-gradient(circle at 86% 22%, rgba(255, 234, 167, 0.74) 0 12px, transparent 13px),
    #eaf4ff;
}

.filter-panel {
  background:
    linear-gradient(45deg, rgba(159, 200, 238, 0.2) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.2) 75%),
    linear-gradient(45deg, rgba(159, 200, 238, 0.2) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.2) 75%),
    #fffefe;
  background-position: 0 0, 18px 18px, 0 0;
  background-size: 36px 36px;
}

.search-field input,
.select-grid select {
  border-color: #9fc8ee;
  background: rgba(255, 255, 255, 0.92);
}

.card-tile {
  background: #fffefe;
}

.card-art.W {
  background: linear-gradient(135deg, #fffef8, #ffeaa7);
}

.card-art.U {
  background: linear-gradient(135deg, #f4fcff, #a9d8ff);
}

.card-art.B {
  color: #fffefe;
  background: linear-gradient(135deg, #a99bd7, #64557e);
}

.card-art.R {
  background: linear-gradient(135deg, #fff0f6, #ff9fbd);
}

.card-art.G {
  background: linear-gradient(135deg, #f3fff4, #aee3bd);
}

.card-art.M {
  background: linear-gradient(135deg, #fff4bd, #d8dcff 45%, #ffb7d3);
}

@media (max-width: 760px) {
  .hero-panel::after {
    right: 10px;
    top: -22px;
    width: 50px;
    height: 50px;
  }

  .button,
  .filter-button,
  .card-tile,
  .feature-card,
  .filter-panel,
  .card-dialog {
    box-shadow: 0 0 0 4px #ffffff, 5px 5px 0 rgba(111, 134, 200, 0.32);
  }
}



.twitch-frame > div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Homepage live-first tuning */
.hero-live-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 3px solid #ffffff;
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(159, 200, 238, 0.22) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.22) 75%),
    linear-gradient(45deg, rgba(159, 200, 238, 0.22) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.22) 75%),
    #fffefe;
  background-position: 0 0, 18px 18px, 0 0;
  background-size: 36px 36px;
  box-shadow: 0 0 0 8px #6f86c8, 10px 10px 0 rgba(111, 134, 200, 0.3);
  transform: rotate(0.7deg);
}

.hero-live-panel::after {
  content: "";
  position: absolute;
  right: 12px;
  top: -18px;
  width: 66px;
  height: 66px;
  border: 3px solid #ffffff;
  border-radius: 22px;
  background:
    radial-gradient(circle at 16px 16px, #ffb7d3 0 5px, transparent 6px),
    radial-gradient(circle at 42px 42px, #a9d8ff 0 5px, transparent 6px),
    #fff4bd;
  box-shadow: 0 0 0 4px #6f86c8, 5px 5px 0 rgba(111, 134, 200, 0.24);
  transform: rotate(10deg);
}

.compact-live-copy {
  position: relative;
  z-index: 1;
}

.compact-live-copy p:last-child {
  max-width: 46rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-twitch {
  z-index: 1;
}

.live-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.binder-preview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4px 0 34px;
}

.binder-preview-strip .preview-card {
  min-height: 118px;
}

@media (max-width: 760px) {
  .hero-live-panel {
    transform: none;
  }

  .hero-live-panel::after {
    right: 10px;
    top: -20px;
    width: 48px;
    height: 48px;
  }

  .binder-preview-strip {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1120px);
    padding-bottom: 26px;
  }

  .binder-preview-strip .preview-card {
    transform: none;
  }
}



/* Celestial Lexi sticker wordmark polish */
.brand {
  position: relative;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 3px #ffb7d3, 5px 5px 0 rgba(111, 134, 200, 0.24);
  transform: rotate(-0.6deg);
}

.brand span:last-child {
  color: #52649d;
  text-shadow:
    1px 1px 0 #ffffff,
    -1px 1px 0 #ffffff,
    1px -1px 0 #ffffff,
    -1px -1px 0 #ffffff;
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: #fff4bd;
  color: #ff6f9f;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #6f86c8, 3px 3px 0 rgba(111, 134, 200, 0.24);
}

.brand::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -7px;
  width: 14px;
  height: 14px;
  background: #9ddbf8;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #6f86c8;
}

@media (max-width: 520px) {
  .brand {
    max-width: min(58vw, 230px);
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
/* Lexi's Artifacts */
.artifacts-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.artifacts-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 24px;
  padding: 28px;
  border: 3px solid #ffffff;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 22%, #fff4bd 0 34px, transparent 35px),
    linear-gradient(45deg, rgba(216, 220, 255, 0.34) 25%, transparent 25% 75%, rgba(216, 220, 255, 0.34) 75%),
    #fffefe;
  background-size: auto, 34px 34px, auto;
  box-shadow: 0 0 0 8px #6f86c8, 10px 10px 0 rgba(111, 134, 200, 0.24);
}

.artifacts-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 4.8rem);
  line-height: 0.95;
}

.artifact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
}

.artifact-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 172px;
  align-items: start;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  border: 3px solid #ffffff;
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(159, 200, 238, 0.24) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.24) 75%),
    #fffefe;
  background-size: 34px 34px;
  box-shadow: 0 0 0 7px #9fc8ee, 8px 8px 0 rgba(111, 134, 200, 0.24);
}

.artifact-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
}

.artifact-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.featured-artifact {
  min-height: 210px;
  background:
    radial-gradient(circle at 90% 16%, #fff4bd 0 28px, transparent 29px),
    radial-gradient(circle at 82% 18%, #fffefe 0 18px, transparent 19px),
    linear-gradient(45deg, rgba(255, 183, 211, 0.2) 25%, transparent 25% 75%, rgba(255, 183, 211, 0.2) 75%),
    #fffefe;
  background-size: auto, auto, 34px 34px, auto;
  box-shadow: 0 0 0 7px #ffb7d3, 8px 8px 0 rgba(111, 134, 200, 0.24);
}

.artifact-sigil {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: #d8dcff;
  color: #52649d;
  font-family: var(--display-font);
  font-size: 1.55rem;
  box-shadow: 0 0 0 4px #6f86c8, 4px 4px 0 rgba(111, 134, 200, 0.22);
}
.artifact-sigil.image-sigil {
  overflow: hidden;
  background: #181421;
}

.artifact-sigil.image-sigil img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.artifact-action {
  position: static;
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #6f86c8;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 4px 4px 0 rgba(111, 134, 200, 0.24);
}

.quiet-artifact {
  opacity: 0.84;
}

@media (max-width: 760px) {
  .artifacts-shell {
    width: min(100% - 24px, 1120px);
  }

  .artifacts-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .artifact-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: 22px;
  }

  .artifact-action {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
    margin-top: 4px;
  }

  .quiet-artifact {
    padding-bottom: 22px;
  }
}
/* Real card image tiles should feel like a clean binder. */
.card-grid {
  align-items: stretch;
}

.card-grid .card-tile {
  display: flex;
  flex-direction: column;
  transform: none;
}

.card-grid .card-tile:nth-child(3n + 1),
.card-grid .card-tile:nth-child(3n + 2) {
  transform: none;
}

.card-grid .card-tile:hover {
  transform: translate(-1px, -1px);
}

.card-art.has-image {
  aspect-ratio: 488 / 680;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.card-art.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.card-tile .card-title {
  min-height: 2.35em;
  line-height: 1.18;
}

.card-tile .card-meta {
  min-height: 2.55em;
}

.card-tile .card-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
/* Card gallery theme toggle */
.cards-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-toggle {
  min-height: 38px;
  padding: 9px 14px;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--lemon);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.theme-toggle:hover {
  transform: translate(-1px, -1px);
}

body[data-theme="dark"] {
  --bg: #151422;
  --paper: #211f31;
  --paper-2: #2b263a;
  --panel: #252235;
  --panel-2: #302841;
  --text: #fff8ff;
  --muted: #d8cdea;
  --ink: #aebcff;
  --line: #8792df;
  --sakura: #ff8fbc;
  --ume: #ff6f9f;
  --momo: #403047;
  --matcha: #9edab1;
  --sky: #9fc8ee;
  --lemon: #ffe49a;
  --lavender: #d8dcff;
  color-scheme: dark;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 143, 188, 0.22) 0 3px, transparent 4px),
    radial-gradient(circle at 46px 38px, rgba(159, 200, 238, 0.18) 0 2px, transparent 3px),
    linear-gradient(135deg, #151422 0%, #20182a 48%, #121b29 100%);
  background-size: 64px 64px, 64px 64px, auto;
}

body[data-theme="dark"]::before {
  background:
    linear-gradient(90deg, transparent 0 96%, rgba(216, 220, 255, 0.08) 96% 100%),
    linear-gradient(0deg, transparent 0 96%, rgba(216, 220, 255, 0.08) 96% 100%);
}

body[data-theme="dark"]::after {
  color: rgba(255, 143, 188, 0.2);
}

body[data-theme="dark"] .site-header {
  border-bottom-color: rgba(216, 220, 255, 0.36);
  background: rgba(20, 18, 31, 0.9);
  box-shadow: 0 6px 0 rgba(255, 143, 188, 0.24);
}

body[data-theme="dark"] .brand,
body[data-theme="dark"] .nav-links a,
body[data-theme="dark"] .cards-top h1,
body[data-theme="dark"] .results-bar strong,
body[data-theme="dark"] .card-title {
  color: #fff8ff;
}

body[data-theme="dark"] .brand-mark,
body[data-theme="dark"] .live-chip,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .filter-button,
body[data-theme="dark"] .button,
body[data-theme="dark"] .icon-button {
  color: #fff8ff;
  border-color: rgba(216, 220, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .filter-button.active {
  color: #1b1728;
  background: #ffe49a;
}

body[data-theme="dark"] .filter-panel,
body[data-theme="dark"] .card-tile,
body[data-theme="dark"] .card-dialog {
  border-color: rgba(216, 220, 255, 0.36);
  background: rgba(31, 28, 45, 0.92);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 6px 6px 0 rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .filter-panel {
  background:
    linear-gradient(45deg, rgba(159, 200, 238, 0.08) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.08) 75%),
    linear-gradient(45deg, rgba(159, 200, 238, 0.08) 25%, transparent 25% 75%, rgba(159, 200, 238, 0.08) 75%),
    rgba(31, 28, 45, 0.92);
  background-position: 0 0, 10px 10px, 0 0;
  background-size: 20px 20px, 20px 20px, auto;
}

body[data-theme="dark"] .search-field input,
body[data-theme="dark"] .select-grid select {
  color: #fff8ff;
  border-color: rgba(216, 220, 255, 0.35);
  background: rgba(12, 11, 20, 0.78);
}

body[data-theme="dark"] .search-field input::placeholder {
  color: rgba(216, 205, 234, 0.72);
}

body[data-theme="dark"] .card-meta,
body[data-theme="dark"] .card-text,
body[data-theme="dark"] .lede,
body[data-theme="dark"] .results-bar,
body[data-theme="dark"] .search-field,
body[data-theme="dark"] .select-grid label {
  color: #d8cdea;
}

body[data-theme="dark"] .card-art:not(.has-image) {
  border-color: rgba(216, 220, 255, 0.32);
  color: #fff8ff;
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 760px) {
  .cards-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .theme-toggle,
  .cards-actions .live-chip {
    flex: 1 1 150px;
    text-align: center;
  }
}
/* Card gallery binder controls */
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.filter-button img,
.mana-symbol {
  width: 1.35em;
  height: 1.35em;
  flex: 0 0 auto;
  vertical-align: -0.25em;
}

.filter-button[data-color="C"] {
  background: #f1f1f4;
}

.filter-button[data-color="M"] {
  background: linear-gradient(135deg, #fff4b8, #d8bd62 52%, #b9892f);
}

.filter-button[data-color="L"] {
  background: #d8ead2;
}
.mana-gold,
.mana-text {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 0.25em;
  color: #332511;
  border: 1px solid rgba(88, 62, 15, 0.5);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3b0, #d9b65a);
  font-size: 0.78em;
  font-weight: 900;
  line-height: 1;
}

.card-set-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.set-chip,
.rarity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  color: var(--ink);
  border: 1px solid rgba(111, 134, 200, 0.46);
  border-radius: 999px;
  background: rgba(216, 220, 255, 0.45);
  font-size: 0.73rem;
  font-weight: 900;
  line-height: 1;
}

.rarity-chip {
  background: rgba(255, 234, 167, 0.72);
}

.mana-cost {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-right: 8px;
}

.modal-type-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}

body[data-theme="dark"] .filter-button[data-color="C"] {
  color: #211f31;
  background: #eeeeef;
}

body[data-theme="dark"] .filter-button[data-color="M"] {
  color: #211f31;
  background: linear-gradient(135deg, #fff4b8, #d8bd62 52%, #b9892f);
}

body[data-theme="dark"] .filter-button[data-color="L"] {
  color: #211f31;
  background: #d8ead2;
}
body[data-theme="dark"] .set-chip {
  color: #eef0ff;
  border-color: rgba(216, 220, 255, 0.28);
  background: rgba(216, 220, 255, 0.13);
}

body[data-theme="dark"] .rarity-chip {
  color: #201929;
  border-color: rgba(255, 228, 154, 0.3);
  background: #ffe49a;
}

body[data-theme="dark"] .modal-type-line {
  color: #fff8ff;
}
/* Compact one-row color filters */
.filter-panel .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
}

.filter-panel .filter-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 11px;
  color: #fff8ff;
  border-color: rgba(216, 220, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.filter-panel .filter-button[data-color="C"],
.filter-panel .filter-button[data-color="M"],
.filter-panel .filter-button[data-color="L"] {
  color: #fff8ff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-panel .filter-button.active,
body[data-theme="dark"] .filter-panel .filter-button.active {
  color: #1b1728;
  background: #ffe49a;
}

.filter-panel .filter-button.active[data-color="M"],
body[data-theme="dark"] .filter-panel .filter-button.active[data-color="M"] {
  background: linear-gradient(135deg, #fff4b8, #d8bd62 52%, #b9892f);
}

body:not([data-theme="dark"]) .filter-panel .filter-button,
body:not([data-theme="dark"]) .filter-panel .filter-button[data-color="C"],
body:not([data-theme="dark"]) .filter-panel .filter-button[data-color="M"],
body:not([data-theme="dark"]) .filter-panel .filter-button[data-color="L"] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--panel-2);
}

body:not([data-theme="dark"]) .filter-panel .filter-button.active {
  background: var(--lemon);
}

body:not([data-theme="dark"]) .filter-panel .filter-button.active[data-color="M"] {
  background: linear-gradient(135deg, #fff4b8, #d8bd62 52%, #b9892f);
}
/* Keep Gold inner marker neutral until selected */
.filter-panel .mana-gold {
  color: inherit;
  border-color: currentColor;
  background: transparent;
}

.filter-panel .filter-button.active .mana-gold {
  color: #332511;
  border-color: rgba(88, 62, 15, 0.5);
  background: rgba(255, 255, 255, 0.36);
}
/* Normalize Colorless, Gold, and Lands buttons with the rest of the color row */
.filter-panel .filter-button[data-color="C"],
.filter-panel .filter-button[data-color="M"],
.filter-panel .filter-button[data-color="L"],
body[data-theme="dark"] .filter-panel .filter-button[data-color="C"],
body[data-theme="dark"] .filter-panel .filter-button[data-color="M"],
body[data-theme="dark"] .filter-panel .filter-button[data-color="L"] {
  color: #fff8ff;
  border-color: rgba(216, 220, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.filter-panel .filter-button.active[data-color="C"],
.filter-panel .filter-button.active[data-color="M"],
.filter-panel .filter-button.active[data-color="L"],
body[data-theme="dark"] .filter-panel .filter-button.active[data-color="C"],
body[data-theme="dark"] .filter-panel .filter-button.active[data-color="M"],
body[data-theme="dark"] .filter-panel .filter-button.active[data-color="L"] {
  color: #1b1728;
  background: #ffe49a;
}

body:not([data-theme="dark"]) .filter-panel .filter-button[data-color="C"],
body:not([data-theme="dark"]) .filter-panel .filter-button[data-color="M"],
body:not([data-theme="dark"]) .filter-panel .filter-button[data-color="L"] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--panel-2);
}

body:not([data-theme="dark"]) .filter-panel .filter-button.active[data-color="C"],
body:not([data-theme="dark"]) .filter-panel .filter-button.active[data-color="M"],
body:not([data-theme="dark"]) .filter-panel .filter-button.active[data-color="L"] {
  background: var(--lemon);
}
/* Refined modal card navigation */
.card-dialog {
  max-height: min(620px, calc(100dvh - 32px));
  overflow: visible;
}

.card-dialog[open] {
  display: flex;
  flex-direction: column;
}

.card-dialog .dialog-content {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
  align-items: start;
}

.card-dialog .dialog-content > div:not(.card-art) {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 6px;
}

.card-dialog .dialog-content .card-art {
  width: 100%;
  min-height: 0;
  max-height: calc(100dvh - 190px);
  align-self: start;
}

.card-dialog-nav {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.card-dialog-nav .card-nav-button {
  position: absolute;
  top: 50%;
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  color: #fff8ff;
  border: 1px solid rgba(216, 220, 255, 0.3);
  border-radius: 999px;
  background: rgba(24, 20, 36, 0.72);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}

.card-dialog-nav .card-nav-prev {
  left: -18px;
}

.card-dialog-nav .card-nav-next {
  right: -18px;
}

.card-dialog-nav .card-nav-button:hover {
  color: #1b1728;
  background: #ffe49a;
  transform: translateY(-50%) scale(1.04);
}

.card-dialog-nav .card-nav-button:disabled {
  opacity: 0.35;
  cursor: default;
  transform: translateY(-50%);
}

body:not([data-theme="dark"]) .card-dialog-nav .card-nav-button {
  color: var(--ink);
  border-color: rgba(111, 134, 200, 0.42);
  background: rgba(255, 255, 255, 0.86);
}

body:not([data-theme="dark"]) .card-dialog-nav .card-nav-button:hover {
  background: var(--lemon);
}

@media (max-width: 760px) {
  .card-dialog {
    max-height: min(680px, calc(100dvh - 24px));
  }

  .card-dialog .dialog-content {
    overflow: auto;
    padding-bottom: 20px;
  }

  .card-dialog .dialog-content > div:not(.card-art) {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .card-dialog .dialog-content .card-art {
    width: min(100%, 260px);
    max-height: 42dvh;
    justify-self: center;
  }

  .card-dialog-nav .card-nav-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
}

/* Homepage moonlit picks */
.homepage-oracle-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr) minmax(220px, 0.85fr);
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4px 0 34px;
}

.oracle-card {
  position: relative;
  min-height: 204px;
  padding: 18px;
  border: 3px solid #ffffff;
  border-radius: var(--radius);
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 183, 211, 0.48) 0 12px, transparent 13px),
    linear-gradient(135deg, #fffefe, #eaf7ff 72%);
  box-shadow: 0 0 0 4px #6f86c8, 6px 6px 0 rgba(111, 134, 200, 0.28);
  overflow: hidden;
}

.oracle-card h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.1;
}

.oracle-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.card-of-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 128px);
  align-items: center;
  gap: 16px;
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 244, 189, 0.9) 0 18px, transparent 19px),
    linear-gradient(135deg, #fff8fb, #dff8e4 72%);
  transform: rotate(-0.5deg);
}

.random-game-card {
  background:
    radial-gradient(circle at 88% 18%, rgba(169, 216, 255, 0.68) 0 14px, transparent 15px),
    linear-gradient(135deg, #fffefe, #fff4bd 76%);
  transform: rotate(0.5deg);
}

.sealed-artifact-card {
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 183, 211, 0.62) 0 14px, transparent 15px),
    linear-gradient(135deg, #fffefe, #f1e8ff 76%);
  transform: rotate(-0.35deg);
}

.daily-card-frame {
  width: 100%;
  aspect-ratio: 488 / 680;
  padding: 5px;
  border: 3px solid #ffffff;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 0 0 3px #6f86c8, 5px 5px 0 rgba(111, 134, 200, 0.24);
}

.daily-card-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

.oracle-sigil {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: #52649d;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #fff4bd;
  box-shadow: 0 0 0 3px #6f86c8, 3px 3px 0 rgba(111, 134, 200, 0.24);
  font-weight: 900;
}

.oracle-card .button {
  margin-top: 8px;
}

@media (max-width: 860px) {
  .homepage-oracle-strip {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1120px);
    padding-bottom: 26px;
  }

  .oracle-card,
  .card-of-day,
  .random-game-card,
  .sealed-artifact-card {
    transform: none;
  }

  .card-of-day {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 118px);
  }
}

@media (max-width: 480px) {
  .card-of-day {
    grid-template-columns: 1fr;
  }

  .daily-card-frame {
    width: min(180px, 78vw);
    justify-self: center;
  }
}
/* Inspected card art zoom */
.card-dialog .card-art.modal-zoom-target {
  position: relative;
  cursor: zoom-in;
  outline: none;
}

.card-dialog .card-art.modal-zoom-target::before,
.card-dialog .card-art.modal-zoom-target::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.card-dialog .card-art.modal-zoom-target::before {
  content: "";
  right: 21px;
  bottom: 17px;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: #1b1728;
  transform: rotate(45deg) translate(3px, 8px);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.78);
}

.card-dialog .card-art.modal-zoom-target::after {
  content: "+";
  right: 16px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #1b1728;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #ffe49a;
  box-shadow: 0 0 0 3px rgba(111, 134, 200, 0.92), 4px 4px 0 rgba(0, 0, 0, 0.24);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(4px) scale(0.96);
}

.card-dialog .card-art.modal-zoom-target:hover::before,
.card-dialog .card-art.modal-zoom-target:focus-visible::before {
  opacity: 1;
  transform: rotate(45deg) translate(3px, 8px);
}

.card-dialog .card-art.modal-zoom-target:hover::after,
.card-dialog .card-art.modal-zoom-target:focus-visible::after {
  opacity: 1;
  transform: none;
}

.card-zoom-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 18px;
  border: 3px solid rgba(216, 220, 255, 0.58);
  border-radius: var(--radius);
  background: rgba(31, 28, 45, 0.98);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 8px 8px 0 rgba(0, 0, 0, 0.34);
}

.card-zoom-dialog[open] {
  display: grid;
  place-items: center;
}

.card-zoom-dialog::backdrop {
  background: rgba(19, 17, 28, 0.72);
}

.card-zoom-dialog img {
  display: block;
  max-width: min(100%, 680px);
  max-height: calc(100dvh - 72px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 18px 46px rgba(0, 0, 0, 0.42);
}

.card-zoom-dialog .icon-button {
  z-index: 2;
}

@media (max-width: 760px) {
  .card-dialog .card-art.modal-zoom-target::after {
    opacity: 1;
    right: 12px;
    bottom: 18px;
    width: 40px;
    height: 40px;
    font-size: 1.35rem;
    transform: none;
  }

  .card-dialog .card-art.modal-zoom-target::before {
    opacity: 1;
    right: 18px;
    bottom: 14px;
    transform: rotate(45deg) translate(2px, 7px);
  }

  .card-zoom-dialog {
    padding: 14px;
  }
}
/* Site style picker */
.style-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 8px 6px 10px;
  color: var(--muted);
  border: 2px dashed transparent;
  border-radius: var(--radius);
  font-weight: 900;
  white-space: nowrap;
}

.style-picker span {
  font-size: 0.92rem;
}

.style-picker select {
  min-height: 28px;
  max-width: 142px;
  padding: 3px 26px 3px 8px;
  color: var(--ink);
  border: 2px solid rgba(111, 134, 200, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.style-picker:focus-within,
.style-picker:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper-2);
}

body[data-theme="dark"] .style-picker {
  color: #d8cdea;
}

body[data-theme="dark"] .style-picker:hover,
body[data-theme="dark"] .style-picker:focus-within {
  color: #fff8ff;
  border-color: rgba(216, 220, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .style-picker select {
  color: #fff8ff;
  border-color: rgba(216, 220, 255, 0.42);
  background: rgba(12, 11, 20, 0.78);
}

/* Soft anime star background style */
body[data-style="stars"] {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='180' viewBox='0 0 210 180'%3E%3Cg stroke='%23f596e7' stroke-width='4.5' stroke-linejoin='round' opacity='.62'%3E%3Cpath fill='%23bfffe6' d='M34 10l9 19 21 3-15 14 4 21-19-10-19 10 4-21L4 32l21-3z'/%3E%3Cpath fill='%23ffc0ef' d='M142 22l8 18 20 3-14 13 3 20-17-10-17 10 3-20-14-13 20-3z'/%3E%3Cpath fill='%23b8ffd0' d='M76 92l9 19 21 3-15 14 4 21-19-10-19 10 4-21-15-14 21-3z'/%3E%3Cpath fill='%23bfffe6' d='M184 104l8 17 19 3-14 13 3 19-16-9-16 9 3-19-14-13 19-3z'/%3E%3Cpath fill='%23ffc0ef' d='M-8 128l8 17 19 3-14 13 3 19-16-9-16 9 3-19-14-13 19-3z'/%3E%3C/g%3E%3Cg fill='%23ffd35d' stroke='%23f596e7' stroke-width='2.6' opacity='.72'%3E%3Ccircle cx='104' cy='38' r='4.8'/%3E%3Ccircle cx='198' cy='48' r='4.8'/%3E%3Ccircle cx='42' cy='88' r='4.8'/%3E%3Ccircle cx='144' cy='154' r='4.8'/%3E%3Ccircle cx='12' cy='38' r='4.2'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #fffefe 0%, #fff8fd 48%, #f8fdff 100%);
  background-position: 0 0, 0 0;
  background-size: 210px 180px, auto;
}

body[data-style="stars"]::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='180' viewBox='0 0 210 180'%3E%3Cg stroke='%23f596e7' stroke-width='4.5' stroke-linejoin='round' opacity='.5'%3E%3Cpath fill='%23b8ffd0' d='M142-68l8 18 20 3-14 13 3 20-17-10-17 10 3-20-14-13 20-3z'/%3E%3Cpath fill='%23ffc0ef' d='M34 100l9 19 21 3-15 14 4 21-19-10-19 10 4-21L4 122l21-3z'/%3E%3Cpath fill='%23bfffe6' d='M142 112l8 18 20 3-14 13 3 20-17-10-17 10 3-20-14-13 20-3z'/%3E%3C/g%3E%3Cg fill='%23ffd35d' stroke='%23f596e7' stroke-width='2.6' opacity='.62'%3E%3Ccircle cx='104' cy='128' r='4.6'/%3E%3Ccircle cx='198' cy='138' r='4.6'/%3E%3Ccircle cx='42' cy='178' r='4.6'/%3E%3C/g%3E%3C/svg%3E");
  background-position: 105px 90px;
  background-size: 210px 180px;
  opacity: 0.62;
}

body[data-style="stars"]::after {
  content: "";
  right: 20px;
  bottom: 20px;
  width: 150px;
  height: 110px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 28px 30px, rgba(255, 192, 239, 0.42) 0 18px, transparent 19px),
    radial-gradient(circle at 86px 60px, rgba(184, 255, 208, 0.36) 0 16px, transparent 17px),
    radial-gradient(circle at 122px 28px, rgba(191, 255, 228, 0.34) 0 13px, transparent 14px);
  opacity: 0.28;
  transform: rotate(-8deg);
}

body[data-theme="dark"][data-style="stars"] {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='180' viewBox='0 0 210 180'%3E%3Cg stroke='%23ff8fef' stroke-width='4.5' stroke-linejoin='round' opacity='.42'%3E%3Cpath fill='%239fc8ee' d='M34 10l9 19 21 3-15 14 4 21-19-10-19 10 4-21L4 32l21-3z'/%3E%3Cpath fill='%23ff8fbc' d='M142 22l8 18 20 3-14 13 3 20-17-10-17 10 3-20-14-13 20-3z'/%3E%3Cpath fill='%239edab1' d='M76 92l9 19 21 3-15 14 4 21-19-10-19 10 4-21-15-14 21-3z'/%3E%3Cpath fill='%239fc8ee' d='M184 104l8 17 19 3-14 13 3 19-16-9-16 9 3-19-14-13 19-3z'/%3E%3Cpath fill='%23ff8fbc' d='M-8 128l8 17 19 3-14 13 3 19-16-9-16 9 3-19-14-13 19-3z'/%3E%3C/g%3E%3Cg fill='%23ffe49a' stroke='%23ff8fef' stroke-width='2.6' opacity='.48'%3E%3Ccircle cx='104' cy='38' r='4.8'/%3E%3Ccircle cx='198' cy='48' r='4.8'/%3E%3Ccircle cx='42' cy='88' r='4.8'/%3E%3Ccircle cx='144' cy='154' r='4.8'/%3E%3Ccircle cx='12' cy='38' r='4.2'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #151422 0%, #20182a 48%, #121b29 100%);
  background-size: 210px 180px, auto;
}

body[data-theme="dark"][data-style="stars"]::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='180' viewBox='0 0 210 180'%3E%3Cg stroke='%23ff8fef' stroke-width='4.5' stroke-linejoin='round' opacity='.3'%3E%3Cpath fill='%239edab1' d='M142-68l8 18 20 3-14 13 3 20-17-10-17 10 3-20-14-13 20-3z'/%3E%3Cpath fill='%23ff8fbc' d='M34 100l9 19 21 3-15 14 4 21-19-10-19 10 4-21L4 122l21-3z'/%3E%3Cpath fill='%239fc8ee' d='M142 112l8 18 20 3-14 13 3 20-17-10-17 10 3-20-14-13 20-3z'/%3E%3C/g%3E%3Cg fill='%23ffe49a' stroke='%23ff8fef' stroke-width='2.6' opacity='.36'%3E%3Ccircle cx='104' cy='128' r='4.6'/%3E%3Ccircle cx='198' cy='138' r='4.6'/%3E%3Ccircle cx='42' cy='178' r='4.6'/%3E%3C/g%3E%3C/svg%3E");
  background-position: 105px 90px;
  background-size: 210px 180px;
  opacity: 0.64;
}
/* Pastel reference-style star backgrounds */
body[data-style="candy-stars"] {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='180' viewBox='0 0 220 180'%3E%3Cg stroke='%23f48de8' stroke-width='5.5' stroke-linejoin='round' opacity='.82'%3E%3Cpath fill='%23b8ffd0' d='M48 16l10 22 24 3-18 16 5 24-21-12-21 12 5-24-18-16 24-3z'/%3E%3Cpath fill='%23ffc0ef' d='M148 20l9 20 22 3-16 15 4 22-19-11-19 11 4-22-16-15 22-3z'/%3E%3Cpath fill='%23bfffe4' d='M108 100l10 22 24 3-18 16 5 24-21-12-21 12 5-24-18-16 24-3z'/%3E%3Cpath fill='%23b8ffd0' d='M198 96l8 17 19 3-14 13 3 19-16-9-16 9 3-19-14-13 19-3z'/%3E%3Cpath fill='%23ffc0ef' d='M26 116l8 18 20 3-15 13 4 20-17-10-17 10 4-20-15-13 20-3z'/%3E%3C/g%3E%3Cg fill='%23ffd35d' stroke='%23f48de8' stroke-width='3' opacity='.9'%3E%3Ccircle cx='100' cy='34' r='5'/%3E%3Ccircle cx='184' cy='48' r='5'/%3E%3Ccircle cx='56' cy='96' r='5'/%3E%3Ccircle cx='156' cy='146' r='5'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #fffefe 0%, #fff8fd 50%, #f8fdff 100%);
  background-size: 220px 180px, auto;
}

body[data-style="candy-stars"]::before {
  background:
    linear-gradient(90deg, transparent 0 97%, rgba(244, 141, 232, 0.04) 97% 100%),
    linear-gradient(0deg, transparent 0 97%, rgba(159, 200, 238, 0.05) 97% 100%);
  background-size: 34px 34px;
  opacity: 0.32;
}

body[data-style="candy-stars"]::after {
  content: "";
  right: 20px;
  bottom: 20px;
  width: 150px;
  height: 110px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 28px 30px, rgba(255, 192, 239, 0.62) 0 18px, transparent 19px),
    radial-gradient(circle at 86px 60px, rgba(184, 255, 208, 0.56) 0 16px, transparent 17px),
    radial-gradient(circle at 122px 28px, rgba(191, 255, 228, 0.5) 0 13px, transparent 14px);
  opacity: 0.4;
  transform: rotate(-8deg);
}

body[data-theme="dark"][data-style="candy-stars"] {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='180' viewBox='0 0 220 180'%3E%3Cg stroke='%23ff8fef' stroke-width='5.5' stroke-linejoin='round' opacity='.5'%3E%3Cpath fill='%239edab1' d='M48 16l10 22 24 3-18 16 5 24-21-12-21 12 5-24-18-16 24-3z'/%3E%3Cpath fill='%23ff8fbc' d='M148 20l9 20 22 3-16 15 4 22-19-11-19 11 4-22-16-15 22-3z'/%3E%3Cpath fill='%239fc8ee' d='M108 100l10 22 24 3-18 16 5 24-21-12-21 12 5-24-18-16 24-3z'/%3E%3Cpath fill='%239edab1' d='M198 96l8 17 19 3-14 13 3 19-16-9-16 9 3-19-14-13 19-3z'/%3E%3Cpath fill='%23ff8fbc' d='M26 116l8 18 20 3-15 13 4 20-17-10-17 10 4-20-15-13 20-3z'/%3E%3C/g%3E%3Cg fill='%23ffe49a' stroke='%23ff8fef' stroke-width='3' opacity='.58'%3E%3Ccircle cx='100' cy='34' r='5'/%3E%3Ccircle cx='184' cy='48' r='5'/%3E%3Ccircle cx='56' cy='96' r='5'/%3E%3Ccircle cx='156' cy='146' r='5'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #151422 0%, #20182a 48%, #121b29 100%);
  background-size: 220px 180px, auto;
}

body[data-theme="dark"][data-style="candy-stars"]::before {
  background:
    linear-gradient(90deg, transparent 0 97%, rgba(216, 220, 255, 0.06) 97% 100%),
    linear-gradient(0deg, transparent 0 97%, rgba(255, 143, 188, 0.05) 97% 100%);
  background-size: 34px 34px;
  opacity: 0.44;
}

body[data-style="dream-stars"] {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='300' viewBox='0 0 360 300'%3E%3Cdefs%3E%3Cfilter id='g' x='-80%25' y='-80%25' width='260%25' height='260%25'%3E%3CfeGaussianBlur stdDeviation='2.6' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='%23fff77a' filter='url(%23g)' opacity='.58'%3E%3Cpath d='M72 42l7 15 17 3-12 11 3 17-15-8-15 8 3-17-12-11 17-3z'/%3E%3Cpath d='M266 34l8 18 20 3-15 13 4 20-17-10-17 10 4-20-15-13 20-3z'/%3E%3Cpath d='M176 154l9 20 22 3-16 15 4 22-19-11-19 11 4-22-16-15 22-3z'/%3E%3Cpath d='M306 216l6 13 14 2-10 10 2 14-12-7-12 7 2-14-10-10 14-2z'/%3E%3Cpath d='M58 238l6 13 14 2-10 10 2 14-12-7-12 7 2-14-10-10 14-2z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 48% 4%, rgba(255, 255, 255, 0.54), transparent 34%),
    linear-gradient(160deg, #fdf3ff 0%, #cfeeff 42%, #efd2f3 70%, #ffe2d8 100%);
  background-size: 360px 300px, auto, auto;
}

body[data-style="dream-stars"]::before {
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.22) 0 8%, transparent 23%),
    radial-gradient(circle at 76% 14%, rgba(255, 255, 255, 0.16) 0 7%, transparent 21%);
  opacity: 0.48;
}

body[data-style="dream-stars"]::after {
  content: "";
  inset: auto 0 0 0;
  width: auto;
  height: 32vh;
  border-radius: 0;
  background: linear-gradient(0deg, rgba(255, 173, 200, 0.14), transparent 74%);
  opacity: 0.78;
  transform: none;
}

body[data-theme="dark"][data-style="dream-stars"] {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='300' viewBox='0 0 360 300'%3E%3Cdefs%3E%3Cfilter id='g' x='-80%25' y='-80%25' width='260%25' height='260%25'%3E%3CfeGaussianBlur stdDeviation='2.6' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='%23fff77a' filter='url(%23g)' opacity='.42'%3E%3Cpath d='M72 42l7 15 17 3-12 11 3 17-15-8-15 8 3-17-12-11 17-3z'/%3E%3Cpath d='M266 34l8 18 20 3-15 13 4 20-17-10-17 10 4-20-15-13 20-3z'/%3E%3Cpath d='M176 154l9 20 22 3-16 15 4 22-19-11-19 11 4-22-16-15 22-3z'/%3E%3Cpath d='M306 216l6 13 14 2-10 10 2 14-12-7-12 7 2-14-10-10 14-2z'/%3E%3Cpath d='M58 238l6 13 14 2-10 10 2 14-12-7-12 7 2-14-10-10 14-2z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 48% 4%, rgba(216, 220, 255, 0.16), transparent 34%),
    linear-gradient(160deg, #171426 0%, #20304c 42%, #332846 70%, #3d2636 100%);
  background-size: 360px 300px, auto, auto;
}

body[data-theme="dark"][data-style="dream-stars"]::after {
  background: linear-gradient(0deg, rgba(255, 143, 188, 0.1), transparent 74%);
}
