* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #ffe6ef, transparent 35%),
              radial-gradient(circle at bottom right, #dff3ff, transparent 30%),
              #fffaf7;
  color: #2e2428;
  min-height: 100vh;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  text-align: center;
  margin-bottom: 36px;
}

.eyebrow {
  color: #a05a72;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 10px 0 18px;
}

.subtitle {
  color: #6a5a60;
  font-size: 1.1rem;
}

.workspace {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: start;
}

.input-card,
.result-card,
.book-section,
.experiment-section {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(218, 171, 190, 0.55);
  border-radius: 32px;
  box-shadow: 0 28px 80px rgba(124, 76, 94, 0.12);
  padding: 28px;
  backdrop-filter: blur(18px);
}

label,
.mini-label {
  display: block;
  color: #6d3046;
  font-weight: 800;
  margin-bottom: 10px;
}

textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #efd1dc;
  border-radius: 22px;
  padding: 18px;
  font: inherit;
  color: #2e2428;
  background: #fffafc;
  outline: none;
}

textarea:focus {
  border-color: #d8739c;
  box-shadow: 0 0 0 4px rgba(216, 115, 156, 0.12);
}

.color-grid,
.chip-grid,
.sticker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 22px;
}

.color-dot {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(46, 36, 40, 0.08);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(124, 76, 94, 0.1);
}

.color-dot.active,
.sticker.active {
  outline: 3px solid #2e2428;
  outline-offset: 3px;
}

.color-dot[data-color="#fff1f6"] { background: #fff1f6; }
.color-dot[data-color="#f6c7d8"] { background: #f6c7d8; }
.color-dot[data-color="#d8f7b7"] { background: #d8f7b7; }
.color-dot[data-color="#b9e6f2"] { background: #b9e6f2; }
.color-dot[data-color="#c9b5ff"] { background: #c9b5ff; }
.color-dot[data-color="#fff6df"] { background: #fff6df; }
.color-dot[data-color="#ffd6a5"] { background: #ffd6a5; }
.color-dot[data-color="#2f6f88"] { background: #2f6f88; }
.color-dot[data-color="#ffadad"] { background: #ffadad; }
.color-dot[data-color="#caffbf"] { background: #caffbf; }
.color-dot[data-color="#fdffb6"] { background: #fdffb6; }
.color-dot[data-color="#a0c4ff"] { background: #a0c4ff; }

.chip,
.sticker,
.primary-button,
.secondary-button,
.danger-button,
.view-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.sticker {
  background: #fffafc;
  border: 1px solid #efd1dc;
  font-size: 1.35rem;
  height: 44px;
  width: 44px;
}

.chip {
  background: #fff1f6;
  color: #79364e;
  padding: 10px 14px;
  border: 1px solid #efd1dc;
}

.chip.active {
  background: #79364e;
  color: white;
}

.primary-button,
.secondary-button,
.danger-button,
.view-button {
  background: #2e2428;
  color: white;
  padding: 14px 18px;
}

.primary-button {
  width: 100%;
}

.secondary-button,
.view-button {
  background: #fff1f6;
  color: #79364e;
  border: 1px solid #efd1dc;
}

.danger-button {
  background: #fff5f5;
  color: #9d3347;
  border: 1px solid #f0c4cc;
}

.experiment-helper {
  color: #8f6470;
  font-size: 0.82rem;
  margin: 10px 0 0;
  text-align: center;
}

.card-topline,
.book-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-topline {
  color: #a05a72;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.result-card h2 {
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 18px 0;
}

.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.swatch {
  min-height: 76px;
  border-radius: 22px;
  border: 1px solid rgba(46, 36, 40, 0.08);
}

.sticker-strip {
  background: #fff6df;
  border-radius: 28px;
  font-size: 3.2rem;
  letter-spacing: 0.08em;
  margin: 18px 0;
  padding: 22px;
  text-align: center;
}

.caption {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
}

.journal-preview,
.detail-grid article,
.book-card,
.experiment-card {
  background: #fffafc;
  border: 1px solid #f1dce4;
  border-radius: 22px;
  padding: 16px;
}

.journal-preview {
  margin-bottom: 14px;
}

.journal-preview h3,
.detail-grid h3,
.book-card h3,
.experiment-card h3 {
  margin: 0 0 6px;
  color: #79364e;
}

.journal-preview p,
.detail-grid p,
.book-card p,
.experiment-section p,
.experiment-card p,
.experiment-card li {
  margin: 0;
  color: #66565d;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.action-row,
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.book-section,
.experiment-section {
  margin-top: 24px;
}

.book-heading h2,
.experiment-section h2 {
  margin: 0 0 8px;
}

.book-grid,
.experiment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

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

.book-card {
  min-height: 185px;
}

.book-card .mini-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.book-card .mini-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(46, 36, 40, 0.08);
}

.book-card .mini-stickers {
  font-size: 1.5rem;
  margin: 8px 0;
}

.experiment-card.current-variant {
  background: #fff1f6;
  border-color: #d8739c;
}

.experiment-card ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

.experiment-card li + li {
  margin-top: 6px;
}

@media print {
  body {
    background: white;
  }

  .hero,
  .input-card,
  .book-section,
  .experiment-section,
  .action-row {
    display: none;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .result-card {
    box-shadow: none;
    border: 0;
  }
}

@media (max-width: 820px) {
  .workspace,
  .detail-grid,
  .action-row,
  .card-actions,
  .book-grid,
  .experiment-grid {
    grid-template-columns: 1fr;
  }
}
