
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');

:root {
  --cream: #faf7f2;
  --paper: #fffdf9;
  --beige: #eee5d9;
  --taupe: #b9a797;
  --brown: #59483e;
  --muted: #89796d;
  --line: #e9e0d5;
  --rose: #ead9d2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
}

button, input, textarea, select {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible,
input:focus-visible, textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--taupe);
  outline-offset: 3px;
}

.topbar {
  min-height: 76px;
  padding: 18px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--brown);
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
}

.brand span, footer span {
  color: #bd887d;
}

.top-note, .eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.top-note {
  color: var(--muted);
  margin: 0;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 6%;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 88px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: #a18170;
  margin: 0 0 16px;
}

h1, h2, .feature-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.13;
  letter-spacing: -2px;
  margin: 0;
}

h1 span {
  color: #ae9180;
  font-style: italic;
}

.intro {
  max-width: 430px;
  color: var(--muted);
  font-size: 15px;
  margin: 22px 0 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.primary-btn {
  background: var(--brown);
  color: white;
  border: 1px solid var(--brown);
  border-radius: 4px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.primary-btn:hover {
  background: #756052;
  transform: translateY(-1px);
}

.text-link {
  color: var(--brown);
  text-decoration: none;
  font-size: 13px;
}

.text-link:hover {
  text-decoration: underline;
}

.hero-decoration {
  position: absolute;
  right: 4%;
  top: 30%;
  width: 205px;
  height: 205px;
  border: 1px solid #ded0c1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c1a997;
  font-family: "Playfair Display", serif;
  font-size: 47px;
  letter-spacing: 5px;
  transform: rotate(-10deg);
}

.hero-decoration span {
  color: #bd887d;
  font-size: 25px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: "Playfair Display", serif;
  font-size: 30px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.world-section, .recent-section {
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2, .dialog-heading h2 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -.6px;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

.section-note {
  font-size: 12px;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 225px;
  text-align: left;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--brown);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 25px #59483e0d;
}

.food { background: #f0e6da; }
.movies { background: #eee7e8; }
.dates { background: #e8e9df; }
.memories { background: #f0e5dc; }

.feature-icon {
  font-size: 25px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 25px;
}

.feature-description {
  color: #77675b;
  font-size: 12px;
  margin-top: 7px;
}

.feature-link {
  margin-top: auto;
  padding-top: 22px;
  font-size: 11px;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 42px 15px;
  border: 1px dashed #d9cbbd;
  border-radius: 5px;
}

.empty-state > span {
  font-size: 30px;
  color: #bd887d;
}

.empty-state p {
  margin: 7px 0;
  font-family: "Playfair Display", serif;
  font-size: 22px;
}

.empty-state .empty-subtitle {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--muted);
}

.memory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.memory-card {
  background: var(--paper);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow-wrap: anywhere;
}

.memory-card .memory-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #a18170;
  font-weight: 700;
}

.memory-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 23px;
  margin: 8px 0;
  font-weight: 500;
}

.memory-card p {
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
}

.memory-meta {
  font-size: 11px;
  color: #a18170;
}

footer {
  text-align: center;
  padding: 34px 0;
  font-family: "Playfair Display", serif;
}

footer p {
  margin: 4px 0;
}

.footer-note {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  color: var(--muted);
}

dialog {
  width: min(92%, 480px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--brown);
}

dialog::backdrop {
  background: #34271f80;
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 25px;
}

.dialog-heading h2 {
  font-size: 29px;
}

.close-btn {
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
}

#entry-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 15px 0 6px;
}

#entry-form input, #entry-form textarea,
#entry-form select {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
  color: var(--brown);
}

#entry-form textarea {
  resize: vertical;
}

.submit-btn {
  width: 100%;
  margin-top: 22px;
}

.form-footnote {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--brown);
  color: white;
  padding: 12px 18px;
  border-radius: 4px;
  font-size: 13px;
  transition: .2s;
  max-width: 90%;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 650px) {
  .topbar {
    padding: 15px 5%;
  }

  .top-note {
    font-size: 8px;
    letter-spacing: 1px;
    max-width: 130px;
    text-align: right;
  }

  main {
    padding: 0 5%;
  }

  .hero {
    padding: 68px 0 55px;
  }

  h1 {
    font-size: 43px;
    letter-spacing: -1px;
  }

  .hero-decoration {
    position: relative;
    top: auto;
    right: auto;
    margin: 40px auto 0;
    width: 130px;
    height: 130px;
    font-size: 32px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .section-note {
    margin-bottom: 0;
  }

  .feature-grid, .memory-list {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 195px;
  }

  .world-section, .recent-section {
    padding: 48px 0;
  }
}
.auth-panel {
  width: min(420px, calc(100% - 40px));
  margin: 70px auto;
  padding: 32px;
  background: #fffdf9;
  border: 1px solid #e8dfd4;
  border-radius: 18px;
}

.auth-panel h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 12px 0;
}

.auth-panel > p:not(.eyebrow) {
  color: #756b62;
  line-height: 1.6;
}

#login-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

#login-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #ded4c8;
  border-radius: 8px;
  font: inherit;
}

#login-button {
  width: 100%;
  margin-top: 8px;
}

#login-message {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

[hidden] {
  display: none !important;
}


.memory-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}


.memory-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
}

.edit-btn,
.delete-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #ded4c8;
  border-radius: 8px;
  background: #fffdf9;
  color: #625449;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.edit-btn:hover,
.delete-btn:hover {
  background: #f3ece3;
}

