@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/be-vietnam-pro-400.ttf) format("truetype");
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/be-vietnam-pro-500.ttf) format("truetype");
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/literata-italic-400.ttf) format("truetype");
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/literata-400.ttf) format("truetype");
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/literata-500.ttf) format("truetype");
}

:root {
  --paper: #f5f0e7;
  --sheet: #fffcf6;
  --ink: #342b28;
  --muted: #82756c;
  --accent: #843f4e;
  --accent-dark: #6e2d3c;
  --rose: #efe2df;
  --line: #dcd0c2;
  --green: #4d6957;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", Arial, sans-serif;
  --shadow: 0 4px 16px #49342a08;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23af9f89' opacity='.2' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 4px;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
svg.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  background: var(--sheet);
  padding: 10px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
:focus-visible {
  outline: 3px solid #b77a85;
  outline-offset: 4px;
}
::selection {
  background: #ead3d5;
  color: var(--accent-dark);
}
.site-header {
  max-width: 1100px;
  margin: auto;
  padding: 28px 38px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  color: var(--ink);
  display: flex;
  gap: 13px;
  align-items: center;
  line-height: 1.25;
  font: 500 23px/1.3 var(--serif);
  letter-spacing: -0.7px;
}
.brand:hover {
  text-decoration: none;
}
.brand em {
  font-weight: 400;
}
.brand-mark {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
  color: var(--accent);
  transform: rotate(12deg);
}
.brand small {
  display: block;
  font: 500 8px/1.6 var(--sans);
  letter-spacing: 2px;
  margin-top: 6px;
  color: var(--muted);
}
.header-note {
  font: italic 13px var(--serif);
  color: var(--muted);
}
.profile-menu {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.profile-avatar {
  background: var(--rose);
  border: 1px solid #e0c9c9;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 14px var(--serif);
  overflow: hidden;
  white-space: nowrap;
  padding: 5px;
}
.profile-menu-label {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-menu .icon {
  width: 18px;
  height: 18px;
}
.main-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 46px 38px 140px;
  min-height: 70vh;
}
.main-content:focus {
  outline: none;
}
.locked-content {
  max-width: 1000px;
  padding-bottom: 60px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 14px;
  letter-spacing: -0.7px;
}
h1 {
  font-size: 38px;
}
h2 {
  font-size: 27px;
}
h3 {
  font-size: 21px;
}
h4 {
  font-size: 18px;
}
p {
  margin: 0 0 16px;
}
small,
.small {
  font-size: 12px;
}
.eyebrow,
.kicker {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}
.muted,
.meta,
.help,
.hint {
  color: var(--muted);
  font-size: 12px;
}
.meta {
  margin-top: 12px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 0 0 32px;
}
.page-header h1 {
  margin-bottom: 8px;
}
.page-header p {
  margin-bottom: 0;
  color: var(--muted);
}
.page-actions,
.actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 32px 0 20px;
}
.section-header h2,
.section-header h3 {
  margin: 0;
}
.back-link {
  display: inline-block;
  font-size: 12px;
  margin-bottom: 24px;
}
.divider,
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
button,
.button,
.btn,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fffaf4;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.18s,
    transform 0.18s;
}
button:hover,
.button:hover,
.btn:hover {
  background: var(--accent-dark);
  color: #fffaf4;
  text-decoration: none;
}
button:active,
.button:active {
  transform: translateY(1px);
}
button.secondary,
.button.secondary,
.btn.secondary,
.secondary-button {
  background: transparent;
  color: var(--accent);
  border-color: #c9a7ac;
}
button.secondary:hover,
.button.secondary:hover {
  background: var(--rose);
}
button.ghost,
.button.ghost,
.btn.ghost,
.text-button {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding-left: 4px;
  padding-right: 4px;
}
button.danger,
.button.danger {
  background: #9a4545;
  border-color: #9a4545;
}
button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.button.full,
.full-width,
.submit-button {
  width: 100%;
}
.icon-button {
  width: 42px;
  height: 42px;
  padding: 8px;
  min-height: 42px;
  border-radius: 50%;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 8px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  background: #fffdfa;
  color: var(--ink);
  outline: none;
  font-size: 13px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.85;
}
input::placeholder,
textarea::placeholder {
  color: #a2978c;
  font-weight: 400;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #ad7782;
  box-shadow: 0 0 0 3px #843f4e0a;
}
input[type="checkbox"],
input[type="radio"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  vertical-align: middle;
  margin-right: 9px;
  flex-shrink: 0;
}
input[type="file"] {
  font-size: 11px !important;
}
input[type="file"]::file-selector-button {
  padding: 6px 12px;
  background: var(--rose);
  border: 0;
  border-radius: 4px;
  color: var(--accent);
  margin-right: 12px;
  cursor: pointer;
}
.form-stack {
  display: grid;
  gap: 22px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.form-group,
.field {
  margin-bottom: 22px;
}
.field:last-child {
  margin-bottom: 0;
}
.form-help {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.checkbox-label,
.check-row {
  display: flex;
  align-items: center;
  font-weight: 400;
  gap: 4px;
}
.search-form,
.filter-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.search-form > div,
.filter-form > div {
  flex: 1;
  min-width: 140px;
}
.search-form label {
  font-size: 11px;
}
.notice,
.alert,
.error,
.success {
  padding: 13px 16px;
  border-radius: 7px;
  background: var(--rose);
  color: var(--accent);
  font-size: 12px;
  margin: 0 0 24px;
  border: 1px solid #e1cdd0;
}
.success {
  color: var(--green);
  background: #edf0e7;
  border-color: #d4ddce;
}
.error {
  background: #f5e6e2;
  color: #9b4039;
  border-color: #e7c8c1;
}
.field-error {
  color: #9b4039;
  font-size: 11px;
  margin-top: 7px;
}
.card,
.panel {
  padding: 26px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.memory-grid,
.album-grid,
.wish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.polaroid {
  display: block;
  background: #fffefa;
  padding: 10px 10px 18px;
  border: 1px solid #e0d4c6;
  box-shadow: 0 3px 8px #46352408;
  border-radius: 3px;
  color: var(--ink);
  margin: 0;
  position: relative;
}
.polaroid:hover {
  text-decoration: none;
}
.polaroid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.polaroid figcaption,
.polaroid .caption {
  font: italic 19px/1.55 var(--serif);
  padding: 14px 7px 0;
  letter-spacing: -0.3px;
}
.memory-card,
.album-card,
.wish-card {
  min-width: 0;
}
.memory-card > a,
.album-card > a {
  color: var(--ink);
}
.memory-card > a:hover,
.album-card > a:hover {
  text-decoration: none;
}
.memory-card img,
.album-card img,
.wish-card > img {
  object-fit: cover;
  aspect-ratio: 4/3;
  width: 100%;
  border-radius: 3px;
}
.memory-card h2,
.album-card h2,
.wish-card h2 {
  font-size: 22px;
  margin: 16px 0 5px;
}
.memory-card .meta,
.album-card .meta {
  margin-top: 8px;
}
.card-title {
  font-size: 22px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
}
.photo-grid a {
  min-width: 0;
}
.empty-state {
  text-align: center;
  border: 1px dashed #cfc0af;
  border-radius: var(--radius);
  padding: 68px 28px;
  background: #fffcf660;
  position: relative;
  max-width: 100%;
  margin: 28px auto;
}
.empty-state::before {
  content: "✳︎";
  display: block;
  color: #b18c8d;
  font:
    40px/1 Georgia,
    serif;
  margin-bottom: 22px;
}
.empty-state h2 {
  font-size: 28px;
}
.empty-state p {
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto 25px;
  font-size: 13px;
}
.empty-state .button {
  margin-top: 4px;
}
.upload-zone {
  display: block;
  border: 1px dashed #c7ad9d;
  background: #f8f2e8;
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}
.upload-zone p {
  color: var(--muted);
  font-size: 12px;
}
.tag,
.badge,
.status {
  display: inline-flex;
  border-radius: 4px;
  background: var(--rose);
  color: var(--accent);
  padding: 3px 9px;
  font-size: 10px;
  letter-spacing: 0.2px;
}
.date {
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}
.empty-photo,
.photo-placeholder {
  aspect-ratio: 4/3;
  background: #ece5d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font: italic 19px var(--serif);
  color: #ab9989;
  border-radius: 3px;
}
.photo-placeholder::before {
  content: "✳︎";
  font:
    38px Georgia,
    serif;
  color: #bfa99b;
}
.memory-body,
.story-text {
  white-space: pre-wrap;
  line-height: 1.95;
}
.detail-hero {
  margin: 0 0 28px;
}
.detail-hero img {
  width: 100%;
  max-height: 550px;
  object-fit: cover;
}
.memory-detail {
  max-width: 720px;
  margin: auto;
}
.replies,
.comments {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-top: 26px;
}
.reply,
.comment {
  padding: 0 0 20px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.reply:last-child {
  border: 0;
}
.reply .author,
.comment .author {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.reply-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.reply-form textarea {
  min-height: 65px;
}
.reply-form button {
  flex-shrink: 0;
}
.wish-card .actions {
  margin-top: 24px;
}
.wish-card p {
  font-size: 13px;
  color: var(--muted);
}
.settings-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sheet);
}
.setting-row {
  padding: 23px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child {
  border-bottom: 0;
}
.setting-row h2,
.setting-row h3 {
  font-size: 20px;
  margin: 0 0 4px;
}
.setting-row p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.setting-row form {
  margin: 0;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.status-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.status-card .value {
  font: 24px var(--serif);
  margin: 12px 0;
}
.narrow {
  max-width: 640px;
  margin-inline: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
details {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
}
details[open] > summary {
  margin-bottom: 20px;
}
.auth-shell {
  max-width: 440px;
  margin: 23px auto;
}
.auth-card {
  background: var(--sheet);
  padding: 38px 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 40px #503b2906;
  position: relative;
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: #d8c9b8;
  left: calc(50% - 22px);
  top: 15px;
}
.auth-card h1 {
  font-size: 32px;
  margin-bottom: 15px;
}
.auth-card > p {
  font-size: 13px;
  color: var(--muted);
}
.auth-card .form-stack {
  margin-top: 26px;
}
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 30px;
}
.auth-step {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 10px;
  color: var(--muted);
}
.auth-step.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--sheet);
}
.auth-step.complete {
  background: var(--rose);
  color: var(--accent);
  border-color: #d5b7bc;
}
.auth-step-line {
  width: 35px;
  height: 1px;
  background: var(--line);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.profile-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font: 26px var(--serif);
  color: var(--accent);
  cursor: pointer;
  position: relative;
}
.profile-choice:has(input:checked) {
  background: var(--rose);
  border-color: var(--accent);
}
.profile-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.pin-input,
.otp-input {
  letter-spacing: 0.55em;
  text-align: center;
  font-size: 23px !important;
  padding-left: 24px !important;
  font-variant-numeric: tabular-nums;
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.pin-pad button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 23px var(--serif);
  min-height: 49px;
}
.pin-pad button:hover {
  background: var(--rose);
}
.auth-card .button,
.auth-card button[type="submit"] {
  width: 100%;
}
.lock-illustration {
  font: 56px var(--serif);
  color: #b08b86;
  margin: 0 0 20px;
  text-align: center;
}
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 360px;
  max-width: calc(100% - 32px);
  padding: 10px 12px 8px;
  background: #fffcf6f2;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 32px #46332310;
  z-index: 20;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  padding: 5px 10px;
  border-radius: 8px;
  position: relative;
}
.bottom-nav a:hover {
  background: #f3ece5;
  text-decoration: none;
}
.bottom-nav a[aria-current="page"] {
  color: var(--accent);
  background: #f4e9e6;
  font-weight: 600;
}
.bottom-nav .icon {
  width: 21px;
  height: 21px;
}
.bottom-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}
@media (min-width: 1100px) {
  .album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .main-content {
    padding-top: 52px;
  }
  .memory-grid {
    gap: 36px;
  }
  .memory-grid > .memory-card:nth-child(3n + 2) .polaroid {
    transform: rotate(1deg);
  }
  .memory-grid > .memory-card:nth-child(3n + 1) .polaroid {
    transform: rotate(-0.6deg);
  }
}
@media (max-width: 650px) {
  body {
    font-size: 13px;
  }
  .site-header {
    padding: 21px 22px 20px;
    margin: 0 18px;
    padding-left: 0;
    padding-right: 0;
    gap: 12px;
  }
  .brand {
    font-size: 20px;
    gap: 10px;
  }
  .brand-mark {
    font-size: 33px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1.7px;
  }
  .header-note {
    display: none;
  }
  .profile-menu-label {
    display: none;
  }
  .profile-menu {
    gap: 8px;
  }
  .profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .profile-menu .icon {
    width: 17px;
    height: 17px;
  }
  .main-content {
    padding: 32px 22px 125px;
  }
  .locked-content {
    padding: 28px 22px 45px;
  }
  h1 {
    font-size: 31px;
  }
  h2 {
    font-size: 25px;
  }
  h3 {
    font-size: 20px;
  }
  .page-header {
    margin-bottom: 27px;
    align-items: flex-start;
    gap: 15px;
  }
  .page-header .eyebrow {
    margin-bottom: 10px;
  }
  .page-header h1 {
    font-size: 30px;
  }
  .page-header p {
    font-size: 12px;
  }
  .page-header > .button,
  .page-header > .btn {
    min-height: 39px;
    padding: 8px 12px;
    font-size: 11px;
    margin-top: 3px;
    flex-shrink: 0;
  }
  .memory-grid,
  .wish-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .album-grid {
    gap: 22px 15px;
  }
  .album-card h2 {
    font-size: 18px;
    letter-spacing: -0.4px;
    margin-top: 12px;
  }
  .album-card .meta {
    font-size: 10px;
  }
  .polaroid {
    padding: 8px 8px 15px;
  }
  .polaroid figcaption,
  .polaroid .caption {
    font-size: 19px;
    padding: 12px 6px 0;
  }
  .card,
  .panel {
    padding: 22px;
  }
  .form-row {
    gap: 17px;
    grid-template-columns: 1fr;
  }
  .empty-state {
    padding: 51px 24px;
    margin: 20px auto;
  }
  .empty-state h2 {
    font-size: 25px;
  }
  .empty-state p {
    font-size: 12px;
  }
  .auth-shell {
    margin: 15px auto;
  }
  .auth-card {
    padding: 38px 25px 28px;
  }
  .auth-card h1 {
    font-size: 29px;
  }
  .auth-steps {
    margin-bottom: 26px;
  }
  .auth-footer {
    font-size: 10px;
    margin-top: 20px;
  }
  .bottom-nav {
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 340px;
    max-width: calc(100% - 32px);
    padding: 8px 10px 7px;
    border-radius: 13px;
  }
  .bottom-nav a {
    padding: 5px 10px;
    font-size: 10px;
  }
  .setting-row {
    padding: 21px 19px;
    gap: 12px;
    align-items: flex-start;
  }
  .setting-row h2,
  .setting-row h3 {
    font-size: 19px;
  }
  .setting-row button {
    padding: 8px 12px;
    min-height: 39px;
    font-size: 11px;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .photo-grid {
    gap: 8px;
  }
  .search-form,
  .filter-form {
    gap: 10px;
  }
  .search-form > div,
  .filter-form > div {
    min-width: 120px;
  }
  .reply-form {
    flex-wrap: wrap;
  }
  .reply-form textarea {
    flex-basis: 100%;
  }
  .reply-form button {
    margin-left: auto;
  }
  .detail-hero {
    margin-left: -22px;
    margin-right: -22px;
  }
  .detail-hero img {
    border-radius: 0;
  }
  .button-row {
    gap: 10px;
  }
  .button-row > * {
    flex: 1;
  }
  .notice,
  .alert,
  .error,
  .success {
    font-size: 11px;
    padding: 12px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
[hidden] {
  display: none !important;
}
/* A photograph on a page, with the date written beneath it. */
.memory-card.card {
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}
.memory-card .card-body {
  padding: 16px 8px 0;
}
.memory-card .card-body h2 {
  margin-top: 0;
}
.memory-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4/3;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #eee5d8, #f9f4ea);
  color: #b29486;
  font: 45px var(--serif);
  border-radius: 3px;
}
.memory-placeholder:hover {
  text-decoration: none;
  background: #eee3d8;
}
.memory-grid > .empty-state,
.album-grid > .empty-state,
.wish-grid > .empty-state {
  grid-column: 1/-1;
  width: 100%;
}
.empty-state > .empty-icon,
.empty-state > .empty-symbol {
  display: none;
}
.memory-grid > .empty-state {
  margin-top: 0;
}
.panel.form-row {
  margin-bottom: 30px;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 16px;
  padding: 20px;
}
.panel.form-row label {
  margin: 0;
}
.panel.form-row > a {
  font-size: 11px;
  align-self: center;
  white-space: nowrap;
}
.notice {
  display: block;
}
.panel + .memory-grid {
  margin-top: 28px;
}
.wish-decoration {
  font: 55px var(--serif);
  color: #b89991;
  min-height: 125px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f2e8df, #faf5ec);
  margin: -26px -26px 23px;
  border-radius: 11px 11px 0 0;
}
.wish-grid {
  margin-bottom: 38px;
}
#new-wish {
  max-width: 640px;
  margin: 36px auto 0;
}
#new-wish h2 {
  margin-bottom: 24px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  margin: 0;
}
legend {
  padding: 0 8px;
  font-size: 11px;
  color: var(--muted);
}
dialog {
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  box-shadow: 0 20px 80px #24171025;
}
dialog::backdrop {
  background: #342b2866;
  backdrop-filter: blur(3px);
}
dialog .page-header {
  align-items: center;
  margin-bottom: 10px;
}
dialog .page-header h2 {
  margin: 0;
}
.scene-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.scene-choice:last-child {
  border-bottom: 0;
}
.scene-choice small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.scene-choice strong {
  font-weight: 500;
}
body.session-locked::after {
  content: "Đang khóa nhật ký…";
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--paper);
  color: var(--accent);
  display: grid;
  place-items: center;
  font: 22px var(--serif);
}
@media (max-width: 650px) {
  .panel.form-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 17px;
  }
  .panel.form-row > a {
    text-align: center;
  }
  .wish-decoration {
    margin: -22px -22px 22px;
  }
  .memory-card .card-body {
    padding-top: 17px;
  }
  .memory-card h2 {
    font-size: 23px;
  }
  .page-header:has(h1) + .panel.form-row {
    margin-top: -4px;
  }
  dialog {
    padding: 24px;
  }
  fieldset {
    padding: 14px;
  }
  .album-grid > .empty-state {
    margin-top: 0;
  }
}
.story-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: -14px -14px 24px;
}
.story-gallery:has(> a:only-child) {
  grid-template-columns: 1fr;
}
.story-gallery:empty {
  display: none;
}
.story-photo {
  width: 100%;
  height: 100%;
  max-height: 600px;
  object-fit: cover;
  border-radius: 4px;
}
.story-body {
  font-size: 15px;
  line-height: 2;
  padding: 0 5px;
}
.story-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin: 22px 0;
}
.story-actions p {
  margin: 0;
}
.story ~ .panel {
  margin-top: 24px;
}
.story ~ #replies {
  margin-top: 24px;
}
.wish-image {
  border-radius: 4px !important;
}
.wish-card .card-body h2 {
  margin-top: 0;
}
.wish-card:has(.wish-image) .card-body h2 {
  margin-top: 18px;
}
.wish-card .card-body > p:last-child {
  margin-bottom: 0;
}
.settings-page > h1 {
  margin-bottom: 12px;
}
@media (max-width: 650px) {
  .story-gallery {
    gap: 8px;
    margin: -12px -12px 22px;
  }
  .story-body {
    font-size: 14px;
    padding: 0;
  }
  .story-actions {
    gap: 12px;
  }
  .story-actions button {
    min-height: 40px;
    padding: 9px 13px;
  }
  .story-actions p {
    font-size: 11px;
  }
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.page-header .eyebrow {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.8px;
}
@media (max-width: 650px) {
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .page-header .eyebrow {
    font-size: 9px;
    line-height: 1.7;
    letter-spacing: 1.5px;
  }
  .empty-state {
    padding: 38px 23px;
  }
  .empty-state h2 {
    font-size: 23px;
  }
  .empty-state::before {
    margin-bottom: 18px;
  }
  .empty-state p {
    margin-bottom: 20px;
  }
  .empty-state .button {
    font-size: 11px;
  }
}

.journal-filters { margin: 0 0 1.5rem; }
.journal-filters > summary { cursor: pointer; color: var(--accent); }
.journal-filters[open] > summary { margin-bottom: .75rem; }
.entry-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.empty-state::before,.photo-placeholder::before {content:"";width:36px;height:36px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23843f4e' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M20 4v32M4 20h32M9 9l22 22M9 31 31 9'/%3E%3Ccircle cx='20' cy='20' r='3' fill='%23843f4e'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;opacity:.62;margin:0 auto 22px;}
.auth-intro .auth-flower{font-size:0;width:95px;height:95px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23843f4e' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M20 4v32M4 20h32M9 9l22 22M9 31 31 9'/%3E%3Ccircle cx='20' cy='20' r='3' fill='%23843f4e'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;opacity:.65;}
