.memory-photo-entry { margin-top: 18px; color: #1d1d1f; font-size: 14px; line-height: 1.6; }
.play-era--dark .memory-photo-entry { color: #f5f5f7; }
.memory-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.memory-photo-actions button, .memory-top-link, .memory-preview, .memory-reply-button, .memory-more,
.memory-composer button, .memory-tabs button, .memory-panel-close, .memory-linked-photos button {
  font: inherit; min-height: 44px; border: 0; background: transparent; color: #0066cc; cursor: pointer; padding: 6px 0;
}
.memory-photo-actions button { display: inline-flex; align-items: center; gap: 6px; }
.memory-photo-actions button:disabled, .memory-composer button:disabled { opacity: .5; cursor: wait; }
.memory-like[aria-pressed="true"] { font-weight: 600; }
.memory-like { min-width: 44px; }
.memory-share { min-width: 44px; justify-content: center; }
.memory-share-result { flex-basis: 100%; font-size: 13px; color: inherit; }
.memory-share-result input { display: block; width: 100%; min-width: 0; margin-top: 6px; padding: 8px; background: #fff; color: #1d1d1f; border: 1px solid #86868b; border-radius: 8px; font-size: 16px; }
.memory-share-result[hidden], .memory-share-result input[hidden] { display: none; }
.memory-viewer-actions .memory-share-result { color: #f5f5f7; }
.memory-like svg { flex: none; }
.memory-like[aria-pressed="true"] svg { fill: currentColor; }
.memory-preview { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; margin-top: 5px; color: inherit; }
.memory-preview--empty { color: #65656c; }
.memory-preview-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding-top: 3px; overflow-wrap: anywhere; }
.memory-person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: #65656c; flex-shrink: 0; }
.memory-preview .memory-person { flex-direction: column; gap: 2px; }
.memory-avatar { width: 32px !important; height: 32px !important; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #e8e8ed; }
.memory-avatar--default { color: #86868b; font-size: 14px; }
.memory-person time { margin-left: auto; }
.memory-photo-number { color: #65656c; font-size: 13px; }
.memory-top-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; margin-top: 12px; align-self: start; }
.memory-city-prompt { padding: clamp(40px, 6vw, 64px) 0; background: #fff; color: #1d1d1f; }
.memory-city-prompt .play-shell, .memory-section .play-shell { max-width: 900px; }
.memory-city-prompt h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: 1.14; letter-spacing: -.03em; text-wrap: balance; margin: 0; }
.memory-city-prompt p { max-width: 680px; font-size: 17px; line-height: 1.47; margin: 16px 0 0; }
.memory-section { padding: 72px 0 88px; background: #f5f5f7; color: #1d1d1f; }
.memory-eyebrow { color: #65656c; font-size: 14px; margin: 0 0 12px; }
.memory-section h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 600; letter-spacing: -.03em; margin: 0; }
.memory-section h2 span { color: #65656c; font-size: .65em; }
.memory-intro { color: #65656c; margin: 16px 0 24px; }
.memory-composer { padding: 18px; border-radius: 8px; background: #fff; color: #1d1d1f; display: grid; gap: 10px; }
.memory-composer label { font-size: 14px; font-weight: 600; }
.memory-composer textarea { display: block; width: 100%; max-height: 180px; min-height: 76px; resize: vertical; box-sizing: border-box; border: 1px solid #d2d2d7; border-radius: 8px; padding: 12px; background: #fafafc; color: #1d1d1f; font: inherit; font-size: 16px; line-height: 1.6; }
.memory-compose-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.memory-compose-actions > span { margin-right: auto; color: #65656c; }
.memory-composer .memory-submit { padding: 8px 18px; border-radius: 980px; background: #0071e3; color: #fff; }
.memory-compose-hint { margin: 0; font-size: 12px; line-height: 1.5; color: #65656c; }
.memory-feedback { font-size: 13px; color: #0066cc; overflow-wrap: anywhere; }
.memory-feedback:empty { display: none; }
.memory-list { padding-top: 24px; }
.memory-thread { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid #dcdce1; }
.memory-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.75; margin: 12px 0 4px; }
.memory-body a { color: #0066cc; text-decoration: underline; text-underline-offset: 3px; }
.memory-reply-button { font-size: 13px; }
.memory-replies { padding-left: 24px; }
.memory-reply { padding: 16px 0 0; }
.memory-reply .memory-avatar { width: 28px !important; height: 28px !important; }
.memory-reply .memory-body { font-size: 15px; }
.memory-more-replies summary { cursor: pointer; color: #0066cc; font-size: 13px; padding: 12px 0; }
.memory-empty { color: #65656c; padding: 12px 0 32px; }
.memory-more { display: block; margin: 12px auto; padding: 8px 20px; border-radius: 980px; background: #e8e8ed; }
.memory-linked-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.memory-linked-photos button { display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.memory-linked-photos img { width: 64px; height: 44px; object-fit: cover; border-radius: 5px; }
.memory-unavailable { color: #65656c; font-size: 13px; }
.memory-return { position: fixed; z-index: 100; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap; border: none; border-radius: 980px; background: #0071e3; color: #fff; font-size: 15px; padding: 14px 22px; box-shadow: 0 4px 24px #0003; cursor: pointer; }
.memory-highlight { outline: 3px solid #0071e3; outline-offset: 8px; }
.play-history figure[id] { scroll-margin-top: 135px; }
.memory-section [data-comment-id] { scroll-margin-top: 130px; }
.memory-photo-entry button:focus-visible, .memory-section button:focus-visible, .memory-section a:focus-visible, .memory-section summary:focus-visible, .memory-composer textarea:focus-visible, .memory-top-link:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; }
.play-era--dark .memory-preview--empty, .play-era--dark .memory-person { color: #b6b6be; }
.play-era--dark .memory-photo-actions button { color: #2997ff; }
.memory-viewer-layout { display: flex; flex: 1; min-height: 0; gap: 24px; }
.memory-viewer-photo { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; min-height: 0; }
.memory-viewer-actions { flex: none; }
.play-photo-viewer .memory-enlarge, .play-photo-viewer .memory-enlarge:hover { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 0; min-width: 0; padding: 0; border-radius: 0; background: transparent; }
.play-photo-viewer .memory-viewer-actions button, .play-photo-viewer .memory-panel button { display: inline-flex; width: auto; height: auto; min-height: 44px; border-radius: 8px; font-size: 14px; line-height: 1.5; padding: 6px 10px; background: transparent; color: #0066cc; }
.play-photo-viewer .memory-viewer-actions button { color: #2997ff; }
.play-photo-viewer .memory-panel button:hover { background: #ededf2; }
.play-photo-viewer .memory-panel .memory-submit { background: #0071e3; color: #fff; border-radius: 980px; padding: 8px 18px; }
.play-photo-viewer .memory-panel .memory-submit:hover { background: #0066cc; }
.memory-panel { display: flex; flex-direction: column; flex: 0 0 min(420px, 42%); min-height: 0; min-width: 0; background: #f5f5f7; color: #1d1d1f; border-radius: 8px; overflow: hidden; }
.memory-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 0; flex: none; }
.memory-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.memory-tabs button[aria-pressed="true"] { box-shadow: inset 0 -2px #0071e3; border-radius: 0; font-weight: 600; }
.memory-panel .memory-context { padding: 4px 22px 8px; font-size: 12px; color: #65656c; margin: 0; }
.memory-panel-scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 70px; padding: 0 22px; }
.memory-panel .memory-list { padding-top: 12px; }
.memory-panel .memory-composer { border-radius: 0; padding: 14px 18px; border-top: 1px solid #dcdce1; max-height: 45dvh; overflow: auto; }
.memory-panel [data-community-target="panelComposer"] { flex: none; min-height: 0; }
.memory-panel .memory-body a { color: #0066cc; }
.play-photo-viewer .memory-return { display: block; width: auto; height: auto; border-radius: 980px; background: #0071e3; color: #fff; padding: 12px 20px; font-size: 14px; line-height: 1.5; }
.memory-panel[hidden], .memory-return[hidden], .memory-composer [hidden] { display: none !important; }
@media (max-width: 760px) {
  .memory-section { padding: 48px 0; }
  .memory-composer { padding: 14px; }
  .memory-preview { gap: 10px; }
  .memory-photo-actions { gap: 2px 14px; }
  .memory-with-comments { height: calc(var(--memory-viewport, 100dvh) - 16px); }
  .memory-with-comments .memory-viewer-layout { flex-direction: column; gap: 8px; }
  .memory-with-comments .memory-viewer-photo { flex: 0 0 auto; min-height: 0; gap: 4px; }
  .memory-with-comments .play-photo-viewer-stage { flex: none; height: 20dvh; min-height: 64px; }
  .memory-with-comments .play-photo-viewer-details { display: none; }
  .memory-with-comments .memory-viewer-actions { display: block; }
  .memory-with-comments .memory-photo-actions { gap: 0 8px; }
  .memory-with-comments .memory-photo-actions > button { padding: 4px 6px; }
  .memory-with-comments:has(textarea:focus) .play-photo-viewer-stage { height: 8dvh; min-height: 40px; }
  .memory-with-comments .memory-panel { flex: 1; width: 100%; }
  .memory-panel-heading { padding: 4px 8px 0; }
  .memory-panel-scroll { padding: 0 16px; }
  .memory-panel .memory-context { padding: 0 16px 4px; }
  .memory-panel .memory-composer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); gap: 6px; max-height: 44dvh; }
  .memory-panel .memory-composer textarea { min-height: 60px; max-height: 100px; padding: 8px; }
  .memory-panel .memory-compose-hint:first-of-type { display: none; }
  .memory-panel .memory-thread { margin-bottom: 18px; padding-bottom: 18px; }
  .memory-panel .memory-body { font-size: 15px; }
  .memory-panel .memory-replies { padding-left: 18px; }
  .memory-return { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
}
