:root {
  color-scheme: light;
  --bg: #fff8f7;
  --bg-soft: #fff1ef;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --border: rgba(226, 161, 170, 0.28);
  --text: #382a33;
  --muted: #846d78;
  --accent: #ff8fb1;
  --accent-deep: #ff6b9a;
  --mint: #a8e8d8;
  --peach: #ffd3b8;
  --lavender: #e3d7ff;
  --shadow: 0 18px 40px rgba(212, 140, 160, 0.18);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next Rounded", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 186, 206, 0.55), transparent 28%),
    radial-gradient(circle at top right, rgba(179, 233, 214, 0.5), transparent 24%),
    linear-gradient(180deg, #fff8f7 0%, #fff4ef 100%);
  color: var(--text);
}

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

.app-shell {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 22px 16px 42px;
}

.hero-card,
.panel,
.timeline-card,
.stat-card,
.recommendation-card,
.checkin-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-card {
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 243, 247, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-card__image {
  position: relative;
  min-height: 230px;
  background:
    linear-gradient(135deg, rgba(255, 145, 177, 0.95), rgba(255, 214, 167, 0.78)),
    url("https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?auto=format&fit=crop&w=800&q=80")
      center/cover;
}

.hero-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4), transparent 18%),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.32), transparent 14%),
    linear-gradient(180deg, transparent 0%, rgba(56, 42, 51, 0.12) 100%);
}

.hero-card__upload {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: 0 10px 25px rgba(80, 47, 60, 0.12);
}

.hero-card__content {
  padding: 18px 18px 20px;
}

.eyebrow,
.section-heading__kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: var(--muted);
}

h1,
h2,
h3,
.recommendation-title {
  font-family: "Avenir Next Rounded", "Trebuchet MS", "PingFang SC", sans-serif;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.hero-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-tags,
.recommendation-tags,
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 16px;
}

.hero-tags span,
.recommendation-tags span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 143, 177, 0.12);
  color: var(--accent-deep);
  font-size: 13px;
}

.page-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.panel {
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.panel--accent {
  background:
    linear-gradient(180deg, rgba(255, 245, 248, 0.96), rgba(255, 255, 255, 0.94)),
    var(--panel);
}

.section-heading,
.calendar-toolbar,
.timeline-card__header,
.checkin-card,
.quick-note__actions,
.recommendation-card__header,
.recommendation-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  align-items: flex-start;
}

.section-heading h2,
.timeline-card__header h3,
.checkin-card h3 {
  margin: 0;
}

.section-intro,
.muted-text,
.recommendation-meta,
.recommendation-reason,
.quick-note,
#selectedDateLabel,
#checkinStatus {
  color: var(--muted);
}

.section-intro {
  margin: 8px 0 14px;
  line-height: 1.65;
}

.insight-strip {
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 240, 226, 0.9), rgba(255, 245, 251, 0.98));
  color: #7b5765;
  line-height: 1.6;
}

.card-list,
.memory-list {
  display: grid;
  gap: 12px;
}

.recommendation-card {
  padding: 14px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(212, 140, 160, 0.12);
}

.stars {
  font-size: 20px;
  letter-spacing: 0.12em;
  color: #f3af2f;
}

.save-chip,
.ghost-button,
.primary-button,
.icon-button,
.link-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.save-chip,
.ghost-button {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 143, 177, 0.12);
  color: var(--accent-deep);
}

.save-chip.is-saved {
  background: rgba(168, 232, 216, 0.45);
  color: #2e8b75;
}

.primary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: white;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(255, 107, 154, 0.26);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(80, 47, 60, 0.12);
}

.recommendation-card__body {
  align-items: stretch;
}

.recommendation-copy {
  flex: 1;
}

.recommendation-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.recommendation-meta {
  margin: 8px 0;
  font-size: 14px;
}

.recommendation-reason {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid rgba(255, 143, 177, 0.2);
  line-height: 1.6;
}

.recommendation-thumb {
  flex: 0 0 112px;
  min-height: 128px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 214, 167, 0.95), rgba(255, 143, 177, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.calendar-toolbar {
  margin: 8px 0 14px;
}

.calendar-toolbar h3 {
  margin: 0;
  font-size: 22px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-grid--weekday {
  margin-bottom: 8px;
}

.weekday-pill,
.calendar-day {
  border-radius: 14px;
  text-align: center;
}

.weekday-pill {
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
}

.calendar-day {
  min-height: 70px;
  padding: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.calendar-day.is-other-month {
  opacity: 0.35;
}

.calendar-day.is-selected {
  border-color: rgba(255, 143, 177, 0.5);
  background: rgba(255, 243, 247, 0.95);
}

.calendar-day.has-memory::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--mint));
}

.timeline-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 252, 0.95);
  border: 1px solid rgba(255, 218, 228, 0.66);
}

.memory-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid rgba(226, 161, 170, 0.2);
}

.memory-item__title {
  margin: 0 0 6px;
  font-size: 18px;
}

.memory-item__meta {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 13px;
}

.memory-item__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.memory-item__image {
  width: 100%;
  margin-top: 10px;
  border-radius: 14px;
  object-fit: cover;
  max-height: 220px;
}

.memory-item__link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-deep);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 248, 0.94));
  border: 1px solid rgba(255, 218, 228, 0.72);
  text-align: center;
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.checkin-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.45), transparent 22%),
    linear-gradient(135deg, rgba(255, 214, 167, 0.95), rgba(255, 143, 177, 0.95));
  color: white;
}

.checkin-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.checkin-card .primary-button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  box-shadow: none;
}

.quick-note {
  width: 100%;
  resize: vertical;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(226, 161, 170, 0.26);
  background: rgba(255, 255, 255, 0.94);
  line-height: 1.6;
}

.quick-note:focus,
.memory-form input:focus,
.memory-form textarea:focus,
.memory-form select:focus {
  outline: 3px solid rgba(255, 143, 177, 0.2);
  border-color: rgba(255, 143, 177, 0.6);
}

.memory-modal {
  width: min(92vw, 420px);
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

.memory-modal::backdrop {
  background: rgba(49, 28, 38, 0.26);
  backdrop-filter: blur(6px);
}

.memory-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 252, 253, 0.98);
  box-shadow: var(--shadow);
}

.memory-form__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.memory-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.memory-form input,
.memory-form textarea,
.memory-form select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(226, 161, 170, 0.26);
  padding: 12px 14px;
  background: white;
  color: var(--text);
}

.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 420px) {
  .app-shell {
    padding-inline: 12px;
  }

  .recommendation-card__body {
    flex-direction: column-reverse;
  }

  .recommendation-thumb {
    width: 100%;
    min-height: 152px;
    flex-basis: auto;
  }

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