@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --cream: #fffaf7;
  --paper: #ffffff;
  --pink: #d986a0;
  --pink-dark: #bd6985;
  --pink-light: #fbeaf0;
  --text: #493b40;
  --muted: #9b8990;
  --border: #f1e5e8;
  --shadow: 0 12px 38px rgba(130, 77, 94, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; }
.pink { color: var(--pink-dark); }
.muted { color: var(--muted); line-height: 1.7; }
.eyebrow { color: var(--pink-dark); font-size: 10px; font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; }
.primary-btn {
  border: 0; border-radius: 12px; background: var(--pink-dark); color: white;
  padding: 13px 20px; font-weight: 700; transition: .2s; box-shadow: 0 6px 15px #bd698526;
}
.primary-btn:hover { background: #a95270; transform: translateY(-1px); }
.primary-btn span { margin-left: 7px; }

.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at 15% 15%, #f9e4eb 0, transparent 42%),
              radial-gradient(ellipse at 85% 85%, #f7e8df 0, transparent 42%), var(--cream);
}
.login-card {
  width: min(100%, 420px); background: #ffffffed; border: 1px solid white;
  border-radius: 26px; padding: 46px 42px; text-align: center; box-shadow: var(--shadow);
  animation: rise .6s ease both;
}
.heart-mark { font-size: 38px; color: var(--pink); margin-bottom: 10px; }
.login-card h1 { font-size: 43px; margin: 0 0 10px; }
.login-card > .muted { font-size: 13px; margin-bottom: 30px; }
.login-form { display: grid; gap: 11px; text-align: left; }
.login-form label { font-size: 12px; font-weight: 700; margin-top: 6px; }
.login-form input, .login-form select, .journal-form input, .journal-form textarea,
.upload-form input[type=text] {
  width: 100%; border: 1px solid var(--border); border-radius: 11px; background: #fffdfd;
  padding: 13px 14px; color: var(--text); outline: none; transition: .2s;
}
.login-form input:focus, .login-form select:focus, .journal-form input:focus,
.journal-form textarea:focus, .upload-form input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px #d986a01a; }
.login-form .primary-btn { margin-top: 12px; }
.login-foot { font-size: 11px; color: var(--muted); margin: 25px 0 0; }
.error { padding: 11px; margin-bottom: 16px; border-radius: 10px; color: #a33d56; background: #fff0f2; font-size: 13px; }

.app-shell { min-height: 100vh; }
.sidebar {
  width: 245px; position: fixed; inset: 0 auto 0 0; background: #fff;
  border-right: 1px solid var(--border); padding: 30px 20px; display: flex; flex-direction: column; z-index: 5;
}
.brand { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--pink-dark); display: flex; align-items: center; gap: 9px; margin: 0 0 55px 8px; }
.brand span { color: var(--text); }
.side-label { font-size: 9px; letter-spacing: 2px; color: #b7a5ac; font-weight: 700; padding-left: 12px; margin-bottom: 14px; }
.nav-link { display: flex; gap: 13px; align-items: center; padding: 13px 14px; margin: 3px 0; border-radius: 11px; color: #907d85; font-size: 13px; transition: .2s; }
.nav-link:hover, .nav-link.active { color: var(--pink-dark); background: var(--pink-light); }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: 18px; }
.signed-in { font-size: 11px; color: var(--muted); margin-bottom: 15px; }
.signed-in strong { color: var(--text); }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #82b99b; margin-right: 5px; }
.logout-btn { background: none; border: 0; color: #a48e97; padding: 7px 0; font-size: 12px; }
.logout-btn:hover { color: var(--pink-dark); }

.main-content { max-width: 1250px; margin-left: 245px; padding: 42px 55px 30px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.topbar h2 { font-size: 29px; margin-bottom: 6px; }
.topbar .muted { margin: 0; font-size: 13px; }
.top-heart { color: var(--pink); font-size: 34px; }

.hero-card {
  position: relative; overflow: hidden; border-radius: 23px; padding: 38px 40px 30px;
  background: linear-gradient(120deg, #f9e4eb, #fff0ed 65%, #f8e9df); box-shadow: var(--shadow);
}
.hero-card::after { content: '♡'; position: absolute; right: 8%; top: 8px; font-size: 175px; color: #ffffff55; transform: rotate(12deg); pointer-events: none; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h1 { font-size: clamp(37px, 5vw, 54px); margin: 6px 0; color: #654b55; }
.hero-copy { color: #977b86; font-size: 13px; margin-bottom: 17px; }
.date-line { display: inline-block; border: 1px solid #dca9b955; border-radius: 30px; padding: 7px 12px; font-size: 11px; color: #96677b; margin-bottom: 23px; }
.countdown { display: flex; flex-wrap: wrap; gap: 10px; }
.countdown div { min-width: 75px; padding: 12px 13px; background: #ffffffb8; border: 1px solid #ffffffa8; border-radius: 12px; text-align: center; }
.countdown strong { display: block; color: #805566; font-size: 24px; font-weight: 600; font-family: 'Playfair Display', serif; font-variant-numeric: tabular-nums; }
.countdown span { display: block; color: #a18490; font-size: 9px; margin-top: 3px; text-transform: uppercase; letter-spacing: 1px; }
.countdown-note { margin: 17px 0 0; color: #a17d8d; font-family: 'Playfair Display', serif; font-style: italic; font-size: 13px; }
.countdown-note span { color: var(--pink-dark); }

.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 16px; }
.section-heading h3 { font-size: 22px; margin: 0; }
.section-heading .eyebrow { margin-bottom: 5px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature-card, .write-card, .upload-card, .entry-card, .photo-card, .empty-state {
  background: var(--paper); border: 1px solid var(--border); border-radius: 17px; box-shadow: var(--shadow);
}
.feature-card { display: flex; align-items: flex-start; gap: 16px; padding: 23px; transition: .2s; }
.feature-card:hover { transform: translateY(-3px); border-color: #e6c3cf; }
.feature-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--pink-light); color: var(--pink-dark); font-size: 22px; flex-shrink: 0; }
.feature-card h3 { font-size: 18px; margin: 1px 0 7px; }
.feature-card p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 13px; }
.feature-count { font-size: 11px; color: var(--pink-dark); font-weight: 700; }
.page-footer { text-align: center; padding: 40px 0 15px; font-family: 'Playfair Display', serif; font-size: 12px; font-style: italic; color: #b49da6; }

.write-card, .upload-card { padding: 26px; margin-top: 24px; }
.write-card h3, .upload-card h3 { font-size: 21px; margin-bottom: 16px; }
.journal-form { display: grid; gap: 12px; }
.journal-form textarea { resize: vertical; min-height: 145px; line-height: 1.7; }
.journal-form .primary-btn { justify-self: start; }
.count-pill { background: var(--pink-light); color: var(--pink-dark); padding: 5px 11px; border-radius: 30px; font-size: 11px; }
.empty-state { padding: 45px 20px; text-align: center; margin-top: 18px; }
.empty-heart { color: var(--pink); font-size: 34px; margin-bottom: 8px; }
.empty-state h3 { margin-bottom: 7px; font-size: 20px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 0; }
.entries-list { display: grid; gap: 13px; }
.entry-card { padding: 22px; }
.entry-top { display: flex; align-items: flex-start; justify-content: space-between; }
.entry-top .eyebrow { font-size: 9px; letter-spacing: 1px; color: #b49ba5; }
.entry-top h3 { font-size: 19px; margin-bottom: 14px; }
.entry-content { color: #75636b; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.icon-btn { border: 0; border-radius: 8px; background: #fff1f4; color: #bd6985; width: 30px; height: 30px; font-size: 21px; line-height: 1; }
.icon-btn:hover { background: #f8dce5; }

.upload-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.upload-card h3 { margin-bottom: 6px; }
.upload-card .muted { font-size: 11px; margin: 0; }
.upload-form { display: grid; gap: 10px; min-width: 270px; }
.upload-form input[type=text] { padding: 10px 12px; font-size: 12px; }
.file-picker { display: block; border: 1px dashed #e5bac9; border-radius: 10px; padding: 11px; text-align: center; color: var(--pink-dark); font-size: 12px; cursor: pointer; background: #fff9fb; }
.file-picker input { display: block; width: 100%; margin-top: 8px; font-size: 10px; color: var(--muted); }
.upload-form .primary-btn { padding: 11px 15px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.photo-card { overflow: hidden; }
.photo-card > a { display: block; background: #f8edf0; }
.photo-card img { display: block; width: 100%; height: 210px; object-fit: cover; transition: .3s; }
.photo-card img:hover { transform: scale(1.025); }
.photo-info { padding: 13px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.photo-info p { font-size: 12px; margin: 0 0 5px; }
.photo-info span { font-size: 10px; color: var(--muted); }

.mobile-nav { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1050px) {
  .main-content { padding: 35px 30px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-card { align-items: flex-start; flex-direction: column; }
  .upload-form { width: 100%; }
}
@media (max-width: 700px) {
  .sidebar { display: none; }
  .main-content { margin: 0; padding: 27px 18px 100px; }
  .topbar { margin-bottom: 22px; }
  .topbar h2 { font-size: 25px; }
  .top-heart { font-size: 27px; }
  .hero-card { padding: 28px 21px 23px; border-radius: 18px; }
  .hero-card::after { font-size: 110px; right: 2%; }
  .hero-card h1 { font-size: 39px; }
  .countdown { gap: 7px; }
  .countdown div { min-width: calc(33.333% - 5px); flex: 1; padding: 10px 5px; }
  .countdown strong { font-size: 21px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 18px; }
  .section-heading h3 { font-size: 20px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-card img { height: 155px; }
  .photo-info { padding: 10px; }
  .photo-info p { font-size: 11px; }
  .login-card { padding: 38px 25px; }
  .mobile-nav {
    display: flex; position: fixed; z-index: 10; bottom: 0; left: 0; right: 0;
    justify-content: space-around; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #ffffffed; backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  }
  .mobile-nav a { display: grid; justify-items: center; gap: 3px; color: #a18c95; font-size: 19px; min-width: 65px; }
  .mobile-nav a span { font-size: 10px; }
  .mobile-nav a.active { color: var(--pink-dark); }
}
