:root {
  --bg: #071227;
  --panel: #0b1b33;
  --panel-border: #1e3658;
  --text: #cfdef0;
  --muted: #88a3c2;
  --blue: #27c2ff;
  --orange: #ff7c2c;
  --green: #39d48f;
  --red: #ff6e6e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", "Inter", sans-serif; }

.home-link {
  position: fixed;
  top: 14px;
  left: 18px;
  z-index: 10;
  text-decoration: none;
  color: var(--blue);
  font-family: "Righteous", "DM Sans", sans-serif;
  letter-spacing: 0.04em;
  font-size: 18px;
  border: 1px solid rgba(39, 194, 255, 0.25);
  background: rgba(9, 26, 47, 0.85);
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-link:hover { border-color: var(--blue); color: #8cdcff; }

.wordmark { display: inline-flex; align-items: baseline; }
.wordmark .s { color: var(--blue); }
.wordmark .d { color: var(--muted); font-size: 12px; margin: 0 1px; }
.wordmark .a { color: var(--orange); }

.wrap {
  max-width: 1320px;
  margin: 56px auto 40px;
  padding: 0 16px;
  display: grid;
  gap: 14px;
}

.panel {
  background: linear-gradient(180deg, rgba(12, 26, 48, 0.95), rgba(8, 18, 36, 0.95));
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
}

header.panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h2 {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  border: 1px solid #2d4d75;
  border-radius: 8px;
  padding: 8px 12px;
  color: #d6e9ff;
  background: #10284a;
  cursor: pointer;
  font-weight: 600;
}

button:hover { border-color: var(--blue); }

.canvas-shell {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #24456f;
  border-radius: 10px;
  overflow: hidden;
  background: #061122;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

#sceneLabel {
  font-size: 12px;
  color: #9fc1df;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #122944;
  border: 1px solid #214366;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #34d2ff);
}

#exportPreview {
  margin-top: 10px;
  width: 100%;
  max-width: 780px;
  border-radius: 8px;
  border: 1px solid #24456f;
  background: #061122;
}

#exportPathHint {
  margin-top: 8px;
  font-size: 12px;
  color: #9fc1df;
}

@media (max-width: 900px) {
  header.panel { flex-direction: column; align-items: flex-start; }
}
