@font-face{font-family:'EB Garamond';font-style:normal;font-weight:400 700;font-display:swap;src:url(/static/garamond-latin.woff2?v=1) format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url(/static/inter-latin.woff2?v=1) format('woff2')}
:root {
  --paper: #fff;
  --ink: #262825;
  --muted: #5b6257;
  --sage: #758575;
  --action: #36523f;
  --action-hover: #293f31;
  --stone: #e6e2d9;
  --surface: #efede6;
  --line: #d8d6cd;
  --input-line: #818b7d;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis: none;
  scrollbar-color: #969e91 var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: #d9e1d3; color: var(--ink); }
a { color: var(--action); text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, .download { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--input-line); border-radius: 4px; color: var(--ink); background: #fff; font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease; }
button:hover, .download:hover { background: #e8ece4; border-color: var(--action); }
button:active { background: #dce3d7; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary, .download { color: #fff; background: var(--action); border-color: var(--action); }
.primary:hover, .download:hover { color: #fff; background: var(--action-hover); border-color: var(--action-hover); }
.text-button { padding: 6px 0; background: transparent; border: 0; border-radius: 0; color: var(--action); text-decoration: underline; text-underline-offset: .25em; }
.text-button:hover { background: transparent; text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #4a6951; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -80px; left: 20px; padding: 12px 20px; background: var(--ink); color: #fff; z-index: 20; }
.skip-link:focus { top: 12px; }
body > header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px max(24px, calc((100vw - 1344px) / 2)); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--font-display); font-size: 25px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand span { display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .035em; margin-top: 5px; color: var(--muted); }
.site-header .dev { display: none; }
body:has(#editor:not([hidden])) .site-header .dev { display: block; }
.dev, .quiet { color: var(--muted); font-size: 14px; }
main { max-width: 1488px; margin: auto; padding: 0 72px 64px; }
main:focus { outline: none; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-size: 36px; line-height: 1.18; font-weight: 500; letter-spacing: -.025em; margin: 0 0 24px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: -.015em; margin: 0 0 20px; font-weight: 600; }
h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; font-weight: 600; }
p { margin: 0 0 18px; }
figure { margin: 0; }
img { max-width: 100%; }
/* Shared introduction and saved-project controls. */
.intro { font-size: 21px; line-height: 1.5; max-width: 34ch; margin-bottom: 28px; }
#recent:empty { display: none; }
#recent p { font-size: 14px; margin-bottom: 8px; }
#recent button { margin: 0 6px 6px 0; }
/* Working studio: consistent controls, restrained display type. */
#editor { padding-top: 32px; }
.editor-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.project-label { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.editor-heading h1 { font-family: var(--font-display); font-size: 32px; font-weight: 400; }
.editor-heading > div + div { display: flex; align-items: center; gap: 18px; }
#save-status { font-size: 14px; color: var(--muted); }
.editor-nav { display: flex; gap: 36px; padding: 18px 0; margin: 10px 0 28px; border-block: 1px solid var(--line); }
.editor-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; text-decoration: none; }
.editor-nav a[aria-current="step"] { font-weight: 600; text-decoration: underline; text-underline-offset: .45em; }
#getting-started { padding: 18px 22px; margin: 0 0 28px; background: #e8ece2; font-size: 15px; }
#getting-started a { font-weight: 600; margin-left: 8px; }
.workspace { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.controls { border-right: 1px solid var(--line); padding-right: 28px; min-width: 0; }
.controls section { padding-bottom: 24px; }
label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
input, textarea, select { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 7px; padding: 10px 12px; color: var(--ink); border: 1px solid var(--input-line); border-radius: 3px; background: #fff; font-weight: 400; caret-color: var(--action); }
input::placeholder, textarea::placeholder { color: #696e65; opacity: 1; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; margin: 0; accent-color: var(--action); flex: 0 0 auto; }
input[type="range"] { padding: 4px 0; accent-color: var(--action); border: 0; background: transparent; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.theme-example { margin-bottom: 24px; }
.theme-example img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--surface); }
.theme-example figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
details { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 0; font-size: 16px; font-weight: 600; min-height: 44px; }
details p { font-size: 15px; }
.danger { color: #843a32; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.section-heading h2 { margin-bottom: 18px; }
.player { display: flex; align-items: center; aspect-ratio: 16 / 9; background: var(--stone); border-radius: 3px; overflow: hidden; }
.player img, .player video { display: block; width: 100%; height: 100%; object-fit: contain; }
.frame-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; font-size: 14px; }
.frame-controls button { padding: 9px 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.stage section + section { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
#dropzone { padding: 28px; text-align: center; background: #e8ece2; border: 1px dashed #879783; border-radius: 4px; }
#dropzone.dragging { background: #dce6d4; outline: 2px solid var(--action); outline-offset: 3px; }
#dropzone p { color: var(--muted); font-size: 14px; margin: 12px 0; max-width: 62ch; margin-inline: auto; }
.upload { display: inline-block; margin: 0; cursor: pointer; }
.upload input { width: auto; max-width: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: transparent; font-size: 0; }
.upload input::file-selector-button { font: 600 15px var(--font-ui); min-height: 46px; color: #fff; background: var(--action); border: 0; border-radius: 4px; padding: 12px 22px; cursor: pointer; }
#photo-list { margin-top: 20px; }
.storyboard-navigation, .storyboard-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 14px 0; }
.storyboard-navigation label, .storyboard-actions label { margin: 0; }
.storyboard-navigation select { min-width: 100px; }
.storyboard-actions input { width: 100px; }
#storyboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.story-tile { padding: 6px; border: 1px solid var(--line); background: #fff; }
.story-tile.drop-target { outline: 3px solid var(--action); outline-offset: 2px; }
.story-photo { display: block; width: 100%; padding: 0; border: 0; text-align: left; background: transparent; }
.story-photo[aria-pressed="true"] { outline: 3px solid var(--action); outline-offset: 1px; }
.story-photo img { display: block; width: 100%; height: 100px; object-fit: contain; background: var(--surface); }
.story-photo span { display: block; padding: 6px 4px; }
.story-select { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 14px; min-height: 44px; }
.story-tile > button:not(.story-photo) { min-width: 44px; padding: 8px; margin-right: 4px; }
.photo { padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; min-width: 0; }
.photo.selected { outline: 2px solid var(--action); outline-offset: 2px; }
.photo > button:first-child { width: 100%; padding: 0; border: 0; background: var(--surface); }
.photo img { width: 100%; height: 144px; object-fit: contain; cursor: pointer; }
.photo label { font-size: 14px; margin-bottom: 12px; }
.photo input, .photo select { font-size: 15px; padding: 9px; }
.photo .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.photo button { font-size: 14px; padding: 8px 10px; }
.photo .meta { font-size: 13px; color: var(--muted); margin: 10px 0; }
.photo .two { gap: 10px; }
.photo details summary { font-size: 14px; }
#continue-personalize { display: inline-block; padding: 12px 0; font-weight: 600; }
.download { margin: 12px 0; }
progress { display: block; width: 100%; height: 10px; accent-color: var(--action); margin: 14px 0; }
#render-status { padding: 22px; background: #e7ece1; border-radius: 4px; }
#job-message { margin: 0; }
#notice { position: fixed; bottom: 24px; left: 24px; right: 24px; max-width: 680px; padding: 18px 22px; background: #fff1e9; color: #783d2d; border: 1px solid #a86e59; border-radius: 4px; z-index: 10; font-size: 16px; }
#notice[data-kind="success"] { background: #e7ece1; color: #294334; border-color: #7b9072; }
#music-list { list-style: none; padding: 0; }
#music-list li { padding: 16px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
#music-list button { margin: 4px 4px 4px 0; }
#music-list audio { display: block; width: 100%; max-width: 100%; margin: 12px 0; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.photo .crop-reset { min-height: 44px; margin: 6px 0; }
.collection-page { max-width: 840px; padding-top: 60px; }
.collection-page h1 { font-family: var(--font-display); font-size: 44px; font-weight: 400; }
#family-collection { margin-bottom: 26px; }
#collection-url, #view-link-url { width: 100%; }
.contribution { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contribution img { width: 112px; height: 84px; object-fit: contain; }
.contribution button { margin: 4px; }
#family-results { padding-left: 24px; overflow-wrap: anywhere; }
#shared-video { display: block; width: 100%; background: #171c18; }
.clip-player { width: 100%; max-height: 240px; background: #171c18; }
footer { max-width: 1488px; margin: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 28px 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
/* A shared canvas above, a focused album workspace below. */
.history-toolbar { display: flex; gap: 6px; }
.history-toolbar button { font-size: 13px; padding: 8px 12px; }
#photos { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 32px; scroll-margin-top: 24px; }
.album-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.scene-inspector { border-left: 1px solid var(--line); padding-left: 28px; }
.scene-inspector > h3 { font-size: 20px; }
#inspector-help { font-size: 14px; }
#storyboard { grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); }
#storyboard-area h3 { margin: 4px 0 8px; }
.story-tile { border-radius: 3px; }
.story-photo img { height: 112px; }
.photo { border: 0; background: transparent; padding: 0; }
.photo.selected { outline: 0; }
.photo > button:first-child { display: none; }
.photo .meta { color: var(--ink); font-weight: 600; font-size: 15px; }
#family-collection { margin: 0 0 20px; }
#dropzone { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; text-align: left; padding: 24px 28px; }
#dropzone p { grid-row: 2; margin: 12px 0 0; }
.upload { width: 100%; }
.upload > span { display: block; font-size: 17px; margin-bottom: 12px; color: var(--ink); }
.upload input { font-size: 14px; color: var(--muted); width: 100%; }
.upload input::file-selector-button { margin-right: 10px; }
#preview { scroll-margin-top: 24px; }
#personalize { scroll-margin-top: 24px; }
#export { scroll-margin-top: 24px; }
#stale { border: 1px solid #d8c9af; padding: 12px 16px; background: #f2ebde; font-size: 15px; }
@media (max-width: 1000px) {
 .album-workspace { grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
 .scene-inspector { padding-left: 20px; }
 .editor-heading > div + div { gap: 10px; flex-wrap: wrap; }
}
@media (max-width: 1200px) {
  main { padding-inline: 40px; }
  .workspace { grid-template-columns: 280px minmax(0,1fr); gap: 28px; }

}
@media (max-width: 900px) {
  .intro { font-size: 18px; }
  .workspace { grid-template-columns: 240px minmax(0,1fr); gap: 24px; }
  .controls { padding-right: 20px; }
}
@media (max-width: 700px) {
  body > header { padding: 18px 20px; gap: 12px; }
  .brand { font-size: 21px; }
  .brand span { font-size: 11px; }
  .dev { font-size: 12px; max-width: 90px; text-align: right; }
  main { padding: 0 22px 48px; }
  .intro { font-size: 19px; max-width: 36ch; margin-bottom: 24px; }
  .editor-heading { display: block; }
  .editor-heading h1 { font-size: 28px; }
  .editor-heading > div + div { margin-bottom: 22px; justify-content: space-between; }
  .editor-nav { position: sticky; top: 0; z-index: 4; background: var(--paper); gap: 10px; justify-content: space-between; margin-bottom: 22px; padding: 8px 0; }
  .editor-nav a { font-size: 13px; }
  .workspace { display: flex; flex-direction: column; gap: 28px; }
  .controls { display: contents; border: 0; padding: 0; }
  .stage { order: 1; }
  .controls #personalize { order: 0; }
  .controls > details { order: 2; }
  body[data-step="photos"] #personalize, body[data-step="preview"] #personalize, body[data-step="export"] #personalize { display: none; }
  body[data-step="personalize"] .stage, body[data-step="personalize"] #photos, body[data-step="photos"] #preview, body[data-step="export"] #photos { display: none; }
  body:not([data-step="personalize"]) .controls > details { display: none; }
  body[data-step="photos"] #photos { border: 0; padding-top: 20px; margin-top: 0; }
  .actions button { width: 100%; }
  .album-workspace { grid-template-columns: 1fr; gap: 28px; }
  .scene-inspector { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  #dropzone { display: block; }
  #dropzone p { margin-bottom: 22px; }
  #dropzone p:last-child { margin-bottom: 0; }
  .history-toolbar { gap: 4px; }
  .editor-heading > div + div { gap: 10px; }
  .photo img { height: 200px; }
  .frame-controls { gap: 8px; font-size: 13px; }
  .frame-controls button { padding: 10px; }
  #dropzone { padding: 22px 16px; }
  #notice { left: 16px; right: 16px; bottom: 16px; font-size: 15px; padding: 15px; }
  footer { padding: 24px 22px; flex-direction: column; }
  .collection-page { padding-top: 40px; }
  .collection-page h1 { font-size: 36px; }
}
@media (max-width: 380px) {
  .brand { font-size: 19px; }
  main { padding-inline: 18px; }
  .editor-nav a { font-size: 12px; }
  .two { gap: 10px; }
  .contribution { align-items: start; }
  .contribution img { width: 76px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* Family pages use the same editorial shell, with one clear task. */
.page-context { color: var(--muted); font-size: 14px; }
.collection-page { max-width: 1200px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px 80px; padding-bottom: 80px; }
.contribution-intro { max-width: 46ch; }
.contribution-intro h1 { font-size: clamp(40px,5vw,64px); line-height: 1.08; margin-bottom: 24px; }
.contribution-intro .intro { font-size: 23px; }
.contribution-upload { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.contribution-upload h2 { font-size: 24px; }
.family-upload { margin-top: 28px; }
.family-upload input { background: var(--paper); font-size: 14px; padding: 12px; }
input[type="file"]::file-selector-button { font: 600 14px var(--font-ui); color: #fff; border: 0; background: var(--action); border-radius: 3px; min-height: 44px; padding: 10px 14px; cursor: pointer; }
.contribution-privacy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 32px; max-width: 76ch; }
.contribution-privacy h2, .viewing-note h2 { font-size: 20px; }
.contribution-privacy p { font-size: 15px; color: var(--muted); }
.viewing-page { display: block; max-width: 1200px; }
.viewing-page h1 { font-size: clamp(40px,5vw,64px); }
.viewing-status { margin: 24px 0; }
#view-repeat-control { margin: 20px 0 32px; }
.viewing-note { border-top: 1px solid var(--line); padding-top: 28px; max-width: 70ch; }
.viewing-note p { color: var(--muted); font-size: 15px; }
[role="alert"]:not(#notice) { color: #783d2d; background: #fff1e9; padding: 16px; }
@media (max-width: 700px) {
 .collection-page { display: block; padding-top: 36px; }
 .contribution-upload { margin: 32px 0; padding: 24px 20px; }
 .contribution-privacy { margin-top: 32px; }
 .page-context { max-width: 88px; text-align: right; font-size: 12px; }
}

.story-tile { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: start; }
.story-photo, .story-select { grid-column: 1 / -1; }
.story-select { margin: 0; padding-inline: 4px; }
.story-tile > button:not(.story-photo) { width: 100%; margin: 0; }
.inspector-composition { margin: 18px 0; }
.inspector-composition img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--stone); }
.inspector-composition figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.export-panel { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.export-panel > h3 { font-size: 22px; margin-bottom: 8px; }
.export-panel > p { max-width: 65ch; }
#music-list .track-heading { font-size: 16px; font-weight: 600; line-height: 1.45; margin-bottom: 12px; }
#music-coverage { padding: 14px 0; border-block: 1px solid var(--line); font-size: 15px; }
@media (max-width: 700px) { body[data-step="export"] .preview-actions { display: none; } }
@media (max-width: 700px) {
 .editor-heading > div + div { display: grid; grid-template-columns: 1fr auto; align-items: center; }
 #save-status { grid-column: 1 / -1; }
 .history-toolbar button { font-size: 12px; padding-inline: 10px; }
 #photos, #personalize, #preview, #export { scroll-margin-top: 90px; }
}

.inspector-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; margin-bottom: 12px; }
#scene-inspector, #storyboard-area { scroll-margin-top: 24px; }
@media (max-width: 700px) { #scene-inspector, #storyboard-area { scroll-margin-top: 90px; } }
@media (max-width: 700px) { input, textarea, select, .photo input, .photo select { font-size: 16px; } }

#notice { display: flex; align-items: start; gap: 20px; max-height: 60vh; overflow: auto; }
#notice > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice-dismiss { flex-shrink: 0; font-size: 14px; padding: 8px 12px; background: transparent; border-color: currentColor; color: inherit; }

.storyboard-navigation { display: grid; grid-template-columns: 1fr minmax(80px,1fr) 1fr; gap: 8px; max-width: 420px; }
.storyboard-navigation select { min-width: 0; width: 100%; }
.storyboard-navigation button { padding-inline: 8px; width: 100%; }
.brand-mark { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; flex: none; }
