:root {
  color-scheme: light;
  --bg: #f7f1e8;
  --bg-accent: #efe2cf;
  --panel: rgba(255, 252, 247, 0.94);
  --panel-strong: #fffdf9;
  --line: #1f1b16;
  --text: #221d17;
  --muted: #6d6255;
  --border: rgba(34, 29, 23, 0.12);
  --shadow: 0 24px 80px rgba(88, 64, 35, 0.14);
  --shadow-soft: 0 14px 36px rgba(88, 64, 35, 0.1);
  --accent: #1f1b16;
  --accent-soft: #f1b968;
  --danger: #af3322;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Instrument Sans', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(241, 185, 104, 0.34), transparent 28%),
    radial-gradient(circle at top right, rgba(223, 179, 121, 0.24), transparent 26%),
    linear-gradient(180deg, #fcf7ef 0%, var(--bg) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

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

.hero-copy,
.hero-card,
.panel {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 32px;
  border-radius: 28px;
}

.hero-copy h1 {
  margin: 8px 0 14px;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.hero-text {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
  color: #9b5c12;
}

.hero-card {
  border-radius: 28px;
  padding: 24px;
  display: grid;
  gap: 14px;
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 252, 247, 0.9)),
    linear-gradient(145deg, rgba(241, 185, 104, 0.18), transparent);
}

.stat {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 27, 22, 0.08);
  box-shadow: var(--shadow-soft);
}

.stat-label,
.spec-card span,
.summary-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.stat strong,
.spec-card strong,
.summary-pill strong {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: 1.1rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 24px;
  align-items: start;
}

.panel {
  border-radius: 28px;
  padding: 26px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin: 6px 0 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

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

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.file-input,
.inline-field input,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(31, 27, 22, 0.14);
  background: var(--panel-strong);
  color: var(--text);
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.file-input {
  padding: 12px 14px;
}

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

.inline-field-double {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) auto;
}

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

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.summary-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.summary-pill,
.spec-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(31, 27, 22, 0.08);
}

.list-wrapper {
  border-radius: 22px;
  border: 1px solid rgba(31, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.55);
  padding: 16px;
}

.list-header {
  margin-bottom: 12px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(31, 27, 22, 0.12);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.88);
}

.name-list {
  display: grid;
  gap: 10px;
}

.name-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(31, 27, 22, 0.08);
}

.name-row-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f0e2ce;
  font-size: 0.9rem;
  font-weight: 700;
}

.name-row-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 12px;
}

.name-row input {
  width: 100%;
  border: none;
  background: rgba(247, 241, 232, 0.68);
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  border-radius: 14px;
}

.name-row input:focus {
  outline: 2px solid rgba(155, 92, 18, 0.2);
}

.name-row button {
  background: rgba(175, 51, 34, 0.1);
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
}

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

.preview-note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.preview-note p {
  margin: 0;
}

.preview-pages {
  display: grid;
  gap: 18px;
}

.preview-page {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  padding: 24px 20px;
  background: white;
  border: 1px solid rgba(31, 27, 22, 0.12);
  box-shadow: 0 20px 30px rgba(49, 37, 21, 0.08);
  display: grid;
  grid-template-rows: 1fr auto 1fr auto 1fr;
}

.preview-slot {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.preview-name {
  display: grid;
  place-items: center;
  text-align: center;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
  word-break: break-word;
}

.preview-schedule {
  color: var(--muted);
  font-size: clamp(0.72rem, 1vw, 0.84rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.preview-divider {
  width: 100%;
  height: 1px;
  background: #000;
  align-self: center;
}

.preview-empty {
  color: #b8ada0;
}

.ghost-button,
.primary-button,
.inline-field button,
#add-bulk-button {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.ghost-button {
  background: rgba(31, 27, 22, 0.06);
  color: var(--text);
}

.primary-button,
.inline-field button,
#add-bulk-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 24px rgba(31, 27, 22, 0.18);
}

.ghost-button:hover,
.primary-button:hover,
.inline-field button:hover,
#add-bulk-button:hover,
.name-row button:hover {
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(460px, calc(100% - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(31, 27, 22, 0.94);
  color: white;
  box-shadow: 0 20px 45px rgba(31, 27, 22, 0.28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  z-index: 40;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero,
  .workspace,
  .grid-two,
  .summary-bar,
  .specs {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 20px;
  }

  .hero-copy,
  .hero-card,
  .panel {
    border-radius: 22px;
  }

  .hero-copy,
  .panel {
    padding: 20px;
  }

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

  .inline-field-double,
  .name-row-fields {
    grid-template-columns: 1fr;
  }

  .name-row {
    grid-template-columns: 1fr;
  }

  .name-row-index {
    width: 100%;
    border-radius: 12px;
    height: 30px;
  }
}
