:root {
  --bg: #f2f4ef;
  --surface: #ffffff;
  --ink: #151816;
  --muted: #68716c;
  --line: #d9dfda;
  --accent: #5b9834;
  --accent-strong: #3f7424;
  --coral: #f06450;
  --blue: #5068d9;
  --gold: #e8b94a;
  --paper: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 48px rgba(21, 24, 22, 0.09);
}

body.theme-dark {
  --bg: #0d100f;
  --surface: #171b19;
  --ink: #f0f4ef;
  --muted: #9ca7a1;
  --line: #303833;
  --accent: #8bc95f;
  --accent-strong: #a7df7d;
  --coral: #ff806d;
  --blue: #8798f2;
  --gold: #f0c85f;
  --paper: rgba(23, 27, 25, 0.94);
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

body {
  background: var(--bg);
  color: var(--ink);
  padding-top: calc(84px + env(safe-area-inset-top));
  font-family:
    "Segoe UI Variable", "Noto Sans SC", "Microsoft YaHei", Inter, system-ui,
    sans-serif;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  scrollbar-gutter: stable;
}

html.dialog-scroll-locked {
  overflow: hidden;
}

body.dialog-scroll-locked {
  overflow: hidden;
}

body.dialog-scroll-fixed {
  position: fixed;
}

body.theme-dark {
  background: var(--bg);
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

[hidden] {
  display: none !important;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 420px) minmax(180px, 1fr);
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  min-height: 76px;
  gap: 22px;
  padding: calc(14px + env(safe-area-inset-top)) clamp(18px, 4vw, 54px) 12px;
  border-bottom: 1px solid rgba(21, 24, 22, 0.09);
  background: rgba(242, 244, 239, 0.9);
  backdrop-filter: blur(20px) saturate(130%);
}

body.theme-dark .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(13, 16, 15, 0.9);
}

.brand {
  gap: 11px;
  justify-self: start;
  min-width: 0;
}

.brand-logo-wrap {
  display: grid;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(21, 24, 22, 0.12);
  border-radius: 8px;
  padding: 2px;
  background: #f2efe6;
}

.brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

body.theme-dark .brand-logo-wrap {
  border-color: rgba(255, 255, 255, 0.12);
  background: #f2efe6;
}

.brand strong {
  font-size: 16px;
  font-weight: 800;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-self: center;
  width: 100%;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  box-sizing: border-box;
}

body.theme-dark .main-nav {
  background: rgba(255, 255, 255, 0.04);
}

.main-nav button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  padding: 0 14px;
  white-space: nowrap;
}

.main-nav button:hover {
  color: var(--ink);
}

.main-nav button.active {
  border: 0;
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface), transparent 86%);
}

body.theme-dark .main-nav button.active {
  background: var(--accent);
  color: #0d100f;
}

.top-actions {
  justify-self: end;
  gap: 8px;
}

.icon-button,
.avatar-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

body.theme-dark .icon-button {
  background: rgba(255, 255, 255, 0.05);
}

.avatar-button {
  overflow: hidden;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.avatar-button img,
.family-member-avatar img,
.photo-comment-avatar img,
.notification-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notification-button {
  position: relative;
}

.notification-button > strong {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 9px;
  line-height: 1;
  padding: 0 4px;
}

.vip-badge {
  display: grid;
  min-width: 118px;
  min-height: 40px;
  align-content: center;
  justify-items: start;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--ink);
  padding: 4px 10px;
  line-height: 1.1;
  text-align: left;
}

.vip-badge span {
  max-width: 138px;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vip-badge small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

body.theme-dark .vip-badge {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--ink);
}

body.theme-dark .vip-badge span {
  color: color-mix(in srgb, var(--accent) 86%, #fff 14%);
}

.user-popover {
  top: 48px;
  width: 260px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(21, 24, 22, 0.18);
}

body.theme-dark .user-popover {
  background: #181d1a;
}

.xp-panel {
  display: grid;
  width: 100%;
  gap: 9px;
  border: 0;
  border-radius: 6px;
  background: rgba(50, 184, 150, 0.08);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.xp-panel:hover,
.overview-level:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.xp-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
}

.xp-head span {
  min-width: 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.xp-head strong {
  white-space: nowrap;
}

.overview-level strong {
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.12;
}

.xp-track {
  overflow: hidden;
  border: 0;
  border-radius: 999px;
}

.xp-track span {
  border-radius: inherit;
  background: var(--accent);
}

.user-popover button {
  border-radius: 6px;
}

.user-popover .rename-home-button {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.user-popover .account-secondary-button {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

body.theme-dark .user-popover .rename-home-button,
body.theme-dark .user-popover .account-secondary-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #f0f4ef;
}

.author-meta {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.thanks-page {
  display: grid;
  gap: 22px;
}

.thanks-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.thanks-head h2 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.95;
}

.thanks-head > p {
  max-width: 320px;
  color: var(--muted);
  line-height: 1.6;
}

.thanks-composer {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(18px, 4vw, 30px);
  box-shadow: var(--shadow);
}

.thanks-composer > label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.thanks-composer textarea {
  min-height: 108px;
  resize: vertical;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.55;
}

.thanks-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
}

.thanks-colors legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.thanks-colors label {
  position: relative;
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  padding: 0 12px;
}

.thanks-colors label::before {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--note-color);
  content: "";
}

.thanks-colors label.active {
  border-color: var(--note-color);
  box-shadow: inset 0 0 0 1px var(--note-color);
}

.thanks-colors input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.thanks-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.thanks-form-actions .status-line {
  margin-right: auto;
}

.thanks-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.thanks-note {
  position: relative;
  display: grid;
  min-height: 190px;
  align-content: space-between;
  gap: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--note-color);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 12px 34px rgba(21, 24, 22, 0.07);
}

.thanks-note::after {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border: 18px solid color-mix(in srgb, var(--note-color) 18%, transparent);
  border-radius: 50%;
  content: "";
}

.thanks-note-index {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.thanks-note > p {
  max-width: 92%;
  color: color-mix(in srgb, var(--note-color) 76%, #151816);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  white-space: pre-wrap;
}

body.theme-dark .thanks-note > p {
  color: color-mix(in srgb, var(--note-color) 62%, #ffffff);
}

.thanks-note footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.thanks-note footer > span:first-child {
  color: var(--ink);
  font-weight: 850;
}

.thanks-note-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.thanks-note-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
}

.family-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: clamp(22px, 5vw, 40px);
}

.family-dialog-head {
  display: grid;
  gap: 8px;
  padding-right: 36px;
}

.family-dialog-head h2 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
}

.family-dialog-head > p:last-child,
.family-summary small {
  color: var(--muted);
  line-height: 1.6;
}

.family-empty,
.family-content {
  margin-top: 24px;
}

.family-empty form,
.family-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.family-empty label,
.family-invite label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-left: 5px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  padding: 18px;
}

.family-summary div {
  display: grid;
  gap: 4px;
}

.family-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.family-summary strong {
  font-size: 25px;
}

.family-invite {
  margin-top: 18px;
}

.family-members {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.family-invitations {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.family-content .family-invitations {
  margin-top: 12px;
  margin-bottom: 0;
}

.family-invitation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  padding: 14px;
}

.family-invitation div {
  display: grid;
  gap: 3px;
}

.family-invitation span,
.family-invitation small {
  color: var(--muted);
  font-size: 11px;
}

.family-invitation strong {
  font-size: 17px;
}

.family-invitation-actions {
  display: flex !important;
  gap: 7px !important;
}

.family-invitation-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  padding: 0 12px;
}

.family-invitation-actions button:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d100f;
}

.family-member {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
}

.family-member-avatar,
.photo-comment-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 900;
}

.family-member-avatar,
.photo-comment-avatar,
.notification-avatar {
  overflow: hidden;
}

.family-member div {
  display: grid;
  gap: 3px;
}

.family-member small {
  color: var(--muted);
}

.family-member button {
  border: 1px solid rgba(240, 100, 80, 0.4);
  border-radius: 5px;
  background: transparent;
  color: var(--coral);
  padding: 8px 10px;
}

.photo-comments {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 22px 24px 26px;
}

.photo-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(7, 10, 8, 0.62);
  backdrop-filter: blur(8px);
}

#photoDialog {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(980px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  margin: 0;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(9, 13, 10, 0.28);
  overscroll-behavior: contain;
  transform: translate(-50%, -50%);
  z-index: 220;
}

#photoDialog::-webkit-scrollbar {
  display: none;
}

#photoDialog:not([open]) {
  display: none;
}

#photoDialog.no-comments-dialog {
  max-width: min(980px, calc(100vw - 32px));
}

#photoDialog.secret-image-dialog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1320px, 96vw);
  height: min(92dvh, 940px);
  max-height: none;
  overflow: hidden;
  margin: 0;
  transform: translate(-50%, -50%);
}

#photoDialog > .dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 84%, #070b08 16%);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(7, 11, 8, 0.16);
  backdrop-filter: blur(10px);
}

#photoDialog .dialog-media {
  display: grid;
  aspect-ratio: 16 / 10;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  max-height: min(56dvh, 560px);
  background: #0c0f0d;
  touch-action: pan-y;
  user-select: none;
}

#photoDialog .dialog-media img {
  width: 100%;
  height: 100%;
  max-height: min(56dvh, 560px);
  object-fit: contain;
  -webkit-user-drag: none;
}

#photoDialog .dialog-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
  padding: 10px 14px;
  scrollbar-width: none;
}

#photoDialog .dialog-thumbs::-webkit-scrollbar {
  display: none;
}

#photoDialog .dialog-thumbs button {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface), #000 8%);
  padding: 0;
}

#photoDialog .dialog-thumbs button.active {
  border-color: var(--accent);
}

#photoDialog .dialog-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#photoDialog > article {
  display: grid;
  min-height: 0;
  gap: 10px;
  overflow: visible;
  padding: 18px 22px;
}

#photoDialog > article h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

#dialogNote {
  max-width: 78ch;
  color: var(--muted);
  line-height: 1.72;
}

#photoDialog .photo-comments {
  min-height: 0;
  overflow: visible;
}

#photoDialog.secret-image-dialog > article {
  align-content: start;
  gap: 6px;
  padding: 14px 16px 16px;
}

#photoDialog.secret-image-dialog .dialog-media {
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  background: color-mix(in srgb, var(--bg), #000 12%);
  cursor: zoom-in;
}

#photoDialog.secret-image-dialog .dialog-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

#photoDialog.secret-image-dialog .dialog-thumbs,
#photoDialog.secret-image-dialog .photo-comments {
  display: none;
}

#photoDialog.secret-image-dialog #dialogTitle {
  font-size: clamp(18px, 2vw, 24px);
}

#photoDialog.secret-image-dialog #dialogMeta {
  font-size: 11px;
}

#photoDialog.secret-image-dialog #dialogNote {
  display: none;
}

#photoDialog.secret-image-dialog::backdrop {
  background: rgba(7, 10, 8, 0.72);
  backdrop-filter: blur(8px);
}

#photoDialog.secret-image-fullscreen {
  grid-template-columns: 1fr;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  transform: none;
}

#photoDialog.secret-image-fullscreen .dialog-media {
  cursor: zoom-out;
  height: 100dvh;
  max-height: none;
  aspect-ratio: auto;
  background: #050706;
}

#photoDialog.secret-image-fullscreen .dialog-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

#photoDialog.secret-image-fullscreen > article {
  display: none;
}

.dialog-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.dialog-random-button {
  width: fit-content;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, var(--line));
  border-radius: 6px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  color: #10200d;
  font-size: 13px;
  font-weight: 950;
  padding: 0 14px;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dialog-random-button[hidden] {
  display: none;
}

body.theme-dark .dialog-random-button {
  color: #f4fff0;
  background: color-mix(in srgb, var(--accent) 72%, #102314);
}

.dialog-random-button.secondary {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface), var(--accent) 10%);
  color: var(--ink);
  box-shadow: none;
}

.dialog-random-button:hover,
.dialog-random-button:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--ink);
  outline: 0;
  transform: translateY(-1px);
}

.photo-comments-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.photo-comments-head h3 {
  font-size: 24px;
}

.photo-comments-list {
  display: grid;
  gap: 10px;
}

.photo-comments-empty {
  color: var(--muted);
  font-size: 13px;
}

.photo-comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 12px;
}

.photo-comment-thread {
  margin-left: calc(var(--comment-depth) * 28px);
}

.photo-comment-thread .photo-comment-thread {
  border-left: 2px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  padding-left: 10px;
}

.photo-comment > div {
  display: grid;
  gap: 5px;
}

.photo-comment header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.photo-comment time {
  color: var(--muted);
  font-size: 11px;
}

.photo-comment p {
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
}

.reply-target {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 750;
}

.photo-comment-actions {
  display: flex;
  gap: 12px;
}

.photo-comment-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 0;
}

.photo-comment > button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

#photoCommentForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.comment-replying {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--muted);
  font-size: 12px;
  padding: 7px 10px;
}

.comment-replying[hidden] {
  display: none;
}

.comment-replying button {
  border: 0;
  background: transparent;
  color: var(--ink);
}

.avatar-picker {
  display: grid;
  width: 170px;
  justify-self: center;
  justify-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-picker img,
.avatar-picker > span {
  display: grid;
  width: 128px;
  height: 128px;
  overflow: hidden;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-size: 42px;
  font-weight: 900;
  object-fit: cover;
}

.avatar-picker img[hidden],
.avatar-picker > span[hidden] {
  display: none;
}

.notification-dialog {
  width: min(calc(100% - 28px), 620px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 24px;
}

.notification-dialog::backdrop {
  background: rgba(7, 10, 8, 0.72);
  backdrop-filter: blur(8px);
}

.notification-dialog > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.notification-dialog h2 {
  font-size: 34px;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px;
  text-align: left;
}

.notification-item.unread {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.notification-item.just-seen {
  border-color: color-mix(in srgb, var(--gold) 72%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%),
    color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: inset 4px 0 0 var(--gold);
}

.notification-item strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.notification-item strong em {
  border: 1px solid color-mix(in srgb, var(--gold) 70%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  padding: 2px 6px;
}

.notification-item > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.notification-item small,
.notification-item time {
  color: var(--muted);
  font-size: 11px;
}

.notification-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-weight: 900;
}

.notification-photo {
  width: 54px;
  height: 54px;
  border-radius: 5px;
  object-fit: cover;
}

#photoCommentForm input {
  min-width: 0;
}

#photoCommentForm button {
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 850;
  padding: 0 18px;
}

body.theme-dark #photoCommentForm button {
  background: var(--accent);
  color: #0d100f;
}

body.theme-dark #logoutButton {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

main {
  width: min(1320px, 100%);
  min-height: calc(100svh - 84px - env(safe-area-inset-top));
  box-sizing: border-box;
  padding: 22px clamp(16px, 4vw, 48px) 80px;
}

.hero {
  position: relative;
  min-height: clamp(240px, 24vw, 310px);
  align-items: end;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #5b9834;
  color: #f6f7ed;
  padding: clamp(28px, 5vw, 58px) clamp(24px, 6vw, 76px);
}

body.vip-member .hero {
  background: #5b9834;
}

.hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(270deg, rgba(5, 8, 5, 0.78) 0%, rgba(5, 8, 5, 0.35) 42%, transparent 70%),
    linear-gradient(0deg, rgba(5, 8, 5, 0.72) 0%, transparent 50%);
  content: "";
  pointer-events: none;
}

.hero-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  justify-self: end;
  max-width: 620px;
  gap: 15px;
  justify-items: end;
  text-align: right;
}

.hero .kicker {
  color: #b7e895;
}

.hero h1 {
  max-width: 720px;
  color: #f6f7ed;
  font-size: clamp(48px, 7vw, 86px);
  font-weight: 850;
  line-height: 0.94;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.38);
}

.hero h1.long-home-name {
  max-width: 560px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.hero p:last-of-type {
  max-width: 590px;
  color: rgba(246, 247, 237, 0.82);
  font-size: 17px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.hero-tags span {
  border: 1px solid rgba(183, 232, 149, 0.5);
  border-radius: 999px;
  background: rgba(12, 18, 11, 0.24);
  color: #d9f2c7;
  font-size: 12px;
  font-weight: 750;
  padding: 7px 12px;
  backdrop-filter: blur(8px);
}

.hero-cat {
  display: none;
}

.tool-dock {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow);
  padding: 10px;
  scrollbar-width: none;
  touch-action: pan-x;
}

.tool-dock::-webkit-scrollbar {
  display: none;
}

.food-wheel-section,
.anniversary-section {
  display: contents;
}

.tool-dock-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 178px;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(21, 24, 22, 0.06);
  padding: 10px 13px;
  user-select: none;
  touch-action: manipulation;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.tool-dock-button[hidden] {
  display: none;
}

.tool-dock-button:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 38px color-mix(in srgb, var(--accent) 24%, transparent);
  transform: translateY(-2px);
}

.tool-dock-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tool-dock-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tool-dock.sorting {
  overflow: visible;
  touch-action: none;
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 52%),
    color-mix(in srgb, var(--surface) 86%, transparent);
}

.tool-dock.sorting .tool-dock-button:not(.dragging) {
  opacity: 0.78;
}

.tool-dock-button.dragging {
  z-index: 5;
  border-color: var(--accent);
  box-shadow: 0 18px 46px rgba(27, 44, 24, 0.22);
  cursor: grabbing;
  opacity: 1;
  touch-action: none;
  transform: translateY(-4px) scale(1.025);
}

.secret-mark {
  background:
    radial-gradient(circle at 35% 30%, #f5e58a 0 16%, transparent 17%),
    linear-gradient(135deg, #172015, #4f8f2d);
  color: #f4f8df;
}

.recipe-mark {
  background:
    linear-gradient(135deg, #5b9834, #e8b94a 62%, #f06450);
  color: #10200d;
  font-size: 13px;
}

.tool-dock-button > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.food-wheel-launch-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 10px;
  background:
    #fff url("./assets/food-wheel-icon.png") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.food-wheel-launch strong {
  font-size: 14px;
  line-height: 1.25;
}

.food-wheel-launch small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

body.theme-dark .food-wheel-launch {
  border-color: rgba(255, 255, 255, 0.18);
}

.anniversary-launch-mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #f5f1e8;
}

.anniversary-launch-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anniversary-launch strong {
  font-size: 14px;
  line-height: 1.25;
}

.anniversary-launch small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

body.theme-dark .anniversary-launch {
  border-color: rgba(255, 255, 255, 0.18);
}

.tool-dock-mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-strong);
  font-size: 22px;
  font-weight: 900;
}

.anniversary-dialog {
  width: min(calc(100% - 36px), 920px);
  max-width: none;
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border-radius: 8px;
}

.rename-home-dialog {
  width: min(520px, calc(100% - 24px));
  border-radius: 8px;
}

.rename-home-dialog form {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.rename-home-dialog form > div:first-child {
  display: grid;
  gap: 7px;
  padding-right: 42px;
}

.rename-home-dialog form > div:first-child p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.rename-home-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.rename-home-actions .primary,
.rename-home-actions .ghost-button {
  min-height: 46px;
}

.anniversary-dialog::backdrop {
  background: rgba(9, 12, 10, 0.72);
  backdrop-filter: blur(8px);
}

.anniversary-dialog-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  padding: 24px 28px 20px;
}

.anniversary-dialog-head > div {
  display: grid;
  gap: 5px;
}

.anniversary-dialog-head h2 {
  font-size: 42px;
}

.anniversary-dialog-head p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.anniversary-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

body.theme-dark .anniversary-close {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f4ef;
}

.anniversary-dialog-body {
  display: grid;
  gap: 20px;
  padding: 24px 28px 28px;
}

.anniversary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.anniversary-card {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.anniversary-card:first-child {
  grid-column: 1 / -1;
  background:
    linear-gradient(110deg, rgba(91, 152, 52, 0.18), transparent 58%),
    var(--surface);
}

.anniversary-card-head,
.anniversary-card-actions,
.anniversary-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.anniversary-card-index {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.anniversary-card-actions {
  justify-content: flex-end;
}

.anniversary-card-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
}

.anniversary-card-actions button[data-delete-anniversary] {
  border-color: rgba(240, 100, 80, 0.4);
  color: var(--coral);
}

.anniversary-card h3 {
  font-size: 26px;
  line-height: 1.1;
}

.anniversary-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
}

.anniversary-value strong {
  font-size: clamp(42px, 8vw, 68px);
  line-height: 0.9;
}

.anniversary-value span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.anniversary-detail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.anniversary-card.pending .anniversary-value strong {
  font-size: 28px;
}

.anniversary-editor {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.anniversary-add {
  justify-self: start;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 850;
  padding: 0 17px;
}

.anniversary-editor form {
  display: grid;
  gap: 15px;
}

.anniversary-form-actions {
  justify-content: flex-start;
}

.anniversary-form-actions .primary,
.anniversary-form-actions .ghost-button {
  min-width: 130px;
}

body.theme-dark .anniversary-card:first-child {
  background:
    linear-gradient(110deg, rgba(139, 201, 95, 0.13), transparent 58%),
    var(--surface);
}

.food-wheel-dialog {
  width: min(calc(100% - 36px), 1060px);
  max-width: none;
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(85, 214, 181, 0.1), transparent 45%),
    var(--surface);
  color: var(--ink);
  padding: 0;
}

.food-wheel-dialog::backdrop {
  background: rgba(9, 12, 10, 0.72);
  backdrop-filter: blur(8px);
}

.food-wheel-dialog-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  padding: 24px 28px 20px;
}

.food-wheel-dialog-head h2 {
  margin-top: 4px;
  font-size: 42px;
}

.food-wheel-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.food-wheel-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 42px;
  align-items: center;
  padding: 30px;
}

.food-wheel-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.food-wheel-copy h2 {
  font-size: 58px;
}

.food-wheel-copy > p:not(.kicker) {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.food-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 6px;
}

.food-option-row button {
  min-height: 46px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  padding: 0 16px;
}

body.theme-dark .food-option-row button {
  background: var(--accent);
  color: #0d100f;
}

.food-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.food-options button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  padding: 0 10px;
}

.food-options button:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.food-options button span {
  font-size: 16px;
  line-height: 1;
}

.food-wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.wheel-disc {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin-top: 18px;
}

.wheel-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 22px 30px rgba(21, 24, 22, 0.18);
  contain: layout paint;
}

#foodWheel {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 4.2s cubic-bezier(0.12, 0.72, 0.12, 1);
}

body.theme-dark .wheel-viewport {
  box-shadow: 0 24px 34px rgba(0, 0, 0, 0.42);
}

.wheel-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-left: 18px solid transparent;
  border-top: 34px solid var(--ink);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.18));
  transform: translateX(-50%);
}

body.theme-dark .wheel-pointer {
  border-top-color: #f0f4ef;
}

.spin-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 82px;
  height: 82px;
  border: 5px solid #f2f4ef;
  border-radius: 999px;
  background: #151816;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.spin-button:not(:disabled):active {
  transform: translate(-50%, -49%);
}

.spin-button:disabled {
  cursor: wait;
  opacity: 1;
}

.wheel-result {
  width: 100%;
  min-height: 30px;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  text-align: center;
}

.kicker {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

h2 {
  font-size: 34px;
  font-weight: 820;
  line-height: 1.05;
}

.overview {
  display: grid;
  gap: 18px;
  margin: 22px 0 8px;
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--line);
}

.overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.overview-head > div {
  display: grid;
  gap: 5px;
}

.memory-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.memory-button:not(:disabled):hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--ink);
}

.tool-dock .tool-dock-button {
  position: relative;
  overflow: hidden;
}

.tool-dock .tool-dock-button::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 48%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.tool-dock .tool-dock-button:hover,
.tool-dock .tool-dock-button:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  box-shadow: 0 16px 38px color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
}

.tool-dock .tool-dock-button:hover::after,
.tool-dock .tool-dock-button:focus-visible::after {
  border-color: color-mix(in srgb, var(--accent) 68%, transparent);
  opacity: 1;
}

.tool-dock .tool-dock-button > * {
  position: relative;
  z-index: 1;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.overview-grid article,
.overview-grid > button {
  position: relative;
  display: grid;
  min-height: 132px;
  align-content: space-between;
  gap: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  padding: 18px;
  text-align: left;
  transition: background 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.overview-level:hover,
.overview-level:focus-visible {
  z-index: 1;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  box-shadow:
    inset 0 0 0 2px var(--accent),
    0 16px 38px color-mix(in srgb, var(--accent) 22%, transparent);
  outline: 0;
  transform: translateY(-2px);
}

body.theme-dark .overview-grid article,
body.theme-dark .overview-grid > button {
  background: rgba(255, 255, 255, 0.025);
}

.overview-grid span,
.overview-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overview-grid strong {
  font-size: 36px;
  font-weight: 830;
}

.overview-grid > :nth-child(1) strong {
  color: var(--accent-strong);
}

.overview-grid > :nth-child(2) strong {
  color: var(--coral);
}

.overview-grid > :nth-child(3) strong {
  color: var(--blue);
}

.overview-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.overview-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 260ms ease;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  padding: 0 15px;
  text-align: left;
}

.quick-actions button:hover {
  border-color: var(--accent);
  background: rgba(50, 184, 150, 0.06);
}

.quick-actions span {
  color: var(--accent-strong);
  font-size: 11px;
}

.setup-panel,
.auth-card,
.composer,
.recipe-composer,
.wishlist-composer,
.weekend-composer {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.auth-card,
.composer,
.recipe-composer,
.wishlist-composer,
.weekend-composer {
  padding: 24px;
}

.auth-card {
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  align-items: center;
}

.auth-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr) auto auto;
}

.forgot-password-button {
  grid-column: 2 / -1;
  justify-self: start;
  min-height: auto !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  padding: 2px 0 !important;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.forgot-password-button:hover {
  color: var(--accent-strong) !important;
}

input,
select,
textarea {
  min-height: 46px;
  border-radius: 6px;
  background: var(--surface);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #111512;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(50, 184, 150, 0.14);
}

.primary,
.auth-row button,
.setup-panel button {
  border-radius: 6px;
  background: #151816;
  color: #fff;
}

#signupButton {
  background: var(--coral);
  color: #fff;
}

.section-heading-button h2::after {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #10241e;
}

.file-drop,
.recipe-cover-drop {
  border-color: #aeb9b2;
  border-radius: 6px;
  background: rgba(50, 184, 150, 0.05);
}

.file-drop {
  display: grid;
  min-height: auto;
  align-content: center;
  justify-items: center;
  gap: 12px;
  cursor: default;
  padding: 24px;
}

.upload-pick-button {
  display: inline-grid;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 72%, var(--line));
  border-radius: 7px;
  background: var(--accent);
  color: #10200d;
  cursor: pointer;
  font-size: 14px;
  font-weight: 950;
  padding: 0 18px;
}

.file-drop > span.upload-pick-button {
  display: inline-grid;
  margin: 0;
  color: #10200d;
}

.file-drop > strong {
  margin-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.file-drop #photoPreview:not([hidden]) {
  width: min(100%, 460px);
  max-height: 260px;
  margin: 0;
  border-radius: 6px;
  object-fit: contain;
}

.file-drop .preview-strip {
  margin: 0;
}

.upload-pick-button:hover,
.upload-pick-button:focus-visible {
  background: color-mix(in srgb, var(--accent) 84%, #fff 16%);
  outline: 0;
  transform: translateY(-1px);
}

.preview-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
}

.preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 22px;
  height: 22px;
  min-height: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(9, 12, 10, 0.82);
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  padding: 0;
}

.preview-remove:hover {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

body.theme-dark .upload-pick-button {
  color: #07100a;
}

.compression-note {
  margin-top: -7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.compression-note::before {
  color: var(--accent-strong);
  content: "AUTO COMPRESS · ";
  font-size: 10px;
  font-weight: 850;
}

body.theme-dark .recipe-cover-drop {
  background: rgba(85, 214, 181, 0.05);
}

.feed-head {
  margin: 48px 0 18px;
}

#galleryHead {
  display: flex;
  align-items: end;
  gap: 12px;
}

#galleryHead .status-line {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filters {
  top: calc(84px + env(safe-area-inset-top));
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  padding: 9px 0;
  background: rgba(242, 244, 239, 0.9);
}

body.theme-dark .filters {
  background: rgba(13, 16, 15, 0.9);
}

.diary-search {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(21, 24, 22, 0.08);
  padding: 8px 10px 8px 16px;
}

.diary-search span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diary-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  outline: 0;
}

.diary-search input::placeholder {
  color: var(--muted);
  font-weight: 700;
}

.diary-search button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), transparent 82%);
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.today-posts-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -2px 0 18px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 40%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 82%), transparent 58%),
    var(--surface);
  box-shadow: 0 16px 38px rgba(21, 24, 22, 0.08);
  padding: 16px 18px;
}

.today-posts-notice div:first-child {
  min-width: 0;
}

.today-posts-notice span {
  display: block;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.today-posts-notice strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.today-posts-notice p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.today-posts-notice div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.today-posts-notice button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  padding: 0 14px;
}

.today-posts-notice .today-posts-primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

body.theme-dark .today-posts-notice {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 86%), transparent 58%),
    var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

body.theme-dark .today-posts-notice span {
  color: var(--accent);
}

body.theme-dark .today-posts-notice .today-posts-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #10140f;
}

.chip {
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 750;
  padding: 9px 15px;
}

.chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.feature-chip {
  border-color: rgba(232, 185, 74, 0.55);
}

.favorite-chip {
  border-color: rgba(240, 100, 80, 0.45);
}

.feature-chip.active {
  background: var(--gold);
  color: #151816;
}

.favorite-chip.active {
  background: var(--coral);
  color: #fff;
}

body.theme-dark .chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d100f;
}

body.theme-dark .feature-chip.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #151816;
}

body.theme-dark .favorite-chip.active {
  border-color: var(--coral);
  background: var(--coral);
  color: #151816;
}

.gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 8px;
  gap: 24px;
  align-items: start;
  padding: 8px 0 34px;
}

.gallery::before,
.gallery::after,
.photo-card::before {
  display: none;
}

.photo-card,
.photo-card:nth-child(odd),
.photo-card:nth-child(even) {
  grid-column: auto;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  grid-row-end: span var(--masonry-span, 1);
  margin: 0;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 38px rgba(21, 24, 22, 0.08);
}

.photo-card:nth-child(even) {
  margin-top: 0;
}

body.theme-dark .photo-card {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.strand-index {
  top: 12px;
  left: 12px !important;
  right: auto !important;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(15, 19, 17, 0.78);
  backdrop-filter: blur(10px);
}

.photo-media {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(91, 152, 52, 0.16), rgba(232, 185, 74, 0.12)),
    #eef2eb;
}

body.theme-dark .photo-media {
  background:
    linear-gradient(135deg, rgba(139, 201, 95, 0.12), rgba(232, 185, 74, 0.08)),
    #111612;
}

.photo-media.single {
  contain: layout paint;
}

.photo-media.single button {
  width: 100%;
  height: 100%;
}

.photo-media.single img,
.photo-card > .photo-open > img {
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.photo-media button {
  position: relative;
}

.photo-media button::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      110deg,
      transparent 0%,
      rgba(255, 255, 255, 0.42) 44%,
      transparent 78%
    );
  content: "";
  opacity: 0.86;
  transform: translateX(-100%);
  transition: opacity 180ms ease;
  animation: feed-image-sheen 1.15s ease-in-out infinite;
}

body.theme-dark .photo-media button::before {
  background:
    linear-gradient(
      110deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 44%,
      transparent 78%
    );
}

.photo-media button.media-loaded::before {
  opacity: 0;
  animation-play-state: paused;
}

.feed-image {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 220ms ease,
    transform 320ms ease;
}

.feed-image.is-loaded {
  opacity: 1;
  transform: scale(1);
}

@keyframes feed-image-sheen {
  to {
    transform: translateX(100%);
  }
}

.photo-card article {
  gap: 9px;
  padding: 18px 20px 13px;
}

.photo-card h3 {
  font-size: 25px;
  font-weight: 800;
}

.photo-copy-open .diary-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.read-more-hint {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

body.theme-dark .read-more-hint {
  color: var(--accent);
}

#dialogNote {
  white-space: pre-line;
}

.card-actions {
  padding: 0 20px 18px;
}

.photo-card-comments {
  display: grid;
  gap: 10px;
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--bg) 28%);
  padding: 12px;
}

.photo-card-comments header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.photo-card-comments header span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 950;
}

body.theme-dark .photo-card-comments header span {
  color: var(--accent);
}

.photo-card-comments header button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.photo-card-comments article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 0;
}

.photo-card-comment-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent), transparent 80%);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 950;
}

.photo-card-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card-comments strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.photo-card-comments p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.edit-photo,
.delete-photo {
  min-height: 34px;
  border-radius: 5px;
  font-weight: 750;
}

.edit-photo {
  background: var(--ink);
  color: var(--surface);
}

.delete-photo {
  border-color: rgba(240, 100, 80, 0.42);
  background: rgba(240, 100, 80, 0.07);
  color: var(--coral);
}

.empty {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.feed-loader {
  margin: 4px 0 24px;
  border-top: 1px solid var(--line);
}

body.theme-dark .feed-loader {
  color: #aeb8b2;
}

.ghost-button,
.pager button,
.link-row button {
  border-radius: 6px;
}

.recipe-form,
.wishlist-form,
.weekend-form {
  border-radius: 8px;
  box-shadow: none;
}

.wish-image-drop {
  display: grid;
  min-height: 230px;
  align-content: center;
  justify-items: center;
  overflow: hidden;
  border: 1px dashed #aeb9b2;
  border-radius: 6px;
  background: rgba(50, 184, 150, 0.05);
  color: var(--muted);
  cursor: pointer;
  padding: 16px;
  text-align: center;
}

.secret-page,
.secret-composer,
.secret-form {
  display: grid;
  gap: 18px;
}

.secret-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0 12px;
}

.secret-head h2 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
}

.secret-head p:last-child {
  max-width: 52ch;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.65;
}

.secret-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 44%),
    var(--surface);
  padding: 18px;
}

.secret-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.secret-form .form-grid label,
.secret-form > label {
  display: grid;
  min-width: 0;
  gap: 9px;
  color: var(--muted);
  font-weight: 850;
}

.secret-form .form-grid label:last-child {
  grid-column: 1 / -1;
}

.secret-form input,
.secret-form select,
.secret-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.secret-image-drop {
  display: grid;
  min-height: 260px;
  align-content: center;
  justify-items: center;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--muted);
  cursor: pointer;
  padding: 16px;
  text-align: center;
}

.secret-image-drop img {
  width: min(100%, 520px);
  max-height: 330px;
  object-fit: contain;
  border-radius: 6px;
}

.secret-form input[type="file"] {
  width: 100%;
}

.secret-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.secret-category-tags[hidden] {
  display: none;
}

.secret-category-tags button,
.edit-media-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
  padding: 8px 12px;
}

.secret-category-tags button:hover,
.edit-media-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.edit-media-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.secret-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.secret-filters button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
  padding: 9px 14px;
}

.secret-filters button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #10200d;
}

.secret-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 34px;
}

.secret-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(15, 24, 13, 0.08);
  padding: 12px;
}

.secret-card:hover {
  border-color: var(--accent);
  box-shadow: 0 18px 46px color-mix(in srgb, var(--accent) 16%, transparent);
  transform: translateY(-2px);
}

.secret-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: 7px;
  background: #10140f;
  padding: 0;
}

.secret-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.secret-cover:hover img {
  transform: scale(1.035);
}

.secret-album-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.secret-album-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
  background: #10140f;
}

.secret-cover span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  padding: 6px 9px;
}

.secret-card h3 {
  font-size: 22px;
}

.secret-card p {
  color: var(--muted);
  line-height: 1.55;
}

.secret-card small {
  color: var(--accent-strong);
  font-weight: 850;
}

.secret-album-view {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
}

.secret-album-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.secret-album-title-row {
  display: flex;
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.secret-album-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.secret-album-actions button,
.secret-linked-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  padding: 0 14px;
}

.secret-album-actions .primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #10200d;
}

.secret-linked-button {
  width: fit-content;
}

.secret-album-head h3 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.96;
}

.secret-album-head p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.55;
}

.secret-back-button {
  flex: 0 0 auto;
  width: fit-content;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
}

@supports (animation-timeline: scroll()) {
  .secret-album-head {
    animation: secretAlbumHeadCompact linear both;
    animation-timeline: scroll(root);
    animation-range: 80px 220px;
  }
}

@keyframes secretAlbumHeadCompact {
  to {
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@supports (animation-timeline: scroll()) {
  .secret-album-head h3 {
    animation: secretAlbumTitleCompact linear both;
    animation-timeline: scroll(root);
    animation-range: 80px 220px;
  }

  .secret-album-head p,
  .secret-album-head small,
  .secret-album-head .kicker {
    animation: secretAlbumMetaCompact linear both;
    animation-timeline: scroll(root);
    animation-range: 80px 220px;
  }
}

@keyframes secretAlbumTitleCompact {
  to {
    margin-top: 0;
    font-size: 22px;
    line-height: 1.1;
  }
}

@keyframes secretAlbumMetaCompact {
  to {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
}

.secret-back-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.secret-append-panel {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(190px, 0.28fr);
  align-items: stretch;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.secret-append-panel strong {
  display: block;
  font-size: 18px;
}

.secret-append-panel textarea {
  min-height: 104px;
  resize: vertical;
}

.secret-append-files {
  display: grid;
  place-items: center;
  min-width: 150px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--ink);
  font-weight: 850;
  padding: 12px;
  cursor: pointer;
  text-align: center;
}

.secret-append-files input {
  display: none;
}

.secret-append-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.secret-album-edit,
.secret-album-toolbar {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%);
  padding: 12px;
}

.secret-album-edit {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.45fr);
}

.secret-album-edit textarea {
  grid-column: 1 / -1;
}

.secret-album-edit > div {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secret-album-edit button,
.secret-album-toolbar button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  padding: 0 12px;
}

.secret-album-toolbar {
  position: sticky;
  top: calc(84px + env(safe-area-inset-top));
  z-index: 72;
  grid-template-columns: minmax(0, 1fr) auto;
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
  box-shadow: 0 14px 34px rgba(15, 24, 13, 0.16);
  backdrop-filter: blur(16px) saturate(130%);
}

.secret-album-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secret-selection-actions {
  justify-content: flex-end;
}

.secret-back-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--line));
  border-radius: 999px;
  background: var(--accent);
  color: #10200d;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 28%, transparent);
}

.secret-back-top:hover {
  transform: translateY(-2px);
}

body.theme-dark .secret-album-toolbar {
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.secret-append-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  padding: 0 13px;
}

.secret-album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.secret-album-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10140f;
  padding: 0;
}

.secret-album-photo span {
  position: absolute;
  top: 9px;
  right: 9px;
  min-width: 30px;
  border-radius: 999px;
  background: rgba(10, 16, 12, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  padding: 5px 8px;
}

.secret-album-photo.selectable {
  cursor: pointer;
}

.secret-album-photo.selected {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 3px var(--accent),
    0 12px 32px color-mix(in srgb, var(--accent) 22%, transparent);
}

.secret-album-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.secret-album-photo:hover {
  border-color: var(--accent);
}

.secret-album-photo:hover img {
  transform: scale(1.04);
}

.delete-secret,
.delete-secret.danger {
  justify-self: start;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--coral) 76%, #000 8%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--coral) 18%, var(--surface));
  color: var(--coral);
  font-size: 12px;
  font-weight: 850;
  padding: 0 12px;
}

.delete-secret.danger {
  justify-self: end;
}

.delete-secret:hover,
.delete-secret.danger:hover {
  background: var(--coral);
  color: #fff;
}

body.theme-dark .wish-image-drop {
  border-color: #48534d;
  background: rgba(85, 214, 181, 0.05);
}

.wish-image-drop input {
  display: none;
}

.wish-image-drop img {
  display: block;
  width: min(100%, 620px);
  max-height: 360px;
  margin-bottom: 14px;
  border-radius: 5px;
  object-fit: cover;
}

.wish-image-drop img[hidden] {
  display: none;
}

.wish-image-drop span,
.wish-image-drop strong {
  display: block;
}

.wish-image-drop strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
}

.wish-remove-image {
  justify-self: start;
  min-height: 36px;
  border: 1px solid rgba(240, 100, 80, 0.42);
  border-radius: 5px;
  background: rgba(240, 100, 80, 0.08);
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  padding: 0 14px;
}

.wish-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.wish-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.wish-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
}

.wish-tabs button.active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.wish-tabs span {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 12px;
}

body.theme-dark .wish-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d100f;
}

.recipes-list,
.wishlist-list,
.weekend-list {
  gap: 18px;
}

.recipe-card,
.wish-card {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(21, 24, 22, 0.07);
}

.recipe-card-head button,
.wish-card-head button {
  border-radius: 5px;
}

.recipe-cover,
.recipe-cover img {
  min-height: 240px;
}

.wish-card {
  background:
    linear-gradient(90deg, var(--accent) 0 5px, transparent 5px),
    var(--surface);
}

body.theme-dark .wish-card {
  background:
    linear-gradient(90deg, var(--accent) 0 5px, transparent 5px),
    var(--surface);
}

.wish-card-image-button {
  display: block;
  width: 100%;
  margin: 12px 0 14px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.wish-card-image-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wish-card-image-button .wish-card-image {
  margin: 0;
  transition: transform 180ms ease, filter 180ms ease;
}

.wish-card-image-button:hover .wish-card-image {
  transform: scale(1.015);
  filter: saturate(1.05);
}

.wish-card h3 {
  font-size: 36px;
}

.wish-card {
  align-content: stretch;
  gap: 18px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--line), var(--accent) 10%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 88%), transparent 34%),
    linear-gradient(90deg, var(--accent) 0 5px, transparent 5px),
    var(--surface);
}

body.theme-dark .wish-card {
  border-color: color-mix(in srgb, var(--accent), transparent 62%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 84%), transparent 40%),
    linear-gradient(90deg, var(--accent) 0 5px, transparent 5px),
    var(--surface);
}

.wish-card.done {
  opacity: 1;
}

.wish-card.done h3 {
  color: var(--ink);
  text-decoration: none;
}

.wish-card-top,
.wish-actions,
.wish-meta {
  display: flex;
  align-items: center;
}

.wish-card-top {
  justify-content: space-between;
  gap: 14px;
}

.wish-index-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wish-seq {
  color: color-mix(in srgb, var(--ink), transparent 48%);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wish-state-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.wish-state-pill.open {
  border-color: color-mix(in srgb, var(--gold), transparent 35%);
  background: color-mix(in srgb, var(--gold), transparent 86%);
  color: color-mix(in srgb, var(--gold), #3c2a00 58%);
}

.wish-state-pill.done {
  border-color: color-mix(in srgb, var(--accent), transparent 40%);
  background: color-mix(in srgb, var(--accent), transparent 86%);
  color: var(--accent-strong);
}

body.theme-dark .wish-state-pill.done {
  color: var(--accent);
}

.wish-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wish-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  padding: 0 12px;
}

.wish-actions .complete {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

body.theme-dark .wish-actions .complete {
  border-color: var(--accent);
  background: var(--accent);
  color: #10140f;
}

.wish-actions .danger {
  border-color: color-mix(in srgb, var(--coral), transparent 54%);
  background: color-mix(in srgb, var(--coral), transparent 91%);
  color: var(--coral);
}

.wish-card-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.86fr) minmax(0, 1.14fr);
  gap: 18px;
  align-items: stretch;
}

.wish-card-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wish-card-content .kicker {
  color: var(--accent-strong);
}

body.theme-dark .wish-card-content .kicker {
  color: var(--accent);
}

.wish-card h3 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.02;
}

.wish-meta {
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.wish-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--surface), var(--bg) 32%);
}

.wish-note,
.wish-card p:not(.kicker).wish-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.wish-card-image-button {
  height: 100%;
  min-height: 218px;
  margin: 0;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface), transparent 22%);
}

.wish-card-image-button .wish-card-image {
  width: 100%;
  height: 100%;
  min-height: 218px;
  object-fit: cover;
}

.wish-card-placeholder {
  min-height: 218px;
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--accent), transparent 45%);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 18%, color-mix(in srgb, var(--gold), transparent 70%), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent), transparent 88%), transparent 70%),
    color-mix(in srgb, var(--surface), var(--bg) 20%);
  color: var(--accent-strong);
  font-size: 26px;
  font-weight: 950;
}

body.theme-dark .wish-card-placeholder {
  color: var(--accent);
  background:
    radial-gradient(circle at 24% 18%, color-mix(in srgb, var(--gold), transparent 76%), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent), transparent 84%), transparent 70%),
    color-mix(in srgb, var(--surface), #000 12%);
}

.wish-completion-note {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 58%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent), transparent 92%);
}

.wish-completion-note span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.wish-completion-note p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.65;
}

body.theme-dark .wish-completion-note {
  background: color-mix(in srgb, var(--accent), transparent 88%);
}

.wish-completion-note.empty {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface), var(--bg) 24%);
}

.wish-complete-dialog {
  width: min(calc(100% - 32px), 760px);
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.wish-complete-dialog::backdrop {
  background: rgba(7, 10, 8, 0.54);
  backdrop-filter: blur(8px);
}

.wish-complete-dialog form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.wish-complete-hero {
  padding-right: 42px;
}

.wish-complete-hero h2 {
  margin: 4px 0 6px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.98;
}

.wish-complete-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.wish-complete-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.wish-complete-preview {
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent), transparent 86%), transparent 72%),
    color-mix(in srgb, var(--surface), var(--bg) 26%);
}

.wish-complete-preview img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
}

.wish-complete-preview div {
  height: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
}

.wish-complete-preview span {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 950;
}

.wish-complete-preview strong {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.04;
}

.wish-complete-body label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.wish-complete-body textarea {
  min-height: 260px;
  resize: vertical;
  border-radius: 8px;
}

.wish-complete-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.wish-complete-actions .primary {
  width: 100%;
}

.weekend-page {
  display: grid;
  gap: 18px;
}

.weekend-form {
  display: grid;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: clamp(18px, 4vw, 30px);
}

.weekend-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.weekend-list {
  display: grid;
  gap: 14px;
}

.weekend-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(21, 24, 22, 0.07);
}

.weekend-card.done {
  opacity: 0.62;
}

.weekend-card.done h3 {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.weekend-date {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  background: var(--accent);
  color: #0d100f;
  padding: 18px 10px;
}

.weekend-date span,
.weekend-date small {
  font-size: 12px;
  font-weight: 850;
}

.weekend-date strong {
  font-size: 44px;
  line-height: 1;
}

.weekend-card:nth-child(3n + 2) .weekend-date {
  background: var(--coral);
}

.weekend-card:nth-child(3n) .weekend-date {
  background: var(--gold);
}

.weekend-card-body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.weekend-card-body h3 {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}

.weekend-card-body > p:not(.kicker) {
  color: var(--muted);
  line-height: 1.6;
}

.weekend-location {
  color: var(--accent-strong) !important;
  font-weight: 800;
}

.weekend-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.weekend-card-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 0 13px;
}

.weekend-card-actions button[data-toggle-weekend] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

body.theme-dark .weekend-card-actions button[data-toggle-weekend] {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d100f;
}

.weekend-card-actions button[data-delete-weekend] {
  border-color: rgba(240, 100, 80, 0.42);
  color: var(--coral);
}

.wish-card-image {
  display: block;
  width: 100%;
  max-height: 390px;
  border-radius: 6px;
  object-fit: cover;
}

body.theme-dark .wish-card-head button[data-edit-wish] {
  border-color: rgba(85, 214, 181, 0.5);
  background: rgba(85, 214, 181, 0.12);
  color: var(--accent);
}

body.theme-dark .ghost-button,
body.theme-dark .pager button,
body.theme-dark .link-row button {
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #f0f4ef;
}

dialog {
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.account-dialog {
  width: min(calc(100% - 32px), 520px);
  max-width: none;
  padding: 0;
}

.level-dialog {
  width: min(calc(100% - 32px), 760px);
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
}

.level-center {
  display: grid;
  gap: 18px;
  max-height: inherit;
  overflow: auto;
  padding: 32px;
}

.level-hero {
  padding-right: 38px;
}

.level-hero h2 {
  margin-top: 4px;
}

.level-hero p:last-child {
  margin-top: 8px;
  color: var(--muted);
}

.level-current-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.level-current-card > div,
.level-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--bg) 18%);
}

.level-current-card > div {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.level-current-card span,
.level-row small,
.level-row p {
  color: var(--muted);
}

.level-current-card strong {
  font-size: 20px;
}

.level-list {
  display: grid;
  gap: 10px;
}

.level-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.level-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.level-row strong {
  display: block;
  font-size: 18px;
}

.level-row p {
  margin: 4px 0;
}

.level-row.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.level-row.active > span,
.level-row.completed > span {
  background: var(--accent);
  color: #0d100f;
}

.settings-dialog {
  width: min(calc(100% - 28px), 980px);
  height: min(720px, calc(100dvh - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  grid-template-columns: 280px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
}

.settings-dialog[open] {
  display: grid;
}

.settings-dialog::backdrop {
  background: rgba(7, 10, 8, 0.72);
  backdrop-filter: blur(10px);
}

.settings-dialog > .dialog-close {
  top: 18px;
  left: 18px;
  right: auto;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink), transparent 88%);
}

.settings-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink), transparent 94%);
  padding: 88px 18px 24px;
}

.settings-sidebar h2 {
  font-size: 30px;
}

.settings-sidebar nav {
  display: grid;
  gap: 8px;
}

.settings-sidebar button {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  padding: 0 14px;
  text-align: left;
  cursor: pointer;
}

.settings-sidebar button.active,
.settings-sidebar button:hover {
  background: color-mix(in srgb, var(--accent), transparent 84%);
}

.settings-content {
  display: grid;
  gap: 24px;
  min-height: 0;
  overflow: auto;
  padding: 34px 34px 42px;
}

.settings-group {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.settings-group h3 {
  margin: 0 0 6px;
  font-size: 28px;
}

.settings-group button {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.settings-group button + button {
  border-top: 1px solid var(--line);
}

.settings-group button span {
  min-width: 96px;
  color: color-mix(in srgb, var(--ink) 82%, var(--accent) 18%);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.settings-group button strong {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink) 14%);
  font-size: 14px;
  font-weight: 750;
  text-align: right;
}

.settings-group button strong em {
  max-width: 320px;
  overflow: hidden;
  color: var(--accent-strong);
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-group button strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settings-group button:hover strong {
  color: var(--accent-strong);
}

.settings-group button:hover strong em {
  color: var(--ink);
}

body.theme-dark .settings-group button span {
  color: color-mix(in srgb, var(--ink) 78%, var(--accent) 22%);
}

body.theme-dark .settings-group button strong em {
  color: color-mix(in srgb, var(--accent) 84%, #fff 16%);
}

body.theme-dark .settings-group button:hover strong em {
  color: #fff;
}

.settings-tool-order {
  display: grid;
  gap: 0;
}

.settings-tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.settings-tool-card:first-child {
  border-top: 0;
}

.settings-tool-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 12px;
}

.settings-tool-copy span {
  min-width: 34px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.settings-tool-copy strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.settings-tool-copy small {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.settings-tool-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-tool-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface), var(--bg) 24%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  padding: 0 14px;
}

.settings-tool-actions button:disabled {
  opacity: 0.42;
}

.settings-family-panel {
  display: grid;
  gap: 10px;
  margin: 2px 0 8px;
}

.settings-family-empty,
.settings-family-summary,
.settings-family-member,
.settings-family-invite,
.settings-family-pending article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--bg) 22%);
}

.settings-family-empty,
.settings-family-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.settings-family-empty p,
.settings-family-summary span,
.settings-family-summary small,
.settings-family-member small,
.settings-family-invite span,
.settings-family-pending span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settings-family-summary strong {
  font-size: 20px;
}

.settings-family-members {
  display: grid;
  gap: 8px;
}

.settings-family-member,
.settings-family-invite,
.settings-family-pending article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.settings-family-invite,
.settings-family-pending article {
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-family-invite > span:last-child {
  display: flex;
  gap: 8px;
}

.settings-family-panel button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
}

.settings-family-panel button + button {
  border-top: 1px solid var(--line);
}

.settings-family-panel button[data-accept="true"] {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

body.theme-dark .settings-family-panel button[data-accept="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d100f;
}

body.theme-dark .settings-sidebar {
  background: color-mix(in srgb, var(--surface), #000 18%);
}

.mini-toast-host {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 120;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.mini-toast-host-center {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  transform: translate(-50%, -50%);
  justify-items: center;
}

.mini-toast {
  min-width: 172px;
  max-width: min(82vw, 320px);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, #0a0d0a 8%);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(7, 11, 8, 0.24);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
}

.mini-toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mini-toast-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: block;
}

.mini-toast-text {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}

.mini-toast-success .mini-toast-icon {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 18%, transparent 19%),
    linear-gradient(135deg, #7fd653, #4ea030);
}

.mini-toast-error .mini-toast-icon {
  background:
    linear-gradient(135deg, transparent 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(45deg, transparent 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(135deg, #f06a57, #c84030);
}

.mini-toast-loading .mini-toast-icon {
  border: 2px solid color-mix(in srgb, var(--accent), transparent 72%);
  border-top-color: var(--accent);
  background: transparent;
  animation: mini-toast-spin 760ms linear infinite;
}

@keyframes mini-toast-spin {
  to {
    transform: rotate(360deg);
  }
}

.account-dialog form {
  display: grid;
  gap: 16px;
  padding: 32px;
}

.account-dialog form > div:first-child {
  padding-right: 38px;
}

.account-dialog form > div:first-child p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.account-dialog label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-dialog .primary {
  width: 100%;
}

.dialog-close {
  border-radius: 6px;
}

body.mobile-dialog-open {
  overflow: hidden;
}

.vip-hero,
.vip-level,
.vip-wallet article,
.vip-recharge button {
  border-radius: 6px;
}

@media (max-width: 920px) {
  body {
    padding-top: calc(136px + env(safe-area-inset-top));
  }

  .food-wheel-dialog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wheel-disc {
    width: min(100%, 360px);
  }

  .hero {
    min-height: 260px;
    padding: 24px 28px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero-cover {
    object-position: 43% center;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .forgot-password-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    touch-action: pan-x pan-y;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav button {
    flex: 0 0 auto;
    min-width: 68px;
  }

  .thanks-head {
    align-items: start;
    flex-direction: column;
  }

  .thanks-board {
    grid-template-columns: 1fr;
  }

  .thanks-note {
    min-height: 170px;
    padding: 20px;
  }

  .thanks-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .thanks-form-actions .status-line {
    margin-right: 0;
  }

  .family-empty form,
  .family-invite {
    grid-template-columns: 1fr;
  }

  .family-summary {
    align-items: start;
    flex-direction: column;
  }

  .level-center {
    padding: 28px 20px;
  }

  .level-current-card {
    grid-template-columns: 1fr;
  }

  .photo-comments {
    padding: 18px;
  }

  .photo-comment-thread {
    margin-left: calc(var(--comment-depth) * 12px);
  }

  .notification-dialog {
    width: calc(100% - 18px);
    padding: 18px;
  }

  .notification-dialog > header {
    align-items: start;
  }

  .notification-item {
    grid-template-columns: 38px minmax(0, 1fr) 46px;
  }

  .notification-avatar {
    width: 38px;
    height: 38px;
  }

  .notification-photo {
    width: 46px;
    height: 46px;
  }

  #photoCommentForm {
    grid-template-columns: 1fr;
  }

  #photoCommentForm button {
    min-height: 42px;
  }

  .feed-loader {
    justify-content: center;
    padding-right: 132px;
    padding-left: 10px;
  }

  .edit-image-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edit-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .tool-dock {
    margin-inline: -2px;
    padding: 8px;
    scroll-snap-type: x proximity;
  }

  .tool-dock-button {
    min-width: 154px;
    min-height: 54px;
    gap: 8px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  .food-wheel-launch-mark,
  .anniversary-launch-mark,
  .tool-dock-mark {
    width: 34px;
    height: 34px;
  }

  .tool-dock-button strong {
    font-size: 13px;
  }

  .tool-dock-button small {
    font-size: 10px;
  }

  .anniversary-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
  }

  #photoDialog {
    width: min(94vw, 680px);
    max-height: 86dvh;
    border-radius: 18px;
  }

  #photoDialog.secret-image-dialog {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    width: min(94vw, 620px);
    height: min(86dvh, 760px);
    max-height: none;
    overflow: hidden;
    border-radius: 18px;
  }

  #photoDialog .dialog-media,
  #photoDialog .dialog-media img {
    max-height: 42dvh;
  }

  #photoDialog.secret-image-dialog .dialog-media,
  #photoDialog.secret-image-dialog .dialog-media img {
    max-height: none;
  }

  #photoDialog.secret-image-dialog .dialog-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
  }

  #photoDialog.secret-image-dialog .dialog-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #photoDialog.secret-image-dialog .dialog-thumbs {
    display: none;
  }

  #photoDialog.secret-image-dialog > article {
    gap: 4px;
    min-height: 0;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, var(--bg) 4%);
    padding: 9px 12px 11px;
  }

  #photoDialog.secret-image-dialog > article h2 {
    font-size: 17px;
    line-height: 1.18;
  }

  #photoDialog.secret-image-dialog #dialogMeta {
    font-size: 10px;
  }

  #photoDialog.secret-image-dialog .carousel-button {
    width: 34px;
    height: 48px;
    font-size: 32px;
  }

  #photoDialog.secret-image-dialog .carousel-button.prev {
    left: 8px;
  }

  #photoDialog.secret-image-dialog .carousel-button.next {
    right: 8px;
  }

  #photoDialog.secret-image-dialog .media-counter {
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    font-size: 11px;
  }

  #photoDialog > article {
    padding: 12px 14px 10px;
  }

  #photoDialog > article h2 {
    font-size: 22px;
  }

  #photoDialog > .dialog-close {
    top: calc(10px + env(safe-area-inset-top));
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  #photoDialog.mobile-page-dialog {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
    transform: none;
  }

  #photoDialog.mobile-page-dialog::backdrop {
    background: var(--bg);
  }

  #photoDialog.mobile-page-dialog .dialog-media,
  #photoDialog.mobile-page-dialog .dialog-media img {
    max-height: none;
  }

  #photoDialog.mobile-page-dialog .dialog-media {
    display: grid;
    box-sizing: border-box;
    height: clamp(330px, 56dvh, 520px);
    min-height: 0;
    aspect-ratio: auto;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    place-items: center;
    background: #0c0f0d;
  }

  #photoDialog.mobile-page-dialog .dialog-media img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }

  #photoDialog.mobile-page-dialog .dialog-thumbs {
    min-height: 76px;
    max-height: 76px;
    overflow-y: hidden;
    padding: 9px 12px;
  }

  #photoDialog.mobile-page-dialog .dialog-thumbs button {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
  }

  #photoDialog.mobile-page-dialog > article {
    gap: 6px;
    padding: 12px 16px 10px;
  }

  #photoDialog.mobile-page-dialog > article h2 {
    font-size: 20px;
    line-height: 1.18;
  }

  #photoDialog.mobile-page-dialog #dialogNote {
    font-size: 13px;
    line-height: 1.6;
  }

  #photoDialog.mobile-page-dialog .photo-comments {
    padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
  }

  #photoDialog.secret-image-fullscreen {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  #photoDialog.secret-image-fullscreen .dialog-media {
    padding-top: 0;
    height: 100dvh;
    max-height: none;
  }

  #photoDialog.secret-image-fullscreen .dialog-media img {
    height: 100%;
    max-height: none;
    object-fit: contain;
  }

  #photoDialog.mobile-page-dialog .photo-comments-head {
    align-items: center;
  }

  #photoDialog.mobile-page-dialog .photo-comments-head h3 {
    font-size: 20px;
  }

  #photoDialog.mobile-page-dialog .photo-comment {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .photo-comments {
    padding: 16px;
  }

  .secret-head {
    align-items: start;
    flex-direction: column;
  }

  .secret-gallery {
    grid-template-columns: 1fr;
  }

  .secret-form .form-grid,
  .secret-album-head {
    top: calc(68px + env(safe-area-inset-top));
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .secret-album-actions {
    justify-content: stretch;
  }

  .secret-album-actions button {
    flex: 1 1 auto;
  }

  .secret-album-title-row {
    align-items: center;
    flex-wrap: wrap;
  }

  .secret-album-head h3 {
    font-size: 24px;
    line-height: 1.08;
  }

  .secret-back-button {
    min-height: 30px;
    font-size: 11px;
  }

  .secret-form {
    padding: 14px;
  }

  .mini-toast-host {
    left: 12px;
    right: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .mini-toast {
    max-width: none;
  }

  .secret-append-panel {
    grid-template-columns: 1fr;
  }

  .secret-append-actions {
    grid-column: auto;
  }

  .secret-append-actions button {
    flex: 1 1 auto;
  }

  .secret-album-edit,
  .secret-album-toolbar {
    grid-template-columns: 1fr;
  }

  .secret-album-toolbar {
    top: calc(78px + env(safe-area-inset-top));
    max-height: none;
    overflow: visible;
  }

  .secret-selection-actions {
    justify-content: stretch;
  }

  .secret-album-toolbar button {
    flex: 1 1 calc(50% - 8px);
  }

  .secret-back-top {
    right: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .secret-album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anniversary-dialog-head,
  .anniversary-dialog-body {
    padding: 18px;
  }

  .anniversary-dialog-head h2 {
    font-size: 32px;
  }

  .anniversary-list {
    grid-template-columns: 1fr;
  }

  .anniversary-card:first-child {
    grid-column: auto;
  }

  .rename-home-dialog form {
    padding: 22px 18px 18px;
  }

  .account-dialog form {
    padding: 24px 18px 20px;
  }

  .rename-home-actions {
    grid-template-columns: 1fr;
  }

  .food-wheel-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
  }

  .food-wheel-dialog-head {
    padding: 18px;
  }

  .food-wheel-dialog-head h2 {
    font-size: 32px;
  }

  .food-wheel-dialog-grid {
    padding: 18px;
  }

  .food-wheel-stage {
    order: -1;
  }

  .wheel-disc {
    width: min(100%, 280px);
  }

  .food-wheel-copy h2 {
    font-size: 42px;
  }

  .topbar {
    display: flex;
    min-height: calc(136px + env(safe-area-inset-top));
    flex-wrap: wrap;
    align-content: start;
    gap: 10px;
    padding: calc(18px + env(safe-area-inset-top)) 14px 10px;
  }

  .brand {
    flex: 1 1 0;
  }

  .top-actions {
    flex: 0 0 auto;
  }

  .vip-badge {
    min-width: 88px;
    min-height: 38px;
    padding: 4px 8px;
  }

  .vip-badge span {
    max-width: 96px;
    font-size: 11px;
  }

  .vip-badge small {
    font-size: 9px;
  }

  .brand-logo-wrap {
    width: 42px;
    height: 42px;
  }

  .brand-logo {
    width: 100%;
    height: 100%;
  }

  .brand strong {
    font-size: 14px;
  }

  .main-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }

  .main-nav button {
    min-width: 0;
    padding-inline: 8px;
  }

  .quick-actions {
    display: none;
  }

  .filters {
    top: calc(136px + env(safe-area-inset-top));
  }

  .diary-search {
    grid-template-columns: 1fr auto;
    border-radius: 16px;
    padding: 10px 12px;
  }

  .diary-search span {
    grid-column: 1 / -1;
  }

  .today-posts-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .today-posts-notice div:last-child {
    width: 100%;
  }

  .today-posts-notice button {
    flex: 1;
  }

  main {
    padding: 14px 14px calc(104px + env(safe-area-inset-bottom));
  }

  .hero {
    min-height: 250px;
    padding: 20px 22px;
  }

  .hero::before {
    background:
      linear-gradient(0deg, rgba(5, 8, 5, 0.88) 0%, rgba(5, 8, 5, 0.46) 48%, transparent 78%);
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero h1.long-home-name {
    max-width: 310px;
    font-size: 29px;
    line-height: 1.08;
  }

  .hero p:last-of-type {
    max-width: 330px;
    font-size: 13px;
    line-height: 1.5;
  }

  .hero-cover {
    object-position: 42% center;
  }

  .overview-head,
  .feed-head,
  .section-title {
    align-items: start;
  }

  .overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
    border: 0;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .overview {
    gap: 10px;
    margin: 12px 0 4px;
    padding: 12px 0 14px;
  }

  .overview-head {
    gap: 8px;
  }

  .overview-head > div {
    gap: 2px;
  }

  .overview-head h2 {
    font-size: 22px;
  }

  .overview-grid article,
  .overview-grid > button {
    min-height: 58px;
    align-content: center;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--line);
  }

  .overview-grid span,
  .overview-grid small {
    font-size: 10px;
  }

  .overview-grid strong {
    font-size: 18px;
    line-height: 1.1;
  }

  .overview-grid small {
    display: none;
  }

  .overview-progress {
    height: 4px;
  }

  .carousel-button {
    display: none !important;
  }

  #galleryHead {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  #galleryHead .status-line {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .auth-row,
  .form-grid,
  .link-row,
  .food-option-row {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 8px;
    gap: 12px;
  }

  .photo-card,
  .photo-card:nth-child(odd),
  .photo-card:nth-child(even) {
    grid-row-end: span var(--masonry-span, 1);
  }

  .photo-card:nth-child(even) {
    margin-top: 0;
  }

  .recipes-list,
  .recipe-columns,
  .recipe-form-actions,
  .wish-form-actions,
  .weekend-form-actions {
    grid-template-columns: 1fr;
  }

  .wishlist-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .wish-card {
    gap: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
  }

  .wish-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .wish-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 7px;
    margin-top: auto;
  }

  .wish-actions button {
    width: 100%;
    min-height: 34px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .wish-actions .danger {
    grid-column: 1 / -1;
  }

  .wish-card-layout,
  .wish-complete-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .wish-card h3 {
    font-size: 19px;
    line-height: 1.16;
    word-break: break-word;
  }

  .wish-meta {
    gap: 6px;
  }

  .wish-meta span,
  .wish-state-pill,
  .wish-seq {
    font-size: 10px;
  }

  .wish-card p:not(.kicker).wish-note,
  .wish-complete-note {
    font-size: 12px;
    line-height: 1.55;
  }

  .wish-card-image-button,
  .wish-card-image-button .wish-card-image,
  .wish-card-placeholder {
    min-height: 156px;
  }

  .wish-card-image-button {
    order: 1;
  }

  .wish-card-content {
    order: 0;
    gap: 8px;
  }

  .wish-card-content .kicker {
    font-size: 10px;
    line-height: 1.35;
  }

  .wish-meta {
    order: -1;
    gap: 5px;
  }

  .wish-meta span {
    padding: 4px 8px;
    font-size: 10px;
  }

  .wish-card-placeholder,
  .wish-complete-preview,
  .wish-complete-preview img,
  .wish-complete-preview div,
  .wish-complete-body textarea {
    min-height: 132px;
  }

  .wish-complete-actions {
    grid-template-columns: 1fr;
  }

  body:not(.mobile-feed-single) .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 6px;
    gap: 8px;
    padding-top: 2px;
  }

  body:not(.mobile-feed-single) .photo-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: none;
  }

  body:not(.mobile-feed-single) .photo-card:nth-child(odd),
  body:not(.mobile-feed-single) .photo-card:nth-child(even) {
    grid-row-end: span var(--masonry-span, 1);
  }

  body:not(.mobile-feed-single) .photo-card .strand-index {
    display: none;
  }

  body:not(.mobile-feed-single) .photo-status-badges {
    top: 6px;
    right: 6px;
    gap: 4px;
  }

  body:not(.mobile-feed-single) .photo-status-badges span {
    border-radius: 4px;
    font-size: 10px;
    padding: 4px 6px;
  }

  body:not(.mobile-feed-single) .photo-media {
    border-radius: 12px 12px 0 0;
  }

  body:not(.mobile-feed-single) .photo-copy-open {
    min-width: 0;
    padding: 9px 10px 4px;
    text-align: left;
  }

  body:not(.mobile-feed-single) .photo-copy-open .kicker {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.mobile-feed-single) .photo-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.mobile-feed-single) .photo-copy-open .diary-excerpt {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  body:not(.mobile-feed-single) .read-more-hint,
  body:not(.mobile-feed-single) .photo-card-comments {
    display: none;
  }

  body:not(.mobile-feed-single) .card-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 10px;
  }

  body:not(.mobile-feed-single) .card-actions button:not(.favorite-photo) {
    display: none;
  }

  body:not(.mobile-feed-single) .card-actions .favorite-photo {
    min-height: 28px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    padding: 0;
  }

  body:not(.mobile-feed-single) .card-actions .favorite-photo.active {
    color: var(--coral);
  }

  body.mobile-feed-single .gallery,
  body.mobile-feed-single .wishlist-list {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }

  body.mobile-feed-single .photo-card,
  body.mobile-feed-single .photo-card:nth-child(odd),
  body.mobile-feed-single .photo-card:nth-child(even) {
    grid-row-end: auto;
  }

  .settings-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 0;
  }

  .settings-dialog > .dialog-close {
    top: calc(12px + env(safe-area-inset-top));
    left: 14px;
  }

  .settings-sidebar {
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: calc(76px + env(safe-area-inset-top)) 16px 14px;
  }

  .settings-sidebar nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .settings-sidebar button {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .settings-content {
    padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
  }

  .settings-group h3 {
    font-size: 24px;
  }

  .settings-group button {
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .settings-group button strong {
    justify-items: start;
    text-align: left;
  }

  .settings-group button strong em {
    max-width: min(72vw, 320px);
  }

  .settings-tool-card {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 14px 0;
  }

  .settings-tool-actions {
    justify-content: stretch;
  }

  .settings-tool-actions button {
    flex: 1 1 0;
  }

  .weekend-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .weekend-date strong {
    font-size: 34px;
  }

  .filters {
    top: calc(136px + env(safe-area-inset-top));
  }

  h2 {
    font-size: 29px;
  }
}

@media (max-width: 390px) {
  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }
}
