@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('fonts/be-vietnam-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('fonts/be-vietnam-semibold.ttf') format('truetype');
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f7f8f0;
  --cream: #fffef8;
  --ink: #22372c;
  --muted: #4c6255;
  --green: #254f39;
  --line: #d4decf;
  --sage: #e8efdf;
  --gold: #c8953e;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Be Vietnam Pro', Arial, sans-serif;
  font: 16px/1.55 var(--sans);
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse 800px 480px at 50% 160px, #fffcf0, transparent 90%); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, .reel:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.topbar { width: min(1330px, calc(100% - clamp(28px, 8vw, 110px))); margin: auto; min-height: 76px; padding: 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--green); text-decoration: none; font: 600 28px/1.42 var(--serif); letter-spacing: -.03em; display: flex; align-items: center; white-space: nowrap; }
.mark { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; padding: 2px; margin-right: 8px; border-radius: 50%; border: 1px solid #e5d8b7; background: #f5ead0; }
.period { color: #ab7525; }
.top-actions { display: flex; align-items: center; gap: clamp(7px, 2vw, 18px); }
.demo-tag { color: var(--muted); font-size: 11px; line-height: 1.55; font-weight: 600; white-space: nowrap; }
.edit-link, .quiet-button, .solid-button { border: 1px solid var(--line); border-radius: 99px; min-height: 44px; padding: 7px 15px; font-size: 13px; font-weight: 600; background: var(--cream); }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.edit-link { background: var(--cream); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.icon { display: inline-block; width: 17px; height: 17px; vertical-align: -.2em; }
[data-icon] { display: inline-flex; align-items: center; }
.edit-link:hover, .quiet-button:hover { background: var(--sage); }
.solid-button { color: white; background: var(--green); border-color: var(--green); }
.solid-button:hover:not(:disabled) { background: var(--ink); }
.hero { padding-top: clamp(30px, 4.1vw, 56px); }
.intro { padding: 0 14px; text-align: center; }
.eyebrow { color: var(--muted); font-size: 11px; line-height: 1.65; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.intro .eyebrow { display: flex; justify-content: center; align-items: center; gap: 10px; }
.intro .eyebrow i { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }
h1 { font: 500 clamp(35px, 6.9vw, 99px)/1.22 var(--serif); letter-spacing: -.043em; margin-top: 10px; text-wrap: balance; }
h1 span, h1 em { white-space: nowrap; }
h1 em { color: var(--green); font-weight: 400; }
.intro-copy { display: grid; margin: 13px auto 0; max-width: 39rem; color: var(--muted); font-size: clamp(15px, 2vw, 19px); }
.refrain-line { grid-area: 1 / 1; align-self: center; opacity: 0; transform: translateY(4px); transition: opacity .22s ease, transform .3s ease; text-wrap: balance; }
.refrain-line.is-current { opacity: 1; transform: translateY(0); transition-delay: .24s; }
.lifespan { margin: 15px auto 0; display: table; padding: 6px 14px; border-radius: 30px; background: var(--sage); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .045em; }
.reel-wrap { position: relative; margin-top: clamp(16px, 2.6vw, 35px); display: grid; align-items: center; }
.reel, .reel-player { grid-area: 1 / 1; }
.reel { --card-width: clamp(117px, 15.1vw, 216px); --card-height: clamp(184px, 23vw, 340px); height: calc(var(--card-height) + 85px); width: 100%; position: relative; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; }
.reel.dragging { cursor: grabbing; }
.reel.is-static { cursor: default; }
.reel-card { position: absolute; top: 0; left: 0; display: block; width: var(--card-width); height: var(--card-height); overflow: hidden; padding: 0; border: 0; border-radius: 14px; background: #dce3d3; cursor: pointer; will-change: transform; }
.reel.dragging .reel-card { cursor: grabbing; }
.reel-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
[data-grade] { filter: contrast(var(--photo-contrast, 1.025)) brightness(var(--photo-light, 1.012)) saturate(var(--photo-color, .97)); }
[data-grade="shadows"] { --photo-contrast: .94; --photo-light: 1.072; --photo-color: .95; }
[data-grade="backlit"] { --photo-contrast: .91; --photo-light: 1.025; --photo-color: .95; }
[data-grade="daylight"] { --photo-contrast: 1.015; --photo-light: .987; --photo-color: .94; }
[data-grade="warm"] { --photo-contrast: 1.015; --photo-light: 1.02; --photo-color: .88; }
[data-grade="tribute"] { filter: none; }
.media-play { position: absolute; bottom: 18px; left: 15px; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; background: #fcfcf2e8; color: var(--ink); font-size: 12px; }
.media-play[hidden] { display: none; }
.doodle { position: absolute; z-index: 1; pointer-events: none; width: 66px; right: 8.4%; top: -18px; color: var(--green); transform: rotate(12deg); }
.reel-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 25px; color: var(--muted); text-align: center; }
.reel-wrap.is-empty .reel { height: 124px; }
.reel-wrap.is-empty .doodle { display: none; }
.reel-wrap.is-playing .reel { opacity: .26; pointer-events: none; }
.reel-player { --reel-frame-height: clamp(235px, 48dvh, 445px); --reel-frame-width: calc(var(--reel-frame-height) * var(--viewer-ratio)); z-index: 2; justify-self: center; display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 370px); align-items: center; gap: clamp(12px, 2.3vw, 24px); width: min(1080px, calc(100% - 28px), calc(var(--reel-frame-width) + 420px)); min-width: 0; margin: 8px 0 21px; padding: clamp(10px, 1.4vw, 17px); border: 1px solid var(--line); border-radius: 20px; background: var(--cream); box-shadow: 0 14px 43px #18362222; animation: appear .24s ease both; }
.player-screen { justify-self: center; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); width: min(100%, var(--reel-frame-width)); aspect-ratio: var(--viewer-ratio); background: #1e211e; overflow: hidden; border-radius: 13px; }
.player-screen video { width: 100%; height: 100%; object-fit: contain; }
.player-meta { display: flex; flex-direction: column; align-items: start; gap: 8px; min-width: 0; max-height: var(--reel-frame-height); overflow-wrap: anywhere; }
.player-meta h2 { font: 500 clamp(22px, 3vw, 33px)/1.2 var(--serif); letter-spacing: -.025em; }
.player-copy { min-height: 0; overflow-y: auto; color: var(--muted); font-size: 14px; line-height: 1.65; }
.player-copy p + p { margin-top: .65em; }
.player-actions { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.reel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 3px 0 36px; }
.circle, .pause { height: 44px; border: 1px solid var(--line); background: var(--cream); border-radius: 30px; }
.circle { width: 44px; display: grid; place-items: center; }
.pause { min-width: 112px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.pause-icon { width: 16px; }
.circle:hover, .pause:hover { background: var(--sage); }
.memories { width: min(1190px, calc(100% - clamp(32px, 8.4vw, 122px))); margin: 0 auto; border-top: 1px solid var(--line); padding: 28px 0 30px; }
.memories-title, .editor-body h2, .story-body h2 { font: 500 clamp(28px, 3.7vw, 52px)/1.24 var(--serif); letter-spacing: -.035em; }
.journey-invite { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(18px, 3.5vw, 42px); border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(110deg, #ecf0e3, var(--cream)); }
.memories-title { margin: 5px 0 7px; text-wrap: balance; }
.journey-intro { color: var(--muted); font-size: clamp(14px, 1.45vw, 17px); }
.journey-action { flex: none; display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
#journey-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#journey-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
#journey-album { padding-top: 20px; scroll-margin-top: 12px; }
.journey-toolbar { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.journey-toolbar .filters { margin: 0; }
#journey-end { flex: none; }
.editor-body h2, .story-body h2 { margin-top: 6px; }
.filters, .editor-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter { border: 1px solid var(--line); border-radius: 25px; min-height: 44px; background: transparent; padding: 7px 15px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.filter:hover { background: var(--sage); }
.filter[aria-pressed="true"] { color: white; background: var(--green); border-color: var(--green); }
.story-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); }
.story-card { align-self: start; border: 0; border-radius: 12px; background: transparent; padding: 0; min-width: 0; text-align: start; }
.stage-heading { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--line); }
.stage-heading h3 { color: var(--ink); font: 500 clamp(18px, 2.3vw, 28px)/1.3 var(--serif); }
.story-card.is-new { animation: appear .36s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.story-cover { display: block; position: relative; overflow: hidden; border-radius: inherit; background: var(--sage); aspect-ratio: 4 / 3; }
.story-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.story-card:hover img { transform: scale(1.04); }
.story-cover .media-play { width: 28px; height: 28px; inset: auto 7px 7px auto; }
.story-marker { position: absolute; bottom: 7px; left: 7px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fcfcf2e8; color: var(--ink); }
.story-cover .icon { width: 15px; height: 15px; }
.journey-farewell { grid-column: 1 / -1; margin-top: 8px; }
.farewell-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: auto; min-height: 120px; padding: 10px; background: #eae8dd; color: var(--ink); text-align: center; font: 500 clamp(19px, 2.2vw, 29px)/1.3 var(--serif); }
.farewell-cover .icon { color: var(--green); width: 22px; height: 22px; }
.empty-copy { padding: 20px 0 38px; color: var(--muted); }
.guestbook { width: min(1190px, calc(100% - clamp(32px, 8.4vw, 122px))); margin: 0 auto; padding: clamp(20px, 3vw, 38px) 0 clamp(24px, 4vw, 44px); border-top: 1px solid var(--line); }
.guestbook-heading { display: grid; justify-items: start; gap: 8px; margin-bottom: 14px; }
#guestbook-toggle { display: inline-flex; align-items: center; gap: 6px; }
.guestbook-form { display: grid; gap: 9px; justify-items: start; width: min(100%, 620px); margin: 0 0 16px; padding: clamp(13px, 2.6vw, 21px); background: var(--cream); border: 1px solid var(--line); border-radius: 13px; }
.guestbook-form label { display: grid; gap: 5px; width: 100%; color: var(--ink); font-size: 13px; font-weight: 600; }
.guestbook-form :is(input, textarea) { width: 100%; padding: 9px 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fffef9; font: 400 16px/1.55 var(--sans); }
.guestbook-form textarea { resize: vertical; min-height: 84px; }
.guestbook-hint, .guestbook-status, #guestbook-receipt { color: var(--muted); font-size: 12px; line-height: 1.6; }
.guestbook-result:has(.guestbook-status:not(:empty)) { margin-bottom: 15px; padding: 9px 12px; border-radius: 8px; background: var(--sage); }
#guestbook-receipt { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.guestbook-sample { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.guestbook-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); font-size: 13px; }
.guestbook-list { --note-gap: 8px; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--note-gap)) / 3); gap: var(--note-gap); padding: 0; margin: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.guestbook-list::-webkit-scrollbar { display: none; }
.guestbook-list:has(> li:only-child) { grid-auto-columns: 100%; }
.guestbook-list.is-expanded { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); overflow: visible; }
.guestbook-list li { min-width: 0; scroll-snap-align: start; }
.guestbook-card { display: block; width: 100%; height: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--cream); color: var(--ink); text-align: start; overflow-wrap: anywhere; }
button.guestbook-card { min-height: 103px; }
button.guestbook-card:focus-visible { outline-offset: -4px; }
button.guestbook-card:hover { background: #f0f2e8; }
.guestbook-note-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; font-size: 13px; }
.guestbook-note-header time { color: var(--muted); font-size: 11px; }
.guestbook-preview { display: block; margin-top: 4px; white-space: pre-wrap; font-size: 13px; line-height: 1.6; }
.guestbook-card:is(button) .guestbook-note-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.guestbook-card .guestbook-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.guestbook-controls:has(> :not([hidden])) { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.guestbook-arrows { display: flex; gap: 4px; }
.guestbook-arrows .circle { background: transparent; }
.guestbook-arrows .circle:hover { background: var(--sage); }
.guestbook-dialog { width: min(540px, calc(100% - 26px)); }
.guestbook-note-full { padding: clamp(17px, 3.5vw, 28px); overflow-wrap: anywhere; }
.guestbook-note-full h2 { font: 500 clamp(22px, 4vw, 31px)/1.3 var(--serif); }
.guestbook-note-full time { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.guestbook-note-full p { margin-top: 10px; white-space: pre-wrap; font-size: 15px; line-height: 1.7; }
.footer { padding: 13px 0; background: var(--sage); border-top: 1px solid var(--line); color: var(--green); }
.footer-inner { width: min(1190px, calc(100% - 32px)); margin: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; align-items: baseline; font-size: 12px; }
.footer-inner > span { font-weight: 600; }
.footer-inner small { color: var(--muted); font-size: 11px; }
body:has(dialog[open]) { overflow: hidden; }
dialog { background: var(--cream); color: var(--ink); padding: 0; border: 1px solid var(--line); border-radius: 19px; width: min(930px, calc(100% - 26px)); max-width: none; max-height: calc(100dvh - 26px); overscroll-behavior: contain; }
dialog::backdrop { background: #1e3029a8; }
.dialog-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px clamp(12px, 3vw, 26px); background: var(--cream); border-bottom: 1px solid var(--line); }
.story-body, .editor-body { padding: clamp(16px, 4.2vw, 48px); }
.story-dialog { --story-video-width: calc(clamp(220px, 54dvh, 550px) * var(--viewer-ratio)); width: min(1120px, calc(100% - 26px)); }
.story-dialog.is-media-only { width: min(800px, calc(100% - 26px)); }
.story-dialog.is-media-only .story-body { display: block; }
.story-body { display: grid; grid-template: 'visual title' auto 'visual copy' 1fr / minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 14px clamp(20px, 4.2vw, 56px); }
.story-body h2 { grid-area: title; margin: 0; font-size: clamp(25px, 3.6vw, 44px); overflow-wrap: anywhere; text-wrap: balance; }
.story-visual { grid-area: visual; min-width: 0; }
.story-media { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); height: clamp(260px, 54dvh, 550px); overflow: hidden; border-radius: 13px; background: #ecece2; }
.story-dialog.is-video-story .story-media { width: min(100%, var(--story-video-width)); height: auto; min-height: 0; max-height: none; margin-inline: auto; aspect-ratio: var(--viewer-ratio); background: #1e211e; }
.story-media img, .story-media video { width: 100%; height: 100%; object-fit: contain; }
.story-copy { grid-area: copy; color: var(--ink); font-size: clamp(15px, 1.55vw, 17px); line-height: 1.8; overflow-wrap: anywhere; }
.story-copy p { margin: 0 0 1em; white-space: pre-wrap; }
.story-copy p:last-child { margin-bottom: 0; }
.story-dialog.is-farewell .story-copy p:last-child { color: var(--green); font: italic 500 clamp(17px, 2vw, 22px)/1.55 var(--serif); }
.story-navigation { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.story-thumbs { display: flex; gap: 7px; max-width: 100%; padding: 4px; margin: 4px 0 0; overflow-x: auto; }
.story-thumb { position: relative; flex: 0 0 58px; height: 49px; border: 1px solid var(--line); border-radius: 7px; padding: 0; background: var(--sage); }
.story-thumb img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
.story-thumb[aria-pressed="true"] { outline: 2px solid var(--green); outline-offset: 1px; }
.story-thumb .media-play { width: 19px; height: 19px; inset: auto 2px 2px auto; }
.story-thumb .icon { width: 12px; height: 12px; }
.editor-intro { margin: 10px 0 17px; max-width: 64ch; color: var(--muted); }
.editor-tabs { margin-bottom: 13px; }
.editor-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 0; position: sticky; top: 67px; background: var(--cream); z-index: 1; border-bottom: 1px solid var(--line); }
.editor-selection > span { margin-right: auto; font-size: 13px; color: var(--muted); }
.editor-group { margin-top: 16px; }
.editor-group h3 { font-size: 14px; margin-bottom: 7px; }
.editor-hint { margin: 13px 0; color: var(--muted); font-size: 13px; }
.edit-grid, .cover-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 7px; }
.editor-tile { min-width: 0; position: relative; display: block; }
.editor-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--sage); }
.editor-tile input { position: absolute; left: 7px; top: 7px; width: 21px; height: 21px; margin: 0; accent-color: var(--green); }
.editor-tile:has(input:checked) img { outline: 3px solid var(--green); outline-offset: -3px; }
.editor-tile:has(input) { cursor: pointer; }
.editor-tile .restore { min-height: 44px; width: 100%; margin-top: 3px; padding: 5px 2px; }
.editor-tile .media-play { width: 21px; height: 21px; left: auto; right: 4px; bottom: 4px; font-size: 9px; }
.sort-tools { position: sticky; top: 66px; z-index: 1; padding: 7px 0 10px; background: var(--cream); border-bottom: 1px solid var(--line); }
.sort-filters { margin-bottom: 7px; }
.sort-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sort-actions .quiet-button { padding-inline: 11px; font-size: 12px; }
.sort-move-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.sort-move-options select { min-height: 44px; max-width: 100%; padding: 5px 10px; color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 9px; }
.sort-status { min-height: 1.5em; margin-top: 5px; color: var(--muted); font-size: 12px; }
.sort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 10px; list-style: none; margin: 12px 0 0; padding: 0; }
.sort-grid:empty { margin: 0; }
.sort-tile { position: relative; min-width: 0; border-radius: 11px; background: var(--sage); }
.sort-frame { position: relative; }
.sort-frame img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px 10px 0 0; }
.sort-frame .media-play { width: 22px; height: 22px; inset: auto 4px 4px auto; }
.sort-frame .media-play .icon { width: 14px; height: 14px; }
.sort-index { position: absolute; left: 4px; bottom: 4px; min-width: 24px; padding: 2px 5px; border-radius: 12px; background: var(--cream); color: var(--ink); text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.sort-grip { position: absolute; top: 3px; right: 3px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--cream); cursor: grab; touch-action: none; user-select: none; }
.sort-grip .icon { width: 20px; height: 20px; stroke-width: 3; }
.sort-pick { position: absolute; top: 5px; right: 5px; width: 36px; height: 36px; margin: 0; accent-color: var(--green); cursor: pointer; }
.sort-frame:has(.sort-pick:checked) img { outline: 3px solid var(--green); outline-offset: -3px; }
.sort-grid.is-picking :is(.sort-grip, .sort-tile-actions) { display: none; }
.sort-grid.is-picking img { border-radius: inherit; }
.sort-grid.is-picking .sort-frame { border-radius: 10px; }
.sort-tile-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
.sort-arrow { min-height: 44px; border: 0; border-radius: 0 0 9px 9px; background: transparent; }
.sort-arrow:hover:not(:disabled), .sort-grip:hover { background: var(--sage); }
.sort-tile.is-dragging { opacity: .42; }
.sort-tile:is(.drop-before, .drop-after)::before { content: ''; position: absolute; z-index: 1; inset: 0 auto 0 -6px; width: 3px; border-radius: 3px; background: var(--green); pointer-events: none; }
.sort-tile.drop-after::before { left: auto; right: -6px; }
.sort-ghost { position: fixed; top: 0; left: 0; z-index: 3; width: 82px; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--cream); border-radius: 10px; box-shadow: 0 5px 18px #1e30294d; pointer-events: none; }
.sort-farewell { padding: 14px 0; color: var(--muted); font-size: 13px; }
.sort-note { margin-top: 10px; color: var(--muted); font-size: 13px; }
.editor-footer { display: flex; align-items: center; gap: 13px; margin-top: 25px; flex-wrap: wrap; }
#editor-status { color: var(--muted); font-size: 13px; }
.custom-story { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.custom-story > div { display: flex; gap: 5px; }
.compose-dialog { width: min(560px, calc(100% - 22px)); }
.compose-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.compose-dialog form > label { display: grid; gap: 6px; margin-top: 14px; font-weight: 600; font-size: 14px; }
.compose-dialog input:not([type=radio]), .compose-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 9px 11px; color: var(--ink); }
.compose-dialog fieldset { border: 0; margin: 14px 0; padding: 0; }
.compose-dialog legend { margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.cover-options { max-height: 165px; overflow-y: auto; padding: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0,0,0,0); white-space: nowrap; overflow: hidden; }
@media (min-width: 681px) {
  .story-dialog.is-video-story { width: min(1120px, calc(100% - 26px), calc(var(--story-video-width) + 445px)); }
  .story-dialog.is-video-story.is-media-only { width: min(calc(100% - 26px), calc(var(--story-video-width) + 98px)); }
  .story-dialog.is-video-story:not(.is-media-only) .story-body { grid-template-columns: minmax(0, min(var(--story-video-width), 59%)) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .guestbook-list { grid-auto-columns: calc((100% - var(--note-gap)) / 2); }
}
@media (max-width: 680px) {
  .guestbook-list { grid-auto-columns: 88%; }
  .topbar { min-height: 63px; }
  .wordmark { font-size: 23px; }
  .mark { width: 37px; height: 37px; margin-right: 6px; }
  .edit-link { padding-inline: 10px; }
  .hero { padding-top: 31px; }
  .reel { --card-width: clamp(108px, 32vw, 165px); --card-height: clamp(167px, 48vw, 237px); height: calc(var(--card-height) + 57px); }
  .doodle { display: none; }
  .reel-wrap { margin-top: 18px; }
  .reel-controls { margin-bottom: 28px; }
  .memories { padding-top: 24px; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { gap: 6px; }
  .filter { padding-inline: 9px; font-size: 12px; }
  .story-body { grid-template: 'title' auto 'visual' auto 'copy' auto / minmax(0, 1fr); gap: 13px; }
  .story-body h2 { font-size: clamp(24px, 7vw, 34px); }
  .story-media { height: auto; aspect-ratio: var(--viewer-ratio); min-height: 132px; max-height: 49dvh; }
  .story-media.has-sequence { height: clamp(205px, 33dvh, 330px); aspect-ratio: auto; }
  .reel-player { --reel-frame-height: clamp(190px, 41dvh, 350px); grid-template-columns: minmax(0, 1fr); width: min(520px, calc(100% - 28px)); }
  .player-meta { max-height: none; padding: 3px 2px; }
  .player-copy { overflow-y: visible; }
  .journey-invite { align-items: start; flex-direction: column; }
  .journey-action { justify-items: start; }
}
@media (max-width: 350px) {
  .top-actions .demo-tag { max-width: 36px; text-align: center; white-space: normal; letter-spacing: .07em; }
  h1 { font-size: 35px; }
  .topbar { gap: 6px; }
}
@media (max-width: 520px) {
  .journey-toolbar .filters { display: grid; grid-template-columns: .95fr 1.5fr repeat(3, 1fr); width: 100%; gap: 5px; }
  .journey-toolbar .filter { padding-inline: 4px; font-size: clamp(11px, 3vw, 12px); white-space: normal; line-height: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
