:root {
  --paper: #faf8fb;
  --paper-lilac: #f3eff8;
  --ink: #241426;
  --muted: #706777;
  --plum: #5b4275;
  --lavender: #cbbce5;
  --lavender-soft: #ece5f5;
  --rose: #efdcdc;
  --sage: #dfe7c7;
  --white-glass: rgba(255, 255, 255, 0.58);
  --line: rgba(55, 35, 65, 0.12);
  --shadow-soft: 0 18px 40px rgba(87, 67, 93, 0.08);
  --shadow-card: 0 12px 24px rgba(97, 71, 104, 0.08);
  --primary-btn: #2a1d2d;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(207, 189, 233, 0.38), transparent 28%),
    radial-gradient(circle at bottom right, rgba(219, 230, 198, 0.42), transparent 22%),
    var(--paper);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  background: rgba(203, 188, 229, 0.18);
  pointer-events: none;
}

body::before {
  left: -150px;
  top: 40px;
}

body::after {
  right: -80px;
  bottom: 40px;
  background: rgba(223, 231, 199, 0.2);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  max-width: 1280px;
  margin: 28px auto;
  background: rgba(250, 248, 251, 0.72);
  border: 1px solid rgba(92, 75, 101, 0.08);
  border-radius: 30px;
  box-shadow: 0 28px 52px rgba(53, 38, 57, 0.08);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(8px);
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(189, 163, 215, 0.13), transparent 22%),
    radial-gradient(circle at 75% 18%, rgba(223, 231, 199, 0.22), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 1;
}

.app {
  padding: 26px 28px 40px;
}

.section-shell {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(92, 75, 101, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(2px);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  padding: 22px 28px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(236,229,245,0.3));
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -5%;
  top: 10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(194, 176, 228, 0.48), rgba(194, 176, 228, 0.12), transparent 65%);
  border-radius: 45% 55% 50% 50%;
  filter: blur(10px);
  transform: rotate(20deg);
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  right: 10%;
  top: 18%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.72), rgba(203,188,229,0.20) 28%, transparent 68%);
  border-radius: 58% 42% 64% 36% / 54% 43% 57% 46%;
  transform: rotate(18deg);
  opacity: 0.8;
  pointer-events: none;
}

.hero-copy {
  padding: 30px 10px 12px 8px;
  position: relative;
  z-index: 1;
}

.hero > * {
  min-width: 0;
}

.pill,
.review-badge,
.nav-pill,
.demo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(76, 58, 86, 0.1);
  color: var(--plum);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.5rem, 8vw, 9rem);
  line-height: 0.86;
  margin: 18px 0 0;
  letter-spacing: -0.06em;
  font-weight: 700;
  color: var(--ink);
}

.tagline {
  margin: 22px 0 8px;
  font-size: clamp(1.3rem, 2vw, 2.1rem);
  color: var(--plum);
  font-weight: 600;
  font-family: Georgia, serif;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 560px;
  font-size: 1.04rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 12px 0 18px;
}

.hero-actions,
.data-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.nav-pill {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 46px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: var(--primary-btn);
  color: #fff;
  box-shadow: 0 10px 18px rgba(42, 29, 45, 0.15);
}

.secondary-btn {
  background: rgba(203, 188, 229, 0.42);
  color: var(--ink);
  border-color: rgba(91, 66, 117, 0.08);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  border-color: rgba(90, 69, 97, 0.12);
}

.danger-btn {
  background: rgba(227, 176, 176, 0.26);
  color: var(--ink);
  border-color: rgba(117, 58, 58, 0.12);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.nav-pill:hover {
  transform: translateY(-1px);
}

.hero-cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 18px;
  padding: 16px 14px 16px 0;
  min-height: 420px;
  align-content: center;
  z-index: 1;
}

.hero-cards::before,
.hero-cards::after {
  content: "";
  position: absolute;
  border-radius: 58% 42% 49% 51% / 58% 41% 59% 42%;
  background: linear-gradient(135deg, rgba(203,188,229,0.36), rgba(255,255,255,0.02));
  border: 1px solid rgba(91,66,117,0.08);
  pointer-events: none;
}

.hero-cards::before {
  width: 180px;
  height: 240px;
  right: 22%;
  top: -12px;
  transform: rotate(18deg);
}

.hero-cards::after {
  width: 200px;
  height: 180px;
  right: 4%;
  bottom: -14px;
  transform: rotate(-18deg);
}

.botanical-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(194, 176, 228, 0.5), rgba(255,255,255,0) 52%);
  filter: blur(8px);
  pointer-events: none;
}

.mini-card {
  position: relative;
  z-index: 1;
  min-height: 128px;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(84, 68, 94, 0.08);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(2px);
}

.soft-rose { background: rgba(239, 220, 220, 0.72); }
.soft-lavender { background: rgba(203, 188, 229, 0.52); }
.soft-sage { background: rgba(223, 231, 199, 0.56); }
.soft-ice { background: rgba(255,255,255,0.38); }

.card-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-card strong {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  color: var(--ink);
}

.mini-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  padding: 0 6px;
}

.nav-pill {
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  border-color: rgba(91, 66, 117, 0.08);
}

.nav-pill.is-active {
  background: rgba(203, 188, 229, 0.52);
  border-color: rgba(91, 66, 117, 0.12);
}

.section-shell + .section-shell {
  margin-top: 22px;
}

.form-panel,
#entries-panel,
#weekly-review,
#ideas-panel,
#data-panel {
  padding: 24px 22px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--ink);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--plum);
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(71, 57, 80, 0.12);
  background: rgba(255, 255, 255, 0.44);
  padding: 12px 14px;
  color: var(--ink);
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(103, 80, 128, 0.18);
  border-color: rgba(91, 66, 117, 0.25);
}

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

.more-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.more-details summary {
  cursor: pointer;
  list-style: none;
  color: var(--plum);
  font-weight: 600;
  width: fit-content;
}

.more-details summary::-webkit-details-marker {
  display: none;
}

.form-feedback {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--plum);
  font-size: 0.95rem;
}

.entries-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.entry-card {
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(73, 57, 84, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(93, 72, 104, 0.08);
}

.entry-card.is-demo {
  border-style: dashed;
  border-color: rgba(120, 102, 154, 0.28);
  background: rgba(236, 229, 245, 0.52);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.entry-date {
  font-weight: 700;
  color: var(--ink);
}

.entry-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(203, 188, 229, 0.35);
  color: var(--plum);
  font-size: 0.74rem;
}

.entry-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.entry-card strong {
  color: var(--ink);
}

.entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
}

.icon-action {
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  padding: 8px 10px;
  color: var(--ink);
}

.icon-action.delete {
  background: rgba(231, 190, 190, 0.28);
}

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

.summary-card {
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(86, 66, 99, 0.08);
  border-radius: 18px;
  padding: 18px 18px 14px;
}

.summary-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--ink);
}

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

.summary-list li {
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  padding-left: 14px;
}

.summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(91, 66, 117, 0.58);
}

.wide-card {
  grid-column: 1 / -1;
}

.distribution-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.distribution-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(203, 188, 229, 0.28);
  color: var(--plum);
  border: 1px solid rgba(86, 66, 99, 0.08);
}

.distribution-chip strong {
  font-size: 0.82rem;
}

.mini-bars {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 120px;
  padding-top: 12px;
}

.mini-bars-bar {
  flex: 1;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, rgba(203, 188, 229, 0.9), rgba(160, 148, 202, 0.7));
  min-height: 18px;
  position: relative;
}

.mini-bars-bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--muted);
}

.idea-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.idea-card {
  min-height: 150px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(86, 66, 99, 0.08);
  background: rgba(255,255,255,0.42);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

.idea-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.idea-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.qr-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(85, 66, 98, 0.09);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.qr-copy h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.qr-copy p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.qr-url {
  word-break: break-all;
  color: var(--plum) !important;
  font-weight: 600;
}

a.qr-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 4px;
}

.qr-image {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  border: 1px solid rgba(85, 66, 98, 0.1);
}

.share-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(85, 66, 98, 0.09);
}

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

.share-header h3 {
  margin: 0;
}

.share-header span,
.privacy-note {
  color: var(--muted);
}

#weekly-report-output {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(86, 66, 99, 0.12);
  background: rgba(255,255,255,0.48);
  padding: 16px;
  resize: vertical;
  color: var(--ink);
}

.hidden {
  display: none !important;
}

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

  .hero-cards {
    width: min(100%, 560px);
  }

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

@media (max-width: 640px) {
  body {
    min-width: 0;
  }

  .page-shell {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }

  .app {
    padding: 14px 12px 24px;
    min-width: 0;
    max-width: 100%;
  }

  .hero,
  .form-panel,
  #entries-panel,
  #weekly-review,
  #ideas-panel,
  #data-panel {
    padding-left: 14px;
    padding-right: 14px;
    min-width: 0;
    max-width: 100%;
  }

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

  .quick-nav,
  .hero-actions,
  .data-actions,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .data-actions > *,
  .hero-actions > *,
  .form-actions > * {
    width: 100%;
  }

  .qr-box {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .qr-image {
    width: 160px;
    height: 160px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 3.35rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    overflow-wrap: anywhere;
  }

  .hero-copy {
    padding-top: 16px;
  }

  .mini-card {
    min-height: 108px;
    min-width: 0;
    width: 100%;
  }

  .hero-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: auto;
    padding: 16px 0;
    width: 100%;
  }

  .hero p,
  .mini-card,
  .nav-pill {
    overflow-wrap: anywhere;
  }

  .share-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
