:root{
  --burgundy:#5A2630;
  --burgundy-dark:#3e1a21;
  --ivory:#F8F4EE;
  --rose:#D8A7A7;
  --gold:#B89A62;
  --charcoal:#292626;
  --beige:#EDE5DA;
  --white:#fffdf9;
  --muted:#7b7070;
  --shadow:0 18px 50px rgba(61,38,38,.10);
  --radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--ivory);color:var(--charcoal);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.6}
a{color:inherit;text-decoration:none}
h1,h2,p{margin-top:0}
h1,h2{font-family:Georgia,"Times New Roman",serif;font-weight:500}
h1{font-size:clamp(2.6rem,7vw,5.4rem);line-height:1.02;letter-spacing:-.04em}
h2{font-size:1.7rem}
.topbar{height:74px;padding:0 5vw;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(90,38,48,.10);background:rgba(248,244,238,.92);backdrop-filter:blur(12px);position:sticky;top:0;z-index:10}
.brand{display:flex;align-items:center;gap:10px;font-family:Georgia,serif;font-size:1.2rem;color:var(--burgundy)}
.brand-mark{font-size:1.7rem}
.logout{font-size:.85rem;color:var(--muted)}
.page{width:min(1120px,90vw);margin:0 auto;padding:60px 0 90px}
.site-footer{text-align:center;padding:30px;color:var(--muted);font-size:.8rem}
.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:.7rem;color:var(--gold);font-weight:700;margin-bottom:14px}
.lead{font-size:1.15rem;color:var(--muted);max-width:620px}
.hero{padding:60px 0 70px}
.feature-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px}
.feature-card{min-height:220px;padding:30px;border-radius:var(--radius);background:var(--white);box-shadow:var(--shadow);display:flex;flex-direction:column;justify-content:flex-end;transition:transform .25s ease,box-shadow .25s ease}
.feature-card:hover{transform:translateY(-4px);box-shadow:0 24px 60px rgba(61,38,38,.14)}
.feature-card.large{min-height:320px;background:linear-gradient(145deg,var(--burgundy),var(--burgundy-dark));color:white}
.feature-card .icon{font-size:1.8rem;color:var(--rose);margin-bottom:auto}
.card-title{font-family:Georgia,serif;font-size:1.7rem}
.card-meta{font-size:.85rem;opacity:.72;margin-top:4px}
.split-section{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}
.paper-card,.quote-card,.empty-state{background:var(--white);border-radius:var(--radius);padding:34px;box-shadow:var(--shadow)}
.quote-card{background:var(--beige);display:flex;flex-direction:column;justify-content:center}
.quote-mark{font-family:Georgia,serif;font-size:5rem;line-height:.6;color:var(--rose)}
.quote-card p{font-family:Georgia,serif;font-size:2rem;line-height:1.2}
.text-link{color:var(--burgundy);font-weight:700;font-size:.9rem}
.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;background:var(--burgundy);color:white;padding:12px 20px;font-weight:700;cursor:pointer;font-size:.9rem}
.button:hover{background:var(--burgundy-dark)}
.auth-card{max-width:470px;margin:7vh auto 0;background:var(--white);padding:44px;border-radius:28px;box-shadow:var(--shadow)}
.form{display:flex;flex-direction:column;gap:20px}
.form label{display:flex;flex-direction:column;gap:7px;font-size:.85rem;font-weight:650}
input,textarea,select{font:inherit;border:1px solid rgba(90,38,48,.15);border-radius:14px;padding:13px 14px;background:#fffdfa;color:var(--charcoal);outline:none}
input:focus,textarea:focus,select:focus{border-color:var(--rose);box-shadow:0 0 0 3px rgba(216,167,167,.18)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.checkbox{flex-direction:row!important;align-items:center}
.checkbox input{width:18px;height:18px}
.alert{background:#f3d9d9;color:#6c2730;padding:12px 14px;border-radius:12px;margin:15px 0}
.section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:34px}
.memory-list{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.memory-card{background:var(--white);padding:28px;border-radius:var(--radius);box-shadow:var(--shadow)}
.memory-date{color:var(--gold);font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em}
.memory-location{color:var(--muted);font-size:.85rem;margin-bottom:16px}
.memory-footer{display:flex;justify-content:space-between;border-top:1px solid rgba(90,38,48,.1);padding-top:15px;color:var(--muted);font-size:.75rem}
.empty-state{text-align:center;padding:70px 30px}
.empty-icon{font-size:3rem;color:var(--rose)}
.form-page{max-width:760px;margin:auto}
.chat-window{background:var(--white);border-radius:var(--radius);box-shadow:var(--shadow);padding:25px;min-height:520px;display:flex;flex-direction:column;gap:10px}
.message{display:flex;flex-direction:column;max-width:75%}
.message.mine{align-self:flex-end;align-items:flex-end}
.message.theirs{align-self:flex-start}
.message-bubble{padding:12px 16px;border-radius:18px;background:var(--beige)}
.message.mine .message-bubble{background:var(--burgundy);color:white;border-bottom-right-radius:5px}
.message.theirs .message-bubble{border-bottom-left-radius:5px}
.message-time{font-size:.68rem;color:var(--muted);margin:3px 7px}
.chat-compose{display:flex;gap:10px;margin-top:15px}
.chat-compose input{flex:1}
.empty-chat{margin:auto;text-align:center;color:var(--muted)}
.empty-chat span{font-size:3rem;color:var(--rose)}
.date-list{display:flex;flex-direction:column;gap:14px}
.date-card{background:var(--white);padding:24px;border-radius:var(--radius);box-shadow:var(--shadow);display:flex;gap:20px;align-items:center}
.date-number{font-family:Georgia,serif;font-size:3rem;color:var(--burgundy);min-width:70px;text-align:center}
.date-card h2{margin-bottom:4px}
.date-card p{color:var(--muted);margin:0}
@media(max-width:760px){
  .page{padding-top:35px}
  .topbar{height:64px;padding:0 5vw}
  .feature-grid,.split-section,.memory-list{grid-template-columns:1fr}
  .feature-card.large{min-height:250px}
  .hero{padding:30px 0 40px}
  .section-heading{align-items:flex-start;flex-direction:column}
  .form-row{grid-template-columns:1fr}
  .auth-card{padding:30px;margin-top:4vh}
  .chat-window{min-height:60vh}
  .message{max-width:88%}
}
