:root {
  --bg: #05080d;
  --bg-soft: #0d131a;
  --panel: rgba(18, 24, 32, 0.78);
  --panel-soft: rgba(25, 31, 40, 0.72);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f3f5f7;
  --muted: #b2bcc7;
  --muted-soft: #8a94a2;
  --accent: #ff4c48;
  --accent-soft: rgba(255, 76, 72, 0.16);
  --accent-glow: rgba(255, 76, 72, 0.34);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(255, 76, 72, 0.08), transparent 26%),
    linear-gradient(180deg, #05080d 0%, #090d13 100%);
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.scene-grid {
  position: absolute;
  inset: 0;
  background: url("./ui-assets/scene-grid.svg") center/cover no-repeat;
  opacity: 0.34;
}

.scene-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("./ui-assets/scene-wave.svg") center bottom/cover no-repeat;
}

.wave-line {
  display: none;
}

.wave-line-a {
  bottom: 10%;
  transform: scaleY(1.25);
}

.wave-line-b {
  bottom: 7%;
  transform: scaleY(1.55);
  opacity: 0.65;
}

.wave-line-c {
  bottom: 4%;
  transform: scaleY(1.9);
  opacity: 0.42;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 40px));
  margin: 28px auto 40px;
}

.hero,
.form-panel,
.side-panel {
  background:
    radial-gradient(circle at top center, rgba(255, 76, 72, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(24, 29, 37, 0.88), rgba(12, 16, 23, 0.84));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  padding: 28px 32px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff7a72;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.intro {
  margin: 16px 0 0;
  max-width: 720px;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.8;
  color: var(--muted);
}

.hero-points {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #d9dee4;
  font-size: 13px;
  font-weight: 700;
}

.hero-brand {
  display: grid;
  place-items: center;
  min-height: 220px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border);
  overflow: hidden;
}

.hero-brand img {
  width: min(100%, 460px);
  height: auto;
  display: block;
}

.portal {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 20px;
}

.form-panel,
.side-panel {
  padding: 30px;
}

.panel-head h2 {
  margin: 0;
  font-size: clamp(32px, 2.7vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.panel-head p:last-child {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

form {
  margin-top: 28px;
}

.field {
  display: block;
}

.field-label {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.helper {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted-soft);
}

input[type="text"] {
  width: 100%;
  margin-top: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  color: var(--text);
  font-size: 18px;
  outline: none;
}

input[type="text"]::placeholder {
  color: #97a1ae;
}

input[type="text"]:focus {
  border-color: rgba(255, 90, 85, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 76, 72, 0.14);
}

.upload-section {
  margin-top: 22px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.upload-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.picker-btn,
#submitBtn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  min-width: 150px;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.picker-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 76, 72, 0.14);
}

.picker-icon svg {
  display: none;
}

.picker-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

.preview-grid {
  min-height: 140px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 14px;
}

.empty-preview {
  min-height: 116px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted-soft);
  background: rgba(255, 255, 255, 0.03);
}

.thumb {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 1 / 1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.thumb-button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

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

.thumb-name {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(7, 10, 14, 0.7);
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 10, 14, 0.76);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.58);
  backdrop-filter: blur(3px);
}

.thumb.is-uploading .thumb-overlay {
  display: flex;
}

.thumb.is-uploading .thumb-remove {
  opacity: 0.35;
  pointer-events: none;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #ff5b53;
  animation: spin 0.85s linear infinite;
}

.actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
}

#submitBtn {
  min-width: 180px;
  padding: 17px 28px;
  background: linear-gradient(180deg, #ca3e38 0%, #8d1f1b 100%);
  color: #fffaf5;
  font-size: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(145, 25, 22, 0.28),
    0 0 24px rgba(255, 76, 72, 0.16);
}

#submitBtn:disabled,
.picker-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.notes {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.notes p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.8;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 10, 0.82);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.ok {
  color: #7af0bb;
}

.error {
  color: #ff9f9a;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100%, calc(100% - 18px));
    margin: 10px auto 24px;
  }

  .hero,
  .form-panel,
  .side-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .upload-section {
    padding: 16px;
  }

  .upload-toolbar,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .picker-btn,
  #submitBtn {
    width: 100%;
  }

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