:root {
  --cover-image: url("assets/hero-main.jpg");
  --ink: #25212a;
  --muted: #6e6676;
  --line: #eadfe7;
  --panel: rgba(255, 255, 255, 0.86);
  --soft: #fff7fa;
  --rose: #d84f78;
  --coral: #f07b68;
  --mint: #7dbfaf;
  --gold: #c89b3c;
  --shadow: 0 18px 50px rgba(72, 44, 69, 0.14);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #fff9fb;
  letter-spacing: 0;
}
button, input, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
button:hover { filter: brightness(1.05); }
.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}
.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px 0 16px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--rose);
  font-weight: 700;
}
h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero-copy > p:last-child {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.8;
  color: var(--muted);
}
.hero-photo {
  min-height: 380px;
  border-radius: 8px;
  background: var(--cover-image) center/cover no-repeat;
  box-shadow: var(--shadow);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 18px;
}
.stat-card, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.stat-card {
  min-height: 132px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 6px;
}
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong {
  font-size: 46px;
  line-height: 1;
}
.stat-card.accent { border-color: rgba(216, 79, 120, 0.35); }
.workbench, .two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 18px;
  margin-top: 18px;
}
.panel { padding: 20px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
h2 {
  margin: 0;
  font-size: 22px;
}
textarea, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
}
textarea:focus, input:focus { border-color: var(--rose); }
.plan-inputs, .inline-input {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
}
.inline-input { grid-template-columns: minmax(0, 1fr); }
.clean-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}
.clean-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
}
.clean-list .meta { color: var(--muted); font-size: 13px; }
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.check-list li.done { color: var(--muted); text-decoration: line-through; }
.timeline {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.timeline-item time { color: var(--rose); font-weight: 700; }
.timeline-item strong { display: block; margin-bottom: 4px; }
.timeline-item p { margin: 0; color: var(--muted); line-height: 1.6; }
.gallery-panel { margin-top: 18px; }
.gallery {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.photo-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.photo-card .photo {
  height: 142px;
  background: linear-gradient(135deg, #f8c7d7, #fff1c7 48%, #bfe4dc);
  background-size: cover;
  background-position: center;
}
.photo-card .photo-text { padding: 13px; }
.photo-card strong { display: block; margin-bottom: 4px; }
.photo-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.lock {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(255, 247, 250, 0.96);
}
.lock.hidden { display: none; }
.lock-panel {
  width: min(420px, calc(100% - 32px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.lock-panel h1 { font-size: 34px; margin-bottom: 18px; }
.lock-panel button { width: 100%; margin-top: 10px; }
.lock-panel p { min-height: 24px; color: var(--rose); }
@media (max-width: 820px) {
  .app-shell { width: min(100% - 20px, 680px); padding-top: 10px; }
  .hero, .workbench, .two-column, .stats-grid, .gallery { grid-template-columns: 1fr; }
  .hero { min-height: auto; gap: 14px; }
  .hero-copy { padding: 16px 0 4px; }
  .hero-photo { min-height: 240px; }
  .plan-inputs { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
}

body.is-locked .app-shell { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(37, 33, 42, 0.36);
}
.modal.hidden { display: none; }
.modal-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.upload-box {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(216, 79, 120, 0.48);
  border-radius: 8px;
  background: var(--soft);
  color: var(--rose);
  font-weight: 700;
  cursor: pointer;
}
.upload-box input { display: none; }
.moment-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.moment-preview.hidden { display: none; }
.photo-text .icon-btn { margin-top: 10px; }
.quick-nav {
  position: sticky;
  top: 10px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(72, 44, 69, 0.08);
}
.quick-nav a {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.quick-nav a:hover { background: var(--soft); color: var(--rose); }
.story-panel {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,247,250,.9)),
    var(--cover-image) center/cover no-repeat;
}
.story-kicker {
  color: var(--rose);
  font-weight: 800;
}
.story-panel h2 { font-size: 28px; }
.story-panel p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}
.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.story-meta span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
}
@media (max-width: 820px) {
  .quick-nav { top: 6px; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; }
  .quick-nav a { min-height: 34px; font-size: 14px; }
  .story-panel h2 { font-size: 24px; }
}

/* Apple-inspired visual refresh */
:root {
  --cover-image: url("assets/hero-main.jpg");
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --panel: rgba(255, 255, 255, 0.92);
  --soft: #f5f5f7;
  --rose: #bf3158;
  --coral: #0071e3;
  --mint: #34c759;
  --gold: #b0822f;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}
body {
  background: #f5f5f7;
  color: var(--ink);
}
.app-shell {
  width: min(1160px, calc(100% - 44px));
  padding-top: 18px;
}
.hero {
  min-height: 560px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 34px;
  padding: 38px 0 22px;
}
.hero-copy { padding: 42px 0; }
.eyebrow {
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}
h1 {
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.96;
  font-weight: 800;
}
.hero-copy > p:last-child {
  max-width: 520px;
  margin-top: 24px;
  font-size: 24px;
  line-height: 1.45;
  color: var(--muted);
}
.hero-photo {
  min-height: 500px;
  border: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.14);
}
.quick-nav {
  top: 12px;
  margin: 0 0 18px;
  border: 0;
  background: rgba(245, 245, 247, 0.78);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.quick-nav a {
  color: #424245;
  font-size: 14px;
}
.quick-nav a:hover {
  background: #fff;
  color: #0071e3;
}
.stat-card, .panel {
  border-color: transparent;
  background: #fff;
  box-shadow: 0 14px 38px rgba(0,0,0,.06);
}
.stat-card { min-height: 150px; padding: 24px; }
.stat-card strong { font-size: 56px; font-weight: 800; }
.stat-card.accent { border-color: transparent; }
.story-panel {
  background: #fff;
  box-shadow: 0 14px 38px rgba(0,0,0,.06);
}
.story-kicker { color: #0071e3; }
.story-panel h2 { font-size: 34px; font-weight: 800; }
.story-panel p { font-size: 17px; color: var(--muted); }
.story-meta span {
  border-color: #e8e8ed;
  background: #f5f5f7;
}
.panel { padding: 24px; }
h2 { font-size: 24px; font-weight: 800; }
button {
  border-radius: 8px;
  background: #0071e3;
  color: #fff;
}
.icon-btn {
  background: #fff;
  color: var(--muted);
  border-color: #d2d2d7;
}
textarea, input {
  border-color: #d2d2d7;
  background: #fbfbfd;
}
textarea:focus, input:focus { border-color: #0071e3; }
.clean-list li { background: #f5f5f7; }
.photo-card {
  border: 0;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.photo-card .photo { height: 168px; }
.modal-panel { border: 0; box-shadow: 0 28px 80px rgba(0,0,0,.22); }
.upload-box {
  border-color: #d2d2d7;
  background: #f5f5f7;
  color: #0071e3;
}
@media (max-width: 820px) {
  .app-shell { width: min(100% - 24px, 680px); }
  .hero { min-height: auto; padding-top: 18px; }
  .hero-copy { padding: 18px 0 8px; }
  .hero-copy > p:last-child { font-size: 19px; }
  .hero-photo { min-height: 300px; }
  .stat-card strong { font-size: 46px; }
}

/* Romantic template refresh inspired by love/wedding templates */
body {
  background:
    linear-gradient(180deg, #fff6f8 0%, #fffaf4 42%, #f7fbf8 100%);
}
.app-shell {
  width: min(1120px, calc(100% - 36px));
}
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: 18px;
  padding: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(35, 20, 28, .68), rgba(35, 20, 28, .25) 54%, rgba(255, 246, 248, .08)),
    var(--cover-image) center/cover no-repeat;
  box-shadow: 0 30px 90px rgba(178, 65, 98, .22);
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 54px;
  color: #fff;
}
.eyebrow {
  color: #ffe1ea;
  font-size: 18px;
}
h1 {
  color: #fff;
  text-shadow: 0 12px 34px rgba(0,0,0,.22);
}
.hero-copy > p:last-child {
  color: rgba(255,255,255,.88);
  font-size: 25px;
}
.hero-photo { display: none; }
.quick-nav {
  top: 12px;
  margin: 16px auto 20px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(236, 183, 199, .62);
}
.quick-nav a:hover {
  background: #fff1f5;
  color: #bf3158;
}
.stat-card, .panel {
  border: 1px solid rgba(236, 183, 199, .46);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 44px rgba(178, 65, 98, .1);
}
.stat-card strong { color: #bf3158; }
.stat-card.accent strong { color: #b0822f; }
.story-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,241,245,.92)),
    var(--cover-image) center/cover no-repeat;
  border-color: rgba(236, 183, 199, .55);
}
.story-kicker { color: #bf3158; }
.story-panel h2 { color: #2b2026; }
.story-meta span {
  background: #fff6f8;
  border-color: rgba(236, 183, 199, .58);
}
button {
  background: linear-gradient(135deg, #bf3158, #e86f82);
  box-shadow: 0 10px 24px rgba(191, 49, 88, .18);
}
.icon-btn {
  background: #fff;
  box-shadow: none;
}
.clean-list li {
  background: #fff6f8;
}
.timeline-item {
  border-bottom-color: rgba(236, 183, 199, .62);
}
.timeline-item time { color: #bf3158; }
.gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.photo-card {
  border: 1px solid rgba(236, 183, 199, .46);
  box-shadow: 0 16px 44px rgba(178, 65, 98, .1);
}
.photo-card .photo {
  height: 190px;
  background: linear-gradient(135deg, #ffd7e2, #fff2c5 48%, #d7f1e9);
}
.upload-box {
  border-color: rgba(191, 49, 88, .42);
  background: #fff6f8;
  color: #bf3158;
}
.lock-panel {
  border-color: rgba(236, 183, 199, .55);
}
@media (max-width: 820px) {
  .app-shell { width: min(100% - 22px, 680px); }
  .hero {
    min-height: 520px;
    align-items: flex-end;
    background-position: center;
  }
  .hero-copy { padding: 32px 24px; }
  .hero-copy > p:last-child { font-size: 18px; }
  .gallery { grid-template-columns: 1fr; }
}

.cover-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cover-actions button {
  background: rgba(255,255,255,.92);
  color: #bf3158;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}
.cover-actions button:hover { filter: brightness(1.02); }
/* login welcome refresh */
.lock, .welcome {
  animation: softFadeIn .38s ease both;
}
.lock.leaving, .welcome.leaving {
  animation: softFadeOut .36s ease both;
}
.lock {
  background:
    linear-gradient(135deg, rgba(255,246,248,.96), rgba(255,250,244,.96)),
    var(--cover-image) center/cover no-repeat;
  backdrop-filter: blur(18px);
}
.lock-panel, .welcome-panel {
  border: 1px solid rgba(236,183,199,.55);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(20px);
  box-shadow: 0 28px 80px rgba(178,65,98,.16);
  animation: panelRise .46s cubic-bezier(.2,.8,.2,1) both;
}
.lock-panel input {
  min-height: 48px;
  background: rgba(255,255,255,.92);
}
.welcome {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(35,20,28,.68), rgba(35,20,28,.25)),
    var(--cover-image) center/cover no-repeat;
}
.welcome.hidden { display: none; }
.welcome-panel {
  width: min(620px, calc(100% - 24px));
  padding: 34px;
  border-radius: 8px;
  text-align: center;
}
.welcome-kicker {
  margin: 0 0 10px;
  color: #bf3158;
  font-weight: 800;
}
.welcome-panel h1 {
  color: #1d1d1f;
  font-size: clamp(34px, 7vw, 62px);
  line-height: 1;
  text-shadow: none;
}
.welcome-panel p {
  margin: 18px auto 24px;
  max-width: 430px;
  color: var(--muted);
  line-height: 1.7;
}
body.is-welcoming .app-shell { display: none; }
.updates-panel { margin-top: 18px; }
.update-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.update-list li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff6f8;
}
.update-list time {
  color: #bf3158;
  font-weight: 800;
}
.update-list strong { display: block; margin-bottom: 4px; }
.update-list p { margin: 0; color: var(--muted); line-height: 1.5; }
@keyframes softFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes softFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes panelRise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 820px) {
  .welcome-panel { padding: 26px 20px; }
  .update-list li { grid-template-columns: 1fr; }
}
.notebook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.note-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(236, 183, 199, .46);
  border-radius: 8px;
  background: #fff6f8;
}
.note-box h3 {
  margin: 0;
  color: #bf3158;
  font-size: 18px;
}
.note-box textarea { background: #fff; }
@media (max-width: 820px) {
  .notebook-grid { grid-template-columns: 1fr; }
}
.note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.note-head button {
  padding: 8px 12px;
}
.note-list { margin-top: 2px; }
.note-list li { background: #fff; }
.elapsed-chip {
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(236, 183, 199, .58);
  border-radius: 8px;
  background: #fff6f8;
  color: #bf3158;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(178, 65, 98, .08);
}
.plan-period-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
  gap: 18px;
}
.period-side {
  padding-left: 18px;
  border-left: 1px solid rgba(236, 183, 199, .55);
}
.period-list li { background: #fff6f8; }
@media (max-width: 820px) {
  .plan-period-grid { grid-template-columns: 1fr; }
  .period-side { padding-left: 0; border-left: 0; border-top: 1px solid rgba(236, 183, 199, .55); padding-top: 18px; }
}
.wish-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.wish-column {
  padding: 14px;
  border: 1px solid rgba(236, 183, 199, .46);
  border-radius: 8px;
  background: #fff6f8;
}
.wish-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wish-column-head h3 { margin: 0; color: #bf3158; font-size: 18px; }
.wish-column-head span { color: var(--muted); font-weight: 800; }
.row-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}
@media (max-width: 820px) {
  .wish-board { grid-template-columns: 1fr; }
}
.period-panel { margin-top: 18px; }
.period-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #bf3158;
  font-weight: 800;
}
.period-weekdays, .period-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.period-weekdays {
  margin: 8px 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.period-calendar { min-height: 260px; }
.period-day {
  min-height: 72px;
  border: 1px solid rgba(236, 183, 199, .46);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px;
}
.period-day.blank {
  border-color: transparent;
  background: transparent;
}
.period-day.signed {
  background: #fff1f5;
  border-color: rgba(191, 49, 88, .42);
  color: #bf3158;
}
.period-day small {
  font-size: 12px;
  color: #bf3158;
}
@media (max-width: 820px) {
  .period-weekdays, .period-calendar { gap: 5px; }
  .period-day { min-height: 54px; padding: 5px; }
  .period-day small { display: none; }
}
.wish-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.wish-time {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.icon-btn.pin { color: #bf3158; }

