/* Desktop inherits the original artwork, typography, geometry and animation. */
html body .footer .footer-content > .footer-link-lang {
  display: none !important;
}
html body .search-input:focus,
html body .add-steps-message-input:focus {
  outline: none !important;
  box-shadow: none;
}
@media (min-width: 761px) and (min-height: 501px), (min-width: 1025px) {
  .app.revival-card-fit .post-2d-center-wrapper {
    width: calc(var(--revival-card-image-width) + 348px) !important;
    height: var(--revival-card-image-height) !important;
    top: var(--revival-card-top) !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }
  .app.revival-card-fit .post-2d-img {
    width: var(--revival-card-image-width) !important;
    height: var(--revival-card-image-height) !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  html body .preloader-text-line-1,
  html body .preloader-text-line-2 {
    width: calc(100% - 32px) !important;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
  }
  html body .preloader-text-line-1 .font-italic {
    white-space: nowrap;
  }
  /* Keep the original globe, search, and add hit targets on the same x-axis. */
  html body .nav {
    left: 0 !important;
    width: 100px !important;
    margin-top: -102px !important;
  }
  html body .nav-map-wrapper {
    left: 26px !important;
    width: 92px !important;
    height: 92px !important;
    margin: 12px 0 !important;
  }
  html body .nav-map-btn {
    width: 92px !important;
    height: 92px !important;
  }
  html body .nav-search-wrapper,
  html body .nav-add-wrapper {
    left: 49px !important;
    width: 46px !important;
    height: 46px !important;
    margin: 12px 0 !important;
  }
  html body .nav-search-btn,
  html body .nav-add-btn {
    width: 46px !important;
  }
  html body .header-fade-container {
    top: calc(20px + env(safe-area-inset-top)) !important;
    right: max(18px, env(safe-area-inset-right)) !important;
    width: auto !important;
    height: 44px !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    transform: scale(0.72) !important;
    transform-origin: right top !important;
  }
  html body .header-fade-percent {
    position: static !important;
    height: 44px;
    line-height: 44px !important;
    white-space: nowrap;
  }
  html body .header-fade-percent-num {
    font-size: 40px !important;
    line-height: 44px !important;
  }
  html body .header-fade-percent-symbol {
    position: static !important;
    display: inline !important;
    font-size: 22px !important;
    line-height: 44px !important;
  }
  html body .header-fade-percent-text {
    display: none !important;
  }
  html body .footer-content {
    box-sizing: border-box;
  }
  html body .footer-content[data-managed-menu="true"] > .footer-managed-item {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 !important;
  }
  /* Keep the original 24px sprite centered inside its 44px touch target.
     Retain the source image, retina sizing, and selected/hover sprite offsets. */
  html body .footer-content[data-managed-menu="true"] > .footer-sound-btn,
  html body .footer-content[data-managed-menu="true"] > .footer-share {
    box-sizing: border-box;
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    background-origin: content-box;
    background-clip: content-box;
    flex-shrink: 0;
  }
  html body .post-2d .post-2d-content-top {
    background: none !important;
  }
  html body .post-2d .post-2d-center-wrapper {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    top: 85px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 150px) !important;
    margin: 0 !important;
    transform: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
    background: #000;
    border: 1px solid #ffffff24;
    box-sizing: border-box;
  }
  html body .post-2d .post-2d-img {
    float: none !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: var(--revival-photo-ratio, 1);
    max-height: none !important;
    background-position: center !important;
    background-size: cover !important;
  }
  html body .post-2d .post-2d-content-wrapper {
    position: static !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
    touch-action: pan-y pinch-zoom;
  }
  html body .post-2d .post-2d-content {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 30px 26px 24px !important;
    transform: none !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
  html body .post-2d .post-2d-content-top {
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 0 !important;
    width: 100% !important;
    height: 48px !important;
    pointer-events: none;
    z-index: 5;
  }
  html body .post-2d .post-2d-close-btn {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    left: auto !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    pointer-events: auto;
    background-color: #0009;
    border-radius: 50%;
  }
  html body .post-2d .scroll-indicator-wrapper,
  html body .post-2d .post-2d-matched-wrapper {
    display: none !important;
  }
  html body .post-2d .post-2d-name {
    margin-top: 18px !important;
    font-size: 18px !important;
  }
  .post-2d-share-container {
    margin-top: 18px !important;
  }
  html body .add-steps-message {
    width: min(290px, calc(100vw - 48px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
  }
  html body .add-steps-message-items-wrapper {
    max-width: 100% !important;
  }
  .add-steps-message-input {
    overflow-wrap: anywhere;
  }
  .add-steps-message-terms {
    max-width: 100%;
    box-sizing: border-box;
  }
  html body .add-steps-back-btn {
    left: 20px !important;
    bottom: calc(75px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    margin: 0 !important;
  }
  html body .add-steps-validate-btn {
    right: 20px !important;
    left: auto !important;
    bottom: calc(75px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    margin: 0 !important;
  }
}

@media (max-width: 380px) {
  html body .footer-content {
    column-gap: 4px !important;
  }
  html body .footer-content[data-managed-menu="true"] > .footer-link-item {
    padding-inline: 2px !important;
  }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  html body .post-2d {
    z-index: 30;
  }
  html body .post-2d .post-2d-message-wrapper {
    padding-top: 0 !important;
  }
  html body .post-2d .post-2d-center-wrapper {
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 210px) !important;
  }
  html body .post-2d .post-2d-close-btn {
    z-index: 10;
  }
  html body .post-2d .post-2d-close-btn::after {
    content: "×";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ddd;
    font:
      28px/1 Arial,
      sans-serif;
    pointer-events: none;
  }
  html body .post-2d .post-2d-close-btn .circle-btn-icon-wrapper {
    visibility: hidden;
  }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  html body .add-steps-back-btn,
  html body .add-steps-validate-btn {
    width: 140px !important;
    max-width: calc(50vw - 28px) !important;
    bottom: calc(145px + env(safe-area-inset-bottom)) !important;
    transform: none !important;
    z-index: 35;
  }
  html body .add-steps-back-btn {
    right: auto !important;
  }
  html.revival-keyboard-open body .add-steps-message {
    top: 12px !important;
    margin-top: 0 !important;
  }
  html.revival-keyboard-open body .add-steps-back-btn,
  html.revival-keyboard-open body .add-steps-validate-btn {
    bottom: 8px !important;
  }
}

@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  html body .post-2d .post-2d-close-btn {
    position: fixed !important;
    top: 91px !important;
    right: 18px !important;
  }
  html.revival-keyboard-open body .add-steps-message {
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 80px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom;
  }
  html.revival-keyboard-open body .add-steps-message-terms {
    margin-top: 16px !important;
  }
}

@media (max-width: 1024px) and (max-height: 500px) {
  html body .header {
    height: 64px !important;
  }
  html body .header-logo {
    top: 12px !important;
    transform: scale(0.55) !important;
  }
  html body .header-fade-container {
    top: 12px !important;
    transform: scale(0.55) !important;
  }
  html body .footer,
  html body .footer-content {
    height: calc(52px + env(safe-area-inset-bottom)) !important;
  }
  html body .footer-content {
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
  }
  html body .post-2d .post-2d-center-wrapper {
    top: 70px !important;
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 132px) !important;
    display: grid !important;
    grid-template-columns: minmax(140px, 35%) minmax(0, 1fr);
  }
  html body .post-2d .post-2d-img {
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    align-self: start;
  }
  html body .post-2d .post-2d-content {
    padding: 24px 58px 24px 26px !important;
  }
  html body .post-2d .post-2d-close-btn {
    top: 76px !important;
  }
  html body .add-steps-message {
    top: 64px !important;
    margin-top: 0 !important;
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 180px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom;
  }
  html body .add-steps-message-terms {
    margin-top: 16px !important;
  }
  html body .add-steps-back-btn,
  html body .add-steps-validate-btn {
    bottom: calc(58px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 760px) and (min-height: 501px) {
  /* Place the three mobile controls in a horizontal row inside the footer. */
  html body .nav {
    top: auto !important;
    left: max(26px, env(safe-area-inset-left)) !important;
    right: max(26px, env(safe-area-inset-right)) !important;
    bottom: calc(28px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    height: 92px !important;
    margin-top: 0 !important;
    z-index: 2;
  }
  html body .nav-map-wrapper,
  html body .nav-search-wrapper,
  html body .nav-add-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 92px !important;
    height: 92px !important;
    margin: 0 !important;
  }
  html body .nav-search-wrapper {
    left: 50% !important;
    transform: translateX(-50%);
  }
  html body .nav-add-wrapper {
    left: auto !important;
    right: 0 !important;
  }
  html body .nav-search-btn,
  html body .nav-add-btn {
    position: absolute;
    left: 23px !important;
    top: 23px !important;
  }
  /* The legacy globe is drawn in WebGL behind the solid footer backdrop. Cut
     one exact circular window for it while keeping the rest of the footer black. */
  html body .footer-bg {
    -webkit-mask-image: radial-gradient(circle 48px at 72px 58px, transparent 47px, #000 48px);
    mask-image: radial-gradient(circle 48px at 72px 58px, transparent 47px, #000 48px);
    pointer-events: none;
  }
}

/* Center the complete message, including its icon, and allow narrow screens to wrap. */
html body .error-blocker-messages-wrapper {
  left: 50%; top: 50%; width: max-content; height: auto;
  max-width: min(760px, calc(100% - 40px)); margin: 0;
  transform: translate(-50%, -50%);
}
html body .error-blocker-message {
  height: auto; white-space: normal; overflow-wrap: anywhere;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
html body .error-blocker-message::before { flex: 0 0 21px; top: 0; }
html body .post-2d-img { outline: none; position: relative; background-size: cover; background-repeat: no-repeat; background-position: center; cursor: zoom-in; }
.revival-photo-viewer { position: fixed; inset: 0; margin: auto; padding: 48px 12px 12px; border: 0; background: #080808; color: white; width: calc(100vw - 24px); max-width: 1600px; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); box-sizing: border-box; }
.revival-photo-viewer::backdrop { background: #000e; }
.revival-photo-viewer img { display: block; width: 100%; height: 100%; object-fit: contain; }
.revival-photo-viewer button { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #222; color: #fff; font: 28px/1 Arial,sans-serif; cursor: pointer; }

html body .post-2d-img:focus-visible { outline: none !important; box-shadow: inset 0 0 0 1px #ffffff55; }

/* Photo composition and multi-photo memories retain the quiet archive controls. */
.add-steps.photo-drafting { z-index: 6; }
.photo-editor { --photo-editor-size: min(290px, 36dvh); width: var(--photo-editor-size) !important; height: var(--photo-editor-size) !important; top: calc(50% - 31px); margin: 0 !important; transform: translate(-50%, -50%) !important; z-index: 5; }
.photo-editor .photo-crop-viewport { display: block; width: 100%; aspect-ratio: 1; border: 1px solid #ffffff33; border-radius: 50%; overflow: hidden; position: relative; box-sizing: border-box; cursor: grab; touch-action: none; }
.photo-editor .photo-crop-viewport:active { cursor: grabbing; }
.photo-editor button { min-width: 44px; height: 44px; border: 1px solid #ffffff26; border-radius: 50%; background: transparent; color: #ddd; font: 22px Georgia, serif; cursor: pointer; }
.photo-editor button:disabled { opacity: .25; cursor: default; }
.photo-editor button:focus-visible, .photo-editor .photo-crop-viewport:focus-visible { outline: 1px solid #aaa !important; outline-offset: 2px !important; }
.photo-zoom-controls { display: flex; align-items: center; justify-content: center; gap: 4px; }
.photo-zoom-controls { width: 176px; max-width: 100%; margin: 8px auto 4px; gap: 0; opacity: .7; }
.photo-zoom-controls button { min-width: 36px; width: 36px; height: 36px; border-color: transparent; font-size: 18px; }
.photo-zoom-controls input { width: calc(100% - 72px); accent-color: #aaa; height: 36px; min-width: 0; background: transparent; appearance: none; cursor: pointer; }
.photo-zoom-controls input::-webkit-slider-runnable-track { height: 2px; background: #ffffff40; border-radius: 2px; }
.photo-zoom-controls input::-webkit-slider-thumb { appearance: none; width: 9px; height: 9px; margin-top: -3.5px; border-radius: 50%; background: #bbb; }
.photo-zoom-controls input::-moz-range-track { height: 2px; background: #ffffff40; }
.photo-zoom-controls input::-moz-range-thumb { width: 9px; height: 9px; border: 0; background: #bbb; }
.photo-edit-strip { --photo-thumb-size: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; position: relative; width: min(294px, calc(100vw - 24px)); left: 50%; transform: translateX(-50%); touch-action: none; padding: 8px 0; user-select: none; }
.photo-thumb, .photo-editor .photo-add { position: relative; flex: 0 0 var(--photo-thumb-size); width: var(--photo-thumb-size); height: var(--photo-thumb-size); box-sizing: border-box; }
.photo-editor .photo-thumb-select { display: block; position: relative; width: 100%; height: 100%; min-width: 0; box-sizing: border-box; padding: 2px; opacity: .55; touch-action: none; cursor: grab; }
.photo-thumb-select.is-dragging { z-index: 3; opacity: .9; cursor: grabbing; box-shadow: 0 4px 18px #0009; }
.photo-thumb.is-drop-target .photo-thumb-select { border-color: #eee; box-shadow: 0 0 0 2px #ffffff55; }
.photo-thumb-select[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 0 0 1px #aaa; }
.photo-thumb img { display: block; border-radius: 50%; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-editor .photo-thumb-remove { position: absolute; right: -8px; top: -8px; width: 24px; min-width: 24px; height: 24px; padding: 0; font: 17px/22px Arial, sans-serif; background: #161616; border-color: #ffffff55; opacity: 0; pointer-events: none; z-index: 4; }
.photo-thumb:hover .photo-thumb-remove, .photo-thumb:focus-within .photo-thumb-remove { opacity: 1; pointer-events: auto; }
.photo-edit-strip.is-sorting .photo-thumb-remove { visibility: hidden; }
.photo-editor .photo-add { padding: 0; opacity: .75; }
.photo-editor .photo-add:hover { opacity: 1; border-color: #ffffff66; }
.photo-zoom-controls[hidden], .photo-crop-viewport img[hidden] { display: none !important; }
.photo-crop-viewport.is-empty { cursor: default; }
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .photo-editor .photo-thumb-remove { opacity: 1; pointer-events: auto; }
  .photo-thumb-remove::after { content: ""; position: absolute; inset: -6px; }
}
.photo-upload-status { position: absolute; top: calc(50% - 35px); left: 50%; transform: translate(-50%, -50%); z-index: 10; box-sizing: border-box; width: min(260px, calc(100% - 48px)); color: #eee; font: 18px/1.5 Georgia, serif; text-align: center; pointer-events: none; }
.photo-upload-percent { font-size: clamp(42px, 6vw, 64px); line-height: 1.2; font-weight: normal; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.photo-upload-caption { font-style: italic; }
.photo-upload-detail { color: #aaa; font-size: 12px; margin-top: 10px; }
.photo-upload-status progress { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.add-steps:has(.photo-upload-status) :is(.add-steps-back-btn, .add-steps-validate-btn, .add-steps-upload-methods-selection-container, .add-steps-upload-methods-loading) { visibility: hidden !important; pointer-events: none !important; }
@media (max-width: 600px) { .photo-upload-status { font-size: 16px; width: 240px; } }

.photo-gallery-controls { position: absolute; left: 0; top: 0; width: var(--revival-card-image-width, 600px); height: var(--revival-card-image-height, 600px); pointer-events: none; }
.photo-gallery-controls[hidden], .revival-photo-viewer button[hidden] { display: none !important; }
.photo-gallery-controls > button, .revival-photo-viewer .photo-gallery-prev, .revival-photo-viewer .photo-gallery-next { position: absolute; top: 50%; bottom: auto; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 0; background: transparent; color: var(--gallery-ink, #fff); padding: 11px; pointer-events: auto; cursor: pointer; }
.photo-gallery-controls > button svg, .revival-photo-viewer .photo-gallery-prev svg, .revival-photo-viewer .photo-gallery-next svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; filter: drop-shadow(0 1px 2px var(--gallery-shadow, #000b)); }
.photo-gallery-prev { left: 6px !important; right: auto !important; }
.photo-gallery-next { right: 6px !important; left: auto !important; }
/* Photo navigation stays quiet until the photo is explored. */
.photo-gallery-controls > button { opacity: 0; pointer-events: none; transition: opacity .18s ease; }
@media (any-hover: hover) {
  .post-2d-img:hover ~ .photo-gallery-controls:not(.photo-touch-input) > button,
  .photo-gallery-controls:not(.photo-touch-input):hover > button { opacity: 1; pointer-events: auto; }
}
.post-2d-img:focus-visible ~ .photo-gallery-controls > button,
.photo-gallery-controls:has(button:focus-visible) > button { opacity: 1; pointer-events: auto; }
.photo-gallery-controls button:focus-visible { outline: 1px solid #fff !important; outline-offset: 2px; }
.photo-gallery-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; max-width: 100%; pointer-events: auto; }
.photo-gallery-dot { position: relative; width: 24px; height: 28px; flex: 0 0 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.photo-gallery-dot::after { content: ""; display: block; width: 5px; height: 5px; margin: auto; border-radius: 50%; background: var(--gallery-ink, #fff); opacity: .55; box-shadow: 0 0 0 1px var(--gallery-shadow, #0009), 0 1px 3px var(--gallery-shadow, #0009); transition: background .18s ease, transform .18s ease; }
.photo-gallery-dot[aria-pressed="true"]::after { background: var(--gallery-ink, #fff); opacity: 1; transform: scale(1.25); }
.photo-gallery-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body:not([data-memory-sharing="true"]) .post-2d-share-container,
body:not([data-memory-sharing="true"]) .add-steps-congrats-shares-container { display: none !important; }
.post-2d .post-2d-name { color: #aaa; }
@media (prefers-reduced-motion: reduce) {
  .photo-gallery-controls > button, .photo-gallery-dot::after { transition: none; }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  .photo-adjusting .add-steps-back-btn, .photo-adjusting .add-steps-validate-btn { top: auto !important; bottom: calc(64px + env(safe-area-inset-bottom)) !important; margin: 0 !important; width: 120px !important; }
  .photo-adjusting .add-steps-back-btn { left: 12px !important; right: auto !important; }
  .photo-adjusting .add-steps-validate-btn { right: 12px !important; left: auto !important; }
  .photo-gallery-controls { width: 100%; height: auto; aspect-ratio: 1; }
}
@media (max-width: 1024px) and (max-height: 500px) {
  .photo-editor { --photo-editor-size: min(160px, 36dvh); top: 48% !important; }
  .photo-gallery-controls { width: 35%; }
}

@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  .photo-adjusting .add-steps-back-btn, .photo-adjusting .add-steps-validate-btn { display: flex !important; align-items: center; justify-content: center; gap: 8px; height: 44px; white-space: nowrap; }
  .photo-adjusting .add-steps-back-btn { flex-direction: row-reverse; }
  .photo-adjusting .add-steps-back-btn > *, .photo-adjusting .add-steps-validate-btn > * { float: none !important; margin: 0 !important; }
}
.photo-editor input:focus-visible { outline: 1px solid #aaa !important; outline-offset: 0 !important; }

.post-2d-img { touch-action: pinch-zoom; }
.memory-navigation { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.memory-navigation button { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 10px; border: 1px solid #ffffff26; border-radius: 50%; background: transparent; color: #eee; cursor: pointer; pointer-events: auto; }
.memory-navigation-prev { left: -64px; }
.memory-navigation-next { right: -64px; }
.memory-navigation button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.memory-navigation button:hover { color: #fff; border-color: #ffffff66; }
.memory-navigation button:disabled { opacity: .45; cursor: progress; }
.memory-navigation button:focus { outline: none !important; }
.memory-navigation button:focus-visible { box-shadow: 0 0 0 2px #ffffff55; }
.memory-navigation-status { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; color: #aaa; font: 13px Georgia, serif; }
.photo-crop-viewport img { position: absolute; max-width: none; pointer-events: none; user-select: none; }
.revival-photo-viewer:focus, .revival-photo-viewer button:focus { outline: none !important; }
.revival-photo-viewer button:focus-visible { box-shadow: 0 0 0 1px #ffffff66; }
@media (max-width: 1100px) {
  .memory-navigation button { top: auto; bottom: 8px; transform: none; background: #000b; }
  .memory-navigation-prev { left: 8px; }
  .memory-navigation-next { right: 8px; }
  .memory-navigation-status { left: 60px; right: 60px; bottom: 16px; }
}

/* Reading a memory owns the mobile viewport. Restore exploration on close. */
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  html.revival-memory-mobile-open body .nav,
  html.revival-memory-mobile-open body .footer { visibility: hidden !important; pointer-events: none !important; }
  html.revival-memory-mobile-open body .post-2d .post-2d-center-wrapper {
    top: calc(85px + env(safe-area-inset-top)) !important;
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 153px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }
  html.revival-memory-mobile-open body .post-2d .post-2d-close-btn { top: calc(91px + env(safe-area-inset-top)) !important; }
  .post-2d > .memory-navigation {
    top: auto; left: 12px; right: 12px; bottom: env(safe-area-inset-bottom); height: 60px;
  }
  .post-2d > .memory-navigation .memory-navigation-prev { left: calc(50% - 60px); }
  .post-2d > .memory-navigation .memory-navigation-next { right: calc(50% - 60px); }
  .post-2d > .memory-navigation .memory-navigation-status { bottom: 60px; left: 0; right: 0; background: #000; }
}
@media (max-width: 1024px) and (max-height: 500px) {
  html.revival-memory-mobile-open body .post-2d .post-2d-center-wrapper {
    top: 70px !important;
    max-height: calc(var(--revival-visual-viewport-height, 100dvh) - 138px - env(safe-area-inset-bottom)) !important;
  }
  html.revival-memory-mobile-open body .post-2d .post-2d-close-btn { top: 76px !important; }
}

.photo-draft-cancel { display: none; position: fixed; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); width: 44px; height: 44px; border: 1px solid #ffffff26; border-radius: 50%; background: transparent; color: #eee; font: 28px/1 Arial, sans-serif; cursor: pointer; }
.photo-drafting .photo-draft-cancel { display: block; }
.photo-draft-cancel:focus { outline: none !important; }
.photo-draft-cancel:focus-visible { box-shadow: 0 0 0 1px #ffffff66; }

/* Draft and full-photo overlays share one screen-corner dismissal point. */
body:has(.add-steps.photo-drafting) .header-fade-container,
body:has(.add-steps.photo-drafting) .header-description { visibility: hidden !important; pointer-events: none !important; }
.revival-photo-viewer .photo-viewer-close { position: fixed; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); border: 1px solid #ffffff26; background: #080808; z-index: 2; }
/* Match the rendered 44px logo, including its mobile scale and safe area. */
:root { --photo-close-center-y: 51px; }
@media (min-height: 700px) {
  :root { --photo-close-center-y: 68px; }
}
@media (max-width: 760px) {
  :root { --photo-close-center-y: calc(20px + env(safe-area-inset-top) + 44px * .72 / 2); }
}
@media (max-width: 1024px) and (max-height: 500px) {
  :root { --photo-close-center-y: calc(12px + 44px * .55 / 2); }
}
.photo-draft-cancel, .revival-photo-viewer .photo-viewer-close {
  top: calc(var(--photo-close-center-y) - 22px);
  box-sizing: border-box;
  width: 44px;
  height: 44px;
}
@media (min-width: 761px) and (min-height: 501px) {
  .photo-adjusting .add-steps-back-btn, .photo-adjusting .add-steps-validate-btn { display: flex !important; align-items: center; gap: 18px; height: 44px; top: calc(50% - 31px) !important; margin-top: -22px !important; opacity: 1 !important; transform: none !important; }
  .photo-adjusting .add-steps-back-btn { flex-direction: row-reverse; }
  .photo-adjusting .add-steps-back-btn > *, .photo-adjusting .add-steps-validate-btn > * { float: none !important; margin: 0 !important; }
}
@media (max-width: 760px) and (max-height: 740px) {
  /* Leave room for a second thumbnail row above the fixed step actions. */
  .photo-editor { --photo-editor-size: min(220px, 30dvh); top: calc(50% - 120px) !important; }
  .photo-adjusting .add-steps-indicators { visibility: hidden; }
}
/* The first local upload uses the same add symbol as the thumbnail queue. */
.circle-btn-symbol-local label.circle-btn-icon { background: none !important; display: grid; place-items: center; }
.circle-btn-symbol-local label.circle-btn-icon::after { content: "+"; color: #ddd; font: 24px/1 Georgia, serif; }

/* One shared row keeps text and the 36px search sprite on the same centerline. */
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) {
  html body .search-input-wrapper { height: 68px !important; }
  html body .search-input-move-container { height: 68px; }
  html body .search-input, html body .search-input-placeholder {
    width: calc(100% - 56px) !important; max-width: none !important;
    height: 68px !important; line-height: 68px !important;
    font-size: clamp(30px, 8vw, 50px) !important; letter-spacing: -1px;
    text-indent: 0; overflow: hidden; transform: none !important;
  }
  html body .search-btn { top: 12px !important; right: 0 !important; width: 44px !important; height: 44px !important; background: none; }
  html body .search-btn::before { content: ""; display: block; position: absolute; width: 36px; height: 36px; left: 4px; top: 4px; background: inherit; background-image: url("/img/ui_x2.png"); background-size: 400px 400px; background-position: 0 -200px; }
  html.revival-search-open body .nav { opacity: 1 !important; pointer-events: auto !important; }
}

/* The original tutorial rhythm, with input-specific line icons. */
.touch-tutorial-icon { display: none; }
html.touch-tutorial .tutorial-page-icon canvas { visibility: hidden; }
html.touch-tutorial .touch-tutorial-icon { display: block; position: absolute; inset: 20px; width: 120px; height: 120px; color: #fff; }
.tutorial-page-icon { position: relative; }
.tutorials { pointer-events: none !important; }
html.touch-tutorial .touch-tutorial-icon { animation: touch-guide-drift 2.4s ease-in-out infinite; }
@keyframes touch-guide-drift { 0%,100% { transform: translateX(-7px); } 50% { transform: translateX(7px); } }
@media (max-width: 760px), (max-height: 500px) {
  .tutorial-page-icon { transform: scale(.72); margin-bottom: -24px !important; }
  .tutorial-page-text { font-size: 19px !important; line-height: 1.45 !important; }
}
@media (prefers-reduced-motion: reduce) { html.touch-tutorial .touch-tutorial-icon { animation: none; } }
/* One quiet reading surface for managed pages and long memories. */
html.memory-reader-open .post-2d { visibility: hidden !important; }
html body .revival-menu-memory { background: rgba(0,0,0,.88); padding: clamp(16px,5vh,64px) max(16px,env(safe-area-inset-right)) clamp(16px,5vh,64px) max(16px,env(safe-area-inset-left)); }
html body .revival-menu-card { display: block; position: relative; width: min(760px,100%); max-height: 100%; min-height: 0; overflow: hidden; background: #000; border: 1px solid #ffffff1f; }
html body .revival-menu-image, html body .revival-menu-excerpt, html body .revival-menu-actions { display: none; }
html body .revival-menu-body { box-sizing: border-box; max-height: calc(var(--revival-visual-viewport-height,100dvh) - clamp(32px,10vh,128px)); padding: clamp(32px,5vw,64px); overflow: auto; scrollbar-width: thin; scrollbar-color: #555 transparent; }
html body .revival-menu-body > h2 { margin: 0 0 24px; font: 26px/1.3 'ITC Century W01 Book',Georgia,'Songti SC','Noto Serif CJK SC',serif; }
html body .revival-menu-full { display: block; border: 0; margin: 0; padding: 0; font: 18px/1.75 'ITC Century W01 Book',Georgia,'Songti SC','Noto Serif CJK SC',serif; color: #d0cdca; overflow-wrap: anywhere; }
html body .revival-menu-full p { font: inherit; color: inherit; margin: 0 0 1.25em; }
html body .revival-menu-full h1, html body .revival-menu-full h2, html body .revival-menu-full h3 { font: 26px/1.3 'ITC Century W01 Book',Georgia,'Songti SC','Noto Serif CJK SC',serif; margin: 1.7em 0 .7em; color: #fff; }
html body .revival-menu-full h3 { font-size: 22px; }
html body .revival-menu-full ul, html body .revival-menu-full ol { padding-left: 1.4em; margin: 0 0 1.4em; }
html body .revival-menu-full li { margin: .45em 0; }
html body .revival-menu-full a { color: #fff; text-underline-offset: 4px; text-decoration-color: #ffffff66; }
html body .revival-menu-full img, html body .revival-menu-full video { max-width: 100%; height: auto; }
html body .revival-menu-full blockquote { border-left: 1px solid #ffffff55; padding-left: 1.3em; margin: 1.5em 0; font-style: italic; }
html body .revival-menu-full pre { max-width: 100%; overflow: auto; padding: 16px; background: #ffffff08; font-size: 14px; }
html body .revival-menu-full table { display: block; overflow: auto; border-collapse: collapse; }
html body .revival-menu-full th, html body .revival-menu-full td { border-bottom: 1px solid #ffffff22; padding: 10px; }
html body .revival-menu-close { z-index: 2; position: fixed; top: max(16px,env(safe-area-inset-top)); right: max(16px,env(safe-area-inset-right)); border: 1px solid #ffffff40; border-radius: 50%; background: #090909; font: 28px/1 Arial,sans-serif; opacity: 1; }
@media (max-width: 600px) {
  html body .revival-menu-body { padding: 30px 24px; }
  html body .revival-menu-body > h2 { font-size: 23px; margin-bottom: 20px; }
  html body .revival-menu-full { font-size: 16px; }
  html body .revival-menu-full h2 { font-size: 23px; }
}

.media-video-badge { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: white; text-shadow: 0 1px 5px black; pointer-events: none; }
.memory-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 60px; height: 60px; display: grid; place-items: center; padding-left: 3px; border: 1px solid #ffffff99; border-radius: 50%; background: #0008; color: white; font: 20px Arial,sans-serif; pointer-events: none; }
.memory-video-play[hidden], .revival-photo-viewer [hidden] { display: none !important; }
.revival-photo-viewer video { display: block; width: 100%; height: 100%; object-fit: contain; }
.media-playback-error { position: absolute; inset: 40% 15% auto; color: #fff; text-align: center; font: 18px/1.5 Georgia,serif; }

html body .revival-menu-memory:focus { outline: none; }

.add-steps-upload-methods-text-size { display: inline-block; max-width: 230px; font-size: 12px; line-height: 1.6; }

@media (max-width:760px) and (min-height:501px) {
  html body .nav-search-wrapper, html body .nav-add-wrapper { pointer-events: none; }
  html body .nav-search-btn, html body .nav-add-btn { pointer-events: auto; }
}
html body .revival-menu-memory .revival-menu-card { display: block !important; overflow: hidden !important; max-height: 100% !important; }
html body .revival-menu-memory .revival-menu-image { display: none !important; }
@media (max-width:760px) and (min-height:501px) {
  html body .nav, html.revival-search-open body .nav { pointer-events: none !important; }
  html body .nav-map-btn, html body .nav-search-btn, html body .nav-add-btn { pointer-events: auto !important; }
}

/* Match the empty desktop caret to its placeholder; leave typed autosizing intact. */
html body .search-input { font-size: 100px; }

/* A continuation of the excerpt, shared by the live card and admin preview. */
html body .revival-memory-explore {
  display: inline; margin: 0 0 0 .35em; padding: 0; min-height: 0;
  border: 0; border-radius: 0; background: transparent; color: #d0cdca;
  font: inherit; letter-spacing: inherit; text-transform: none; white-space: nowrap;
  text-decoration: underline; text-decoration-color: #ffffff55; text-underline-offset: .2em;
  cursor: pointer; touch-action: manipulation;
}
html body .revival-memory-explore:hover { color: #fff; text-decoration-color: currentColor; }
html body .revival-reader-author {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid #ffffff26;
  color: #aaa; font: 18px/1.5 'ITC Century W01 Book',Georgia,'Songti SC',serif;
}
html body .revival-reader-author:empty { display: none; }
html body .revival-menu-close { top: calc(var(--photo-close-center-y) - 22px); right: max(22px,env(safe-area-inset-right)); }
@media (prefers-reduced-motion: reduce) { html body .revival-menu-card { transition: none; } }

/* A quiet control layer over the complete video frame. */
.memory-player { position: relative; top: 50%; transform: translateY(-50%); width: min(100%, calc((100dvh - 84px) * var(--video-aspect, 1.7777778))); aspect-ratio: var(--video-aspect, 1.7777778); margin: auto; background: #080808; }
.memory-player:fullscreen { top: 0; transform: none; width: 100vw; height: 100dvh; }
.memory-player:focus { outline: none; }
.memory-player-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 22px 10px; background: linear-gradient(transparent, #000c); opacity: 1; transition: opacity .25s ease; }
.memory-player.controls-hidden { cursor: none; }
.memory-player.controls-hidden .memory-player-controls { opacity: 0; pointer-events: none; }
.memory-player-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 12px; background: #0009; color: #eee; font: 15px/1.5 Georgia,serif; pointer-events: none; }
.memory-player-row { display: flex; align-items: center; gap: 8px; }
.memory-player button { position: static; flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; padding: 11px; border: 0; border-radius: 0; background: transparent; color: #eee; transform: none; -webkit-tap-highlight-color: transparent; }
.memory-player button:hover { color: #fff; }
.memory-player button svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.memory-player-time { margin-right: auto; color: #ddd; font: 13px/1.4 Georgia,serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.memory-player input[type="range"] { display: block; appearance: none; -webkit-appearance: none; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; cursor: pointer; touch-action: none; background: transparent; color: #fff; }
.memory-player input[type="range"]:focus-visible { outline: 1px solid #ffffff88; outline-offset: 2px; }
.memory-player .memory-player-seek { width: 100%; }
.memory-player input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: #ffffff55; }
.memory-player .memory-player-seek::-webkit-slider-runnable-track { background: linear-gradient(to right, #fff 0 var(--played, 0%), #ffffff70 var(--played, 0%) var(--buffered, 0%), #ffffff30 var(--buffered, 0%) 100%); }
.memory-player input[type="range"]::-moz-range-track { height: 2px; background: #ffffff55; }
.memory-player .memory-player-seek::-moz-range-track { background: linear-gradient(to right, #fff 0 var(--played, 0%), #ffffff70 var(--played, 0%) var(--buffered, 0%), #ffffff30 var(--buffered, 0%) 100%); }
.memory-player input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 8px; height: 8px; margin-top: -3px; border: 0; border-radius: 50%; background: #fff; }
.memory-player input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; }
.memory-player .memory-player-volume { width: 64px; flex: 0 0 64px; margin-right: 8px; }
@media (max-width: 600px), (pointer: coarse) {
  .memory-player-controls { padding: 32px 12px 8px; }
  .memory-player-row { gap: 2px; }
  .memory-player input[type="range"] { height: 44px; }
  .memory-player input.memory-player-volume { display: none; }
}
@media (prefers-reduced-motion: reduce) { .memory-player-controls { transition: none; } }

/* Audio stays inside the memory cover, beside its story. */
html body .post-2d-img.has-inline-audio { cursor: default; }
.memory-audio-player[hidden] { display: none !important; }
.post-2d-img .memory-audio-player { position: absolute; inset: 0; top: 0; width: 100%; height: 100%; margin: 0; transform: none; aspect-ratio: auto; background: #000; }
.memory-audio-player audio { display: none; }
.memory-audio-waveform { display: block; width: 100%; height: calc(100% - 96px); }
.memory-audio-player .memory-player-controls { bottom: 42px; left: 12%; right: 12%; padding: 0; background: transparent; }
.memory-audio-player .memory-player-time { color: #9d9b96; font-weight: normal; font-size: 12px; }
.memory-audio-player .memory-player-seek::-webkit-slider-runnable-track { height: 1px; }
.memory-audio-player .memory-player-seek::-moz-range-track { height: 1px; }
.memory-audio-player .memory-player-seek::-webkit-slider-thumb { width: 5px; height: 5px; margin-top: -2px; }
.memory-audio-player .memory-player-seek::-moz-range-thumb { width: 5px; height: 5px; }
.memory-audio-player button:focus-visible { outline: 1px solid #ffffff66; outline-offset: 2px; }
.memory-audio-player .media-playback-error { position: absolute; bottom: 108px; left: 12px; right: 12px; text-align: center; font: 13px/1.4 Georgia,serif; }
@media (max-width: 600px) { .memory-audio-player .memory-player-controls { bottom: 34px; left: 9%; right: 9%; } }

.memory-live-photo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.memory-live-photo[hidden] { display: none !important; }
.memory-live-photo video { position: absolute; max-width: none; visibility: hidden; pointer-events: none; }
.memory-live-controls { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; align-items: center; gap: 6px; color: white; font: 11px/1.4 Arial,sans-serif; }
.memory-live-controls button, .memory-live-controls a { pointer-events: auto; min-width: 38px; min-height: 38px; padding: 0 8px; border: 1px solid #ffffff55; border-radius: 20px; background: #0009; color: white; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.memory-live-controls button { font: inherit; letter-spacing: 1px; }
.memory-live-controls a { font-size: 20px; }
.memory-live-controls button:focus-visible, .memory-live-controls a:focus-visible { outline: 1px solid white; outline-offset: 2px; }
.memory-live-status { position: absolute; top: 46px; left: 0; padding: 3px 6px; background: #000b; max-width: calc(100% - 12px); }
.memory-live-status:empty { display: none; }

/* Quiet result feedback preserves the existing search overlay and galaxy. */
html body .revival-search-feedback { position: fixed; z-index: 12; left: 50%; bottom: 100px; transform: translateX(-50%); width: max-content; max-width: min(320px, 82vw); color: #bbb; font: 13px/1.6 Georgia, serif; text-align: center; pointer-events: auto; }
html body .revival-search-feedback a { display: block; color: #ddd; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
html body .revival-search-feedback[hidden], html.revival-memory-mobile-open body .revival-search-feedback { display: none; }
@media (max-width: 640px) { html body .revival-search-feedback { bottom: 128px; } }
