:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --surface: #f7f8fb;
  --panel: #ffffff;
  --blue: #1f6feb;
  --green: #16845f;
  --yellow: #a66f00;
  --red: #be3a34;
  --navy: #0d2745;
  --teal: #0e7c86;
  --violet: #6f43c0;
  --shadow: 0 16px 48px rgba(25, 38, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.14), transparent 32rem),
    linear-gradient(135deg, #f7f8fb 0%, #edf4f3 48%, #f8f5fb 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

.arcade-home {
  background:
    radial-gradient(circle at 18% 10%, rgba(190, 58, 52, 0.16), transparent 24rem),
    radial-gradient(circle at 88% 12%, rgba(14, 124, 134, 0.18), transparent 24rem),
    linear-gradient(135deg, #f7f8fb 0%, #edf4f3 48%, #f8f5fb 100%);
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

.app-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 28px;
}

.site-header {
  display: flex;
  width: min(100% - 32px, 1080px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 18px 0 0;
}

.brand-mark,
.site-nav a,
.back-home-link {
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  line-height: 0.95;
}

.brand-mark span {
  color: var(--teal);
  font-size: 0.78rem;
}

.brand-mark strong {
  font-size: 1.04rem;
}

.site-nav {
  display: flex;
  gap: 8px;
}

.site-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.76);
}

.arcade-hero {
  display: grid;
  width: min(100% - 32px, 1080px);
  min-height: calc(100vh - 86px);
  align-items: center;
  gap: 28px;
  margin: 0 auto;
  padding: 34px 0 28px;
}

.hero-showcase {
  position: relative;
  display: grid;
  width: min(100%, 430px);
  min-height: 520px;
  align-self: center;
  justify-self: center;
  place-items: center;
}

.showcase-poster {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(72vw, 300px);
  overflow: hidden;
  border: 1px solid rgba(13, 39, 69, 0.22);
  border-radius: 8px;
  background: var(--navy);
  box-shadow: 0 26px 70px rgba(13, 39, 69, 0.24);
  color: #fff;
  text-decoration: none;
}

.showcase-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.showcase-poster span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border-radius: 8px;
  background: rgba(7, 16, 27, 0.74);
  padding: 10px 12px;
  font-weight: 900;
  text-align: center;
}

.showcase-stack {
  position: absolute;
  inset: 0;
}

.mini-shot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 148px;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 950;
  box-shadow: var(--shadow);
}

.mini-shot-botton {
  right: 0;
  top: 44px;
  background:
    linear-gradient(rgba(50, 20, 8, 0.68), rgba(50, 20, 8, 0.68)),
    url("./games/car-drive-3d/assets/scenery/dino-night.png") center / cover;
  transform: rotate(5deg);
}

.mini-shot-drop {
  left: 0;
  top: 182px;
  background:
    linear-gradient(rgba(8, 38, 60, 0.62), rgba(8, 38, 60, 0.62)),
    url("./games/car-drive-3d/assets/scenery/dino-day.png") center / cover;
  transform: rotate(-5deg);
}

.mini-shot-flag {
  right: 18px;
  bottom: 58px;
  background:
    linear-gradient(rgba(25, 50, 30, 0.58), rgba(25, 50, 30, 0.58)),
    url("./games/car-drive-3d/assets/scenery/dino-sunset.png") center / cover;
  transform: rotate(3deg);
}

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

.hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 18vw, 7.8rem);
}

.hero-copy p:not(.kicker) {
  max-width: 620px;
  color: #415064;
  font-size: 1.08rem;
  line-height: 1.7;
}

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

.hero-primary,
.hero-secondary {
  display: inline-flex;
  min-width: 126px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.hero-primary {
  background: var(--navy);
  color: #fff;
}

.hero-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.arcade-machine {
  display: grid;
  width: min(100%, 420px);
  aspect-ratio: 1 / 0.94;
  align-self: center;
  justify-self: center;
  border: 1px solid rgba(13, 39, 69, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 46%),
    linear-gradient(135deg, var(--navy), #182e5e 54%, var(--teal));
  box-shadow: var(--shadow);
  padding: 24px;
}

.machine-screen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-self: end;
  min-height: 176px;
  border: 10px solid #101828;
  border-radius: 8px;
  background: #f6fbff;
  padding: 18px;
}

.machine-screen span {
  display: block;
  align-self: end;
  border-radius: 6px;
  background: var(--blue);
}

.machine-screen span:nth-child(1) {
  height: 42%;
  background: var(--red);
}

.machine-screen span:nth-child(2) {
  height: 78%;
  background: var(--green);
}

.machine-screen span:nth-child(3) {
  height: 58%;
  background: var(--yellow);
}

.machine-screen span:nth-child(4) {
  height: 88%;
  background: var(--violet);
}

.machine-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 8px 0;
}

.machine-controls i,
.machine-controls b {
  display: block;
  border-radius: 999px;
}

.machine-controls i {
  width: 58px;
  height: 18px;
  background: #101828;
  transform: rotate(-16deg);
}

.machine-controls b {
  width: 34px;
  height: 34px;
  background: var(--red);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.machine-controls b:last-child {
  background: var(--yellow);
}

.public-status {
  display: grid;
  width: min(100% - 32px, 1080px);
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.public-status > div {
  padding: 14px 10px;
  text-align: center;
}

.public-status > div + div {
  border-left: 1px solid var(--line);
}

.public-games {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  padding: 18px 0 40px;
}

.public-heading {
  margin-bottom: 14px;
}

.public-game-grid {
  display: grid;
  gap: 12px;
}

.public-game-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 14px;
}

.public-game-card h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.public-game-card p:not(.game-state) {
  color: #415064;
  line-height: 1.55;
}

.game-state {
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.public-art {
  min-height: 152px;
  border: 1px solid rgba(13, 39, 69, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--art-a), var(--art-b)),
    #dfe8f4;
  position: relative;
  overflow: hidden;
}

.public-art::before,
.public-art::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.public-art::before {
  left: 22px;
  top: 22px;
  width: 86px;
  height: 48px;
}

.public-art::after {
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
}

.drop-art {
  --art-a: #1f6feb;
  --art-b: #0e7c86;
  background-position: center 55%;
}

.card-art {
  --art-a: #16845f;
  --art-b: #0d2745;
}

.flag-art {
  --art-a: #be3a34;
  --art-b: #1f6feb;
}

.botton-art {
  --art-a: #6f43c0;
  --art-b: #a66f00;
}

.dino-drive-art {
  --art-a: #e83b4f;
  --art-b: #ffd166;
  background:
    linear-gradient(rgba(5, 14, 22, 0.18), rgba(5, 14, 22, 0.28)),
    url("./games/car-drive-3d/assets/title/dino-drive-derby-poster.png") center / cover;
}

.quiz-rush-art {
  --art-a: #143b69;
  --art-b: #8e44ad;
  background:
    radial-gradient(circle at 24% 26%, rgba(255, 209, 102, 0.92) 0 10%, transparent 11%),
    radial-gradient(circle at 74% 28%, rgba(68, 217, 182, 0.86) 0 9%, transparent 10%),
    radial-gradient(circle at 30% 72%, rgba(232, 59, 79, 0.9) 0 11%, transparent 12%),
    linear-gradient(135deg, #0d2745, #4a2b85 54%, #0f7a85);
}

.quiz-rush-art::before {
  content: "QUIZ";
  display: grid;
  place-items: center;
  left: 18px;
  top: 22px;
  width: 112px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #0d2745;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.quiz-rush-art::after {
  right: 22px;
  bottom: 22px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: conic-gradient(#ffd166, #44d9b6, #6f43c0, #e83b4f, #ffd166);
}


.snake-runner-art {
  --art-a: #f1a23a;
  --art-b: #16845f;
  background:
    linear-gradient(rgba(4, 12, 20, 0.12), rgba(4, 12, 20, 0.24)),
    url("./games/jata-snake-runner/assets/stage1-sun-plane-teru.png") center / cover;
}

.snake-runner-art::before {
  left: 16px;
  top: auto;
  bottom: 26px;
  width: 140px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f09a3a, #ffd56d);
}

.snake-runner-art::after {
  right: 22px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2f8f52;
}

.asset-lab {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  padding: 0 0 48px;
}

.asset-grid {
  display: grid;
  gap: 12px;
}

.asset-card {
  min-height: 186px;
  border: 1px solid rgba(13, 39, 69, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 16, 28, 0.78), rgba(8, 16, 28, 0.22)),
    var(--asset-bg) center / cover;
  box-shadow: var(--shadow);
  color: #fff;
  padding: 18px;
}

.asset-card span {
  display: inline-flex;
  margin-bottom: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.asset-card h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.asset-card p {
  max-width: 420px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.asset-card-scenery {
  --asset-bg: url("./games/car-drive-3d/assets/scenery/dino-day.png");
}

.asset-card-music {
  --asset-bg: url("./games/car-drive-3d/assets/scenery/space-sky.png");
}

.asset-card-results {
  --asset-bg: url("./games/car-drive-3d/assets/results/posters/goal-dino-pack.png");
}

.disabled-link {
  pointer-events: none;
  opacity: 0.68;
}

.back-home-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--teal);
  font-size: 0.82rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 18px;
}

.kicker,
.section-label {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 9vw, 4.6rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--navy);
  box-shadow: var(--shadow);
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.status-strip > div {
  min-width: 0;
  padding: 14px 10px;
  text-align: center;
}

.status-strip > div + div {
  border-left: 1px solid var(--line);
}

.metric {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.control-row {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-box svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9edf3;
}

.segmented button {
  min-width: 0;
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.segmented button.active {
  background: var(--panel);
  color: var(--navy);
  box-shadow: 0 2px 10px rgba(13, 39, 69, 0.12);
}

.priority-panel,
.asset-queue,
.notes-panel,
.game-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.priority-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
}

.priority-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.asset-queue {
  margin-top: 14px;
  padding: 16px;
}

.asset-queue-grid {
  display: grid;
  gap: 8px;
}

.asset-queue-grid article {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 39, 69, 0.94), rgba(14, 124, 134, 0.76)),
    #0d2745;
  color: #fff;
  padding: 12px;
}

.asset-queue-grid span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.asset-queue-grid strong {
  display: block;
  margin-bottom: 6px;
}

.asset-queue-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.45;
}

.quiet-button,
.secondary-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.quiet-button,
.secondary-link {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--navy);
}

.quiet-button {
  min-width: 64px;
  padding: 0 14px;
}

.game-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.game-card {
  padding: 12px;
}

.card-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.game-art {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(13, 39, 69, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--art-a), var(--art-b)),
    #dfe8f4;
  background-position: center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.game-art::before,
.game-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.28);
}

.game-art::before {
  inset: 12px 20px 28px 12px;
}

.game-art::after {
  right: 10px;
  bottom: 10px;
  width: 24px;
  height: 24px;
}

.game-copy {
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title-row h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.18;
}

.status-pill {
  flex: 0 0 auto;
  max-width: 96px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-live {
  background: var(--green);
}

.status-working {
  background: var(--blue);
}

.status-review {
  background: var(--yellow);
}

.status-paused {
  background: var(--muted);
}

.game-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3f7;
  color: #415064;
  font-size: 0.72rem;
  font-weight: 800;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.primary-link {
  background: var(--navy);
  color: #fff;
}

.detail-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
}

.detail-text {
  margin-bottom: 10px;
  color: #415064;
  line-height: 1.45;
}

.todo-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.6;
}

.notes-panel {
  margin-top: 14px;
  padding: 16px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notes-panel textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  outline: 0;
  color: var(--ink);
  line-height: 1.5;
}

.notes-panel textarea:focus,
.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.14);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  min-width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  transform: translate(-50%, 140%);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  font-weight: 800;
  transition: transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

@media (min-width: 720px) {
  .app-shell {
    padding: 32px 24px 44px;
  }

  .arcade-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }

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

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

  .public-game-card.featured {
    grid-column: span 2;
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1fr);
    align-items: center;
  }

  .control-row {
    grid-template-columns: minmax(260px, 1fr) 360px;
    align-items: center;
  }

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

  .asset-queue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .priority-panel {
    padding: 20px;
  }
}

/* === 実画像カード背景（2026-06-08 追加） === */
.public-art.has-img{background-size:cover;background-position:center;background-repeat:no-repeat;}
.drop-art.has-img{background-position:center 55%;}
.public-art.has-img::before,.public-art.has-img::after{display:none;}
.brand-snake{height:22px;width:auto;vertical-align:middle;margin-right:7px;filter:drop-shadow(0 0 5px rgba(160,107,255,.6));}

/* === 夜空ダークテーマ＋背景画像（2026-06-08 追加） === */
body.arcade-home{
  color-scheme: dark;
  --ink:#eef3ff;
  --muted:#aeb9d8;
  --line:rgba(120,150,210,.28);
  --surface:transparent;
  --panel:rgba(18,26,51,.72);
  --shadow:0 16px 48px rgba(0,0,0,.45);
  background:
    linear-gradient(rgba(7,11,24,.78), rgba(7,11,24,.92)),
    url(./assets/bg-night.jpg) center top / cover fixed,
    #070b18 !important;
}
/* 念のため主要テキストを明色に固定（変数未使用箇所のフォールバック） */
body.arcade-home h1,
body.arcade-home h2,
body.arcade-home h3,
body.arcade-home .kicker,
body.arcade-home .section-label,
body.arcade-home .metric,
body.arcade-home .label{ color:#eef3ff; }
body.arcade-home p{ color:#cdd6ef; }
body.arcade-home .public-game-card,
body.arcade-home .asset-card{ background:rgba(18,26,51,.32); border:1px solid rgba(150,175,225,.30);
  backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
body.arcade-home .site-header{ background:rgba(10,15,30,.55); backdrop-filter:blur(8px); }
