/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #0d0d0d;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

/* Visually hidden for screen readers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  background: #141414;
  border-bottom: 2px solid #f0a500;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #f0a500;
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-icon { font-size: 1.5rem; }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a:focus { color: #f0a500; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #333;
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-size: 2.2rem;
  color: #f0a500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}
.hero-sub {
  font-size: 1.1rem;
  color: #bbb;
  max-width: 600px;
  margin: 0 auto;
}

/* Workspace grid */
.workspace {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .workspace-grid { grid-template-columns: 1fr; }
}

/* Controls panel */
.controls-panel {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
}
.field-group {
  margin-bottom: 1.25rem;
}
.field-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #ccc;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field-group input[type="text"],
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: #252525;
  border: 1px solid #444;
  border-radius: 8px;
  color: #f0f0f0;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #f0a500;
  box-shadow: 0 0 0 2px rgba(240, 165, 0, 0.2);
}
.field-group textarea { resize: vertical; min-height: 70px; }

.move-row {
  display: flex;
  gap: 0.5rem;
}
.move-row input { flex: 1; }

.btn-icon {
  background: #333;
  border: 1px solid #555;
  color: #f0a500;
  font-size: 1.2rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-icon:hover { background: #444; }

.btn-text {
  background: none;
  border: none;
  color: #f0a500;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}
.btn-text:hover { color: #ffc107; }

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.btn-primary, .btn-secondary {
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary {
  background: #f0a500;
  color: #0d0d0d;
}
.btn-primary:hover { background: #ffb300; transform: translateY(-1px); }
.btn-secondary {
  background: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}
.btn-secondary:hover { background: #444; transform: translateY(-1px); }

/* Saved gallery */
.saved-gallery {
  margin-top: 1.5rem;
  border-top: 1px solid #333;
  padding-top: 1rem;
}
.saved-gallery h3 {
  font-size: 1rem;
  color: #f0a500;
  margin-bottom: 0.5rem;
}
#saved-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}
#saved-list li {
  background: #252525;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
#saved-list li:hover { background: #333; }

/* Preview panel */
.preview-panel {
  position: sticky;
  top: 80px;
}
@media (max-width: 860px) {
  .preview-panel { position: static; }
}
.character-card {
  background: #1c1c1c;
  border: 2px solid #f0a500;
  border-radius: 16px;
  overflow: hidden;
  min-height: 320px;
  position: relative;
}
.card-stage-bg {
  height: 80px;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  transition: background 0.3s;
}
.card-content {
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
}
.card-costume-icon {
  font-size: 3rem;
  margin-top: -2rem;
  background: #1c1c1c;
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50%;
  border: 2px solid #f0a500;
}
.card-name {
  font-size: 1.6rem;
  color: #f0a500;
  margin: 0.5rem 0 0.25rem;
}
.card-style {
  font-size: 0.9rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-move {
  font-size: 1.1rem;
  color: #ff6b6b;
  margin: 0.5rem 0;
  font-weight: 600;
}
.card-stage-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}
.card-backstory {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.5;
  font-style: italic;
}
.preview-hint {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.75rem;
}

/* Ad section */
.ad-section {
  max-width: 720px;
  margin: 1rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

/* Support content: walkthrough */
.support-content {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.support-content h2 {
  font-size: 1.6rem;
  color: #f0a500;
  margin-bottom: 1.25rem;
  text-align: center;
}
.walkthrough-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.walk-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
}
.walk-number {
  position: absolute;
  top: -12px;
  left: -12px;
  background: #f0a500;
  color: #0d0d0d;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.walk-card h3 {
  font-size: 1.1rem;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  margin-left: 0.5rem;
}
.walk-card p {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.5;
}

/* Tips section */
.tips-section {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.tips-section h2 {
  font-size: 1.6rem;
  color: #f0a500;
  margin-bottom: 1.25rem;
  text-align: center;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.tip {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.25rem;
}
.tip h3 {
  font-size: 1rem;
  color: #f0a500;
  margin-bottom: 0.5rem;
}
.tip p {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.5;
}

/* Q&A section */
.qa-section {
  max-width: 800px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
}
.qa-section h2 {
  font-size: 1.6rem;
  color: #f0a500;
  margin-bottom: 1rem;
  text-align: center;
}
.qa-list dt {
  font-weight: 600;
  color: #e0e0e0;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.qa-list dd {
  color: #aaa;
  margin-left: 1rem;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  background: #141414;
  border-top: 2px solid #333;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
}
.footer-inner { max-width: 800px; margin: 0 auto; }
.footer-brand { color: #f0a500; margin-bottom: 0.5rem; font-weight: 600; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.footer-nav a { color: #999; text-decoration: none; }
.footer-nav a:hover { color: #f0a500; }
.footer-note { font-size: 0.8rem; }

/* Responsive tweaks */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: 1rem; }
  .action-buttons { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
  .card-name { font-size: 1.3rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
