:root {
  color-scheme: dark;
  --bg: #020814;
  --bg-2: #061426;
  --panel: rgba(5, 16, 32, 0.86);
  --panel-border: rgba(43, 143, 255, 0.18);
  --text: #eaf6ff;
  --muted: #a8c4d9;
  --accent: #2B8FFF;
  --accent-2: #1768d8;
  --accent-3: #b9deff;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Roboto", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.12), transparent 26%),
    linear-gradient(180deg, var(--bg), #01040a 100%);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
  opacity: 0.1;
}

.orb-1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(43, 143, 255, 0.7), rgba(43, 143, 255, 0));
  top: -90px;
  left: -90px;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(43, 143, 255, 0.5), rgba(43, 143, 255, 0));
  bottom: 8%;
  right: -70px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1540px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 24px;
}

.auth-locked .app-shell,
.auth-locked .site-footer {
  display: none;
}

.login-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-screen[hidden] {
  display: none;
}

.login-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(9, 29, 56, 0.94), rgba(4, 12, 25, 0.94));
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 6px 0 10px;
  font-family: "Roboto Slab", serif;
  line-height: 1.05;
}

.login-brand,
.login-word {
  display: block;
}

.login-brand {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  line-height: 1.15;
}

.login-word {
  font-size: clamp(3rem, 6vw, 4.3rem);
}

.login-copy {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.login-copy code {
  color: var(--accent-3);
}

.login-field {
  margin-bottom: 14px;
}

.login-feedback {
  min-height: 22px;
  margin: 2px 0 14px;
  color: var(--danger);
  font-size: 0.95rem;
}

.login-submit {
  width: 100%;
  justify-content: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: rgba(185, 222, 255, 0.82);
}

h1 {
  margin: 0;
  width: 100%;
  max-width: none;
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: clamp(2.5rem, 4vw, 4.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.lead {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(125, 240, 185, 0.16);
  background: rgba(12, 25, 19, 0.68);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-badges strong {
  color: #6ee7b7;
  font-size: 1rem;
  line-height: 1;
}

.style-panel,
.text-panel {
  padding: 0 22px 22px;
  margin-top: 0;
  margin-bottom: 0;
}

.wish-panel {
  padding: 0 22px 22px;
  margin-top: 0;
}

.negative-panel {
  padding: 0 22px 22px;
  margin-top: 0;
}

.scenario-panel {
  padding: 0 22px 22px;
  margin-top: 0;
  margin-bottom: 0;
}

.scenario-field {
  gap: 10px;
  margin-top: 0;
}

.scenario-field + .scenario-field {
  margin-top: 10px;
}

.prompt-panel {
  display: grid;
  gap: 16px;
  padding: 26px;
  position: sticky;
  top: 28px;
  z-index: 3;
  border-color: rgba(43, 143, 255, 0.26);
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(26, 18, 45, 0.97), rgba(12, 8, 21, 0.98));
}

.prompt-header h2 {
  margin: 0;
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.5rem;
  line-height: 1.1;
}

.prompt-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.prompt-actions.prompt-actions-top {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.prompt-actions.prompt-actions-top button {
  padding: 11px 10px;
  font-size: 0.95rem;
  min-height: 48px;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  flex: none;
}

.prompt-panel #output {
  min-height: 600px;
  width: 100%;
  padding: 18px;
  line-height: 1.7;
  resize: vertical;
}

.prompt-actions-bottom {
  display: flex;
  justify-content: flex-start;
  margin-top: 0;
}

.prompt-actions-bottom .ghost-btn {
  min-width: 0;
}

.prompt-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at top left, black 24%, transparent 78%);
  pointer-events: none;
  opacity: 0.55;
}

.prompt-panel > * {
  position: relative;
  z-index: 1;
}

.style-panel .panel-header p {
  margin-bottom: 0;
}

.style-select {
  display: grid;
  gap: 8px;
  color: #eaf6ff;
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 4px;
}

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

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

.style-grid-secondary {
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}

.style-grid-tonal {
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.preset-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.preset-apply-btn {
  min-height: 52px;
}

.title-field {
  margin-top: 0;
}

.subtitle-field {
  margin-top: 14px;
}

.wish-field {
  margin-top: 0;
}

.negative-field {
  margin-top: 0;
}

.style-grid-title {
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.title-style-label {
  margin-top: 10px;
  margin-bottom: 10px;
  color: #eaf6ff;
  font-size: 0.92rem;
  font-weight: 600;
}

.modal-grid {
  gap: 10px;
}

.tool-field select,
#project-category,
#project-edit-category {
  color: var(--text);
}

#project-category,
#project-edit-category {
  color: var(--text) !important;
}

.tool-field select option,
#project-category option,
#project-edit-category option {
  color: var(--text);
}

.hero-art, .panel {
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(26, 17, 42, 0.9), rgba(15, 10, 24, 0.95));
  border: 1px solid rgba(43, 143, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-art {
  margin: 0;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  width: 100%;
  min-height: 0;
  align-self: start;
}

.hero-side {
  display: grid;
  gap: 12px;
  align-content: start;
  position: relative;
  z-index: 2;
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 0;
}

.workspace-form,
.workspace-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.top-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(24, 15, 39, 0.92), rgba(13, 9, 22, 0.94));
}

.top-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 18% 0%, black 26%, transparent 72%);
  pointer-events: none;
  opacity: 0.72;
}

.top-toolbar > * {
  position: relative;
  z-index: 1;
}

.top-toolbar-copy {
  display: grid;
  gap: 6px;
}

.top-toolbar-title {
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.1;
}

.top-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.top-toolbar-btn {
  min-width: 146px;
}

.top-toolbar-version {
  white-space: nowrap;
}

.success-btn {
  color: #fff7fb;
  background: linear-gradient(135deg, #ff78a8 0%, #F44B8A 48%, #c92867 100%);
  border: 1px solid rgba(244, 75, 138, 0.34);
  box-shadow: 0 16px 30px rgba(244, 75, 138, 0.2);
}

.success-btn:hover {
  background: linear-gradient(135deg, #ff8ab5 0%, #ff5f9d 46%, #F44B8A 100%);
  box-shadow: 0 18px 34px rgba(244, 75, 138, 0.28);
}

.active-project-panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(43, 143, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.active-project-thumb {
  width: 112px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 95, 178, 0.7), rgba(23, 104, 216, 0.9));
  box-shadow: 0 14px 24px rgba(23, 104, 216, 0.18);
}

.active-project-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.active-project-thumb,
.project-card-preview {
  cursor: pointer;
}

.active-project-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.active-project-copy strong {
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.05rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-project-copy span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.active-project-stats {
  display: grid;
  gap: 3px;
  justify-items: center;
  align-content: center;
  min-width: 150px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.active-project-stats strong {
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.6rem;
  line-height: 1;
}

.active-project-stats span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
}

.panel {
  border-radius: var(--radius);
  padding: 28px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.field-group {
  margin: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.field-group.wide {
  grid-column: 1 / -1;
}

.field-group legend {
  padding: 0 10px;
  color: var(--accent-3);
  font-weight: 700;
}

.field-group label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #eaf6ff;
  font-size: 0.92rem;
  font-weight: 600;
}

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

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

.field-group label:first-of-type {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(43, 143, 255, 0.12);
  background: rgba(8, 5, 15, 0.92);
  color: var(--text);
  padding: 15px 44px 15px 16px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  color: rgba(185, 222, 255, 0.38);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23f3ecff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
}

select[multiple] {
  min-height: 152px;
  padding: 10px;
  background-image: none;
  overflow-y: auto;
}

#project-category[multiple] {
  min-height: 116px;
}

select[multiple] option {
  padding: 9px 10px;
  border-radius: 8px;
}

.native-multi-select-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.multi-select-dropdown {
  position: relative;
  width: 100%;
  min-height: 322px;
  display: grid;
  grid-template-rows: 52px 270px;
}

.multi-select-trigger {
  width: 100%;
  height: 52px;
  min-height: 52px;
  justify-content: flex-start;
  padding: 15px 16px;
  border: 1px solid rgba(43, 143, 255, 0.12);
  border-radius: 14px 14px 0 0;
  border-bottom-color: rgba(43, 143, 255, 0.2);
  background: rgba(8, 5, 15, 0.92);
  color: rgba(185, 222, 255, 0.38);
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-trigger.has-selection {
  color: var(--text);
}

.multi-select-menu {
  position: static;
  height: 270px;
  max-height: 270px;
  min-height: 270px;
  margin-top: 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(43, 143, 255, 0.22);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(2, 8, 20, 0.74);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.multi-select-menu[hidden] {
  display: block;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: rgba(185, 222, 255, 0.38);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
}

.multi-select-option.is-selected {
  color: var(--text);
}

.multi-select-option:hover {
  background: rgba(43, 143, 255, 0.14);
}

.multi-select-option input {
  width: auto;
  min-width: 16px;
  margin: 0;
  padding: 0;
}

.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

select:required:valid {
  color: var(--text);
}

select:required:invalid {
  color: rgba(185, 222, 255, 0.38);
}

textarea {
  resize: vertical;
  min-height: 92px;
}

#hauptfarben {
  min-height: 322px;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(43, 143, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(43, 143, 255, 0.14);
}

::placeholder {
  color: rgba(185, 222, 255, 0.38);
}

select option {
  color: var(--text);
}

select option[value=""] {
  color: rgba(185, 222, 255, 0.38);
}

.output-panel {
  display: flex;
  flex-direction: column;
}

.output-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

#output {
  flex: 1;
  min-height: 540px;
  padding: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.prompt-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.site-footer {
  width: min(1540px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.footer-nav a,
.footer-link-button {
  color: var(--accent-3);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-link-button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.footer-link-button:hover {
  transform: none;
}

.footer-nav a:hover,
.footer-link-button:hover {
  color: #ffffff;
}

.footer-separator {
  color: rgba(185, 222, 255, 0.38);
  font-weight: 700;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease, color 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-btn {
  flex: 1;
  color: white;
  background: linear-gradient(135deg, #2B8FFF 0%, #1768d8 100%);
  box-shadow: 0 16px 30px rgba(23, 104, 216, 0.22);
}

.secondary-btn,
.ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-btn {
  padding-inline: 14px;
}

.secondary-btn {
  background: linear-gradient(135deg, #1768d8 0%, #2B8FFF 52%, #4aa0ff 100%);
  color: #fff;
  border: 1px solid rgba(43, 143, 255, 0.22);
  box-shadow: 0 16px 30px rgba(43, 143, 255, 0.16);
}

.secondary-btn:hover {
  background: linear-gradient(135deg, #4aa0ff 0%, #2B8FFF 100%);
  box-shadow: 0 14px 28px rgba(216, 61, 154, 0.22);
}

.top-toolbar-btn:hover {
  background: linear-gradient(135deg, #4aa0ff 0%, #2B8FFF 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(216, 61, 154, 0.22);
}

.version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid rgba(43, 143, 255, 0.22);
  color: var(--accent-3);
  background: rgba(24, 16, 40, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.section-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: rgba(185, 222, 255, 0.78);
}

.projects-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.65fr);
  gap: 14px;
}

.tool-field {
  display: grid;
  gap: 8px;
  color: #eaf6ff;
  font-size: 0.92rem;
  font-weight: 600;
}

.tool-field span {
  color: var(--muted);
  font-weight: 600;
}

.project-list {
  display: grid;
  gap: 14px;
  max-height: min(64vh, 740px);
  overflow: auto;
  padding-right: 2px;
}

.project-empty {
  margin: 0;
  color: var(--muted);
  padding: 10px 2px 2px;
}

.project-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(43, 143, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.016));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 40px rgba(0, 0, 0, 0.16);
}

.project-card-preview {
  width: 128px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: "Roboto Slab", "Roboto", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.4rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 95, 178, 0.8), rgba(23, 104, 216, 0.9)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 30px rgba(23, 104, 216, 0.22);
}

.project-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-body {
  display: grid;
  gap: 8px;
}

.project-card-body h3 {
  margin: 0;
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.15rem;
}

.project-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-card-meta strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.project-card-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-action {
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.project-action-edit {
  border-color: rgba(43, 143, 255, 0.34);
  color: #b9deff;
  background: rgba(121, 58, 196, 0.18);
}

.project-action-load {
  border-color: rgba(157, 230, 95, 0.34);
  color: #bdf27c;
  background: rgba(64, 105, 22, 0.15);
}

.project-action-delete {
  border-color: rgba(251, 113, 133, 0.34);
  color: #ff8798;
  background: rgba(105, 29, 45, 0.14);
}

.project-action-export {
  border-color: rgba(43, 143, 255, 0.28);
  color: #b9deff;
  background: rgba(89, 44, 132, 0.16);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 4, 10, 0.68);
  backdrop-filter: blur(16px);
}

.modal-card {
  width: min(860px, calc(100vw - 24px));
  border-radius: 28px;
  padding: 26px;
  border: 1px solid rgba(43, 143, 255, 0.22);
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(28, 19, 46, 0.98), rgba(14, 9, 22, 0.98));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.6);
}

.modal-card-wide {
  width: min(1240px, calc(100vw - 24px));
  max-height: min(88vh, 980px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.modal-card-edit {
  width: min(760px, calc(100vw - 24px));
}

.modal-card-settings {
  width: min(1040px, calc(100vw - 24px));
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 6px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid rgba(43, 143, 255, 0.18);
  border-radius: 16px;
  background: rgba(2, 8, 20, 0.7);
}

.settings-tab {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.settings-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2B8FFF 0%, #1768d8 100%);
}

.settings-tab-panel[hidden] {
  display: none;
}

.settings-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(43, 143, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.settings-fieldset legend {
  padding: 0 8px;
  color: var(--accent-3);
  font-family: "Roboto Slab", "Roboto", serif;
  font-weight: 700;
}

.settings-box-options {
  margin-top: 18px;
}

.settings-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-help code {
  color: var(--accent-3);
}

.box-options-editor {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 16px;
  max-height: min(46vh, 520px);
  overflow: hidden;
}

.box-options-tab-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: min(46vh, 520px);
  overflow-y: auto;
  padding-right: 6px;
}

.box-options-tab {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(43, 143, 255, 0.14);
  border-radius: 12px;
  background: rgba(2, 8, 20, 0.7);
  color: var(--muted);
  box-shadow: none;
  text-align: left;
}

.box-options-tab.is-active {
  color: #fff;
  border-color: rgba(43, 143, 255, 0.34);
  background: linear-gradient(135deg, rgba(43, 143, 255, 0.92), rgba(23, 104, 216, 0.92));
}

.box-options-tab-panels {
  min-width: 0;
}

.box-options-tab-panel[hidden] {
  display: none;
}

.box-options-field textarea {
  min-height: min(42vh, 460px);
  max-height: min(42vh, 460px);
  font-size: 0.92rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 8px 0 0;
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.25rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}

.modal-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.modal-field-wide textarea {
  min-height: 260px;
}

#project-description {
  min-height: 260px;
}

.modal-column .modal-version-card {
  align-self: start;
}

.edit-modal-grid {
  display: grid;
  gap: 10px;
}

.edit-graphic-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(43, 143, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.edit-graphic-preview {
  width: 128px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: "Roboto Slab", "Roboto", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 95, 178, 0.72), rgba(23, 104, 216, 0.9)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 30px rgba(23, 104, 216, 0.22);
}

.edit-graphic-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-graphic-copy {
  display: grid;
  gap: 4px;
}

.edit-graphic-copy strong {
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.05rem;
}

.edit-graphic-copy span {
  color: var(--muted);
  line-height: 1.5;
}

.edit-graphic-copy span:last-child {
  color: var(--text);
  font-size: 0.92rem;
}

.modal-version-card {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 54px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(43, 143, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-align: right;
}

.modal-version-card span {
  font-size: 0.94rem;
  line-height: 1.2;
}

.modal-version-card strong {
  color: var(--text);
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.08rem;
  white-space: nowrap;
}

.modal-toolbar {
  margin: 2px 0 20px;
}

.import-dropzone {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 22px;
  border: 1px dashed rgba(43, 143, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.import-dropzone strong {
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: 1.1rem;
}

.import-dropzone span,
.import-dropzone em {
  color: var(--muted);
  font-style: normal;
}

.import-dropzone.is-dragover {
  border-color: rgba(255, 95, 178, 0.62);
  background: rgba(43, 143, 255, 0.12);
  transform: translateY(-1px);
}

.modal-feedback {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
}

.modal-card-wide .project-list {
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.modal-field {
  margin-top: 0;
}

.modal-preview {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.modal-preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(43, 143, 255, 0.14);
  color: var(--accent-3);
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-preview p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.workspace {
  gap: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .ghost-btn {
  min-width: 140px;
}

.modal-actions .secondary-btn {
  min-width: 180px;
}

.modal-actions .primary-btn,
.modal-actions .secondary-btn,
.modal-actions .ghost-btn {
  width: auto;
  flex: 0 0 auto;
}

.modal-backdrop[hidden] {
  display: none;
}

.lightbox-backdrop {
  padding: 24px;
}

.lightbox-card {
  width: min(92vw, 1120px);
  max-height: min(92vh, 980px);
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(43, 143, 255, 0.22);
  background:
    radial-gradient(circle at top left, rgba(43, 143, 255, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(26, 17, 42, 0.98), rgba(15, 10, 24, 0.98));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}

.lightbox-figure {
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.lightbox-figure img {
  width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-figure figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.status-copy {
  color: #8ef0c5;
}

.status-error {
  color: var(--danger);
}

/* Minimal blue refresh, preserving the existing PromptCrafter layout. */
h1,
h2,
h3,
.top-toolbar-title,
.active-project-thumb,
.active-project-stats strong,
.project-card-preview,
.project-card-body h3,
.edit-graphic-preview,
.edit-graphic-copy strong,
.modal-version-card strong,
.import-dropzone strong,
.prompt-header h2 {
  font-family: "Roboto Slab", "Roboto", serif;
  letter-spacing: 0;
}

.lead,
.prompt-header p,
.project-card-body p,
.modal-preview p {
  color: var(--muted);
}

.hero-art,
.panel,
.top-toolbar,
.prompt-panel,
.modal-card,
.lightbox-card {
  border-color: var(--panel-border);
  background:
    linear-gradient(180deg, rgba(7, 22, 43, 0.92), rgba(3, 12, 25, 0.96));
}

.prompt-panel,
.top-toolbar {
  background:
    linear-gradient(180deg, rgba(7, 25, 49, 0.96), rgba(3, 12, 25, 0.98));
}

.hero-art::before,
.prompt-panel::before,
.top-toolbar::before {
  opacity: 0.32;
}

.hero-badges span,
.version-pill,
.active-project-panel,
.project-action,
.edit-graphic-card,
.modal-version-card,
.import-dropzone,
.modal-preview,
.footer-nav {
  border-color: rgba(43, 143, 255, 0.16);
  background: rgba(8, 25, 48, 0.62);
  color: var(--text);
}

.hero-badges strong,
.footer-nav a,
.version-pill,
.section-kicker,
.modal-preview-badge,
.active-project-stats span:last-child {
  color: var(--accent-3);
}

input,
select,
textarea {
  border-color: rgba(43, 143, 255, 0.18);
  background: rgba(2, 8, 20, 0.92);
  color: var(--text);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23B9DEFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(43, 143, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(43, 143, 255, 0.14);
}

.primary-btn,
.secondary-btn,
.success-btn {
  color: #f7fbff;
  border: 1px solid rgba(43, 143, 255, 0.32);
  background: linear-gradient(135deg, #2B8FFF 0%, #1768d8 100%);
  box-shadow: 0 14px 30px rgba(43, 143, 255, 0.18);
}

.primary-btn:hover,
.secondary-btn:hover,
.success-btn:hover,
.top-toolbar-btn:hover {
  color: #f7fbff;
  background: linear-gradient(135deg, #4aa0ff 0%, #2B8FFF 100%);
  box-shadow: 0 16px 34px rgba(43, 143, 255, 0.24);
}

#new-project-btn.success-btn {
  color: #fff7fb;
  border: 2px solid rgba(244, 75, 138, 0.72);
  background: linear-gradient(135deg, #ff78a8 0%, #F44B8A 48%, #c92867 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 30px rgba(244, 75, 138, 0.2);
}

#new-project-btn.success-btn:hover {
  color: #fff7fb;
  border-color: rgba(255, 138, 181, 0.92);
  background: linear-gradient(135deg, #ff8ab5 0%, #ff5f9d 46%, #F44B8A 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 34px rgba(244, 75, 138, 0.28);
}

.hero-badges span strong {
  color: #F44B8A;
}

.ghost-btn,
.icon-btn {
  color: var(--text);
  border-color: rgba(43, 143, 255, 0.18);
  background: rgba(7, 25, 49, 0.72);
}

.active-project-thumb,
.project-card-preview,
.edit-graphic-preview {
  color: #f7fbff;
  background:
    linear-gradient(135deg, rgba(43, 143, 255, 0.78), rgba(14, 55, 105, 0.95)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 32px rgba(43, 143, 255, 0.16);
}

.project-card {
  border-color: rgba(43, 143, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 25, 48, 0.72), rgba(4, 13, 27, 0.68));
}

.project-action-edit,
.project-action-export {
  border-color: rgba(43, 143, 255, 0.28);
  color: var(--accent-3);
  background: rgba(43, 143, 255, 0.12);
}

.project-action-load,
.status-copy {
  border-color: rgba(65, 201, 161, 0.28);
  color: #8debd2;
  background: rgba(15, 84, 76, 0.14);
}

.import-dropzone.is-dragover,
.modal-preview-badge {
  border-color: rgba(43, 143, 255, 0.48);
  background: rgba(43, 143, 255, 0.14);
}

@media (max-width: 1120px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .projects-header,
  .projects-toolbar,
  .modal-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .preset-layout {
    grid-template-columns: 1fr;
  }

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

  .style-grid-tonal {
    grid-template-columns: 1fr;
  }

  .prompt-actions-top {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
  }

  .hero-art {
    aspect-ratio: 16 / 9;
  }

  #output {
    min-height: 360px;
  }

  .project-card {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .project-card-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-toolbar {
    align-items: stretch;
  }

  .top-toolbar-actions {
    width: 100%;
  }

  .active-project-panel {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .top-toolbar-btn {
    min-width: 0;
    flex: 1 1 160px;
  }

  .active-project-panel {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .active-project-thumb {
    width: 96px;
  }

  .active-project-stats {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 20px;
  }

  .site-footer {
    width: min(100% - 20px, 1440px);
  }

  .panel {
    padding: 18px;
  }

  .hero-art {
    aspect-ratio: 16 / 10;
  }

  .projects-panel,
  .modal-card {
    padding: 18px;
  }

  .project-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  .project-card-preview {
    width: 88px;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 10px;
    font-size: 1.05rem;
  }

  .project-card-actions,
  .modal-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .modal-actions .primary-btn,
  .modal-actions .secondary-btn,
  .modal-actions .ghost-btn {
    width: 100%;
  }

  .active-project-panel {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .active-project-thumb {
    width: 72px;
  }

  .active-project-stats {
    grid-column: 1 / -1;
  }

  .edit-graphic-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .edit-graphic-preview {
    width: 96px;
    border-radius: 10px;
  }

  .edit-graphic-card .secondary-btn {
    grid-column: 1 / -1;
  }

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

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

  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .prompt-actions,
  .output-meta {
    flex-direction: column;
    align-items: stretch;
  }
}
