:root {
  color-scheme: light;
  --ink: #202025;
  --muted: #6f675d;
  --panel: #fffdf5;
  --line: #33261c;
  --board: #8c7257;
  --accent: #ffcf34;
  --shadow: 0 18px 0 rgba(40, 24, 12, 0.16), 0 28px 38px rgba(40, 24, 12, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family:
    ui-rounded, "Arial Rounded MT Bold", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: url('assets/game-bg.png') center center / cover no-repeat fixed;
  overflow-x: hidden;
}

body::before {
  content: none;
}

button {
  font: inherit;
}

.home-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 66%, rgba(255, 128, 0, 0.58), transparent 17rem),
    radial-gradient(circle at 16% 22%, rgba(159, 44, 255, 0.5), transparent 16rem),
    radial-gradient(circle at 84% 18%, rgba(255, 205, 48, 0.26), transparent 14rem),
    linear-gradient(145deg, #06000e 0%, #1a0631 48%, #07000d 100%);
}

.home-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 13%, rgba(255, 213, 66, 0.9) 13.4%, transparent 14.2% 48%, rgba(154, 42, 255, 0.82) 48.5%, transparent 49.3%),
    linear-gradient(62deg, transparent 0 28%, rgba(255, 213, 66, 0.72) 28.3%, transparent 29% 70%, rgba(154, 42, 255, 0.7) 70.4%, transparent 71.1%);
  opacity: 0.62;
}

.home-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 205, 48, 0.9) 0 1px, transparent 2px);
  background-position:
    18px 24px,
    68px 91px;
  background-size:
    122px 122px,
    156px 156px;
  opacity: 0.45;
}

.home-screen.hidden {
  display: none;
}

.home-content {
  position: relative;
  width: min(980px, 100%);
  display: grid;
  align-content: center;
  gap: 5px;
  text-align: center;
  padding-block: 12px;
}

.home-copy {
  width: min(720px, 100%);
  margin: 0 auto;
  color: #fff6d2;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 950;
  text-shadow:
    0 3px 0 #18000f,
    0 0 14px rgba(255, 207, 52, 0.75);
}

.poster-slogan {
  margin: 0 auto;
  padding: 4px 12px;
  width: fit-content;
  color: #fff;
  border: 3px solid rgba(255, 207, 52, 0.78);
  border-radius: 8px;
  background: rgba(28, 0, 54, 0.72);
  box-shadow:
    0 0 18px rgba(155, 52, 255, 0.8),
    inset 0 0 14px rgba(255, 207, 52, 0.24);
  font-size: 0.9rem;
  font-weight: 950;
}

.poster-title {
  display: grid;
  gap: 2px;
}

.poster-title span,
.poster-title strong {
  display: block;
  line-height: 0.88;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.poster-title span {
  color: #f8f0ff;
  font-size: 5.2rem;
  text-shadow:
    0 5px 0 #6b2bc4,
    0 9px 0 #2a063b,
    0 0 28px rgba(184, 79, 255, 0.92);
}

.poster-title strong {
  color: #ffd341;
  font-size: 4.2rem;
  text-shadow:
    0 5px 0 #8d3a08,
    0 10px 0 #3a1306,
    0 0 28px rgba(255, 144, 26, 0.92);
}

.merge-demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.15fr;
  gap: 12px;
  align-items: center;
  margin: 4px auto;
  width: min(760px, 100%);
}

.demo-tile {
  min-height: 80px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  border: 4px solid #ffd341;
  border-radius: 8px;
  background:
    radial-gradient(circle at 26% 20%, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(145deg, #4b1b79, #120022);
  box-shadow:
    0 0 18px rgba(255, 207, 52, 0.76),
    0 8px 0 rgba(10, 0, 18, 0.82);
}

.demo-tile.result {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(145deg, #ffcf34, #ff4ad8);
}

.demo-tile span {
  font-size: 3.15rem;
  line-height: 1;
}

.demo-tile img,
.hero-cat img,
.tile-icon img,
.mini-icon img,
.discovery-icon img,
.mini-evolution img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.demo-tile span:has(img) {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.82);
}

.demo-tile strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 #120022;
}

.demo-plus,
.demo-arrow {
  color: #ffd341;
  font-size: 3rem;
  font-weight: 950;
  text-shadow:
    0 3px 0 #7a0e78,
    0 0 14px rgba(255, 207, 52, 0.9);
}

.meme-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sticker {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 152px;
  padding: 12px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(18, 0, 34, 0.78);
  box-shadow:
    0 0 18px rgba(155, 52, 255, 0.86),
    0 8px 0 rgba(0, 0, 0, 0.44);
  transform: rotate(var(--r));
}

.sticker span {
  font-size: 3rem;
}

.sticker b {
  color: #fff;
  font-size: 1rem;
  text-shadow: 0 2px 0 #000;
}

.s1 {
  left: 0%;
  top: 4%;
  --r: -13deg;
}

.s2 {
  right: 0%;
  top: 4%;
  --r: 12deg;
}

.s3 {
  right: 0%;
  top: 42%;
  --r: -8deg;
}

.s4 {
  left: 0%;
  top: 42%;
  --r: 9deg;
}

.s5 {
  left: 0%;
  bottom: 6%;
  --r: -10deg;
}

.s6 {
  right: 0%;
  bottom: 6%;
  --r: 10deg;
}

.poster-hero {
  width: min(470px, 88%);
  margin: 2px auto;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 14px;
  border: 4px solid #ffd341;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.78), transparent 18%),
    linear-gradient(145deg, #ffcf34, #8d3a08);
  box-shadow:
    0 0 26px rgba(255, 207, 52, 0.92),
    0 12px 0 rgba(36, 8, 0, 0.72);
}

.crown {
  margin-bottom: -12px;
  color: #fff6bd;
  font-size: 2.4rem;
  text-shadow: 0 3px 0 #7a330e;
}

.hero-cat {
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 7px 0 rgba(69, 19, 0, 0.35));
}

.poster-hero strong {
  color: #fff;
  font-size: 1.32rem;
  text-shadow:
    0 3px 0 #4b073b,
    0 0 10px rgba(147, 24, 255, 0.82);
}

.poster-hero span {
  color: #221103;
  font-weight: 950;
}

.mini-evolution {
  display: flex;
  width: min(900px, 100%);
  margin: 2px auto 0;
  gap: 7px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.mini-evolution span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 211, 65, 0.82);
  border-radius: 7px;
  color: #fff;
  background: rgba(34, 0, 62, 0.72);
  box-shadow: 0 0 10px rgba(155, 52, 255, 0.7);
  font-size: 0.88rem;
  font-weight: 950;
}

.mini-evolution img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.mini-evolution b {
  color: #ffd341;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(255, 207, 52, 0.8);
}

.home-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.home-start {
  min-height: 64px;
  padding: 0 32px;
  cursor: pointer;
  border: 4px solid #fff;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #ff3df0, #781eff);
  box-shadow:
    0 0 22px rgba(255, 61, 240, 0.86),
    0 9px 0 #2a063b;
  font-size: 1.35rem;
  font-weight: 950;
}

.home-actions span {
  color: #fff6d2;
  font-weight: 900;
  text-shadow: 0 2px 0 #120022;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2vw, 20px);
}

.game-area {
  width: min(1120px, 100%);
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.kicker,
.label {
  margin: 0 0 5px;
  color: #6c4117;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 4.5rem;
  line-height: 0.92;
  color: #ffd341;
  text-shadow:
    0 4px 0 #7a330e,
    0 8px 0 #4a210f,
    0 13px 18px rgba(65, 30, 12, 0.28);
}

.score-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.score-box {
  min-width: 104px;
  padding: 10px 14px 12px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 6px 0 #6e4b2d;
  text-align: center;
}

button.score-box {
  cursor: pointer;
}

button.score-box:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.score-box span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.score-box strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.stage {
  display: grid;
  grid-template-columns: minmax(310px, 1fr) minmax(285px, 340px);
  gap: clamp(14px, 3vw, 28px);
  align-items: start;
}

.board-wrap {
  position: relative;
  width: min(100%, 620px);
  margin-inline: auto;
}

.board {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(8px, 1.6vw, 14px);
  padding: clamp(10px, 1.8vw, 16px);
  border: 5px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    var(--board);
  box-shadow: var(--shadow);
  touch-action: none;
}

.board.animating .tile {
  opacity: 0;
}

.cell {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(55, 34, 20, 0.14);
  border-radius: 7px;
  background: rgba(255, 245, 222, 0.4);
}

.tile {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 6px;
  color: #241a13;
  text-align: center;
  border: 3px solid rgba(42, 25, 13, 0.78);
  border-radius: 7px;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.28),
    inset 0 -7px 0 rgba(39, 17, 9, 0.14),
    0 5px 0 rgba(55, 30, 14, 0.32);
  animation: pop 150ms ease-out;
}

.tile.result {
  border-color: #4d260e;
}

.tile-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 3px;
  justify-items: center;
  align-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.tile-icon {
  width: 3rem;
  height: 3rem;
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.16));
}

.tile.result .tile-icon {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 3.2rem;
}

.tile-name {
  width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  line-height: 1.08;
  font-weight: 950;
  overflow-wrap: anywhere;
  word-break: break-all;
  overflow: hidden;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.tile.merged {
  animation: boom 220ms ease-out;
}

.anim-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.anim-layer .tile {
  position: absolute;
  z-index: 2;
  transition:
    transform 210ms cubic-bezier(0.18, 0.82, 0.24, 1),
    opacity 120ms ease;
  will-change: transform;
}

.merge-burst {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: scale(0.7);
  opacity: 0;
  animation: burst 430ms ease-out forwards;
}

.merge-burst::before {
  content: "";
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 18%, rgba(255, 215, 67, 0.9) 19% 36%, transparent 38%),
    conic-gradient(from 20deg, #fff2a8, #ff7b54, #ffe66d, #57d7ff, #fff2a8);
}

.merge-burst::after {
  content: "接上了";
  position: relative;
  padding: 7px 11px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff7d6;
  color: #4a210f;
  font-weight: 950;
  box-shadow: 0 5px 0 rgba(70, 38, 16, 0.3);
}

.side-panel {
  display: grid;
  gap: 5px;
}

.next-card,
.chain-card {
  padding: 6px 8px;
  border: 4px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.9);
  box-shadow: 0 6px 0 rgba(87, 56, 31, 0.38);
}

.discovery {
  min-height: 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
}

.discovery-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #ffe18a;
  font-size: 1.6rem;
  box-shadow: inset 0 -5px 0 rgba(122, 51, 14, 0.15);
}

.discovery strong {
  font-size: 0.9rem;
  line-height: 1.1;
}

.discovery p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.controls {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 5px;
}

.middle-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 6px;
  width: 100%;
}

.icon-button,
.primary {
  cursor: pointer;
  border: 3px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff3c4;
  box-shadow: 0 5px 0 #6e4b2d;
  transition:
    transform 100ms ease,
    box-shadow 100ms ease,
    filter 100ms ease;
}

.icon-button {
  width: 44px;
  height: 40px;
  font-size: 1.2rem;
  font-weight: 950;
}

.primary {
  min-height: 40px;
  padding: 0 12px;
  background: var(--accent);
  font-weight: 950;
}

.icon-button:hover,
.primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.icon-button:active,
.primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #6e4b2d;
}

.chain-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chain-head span:last-child {
  color: var(--muted);
  font-weight: 900;
}

.chain {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  max-height: 304px;
  overflow: auto;
  scrollbar-color: #8c7257 transparent;
}

.pedia-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 9px 0 8px;
}

.filter-button {
  min-height: 36px;
  border: 2px solid rgba(51, 38, 28, 0.38);
  border-radius: 7px;
  background: #fff3c4;
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
}

.filter-button.active {
  border-color: var(--line);
  background: var(--accent);
  box-shadow: 0 4px 0 rgba(87, 56, 31, 0.32);
}

.chain li {
  border-radius: 7px;
  background: rgba(255, 238, 185, 0.62);
  border: 2px solid rgba(51, 38, 28, 0.16);
  font-weight: 900;
  overflow: hidden;
}

.chain .locked {
  opacity: 0.62;
}

.chain .selected {
  outline: 3px solid rgba(255, 207, 52, 0.9);
}

.pedia-entry {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pedia-entry:hover {
  background: rgba(255, 255, 255, 0.32);
}

.mini-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff8df;
  border: 2px solid rgba(51, 38, 28, 0.22);
  font-size: 1.35rem;
  overflow: hidden;
}

.pedia-detail {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 3px solid rgba(51, 38, 28, 0.28);
  border-radius: 8px;
  background: rgba(255, 247, 214, 0.82);
}

.pedia-detail .mini-icon {
  width: 48px;
  height: 48px;
  font-size: 1.65rem;
}

.pedia-detail strong {
  display: block;
  line-height: 1.15;
}

.pedia-detail p {
  margin: 4px 0 6px;
  color: var(--muted);
  line-height: 1.32;
}

.pedia-detail span {
  color: #6c4117;
  font-size: 0.82rem;
  font-weight: 900;
}

.video-card {
  padding: 6px 8px;
  border: 4px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.9);
  box-shadow: 0 6px 0 rgba(87, 56, 31, 0.38);
}

.video-placeholder {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 70px;
  margin-top: 6px;
  border: 3px dashed rgba(51, 38, 28, 0.28);
  border-radius: 8px;
  background: rgba(255, 238, 185, 0.4);
  color: var(--muted);
  font-weight: 900;
}

.video-placeholder span {
  font-size: 2.4rem;
  line-height: 1;
}

.video-placeholder p {
  margin: 0;
  font-size: 0.82rem;
}

.video-placeholder video {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.pedia-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(54, 37, 24, 0.52);
  backdrop-filter: blur(4px);
}

.pedia-modal.hidden {
  display: none;
}

.pedia-modal-panel {
  width: min(680px, 100%);
  max-height: 82vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  border: 4px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 16px 0 rgba(87, 56, 31, 0.4);
  overflow: hidden;
}

.pedia-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 6px;
}

.pedia-modal-header > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pedia-modal-header > div strong {
  font-size: 1.1rem;
  color: var(--muted);
}

.pedia-close {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(51, 38, 28, 0.4);
  border-radius: 8px;
  background: #fff3c4;
  box-shadow: 0 4px 0 #6e4b2d;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 950;
  flex-shrink: 0;
}

.pedia-modal .pedia-filter {
  padding: 0 16px 10px;
}

.pedia-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 16px;
  min-height: 0;
  overflow: hidden;
}

.pedia-modal-body .chain {
  max-height: none;
  height: 100%;
  overflow-y: auto;
  margin: 0;
}

.pedia-modal-body .pedia-detail {
  margin-top: 0;
  align-self: start;
}

@media (max-width: 520px) {
  .pedia-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .pedia-modal-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 12px 12px 0 0;
  }

  .pedia-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .pedia-modal-body .chain {
    height: auto;
    max-height: 220px;
  }
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(54, 37, 24, 0.42);
  border-radius: 8px;
  backdrop-filter: blur(3px);
  z-index: 8;
}

.overlay.hidden {
  display: none;
}

.overlay-panel {
  width: min(310px, 100%);
  padding: 20px;
  border: 4px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  box-shadow: 0 12px 0 rgba(53, 34, 20, 0.45);
}

.overlay-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.overlay-panel p {
  margin: 0 0 14px;
  color: var(--muted);
}

@keyframes pop {
  from {
    transform: scale(0.7) rotate(-2deg);
    opacity: 0.1;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes boom {
  0% {
    transform: scale(0.92);
  }
  55% {
    transform: scale(1.1) rotate(1.5deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-18deg);
  }
  32% {
    opacity: 1;
    transform: scale(1.18) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.55) rotate(34deg);
  }
}

@media (max-width: 820px) {
  h1 {
    font-size: 3.2rem;
  }

  .home-content {
    min-height: auto;
    padding-block: 18px;
  }

  .poster-title span {
    font-size: 4.4rem;
  }

  .poster-title strong {
    font-size: 3.35rem;
  }

  .home-copy {
    font-size: 1.08rem;
  }

  .poster-slogan {
    font-size: 0.9rem;
  }

  .sticker {
    width: 110px;
    padding: 8px;
  }

  .sticker span {
    font-size: 2.1rem;
  }

  .sticker b {
    font-size: 0.78rem;
  }

  .demo-tile span {
    font-size: 2.8rem;
  }

  .demo-plus,
  .demo-arrow {
    font-size: 2.4rem;
  }

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

  .score-row {
    width: 100%;
    justify-content: stretch;
  }

  .score-box {
    flex: 1;
  }

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

  .board-wrap {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .home-screen {
    padding: 10px;
  }

  .meme-stickers {
    display: none;
  }

  .poster-title span {
    font-size: 3.2rem;
  }

  .poster-title strong {
    font-size: 2.55rem;
  }

  .poster-hero {
    width: 96%;
  }

  .hero-cat {
    font-size: 3.8rem;
  }

  .mini-evolution span {
    font-size: 0.72rem;
    padding: 6px 8px;
  }

  .shell {
    padding: 12px;
  }

  .board {
    gap: 7px;
    padding: 8px;
    border-width: 4px;
  }

  .tile {
    border-width: 2px;
    padding: 4px;
  }

  .tile-inner {
    gap: 2px;
  }

  .tile-icon,
  .tile.result .tile-icon {
    font-size: 1.65rem;
    width: 1.65rem;
    height: 1.65rem;
  }

  .tile-name {
    font-size: 0.6rem;
    line-height: 1.04;
  }

  .merge-demo {
    grid-template-columns: 1fr auto 1fr;
  }

  .demo-arrow {
    grid-column: 1 / -1;
    transform: rotate(90deg);
    line-height: 0.8;
  }

  .demo-tile.result {
    grid-column: 1 / -1;
    width: 58%;
    justify-self: center;
  }
}
