@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --forest: #3D503D;
  --sage: #899A7E;
  --cream: #F7F3EA;
  --linen: #DFD3BF;
  --charcoal: #383A34;
  --muted: #62685d;
  --page: #fcf9f2;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --tint: #e9ece3;
  --radius: 12px;
  --space: 4px;
  --inset: calc(4 * var(--space));
  --gutter: clamp(var(--inset), 4vw, 56px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  padding-top: env(safe-area-inset-top);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--charcoal);
  font: 400 1.0625rem/1.5 var(--sans);
}
h1, h2 { margin: 0; color: var(--charcoal); font: 600 1.28rem/1.25 var(--sans); overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 4vw, 2rem); letter-spacing: -.035em; }
.gallery-heading h1, .album-caption h2 { font: 600 clamp(1.9rem, 4.5vw, 2.25rem)/1.08 var(--serif); color: var(--forest); }
.album-caption h2 { font-size: clamp(1.65rem, 3vw, 1.85rem); }
p { margin: .65em 0 1em; }
a { color: var(--forest); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.skip-link { position: fixed; top: -8em; left: 1em; z-index: 5; background: var(--page); padding: .7em 1em; }
.skip-link:focus { top: .5em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.masthead { border-bottom: 1px solid var(--linen); }
.masthead-inner, main { width: min(100%, 80rem); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.masthead-inner, .brand, nav, nav a, .compact, .member, .actions, .back-link, .album-caption, .gallery-heading {
  display: flex;
  align-items: center;
}
.masthead-inner { min-height: 86px; display: grid; grid-template-columns: 1fr auto 1fr; }
.masthead .brand { grid-column: 2; justify-self: center; }

.brand { gap: .72rem; text-decoration: none; font: 600 2.28rem/1.1 var(--serif); letter-spacing: .045em; }
.brand img { width: 46px; height: 46px; }
nav { gap: 1rem; }
nav a {
  gap: .5em;
  min-height: 44px;
  min-width: 44px;
  padding: .35em .85em;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius);
}
nav a[aria-current] { color: var(--forest); background: var(--tint); font-weight: 600; }
.icon { flex: none; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
main { flex: 1; padding-block: clamp(2rem, 5vw, 4.5rem); min-width: 0; }
main:focus { outline: none; }

/* The cover weave and binding are drawn in CSS and scale with the album. */
.cloth {
  background-color: var(--forest);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 2px, #ffffff0a 2px 3px),
    repeating-linear-gradient(90deg, transparent 0 2px, #202a222b 2px 3px);
  position: relative;
  isolation: isolate;
}
.cloth::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5%;
  background: linear-gradient(90deg, #16241736, transparent 70%, #192b1d55 95%, #f7f3ea35);
  pointer-events: none;
}
.auth-book { display: grid; grid-template-columns: .95fr 1.15fr; max-width: 55rem; margin: clamp(0px, 2vw, 2rem) auto; background: var(--page); border: 1px solid var(--linen); box-shadow: 0 4px 0 -2px var(--page), 0 5px 0 -2px var(--linen), 0 12px 32px #463b2c0e; }
.book-cover { min-height: 26rem; padding: 1.45rem 1.45rem 1.45rem 2rem; display: grid; }
.book-stamp { display: grid; align-content: center; justify-items: center; gap: 1.15rem; color: var(--cream); border: 1px solid #dfd3bf70; outline: 1px solid #dfd3bf40; outline-offset: -5px; text-align: center; }
.book-stamp img, .album-seal { background: var(--cream); border-radius: 50%; }
.book-stamp img { width: 6rem; padding: .55rem; aspect-ratio: 1; }
.book-stamp span { max-width: 7ch; font: 600 3.4rem/.92 var(--serif); letter-spacing: -.025em; }
.auth-page { padding: clamp(1.5rem, 4vw, 3.75rem); align-self: center; }
.auth-page h1 { font: 600 clamp(2.3rem, 4.5vw, 3.25rem)/1.1 var(--serif); color: var(--forest); }
.auth-page > p, .panel > p { color: var(--muted); }
.auth-page form { margin-top: 1.5rem; }
.auth-page button { width: 100%; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  min-width: 44px;
  padding: .55em 1.15em;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  color: var(--cream);
  background: var(--forest);
  font: 600 1rem/1.3 var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.secondary { background: transparent; color: var(--forest); border-color: #a6ab99; }
button:disabled { opacity: .6; cursor: wait; }
summary.button { list-style: none; }
summary.button::-webkit-details-marker { display: none; }
details[open] > summary .icon { transform: rotate(45deg); }
label { display: block; font-weight: 600; font-size: .98rem; }
input, textarea { display: block; width: 100%; min-width: 0; margin: .35rem 0 1rem; padding: .65rem .8rem; border: 1px solid #a8ab9b; border-radius: var(--radius); color: var(--charcoal); background: #fffdf8; font: 400 1rem/1.4 var(--sans); }
textarea { resize: vertical; }
input[readonly] { background: var(--cream); }
input[type=file] { padding: .4rem; }
input::file-selector-button { margin-right: .6em; padding: .45em .75em; border: 0; background: var(--tint); color: var(--forest); font: 600 1rem var(--sans); cursor: pointer; }
.muted, .member small, .activity-status { color: var(--muted); font-size: .9375rem; }
form > small { display: block; margin: -.5rem 0 1rem; }
.error, #photo-error { color: #883e35; font-size: .95rem; }
.error:empty, .activity-status:empty, .like-names:empty, .comments:empty { display: none; }
.panel { border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--linen); background: var(--page); }
.panel form { max-width: 36rem; }
.actions { gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }

.create-gallery { margin-bottom: 1.25rem; }
.create-gallery > summary { display: flex; width: fit-content; margin-left: auto; }
.create-gallery form { margin-top: 1rem; max-width: 42rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 2.3rem clamp(1.25rem, 3vw, 2rem); }
.gallery-card { display: block; min-width: 0; text-decoration: none; }
.album-cover { display: grid; aspect-ratio: 1.45; align-items: center; justify-items: center; padding: 3.75% 4.5% 3.75% 7%; border-radius: 2px 5px 3px 2px; box-shadow: 0 3px 9px -5px #383a3470; }
.album-mat { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; }
.mounted { background: var(--page); padding: 1%; }
.cover-photo { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.unfilled { border: 1px solid #dfd3bf70; outline: 1px solid #dfd3bf40; outline-offset: -5px; }
.album-seal { display: grid; place-items: center; width: 26%; aspect-ratio: 1; }
.album-seal img { width: 83%; }
.album-caption { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem; text-align: center; margin-top: 1.05rem; }
.album-caption h2 { grid-column: 2; }
.album-caption .icon { justify-self: end; width: .9em; }
.gallery-card p { color: var(--muted); margin: .25rem 0 0; overflow-wrap: anywhere; }
.back-link { width: fit-content; min-height: 44px; text-decoration: none; display: inline-flex; column-gap: .45em; margin-bottom: .25rem; font-size: .98rem; text-underline-offset: 3px; }
.gallery-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; text-align: start; }
.gallery-heading #add-photos { justify-self: end; }
.gallery-heading h1 { min-width: 0; }
#add-photos { flex: none; border-radius: 99px; white-space: nowrap; }
.gallery-description { margin: .45em 0 0; overflow-wrap: anywhere; }
#gallery-photos { margin-top: 1.5rem; }
.empty { text-align: center; padding: 3rem 1rem; border: 1px solid var(--linen); background: var(--page); }
.empty img { width: 4rem; margin-bottom: .5em; }
.empty h2 { font-size: 1.8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: var(--space); }
.day-heading { grid-column: 1 / -1; padding: 1.4rem 0 .45rem; font: 600 .94rem/1.4 var(--sans); color: var(--muted); letter-spacing: .005em; }
.day-heading:first-child { padding-top: 0; }
.photo { display: block; aspect-ratio: 1; min-width: 0; padding: 0; background: var(--linen); border: 0; border-radius: 3px; overflow: hidden; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo[data-mine="true"] { border: 2px solid var(--sage); }
.photo:focus-visible { z-index: 1; }
.upload-list, .comments { list-style: none; padding: 0; }
.upload-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; padding: .65rem 0; border-top: 1px solid var(--linen); }
.upload-list strong { overflow-wrap: anywhere; }
.upload-list span { color: var(--muted); }
.upload-list progress { width: 100%; accent-color: var(--forest); }

.compact, .member { gap: 1rem; justify-content: space-between; }
.compact > :first-child, .member > :first-child { min-width: 0; overflow-wrap: anywhere; }
.compact button, .member button { flex: none; }
.account-page { max-width: 46rem; margin: auto; }
.account-page .panel { margin-top: 1.3rem; }
.account-page .compact p { margin: .3em 0 0; }
.member { border-top: 1px solid var(--linen); padding: 1rem 0; }
.member:first-of-type { margin-top: 1rem; }
.member:last-of-type { padding-bottom: 0; }
.member small { display: block; overflow-wrap: anywhere; }
#invite-result:not(:empty) { margin-top: 1.25rem; }
.photo-view { color: var(--charcoal); background: var(--page); width: min(92vw, 53rem); max-width: none; max-height: 90vh; max-height: 90dvh; padding: clamp(1rem, 3vw, 2rem); border: 0; border-radius: 20px; overflow: auto; overscroll-behavior: contain; }
.photo-view::backdrop { background: #1f281fe3; }
.photo-view .compact { margin-bottom: 1rem; }
.photo-view .compact strong { font-weight: 600; }
.photo-view-controls { display: flex; gap: .35rem; }
.photo-view-controls button { padding-inline: .7em; }
.print-mat { position: relative; display: grid; place-items: center; background: var(--cream); border-radius: 8px; overflow: hidden; }
.print-mat img { display: block; width: 100%; max-height: 58vh; max-height: 58dvh; object-fit: contain; }
.print-mat { touch-action: pan-y pinch-zoom; }
.photo-step, .spotlight-close {
  position: absolute;
  z-index: 1;
  width: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  border-color: transparent;
  color: white;
  background: #171914c9;
}
.photo-step { top: 50%; transform: translateY(-50%); }
.photo-step .icon, .spotlight-close .icon { pointer-events: none; }
.photo-step:disabled { opacity: .28; cursor: default; }
.photo-prev { left: max(.4rem, env(safe-area-inset-left)); }
.photo-prev .icon { transform: rotate(180deg); }
.photo-next { right: max(.4rem, env(safe-area-inset-right)); }
.photo-step:focus-visible, .spotlight-close:focus-visible { outline-color: white; outline-offset: -4px; }
.photo-spotlight {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(.3rem, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right))
    max(.6rem, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));
  border: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #060606;
  color: white;
  cursor: zoom-out;
  animation: spotlight-in .24s ease-out;
}
.photo-spotlight::backdrop { background: #060606; animation: spotlight-in .24s ease-out; }
.spotlight-close { top: max(.5rem, env(safe-area-inset-top)); right: max(.4rem, env(safe-area-inset-right)); }
.slide-rail { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y pinch-zoom; }
.slide-rail::-webkit-scrollbar { display: none; }
.slide { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0 3px; scroll-snap-align: center; scroll-snap-stop: always; }
.slide img { display: block; width: 100%; height: auto; max-height: 100%; min-height: 0; flex: 0 1 auto; object-fit: contain; }
.slide figcaption { width: min(100%, 44rem); flex: none; height: min(5.5rem, 20%); overflow-y: auto; padding: .65rem 1rem; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 1.0625rem/1.45 var(--sans); }
.spotlight-status { position: absolute; bottom: max(.75rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: white; background: #171914eb; border-radius: var(--radius); text-align: center; }
.spotlight-status:has(span:empty):not(:has(button:not([hidden]))) { display: none; }
.spotlight-status span:not(:empty), .spotlight-status button { display: inline-block; margin: .5rem; }
.spotlight-status button { color: white; }
@keyframes spotlight-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .photo-spotlight, .photo-spotlight::backdrop { animation: none; }
}
.photo-caption { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 1.0625rem/1.5 var(--sans); }
.caption-editor { margin-block: .75rem; }
.caption-form { margin-top: .75rem; max-width: 38rem; }
.photo-menu { position: relative; margin-inline-start: auto; }
.photo-menu summary { border-radius: 99px; padding-inline: .85em; }
.photo-menu[open] > summary .icon { transform: none; }
.photo-menu-items {
  position: absolute;
  z-index: 1;
  top: calc(100% + .35rem);
  right: 0;
  width: 12rem;
  padding: .3rem;
  border: 1px solid var(--linen);
  background: var(--page);
  box-shadow: 0 5px 12px #383a3420;
  border-radius: .5rem;
  display: grid;
}
.photo-menu-items .button, .photo-menu-items button { justify-content: flex-start; border-color: transparent; padding-inline: .65em; }
.photo-menu-items p { margin: .3rem .65rem; }
.delete-photo { color: #7c4239; }
.photo-activity { margin-top: .5rem; }
.photo-activity h2 { margin-top: 1.2rem; }
.photo-actions [aria-pressed=true] { background: var(--tint); border-color: var(--sage); }
.photo-actions [aria-pressed=true] .icon { fill: var(--forest); }
.like-names { margin: .55em 0; overflow-wrap: anywhere; }
.comments { margin: .6em 0 1.25em; }
.comments li { border-bottom: 1px solid var(--linen); padding: .85rem 0; }
.comment-byline { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15em .75em; overflow-wrap: anywhere; }
.comment-byline time { font-size: .85rem; color: var(--muted); }
.comments p { white-space: pre-wrap; overflow-wrap: anywhere; margin: .25rem 0 0; }
.comment-form { margin-top: 1rem; }
@media (hover: hover) {
  nav a:hover, .secondary:hover { background: var(--tint); }
  button:not(.secondary, .photo):enabled:hover { background: #304230; }
  .gallery-card:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .13em; }
  .photo:hover { border-color: var(--sage); }
  button.photo-step:enabled:hover, button.spotlight-close:enabled:hover { background: #171914; }
}
nav .selected-glyph, nav [aria-current] .normal-glyph { display: none; }
nav [aria-current] .selected-glyph { display: inline; }
:where(button, .button, nav a, .gallery-card) { -webkit-tap-highlight-color: transparent; }
button:enabled:active, .button:active, .gallery-card:active { filter: brightness(.92); }
.secondary { border-color: #c7cdbe; }
.photo-actions { gap: .4rem; }
.photo-actions > .secondary, .photo-menu > summary, .photo-view-controls button, .icon-button { border: 0; background: var(--tint); border-radius: 99px; }
.photo-view-controls button, .icon-button, .photo-menu > summary { width: 44px; padding: 0; }
.photo-info { overflow-wrap: anywhere; padding: .4rem; }
.photo-menu-items { z-index: 3; }
.delete-photo { border-top: 1px solid var(--linen) !important; }
.photo-caption { margin: .85rem 0 .4rem; }
.caption-editor summary { border: 0; padding-inline: 0; font-size: .9rem; }
.account-logout { margin-block: 1.25rem; color: #7c4239; }
#gallery-upload-status, #batch-summary { margin: .5rem 0 0; }
#gallery-upload-status:empty, #batch-summary:empty { display: none; }
.upload-sheet { box-sizing: border-box; position: fixed; inset: min(var(--anchor-y, 10vh), 28dvh) var(--anchor-right, var(--gutter)) auto auto; margin: 0; width: min(27rem, 94vw); max-height: min(84dvh, calc(98dvh - min(var(--anchor-y, 10vh), 28dvh))); overflow: auto; overscroll-behavior: contain; padding: 1.25rem; border: 1px solid var(--linen); border-radius: 18px; background: var(--page); color: var(--charcoal); }
.upload-sheet::backdrop { background: #222c2459; }
.upload-sheet header { margin-bottom: 1rem; }
.upload-sheet summary { padding-block: .75rem; min-height: 44px; cursor: pointer; }
.upload-sheet .upload-list { margin: 0; }
.empty { border-radius: var(--radius); }
.empty button { margin-top: 1rem; }
.comment-form textarea { scroll-margin: 2rem; }
@media (prefers-reduced-motion: reduce) {
  .slide-rail { overflow-x: hidden; touch-action: pan-y pinch-zoom; }
}
nav { position: fixed; z-index: 2; inset: auto 0 0; width: 100%; justify-content: center; gap: 1rem; background: var(--page); border-top: 1px solid var(--linen); padding: .25rem .75rem max(.25rem, env(safe-area-inset-bottom)); }
nav a { flex: 1; flex-direction: column; justify-content: center; max-width: 12rem; min-height: 49px; padding: .15rem .5rem; gap: 2px; font: 500 .75rem/1.25 var(--sans); }
nav a .icon { width: 23px; height: 23px; }
nav a[aria-current] { background: transparent; }
body:has(nav:not([hidden])) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
@media (max-width: 620px) {
  :root, .masthead { background-color: var(--cream); }
  .masthead-inner { min-height: 106px; padding-top: 34px; }
  .brand img { width: 38px; height: 38px; }
  .brand { font-size: 1.92rem; }
  body[data-screen=album] .brand, body[data-screen=account] .brand { display: none; }
  body[data-screen=album] .masthead-inner, body[data-screen=account] .masthead-inner { display: none; }
  body[data-screen=album] .masthead, body[data-screen=account] .masthead { border: 0; }
  main { padding-top: 1.25rem; }
  .auth-book { max-width: 27rem; display: block; border: 0; box-shadow: none; background: transparent; }
  .auth-page { padding: 1rem 0; }
  .book-cover { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-description { font-size: 1rem; color: var(--muted); }
  .photo-view { width: 100%; max-height: 96dvh; margin: auto auto 0; border-radius: 20px 20px 0 0; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .upload-sheet { inset: auto 0 0; width: 100%; max-width: 100%; max-height: 86dvh; border: 0; border-radius: 20px 20px 0 0; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .member { flex-wrap: wrap; }
}

/* Account gallery permissions */
.gallery-scope { border: 1px solid var(--linen); border-radius: var(--radius); padding: .65rem .85rem; margin: .8rem 0 1rem; min-width: 0; }
.gallery-scope legend { font-weight: 600; color: var(--forest); padding: 0 .3rem; }
.gallery-scope label { display: flex; align-items: center; gap: .65rem; padding: .3rem 0; font-weight: 400; }
.gallery-scope input[type=checkbox] { flex: none; width: 1.15rem; height: 1.15rem; margin: 0; padding: 0; accent-color: var(--forest); }
.gallery-scope label:has(input:disabled) { opacity: .65; }
.member-entry { border-top: 1px solid var(--linen); padding: .85rem 0; }
.member-entry .member { margin: 0; padding: 0; border: 0; }
.member-access { margin-top: .6rem; }
.member-access summary { cursor: pointer; color: var(--forest); font-weight: 600; }
.admin-access { margin: .5rem 0 0; }

/* Upload completion: a centered card morphs out of the upload sheet. */
.upload-complete {
  box-sizing: border-box; position: fixed; inset: 0; margin: auto;
  width: min(20rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  overflow: auto; padding: 2.35rem 1.5rem 1.8rem;
  border: 1px solid var(--linen); border-radius: 26px;
  background: var(--page); color: var(--charcoal);
  text-align: center; box-shadow: 0 14px 48px #18291b26;
  transform-origin: center;
}
.upload-complete::backdrop { background: #222c2459; }
.upload-complete .upload-complete-close {
  position: absolute; top: .65rem; right: .65rem; width: 44px; height: 44px;
}
.upload-complete-mark {
  display: grid; place-items: center; width: 66px; height: 66px;
  margin: 0 auto 1rem; border-radius: 50%;
  background: var(--tint); color: var(--forest);
}
.upload-complete-mark .icon { width: 36px; height: 36px; stroke-width: 2.2; }
.upload-complete h2 { font-size: 1.9rem; margin: 0 0 .35rem; }
.upload-complete p { margin: 0; overflow-wrap: anywhere; }
.upload-complete p span { display: block; margin-top: .35rem; }

/* Private family activity feed */
.activity-nav-icon { position: relative; display: inline-flex; }
.activity-dot { position: absolute; top: -2px; right: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--forest); border: 1px solid var(--page); }
.activity-dot[hidden], .photo-view [hidden] { display: none !important; }
.activity-page { max-width: 42rem; margin: 0 auto; }
.activity-controls { display: grid; gap: .9rem; padding-bottom: .85rem; border-bottom: 1px solid var(--linen); }
.activity-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.activity-heading h1 { margin: 0; color: var(--forest); font: 600 clamp(2rem,4.5vw,2.5rem)/1.05 var(--serif); letter-spacing: -.015em; }
.activity-heading .feed-refresh { width: 44px; height: 44px; padding: 0; border-radius: 50%; border-color: #d5d9ce; background: var(--page); }
.feed-refresh .icon { width: 20px; height: 20px; }
.feed-filters { display: grid; grid-template-columns: .76fr .92fr 1.28fr 1.12fr; gap: 3px; padding: 4px; margin: 0; border-radius: 14px; background: #e8e9e0; }
.feed-filters .feed-filter { min-width: 0; min-height: 44px; padding: .45rem .15rem; border-radius: 10px; font: 500 .875rem/1.2 var(--sans); white-space: nowrap; background: transparent; color: var(--muted); border: 1px solid transparent; transition: background-color .18s ease,color .18s ease,box-shadow .18s ease; }
.feed-filters .feed-filter[aria-pressed=true] { background: var(--page); color: var(--forest); border-color: #dce0d5; font-weight: 600; box-shadow: 0 1px 3px #383a3410; }
.feed-filters .feed-filter:focus-visible { outline-offset: -2px; }
.feed-gallery-label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-width: 0; min-height: 44px; color: var(--muted); font: 500 .875rem/1.3 var(--sans); margin: 0; }
.feed-gallery-title { display: inline-flex; align-items: center; gap: .45rem; flex: none; }
.feed-gallery-title .icon { width: 17px; height: 17px; }
.feed-select-wrap { position: relative; min-width: 0; max-width: min(72%, 20rem); }
.feed-select-wrap select { display: block; width: 100%; max-width: 100%; min-height: 44px; appearance: none; -webkit-appearance: none; border: 1px solid #d5d9ce; border-radius: 10px; color: var(--forest); background: var(--page); font: 500 1rem/1.25 var(--sans); padding: .55rem 2rem .55rem .75rem; text-overflow: ellipsis; cursor: pointer; }
.feed-select-wrap > .icon { position: absolute; pointer-events: none; right: .65rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
@media (max-width: 350px) { .feed-filters .feed-filter { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .feed-filters .feed-filter { transition: none; } }
.activity-day { font: 600 .75rem/1.4 var(--sans); color: var(--muted); margin: 1.2rem 0 .25rem; letter-spacing: .085em; text-transform: uppercase; }
.feed-event { display: flex; align-items: flex-start; gap: .7rem; border-bottom: 1px solid var(--linen); padding: .95rem 0; }
.feed-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--tint); color: var(--forest); }
.feed-icon .icon { width: 20px; height: 20px; }
.feed-icon.likes { color: #8e514c; }
.feed-copy { flex: 1; min-width: 0; }
.feed-copy p { margin: 0; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.45; }
.feed-copy strong { font-weight: 600; }
.feed-copy .feed-comment { margin-top: .35rem; white-space: pre-wrap; }
.feed-copy .feed-meta { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.feed-meta a { color: var(--forest); }
.activity-thumbnail, .feed-more-photos { flex: none; width: 58px; height: 58px; min-height: 0; display: grid; place-items: center; padding: 0; overflow: hidden; border: 1px solid var(--linen); border-radius: 9px; background: var(--tint); color: var(--forest); }
.activity-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.feed-photos { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .65rem; }
.feed-more-photos { text-decoration: none; font-weight: 600; }
@media (max-width: 620px) {
 body[data-screen=activity] .masthead-inner { display: none; }
 body[data-screen=activity] .masthead { border: 0; }
 body[data-screen=activity] main { padding-top: .85rem; }
 nav { gap: .4rem; }
}
