:root {
  color-scheme: light;
  --paper: #f7efe1;
  --ink: #18242d;
  --ink-soft: #51616d;
  --accent: #ff7149;
  --panel: rgba(255, 250, 242, 0.88);
  --line: rgba(32, 32, 32, 0.08);
  --shadow: 0 24px 50px rgba(51, 36, 16, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.unwrap-page {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 184, 138, 0.55), transparent 32%),
    radial-gradient(circle at top right, rgba(121, 168, 161, 0.35), transparent 26%),
    linear-gradient(180deg, #fffaf5 0%, #f4ecdf 48%, #f7f1e8 100%);
}

body.unwrap-page::before,
body.unwrap-page::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
}

body.unwrap-page::before {
  top: 4rem;
  right: -5rem;
  width: 18rem;
  height: 18rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.58);
  transform: rotate(19deg);
  box-shadow: 0 20px 40px rgba(85, 64, 33, 0.12);
}

body.unwrap-page::after {
  left: -6rem;
  bottom: 5rem;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(205, 228, 224, 0.62), rgba(205, 228, 224, 0));
}

.unwrap-app {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}

.unwrap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.unwrap-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.unwrap-brand__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.12));
}

.unwrap-brand__copy {
  display: grid;
  gap: 2px;
}

.unwrap-brand__eyebrow,
.unwrap-kicker,
.unwrap-export-card__label,
.unwrap-dropzone__eyebrow,
.unwrap-empty-examples__title,
.unwrap-preview-destinations__title {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.unwrap-brand__title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1;
}

.unwrap-brand__subtitle {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.unwrap-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.unwrap-nav form {
  margin: 0;
}

.unwrap-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.unwrap-nav__button:hover,
.unwrap-nav__button:focus-visible,
.unwrap-dropzone__button:hover,
.unwrap-dropzone__button:focus-visible,
.unwrap-export-card__button:hover,
.unwrap-export-card__button:focus-visible,
.unwrap-queue__remove:hover,
.unwrap-queue__remove:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(34, 24, 12, 0.12);
}

.unwrap-nav__button--coffee {
  background: linear-gradient(135deg, #ffe4cb, #ffd29f);
}

.unwrap-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr) minmax(320px, 0.84fr);
  gap: 20px;
  align-items: start;
}

.unwrap-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.unwrap-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.24), transparent 32%);
  pointer-events: none;
}

.unwrap-panel--intake,
.unwrap-panel--preview,
.unwrap-panel--inspector {
  padding: 24px;
}

.unwrap-section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.unwrap-section-heading--compact {
  margin-bottom: 18px;
}

.unwrap-section-heading h1,
.unwrap-section-heading h2,
.unwrap-control-group h3,
.unwrap-note-card h3,
.unwrap-safety-rail h3,
.unwrap-brand__title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}

.unwrap-section-heading h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.02;
  max-width: 14ch;
}

.unwrap-section-heading h2 {
  font-size: 1.55rem;
  line-height: 1.1;
}

.unwrap-caption,
.unwrap-control-group__header p,
.unwrap-note-card p,
.unwrap-safety-rail li,
.unwrap-preview-meta,
.unwrap-export-card__status,
.unwrap-dropzone__help {
  color: var(--ink-soft);
  line-height: 1.5;
}

.unwrap-dropzone {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 28px;
  border: 2px dashed rgba(121, 168, 161, 0.52);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(205, 228, 224, 0.22)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.32),
      rgba(255, 255, 255, 0.32) 12px,
      rgba(255, 255, 255, 0.08) 12px,
      rgba(255, 255, 255, 0.08) 24px
    );
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.unwrap-dropzone.is-dragging {
  border-color: var(--accent);
  transform: scale(1.01);
  box-shadow: 0 18px 28px rgba(255, 113, 73, 0.14);
}

.unwrap-dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.unwrap-dropzone__headline {
  font-size: 1.45rem;
  font-weight: 700;
}

.unwrap-dropzone__button,
.unwrap-export-card__button {
  min-height: 48px;
  border: none;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.unwrap-dropzone__button {
  justify-self: start;
  background: rgba(24, 36, 45, 0.92);
  color: white;
}

.unwrap-empty-examples {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.unwrap-empty-examples__chips,
.unwrap-preview-destinations__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unwrap-empty-examples__chips span,
.unwrap-preview-destinations__chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 36, 45, 0.08);
  font-size: 0.87rem;
}

.unwrap-queue-shell {
  display: grid;
  gap: 12px;
}

.unwrap-queue-shell__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.unwrap-queue-shell__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.unwrap-queue-shell__summary {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.unwrap-queue {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.unwrap-queue__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}

.unwrap-queue__item.is-selected {
  border-color: rgba(255, 113, 73, 0.48);
  transform: translateX(3px);
}

.unwrap-queue__thumb {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(45deg, #ebe5db 25%, transparent 25%, transparent 75%, #ebe5db 75%, #ebe5db),
    linear-gradient(45deg, #ebe5db 25%, transparent 25%, transparent 75%, #ebe5db 75%, #ebe5db);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  border: 1px solid rgba(24, 36, 45, 0.08);
}

.unwrap-queue__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.unwrap-queue__meta {
  min-width: 0;
}

.unwrap-queue__name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.unwrap-queue__detail {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.unwrap-queue__remove {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(24, 36, 45, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  cursor: pointer;
}

.unwrap-queue__empty {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(24, 36, 45, 0.15);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.42);
}

.unwrap-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(239, 224, 203, 0.74));
  border: 1px solid rgba(24, 36, 45, 0.08);
}

.unwrap-stage[data-stage-mode="preserve"] {
  background:
    linear-gradient(45deg, rgba(233, 225, 211, 0.95) 25%, transparent 25%, transparent 75%, rgba(233, 225, 211, 0.95) 75%, rgba(233, 225, 211, 0.95)),
    linear-gradient(45deg, rgba(233, 225, 211, 0.95) 25%, transparent 25%, transparent 75%, rgba(233, 225, 211, 0.95) 75%, rgba(233, 225, 211, 0.95)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(239, 224, 203, 0.66));
  background-size: 28px 28px, 28px 28px, auto;
  background-position: 0 0, 14px 14px, 0 0;
}

.unwrap-stage[data-stage-mode="solid"] {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(180deg, var(--stage-matte, #f6ecdf), color-mix(in srgb, var(--stage-matte, #f6ecdf) 82%, #000 18%));
}

.unwrap-stage__mesh {
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.unwrap-stage__image {
  display: none;
  max-width: 100%;
  max-height: 380px;
  border-radius: 22px;
  box-shadow: 0 30px 50px rgba(22, 34, 43, 0.2);
}

.unwrap-stage.has-image .unwrap-stage__image {
  display: block;
}

.unwrap-stage__placeholder {
  display: grid;
  gap: 6px;
  max-width: 24rem;
  text-align: center;
  color: var(--ink-soft);
}

.unwrap-stage.has-image .unwrap-stage__placeholder {
  display: none;
}

.unwrap-preview-details {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.unwrap-preview-meta {
  min-height: 52px;
}

.unwrap-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.unwrap-note-card,
.unwrap-safety-rail {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.unwrap-form,
.unwrap-control-group {
  display: grid;
  gap: 14px;
}

.unwrap-control-group {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.unwrap-control-group__header {
  display: grid;
  gap: 4px;
}

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

.unwrap-toggle-card,
.unwrap-option-tile {
  display: block;
  cursor: pointer;
}

.unwrap-toggle-card input,
.unwrap-option-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.unwrap-toggle-card span,
.unwrap-option-tile span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(24, 36, 45, 0.08);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.unwrap-toggle-card small,
.unwrap-option-tile small {
  color: var(--ink-soft);
  line-height: 1.45;
}

.unwrap-toggle-card input:checked + span,
.unwrap-option-tile input:checked + span {
  border-color: rgba(255, 113, 73, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(255, 113, 73, 0.14);
}

.unwrap-stack-options {
  display: grid;
  gap: 10px;
}

.unwrap-color-row {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  gap: 12px;
  align-items: center;
}

.unwrap-color-row input[type="color"] {
  width: 58px;
  height: 42px;
  border: none;
  padding: 0;
  background: none;
}

.unwrap-color-row output,
.unwrap-range span {
  min-width: 3ch;
  font-weight: 700;
}

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

.unwrap-range input {
  width: 100%;
}

.unwrap-export-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(140deg, rgba(255, 113, 73, 0.92), rgba(234, 143, 96, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  color: white;
  box-shadow: 0 20px 36px rgba(255, 113, 73, 0.25);
}

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

.unwrap-export-card__button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.unwrap-export-card__button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.unwrap-export-card__status {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.unwrap-export-card__status.is-error {
  color: #ffe4d8;
}

.unwrap-safety-rail {
  margin-top: 18px;
}

.unwrap-safety-rail ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

@media (max-width: 1180px) {
  .unwrap-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .unwrap-panel--inspector {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .unwrap-app {
    padding: 16px;
  }

  .unwrap-header {
    display: grid;
  }

  .unwrap-workspace,
  .unwrap-note-grid,
  .unwrap-export-card__stats,
  .unwrap-toggle-grid {
    grid-template-columns: 1fr;
  }

  .unwrap-nav {
    justify-content: flex-start;
  }

  .unwrap-stage {
    min-height: 280px;
  }

  .unwrap-panel--intake,
  .unwrap-panel--preview,
  .unwrap-panel--inspector {
    padding: 18px;
  }
}
