:root {
  --bg: #101217;
  --panel: #171d26;
  --panel-2: #232b37;
  --accent: #20c997;
  --accent-2: #ffcf5a;
  --danger: #ff5f6d;
  --ink: #f5f7fb;
  --muted: #aab3c2;
  --bs-body-font-family: "Noto Sans JP";
  --bs-font-sans-serif: "Noto Sans JP";
  --bs-btn-font-family: "Noto Sans JP";
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(32, 201, 151, 0.12), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(255, 207, 90, 0.08), transparent 28rem),
    linear-gradient(180deg, #0e1117 0%, var(--bg) 48%, #0d1015 100%);
  font-family: "Noto Sans JP";
}

body[data-page="game"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(32, 201, 151, 0.1), transparent 34rem),
    linear-gradient(180deg, #0e1117 0%, var(--bg) 48%, #0d1015 100%);
}

body[data-page="game"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(32, 201, 151, 0.1), transparent 34rem),
    linear-gradient(180deg, #0e1117 0%, var(--bg) 48%, #0d1015 100%);
}

.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body[data-page="home"] .app-shell::before,
body[data-page="home"] .app-shell::after {
  position: fixed;
  z-index: -2;
  content: "";
  pointer-events: none;
  will-change: transform;
}

body[data-page="home"] .app-shell::before {
  top: 8rem;
  right: -7rem;
  width: clamp(18rem, 32vw, 30rem);
  aspect-ratio: 1;
  background: radial-gradient(circle at 38% 35%, rgba(32, 201, 151, 0.16), rgba(32, 201, 151, 0.035) 48%, transparent 70%);
  border: 1px solid rgba(32, 201, 151, 0.12);
  border-radius: 42% 58% 66% 34% / 48% 35% 65% 52%;
  animation: ambient-float-mint 9s ease-in-out infinite alternate;
}

body[data-page="home"] .app-shell::after {
  bottom: 1rem;
  left: -8rem;
  width: clamp(20rem, 36vw, 34rem);
  aspect-ratio: 1;
  background: radial-gradient(circle at 58% 42%, rgba(255, 207, 90, 0.12), rgba(255, 207, 90, 0.025) 52%, transparent 72%);
  border: 1px solid rgba(255, 207, 90, 0.1);
  border-radius: 61% 39% 46% 54% / 37% 58% 42% 63%;
  animation: ambient-float-yellow 11s ease-in-out infinite alternate;
}

.ambient-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-shape {
  --shape-rotation: 0deg;
  position: absolute;
  display: block;
  opacity: 0.55;
  will-change: transform;
  animation: ambient-shape-drift 7s ease-in-out infinite alternate;
}

.ambient-symbol {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  font-family: "Noto Sans JP";
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 0.9rem currentColor;
}

.ambient-symbol--circle {
  color: rgba(255, 95, 109, 0.72);
}

.ambient-symbol--cross {
  color: rgba(114, 167, 255, 0.72);
}

.ambient-symbol--triangle {
  color: rgba(32, 201, 151, 0.75);
}

.ambient-symbol--square {
  color: rgba(217, 140, 255, 0.7);
}

.ambient-symbol--position-1 {
  --shape-rotation: -8deg;
  top: 14%;
  right: 29%;
  animation-delay: -1s;
  animation-duration: 7.2s;
}

.ambient-symbol--position-2 {
  --shape-rotation: 12deg;
  top: 29%;
  right: 7%;
  animation-delay: -5s;
  animation-duration: 9s;
}

.ambient-symbol--position-3 {
  --shape-rotation: -14deg;
  top: 45%;
  right: 27%;
  animation-delay: -2.5s;
  animation-duration: 8s;
}

.ambient-symbol--position-4 {
  --shape-rotation: 18deg;
  top: 60%;
  right: 5%;
  animation-delay: -7s;
  animation-duration: 10s;
}

.ambient-symbol--position-5 {
  --shape-rotation: -10deg;
  top: 77%;
  right: 32%;
  animation-delay: -3.5s;
  animation-duration: 8.8s;
}

.ambient-symbol--position-6 {
  --shape-rotation: 8deg;
  top: 87%;
  right: 11%;
  animation-delay: -6s;
  animation-duration: 7.8s;
}

.ambient-symbol--position-7 {
  --shape-rotation: -16deg;
  top: 42%;
  left: 2%;
  animation-delay: -4.5s;
  animation-duration: 9.5s;
}

.ambient-symbol--position-8 {
  --shape-rotation: 14deg;
  top: 68%;
  left: 44%;
  animation-delay: -2s;
  animation-duration: 8.3s;
}

.navbar {
  background: rgba(16, 18, 23, 0.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  color: #101217;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--accent-2);
  font-weight: 900;
}

.brand-mark-logo {
  width: auto;
  height: 2rem;
  display: block;
  object-fit: contain;
}

.navbar-brand {
  gap: 0.5rem !important;
}

.brand-type-logo {
  width: auto;
  max-width: min(36vw, 12rem);
  height: 1.45rem;
  display: block;
  object-fit: contain;
}

.noroblog-link {
  display: grid;
  flex: 0 0 auto;
  width: min(10rem, 48vw);
  border-radius: 999px;
}

.noroblog-link:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.noroblog-link-image {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 160ms ease;
}

.noroblog-link-image--hover {
  opacity: 0;
}

.noroblog-link:hover .noroblog-link-image--default,
.noroblog-link:focus-visible .noroblog-link-image--default {
  opacity: 0;
}

.noroblog-link:hover .noroblog-link-image--hover,
.noroblog-link:focus-visible .noroblog-link-image--hover {
  opacity: 1;
}

.site-footer {
  color: var(--muted);
  font-size: 0.8125rem;
}

.hero {
  padding: 4rem 0 2rem;
}

.hero-title {
  max-width: 820px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
}

.recommendation-section {
  padding: 1rem 0 4rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.featured-game {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 207, 90, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(35, 43, 55, 0.96), rgba(23, 29, 38, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.24);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.featured-game:hover,
.featured-game:focus-within {
  transform: translateY(-5px);
  border-color: rgba(32, 201, 151, 0.3);
  box-shadow: 0 1.6rem 3.5rem rgba(0, 0, 0, 0.3), 0 0 2rem rgba(32, 201, 151, 0.08);
}

#recommended-game {
  transform-origin: center;
  transition: opacity 150ms ease, transform 150ms ease, filter 150ms ease;
}

#recommended-game.is-switching-out {
  opacity: 0;
  filter: blur(2px);
  transform: translateY(0.65rem) scale(0.99);
}

#recommended-game.is-switching-in {
  animation: recommendation-arrive 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featured-game-preview {
  min-height: 20rem;
  background: #0a0d12;
}

.featured-game-preview .game-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-game-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.featured-game-title {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
}

.featured-game-description {
  color: var(--muted);
  line-height: 1.8;
}

.featured-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.featured-game-actions .btn {
  min-width: 9rem;
}

.btn-shuffle {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: rgba(255, 255, 255, 0.055);
  --bs-btn-border-color: rgba(255, 255, 255, 0.18);
  --bs-btn-hover-color: #101217;
  --bs-btn-hover-bg: var(--accent-2);
  --bs-btn-hover-border-color: var(--accent-2);
  font-weight: 900;
}

.game-library {
  overflow: hidden;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

#game-show-more[hidden] {
  display: none;
}

.game-list-card {
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.game-list-card:hover,
.game-list-card:focus-within {
  transform: translateY(-7px) rotate(-0.45deg);
  border-color: rgba(32, 201, 151, 0.65);
  box-shadow: 0 1.15rem 2.2rem rgba(0, 0, 0, 0.28), 0 0 1.5rem rgba(32, 201, 151, 0.07);
}

.game-list-card:nth-child(even):hover,
.game-list-card:nth-child(even):focus-within {
  transform: translateY(-7px) rotate(0.45deg);
}

.game-list-card-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.game-list-card .game-preview {
  aspect-ratio: 16 / 9;
}

.game-list-card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.game-list-card-body h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.game-list-card-action {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
}

.game-preview {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    #151a22;
  background-size: 16px 16px;
}

.pixel-scene {
  width: min(78%, 220px);
  image-rendering: pixelated;
}

.game-thumbnail {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.btn-play,
.btn-neon {
  --bs-btn-color: #101217;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #101217;
  --bs-btn-hover-bg: #43d9ad;
  --bs-btn-hover-border-color: #43d9ad;
  font-weight: 900;
}

.btn-record {
  --bs-btn-color: var(--accent-2);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(255, 207, 90, 0.72);
  --bs-btn-hover-color: #101217;
  --bs-btn-hover-bg: var(--accent-2);
  --bs-btn-hover-border-color: var(--accent-2);
  --bs-btn-focus-shadow-rgb: 255, 207, 90;
  --bs-btn-active-color: #101217;
  --bs-btn-active-bg: #e9bb46;
  --bs-btn-active-border-color: #e9bb46;
  font-weight: 900;
}

.text-muted-custom {
  color: var(--muted);
}

.game-description {
  font-size: 1rem;
}

.game-breadcrumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.game-breadcrumb:hover {
  color: #101217;
  background: var(--accent);
  border-color: var(--accent);
}

.game-page {
  min-height: calc(100vh - 66px);
}

.error-page {
  min-height: calc(100vh - 150px);
  display: grid;
  align-items: center;
  padding: 4rem 0;
}

.error-copy {
  max-width: 34rem;
}

.fw-black {
  font-weight: 900;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--muted);
}

.game-actions {
  min-width: min(100%, 460px);
}

.score-panel {
  min-width: min(100%, 320px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.score-panel > div {
  padding: 0.85rem 1rem;
  background: rgba(23, 29, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.score-panel strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.icon-button {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.icon-button:hover {
  color: #101217;
  background: var(--accent);
  border-color: var(--accent);
}

.icon-button.is-active {
  color: #101217;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(32, 201, 151, 0.28), 0 0 1.35rem rgba(32, 201, 151, 0.28);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.icon-button:disabled:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.icon-glyph,
.icon-glyph svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.icon-glyph svg {
  fill: currentColor;
}

.game-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  background: #080b10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.game-frame--portrait {
  width: min(100%, 540px);
  aspect-ratio: 9 / 16;
  min-height: 0;
  margin-inline: auto;
}

.game-frame-controls {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 4;
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem;
  background: rgba(8, 11, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.game-pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(8, 11, 16, 0.55);
  color: #f5f7fb;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 2.625rem;
  font-weight: 900;
}

.game-pause-overlay[hidden] {
  display: none;
}

.game-frame:fullscreen {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 50%, rgba(32, 201, 151, 0.14), transparent 34rem),
    #080b10;
  border: 0;
  border-radius: 0;
}

.game-frame:fullscreen canvas {
  width: min(100vw, 177.7778vh);
  height: min(100vh, 56.25vw);
}

.game-frame--portrait:fullscreen canvas {
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.7778vw);
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 11, 16, 0.62);
}

.overlay-panel {
  width: min(100%, 420px);
  padding: 1.5rem;
  text-align: center;
  background: rgba(23, 29, 38, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.ranking-submit {
  display: grid;
  gap: 0.5rem;
  text-align: left;
}

.ranking-submit[hidden] {
  display: none;
}

.ranking-result {
  padding: 0.75rem;
  background: rgba(8, 11, 16, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.ranking-result-title {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.ranking-result-text {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.ranking-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.ranking-submit input {
  min-width: 0;
  height: 2.4rem;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  background: rgba(8, 11, 16, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
}

.ranking-submit input:focus {
  outline: 2px solid rgba(32, 201, 151, 0.7);
  outline-offset: 2px;
}

.ranking-submit-score,
.ranking-status {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.ranking-status:empty {
  display: none;
}

.ranking-status[data-tone="success"] {
  color: var(--accent);
}

.ranking-status[data-tone="error"] {
  color: var(--danger);
}

.ranking-panel {
  overflow: hidden;
  background: rgba(23, 29, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.ranking-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ranking-list li:last-child {
  border-bottom: 0;
}

.ranking-rank {
  position: relative;
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  color: #101217;
  background: rgba(170, 179, 194, 0.86);
  border-radius: 8px;
  font-weight: 900;
}

.ranking-name {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-score {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
}

.ranking-score strong {
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}

.ranking-score small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.ranking-row.is-empty {
  color: rgba(170, 179, 194, 0.72);
}

.ranking-row.is-empty .ranking-rank {
  color: rgba(16, 18, 23, 0.72);
  background: rgba(170, 179, 194, 0.42);
}

.ranking-rank[data-rank="1"],
.ranking-rank[data-rank="2"],
.ranking-rank[data-rank="3"] {
  color: #272014;
  background:
    radial-gradient(circle at 29% 24%, rgba(255, 255, 255, 0.96) 0 0.13rem, rgba(255, 255, 255, 0.32) 0.15rem, transparent 0.31rem),
    linear-gradient(145deg, var(--medal-light) 0%, var(--medal-mid) 34%, var(--medal-shine) 54%, var(--medal-dark) 100%);
  border: 2px solid var(--medal-edge);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(62, 44, 18, 0.3),
    inset 0.15rem 0.17rem 0.2rem rgba(255, 255, 255, 0.56),
    inset -0.16rem -0.2rem 0.25rem rgba(39, 25, 7, 0.32),
    0 0.16rem 0.34rem rgba(0, 0, 0, 0.32);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48), 0 -1px 0 rgba(54, 35, 9, 0.2);
}

.ranking-rank[data-rank="1"] {
  --medal-light: #fff4ad;
  --medal-mid: #e3a921;
  --medal-shine: #ffe77d;
  --medal-dark: #9b5c00;
  --medal-edge: #ffd96a;
}

.ranking-rank[data-rank="2"] {
  --medal-light: #f8fbff;
  --medal-mid: #aeb9c6;
  --medal-shine: #e6edf4;
  --medal-dark: #65717f;
  --medal-edge: #dce5ef;
}

.ranking-rank[data-rank="3"] {
  --medal-light: #f6c08e;
  --medal-mid: #bd713c;
  --medal-shine: #e7a66e;
  --medal-dark: #6f3b1c;
  --medal-edge: #dc955e;
}

.ranking-row.is-empty .ranking-rank[data-rank="1"],
.ranking-row.is-empty .ranking-rank[data-rank="2"],
.ranking-row.is-empty .ranking-rank[data-rank="3"] {
  --medal-light: #d5dae1;
  --medal-mid: #8f98a5;
  --medal-shine: #b9c0c9;
  --medal-dark: #59616d;
  --medal-edge: #7e8794;
  color: rgba(16, 18, 23, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(43, 49, 58, 0.3),
    inset 0.15rem 0.17rem 0.2rem rgba(255, 255, 255, 0.34),
    inset -0.16rem -0.2rem 0.25rem rgba(24, 29, 36, 0.28),
    0 0.12rem 0.26rem rgba(0, 0, 0, 0.22);
}

.ranking-row.is-empty .ranking-score strong,
.ranking-row.is-empty .ranking-score small {
  color: rgba(170, 179, 194, 0.72);
}

.ranking-empty {
  display: block !important;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@keyframes ambient-float-mint {
  from {
    transform: translate3d(0, 0, 0) rotate(-5deg) scale(0.98);
  }
  to {
    transform: translate3d(-3.5rem, 2.75rem, 0) rotate(12deg) scale(1.04);
  }
}

@keyframes ambient-float-yellow {
  from {
    transform: translate3d(0, 0, 0) rotate(4deg) scale(1);
  }
  to {
    transform: translate3d(4rem, -3rem, 0) rotate(-10deg) scale(1.07);
  }
}

@keyframes ambient-shape-drift {
  from {
    transform: translate3d(-0.35rem, 0.6rem, 0) rotate(var(--shape-rotation)) scale(0.92);
  }
  to {
    transform: translate3d(1.15rem, -1.25rem, 0) rotate(calc(var(--shape-rotation) + 16deg)) scale(1.08);
  }
}

@keyframes recommendation-arrive {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(-0.65rem) scale(0.99);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .app-shell::before,
  body[data-page="home"] .app-shell::after,
  .ambient-shape,
  #recommended-game.is-switching-in {
    animation: none;
  }

  .featured-game,
  .game-list-card,
  #recommended-game {
    transition: none;
  }
}

@media (max-width: 575.98px) {
  .hero {
    padding-top: 2.75rem;
  }

  .recommendation-section {
    padding-bottom: 3rem;
  }

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

  .featured-game-preview {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .featured-game-body {
    padding: 1.25rem;
  }

  .featured-game-actions .btn {
    flex: 1 1 8rem;
    min-width: 0;
  }

  .section-heading {
    margin-bottom: 1rem;
  }

  .game-grid {
    gap: 0.5rem;
  }

  .game-list-card-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.6rem 0.45rem;
  }

  .game-list-card-body h3 {
    font-size: clamp(0.75rem, 2.8vw, 1rem);
    overflow-wrap: anywhere;
  }

  .game-list-card-action {
    font-size: 0.65rem;
  }

  .game-frame {
    min-height: 240px;
  }

  .game-frame--landscape {
    min-height: 0;
  }

  .game-actions {
    min-width: 100%;
  }

  .score-panel {
    width: 100%;
    min-width: 100%;
    gap: 0.5rem;
  }

  .score-panel > div {
    padding: 0.45rem 0.65rem;
  }

  .score-panel strong {
    font-size: 1.05rem;
  }

  .label {
    font-size: 0.62rem;
  }

  .game-frame-controls {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.35rem;
    padding: 0.25rem;
  }

  .game-frame-controls .icon-button {
    width: 2rem;
    height: 2rem;
  }

  .overlay {
    padding: 0.5rem;
  }

  .overlay-panel {
    width: min(100%, 300px);
    max-height: calc(100% - 0.5rem);
    overflow: auto;
    padding: 0.85rem;
  }

  .overlay-panel p {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 0.75rem !important;
  }

  .ranking-submit-row {
    grid-template-columns: 1fr;
  }

  .display-5 {
    font-size: 2rem;
  }

  .brand-type-logo {
    display: none;
  }

}
