:root {
  color-scheme: dark;
  --ink: #05051a;
  --panel: rgba(10, 13, 48, 0.86);
  --cyan: #25d9ff;
  --magenta: #ef35ff;
  --violet: #7457ff;
  --text: #f7f8ff;
  --muted: #a9b0d2;
  --pointer-x: 50vw;
  --pointer-y: 50vh;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

/* 登録済みのカスタムプロパティだけがアニメーションできる（縁の回転光・ブラケットの伸縮・環境光の色替え）。 */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --l { syntax: "<length>"; inherits: false; initial-value: 14px; }
@property --ambient { syntax: "<color>"; inherits: true; initial-value: #6f8cff; }

* { box-sizing: border-box; }
html { min-height: 100%; transition: --ambient 800ms ease; }

html::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  content: "";
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 46%, rgba(104, 239, 255, 0.035) 49%, transparent 52% 100%);
  background-size: 240% 100%;
  animation: screen-sheen 13s linear infinite;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 5%, rgba(108, 42, 217, 0.3), transparent 33rem),
    radial-gradient(circle at 8% 72%, rgba(14, 111, 205, 0.18), transparent 35rem),
    linear-gradient(145deg, #070827 0%, var(--ink) 58%, #10042c 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.portal-page {
  background:
    radial-gradient(620px circle at var(--pointer-x) var(--pointer-y), rgba(39, 161, 255, 0.13), transparent 58%),
    radial-gradient(circle at 78% 5%, rgba(108, 42, 217, 0.3), transparent 33rem),
    radial-gradient(circle at 8% 72%, rgba(14, 111, 205, 0.18), transparent 35rem),
    linear-gradient(145deg, #070827 0%, var(--ink) 58%, #10042c 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(90deg, transparent 49.6%, rgba(75, 104, 255, 0.3) 50%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.6%, rgba(75, 104, 255, 0.22) 50%, transparent 50.4%);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
  animation: circuit-drift 24s linear infinite;
}

body::after {
  position: fixed;
  inset: -30%;
  z-index: 0;
  content: "";
  pointer-events: none;
  background: conic-gradient(from 160deg at 50% 50%, rgba(22, 221, 255, 0.12), transparent 18%, rgba(230, 35, 255, 0.14) 35%, transparent 55%, rgba(90, 77, 255, 0.14) 78%, transparent);
  filter: blur(70px);
  animation: aurora-turn 28s linear infinite;
}

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

.ambient-glow span {
  position: absolute;
  width: clamp(240px, 32vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 220, 255, 0.15), rgba(35, 220, 255, 0) 67%);
  filter: blur(18px);
  animation: orb-drift 18s ease-in-out infinite alternate;
}

.ambient-glow span:nth-child(1) { top: -12%; left: -8%; }
.ambient-glow span:nth-child(2) { top: 18%; right: -12%; background-image: radial-gradient(circle, rgba(242, 43, 255, 0.18), transparent 67%); animation-delay: -7s; animation-duration: 22s; transform: translate(var(--parallax-x), var(--parallax-y)); }
.ambient-glow span:nth-child(3) { bottom: -18%; left: 38%; background-image: radial-gradient(circle, rgba(92, 74, 255, 0.2), transparent 68%); animation-delay: -12s; animation-duration: 25s; transform: translate(calc(var(--parallax-x) * -0.6), calc(var(--parallax-y) * -0.6)); }

.circuit-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
  mix-blend-mode: screen;
  mask-image: radial-gradient(circle at center, #000 0 55%, transparent 96%);
}

.cursor-reactor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 19;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(83, 221, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.075), rgba(37, 217, 255, 0.055) 26%, rgba(239, 53, 255, 0.025) 48%, transparent 70%);
  box-shadow: inset 0 0 40px rgba(37, 217, 255, 0.05), 0 0 55px rgba(239, 53, 255, 0.04);
  mix-blend-mode: screen;
}

a { color: inherit; }

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(111, 130, 255, 0.3);
  background: rgba(4, 5, 27, 0.72);
  backdrop-filter: blur(18px);
}

.site-header::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  background-size: 200% 100%;
  animation: header-flow 7s linear infinite;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand strong { color: #aeb5dd; font-weight: 400; }

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(37, 217, 255, 0.32)) drop-shadow(0 0 14px rgba(239, 53, 255, 0.2));
  animation: brand-pulse 4.5s ease-in-out infinite;
}

.header-label, .eyebrow, .game-card-kicker, .empty-note {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border: 1px solid rgba(77, 221, 255, 0.28);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 11, 42, 0.68);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(37, 217, 255, 0.06), 0 0 18px rgba(37, 217, 255, 0.08);
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.motion-toggle:hover,
.motion-toggle:focus-visible {
  color: #fff;
  border-color: rgba(239, 53, 255, 0.65);
  outline: none;
  transform: translateY(-2px);
  box-shadow: inset 0 0 20px rgba(239, 53, 255, 0.1), 0 0 24px rgba(37, 217, 255, 0.18);
}

.motion-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 13px var(--cyan);
  animation: status-blink 2s ease-in-out infinite;
}

.motion-toggle[aria-pressed="false"] .motion-toggle-dot {
  background: #6e7394;
  box-shadow: none;
  animation: none;
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 82px) 0 72px;
}

/* ヒーロー: 左にタイトル、右に全ゲームのアイコンが周回するレーダー型セレクター。 */
.portal-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  margin-bottom: clamp(18px, 2.4vw, 34px);
}

.intro-copy { display: grid; gap: 16px; min-width: 0; }

.intro-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: color-mix(in srgb, var(--ambient) 65%, white);
}

.intro-copy .eyebrow::before {
  width: 8px;
  height: 8px;
  content: "";
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: status-blink 1.6s ease-in-out infinite;
}

.intro-copy .eyebrow::after {
  flex: 1;
  max-width: 260px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.6;
}

.intro-title {
  margin: 0;
  font-size: clamp(1.8rem, 5.6vw, 5rem);
  font-weight: 200;
  letter-spacing: 0.1em;
  line-height: 1.04;
}

.intro-title span { display: block; white-space: nowrap; }

.intro-title span:last-child {
  font-weight: 800;
  letter-spacing: 0.06em;
  color: transparent;
  background: linear-gradient(100deg, #fff 0%, color-mix(in srgb, var(--ambient) 80%, white) 35%, var(--ambient) 55%, #fff 100%) 0 0 / 200% 100% repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  animation: title-sheen 7s linear infinite;
}

.orbit {
  --size: clamp(200px, 18vw, 260px);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 27%, rgba(255, 255, 255, 0.08) 27.4% 27.8%, transparent 28.2% 61%, rgba(255, 255, 255, 0.08) 61.4% 61.8%, transparent 62.2%);
  translate: calc(var(--parallax-x) * 0.7) calc(var(--parallax-y) * 0.7);
}

/* レーダーの掃引光と、ゆっくり逆回転する目盛りリング。 */
.orbit::before,
.orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.orbit::before {
  inset: 6%;
  background: conic-gradient(transparent 0 76%, color-mix(in srgb, var(--ambient) 34%, transparent) 99.2%, color-mix(in srgb, var(--ambient) 85%, white) 100%);
  animation: orbit-spin 5s linear infinite;
}

.orbit::after {
  inset: 0;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.42) 0 0.4deg, transparent 0.4deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 0 94%, #000 95%);
  mask: radial-gradient(circle, transparent 0 94%, #000 95%);
  animation: orbit-spin 80s linear infinite reverse;
}

.collection-count { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; margin: 0; color: var(--muted); text-align: center; }

.collection-count strong {
  color: #fff;
  font-size: clamp(2.2rem, 3.6vw, 3.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 200;
  line-height: 1;
  text-shadow: 0 0 24px color-mix(in srgb, var(--ambient) 70%, transparent);
}

.collection-count span { font-size: 0.56rem; letter-spacing: 0.24em; line-height: 1.5; }

/* 軌道アイコン。位相は --i / --n で等間隔に配り、停止時（動きOFF）もその配置を保つ。 */
.orbit-icon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 17%;
  aspect-ratio: 1;
  cursor: pointer;
  offset-path: circle(41% at 50% 50%);
  offset-rotate: 0deg;
  offset-distance: calc(var(--i) / var(--n, 5) * 100%);
  animation: orbit-run 36s linear infinite;
}

.orbit:hover .orbit-icon { animation-play-state: paused; }

.orbit-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26%;
  background: #0a0c16;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
  transition: transform 250ms cubic-bezier(.2, .8, .2, 1), box-shadow 250ms ease;
}

.orbit-icon:hover img {
  transform: scale(1.4);
  box-shadow: 0 0 26px color-mix(in srgb, var(--ambient) 80%, transparent), 0 0 0 1px #fff;
}

@supports not (offset-path: circle(1px at 50% 50%)) { .orbit-icon { display: none; } }

.recent-games {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.recent-games[hidden] { display: none; }
.recent-games > span { flex: none; color: #77777d; font-size: .7rem; letter-spacing: .18em; }
.recent-game-list { display: flex; gap: 9px; overflow-x: auto; padding: 5px; }

.recent-game-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 13px;
  background: #111114;
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 7px 18px rgba(0,0,0,.28);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.recent-game-icon:hover,
.recent-game-icon:focus-visible {
  border-color: rgba(37,217,255,.75);
  box-shadow: 0 0 18px rgba(37,217,255,.17), 0 10px 24px rgba(0,0,0,.38);
  transform: translateY(-3px);
  outline: none;
}

.recent-game-icon img { width: 78%; height: 78%; object-fit: contain; }


/* ゲーム一覧: 3列×2行のコンパクトなホログラムカード。幅が狭いほど2列・1列へ折り返す。 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.7vw, 24px);
  counter-reset: game;
}

.game-card {
  --accent: #5fd8ff;
  --accent-2: #9b7bff;
  --card-x: 50%;
  --card-y: 50%;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --lift: 0px;
  --zoom: 1;
  --mx: 0;
  --my: 0;
  position: relative;
  justify-self: stretch; /* aspect-ratio + min-height の組み合わせで幅が列からはみ出さないように固定する */
  min-height: 330px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  background: var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  isolation: isolate;
  transform: perspective(1100px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y)) translateY(var(--lift)) scale(var(--zoom));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms ease, border-color 300ms ease, filter 400ms ease;
}

.game-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background: radial-gradient(360px circle at var(--card-x) var(--card-y), rgba(255, 255, 255, 0.14), color-mix(in srgb, var(--accent) 12%, transparent) 30%, transparent 60%);
}

/* ゲームごとの固有色。新しいゲームを足したらここへ1行追加する（未登録は既定の水色）。 */
[data-game-id="pawndora"] { --accent: #8d7bff; --accent-2: #3fd9ff; }
[data-game-id="fortrun"] { --accent: #ffb84d; --accent-2: #ff6a3d; }
[data-game-id="asobi-shorts"] { --accent: #ff8a5b; --accent-2: #ffd36e; }
[data-game-id="eye-relay"] { --accent: #b8ea7b; --accent-2: #6fe0f0; }
[data-game-id="lasso-slash"] { --accent: #5dffc4; --accent-2: #36b8ff; }

.game-card--featured {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: 1fr;
  align-items: end;
  aspect-ratio: 16 / 11.5;
  padding: 0 20px 18px;
  counter-increment: game;
  text-decoration: none;
}

.game-card--featured::after { opacity: 0; transition: opacity 300ms ease; }

/* 縁を回る光。ホバー・フォーカス・軌道アイコンからの選択で点灯する。 */
.game-card--featured::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.5px;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background: conic-gradient(from var(--spin), transparent 0 52%, var(--accent) 74%, #fff 88%, var(--accent-2) 94%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms ease;
  animation: rim-spin 3s linear infinite paused;
}

.game-card--featured:is(:hover, :focus-visible, .is-linked) {
  --lift: -6px;
  --zoom: 1.02;
  z-index: 4;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 34px 70px -22px color-mix(in srgb, var(--accent) 60%, transparent), 0 18px 36px -10px rgba(0, 0, 0, 0.7);
  outline: none;
}

.game-card--featured:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 4px; }

.game-card--featured:is(:hover, :focus-visible, .is-linked)::before { opacity: 1; animation-play-state: running; }
.game-card--featured:is(:hover, :focus-visible, .is-linked)::after { opacity: 1; }

/* 1枚を指したら、ほかのカードは沈めて視線を集める。 */
.game-grid:has(.game-card--featured:is(:hover, :focus-visible, .is-linked)) .game-card:not(:is(:hover, :focus-visible, .is-linked)) {
  filter: saturate(0.55) brightness(0.68);
}

.game-card-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #07080f;
  isolation: isolate;
  translate: calc(var(--mx) * -26px) calc(var(--my) * -20px);
  scale: 1.09;
  transition: translate 500ms cubic-bezier(.2, .8, .2, 1), scale 700ms cubic-bezier(.2, .8, .2, 1);
}

.game-card--featured:is(:hover, :focus-visible, .is-linked) .game-card-gallery { scale: 1.15; }

/* 切り替わりの瞬間に走る光の刃。カードごとに位相をずらし、全体が同時に切り替わらないようにする。 */
.game-card-gallery::before {
  position: absolute;
  top: -18%;
  bottom: -18%;
  left: 105%;
  z-index: 2;
  width: 3px;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #fff 15%, var(--accent-2) 48%, var(--accent) 82%, transparent);
  box-shadow: 0 0 8px #fff, 0 0 20px var(--accent-2), 0 0 34px var(--accent);
  transform: rotate(12deg);
  animation: showcase-sweep 5s cubic-bezier(.55, 0, .35, 1) infinite;
  animation-delay: calc(var(--i, 0) * -2.7s);
}

.game-card-gallery::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 35%, color-mix(in srgb, var(--accent-2) 12%, transparent));
  mix-blend-mode: screen;
}

.game-card-shot {
  --d: 0s;
  position: absolute;
  inset: -2px;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  clip-path: polygon(108% 0, 108% 0, 96% 100%, 96% 100%);
  animation: showcase-flow 15s cubic-bezier(.55, 0, .35, 1) infinite;
  animation-delay: calc(var(--d) + var(--i, 0) * -2.7s);
}

.game-card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
  will-change: transform, opacity, clip-path;
  transition: filter 300ms ease;
}

.game-card-shot--main { --d: -1s; }
.game-card-shot--cards { --d: -6s; }
.game-card-shot--summon { --d: -11s; }
.game-card-shot--main img { object-position: 48% center; }
.game-card-shot--cards img { object-position: 50% center; }
.game-card-shot--summon img { object-position: 54% center; }

.game-card--featured:is(:hover, :focus-visible, .is-linked) .game-card-shot img { filter: saturate(1.28) contrast(1.08) brightness(1.1); }

/* 下部の暗幕・走査線・HUDのコーナーブラケット。 */
.game-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 5, 12, 0.55) 0, transparent 24%, transparent 34%, rgba(4, 5, 12, 0.8) 68%, rgba(4, 5, 12, 0.98) 100%);
}

.game-card-shade::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.55;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.game-card-shade::after {
  --l: 14px;
  --b: color-mix(in srgb, var(--accent) 80%, white);
  position: absolute;
  inset: 9px;
  content: "";
  opacity: 0.5;
  background:
    linear-gradient(var(--b), var(--b)) 0 0 / var(--l) 1.5px,
    linear-gradient(var(--b), var(--b)) 0 0 / 1.5px var(--l),
    linear-gradient(var(--b), var(--b)) 100% 0 / var(--l) 1.5px,
    linear-gradient(var(--b), var(--b)) 100% 0 / 1.5px var(--l),
    linear-gradient(var(--b), var(--b)) 0 100% / var(--l) 1.5px,
    linear-gradient(var(--b), var(--b)) 0 100% / 1.5px var(--l),
    linear-gradient(var(--b), var(--b)) 100% 100% / var(--l) 1.5px,
    linear-gradient(var(--b), var(--b)) 100% 100% / 1.5px var(--l);
  background-repeat: no-repeat;
  transition: --l 400ms cubic-bezier(.2, .8, .2, 1), opacity 300ms ease;
}

.game-card--featured:is(:hover, :focus-visible, .is-linked) .game-card-shade::after { --l: 34px; opacity: 1; }

.game-card-meta {
  position: absolute;
  inset: 14px 14px auto;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.release-badges,
.play-info {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.play-info { margin-inline-start: auto; justify-content: flex-end; }
.release-badges:empty { display: none; }

.release-badges em,
.play-info b,
.game-card-tags span {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  color: #eef6ff;
  background: rgba(6, 8, 18, 0.58);
  backdrop-filter: blur(8px);
  font-size: clamp(0.5rem, 2.1cqw, 0.62rem);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.release-badges em {
  border-color: rgba(255, 235, 116, 0.7);
  color: #fff8bc;
  background: rgba(34, 25, 2, 0.78);
  box-shadow: 0 0 16px rgba(255, 221, 63, 0.2);
  animation: meta-float 3.5s ease-in-out infinite;
}

/* コピー部は枠を外し、カードのグリッドへ直接並べる（1: 余白 / 2: 見出し行 / 3: タイトル / 4: タグ・統計）。 */
.game-card--featured .game-card-copy { display: contents; }

.game-card-kicker {
  position: relative;
  z-index: 3;
  grid-area: 2 / 1 / 3 / 4;
  overflow: hidden;
  color: color-mix(in srgb, var(--accent) 60%, white);
  font-size: clamp(0.5rem, 2.3cqw, 0.64rem);
  letter-spacing: 0.2em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-kicker::before {
  content: counter(game, decimal-leading-zero);
  margin-right: 9px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--accent);
}

.game-title {
  position: relative;
  z-index: 3;
  grid-area: 3 / 1 / 4 / 3;
  margin: 3px 12px 8px 0;
  font-size: clamp(1.5rem, 7.4cqw, 2.5rem);
  font-weight: 780;
  letter-spacing: 0.05em;
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6), 0 0 28px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: letter-spacing 350ms ease, text-shadow 350ms ease;
}

.game-card--featured:is(:hover, :focus-visible, .is-linked) .game-title {
  letter-spacing: 0.07em;
  text-shadow: -2px 0 color-mix(in srgb, var(--accent) 70%, transparent), 2px 0 color-mix(in srgb, var(--accent-2) 70%, transparent), 0 0 28px rgba(255, 255, 255, 0.3);
}

.game-card-tags {
  position: relative;
  z-index: 3;
  grid-area: 4 / 1 / 5 / 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 12px 0 0;
}

.game-card-tags span { letter-spacing: 0.06em; }

/* 再生ボタンは円形のトリガー。文字は読み上げ用に残し、見た目は▶だけにする。 */
.play-button {
  position: relative;
  z-index: 3;
  grid-area: 3 / 3 / 4 / 4;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 80%, white);
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #000), color-mix(in srgb, var(--accent-2) 75%, #000));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 0;
  transform: translate(var(--magnet-x, 0), var(--magnet-y, 0));
  transition: transform 160ms ease, box-shadow 250ms ease;
}

.play-button > span { padding-left: 3px; font-size: 1rem; }

.play-button::after {
  position: absolute;
  inset: -1px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--accent) 80%, white);
  border-radius: 50%;
  opacity: 0;
}

.game-card--featured:is(:hover, :focus-visible, .is-linked) .play-button {
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 75%, transparent), 0 0 64px color-mix(in srgb, var(--accent-2) 30%, transparent);
}

.game-card--featured:is(:hover, :focus-visible, .is-linked) .play-button::after { animation: play-pulse 1.4s ease-out infinite; }

.game-card-stats {
  position: relative;
  z-index: 3;
  grid-area: 4 / 2 / 5 / 4;
  justify-self: end;
  display: flex;
  gap: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(6, 8, 18, 0.62);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.game-card-stats > span {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 5px;
}

.game-card-stats strong { font-size: 0.95rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1; }
.game-card-stats small { grid-column: 1 / -1; margin-top: 3px; color: #8f9bb8; font-size: 0.5rem; letter-spacing: 0.12em; }
.game-card-stats i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59ff9b;
  box-shadow: 0 0 10px #59ff9b;
  animation: status-blink 2s ease-in-out infinite;
}
.game-card-stats .active-count strong { color: #9effc4; }

/* カード幅が狭いときは、タグを全幅にして統計を1段下げる。 */
@container (max-width: 390px) {
  .game-card-tags { grid-area: 4 / 1 / 5 / 4; margin-right: 0; }
  .game-card-stats { grid-area: 5 / 1 / 6 / 4; justify-self: start; margin-top: 9px; }
}

.game-card--empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(81, 67, 192, 0.15) 49%, transparent 50%),
    var(--panel);
  background-size: 64px 64px;
  transition: border-color 250ms ease, transform 250ms ease, background-color 250ms ease;
}

.game-card--empty::before {
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  content: "";
  background: linear-gradient(120deg, transparent 25%, rgba(37, 217, 255, 0.13), transparent 46%, rgba(239, 53, 255, 0.12), transparent 75%);
  background-size: 240% 100%;
  animation: slot-flow 9s linear infinite;
}

.game-card--empty:hover { --lift: -6px; border-color: rgba(172, 81, 255, 0.72); background-color: rgba(15, 18, 62, 0.92); }
.game-card--empty > * { position: relative; z-index: 1; }

.game-card--empty::after {
  background:
    radial-gradient(circle at center, transparent 0 19%, rgba(37, 217, 255, 0.08) 19.5% 20%, transparent 20.5% 35%, rgba(239, 53, 255, 0.07) 35.5% 36%, transparent 36.5%),
    radial-gradient(440px circle at var(--card-x) var(--card-y), rgba(255, 255, 255, 0.12), transparent 60%);
  animation: radar-breathe 4.8s ease-in-out infinite;
}

.empty-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(40, 217, 255, 0.72);
  border-radius: 16px;
  color: var(--cyan);
  font-size: 2.2rem;
  box-shadow: inset 0 0 20px rgba(50, 145, 255, 0.12), 0 0 22px rgba(239, 53, 255, 0.12);
  animation: slot-pulse 3.6s ease-in-out infinite;
}

.game-card--empty:nth-child(3) .empty-icon { animation-delay: -1.2s; }
.game-card--empty:nth-child(4) .empty-icon { animation-delay: -2.4s; }

.empty-title { font-weight: 700; letter-spacing: 0.18em; }

.interaction-ripple {
  position: absolute !important;
  z-index: 6 !important;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(179, 244, 255, 0.95);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: interaction-ripple 720ms ease-out forwards;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 26px 24px 34px;
  color: #777fa8;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-align: center;
}

.x-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  max-width: 620px;
  margin: 22px 0 0 auto;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #f5f5f7;
  background: linear-gradient(135deg, rgba(31,31,34,.94), rgba(9,9,10,.98));
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 18px 55px rgba(0,0,0,.34);
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.x-profile-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(300px circle at 18% 0%, rgba(37,217,255,.12), transparent 65%);
}

.x-profile-card:hover,
.x-profile-card:focus-visible {
  border-color: rgba(255,255,255,.48);
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 22px 65px rgba(0,0,0,.5), 0 0 24px rgba(255,255,255,.06);
  transform: translateY(-4px);
  outline: none;
}

.x-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: #050506;
  box-shadow: 0 0 0 4px rgba(255,255,255,.04), 0 0 22px rgba(37,217,255,.12);
}

.x-avatar img { width: 86%; height: 86%; object-fit: contain; }
.x-profile-copy { position: relative; z-index: 1; display: grid; gap: 3px; min-width: 0; }
.x-profile-copy strong { font-size: .94rem; font-weight: 650; letter-spacing: .08em; }
.x-handle { color: #8d8d94; font-size: .78rem; letter-spacing: .04em; }
.x-purpose { margin-top: 4px; color: #c4c4c9; font-size: .82rem; letter-spacing: .03em; }
.x-logo { position: absolute; top: 14px; right: 16px; width: 23px; height: 23px; fill: currentColor; opacity: .9; }
.x-cta { position: relative; z-index: 1; align-self: end; padding: 9px 12px; border-radius: 999px; color: #080809; background: #fff; font-size: .68rem; letter-spacing: .1em; white-space: nowrap; }

.player-page { min-height: 100svh; }
.player-header { min-height: 64px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #c8cdef;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.back-link:hover, .back-link:focus-visible { color: #fff; }

.player-shell {
  position: relative;
  z-index: 1;
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 50px) 0 40px;
}

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

.player-titlebar p { margin: 0 0 5px; color: var(--cyan); }
.player-titlebar h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0.08em; line-height: 1; }

.fullscreen-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(72, 217, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 24, 72, 0.88);
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.08em;
  cursor: pointer;
  transform: translate(var(--magnet-x, 0), var(--magnet-y, 0));
  transition: background 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.fullscreen-button:disabled { color: #727a9f; cursor: wait; }
.fullscreen-button:not(:disabled):hover, .fullscreen-button:focus-visible { background: #152b70; box-shadow: 0 0 22px rgba(37, 217, 255, 0.24); }

.player-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(37, 217, 255, 0.8);
  border-radius: 22px;
  background: #08081c;
  box-shadow: 0 0 0 1px rgba(239, 53, 255, 0.35), 0 0 70px rgba(77, 34, 185, 0.28), 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: player-frame-glow 6s ease-in-out infinite;
}

.player-frame::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0 45%, rgba(37, 217, 255, 0.1) 49%, rgba(239, 53, 255, 0.05) 51%, transparent 55% 100%);
  background-size: 100% 260%;
  mix-blend-mode: screen;
  animation: player-scan 8s linear infinite;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #111126;
  cursor: default !important;
}

#unity-loading-bar {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  background: radial-gradient(circle, rgba(40, 35, 117, 0.86), rgba(4, 5, 23, 0.98) 62%);
}

.loading-mark {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 760;
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px var(--magenta);
  animation: loading-title 2.4s ease-in-out infinite;
}

.progress-track {
  position: relative;
  width: min(320px, 60vw);
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(37, 217, 255, 0.55);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
}

.progress-track::after {
  position: absolute;
  inset: -5px auto -5px -24%;
  width: 22%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  filter: blur(3px);
  animation: progress-scan 1.15s linear infinite;
}

#unity-progress-bar-full {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta), var(--cyan));
  background-size: 200% 100%;
  box-shadow: 0 0 20px var(--magenta);
  transition: width 120ms linear;
  animation: progress-flow 1.2s linear infinite;
}

.loading-note { margin: 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.12em; }

#unity-warning {
  position: absolute;
  inset: 14px 14px auto;
  z-index: 2;
  display: none;
  overflow: hidden;
  border-radius: 10px;
}

.player-note { margin: 16px 4px 0; color: var(--muted); font-size: 0.9rem; }

.motion-ready .site-header { opacity: 0; transform: translateY(-100%); }
.motion-ready .portal-intro { opacity: 0; filter: blur(12px); transform: translateY(24px); }
.motion-ready .game-card { opacity: 0; }
.motion-ready .site-footer { opacity: 0; }
.motion-ready.is-loaded .site-header { opacity: 1; transform: none; transition: opacity 600ms ease, transform 800ms cubic-bezier(.2,.85,.2,1); }
.motion-ready.is-loaded .portal-intro { opacity: 1; filter: none; transform: none; transition: opacity 700ms 420ms ease, filter 900ms 420ms ease, transform 900ms 420ms cubic-bezier(.2,.8,.2,1); }
/* カードは起動シーケンスのように、上から走査されながら順番に実体化する。 */
.motion-ready.is-loaded .game-card { opacity: 1; animation: card-boot 1100ms cubic-bezier(.2, .8, .2, 1) calc(600ms + var(--i, 0) * 120ms) backwards; }
.motion-ready.is-loaded .site-footer { opacity: 1; transition: opacity 700ms 1.4s ease; }

.page-leaving .portal-shell { opacity: 0; filter: blur(24px); transform: scale(1.06); transition: opacity 520ms ease, filter 620ms ease, transform 620ms cubic-bezier(.4,0,.8,.2); }
.page-leaving .site-header { opacity: 0; transform: translateY(-100%); transition: opacity 420ms ease, transform 560ms ease; }
.page-leaving::after { animation-duration: 650ms; filter: blur(30px) brightness(1.8); }

@keyframes screen-sheen { to { background-position: -240% 0; } }
@keyframes circuit-drift { to { background-position: 96px 48px, -48px 96px; } }
@keyframes aurora-turn { to { transform: rotate(360deg) scale(1.08); } }
@keyframes orb-drift { to { transform: translate3d(18vw, 10vh, 0) scale(1.2); } }
@keyframes header-flow { to { background-position: -200% 0; } }
@keyframes brand-pulse { 50% { filter: drop-shadow(0 0 15px rgba(37, 217, 255, 0.5)) drop-shadow(0 0 20px rgba(239, 53, 255, 0.35)); transform: scale(1.045); } }
@keyframes fluorescent-flicker {
  0%, 61.99%, 62.66%, 63.1%, 63.71%, 64%, 64.46%, 100% { opacity: 1; filter: saturate(1.15) brightness(1.12) drop-shadow(0 0 9px rgba(37,217,255,.45)) drop-shadow(0 0 15px rgba(239,53,255,.28)); }
  62%, 62.65%, 63.11%, 63.7%, 64.01%, 64.45% { opacity: .28; filter: saturate(.85) brightness(.28); }
}
@keyframes status-blink { 50% { opacity: 0.45; transform: scale(0.72); } }
@keyframes showcase-flow {
  0% { z-index: 1; opacity: 0; clip-path: polygon(108% 0, 108% 0, 96% 100%, 96% 100%); }
  4%, 30% { z-index: 1; opacity: 1; clip-path: polygon(-8% 0, 108% 0, 96% 100%, -20% 100%); }
  36%, 100% { z-index: 0; opacity: 0; clip-path: polygon(-8% 0, -8% 0, -20% 100%, -20% 100%); }
}
@keyframes showcase-sweep { 0%, 82% { left: 105%; opacity: 0; } 86% { opacity: 1; } 100% { left: -8%; opacity: 0; } }
@keyframes button-shine { 0%, 60% { left: -40%; } 82%, 100% { left: 130%; } }
@keyframes slot-flow { to { background-position: -240% 0; } }
@keyframes slot-pulse { 50% { border-color: rgba(239, 53, 255, 0.7); color: #fff; box-shadow: inset 0 0 25px rgba(113, 79, 255, 0.22), 0 0 32px rgba(239, 53, 255, 0.25); transform: scale(1.06); } }
@keyframes player-frame-glow { 50% { box-shadow: 0 0 0 1px rgba(37, 217, 255, 0.58), 0 0 85px rgba(239, 53, 255, 0.2), 0 32px 95px rgba(0, 0, 0, 0.62); } }
@keyframes loading-title { 50% { letter-spacing: 0.17em; text-shadow: 0 0 32px var(--cyan), 0 0 18px var(--magenta); } }
@keyframes meta-float { 50% { border-color: rgba(239, 53, 255, 0.5); box-shadow: inset 0 0 18px rgba(239, 53, 255, 0.12), 0 0 18px rgba(37, 217, 255, 0.12); transform: translateY(-3px); } }
@keyframes radar-breathe { 50% { background-size: 145% 145%, 100% 100%; opacity: .74; } }
@keyframes interaction-ripple { to { width: 420px; height: 420px; opacity: 0; border-width: 1px; } }
@keyframes player-scan { to { background-position: 0 -260%; } }
@keyframes progress-flow { to { background-position: -200% 0; } }
@keyframes progress-scan { to { left: 112%; } }
@keyframes rim-spin { to { --spin: 360deg; } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-run { to { offset-distance: calc(var(--i) / var(--n, 5) * 100% + 100%); } }
@keyframes title-sheen { to { background-position: 200% 0; } }
@keyframes play-pulse { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@keyframes card-boot {
  0% { opacity: 0; clip-path: inset(0 0 100% 0 round 18px); filter: brightness(3) saturate(0); translate: 0 36px; }
  30% { opacity: 1; }
  100% { clip-path: inset(-40px round 18px); filter: none; translate: 0 0; }
}

/* ポータルは深い宇宙の背景。ホバー中のゲーム固有色（--ambient）が、画面全体の光としてにじむ。 */
.portal-page {
  --panel: rgba(10, 12, 22, 0.92);
  --muted: #8f96ad;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(104, 84, 255, 0.17), transparent 62%),
    radial-gradient(900px 560px at -6% 96%, rgba(20, 150, 230, 0.11), transparent 62%),
    linear-gradient(160deg, #080a15, #04050c 58%, #0a0716);
}

.portal-page::before {
  opacity: 0.32;
  background-image:
    linear-gradient(90deg, transparent 49.6%, rgba(120, 160, 255, 0.22) 50%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.6%, rgba(120, 160, 255, 0.16) 50%, transparent 50.4%);
  background-size: 112px 112px;
  animation-duration: 40s;
}

.portal-page::after {
  inset: 0;
  background: radial-gradient(780px circle at var(--pointer-x) var(--pointer-y), color-mix(in srgb, var(--ambient) 20%, transparent), transparent 62%);
  filter: none;
  animation: none;
}

.portal-page .ambient-glow { display: none; }
.portal-page .circuit-canvas { opacity: 0.8; mix-blend-mode: screen; }
.portal-page .cursor-reactor {
  border-color: rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 68%);
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.03);
  mix-blend-mode: screen;
}

.portal-page .site-header {
  border-color: rgba(140, 170, 255, 0.14);
  background: rgba(6, 8, 18, 0.72);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.portal-page .site-header::after {
  background: linear-gradient(90deg, transparent, var(--ambient), #fff, var(--ambient), transparent);
  background-size: 200% 100%;
  opacity: 0.55;
}

.portal-page .brand-logo { animation: fluorescent-flicker 8s linear infinite; }
.portal-page .motion-toggle {
  border-color: rgba(255, 255, 255, 0.16);
  color: #aab0c8;
  background: rgba(14, 16, 28, 0.8);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}
.portal-page .motion-toggle-dot { background: var(--ambient); box-shadow: 0 0 10px var(--ambient); }

.portal-page .game-card--empty {
  aspect-ratio: 16 / 11.5;
  border: 1px dashed rgba(140, 170, 255, 0.22);
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.025) 49%, transparent 50%),
    rgba(10, 12, 22, 0.6);
  background-size: 64px 64px;
}
.portal-page .game-card--empty::before { opacity: 0.2; }
.portal-page .game-card--empty::after { opacity: 0.5; }
.portal-page .game-card--empty:hover { border-color: rgba(160, 190, 255, 0.5); background-color: rgba(18, 20, 36, 0.8); }
.portal-page .empty-icon {
  border-color: rgba(160, 190, 255, 0.4);
  color: #b5bddb;
  box-shadow: inset 0 0 20px rgba(120, 160, 255, 0.06);
  animation-name: matte-slot-pulse;
}

.portal-page.page-leaving .portal-shell { opacity: 1; filter: none; transform: none; }
.portal-page.page-leaving .portal-intro,
.portal-page.page-leaving .game-card--empty,
.portal-page.page-leaving .site-footer { opacity: 0; filter: blur(14px); transition: opacity 360ms ease, filter 480ms ease; }
.portal-page.page-leaving .game-card--featured {
  z-index: 10;
  transform: perspective(1200px) scale(1.035);
  box-shadow: 0 0 72px rgba(37, 217, 255, 0.3), 0 0 110px rgba(239, 53, 255, 0.2);
  transition: transform 680ms cubic-bezier(.2,.8,.2,1), box-shadow 680ms ease;
}
.portal-page.page-leaving::after {
  z-index: 12;
  background: radial-gradient(circle at 42% 55%, rgba(37, 217, 255, 0.38), rgba(116, 87, 255, 0.22) 30%, rgba(5, 5, 26, 0.96) 72%);
  animation: portal-world-entry 680ms cubic-bezier(.55,0,.8,.3) forwards;
}

.game-card-gallery,
.player-frame { view-transition-name: pawndora-world; }

@view-transition { navigation: auto; }
::view-transition-old(pawndora-world),
::view-transition-new(pawndora-world) { animation-duration: 650ms; animation-timing-function: cubic-bezier(.2,.8,.2,1); }

@keyframes matte-slot-pulse { 50% { border-color: #777; color: #ddd; transform: scale(1.04); } }
@keyframes portal-world-entry { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 1100px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .header-label { display: none; }
  .portal-intro { grid-template-columns: 1fr; }
  .orbit { display: none; }
  .player-titlebar { align-items: flex-start; flex-direction: column; }
  .fullscreen-button { align-self: stretch; }
}

@media (max-width: 640px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-card--featured { aspect-ratio: auto; min-height: 380px; }
  .portal-page .game-card--empty { aspect-ratio: auto; min-height: 190px; }
}

@media (max-width: 520px) {
  .site-header { min-height: 64px; }
  .brand { font-size: 0.86rem; letter-spacing: 0.1em; }
  .brand-logo { width: 42px; height: 42px; }
  .portal-shell, .player-shell { width: min(100% - 24px, 1480px); }
  .player-note { font-size: 0.8rem; }
  .recent-games { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 18px; }
  .recent-game-icon { flex-basis: 46px; width: 46px; height: 46px; }
  .x-profile-card { grid-template-columns: auto 1fr; margin-top: 16px; padding: 14px; }
  .x-avatar { width: 50px; height: 50px; }
  .x-purpose { font-size: .75rem; }
  .x-cta { display: none; }
}

@media (pointer: coarse) {
  .cursor-reactor { display: none; }
  .game-card { transform: translateY(var(--lift)); }
}

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
  animation: none !important;
}

/* 動きOFFでも、各ゲームの1枚目のスクリーンショットは静止画として見せる。 */
html[data-motion="reduced"] .game-card-shot--main { opacity: 1; clip-path: none; }

html[data-motion="reduced"] .cursor-reactor,
html[data-motion="reduced"] .circuit-canvas { display: none; }

