:root {
  color-scheme: dark;
  --color-bg-0: #070b18;
  --color-bg-1: #101934;
  --color-bg-2: #1b1028;
  --color-primary: #22d3c5;
  --color-secondary: #c084fc;
  --color-accent: #ffd166;
  --color-danger: #ff6b9a;
  --color-text: #f8fbff;
  --color-muted: rgba(248, 251, 255, 0.68);
  --panel-bg: rgba(11, 18, 38, 0.72);
  --panel-border: rgba(255, 255, 255, 0.12);
  --glow-primary: rgba(34, 211, 197, 0.28);
  --bg: var(--color-bg-0);
  --panel: var(--panel-bg);
  --ink: var(--color-text);
  --muted: var(--color-muted);
  --line: var(--panel-border);
  --accent: var(--color-primary);
  --accent-strong: #16b8ab;
  --warn: var(--color-accent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 18%, rgba(54, 224, 210, 0.18), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(224, 128, 255, 0.16), transparent 34%),
    radial-gradient(circle at 50% 90%, rgba(255, 209, 102, 0.08), transparent 30%),
    linear-gradient(135deg, var(--color-bg-0) 0%, var(--color-bg-1) 48%, var(--color-bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.app-root {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
}

.landing-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #f8fbff;
  background:
    radial-gradient(circle at 15% 18%, rgba(54, 224, 210, 0.18), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(224, 128, 255, 0.16), transparent 34%),
    radial-gradient(circle at 50% 90%, rgba(255, 209, 102, 0.08), transparent 30%),
    linear-gradient(135deg, var(--color-bg-0) 0%, var(--color-bg-1) 48%, var(--color-bg-2) 100%);
}

.landing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 85%);
  pointer-events: none;
}

.landing-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 88px;
  margin: 0 24px;
  padding: 18px 4px 12px;
}

.brand-light,
.brand-light .brand-copy small {
  color: rgba(248, 251, 255, 0.74);
}

.brand-light .brand-copy strong {
  color: #ffffff;
}

.landing-header-action,
.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(34, 211, 197, 0.46);
  border-radius: 999px;
  padding: 0 18px;
  color: #f8fbff;
  background:
    linear-gradient(135deg, rgba(34, 211, 197, 0.8), rgba(192, 132, 252, 0.62)),
    rgba(11, 18, 38, 0.72);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow:
    0 12px 30px rgba(34, 211, 197, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.header-button {
  color: #ffffff;
}

.landing-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  min-height: calc(100vh - 88px);
  padding: 24px;
}

.landing-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 22px 70px rgba(0, 0, 0, 0.28);
  transition: transform 300ms ease, box-shadow 300ms ease, filter 300ms ease, border-color 300ms ease;
}

.landing-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 8, 20, 0.48), rgba(3, 8, 20, 0.68)),
    var(--panel-art);
  background-size: cover;
  background-position: center;
  opacity: 0.96;
  transition: opacity 300ms ease, filter 300ms ease;
}

.landing-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.12) 48%, transparent 56%),
    linear-gradient(180deg, transparent 0 50%, rgba(0, 0, 0, 0.48));
  opacity: 0.18;
  transition: opacity 300ms ease;
}

.landing-panel-templates {
  --panel-art:
    linear-gradient(140deg, rgba(24, 199, 184, 0.24), transparent 45%),
    linear-gradient(320deg, rgba(255, 209, 102, 0.12), transparent 38%),
    url("/static/assets/landing/templates-anime.png");
}

.landing-panel-create {
  --panel-art:
    linear-gradient(135deg, rgba(24, 199, 184, 0.3), transparent 38%),
    linear-gradient(300deg, rgba(217, 128, 255, 0.24), transparent 46%),
    url("/static/assets/landing/create-anime.png");
}

.landing-panel-projects {
  --panel-art:
    linear-gradient(130deg, rgba(217, 128, 255, 0.2), transparent 42%),
    linear-gradient(300deg, rgba(255, 209, 102, 0.12), transparent 38%),
    url("/static/assets/landing/projects-anime.png");
}

.landing-panel.featured {
  border-color: rgba(24, 199, 184, 0.42);
  transform: translateY(-4px);
}

.landing-panel:hover,
.landing-main:has(.landing-panel:hover) .landing-panel:hover {
  transform: translateY(-8px) scale(1.015);
  filter: brightness(1.12);
  border-color: rgba(255, 209, 102, 0.46);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    0 0 48px rgba(24, 199, 184, 0.26);
}

.landing-main:has(.landing-panel:hover) .landing-panel:not(:hover) {
  filter: brightness(0.72) saturate(0.8);
}

.landing-panel:hover::before {
  opacity: 1;
  filter: brightness(1.18) saturate(1.12);
}

.landing-panel:hover::after {
  opacity: 0.32;
}

.panel-glow {
  position: absolute;
  inset: auto 10% 12% 10%;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(24, 199, 184, 0.2), rgba(217, 128, 255, 0.18));
  filter: blur(36px);
  opacity: 0;
  transition: opacity 300ms ease;
}

.landing-panel:hover .panel-glow,
.landing-panel.featured .panel-glow {
  opacity: 1;
}

.landing-panel-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: 100%;
  padding: clamp(24px, 3.5vw, 44px);
}

.landing-kicker {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  color: rgba(248, 251, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.landing-panel h1 {
  max-width: 9em;
  color: #ffffff;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.05;
}

.landing-subtitle {
  max-width: 24em;
  color: rgba(248, 251, 255, 0.9);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  line-height: 1.55;
}

.landing-copy {
  max-width: 28em;
  color: rgba(248, 251, 255, 0.66);
  line-height: 1.7;
}

.landing-button {
  width: fit-content;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 11px 18px;
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.landing-button.primary {
  color: #06131f;
  background: linear-gradient(135deg, #18c7b8, #ffd166);
}

.anime-app {
  min-height: 100vh;
  color: var(--color-text);
  background:
    radial-gradient(circle at 15% 18%, rgba(54, 224, 210, 0.18), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(224, 128, 255, 0.16), transparent 34%),
    radial-gradient(circle at 50% 90%, rgba(255, 209, 102, 0.08), transparent 30%),
    linear-gradient(135deg, var(--color-bg-0) 0%, var(--color-bg-1) 48%, var(--color-bg-2) 100%);
}

.library-page {
  position: relative;
  overflow-x: hidden;
}

.glass-panel {
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: var(--panel-bg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 72px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.anime-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.anime-button--primary {
  border: 1px solid rgba(34, 211, 197, 0.44);
  color: #06131f;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 12px 30px rgba(34, 211, 197, 0.2);
}

.anime-button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.status-badge {
  width: fit-content;
  border: 1px solid rgba(34, 211, 197, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--color-primary);
  background: rgba(34, 211, 197, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.library-main {
  display: grid;
  gap: 22px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -30%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.22), transparent 68%);
  pointer-events: none;
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 64px);
}

.page-hero p {
  max-width: 680px;
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.75;
}

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

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

.template-card {
  overflow: hidden;
}

.template-cover {
  min-height: 160px;
  background:
    linear-gradient(180deg, rgba(3, 8, 20, 0.1), rgba(3, 8, 20, 0.72)),
    var(--template-art);
  background-size: cover;
  background-position: center;
}

.template-card-1 { --template-art: url("/static/assets/landing/create-anime.png"); }
.template-card-2 { --template-art: url("/static/assets/landing/projects-anime.png"); }
.template-card-3 { --template-art: url("/static/assets/landing/templates-anime.png"); }

.template-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.template-body h2 {
  font-size: 20px;
}

.template-body p,
.template-body small,
.empty-project-panel p {
  color: var(--color-muted);
  line-height: 1.65;
}

.empty-project-panel {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 14px;
  overflow: hidden;
  min-height: 320px;
  padding: clamp(26px, 4vw, 48px);
}

.empty-project-panel h2 {
  font-size: clamp(26px, 4vw, 44px);
}

.empty-project-panel p {
  max-width: 620px;
}

.empty-archive-visual {
  position: absolute;
  right: 8%;
  top: 18%;
  width: min(280px, 34vw);
  height: 220px;
  opacity: 0.78;
}

.empty-archive-visual::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 197, 0.45), transparent);
}

.empty-archive-visual span {
  position: absolute;
  width: 130px;
  height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.26), transparent 46%),
    rgba(8, 14, 31, 0.74);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.empty-archive-visual span:nth-child(1) {
  left: 2%;
  top: 24%;
}

.empty-archive-visual span:nth-child(2) {
  right: 5%;
  top: 4%;
}

.empty-archive-visual span:nth-child(3) {
  left: 32%;
  bottom: 10%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 10, 24, 0.72);
  backdrop-filter: blur(18px);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.24),
    0 0 28px rgba(34, 211, 197, 0.08);
}

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

h1 {
  font-size: 22px;
  line-height: 1.2;
}

.panel-head span {
  color: var(--muted);
  margin-top: 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 209, 102, 0.98) 0 10%, transparent 11%),
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  box-shadow:
    0 12px 28px rgba(34, 211, 197, 0.24),
    0 0 24px rgba(192, 132, 252, 0.18);
}

.brand-page {
  position: absolute;
  width: 18px;
  height: 23px;
  border-radius: 5px 5px 7px 5px;
  background: #fff7ed;
  transform: rotate(-6deg);
  box-shadow: 8px 3px 0 rgba(255, 247, 237, 0.62);
}

.brand-spark {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f6c56f;
  box-shadow: 0 0 0 4px rgba(246, 197, 111, 0.22);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 20px;
  line-height: 1.1;
  color: var(--color-text);
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.site-nav a {
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(248, 251, 255, 0.64);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(34, 211, 197, 0.12);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 197, 0.2);
}

button {
  border: 1px solid var(--line);
  background: rgba(11, 18, 38, 0.7);
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}

#runButton {
  min-width: 88px;
  border-color: rgba(34, 211, 197, 0.44);
  background:
    linear-gradient(135deg, rgba(34, 211, 197, 0.92), rgba(192, 132, 252, 0.74)),
    rgba(11, 18, 38, 0.72);
  color: #06131f;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(34, 211, 197, 0.18);
}

#runButton:hover {
  filter: brightness(1.08);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(520px, 1.25fr) minmax(300px, 0.8fr);
  gap: 16px;
  padding: 16px;
  align-items: start;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 197, 0.11), transparent 32%),
    radial-gradient(circle at 84% 16%, rgba(192, 132, 252, 0.1), transparent 34%);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.input-panel {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-panel-title {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.studio-panel-title h2 {
  font-size: 20px;
}

.summary-panel {
  grid-column: 3;
  grid-row: 1;
}

.preview-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.thought-panel {
  grid-column: 3;
  grid-row: 2;
}

.output-panel {
  grid-column: 1 / -1;
}

.field-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 10px;
}

.full-book-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.full-book-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

label,
h3 {
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  background: rgba(6, 10, 24, 0.58);
}

input::placeholder,
textarea::placeholder {
  color: rgba(248, 251, 255, 0.38);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 197, 0.48);
  box-shadow: 0 0 0 3px rgba(34, 211, 197, 0.12);
}

.model-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.model-option {
  min-height: 50px;
  border-color: var(--line);
  background: rgba(6, 10, 24, 0.48);
  color: var(--muted);
  font-weight: 700;
  display: grid;
  place-items: center;
  gap: 2px;
  line-height: 1.1;
}

.model-option strong,
.model-option span {
  display: block;
}

.model-option strong {
  font-size: 13px;
}

.model-option span {
  font-size: 11px;
  font-weight: 600;
}

.model-option.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(34, 211, 197, 0.22), rgba(192, 132, 252, 0.14));
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 197, 0.18);
}

.model-option:hover {
  border-color: var(--accent);
}

.model-hint {
  margin: -2px 0 2px 66px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.recommend-hint {
  margin: -2px 0 2px 66px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

textarea {
  min-height: 420px;
  resize: vertical;
  line-height: 1.65;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.game-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(6, 10, 24, 0.9);
  color: #f8fafc;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(34, 211, 197, 0.08);
}

.scene-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #293445;
  background-position: center;
  background-size: cover;
}

.game-screen[data-bg="bg_old_school_night"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(10, 18, 28, 0.45), rgba(10, 18, 28, 0.82)),
    url("/static/assets/runtime/minchi_old_hallway.jpg");
}

.game-screen[data-bg="bg_classroom"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(16, 24, 36, 0.34), rgba(16, 24, 36, 0.78)),
    url("/static/assets/runtime/minchi_classroom_front.jpg");
}

.game-screen[data-bg="bg_default"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(20, 30, 44, 0.4), rgba(20, 30, 44, 0.82)),
    linear-gradient(135deg, #253451, #17142d);
}

.game-screen[data-location="home_living"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(27, 20, 16, 0.22), rgba(27, 20, 16, 0.72)),
    url("/static/assets/runtime/minchi_living.jpg");
}

.game-screen[data-location="restaurant"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(26, 18, 12, 0.25), rgba(26, 18, 12, 0.76)),
    url("/static/assets/runtime/minchi_cafe.jpg");
}

.game-screen[data-location="classroom"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(16, 24, 36, 0.34), rgba(16, 24, 36, 0.78)),
    url("/static/assets/runtime/minchi_classroom_front.jpg");
}

.game-screen[data-location="old_school"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(10, 18, 28, 0.45), rgba(10, 18, 28, 0.82)),
    url("/static/assets/runtime/minchi_old_hallway.jpg");
}

.game-screen[data-location="bedroom"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(23, 20, 28, 0.24), rgba(23, 20, 28, 0.72)),
    url("/static/assets/runtime/minchi_bedroom.jpg");
}

.game-screen[data-location="kitchen"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(28, 24, 18, 0.22), rgba(28, 24, 18, 0.72)),
    linear-gradient(135deg, #584532, #202537);
}

.game-screen[data-location="office"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(18, 24, 32, 0.24), rgba(18, 24, 32, 0.76)),
    linear-gradient(135deg, #27364b, #171d31);
}

.game-screen[data-location="village"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(30, 28, 18, 0.18), rgba(30, 28, 18, 0.72)),
    url("/static/assets/runtime/minchi_campus.jpg");
}

.game-screen[data-location="street"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(15, 21, 30, 0.28), rgba(15, 21, 30, 0.78)),
    url("/static/assets/runtime/minchi_street.jpg");
}

.game-screen[data-location="field"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(28, 34, 18, 0.18), rgba(28, 34, 18, 0.72)),
    url("/static/assets/runtime/minchi_campus.jpg");
}

.game-screen[data-location="yard"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(28, 24, 18, 0.2), rgba(28, 24, 18, 0.72)),
    url("/static/assets/runtime/minchi_campus.jpg");
}

.game-screen[data-location="cave_dwelling"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(31, 25, 18, 0.18), rgba(31, 25, 18, 0.76)),
    url("/static/assets/runtime/minchi_cluttered_room.jpg");
}

.game-screen[data-location="station"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(16, 22, 30, 0.28), rgba(16, 22, 30, 0.78)),
    url("/static/assets/runtime/minchi_station_platform.jpg");
}

.game-screen[data-location="hospital"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(18, 28, 34, 0.2), rgba(18, 28, 34, 0.72)),
    url("/static/assets/runtime/minchi_hospital_lobby.jpg");
}

.game-screen[data-location="shop"] .scene-art {
  background-image:
    linear-gradient(180deg, rgba(28, 22, 16, 0.22), rgba(28, 22, 16, 0.74)),
    url("/static/assets/runtime/minchi_bookstore.jpg");
}

.scene-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(255, 255, 255, 0.08) 10% 11%, transparent 11% 25%),
    linear-gradient(0deg, rgba(6, 10, 16, 0.55), transparent 42%);
}

.school-building {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 21%;
  height: 38%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111827;
  display: none;
}

.scene-art.asset-backed .school-building {
  display: none;
}

.school-building::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  height: 22px;
  background: #0f172a;
  clip-path: polygon(0 100%, 12% 0, 88% 0, 100% 100%);
}

.school-building span {
  display: inline-block;
  width: 13%;
  height: 24%;
  margin: 9% 5%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #f6c56f;
}

.game-screen[data-location="old_school"] .school-building,
.game-screen[data-location="classroom"] .school-building {
  display: block;
}

.scene-art.asset-backed .school-building {
  display: none;
}

.scene-art.asset-backed .stage-prop:not(.prop-image) {
  display: none;
}

.stage-prop {
  position: absolute;
  z-index: 1;
  opacity: 0.48;
  pointer-events: none;
}

.prop-table {
  left: 28%;
  bottom: 40%;
  width: 34%;
  height: 9%;
  border-radius: 6px 6px 3px 3px;
  background: #8b5e34;
  box-shadow: 0 22px 0 -12px #5b3a21;
}

.prop-chair {
  left: 18%;
  bottom: 39%;
  width: 11%;
  height: 17%;
  border-radius: 6px 6px 2px 2px;
  border: 3px solid #6f4424;
  background: #a46a3a;
}

.prop-sofa {
  left: 12%;
  bottom: 40%;
  width: 26%;
  height: 16%;
  border-radius: 16px 16px 6px 6px;
  background: #76506a;
  box-shadow: inset 0 -16px rgba(0, 0, 0, 0.22);
}

.prop-cup,
.prop-bowl {
  left: 47%;
  bottom: 50%;
  width: 4%;
  height: 5%;
  border-radius: 0 0 12px 12px;
  background: #f4e7c5;
}

.prop-door {
  right: 12%;
  bottom: 38%;
  width: 13%;
  height: 42%;
  border-radius: 8px 8px 0 0;
  background: #4b3428;
  border: 2px solid rgba(255, 255, 255, 0.16);
}

.prop-window,
.prop-windows {
  left: 14%;
  top: 16%;
  width: 18%;
  height: 16%;
  border: 3px solid rgba(255, 255, 255, 0.24);
  background: rgba(246, 197, 111, 0.72);
  box-shadow: 24vw 0 0 rgba(246, 197, 111, 0.72);
}

.prop-blackboard {
  left: 28%;
  top: 17%;
  width: 42%;
  height: 20%;
  border: 4px solid #6b4e2e;
  background: #213f34;
}

.prop-desk {
  left: 22%;
  bottom: 40%;
  width: 48%;
  height: 8%;
  background: #9a6a3a;
}

.prop-corridor,
.prop-floor {
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent 32%, rgba(255,255,255,0.06));
}

.prop-bed {
  left: 10%;
  bottom: 39%;
  width: 30%;
  height: 13%;
  border-radius: 14px 14px 4px 4px;
  background: #b98f78;
}

.prop-wardrobe,
.prop-bookshelf {
  right: 10%;
  bottom: 38%;
  width: 14%;
  height: 38%;
  border-radius: 4px;
  background: #6b4a2f;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.08);
}

.prop-book,
.prop-paper,
.prop-phone,
.prop-bag,
.prop-clothes,
.prop-umbrella {
  width: 7%;
  height: 5%;
  bottom: 52%;
  border-radius: 4px;
}

.prop-book { left: 37%; background: #496b8a; }
.prop-paper { left: 45%; background: #efe6ca; }
.prop-phone { left: 53%; background: #1f2937; }
.prop-bag { left: 17%; bottom: 43%; height: 9%; background: #5f4636; }
.prop-clothes { left: 63%; bottom: 46%; height: 8%; background: #8b5cf6; }
.prop-umbrella { left: 70%; bottom: 42%; height: 12%; background: #334155; border-radius: 999px 999px 3px 3px; }

.prop-counter {
  left: 12%;
  right: 12%;
  bottom: 40%;
  height: 11%;
  border-radius: 6px;
  background: #9a7857;
}

.prop-stove {
  left: 36%;
  bottom: 52%;
  width: 18%;
  height: 7%;
  border-radius: 4px;
  background: #2f3641;
}

.prop-tree {
  left: 10%;
  bottom: 38%;
  width: 12%;
  height: 34%;
  border-radius: 999px 999px 12px 12px;
  background: #315b3c;
}

.prop-fence {
  left: 22%;
  right: 18%;
  bottom: 40%;
  height: 5%;
  background: repeating-linear-gradient(90deg, #8b6b45 0 16px, transparent 16px 28px);
}

.prop-road {
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  background: linear-gradient(90deg, rgba(80,80,80,0.45), rgba(120,120,120,0.25));
}

.prop-streetlight {
  right: 18%;
  bottom: 38%;
  width: 4%;
  height: 42%;
  background: #374151;
  box-shadow: 0 -12px 18px rgba(255, 224, 150, 0.7);
}

.prop-sign {
  right: 25%;
  bottom: 58%;
  width: 14%;
  height: 8%;
  border-radius: 3px;
  background: #c2410c;
}

.prop-shelf {
  right: 12%;
  bottom: 39%;
  width: 18%;
  height: 36%;
  border-radius: 4px;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.2), transparent),
    repeating-linear-gradient(0deg, #7c5230 0 18%, #5a3921 18% 21%);
}

.prop-bench {
  left: 28%;
  bottom: 41%;
  width: 24%;
  height: 7%;
  border-radius: 4px;
  background: #8b5e34;
  box-shadow: 0 16px 0 -10px #5b3a21;
}

.prop-kang {
  left: 12%;
  bottom: 39%;
  width: 34%;
  height: 14%;
  border-radius: 8px 8px 3px 3px;
  background: #a87b55;
  box-shadow: inset 0 -16px rgba(0, 0, 0, 0.18);
}

.prop-curtain {
  right: 18%;
  top: 12%;
  width: 16%;
  height: 42%;
  background: repeating-linear-gradient(90deg, rgba(235, 240, 245, 0.68) 0 10px, rgba(210, 220, 230, 0.68) 10px 20px);
}

.prop-mirror {
  left: 58%;
  bottom: 48%;
  width: 9%;
  height: 22%;
  border: 2px solid rgba(226, 232, 240, 0.86);
  border-radius: 999px 999px 16px 16px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.62), rgba(148, 163, 184, 0.32));
}

.prop-sink {
  left: 53%;
  bottom: 28%;
  width: 18%;
  height: 10%;
  border-radius: 0 0 999px 999px;
  background: #e5e7eb;
  box-shadow: inset 0 -8px 0 rgba(148, 163, 184, 0.45);
}

.prop-towel {
  left: 72%;
  bottom: 42%;
  width: 5%;
  height: 18%;
  border-radius: 5px;
  background: #fda4af;
}

.prop-bath {
  left: 17%;
  bottom: 22%;
  width: 32%;
  height: 13%;
  border-radius: 999px 999px 18px 18px;
  background: #f8fafc;
  box-shadow: inset 0 -8px 0 rgba(148, 163, 184, 0.32);
}

.prop-field {
  left: 0;
  right: 0;
  bottom: 28%;
  height: 20%;
  background:
    repeating-linear-gradient(90deg, rgba(184, 142, 61, 0.5) 0 12px, rgba(91, 126, 60, 0.42) 12px 24px);
}

.prop-image {
  width: 7%;
  height: 9%;
  background-color: rgba(15, 23, 42, 0.16);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 68%;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  filter: saturate(0.58) brightness(0.96);
  opacity: 0.46;
  backdrop-filter: blur(1px);
}

.prop-animal_dog,
.prop-animal_cat,
.prop-animal_chicken,
.prop-animal_cow,
.prop-animal_horse,
.prop-animal_sheep {
  left: 70%;
  bottom: 38%;
  width: 9%;
  height: 10%;
}

.prop-weather_rain,
.prop-weather_snow,
.prop-weather_sun,
.prop-weather_wind {
  right: 8%;
  top: 12%;
  width: 8%;
  height: 10%;
}

.prop-weather_rain {
  opacity: 0.38;
}

.stage-character {
  position: absolute;
  z-index: 3;
  bottom: 32%;
  width: min(18%, 168px);
  height: 46%;
  display: grid;
  align-items: end;
  justify-items: center;
  overflow: visible;
  pointer-events: none;
  transition: opacity 220ms ease, filter 220ms ease;
}

.stage-character img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.42));
  transition: filter 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.stage-character span {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 13, 22, 0.64);
  color: #fff7ed;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
  transition: background 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.stage-character.sprite--active {
  z-index: 5;
}

.stage-character.sprite--active img {
  opacity: 1;
  transform: translateY(-2%) scale(1.04);
  filter:
    drop-shadow(0 18px 20px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 18px rgba(246, 197, 111, 0.34))
    brightness(1.08)
    saturate(1.08);
}

.stage-character.sprite--active span {
  background: linear-gradient(180deg, rgba(13, 118, 110, 0.96), rgba(10, 93, 87, 0.92));
  box-shadow:
    0 8px 18px rgba(13, 118, 110, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.stage-character.sprite--inactive img {
  opacity: 0.68;
  filter:
    drop-shadow(0 12px 14px rgba(0, 0, 0, 0.34))
    brightness(0.54)
    saturate(0.7);
}

.stage-character.sprite--inactive span {
  opacity: 0.62;
}

.stage-character.sprite--neutral img {
  opacity: 0.9;
  filter:
    drop-shadow(0 14px 16px rgba(0, 0, 0, 0.36))
    brightness(0.9)
    saturate(0.9);
}

.character-slot-0 { right: 10%; }
.character-slot-1 { left: 10%; }
.character-slot-2 { right: 25%; transform: scale(0.9); transform-origin: bottom center; }
.character-slot-3 { left: 25%; transform: scale(0.9); transform-origin: bottom center; }

.character-standee {
  position: absolute;
  z-index: 2;
  right: 10%;
  bottom: 24%;
  display: grid;
  place-items: center;
  width: min(18%, 110px);
  aspect-ratio: 0.62;
  border-radius: 999px 999px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #563c5c;
  color: #fff7ed;
  font-size: 34px;
  font-weight: 700;
}

.character-standee[hidden] {
  display: none;
}

.game-meta {
  position: absolute;
  z-index: 4;
  left: 14px;
  right: 14px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(248, 250, 252, 0.82);
  font-size: 12px;
}

.dialogue-box {
  position: absolute;
  z-index: 5;
  left: 16px;
  right: 16px;
  bottom: 16px;
  min-height: 112px;
  max-height: 36%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 13, 22, 0.96);
  box-shadow: 0 -18px 34px rgba(8, 13, 22, 0.35);
}

.speaker-name {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #0d766e;
  font-weight: 700;
}

.dialogue-box p {
  min-height: 44px;
  max-height: 96px;
  overflow: hidden;
  line-height: 1.55;
  font-size: clamp(14px, 1.2vw, 16px);
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.choice-list button {
  border-color: rgba(255, 255, 255, 0.25);
  background: #f6c56f;
  color: #111827;
}

.game-screen.choice-active .dialogue-box {
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 0;
  max-height: none;
  padding: clamp(24px, 6vw, 56px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(8, 13, 22, 0.18), rgba(8, 13, 22, 0.46) 65%),
    linear-gradient(180deg, rgba(8, 13, 22, 0.08), rgba(8, 13, 22, 0.18));
  box-shadow: none;
  pointer-events: none;
}

.game-screen.choice-active .speaker-name,
.game-screen.choice-active .dialogue-box p {
  display: none;
}

.game-screen.choice-active .choice-list {
  display: grid;
  width: min(74%, 560px);
  gap: clamp(12px, 2.4vw, 20px);
  margin: 0;
  pointer-events: auto;
}

.game-screen.choice-active .choice-list button {
  width: 100%;
  min-height: clamp(44px, 8vw, 64px);
  padding: 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.88)),
    #111827;
  color: #fff7ed;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.34);
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

.game-screen.choice-active .choice-list button:hover {
  border-color: rgba(246, 197, 111, 0.72);
  background:
    linear-gradient(180deg, rgba(40, 34, 25, 0.96), rgba(15, 18, 24, 0.92)),
    #111827;
}

.game-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.game-controls button {
  min-width: 42px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.game-controls button.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: #e8f6f3;
}

.jump-control {
  color: var(--muted);
  font-size: 12px;
}

#gameJump {
  width: 74px;
  height: 36px;
  padding: 6px 8px;
  text-align: center;
}

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

.preview-panel:fullscreen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100vw;
  height: 100vh;
  padding: 18px;
  background: #0b1020;
}

.preview-panel:fullscreen .game-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

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

.adapter-status {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(6, 10, 24, 0.48);
  font-size: 13px;
}

.adapter-status.ai {
  border-color: rgba(13, 118, 110, 0.3);
  color: var(--color-primary);
  background: rgba(34, 211, 197, 0.1);
}

.adapter-status.fallback {
  border-color: rgba(138, 75, 9, 0.25);
  color: var(--warn);
  background: rgba(255, 209, 102, 0.1);
}

.thought-steps li {
  position: relative;
  padding: 9px 0 9px 28px;
}

.thought-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(6, 10, 24, 0.88);
}

.thought-steps li.active {
  color: var(--ink);
  font-weight: 700;
}

.thought-steps li.active::before {
  border-color: #f6c56f;
  background: #f6c56f;
}

.thought-steps li.done::before {
  border-color: var(--accent);
  background: var(--accent);
}

.thought-steps li.failed::before {
  border-color: #b42318;
  background: #b42318;
}

.thought-log {
  min-height: 42px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  line-height: 1.5;
  background: rgba(6, 10, 24, 0.48);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab.active {
  border-color: var(--accent);
  color: var(--color-primary);
  background: rgba(34, 211, 197, 0.1);
}

pre {
  min-height: 540px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: rgba(6, 10, 24, 0.68);
  color: var(--color-text);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .site-nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

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

  .input-panel,
  .summary-panel,
  .preview-panel,
  .thought-panel,
  .output-panel {
    grid-column: auto;
    grid-row: auto;
  }

  textarea,
  pre {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .landing-page {
    overflow: auto;
  }

  .landing-header {
    height: auto;
    flex-wrap: wrap;
    padding: 16px;
  }

  .landing-main {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 16px;
  }

  .landing-panel,
  .landing-panel.featured {
    min-height: 240px;
    transform: none;
  }

  .landing-panel h1 {
    max-width: none;
  }

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

  .template-cover {
    min-height: 220px;
  }
}
