@font-face { font-family: "Dance Editorial"; src: url("../../assets/fonts/dance-editorial-sc-400-v11.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #07080c;
  --panel: #101219;
  --panel-soft: #171a23;
  --line: #2a2f3d;
  --text: #f4f0e8;
  --muted: #a5a8b4;
  --accent: #1677ff;
  --accent-contrast: #f6fbff;
  --danger: #f05d5e;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-editorial: "Dance Editorial", Georgia, "Songti SC", "STSong", serif;
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 80% 12%, rgba(65, 116, 164, 0.18), transparent 32rem),
    linear-gradient(135deg, #07080c 0%, #111113 52%, #090a0f 100%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.5;
}

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

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
}

.control-panel,
.output-panel {
  min-width: 0;
}

.control-panel {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 18, 25, 0.92);
  padding: 24px;
}

.brand-block {
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-wrap: balance;
}

.controls {
  display: grid;
  gap: 18px;
}

.field,
.slider-grid label {
  display: grid;
  gap: 10px;
}

.field > span,
.slider-grid span {
  color: var(--muted);
  font-size: 14px;
}

textarea,
input[type="color"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b10;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 112px;
  padding: 12px;
  font-size: 16px;
  line-height: 1.75;
}

textarea:focus,
input:focus-visible,
button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, white);
  outline-offset: 2px;
}

.upload-box {
  display: grid;
  gap: 6px;
  min-height: 96px;
  align-content: center;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
  color: var(--muted);
}

.upload-box input {
  display: none;
}

.upload-title {
  color: var(--text);
  font-weight: 500;
}

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

.swatch {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--swatch);
}

.swatch.active {
  border-color: var(--text);
}

input[type="color"] {
  height: 44px;
  padding: 4px;
}

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

.segmented label {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented label:has(input:checked) {
  background: var(--accent);
  color: var(--accent-contrast);
}

.slider-grid {
  display: grid;
  gap: 16px;
}

input[type="range"] {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--accent);
}

.primary-action,
#downloadHero,
#copyPrompt {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 500;
}

.primary-action {
  min-height: 52px;
  margin-top: 4px;
}

.output-panel {
  display: grid;
  gap: 18px;
}

.preview-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050608;
}

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

.preview-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#styleName {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 6, 8, 0.72);
  color: var(--text);
  backdrop-filter: blur(14px);
  font-size: 13px;
}

#downloadHero,
#copyPrompt {
  min-height: 44px;
  padding: 0 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.variant {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.variant canvas {
  aspect-ratio: 1.18;
  object-fit: cover;
}

.variant footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.variant button {
  min-width: 44px;
  min-height: 44px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 6px 8px;
}

.prompt-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.prompt-panel h2,
.prompt-panel p {
  margin: 0;
}

.prompt-panel h2 {
  font-size: 20px;
  font-weight: 500;
}

.prompt-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

#promptOutput {
  grid-column: 1 / -1;
  min-height: 164px;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 14px;
  }

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

  .control-panel {
    position: static;
    height: auto;
  }

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

@media (max-width: 560px) {
  h1 {
    font-size: 32px;
  }

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

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

  .preview-meta {
    position: static;
    padding: 12px;
    background: #080a0e;
  }
}

/* Portfolio navigation stays separate from the dark drawing canvas. */
.portfolio-return-bar {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 4px max(16px, calc((100% - 1452px) / 2));
  border-bottom: 1px solid #e5e3df;
  background: #fff;
  color: #656565;
}
.portfolio-return-bar a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  text-decoration: none;
  border-radius: 6px;
}
.portfolio-return-bar a:hover { color: #8a4b38; }
.portfolio-return-bar a:focus-visible { outline: 2px solid #8a4b38; outline-offset: 2px; }
input, textarea, select { font-size: 16px; }
label { font-size: 14px; }
@media (max-width: 360px) {
  .app-shell { padding: 12px; }
  .control-panel { padding: 18px; }
  h1 { font-size: 30px; }
  .preview-meta { flex-wrap: wrap; }
}
