/* Photos live inside the original Home tab and inherit its theme. */
#home { --home-ink: #3d3522; --home-heading: #31583f; font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 1.65; }
body.theme-night #home { --home-ink: #fefdf8; --home-heading: #b7ddbc; }
#home h3 { display: block; color: var(--home-heading); font: 700 clamp(1.7rem, 3vw, 2.2rem)/1.3 var(--font-handwriting); border: 0; margin: 0 0 12px; padding: 0; }
#home p { margin: 0 0 16px; }
#home .home-welcome { text-align: center; padding: 24px 0 8px; }
#home .home-welcome > p { max-width: 64ch; margin: 0 auto 24px; }
#home .home-photo-links { display: flex; justify-content: center; gap: 16px; margin: 28px 0 16px; }
#home .home-action { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; color: #3d3522; background: var(--color-secondary); border: 2px solid #746a55; border-radius: 8px; font-size: 20px; font-weight: 700; text-decoration: none; min-height: 64px; }
#home .home-action-upload { background: #c1dec6; }
#home .home-action:hover { text-decoration: underline; text-underline-offset: 5px; }
#home .home-welcome .home-action-help { font-size: 16px; margin-bottom: 0; }
#home .td-polaroid-carousel { margin-top: 24px; margin-bottom: 32px; }
#dt h2 span { color: #593c35; }
#dt h1 { color: #ac5c55; }
body.theme-night #dt h1 { color: var(--color-accent); }
footer a { color: var(--color-text); text-decoration: underline; text-underline-offset: 4px; }
#dt .date { color: #426449; }
body.theme-night #dt .date { color: #b7ddbc; }
#countdown-timer { color: #3d3522; font-size: 1.1rem; }
#home .photo-section,
#home .share-section,
#home .keepsake-section { margin-top: 48px; padding-top: 40px; border-top: 2px dashed var(--border-color); scroll-margin-top: 24px; }
#home .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#home .section-heading img { width: 75px; height: auto; }
#home .gallery-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 24px 0; }
#home #photo-count { flex-basis: 100%; margin: 0; font-size: 16px; }
#home .filters { display: flex; flex-wrap: wrap; gap: 8px; }
#home .filter,
#home .button,
#home .text-button { font: inherit; font-weight: 700; color: var(--home-ink); background: var(--color-bg); border: var(--border-style); border-radius: 8px; padding: 12px 16px; cursor: pointer; min-height: 52px; }
#home .filter.active,
#home .button { background: #c1dec6; color: #3d3522; border-color: #55755d; }
#home .filter.active { text-decoration: underline; text-underline-offset: 5px; }
#home .filter:hover,
#home .button:hover { text-decoration: underline; text-underline-offset: 4px; }
#home .memory-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
#home .memory-card { min-width: 0; margin: 0; padding: 8px; background: var(--color-bg); border: var(--border-style); border-radius: 4px; }
#home .memory-card button { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
#home .memory-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
#home .memory-card figcaption { padding: 12px 4px 4px; overflow-wrap: anywhere; line-height: 1.4; }
#home .memory-card small { display: block; margin-top: 4px; }
#home .video-tile { display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--color-primary); }
#home #load-more { display: block; margin: 24px auto 0; }
#home [hidden] { display: none !important; }
#home .share-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px; }
#home .share-intro > img { float: right; width: 48px; height: auto; margin: 0 0 12px 12px; }
#home .share-section form { min-width: 0; padding: 28px; border-radius: 12px; background: #f8f0d5; color: #3d3522; }
#home .share-section label { display: block; margin: 18px 0 6px; font-weight: bold; }
#home .share-section label:first-child { margin-top: 0; }
#home .share-section input,
#home .share-section textarea { box-sizing: border-box; width: 100%; padding: 10px; font: inherit; color: var(--color-text); background: var(--color-bg); border: var(--border-style); border-radius: 6px; }
#home .share-section input, #home .share-section textarea { background: #fffef9; color: #3d3522; border-color: #8c8068; }
#home .share-section input::placeholder, #home .share-section textarea::placeholder { color: #685e4d; opacity: 1; }
#home .share-section input[type=file] { padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 16px; }
#home .share-section input::file-selector-button { font: inherit; font-weight: 700; padding: 14px 16px; margin: 0 8px 8px 0; border: 2px solid #746a55; border-radius: 6px; background: #fffef9; color: #3d3522; cursor: pointer; min-height: 52px; }
#home .upload-step { padding-top: 24px; margin: 24px 0 8px; border-top: 1px solid #b5a988; font-weight: 700; }
#home .upload-step span { font-weight: 400; }
#home #file-selection { font-weight: 700; margin-top: 12px; }
#home .share-section textarea { resize: vertical; }
#home .share-section .button { margin-top: 8px; width: 100%; }
#home .small-print,
#home .form-help { font-size: 16px; line-height: 1.6; }
#home #upload-status:not(:empty) { margin-top: 20px; font-weight: 700; }
#home ::selection { background: #fbeaa5; color: #3d3522; }
#home input, #home textarea { caret-color: #31583f; }
#home #upload-results { padding-left: 20px; }
#home #upload-status,
#home #upload-results { overflow-wrap: anywhere; }
#home .keepsake-section { text-align: center; }
#home .keepsake-section > img { width: 80px; height: auto; }
#home .keepsake-link { display: block; padding: 12px; color: inherit; }
#home button:disabled { opacity: .55; cursor: not-allowed; }
#home button:focus-visible,
#home a:focus-visible,
#home input:focus-visible,
#home textarea:focus-visible { outline: 3px solid var(--color-text); outline-offset: 4px; }
#lightbox { box-sizing: border-box; width: min(1100px, 96vw); max-height: 94vh; background: #24251f; color: #fefdf8; border: 0; padding: 48px 20px 12px; border-radius: 8px; }
#lightbox::backdrop { background: #181a17e8; }
#lightbox button { font: inherit; font-size: 1.5rem; background: transparent; border: 0; color: inherit; min-width: 44px; min-height: 44px; cursor: pointer; }
#lightbox .lightbox-close { position: absolute; top: 0; right: 12px; }
#lightbox-media img,
#lightbox-media video { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
#lightbox .lightbox-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
#lightbox-caption { overflow-wrap: anywhere; text-align: center; }
#lightbox button:focus-visible { outline: 3px solid #fbeaa5; outline-offset: 2px; }
@media (max-width: 600px) {
  #home .home-photo-links { flex-direction: column; gap: 12px; }
  #home .home-action { padding: 16px 20px; font-size: 18px; }
  #home .home-welcome { padding-top: 8px; }
  #home .filters { display: grid; width: 100%; }
  #home .filter { text-align: left; }
  #home .filter.active::after { content: ' — selected'; font-size: 16px; font-weight: 400; }
  #home .share-section form { padding: 20px 16px; }
  #home .section-heading { align-items: flex-start; gap: 12px; }
  #home .photo-section, #home .share-section { margin-top: 32px; padding-top: 28px; }
  #home .memory-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  #home .share-section { grid-template-columns: 1fr; gap: 20px; }
  #home .memory-card { padding: 5px; }
  #home .memory-card figcaption { font-size: .9rem; }
  #home .section-heading img { width: 54px; }
}
