:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --white: #fffcf7;
  --ink: #333e35;
  --muted: #6b6f65;
  --accent: #a85338;
  --line: #e4dfd5;
  --motion-fast: 140ms;
  --motion-medium: 240ms;
  --motion-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
.plus-badge {
  margin-left: 0.35rem;
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
:focus-visible {
  outline: 3px solid #b97b50;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.wrap {
  max-width: 1220px;
  padding: 0 40px;
  margin: auto;
}
.header {
  height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  font:
    600 36px Georgia,
    serif;
  letter-spacing: -2px;
  gap: 10px;
  white-space: nowrap;
}
.brand-beta {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid #cdbda6;
  border-radius: 4px;
  background: #eee8dd;
  color: #74583e;
  font: 600 9px/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-logo {
  display: block;
  width: 200px;
  height: auto;
  flex: 0 0 auto;
}
.ks-home .brand-logo {
  width: 140px;
}
.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.footer-brand .brand-logo {
  width: 170px;
}
@media (max-width: 600px) {
  .brand-logo {
    width: 160px;
  }
}
@media (max-width: 360px) {
  .header .brand-logo {
    width: 135px;
  }
}
.brand-plus {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
  font: 700 9px/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
}
@media (max-width: 480px) {
  .brand-beta {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    padding: 1px 4px;
    font-size: 8px;
  }
  .brand svg ~ .brand-beta {
    left: 32px;
  }
}
.brand svg {
  width: 30px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}
@media (max-width: 360px) {
  .header .brand-plus {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    padding: 1px 4px;
    font-size: 8px;
  }
  .header .brand svg ~ .brand-plus {
    left: 32px;
  }
  .header .brand-plus ~ .brand-beta {
    left: 44px;
  }
  .header .brand svg ~ .brand-plus ~ .brand-beta {
    left: 76px;
  }
}
.brand-note {
  font: 12px sans-serif;
  letter-spacing: 0;
  color: var(--muted);
  margin: 7px 0 0 15px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
}
#account-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.privacy {
  color: var(--muted);
  font-size: 12px;
}
.privacy span {
  color: var(--accent);
  font-size: 18px;
  margin-right: 5px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 550;
  background: none;
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.button:active:not(:disabled) {
  transform: translateY(0);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.button.primary:hover {
  background: #91442d;
}
.button.secondary {
  background: var(--white);
}
.button.secondary:hover,
.button.subtle:hover {
  background: #eee8dd;
}
.button.destructive {
  color: white;
  background: #963d32;
  border-color: #963d32;
}
.button.destructive:hover {
  background: #782f28;
}
.button.destructive:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.button.small {
  padding: 10px 14px;
}
.button.full {
  width: 100%;
}
a.button {
  text-decoration: none;
}
.text-button {
  background: none;
  border: 0;
  padding: 6px 0;
  font-size: 12px;
  color: var(--accent);
  text-underline-offset: 4px;
  transition: color var(--motion-fast) ease;
}
.text-button:hover {
  text-decoration: underline;
}
.eyebrow {
  font:
    12px/1.8 ui-monospace,
    monospace;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 49px 0 63px;
}
h1 {
  font:
    400 clamp(40px, 4.7vw, 61px) / 1.13 Georgia,
    serif;
  letter-spacing: -2.5px;
  margin: 20px 0 24px;
}
h1 em {
  color: var(--accent);
  font-weight: 400;
}
.hero-description {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 25px;
}
.hero-caption {
  font-size: 13px;
  margin-left: 15px;
  color: var(--muted);
}
.travel-art {
  height: 320px;
  position: relative;
}
.postcard {
  width: 290px;
  background: var(--white);
  padding: 11px;
  position: absolute;
  left: 10px;
  top: 17px;
  transform: rotate(-8deg);
  box-shadow: 1px 7px 23px #594a321b;
  border: 1px solid #ebe3d5;
}
.landscape {
  height: 207px;
  position: relative;
  overflow: hidden;
  background: #dce4de;
}
.sun {
  position: absolute;
  right: 48px;
  top: 31px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e9ba76;
}
.mountain {
  position: absolute;
  width: 300px;
  height: 210px;
  transform: rotate(37deg);
  border-radius: 23px;
}
.mountain.back {
  left: -148px;
  top: 85px;
  background: #a6b8a6;
}
.mountain.front {
  right: -171px;
  top: 99px;
  background: #5d7866;
}
.sea {
  position: absolute;
  width: 125%;
  height: 43px;
  background: #99b9b5;
  left: -10px;
  bottom: -18px;
  transform: rotate(-8deg);
}
.postcard-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 3px;
  font:
    italic 12px Georgia,
    serif;
  color: var(--muted);
}
.postcard-caption span {
  font-size: 24px;
  color: var(--accent);
}
.round-stamp {
  position: absolute;
  right: -5px;
  top: 14px;
  width: 117px;
  height: 117px;
  border: 1px dashed #a67857;
  outline: 1px solid #a6785760;
  outline-offset: -6px;
  border-radius: 50%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font:
    7px/1.6 ui-monospace,
    monospace;
  letter-spacing: 0.6px;
  transform: rotate(14deg);
  color: var(--accent);
  background: #f8f5efc9;
}
.round-stamp span {
  font:
    italic 19px Georgia,
    serif;
  letter-spacing: -0.4px;
}
.ticket {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 250px;
  padding: 19px 20px;
  border: 1px solid #d8cebd;
  background: #ede7d8;
  transform: rotate(5deg);
  box-shadow: 1px 4px 10px #594a320c;
}
.ticket span {
  display: block;
  font:
    7px ui-monospace,
    monospace;
  letter-spacing: 1.2px;
  color: var(--muted);
}
.ticket strong {
  display: block;
  font:
    17px Georgia,
    serif;
  margin: 11px 0;
}
.ticket i {
  display: block;
  border-top: 1px dashed #cbbfa9;
  padding-top: 10px;
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 2px;
  color: var(--muted);
}
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.25fr;
  gap: 24px;
}
.stats > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.stats strong {
  font:
    31px Georgia,
    serif;
}
.stats span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 80px;
}
.stats p {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  font:
    italic 14px/1.6 Georgia,
    serif;
  color: var(--muted);
}
.journal {
  padding: 45px 0 0;
  min-height: 400px;
  scroll-margin-top: 25px;
}
.journal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
h2 {
  font:
    400 29px/1.3 Georgia,
    serif;
  letter-spacing: -0.7px;
}
.journal-heading h1 {
  margin-top: 4px;
}
.journal-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.create-menu {
  position: relative;
}
.create-menu > summary {
  list-style: none;
  min-width: 92px;
}
.create-menu > summary::-webkit-details-marker {
  display: none;
}
.create-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  width: 260px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 14px 38px #33271f24;
}
.create-menu-popover button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
.create-menu-popover button:hover,
.create-menu-popover button:focus-visible {
  background: #eee8dd;
}
.create-menu-popover strong {
  font-size: 13px;
}
.create-menu-popover span {
  color: var(--muted);
  font-size: 11px;
}
.signed-in .header {
  position: sticky;
  top: 0;
  z-index: 9;
  height: 70px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(16px);
}
.signed-in .brand {
  font-size: 28px;
  letter-spacing: -1.4px;
}
.signed-in .brand-note {
  display: none;
}
.signed-in .journal {
  padding-top: 12px;
}
.signed-in .journal-heading {
  justify-content: flex-end;
  margin-bottom: 10px;
}
.signed-in .journal-heading > div:first-child {
  display: none;
}
.signed-in .journal .stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
  padding: 11px 0;
}
.signed-in .stats > div {
  gap: 7px;
}
.signed-in .stats strong {
  font-size: 21px;
}
.signed-in .stats span {
  max-width: none;
  font-size: 12px;
}
.signed-in .stats p {
  display: none;
}
.signed-in .journal-toolbar {
  position: sticky;
  top: 70px;
  z-index: 7;
  margin: 0 0 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(16px);
}
.signed-in .filter-row {
  margin: 10px 0 14px;
}
.signed-in .trip-context {
  gap: 20px;
  margin: 10px 0 16px;
  padding: 18px;
}
.signed-in .trip-cover {
  min-height: 150px;
}
.signed-in .trip-context h2 {
  font-size: clamp(28px, 3vw, 38px);
}
.signed-in .tl-toolbar {
  padding: 8px 0 12px;
}
.signed-in .tl-year-section {
  padding: 20px 0 40px;
}
.signed-in .tl-year-heading {
  margin-bottom: 17px;
}
.signed-in .tl-year {
  font-size: clamp(50px, 6vw, 78px);
  line-height: 0.9;
}
.journal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0;
}
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filters input,
.filters select {
  padding: 11px;
  font-size: 13px;
  background: transparent;
}
.search-field {
  width: 230px;
}
.empty-state {
  min-height: 315px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px dashed #dcd7cb;
  border-radius: 10px;
  background: #fffcf740;
  padding: 28px 20px;
}
.empty-pin {
  color: var(--accent);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #eee8db;
  font-size: 32px;
  margin-bottom: 17px;
  display: grid;
  place-items: center;
}
.empty-state h3,
.no-results h3 {
  font:
    23px Georgia,
    serif;
  letter-spacing: -0.5px;
}
.empty-state p,
.no-results p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin: 12px 0 20px;
}
#empty-account-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.journal-skeleton {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(270px, 29%);
  align-items: start;
  gap: 24px;
  padding: 38px 0 60px;
}
.journal[aria-busy="true"] .journal-actions,
.journal[aria-busy="true"] .connection-status,
.journal[aria-busy="true"] .notice,
.journal[aria-busy="true"] .invitations,
.journal[aria-busy="true"] .stats,
.journal[aria-busy="true"] .journal-toolbar,
.journal[aria-busy="true"] .timeline-visibility,
.journal[aria-busy="true"] .trip-context,
.journal[aria-busy="true"] .filter-row,
.journal[aria-busy="true"] .tl-filter-chips,
.journal[aria-busy="true"] .empty-state,
.journal[aria-busy="true"] .no-results,
.journal[aria-busy="true"] #story-layout,
.journal[aria-busy="true"] #trip-list,
.journal[aria-busy="true"] #photo-wall,
.journal[aria-busy="true"] #places,
.journal[aria-busy="true"] #map-panel {
  display: none;
}
.skeleton-story {
  display: grid;
  gap: 13px;
}
.skeleton-year,
.skeleton-heading,
.skeleton-meta,
.skeleton-photos > div,
.skeleton-line,
.skeleton-map {
  background: linear-gradient(100deg, #ebe5da 20%, #f7f3eb 38%, #ebe5da 56%);
  background-size: 220% 100%;
  animation: skeleton-shift 1.35s ease-in-out infinite;
}
.skeleton-year {
  width: 34px;
  height: 112px;
  border-radius: 4px;
}
.skeleton-heading {
  width: min(72%, 440px);
  height: 58px;
  border-radius: 6px;
}
.skeleton-meta {
  width: min(48%, 280px);
  height: 14px;
  border-radius: 7px;
}
.skeleton-photos {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 8px;
  height: 250px;
}
.skeleton-photos > div {
  border-radius: 6px;
}
.skeleton-line {
  width: 35%;
  height: 12px;
  border-radius: 6px;
}
.skeleton-map {
  height: 340px;
  border-radius: 10px;
}
@keyframes skeleton-shift {
  to {
    background-position-x: -220%;
  }
}
.connection-status {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 22px;
  padding: 12px 15px;
  border: 1px solid #d5c6a5;
  border-radius: 7px;
  background: #f5edda;
  color: #5b4a31;
  font-size: 13px;
  line-height: 1.5;
}
.connection-status[hidden] {
  display: none;
}
.no-results {
  padding: 50px 0;
  text-align: center;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.entry-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  overflow: hidden;
  text-align: left;
  padding: 0;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
  min-width: 0;
}
.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px #483b2710;
}
.entry-cover {
  display: block;
  width: 100%;
  height: 195px;
  object-fit: cover;
  background: #e6e9df;
}
.entry-placeholder {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    italic 45px Georgia,
    serif;
  color: var(--muted);
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, #bba98518 23px 24px),
    #eee9dd;
}
.entry-copy {
  padding: 20px;
}
.entry-country {
  font:
    12px ui-monospace,
    monospace;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  overflow-wrap: anywhere;
}
.entry-place {
  margin: -5px 0 9px;
  color: var(--muted);
  font-size: 12px;
}
.entry-city {
  font:
    27px Georgia,
    serif;
  margin: 10px 0 8px;
  overflow-wrap: anywhere;
}
.entry-date {
  font-size: 13px;
  color: var(--muted);
}
.entry-experience {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.entry-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.entry-foot span:last-child {
  color: var(--accent);
}
.photo-wall {
  margin-top: 24px;
}
.photo-wall-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.photo-wall-heading .eyebrow {
  margin-bottom: 6px;
}
.photo-wall-heading h2 {
  margin: 0;
  font:
    34px/1.1 Georgia,
    serif;
}
.photo-wall-heading > p {
  color: var(--muted);
  font-size: 13px;
}
.photo-date-scrubber {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 10px 0;
  overflow-x: auto;
  background: linear-gradient(90deg, var(--paper) 92%, transparent);
  scrollbar-width: thin;
}
.photo-date-button {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--muted);
}
.photo-date-button strong {
  color: var(--ink);
  font:
    600 12px ui-monospace,
    monospace;
}
.photo-date-button span {
  font-size: 11px;
}
.photo-date-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #eee7dc;
}
.photo-date-button[aria-pressed="true"] strong {
  color: #fff;
}
.photo-wall-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 10px;
  gap: 10px;
}
.photo-wall-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  break-inside: avoid;
  border: 0;
  border-radius: 7px;
  background: #d9d1c3;
  color: #fff;
  text-align: left;
  box-shadow: 0 5px 20px #493a2620;
  transition:
    transform var(--motion-medium) var(--motion-ease),
    box-shadow var(--motion-medium) ease;
}
.photo-wall-card::after {
  position: absolute;
  inset: 42% 0 0;
  content: "";
  background: linear-gradient(transparent, #1f1915c9);
  pointer-events: none;
}
.photo-wall-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--motion-medium) var(--motion-ease);
}
.photo-wall-card:hover {
  box-shadow: 0 9px 26px #493a2630;
  transform: translateY(-2px);
}
.photo-wall-card:hover img {
  transform: scale(1.025);
}
.photo-shape-0 {
  grid-row: span 18;
}
.photo-shape-1 {
  grid-row: span 15;
}
.photo-shape-2 {
  grid-row: span 10;
}
.photo-shape-3 {
  grid-row: span 22;
}
.photo-shape-4 {
  grid-row: span 12;
}
.photo-wall-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 3px;
  padding: 34px 13px 12px;
}
.photo-wall-caption strong {
  overflow: hidden;
  font:
    18px/1.15 Georgia,
    serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-wall-caption span {
  overflow: hidden;
  color: #f3eee8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1000px) {
  .journal-skeleton {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .skeleton-map {
    display: none;
  }
  .photo-wall-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .journal-skeleton {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }
  .skeleton-year {
    display: none;
  }
  .skeleton-photos {
    height: 210px;
  }
  .photo-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .photo-shape-0 {
    grid-row: span 11;
  }
  .photo-shape-1 {
    grid-row: span 9;
  }
  .photo-shape-2 {
    grid-row: span 6;
  }
  .photo-shape-3 {
    grid-row: span 13;
  }
  .photo-shape-4 {
    grid-row: span 7;
  }
}
.place-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.place-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  text-align: left;
}
.place-card:hover {
  background: #eee8dd;
}
.place-cover {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee8dd;
  place-items: center;
}
.place-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-cover-placeholder {
  font-size: 42px;
}
.place-copy {
  padding: 22px 25px 25px;
}
.place-card .place-flag {
  margin: 0 0 9px;
  font-size: 20px;
}
.place-card h3 {
  font:
    23px Georgia,
    serif;
  overflow-wrap: anywhere;
}
.place-card p {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.place-card .place-cities {
  margin-top: 10px;
}
.place-card .place-last-visited {
  margin-top: 14px;
  color: var(--ink);
  font-weight: 600;
}
.place-card .place-count {
  color: var(--accent);
  font:
    12px ui-monospace,
    monospace;
  margin-top: 16px;
}
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 52px 0;
}
.how-it-works > div {
  padding-left: 30px;
  position: relative;
}
.how-it-works > div > span {
  position: absolute;
  top: 2px;
  left: 0;
  font:
    12px ui-monospace,
    monospace;
  color: var(--accent);
}
.how-it-works h3 {
  font:
    17px Georgia,
    serif;
}
.how-it-works p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 9px;
  line-height: 1.8;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  min-height: 85px;
}
.footer-brand {
  font:
    25px Georgia,
    serif;
}
.footer-brand span {
  font:
    italic 11px Georgia,
    serif;
  color: var(--muted);
  margin-left: 18px;
}
.footer p {
  font-size: 13px;
  color: var(--muted);
}
.footer-copy {
  text-align: right;
}
.footer-copy nav {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 7px;
  font-size: 12px;
}
.footer-copy a,
.legal-agreement a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-agreement {
  line-height: 1.55;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  padding: 32px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 25px 90px #201c2633;
  opacity: 0;
  transform: translateY(8px) scale(0.992);
  transition:
    opacity var(--motion-medium) ease,
    transform var(--motion-medium) var(--motion-ease),
    display var(--motion-medium) allow-discrete,
    overlay var(--motion-medium) allow-discrete;
}
.dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@starting-style {
  .dialog[open] {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
}
dialog::backdrop {
  background: #263a3280;
  backdrop-filter: blur(3px);
  opacity: 1;
  transition:
    opacity var(--motion-medium) ease,
    display var(--motion-medium) allow-discrete,
    overlay var(--motion-medium) allow-discrete;
}
@starting-style {
  dialog[open]::backdrop {
    opacity: 0;
  }
}
.auth-dialog {
  max-width: 410px;
  position: fixed;
}
#account-dialog {
  max-width: 540px;
}
.auth-dialog > .close-button {
  position: absolute;
  right: 20px;
  top: 15px;
}
.dialog h2 {
  margin: 10px 0 13px;
}
.dialog-description {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 24px;
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.close-button {
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  padding: 6px;
  color: var(--muted);
}
form > label,
.form-row > label,
.form-row > .form-field {
  display: block;
  font-size: 12px;
  margin: 19px 0;
}
input,
select,
textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid #dcd8ce;
  border-radius: 5px;
  padding: 12px;
  font-size: 14px;
  min-width: 0;
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}
form label input,
form label select,
form label textarea {
  display: block;
  margin-top: 9px;
}
.form-field > label {
  display: block;
  margin-bottom: 9px;
}
.place-combobox {
  position: relative;
}
.place-options {
  position: absolute;
  inset: calc(100% + 4px) 0 auto;
  z-index: 10;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d0c8ba;
  border-radius: 7px;
  background: var(--white);
  box-shadow: 0 12px 30px #40372c26;
}
.place-options button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.place-options button:hover,
.place-options button[aria-selected="true"] {
  background: #eee8dc;
}
.place-options small {
  color: var(--muted);
  font-size: 12px;
}
.field-error {
  margin: 7px 0 0;
  color: #8c352d;
  font-size: 13px;
  line-height: 1.45;
}
input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: #a64035;
  box-shadow: 0 0 0 2px #a6403517;
}
.date-summary {
  margin: 8px 0 0;
  color: #405c4c;
  font:
    italic 15px/1.5 Georgia,
    serif;
}
textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.8;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
.auth-switch {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}
.google-signin-option {
  margin: 20px 0;
}
.google-signin {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 4px;
  margin: 0 auto;
}
.google-signin img {
  display: block;
  height: 40px;
  width: auto;
}
.google-signin:disabled {
  opacity: 0.55;
  cursor: wait;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
#google-connect-form {
  margin-top: 24px;
}
#account-dialog .account-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
#account-dialog .account-section h3 {
  margin: 0 0 7px;
  font:
    23px Georgia,
    serif;
}
#account-dialog .danger-zone {
  border-color: #d9b4ad;
}
.danger-zone h3 {
  color: #7d3028;
}
.deletion-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}
.deletion-counts li {
  padding: 11px 12px;
  border-radius: 6px;
  background: #f5efe6;
  color: var(--muted);
  font-size: 12px;
}
.deletion-counts strong {
  display: block;
  color: var(--ink);
  font: 20px "IBM Plex Mono", ui-monospace, monospace;
}
.deletion-blocked {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #d9b4ad;
  border-radius: 7px;
  background: #fff8f5;
}
.deletion-blocked > strong {
  color: #7d3028;
}
.deletion-blocked ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
}
#account-delete-form,
#account-delete-reauthenticate {
  margin-top: 16px;
}
.account-style-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}
.account-style-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}
.account-style-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: #fffaf5;
}
.account-style-option:last-child {
  grid-column: 1 / -1;
}
.account-style-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.account-style-option span,
.account-style-option strong,
.account-style-option small {
  display: block;
}
.account-style-option strong {
  font-size: 13px;
}
.account-style-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
#account-timeline-status {
  min-height: 16px;
  margin-top: 10px;
}
#account-export-status {
  min-height: 16px;
  margin: 10px 0 0;
}
#google-connect-form h3 {
  font:
    23px Georgia,
    serif;
}
#google-connect-form label {
  margin-top: 20px;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 10px 0 20px;
}
.error {
  font-size: 12px;
  line-height: 1.7;
  color: #963d32;
  background: #f8e9e4;
  border: 1px solid #eacfc5;
  border-radius: 6px;
  padding: 11px 13px;
  margin: 14px 0;
}
.visit-dialog {
  max-width: 650px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-row > label,
.form-row > .form-field {
  margin: 12px 0;
}
.optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}
.field-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.required {
  color: var(--accent);
}
.photo-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin: 24px 0 12px;
}
#selected-photo-count {
  font:
    12px ui-monospace,
    monospace;
  color: var(--muted);
}
.capture-choices {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}
.photo-picker,
.camera-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px dashed #ccc8b7;
  background: #f1ede4;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.camera-picker {
  border-style: solid;
  border-color: #d5c6b7;
  background: #fffaf4;
}
.photo-picker > span:first-child,
.camera-picker > span:first-child {
  font-size: 23px;
  color: var(--accent);
}
.photo-picker strong,
.camera-picker strong {
  font-size: 12px;
  font-weight: 500;
}
.photo-picker > span:last-of-type,
.camera-picker > span:last-of-type {
  font-size: 13px;
  color: var(--muted);
}
.photo-picker input,
.camera-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.photo-picker:focus-within,
.camera-picker:focus-within {
  outline: 3px solid #b97b50;
  outline-offset: 4px;
}
.photo-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 13px;
}
.original-photo-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: fit-content;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.original-photo-option input {
  flex: 0 0 auto;
  width: auto;
  padding: 0;
  margin-top: 3px;
}
.original-photo-option span,
.original-photo-option strong,
.original-photo-option small {
  display: block;
}
.original-photo-option small {
  max-width: 520px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.detail-originals {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.detail-originals h3 {
  margin: 0 0 8px;
  font: 600 14px/1.4 var(--sans);
}
.detail-originals a {
  min-width: 0;
  overflow-wrap: anywhere;
}
.detail-original-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.detail-original-row:first-child {
  border-top: 0;
}
.detail-original-row .danger-link {
  grid-column: 1 / -1;
  justify-self: start;
}
.photo-preview {
  position: relative;
}
.photo-preview img {
  display: block;
  height: 110px;
  width: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.photo-preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #fffcf7eb;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 19px;
  display: grid;
  place-items: center;
  padding: 0;
}
.form-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}
.organize-dialog {
  max-width: 580px;
}
.organize-memory-summary {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}
.organize-memory-summary span,
.organize-memory-option small {
  color: var(--muted);
  font-size: 12px;
}
.organize-memory-fieldset {
  min-width: 0;
  margin: 18px 0 10px;
  padding: 0;
  border: 0;
}
.organize-memory-fieldset legend {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}
.organize-memory-list {
  display: grid;
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.organize-memory-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  cursor: pointer;
}
.organize-memory-option + .organize-memory-option {
  border-top: 1px solid var(--line);
}
.organize-memory-option:hover {
  background: #f3eee5;
}
.organize-memory-option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
}
.organize-memory-option span {
  display: grid;
  gap: 4px;
}
.organize-audience {
  margin-top: 16px;
  padding: 13px 15px;
  border-left: 3px solid var(--accent);
  background: #f0ece2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.detail-dialog {
  max-width: 760px;
}
.detail-dialog h2 {
  font-size: 40px;
  overflow-wrap: anywhere;
}
.detail-scope {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}
.detail-dates {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 23px;
}
.detail-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.detail-photos button {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.detail-photos button:only-child {
  grid-column: 1 / -1;
}
.detail-photos img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.detail-photos button:only-child img {
  height: auto;
  max-height: 420px;
}
.detail-experience {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 25px;
}
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 26px;
}
.danger {
  color: #963d32;
}
.progressive-photo {
  opacity: 0;
  transition:
    opacity var(--motion-medium) ease,
    transform var(--motion-medium) var(--motion-ease);
}
.progressive-photo.is-loaded {
  opacity: 1;
}
.photo-dialog {
  inset: 0;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  margin: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 40%, #2b2a2726, transparent 48%),
    #10100ff7;
  color: #fff;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
  opacity: 0;
  transition:
    opacity var(--motion-medium) ease,
    display var(--motion-medium) allow-discrete,
    overlay var(--motion-medium) allow-discrete;
}
.photo-dialog[open] {
  display: grid;
  opacity: 1;
}
@starting-style {
  .photo-dialog[open] {
    opacity: 0;
  }
}
html:has(.photo-dialog[open]) {
  overflow: hidden;
  scrollbar-width: none;
}
html:has(.photo-dialog[open])::-webkit-scrollbar {
  display: none;
}
.photo-dialog::backdrop {
  background: #10100f;
}
.photo-viewer-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 20px;
  min-height: 68px;
  padding: max(12px, env(safe-area-inset-top)) 18px 10px 22px;
  border-bottom: 1px solid #ffffff12;
  background: #10100fd9;
  backdrop-filter: blur(18px);
}
.photo-viewer-heading {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.photo-viewer-context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.photo-viewer-context button {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #ffffff2e;
  border-radius: 999px;
  color: #fff;
  background: #ffffff12;
  font-size: 11px;
}
.photo-viewer-context span {
  color: #ffffffa8;
  font-size: 11px;
}
.photo-viewer-heading strong,
.photo-viewer-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-viewer-heading strong {
  font:
    500 18px "EB Garamond",
    Georgia,
    serif;
  letter-spacing: 0.01em;
}
.photo-viewer-heading span {
  color: #ffffffa8;
  font-size: 12px;
}
.photo-viewer-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 14px;
}
.photo-viewer-count {
  color: #ffffffb8;
  font:
    600 11px ui-monospace,
    monospace;
  letter-spacing: 0.08em;
}
.photo-dialog figure {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.photo-stage {
  --photo-drag: 0px;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}
.photo-viewer-image {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  max-height: calc(100% - 36px);
  max-width: calc(100% - 152px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 70px #000a;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.992);
  transition:
    opacity var(--motion-medium) ease,
    transform var(--motion-medium) var(--motion-ease),
    filter var(--motion-fast) ease;
  will-change: opacity, transform;
  -webkit-user-drag: none;
}
.photo-viewer-image.is-visible {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}
.photo-viewer-buffer {
  z-index: 1;
  pointer-events: none;
}
.viewer-enter-next {
  transform: translate3d(calc(-50% + 24px), -50%, 0) scale(0.992);
}
.viewer-enter-previous {
  transform: translate3d(calc(-50% - 24px), -50%, 0) scale(0.992);
}
.viewer-enter-settle {
  transform: translate3d(-50%, -50%, 0) scale(1.008);
}
.photo-viewer-image.viewer-exit-next {
  opacity: 0;
  transform: translate3d(calc(-50% - 16px), -50%, 0) scale(0.988);
}
.photo-viewer-image.viewer-exit-previous {
  opacity: 0;
  transform: translate3d(calc(-50% + 16px), -50%, 0) scale(0.988);
}
.photo-viewer-image.viewer-exit-settle {
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.992);
}
.photo-stage.is-dragging .photo-viewer-image.is-visible {
  transition: none;
  transform: translate3d(calc(-50% + var(--photo-drag)), -50%, 0)
    scale(0.992);
}
.photo-loading {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #ffffff14;
  border-radius: 999px;
  background: #11110fc9;
  color: #ffffffc7;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}
.photo-stage.is-loading .photo-loading {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 180ms;
}
.photo-loading span {
  width: 11px;
  height: 11px;
  border: 1.5px solid #ffffff45;
  border-top-color: #fff;
  border-radius: 50%;
  animation: photo-loading-spin 700ms linear infinite;
}
@keyframes photo-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
.photo-error {
  position: absolute;
  z-index: 3;
  bottom: 20px;
  left: 50%;
  max-width: min(460px, calc(100% - 32px));
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #451f1ee8;
  color: #fff;
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}
.photo-dialog .close-button {
  position: static;
  background: #ffffff1f;
  color: #fff;
  border-radius: 50%;
}
.photo-navigation {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  background: #11110fb8;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.82;
  backdrop-filter: blur(10px);
  transition:
    opacity var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}
.photo-navigation:hover,
.photo-navigation:focus-visible {
  background: #ffffff38;
  opacity: 1;
  transform: translateY(-50%) scale(1.04);
}
.photo-navigation:disabled {
  opacity: 0.16;
  cursor: default;
}
.photo-previous {
  left: 18px;
}
.photo-next {
  right: 18px;
}
.photo-strip {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: safe center;
  gap: 7px;
  min-width: 0;
  min-height: 72px;
  padding: 9px max(18px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  overflow-x: auto;
  border-top: 1px solid #ffffff12;
  background: #10100fe8;
  scrollbar-color: #ffffff42 transparent;
  scrollbar-width: thin;
  backdrop-filter: blur(18px);
  scroll-padding-inline: 45%;
}
.photo-strip[hidden] {
  display: none;
}
.photo-strip-item {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 52px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  opacity: 0.58;
  transition:
    opacity var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}
.photo-strip-item:hover,
.photo-strip-item:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
}
.photo-strip-item[aria-current="true"] {
  border-color: #fff;
  opacity: 1;
}
.photo-strip-item img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}
@media (max-width: 600px) {
  .capture-choices {
    grid-template-columns: 1fr;
  }
  .camera-picker,
  .photo-picker {
    min-height: 92px;
  }
  .connection-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .photo-viewer-header {
    min-height: 62px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }
  .photo-viewer-heading strong {
    font-size: 16px;
  }
  .photo-viewer-count {
    display: none;
  }
  .photo-viewer-image {
    max-width: calc(100% - 16px);
    max-height: calc(100% - 68px);
  }
  .photo-navigation {
    top: auto;
    bottom: 8px;
    width: 46px;
    height: 42px;
    transform: none;
    background: #11110fd9;
  }
  .photo-navigation:hover,
  .photo-navigation:focus-visible {
    transform: scale(1.04);
  }
  .photo-previous {
    left: calc(50% - 68px);
  }
  .photo-next {
    right: calc(50% - 68px);
  }
  .photo-loading {
    top: 10px;
  }
  .photo-error {
    bottom: 58px;
  }
  .photo-strip {
    justify-content: flex-start;
    min-height: 66px;
    padding-top: 7px;
  }
  .photo-strip-item {
    flex-basis: 48px;
    width: 48px;
    height: 46px;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  padding: 12px;
  background: var(--accent);
  color: white;
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}
@media (max-width: 1000px) {
  .brand-note {
    display: none;
  }
  .hero {
    gap: 25px;
  }
  .postcard {
    width: 255px;
    left: 0;
  }
  .landscape {
    height: 190px;
  }
  .ticket {
    width: 220px;
  }
  .round-stamp {
    right: -8px;
  }
  .stats {
    gap: 17px;
  }
  .stats > div {
    gap: 8px;
  }
  .stats p {
    padding-left: 15px;
    font-size: 12px;
  }
  .entry-grid,
  .place-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
  .header {
    height: 80px;
  }
  .privacy {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 32px 0;
  }
  h1 {
    font-size: 49px;
    letter-spacing: -2px;
  }
  .travel-art {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
    padding: 22px 0;
    gap: 12px;
  }
  .stats > div {
    flex-direction: column;
    gap: 5px;
  }
  .stats strong {
    font-size: 29px;
  }
  .stats p {
    display: none;
  }
  .journal {
    padding-top: 32px;
  }
  .journal-toolbar {
    flex-wrap: wrap;
    gap: 15px;
  }
  .filters {
    width: 100%;
  }
  .filters > label {
    width: 50%;
  }
  .journal-heading {
    gap: 15px;
  }
  .journal-heading h1 {
    font-size: 25px;
  }
  .journal-actions {
    gap: 10px;
  }
  .how-it-works {
    gap: 20px;
  }
  .how-it-works > div {
    padding-left: 0;
  }
  .how-it-works > div > span {
    position: static;
    display: block;
    margin-bottom: 10px;
  }
  .footer {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding-top: 22px;
    padding-bottom: 22px;
    gap: 12px;
  }
  .footer-copy {
    text-align: left;
  }
  .footer-copy nav {
    justify-content: flex-start;
  }
}
@media (max-width: 480px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .header-actions {
    gap: 12px;
  }
  #account-name {
    max-width: 110px;
    font-size: 12px;
  }
  h1 {
    font-size: 40px;
    letter-spacing: -1.6px;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .hero-description {
    font-size: 12px;
  }
  .desktop-break {
    display: none;
  }
  .hero-caption {
    margin-left: 10px;
    font-size: 12px;
  }
  .photo-wall-grid {
    gap: 8px;
  }
  .photo-wall-caption {
    padding: 26px 9px 9px;
  }
  .photo-wall-caption strong {
    font-size: 15px;
  }
  .photo-wall-caption span {
    font-size: 11px;
  }
  .journal-heading h1 {
    font-size: 23px;
  }
  .journal-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  #journal-add-trigger {
    font-size: 12px;
    padding: 10px;
  }
  .entry-grid,
  .place-grid {
    grid-template-columns: 1fr;
  }
  .empty-state h3 {
    font-size: 21px;
  }
  .empty-state p {
    font-size: 13px;
  }
  .how-it-works {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .how-it-works > div {
    padding-left: 30px;
  }
  .how-it-works > div > span {
    position: absolute;
  }
  .dialog {
    padding: 23px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  input,
  select,
  textarea,
  .filters input,
  .filters select {
    font-size: 16px;
  }
  .filters {
    flex-direction: column;
  }
  .filters > label {
    width: 100%;
  }
  .detail-dialog h2 {
    font-size: 34px;
  }
  .detail-photos {
    grid-template-columns: 1fr;
  }
  .photo-preview img {
    height: 85px;
  }
  .form-footer {
    gap: 10px;
  }
  .form-footer .button {
    padding: 11px 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
/* Customer journey: trips, story timeline, and a calm editor. */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero .hero-caption {
  margin: 16px 0 0;
  font-size: 13px;
}
.section-description {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 23px;
  border: 1px solid #d1dacc;
  background: #edf1e8;
  border-radius: 9px;
  margin: 0 0 22px;
}
.notice strong {
  font-size: 14px;
  font-weight: 550;
}
.notice p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #66705f;
}
.demo-banner {
  background: #efe8da;
  border-color: #daceb7;
}
.inline-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}
.journal {
  padding-top: 22px;
}
.journal .stats {
  margin-top: 24px;
}
.journal-toolbar {
  align-items: stretch;
}
.search-field input {
  height: 100%;
  font-size: 12px;
}
.trip-context {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(280px, 1.35fr) auto;
  align-items: stretch;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin: 26px 0 30px;
  background: #f0ece2;
}
.scope-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.scope-breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
}
.trip-cover {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 35%, #b5563c 0 4px, transparent 5px),
    linear-gradient(145deg, #dce4d8, #c7d1c1 49%, #e2d8c6 50%, #d4c7b3);
}
.trip-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trip-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #476150;
  font-size: 40px;
}
.trip-summary {
  min-width: 0;
  align-self: center;
  padding: 8px 0;
}
.trip-summary .eyebrow {
  margin-bottom: 11px;
}
.trip-context h2 {
  font:
    clamp(30px, 3.2vw, 48px) / 1.08 Georgia,
    serif;
  letter-spacing: -1.2px;
  overflow-wrap: anywhere;
}
.trip-context p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.trip-context .trip-meta {
  color: var(--accent);
  font-size: 12px;
}
.trip-context .trip-route {
  color: var(--ink);
  font:
    italic 14px/1.65 Georgia,
    serif;
}
.trip-actions {
  display: flex;
  min-width: 155px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.trip-actions > .button,
.trip-actions > .trip-keep > summary {
  width: 100%;
  min-height: 42px;
}
.trip-actions > .button {
  display: grid;
  place-items: center;
}
.trip-actions > .trip-keep > summary {
  display: flex;
  align-items: center;
  justify-content: center;
}
.trip-keep {
  position: relative;
}
.trip-keep summary {
  list-style: none;
  cursor: pointer;
}
.trip-keep summary::-webkit-details-marker {
  display: none;
}
.trip-keep summary::after {
  content: "⌄";
  margin-left: 7px;
}
.trip-keep-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  box-shadow: 0 12px 30px #40372c26;
}
.trip-keep-menu a {
  display: block;
  padding: 12px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 13px;
}
.trip-keep-menu a:hover,
.trip-keep-menu a:focus-visible {
  background: #eee8dc;
}
.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 24px;
  gap: 16px;
}
.filter-row select {
  font-size: 12px;
  padding: 10px;
  background: transparent;
}
#result-count {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}
.filter-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  min-height: 34px;
  border: 1px solid #d2c9b9;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
}
.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.trip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.trip-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  text-align: left;
  padding: 0;
  min-width: 0;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) ease;
}
.trip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px #483b2710;
}
.trip-card > img,
.trip-cover-placeholder {
  display: block;
  height: 180px;
  width: 100%;
  object-fit: cover;
}
.trip-cover-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ddd9c8, #b5c7b4);
  color: #637764;
  font:
    60px Georgia,
    serif;
}
.trip-copy {
  padding: 22px;
}
.trip-copy h3,
.unfiled-card h3 {
  font:
    25px/1.3 Georgia,
    serif;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.trip-copy > p:not(.eyebrow),
.unfiled-card p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 11px 0 20px;
  overflow-wrap: anywhere;
}
.trip-date {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.trip-meta {
  display: block;
  font-size: 13px;
  color: var(--accent);
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.unfiled-card {
  padding: 28px;
  border-style: dashed;
  background: #f1ede4;
  min-height: 235px;
}
.unfiled-mark {
  display: block;
  font:
    42px Georgia,
    serif;
  color: var(--muted);
}
.timeline-section {
  margin: 32px 0;
}
.timeline-year {
  font:
    28px Georgia,
    serif;
  margin-bottom: 26px;
  color: var(--accent);
}
.timeline-items {
  border-left: 1px solid #d9cdb7;
  margin-left: 7px;
  padding-left: 30px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 30px;
  position: relative;
}
.timeline-item::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b78660;
  border: 4px solid var(--paper);
  box-sizing: content-box;
  position: absolute;
  left: -39px;
  top: 11px;
}
.timeline-date {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  padding-top: 11px;
}
.timeline-item .entry-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}
.timeline-item .entry-cover,
.timeline-item .entry-placeholder {
  height: 100%;
  min-height: 205px;
}
.timeline-item .entry-copy {
  padding: 24px;
}
.timeline-item .entry-experience {
  -webkit-line-clamp: 2;
}
.timeline-item .entry-city {
  font-size: 29px;
}
.map-panel {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  padding: 26px;
}
.map-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.map-heading h3 {
  font:
    24px Georgia,
    serif;
}
.map-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.7;
}
.map-legend {
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}
.map-heading-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}
.map-zoom-controls {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.map-zoom-controls button {
  min-width: 42px;
  min-height: 38px;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 8px 11px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
}
.map-zoom-controls button:first-child {
  border-left: 0;
}
.map-zoom-controls button:disabled {
  opacity: 0.45;
}
.world-map {
  margin: 24px 0;
  overflow: hidden;
  border-radius: 8px;
  background: #edf2ef;
}
.world-map svg {
  display: block;
  width: 100%;
  height: auto;
}
.world-map path {
  fill: #d3dbd0;
  stroke: #f8faf7;
  stroke-width: 0.65;
}
.world-map path.visited {
  fill: #b36b48;
  cursor: pointer;
}
.world-map path.visited:hover,
.world-map path.visited:focus {
  fill: #85432d;
  stroke: #3e493b;
  stroke-width: 2;
  outline: none;
}
.journey-route {
  fill: none;
  stroke: #7e8d79;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}
.map-city {
  cursor: pointer;
  outline: none;
}
.map-city-target {
  fill: transparent;
}
.map-city-ring {
  fill: var(--white);
  stroke: var(--accent);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.map-city-dot {
  fill: var(--accent);
}
.map-city-photo {
  pointer-events: none;
}
.map-city:hover .map-city-ring,
.map-city:focus-visible .map-city-ring,
.map-city.tl-focused-city .map-city-ring,
.map-city.is-highlighted .map-city-ring {
  fill: #f6dfcf;
  stroke: #5d2f21;
  stroke-width: 5;
}
.map-city-count circle {
  fill: #38483d;
  stroke: var(--white);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.map-city-count text {
  fill: #fff;
  font: 12px Arial, sans-serif;
  pointer-events: none;
}
.map-coverage {
  margin: 0 0 26px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.map-coverage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.map-coverage-score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.map-coverage-score strong {
  font:
    42px/1.2 Georgia,
    serif;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.map-coverage-score span {
  font-size: 13px;
}
#map-coverage-count {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.map-coverage progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 16px 0 12px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  appearance: none;
  background: #e9e5dc;
  accent-color: var(--accent);
}
.map-coverage progress::-webkit-progress-bar {
  background: #e9e5dc;
  border-radius: 8px;
}
.map-coverage progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 8px;
}
.map-coverage progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 8px;
}
.map-countries {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-height: 158px;
  overflow-y: auto;
  padding: 3px;
}
.country-chip {
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  padding: 9px 14px;
  font-size: 12px;
}
.country-chip.is-highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #a2582f26;
  color: var(--accent);
}
.trip-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin: 24px 0 9px;
}
.photo-controls {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex;
  gap: 5px;
}
.photo-preview .photo-controls button {
  position: static;
  width: 30px;
  height: 30px;
}
.ai-memory-assistant {
  margin: 10px 0 22px;
  padding: 18px;
  border: 1px solid #d7c9bb;
  border-radius: 9px;
  background: #f7efe7;
}
.ai-assistant-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.ai-assistant-heading .eyebrow {
  margin: 0 0 4px;
}
.ai-assistant-heading h3 {
  margin: 0;
  font:
    21px/1.2 Georgia,
    serif;
}
.ai-memory-assistant > .hint {
  margin: 10px 0 0;
}
.ai-suggestion {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #d7c9bb;
}
.ai-suggestion > div:not(.inline-actions) {
  display: grid;
  gap: 5px;
}
.ai-suggestion span {
  color: var(--muted);
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ai-suggestion strong {
  font:
    22px/1.25 Georgia,
    serif;
}
.ai-suggestion p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}
.ai-suggestion .ai-landmark {
  padding: 9px 11px;
  border-radius: 6px;
  background: #fffaf4;
  color: #65452f;
  font-size: 12px;
}
.cover-label {
  position: absolute;
  bottom: 8px;
  left: 7px;
  background: #fffcf7e6;
  color: #555d4d;
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 1px;
  border-radius: 3px;
  padding: 5px;
}
.visit-dialog .photo-heading {
  margin-top: 12px;
}
.visit-dialog .photo-picker,
.visit-dialog .camera-picker {
  padding: 22px;
}
#draft-status {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.members-dialog {
  max-width: 610px;
}
.member-list {
  margin: 20px 0 28px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.member-row strong {
  font-size: 13px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.member-row span {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.member-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
#transfer-owner-dialog > .close-button {
  position: absolute;
  top: 15px;
  right: 20px;
}
#transfer-owner-reauthenticate {
  margin-top: 18px;
}
#invite-form {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
#invite-form h3,
.help-copy h3 {
  font:
    21px Georgia,
    serif;
}
.help-copy h3 {
  margin-top: 25px;
}
.help-copy p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 9px;
}
.help-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}
.help-actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 12px;
  text-align: center;
}
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  border: 1px solid #d7dfce;
  border-radius: 8px;
  padding: 14px 20px;
  background: #f4f7ef;
  box-shadow: 0 8px 25px #333e3520;
  max-width: calc(100vw - 32px);
  font-size: 12px;
  text-align: center;
}
.toast .text-button {
  flex: 0 0 auto;
  font-weight: 700;
}
@media (max-width: 1000px) {
  .trip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeline-item {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
  }
  .timeline-item .entry-card {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .journal-toolbar {
    flex-wrap: wrap;
  }
  .journal-toolbar .search-field {
    flex: 1;
    min-width: 190px;
  }
}
@media (max-width: 760px) {
  .journal-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .journal-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .timeline-item .entry-card {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .timeline-date {
    padding-top: 8px;
  }
  .trip-context {
    grid-template-columns: minmax(160px, 0.75fr) minmax(0, 1.25fr);
    gap: 15px;
  }
  .trip-actions {
    grid-column: 1/-1;
    flex-direction: row;
  }
  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .map-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .map-heading-actions {
    justify-items: start;
  }
}
@media (max-width: 480px) {
  .account-style-options {
    grid-template-columns: 1fr;
  }
  .account-style-option:last-child {
    grid-column: auto;
  }
  .trip-grid {
    grid-template-columns: 1fr;
  }
  .journal-toolbar .search-field {
    width: 100%;
  }
  .search-field input {
    font-size: 16px;
  }
  .timeline-items {
    padding-left: 20px;
  }
  .timeline-item::before {
    left: -29px;
  }
  .timeline-item .entry-card {
    display: block;
  }
  .timeline-item .entry-cover,
  .timeline-item .entry-placeholder {
    height: 175px;
    min-height: 0;
  }
  .timeline-item .entry-copy {
    padding: 19px;
  }
  .map-panel {
    padding: 18px;
  }
  .map-panel h3 {
    font-size: 22px;
  }
  .header-actions {
    gap: 10px;
  }
  #help-open {
    font-size: 12px;
    max-width: 45px;
    line-height: 1.4;
  }
  #account-name {
    max-width: 80px;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }
  .notice {
    padding: 18px;
  }
  .filter-row select {
    max-width: 190px;
  }
}
.visit-dialog .form-footer {
  position: sticky;
  bottom: -32px;
  background: var(--paper);
  padding-bottom: 16px;
  z-index: 1;
}
@media (max-width: 480px) {
  .header {
    gap: 8px;
  }
  body:not(.signed-in) .header {
    flex-wrap: wrap;
    height: auto;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  body:not(.signed-in) .header-actions {
    margin-left: auto;
  }
  .header .brand {
    font-size: 30px;
    gap: 8px;
  }
  .header .brand svg {
    width: 24px;
  }
  #help-open {
    max-width: 36px;
  }
  #account-name {
    max-width: 55px;
  }
  #sign-out {
    white-space: nowrap;
    font-size: 12px;
  }
  .journal[data-trip="true"] .stats,
  .journal[data-trip="true"] > .journal-heading > div:first-child {
    display: none;
  }
  .journal[data-trip="true"] .journal-heading {
    margin-bottom: 12px;
  }
  .visit-dialog .form-footer {
    bottom: -23px;
  }
}

.journal-actions {
  flex-wrap: wrap;
}

/* Keep every journal view visible and make the current place unmistakable. */
.story-navigation {
  flex: 1;
  min-width: 0;
}
.story-navigation .view-switch {
  display: flex;
  align-items: stretch;
  gap: 24px;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.story-navigation .view-switch::-webkit-scrollbar {
  display: none;
}
.story-navigation .view-switch button,
.story-navigation .view-switch a {
  flex: 0 0 auto;
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  padding: 11px 1px 9px;
  font: 550 12px/1.4 Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
}
.story-navigation .view-switch button:hover,
.story-navigation .view-switch a:hover {
  color: var(--ink);
}
.story-navigation .view-switch button[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.recap-short {
  display: none;
}
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr);
  gap: 36px;
  align-items: start;
}
.story-layout .timeline {
  min-width: 0;
}
.story-layout .timeline-section {
  position: relative;
  padding-left: 62px;
  scroll-margin-top: 45px;
}
.story-layout .timeline-year {
  position: absolute;
  left: 0;
  top: 5px;
  font-size: 23px;
}
.story-layout .timeline-section[data-year="Undated memories"] {
  padding-left: 0;
}
.story-layout .timeline-section[data-year="Undated memories"] .timeline-year {
  position: static;
  margin-bottom: 14px;
}
.story-layout .timeline-item {
  display: block;
}
.story-layout .timeline-date {
  margin: 0 0 12px;
  padding: 0;
  font-size: 13px;
}
.story-layout .timeline-item .entry-card {
  display: block;
}
.story-layout .timeline-item .entry-cover {
  height: 260px;
  min-height: 0;
}
.story-layout .timeline-item .entry-placeholder {
  height: 120px;
  min-height: 0;
}
.story-layout .entry-copy {
  padding: 22px;
}
.history-panel {
  position: sticky;
  top: 28px;
  margin-top: 32px;
}
.history-box {
  padding: 25px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
}
.history-box summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.history-box summary::-webkit-details-marker {
  display: none;
}
.history-title {
  font:
    25px Georgia,
    serif;
}
.history-toggle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.history-map {
  margin: 25px 0 16px;
}
.history-map path.earlier {
  fill: #94a38d;
}
.history-count {
  font-size: 13px;
  line-height: 1.8;
  color: var(--accent);
  margin: 15px 0;
}
.history-legend {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.history-box .country-chip {
  font-size: 12px;
  padding: 6px 9px;
}
.history-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.history-year-button {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: none;
  padding: 8px 13px;
  font-size: 12px;
  cursor: pointer;
}
.history-year-button[aria-current="true"] {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.batch-year-link {
  display: inline-block;
  margin-bottom: 22px;
}
@media (max-width: 1000px) {
  .story-layout {
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.8fr);
  }
  .story-layout .timeline-section {
    padding-left: 0;
  }
  .story-layout .timeline-year {
    position: static;
    margin-bottom: 18px;
  }
  .history-box {
    padding: 20px;
  }
}
@media (max-width: 800px) {
  .story-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .story-layout .timeline {
    width: 100%;
    order: 2;
  }
  .history-panel {
    order: 1;
    width: 100%;
    top: 0;
    z-index: 2;
    margin-top: 0;
    padding: 10px 0;
    background: var(--bg, #f8f5ef);
  }
  .history-box {
    padding: 16px 18px;
  }
  .history-title {
    font-size: 21px;
  }
  .history-map {
    max-width: 460px;
    margin: 12px auto;
  }
  .history-box .map-countries,
  .history-box > p:last-child {
    display: none;
  }
  .history-years {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 8px;
    padding-bottom: 3px;
  }
  .history-year-button {
    flex-shrink: 0;
  }
  .story-layout .timeline-section {
    scroll-margin-top: 150px;
  }
  .story-layout .timeline-item .entry-cover {
    height: 220px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 1000px) {
  .story-navigation {
    width: 100%;
    flex-basis: 100%;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .signed-in .journal-toolbar {
    backdrop-filter: none;
  }
  .journal-toolbar {
    align-items: stretch;
  }
  .story-navigation {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    flex: none;
    height: calc(57px + env(safe-area-inset-bottom));
    min-height: 0;
    max-height: calc(57px + env(safe-area-inset-bottom));
    z-index: 4;
    padding: 0 10px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    box-shadow: 0 -8px 24px #353c3312;
    backdrop-filter: blur(12px);
  }
  .story-navigation .view-switch {
    width: min(100%, 540px);
    margin: 0 auto;
    gap: 0;
    overflow: visible;
    border-bottom: 0;
  }
  .story-navigation .view-switch button,
  .story-navigation .view-switch a {
    flex: 1 1 0;
    min-width: 0;
    min-height: 56px;
    padding: 18px 2px 12px;
    border-bottom: 0;
    font-size: 12px;
    text-align: center;
  }
  .story-navigation .view-switch button[aria-pressed="true"] {
    box-shadow: inset 0 2px var(--accent);
  }
  .recap-full {
    display: none;
  }
  .recap-short {
    display: inline;
  }
  .journal-toolbar .search-field {
    width: 100%;
    min-width: 0;
  }
}

.detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.detail-actions > .danger {
  margin-right: auto;
}

.activity-button {
  position: relative;
}
.activity-badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 4px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: 600 10px/1 Arial, sans-serif;
}
.memory-conversation {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.memory-conversation h3 {
  margin: 0 0 14px;
  font:
    22px/1.2 Georgia,
    serif;
}
.memory-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.memory-reaction {
  min-width: 46px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
}
.memory-reaction.selected {
  border-color: var(--accent);
  background: #f6e6db;
  color: #6e321d;
}
.memory-comments {
  display: grid;
  gap: 10px;
}
.memory-comment {
  position: relative;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--soft, #f2eee6);
}
.memory-comment-heading {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding-right: 58px;
}
.memory-comment-heading strong {
  font-size: 13px;
}
.memory-comment-heading time,
.memory-comment > button {
  color: var(--muted);
  font-size: 12px;
}
.memory-comment p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.6;
}
.memory-comment > button {
  position: absolute;
  top: 13px;
  right: 14px;
}
.memory-comment-form {
  margin-top: 18px;
}
.memory-comment-form > label {
  font-size: 13px;
  font-weight: 600;
}
.memory-comment-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
}
.memory-comment-form textarea {
  min-height: 70px;
  resize: vertical;
}
.activity-dialog {
  max-width: 620px;
}
.activity-list {
  display: grid;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.activity-reference {
  border-radius: 6px;
  outline: 3px solid color-mix(in srgb, var(--accent) 52%, transparent);
  outline-offset: 4px;
  background: #f8e9dc;
  transition:
    outline-color 300ms ease,
    background-color 300ms ease;
}
.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  width: 100%;
  padding: 16px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.activity-item.unread {
  box-shadow: inset 3px 0 var(--accent);
  background: #f7eee7;
}
.activity-item span {
  font-size: 13px;
  line-height: 1.5;
}
.activity-item strong {
  display: block;
  font-weight: 600;
}
.activity-item time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.timeline-visibility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(124px + env(safe-area-inset-bottom));
  }
  .header-actions {
    min-width: 0;
    gap: 8px;
  }
  #help-open {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    max-width: none;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 0;
  }
  #help-open::before {
    content: "?";
    font: 600 15px/1 Arial, sans-serif;
  }
  #account-name {
    max-width: 94px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #activity-open {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 0;
  }
  #activity-open::before {
    content: "✦";
    font-size: 15px;
  }
  #activity-open .activity-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    margin: 0;
    font-size: 9px;
  }
  .memory-comment-form > div,
  .activity-item {
    grid-template-columns: 1fr;
  }
  .ai-assistant-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .ai-assistant-heading .button {
    width: 100%;
  }
  .memory-comment-form button {
    width: 100%;
  }
  .activity-item {
    gap: 5px;
  }
  #sign-out {
    flex: 0 0 auto;
  }
  .journal-heading {
    gap: 18px;
  }
  .journal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .journal-actions .button {
    width: 100%;
  }
  #journal-add-trigger {
    position: fixed;
    right: 16px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    z-index: 5;
    width: auto;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 25px;
    box-shadow: 0 8px 28px #33271f40;
  }
  .create-menu-popover {
    position: fixed;
    right: 16px;
    bottom: calc(150px + env(safe-area-inset-bottom));
    top: auto;
    width: min(280px, calc(100vw - 32px));
  }
  .filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
  }
  .filter-row label,
  .filter-row select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  #result-count {
    grid-column: 1 / -1;
    text-align: left;
  }
  .trip-context {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
  }
  .trip-context .trip-cover,
  .trip-context .trip-summary,
  .trip-context .trip-actions,
  .trip-context #manage-trip {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .trip-cover {
    min-height: 0;
    aspect-ratio: 16/9;
  }
  .trip-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .trip-actions #manage-trip {
    grid-column: 1/-1;
  }
  .trip-actions > .button {
    width: 100%;
    display: grid;
    place-items: center;
  }
  .journal[data-trip="true"] .stats,
  .journal[data-trip="true"] > .journal-heading > div:first-child {
    display: none;
  }
  .toast {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .visit-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: max(20px, env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
  }
  .visit-dialog .dialog-heading {
    position: sticky;
    top: -20px;
    z-index: 2;
    margin: -20px -20px 0;
    padding: 20px;
    background: var(--paper);
  }
  .visit-dialog .form-footer {
    bottom: -20px;
    margin-right: -20px;
    margin-left: -20px;
    padding: 14px 20px max(20px, env(safe-area-inset-bottom));
  }
}
