/* Leonardo & Luana — an editorial, accessible wedding camera. */
:root {
  --bg: #fffdf9; --white: #fff; --ink: #252326; --muted: #68646b;
  --muted-light: #858087; --sage: #252326; --sage-soft: #f3f0ed;
  --gold: #b88d4b; --gold-dark: #936b32; --sand: #f5f2ee;
  --line: #dedcd3; --line-light: #eae8e1;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --radius-btn: 14px; --radius-card: 20px; --radius-sm: 10px;
  --radius-md: 16px; --radius-lg: 24px; --radius-pill: 999px;
  --shadow-sm: 0 2px 8px #25232605; --shadow-md: 0 8px 28px #2523260a;
  --shadow-lg: 0 24px 64px #2523261f;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button,input,textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 4px; }
h1,h2,h3,h4,p { margin: 0; }
img,video,canvas { max-width: 100%; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; pointer-events: none; overflow: hidden; }
.ui-icon { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.device-container,.app-viewport { min-height: 100vh; min-height: 100dvh; width: 100%; }
.screen { display: none; padding: max(18px, env(safe-area-inset-top)) 22px max(36px, env(safe-area-inset-bottom)); max-width: 660px; margin-inline: auto; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; animation: enter .25s ease-out; }
.brand-bar,.page-topline { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 28px; }
.brand-monogram { font: 500 24px/1 var(--font-serif); letter-spacing: 4px; color: var(--gold-dark); white-space: nowrap; }
.brand-date { font: 500 17px/1 var(--font-serif); letter-spacing: 2px; color: var(--gold-dark); }
.page-topline { padding-bottom: 12px; margin-bottom: 22px; }
.back-circle-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--gold-dark); border-radius: 50%; margin-left: -10px; }
.back-circle-btn:hover { background: var(--sand); }
.page-heading { margin-bottom: 30px; }
.page-heading h2 { font: 500 clamp(38px,10.5vw,50px)/1.04 var(--font-serif); letter-spacing: -1.7px; }
.page-heading p { margin-top: 12px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.couple-names { font: 500 clamp(38px,10.7vw,64px)/1.12 var(--font-serif); letter-spacing: -1.5px; color: var(--ink); }
.couple-names em { font-weight: 400; font-style: normal; color: var(--gold-dark); }
.home-intro { text-align: center; }
.home-tagline { font: 500 22px/1.4 var(--font-serif); letter-spacing: 1.3px; margin-top: 3px; }
.home-description { color: var(--muted); max-width: 480px; margin: 16px auto 20px; font-size: 14px; line-height: 1.7; }
.hero-couple-card { overflow: hidden; border-radius: 20px; aspect-ratio: 2/1; margin-bottom: 16px; background: var(--sand); }
.hero-couple-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.btn-primary-pill,.btn-secondary-pill { min-height: 54px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius-btn); border: 1px solid var(--sage); font-weight: 600; font-size: 14px; line-height: 1.4; text-decoration: none; transition: background .18s, transform .18s; }
.btn-primary-pill { background: var(--sage); color: white; }
.btn-primary-pill:hover:not(:disabled) { background: #383438; }
.btn-primary-pill:active:not(:disabled),.btn-secondary-pill:active:not(:disabled) { transform: translateY(1px); }
.btn-primary-pill > span { flex: 1; text-align: center; }
.btn-primary-pill > .ui-icon:last-child { width: 22px; height: 22px; }
.btn-secondary-pill { background: transparent; color: var(--sage); }
.btn-secondary-pill:hover:not(:disabled) { background: var(--sage-soft); }
.btn-text { min-height: 44px; padding: 10px; border: 0; background: transparent; color: var(--gold-dark); text-underline-offset: 5px; font-size: 13px; text-decoration: underline; }
.quick-actions-grid { margin: 10px 0 26px; display: grid; }
.action-card { display: flex; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; padding: 18px 7px; color: var(--ink); text-align: left; border-radius: 0; }
.action-card:hover { background: var(--sage-soft); }
.action-card > .ui-icon { width: 27px; height: 27px; }
.action-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.action-title { font-weight: 700; font-size: 15px; }
.action-desc { font-size: 12px; line-height: 1.5; color: var(--muted); }
.action-chevron { font: 400 30px/1 var(--font-serif); color: var(--gold-dark); }
.preview-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-section-header h2 { font: 500 27px/1.15 var(--font-serif); letter-spacing: -.6px; }
.view-all-link { border: 0; background: none; color: var(--gold-dark); font-size: 12px; min-height: 44px; flex-shrink: 0; }
.view-all-link span { font-size: 23px; margin-left: 5px; }
.preview-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.preview-carousel:empty { display: none; }
.preview-thumb-card { width: 132px; aspect-ratio: 4/5; flex-shrink: 0; border-radius: 16px; overflow: hidden; background: var(--sand); scroll-snap-align: start; }
.app-footer { display: flex; justify-content: center; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 20px 0 0; margin-top: 22px; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.app-footer .ui-icon { width: 16px; height: 16px; color: var(--gold-dark); }
.feed-state { margin: 12px 0 22px; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--muted); text-align: center; line-height: 1.65; font-size: 13px; overflow-wrap: anywhere; }
.feed-state-empty { padding-block: 30px; }
.feed-state-error { background: #fff3ef; border-style: solid; border-color: #ecc5bd; color: #8c3327; text-align: left; }
.feed-state-loading { background: var(--sand); }
.step-box-title { margin: 26px 0 6px; font-size: 16px; font-weight: 700; }
.section-help { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.media-type-tabs { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 14px; margin: 16px 0; gap: 4px; }
.media-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; background: none; border: 0; border-radius: 11px; color: var(--ink); font-weight: 600; }
.media-tab.active { background: var(--sage); color: white; }
.media-tab .ui-icon { width: 22px; height: 22px; }
.ratio-cards-row { display: flex; gap: 12px; }
.ratio-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-width: 0; min-height: 150px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: transparent; color: var(--ink); gap: 5px; }
.ratio-card.active { border: 2px solid var(--sage); background: #f8f3eb; padding: 15px; }
.ratio-preview-box { display: block; border: 1.8px solid currentColor; border-radius: 5px; margin-bottom: 6px; }
.ratio-preview-4-5 { width: 42px; height: 53px; }
.ratio-preview-9-16 { width: 32px; height: 57px; }
.ratio-title { font-size: 16px; }
.ratio-desc { font-size: 12px; color: var(--muted); }
.check-badge { position: absolute; right: 7px; top: 7px; width: 21px; height: 21px; display: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--sage); color: white; font-size: 12px; }
.active > .check-badge { display: flex; }
.frames-carousel-row { display: flex; gap: 9px; overflow-x: auto; padding: 5px 3px 12px; margin-inline: -3px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.frame-option-card { position: relative; flex: 0 0 72px; width: 72px; cursor: pointer; scroll-snap-align: start; color: var(--ink); }
.frame-thumb-canvas-box { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; aspect-ratio: 4/5; background: var(--white); padding: 3px; }
.frame-thumb-canvas-box canvas { display: block; width: 100%; height: 100%; }
.frame-option-card.active .frame-thumb-canvas-box { border: 2px solid var(--sage); padding: 2px; }
.frame-name { font-size: 10px; text-align: center; margin-top: 8px; white-space: normal; line-height: 1.3; }
.frame-option-card.active .frame-name { color: var(--sage); font-weight: 700; }
.frame-option-card > .check-badge { width: 17px; height: 17px; right: 3px; top: 3px; font-size: 10px; }
.page-actions { display: grid; gap: 8px; margin-top: 26px; }
.video-notice-box { margin-top: 12px; font-size: 12px; color: var(--muted); padding: 12px; background: var(--sand); border-radius: 10px; }
#video-ratio-notice { display: none; }
.camera-screen { align-items: center; max-width: 680px; }
.camera-header-nav { display: flex; width: 100%; gap: 12px; align-items: center; margin-bottom: 14px; }
.camera-step-title { flex: 1; font: 500 28px/1.2 var(--font-serif); text-align: left; }
.camera-screen > p:not(.camera-media-status) { font-size: 12px; color: var(--muted); text-align: center; margin: 0 0 12px; }
.camera-media-status { order: 1; width: 100%; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.5; background: var(--sand); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.camera-media-status:empty { display: none; }
.camera-viewport-wrap { order: 2; position: relative; flex-shrink: 0; overflow: hidden; border-radius: 22px; background: #19171c; max-width: 100%; height: min(53dvh, 510px); isolation: isolate; }
.camera-viewport-wrap.ratio-4-5 { aspect-ratio: 4/5; }
.camera-viewport-wrap.ratio-9-16 { aspect-ratio: 9/16; }
.camera-video-element,.camera-overlay-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.camera-video-element { z-index: 0; }
.camera-video-element.mirror { transform: scaleX(-1); }
.camera-overlay-canvas { z-index: 1; pointer-events: none; }
.camera-controls-overlay-top { position: absolute; inset: 12px 12px auto; display: flex; align-items: center; justify-content: space-between; z-index: 2; gap: 8px; }
.camera-right-controls { display: flex; margin-left: auto; gap: 8px; }
.cam-icon-btn { border: 1px solid #ffffff35; border-radius: 50%; background: #19171c9c; backdrop-filter: blur(10px); width: 44px; height: 44px; color: white; display: grid; place-items: center; }
.cam-icon-btn .ui-icon { width: 22px; height: 22px; }
.camera-bottom-deck { order: 3; display: grid; gap: 12px; width: 100%; max-width: 430px; padding: 14px 0 0; }
.camera-deck-settings { display: flex; justify-content: center; gap: 10px; }
.pill-selector-small { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; font-size: 12px; }
.pill-selector-small .ui-icon { width: 18px; height: 18px; }
.camera-shutter-row { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; justify-items: center; padding-block: 2px; gap: 12px; }
.deck-side-thumb,.toggle-mode-btn { border: 0; min-width: 44px; min-height: 44px; background: transparent; color: var(--sage); border-radius: 12px; }
.deck-side-thumb { display: grid; place-items: center; }
.toggle-mode-btn { display: grid; justify-items: center; gap: 3px; font-size: 11px; }
.shutter-btn-photo,.shutter-btn-video { border: 2px solid var(--sage); border-radius: 50%; width: 76px; height: 76px; padding: 6px; background: var(--bg); display: grid; place-items: center; }
.shutter-inner-photo { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--sage); color: white; }
.shutter-label { font-size: 12px; }
.shutter-inner-video { background: #b74339; width: 47px; height: 47px; border-radius: 50%; transition: border-radius .2s, width .2s, height .2s; }
.shutter-btn-video.recording { border-color: #b74339; }
.shutter-btn-video.recording .shutter-inner-video { width: 26px; height: 26px; border-radius: 6px; }
.video-recording-pill { display: none; align-items: center; gap: 6px; color: white; border-radius: 99px; font-size: 12px; background: #19171cbf; padding: 8px 10px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #e85c53; animation: pulse 1s infinite; }
.camera-footer-hint { color: var(--muted); text-align: center; font-size: 11px; }
.review-heading { text-align: center; }
.success-circle-icon { display: grid; place-items: center; width: 46px; height: 46px; background: var(--sage-soft); color: var(--sage); border-radius: 50%; margin: 0 auto 15px; }
.review-media-card { border-radius: 20px; background: #19171c; overflow: hidden; display: flex; justify-content: center; }
.review-media-card :is(canvas,img,video) { display: block; max-height: 58dvh; width: 100%; height: auto; object-fit: contain; }
.review-meta { text-align: center; margin: 12px 0; }
.media-tag-pill { font-size: 12px; color: var(--muted); }
.review-actions-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 12px 0 24px; gap: 10px; }
.review-action-btn { border: 1px solid var(--line); min-height: 62px; border-radius: 12px; background: transparent; color: var(--sage); padding: 12px; display: flex; align-items: center; gap: 9px; text-align: left; font-size: 12px; }
.review-action-btn:hover { background: var(--sage-soft); }
.review-action-btn .ui-icon { width: 20px; height: 20px; }
.gallery-add-button { margin-bottom: 16px; }
.plus-sign { font-size: 28px; font-weight: 400; line-height: 1; }
.filter-pills-row { display: flex; align-items: center; gap: 6px; margin: 8px 0 18px; flex-wrap: wrap; }
.filter-pill { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); background: transparent; font-size: 12px; }
.filter-pill.active { color: white; background: var(--sage); border-color: var(--sage); }
.gallery-select-grid,.mural-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.gallery-grid-item { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 12px; background: var(--sand); border: 2px solid transparent; padding: 0; cursor: pointer; }
.gallery-grid-item.selected { border-color: var(--sage); }
.gallery-grid-item img,.gallery-grid-item video { display: block; width: 100%; height: 100%; object-fit: cover; }
.item-check { position: absolute; top: 5px; right: 5px; border: 1px solid #ffffffb3; border-radius: 50%; background: #25232640; color: white; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; }
.selected .item-check { background: var(--sage); }
.video-time-tag,.gallery-local-only-badge,.gallery-upload-status { position: absolute; bottom: 4px; left: 4px; right: 4px; border-radius: 5px; color: white; background: #252326bf; font-size: 9px; line-height: 1.35; padding: 4px 5px; overflow-wrap: anywhere; }
.gallery-upload-fields,.form-group { display: grid; gap: 8px; margin: 0 0 20px; }
.gallery-upload-fields > label:not(.consent-toggle-row),.form-label { font-size: 14px; font-weight: 600; margin-top: 6px; }
.gallery-upload-fields > label > span,.form-label > span { font-weight: 400; color: var(--muted); }
.gallery-upload-fields input[type=text],.gallery-upload-fields textarea,.form-input-text,.form-textarea { width: 100%; min-height: 52px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: transparent; font-size: 16px; outline-offset: 3px; }
.gallery-upload-fields textarea,.form-textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
input::placeholder,textarea::placeholder { color: #797d75; font-size: 14px; }
.consent-toggle-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; margin: 8px 0 14px; font-size: 13px; }
.consent-toggle-row input[type=checkbox] { width: 24px; height: 24px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--sage); }
.consent-toggle-row strong { display: block; font-weight: 600; }
.consent-toggle-row small,.consent-text p { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.5; }
.privacy-note { text-align: center; color: var(--muted); font-size: 11px; margin: 12px 0 20px; }
.upload-queue { display: grid; gap: 10px; margin: 22px 0; }
.upload-queue-item { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 8px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.upload-queue-item > :is(img,video) { width: 54px; height: 60px; object-fit: cover; border-radius: 8px; }
.upload-queue-details { display: grid; gap: 4px; min-width: 0; }
.upload-queue-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.upload-queue-status { font-size: 11px; color: var(--muted); line-height: 1.5; }
.upload-status-error .upload-queue-status { color: #923729; }
.upload-progress { width: 100%; grid-column: 1/-1; height: 6px; accent-color: var(--sage); }
.upload-retry-button { grid-column: 1/-1; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; background: var(--sand); color: var(--sage); font-size: 12px; }
.selected-items-drawer { position: fixed; inset: auto 0 0; margin-inline: auto; max-width: 660px; z-index: 80; background: #fffdf9f5; backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 14px 18px max(16px,env(safe-area-inset-bottom)); box-shadow: 0 -12px 50px #25232617; flex-direction: column; gap: 8px; }
#selected-items-drawer { display: none; }
#screen-gallery:has(.selected-items-drawer[style*="flex"]) { padding-bottom: 260px; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.drawer-header .btn-text { font-size: 11px; text-decoration: none; }
.drawer-thumbs-row { display: flex; gap: 8px; overflow-x: auto; padding-top: 5px; }
.drawer-thumb-item { position: relative; width: 56px; height: 66px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.drawer-thumb-item > :is(img,video) { width: 100%; height: 100%; object-fit: cover; }
.drawer-thumb-remove { position: absolute; top: 0; right: 0; min-width: 30px; min-height: 30px; background: #252326bf; border: 0; border-radius: 0 0 0 6px; color: white; }
.drawer-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.drawer-actions button { min-width: 0; min-height: 48px; font-size: 11px; padding: 10px; gap: 6px; }
.drawer-actions .ui-icon { width: 18px; height: 18px; }
.mural-stats-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.mural-telao-link { min-height: 44px; color: var(--gold-dark); background: transparent; border: 0; font-size: 12px; }
.mural-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.mural-item-card { position: relative; aspect-ratio: 4/5; border: 0; overflow: hidden; border-radius: 15px; background: var(--sand); padding: 0; cursor: pointer; }
.mural-item-card > :is(img,video) { width: 100%; height: 100%; object-fit: cover; }
.mural-item-heart { position: absolute; top: 6px; right: 6px; padding: 8px; min-width: 44px; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 99px; background: #252326c7; color: white; font-size: 11px; z-index: 2; }
.mural-item-heart.liked { background: #834742; }
.mural-item-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; border-radius: 50%; background: #252326b3; color: white; width: 44px; height: 44px; }
.selected-media-summary-card { display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); padding: 12px; border-radius: 16px; margin-bottom: 24px; }
.summary-thumb { width: 58px; height: 73px; border-radius: 9px; background: var(--sand); overflow: hidden; flex-shrink: 0; }
.summary-thumb :is(img,video) { width: 100%; height: 100%; object-fit: cover; }
.summary-meta { min-width: 0; display: grid; gap: 4px; }
.summary-filename { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.summary-specs { font-size: 11px; color: var(--muted); }
.char-counter { text-align: right; font-size: 11px; color: var(--muted); }
.switch { position: relative; display: block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; }
.slider { display: block; position: absolute; inset: 0; border-radius: 99px; background: #c7c9bf; pointer-events: none; }
.slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: transform .2s; }
.switch input:checked + .slider { background: var(--sage); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch:has(input:focus-visible) { outline: 3px solid var(--gold-dark); outline-offset: 4px; border-radius: 99px; }
.success-screen-card { text-align: center; padding: 25px 0; }
.success-screen-card h2 { font: 500 40px/1.1 var(--font-serif); margin-bottom: 16px; }
.success-screen-card p { font-size: 14px; line-height: 1.7; color: var(--muted); }
#success-card-wrapper { display: none; }
.moment-modal-backdrop { position: fixed; inset: 0; background: #19171ccc; backdrop-filter: blur(10px); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
#moment-detail-modal { display: none; }
.moment-modal-card { position: relative; background: var(--bg); width: 100%; max-width: 500px; border-radius: 22px; overflow: auto; max-height: calc(100dvh - 32px); box-shadow: var(--shadow-lg); }
.moment-modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fffdf9ed; color: var(--ink); }
.moment-modal-media-slot { background: #19171c; display: flex; align-items: center; justify-content: center; }
.moment-modal-media-slot :is(img,video) { max-width: 100%; width: 100%; max-height: 65dvh; height: auto !important; object-fit: contain !important; display: block; }
.moment-modal-body { padding: 20px; }
.moment-modal-body h3 { font: 600 24px/1.2 var(--font-serif); }
.moment-modal-body > div:first-child { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
#modal-moment-author { font-size: 12px; color: var(--gold-dark); margin-bottom: 8px; }
#modal-moment-msg { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.modal-like-btn { display: flex; align-items: center; gap: 7px; min-height: 44px; border: 1px solid var(--line); background: var(--sage-soft); color: var(--sage); border-radius: 99px; padding: 8px 12px; }
.modal-like-btn .ui-icon { width: 18px; height: 18px; }
.wedding-toast { position: fixed; z-index: 2000; bottom: max(24px,env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%,12px); color: white; background: var(--sage); border-radius: 14px; padding: 14px 18px; width: max-content; max-width: min(90vw,480px); opacity: 0; pointer-events: none; transition: opacity .2s,transform .2s; text-align: center; font-size: 12px; box-shadow: var(--shadow-lg); }
.wedding-toast.visible { opacity: 1; transform: translate(-50%,0); }
#screen-telao { display: none; position: fixed; inset: 0; background: #17151a; color: white; z-index: 1100; padding: 16px; }
#screen-telao.active { display: flex; }
.telao-viewport { display: flex; flex: 1; align-items: center; justify-content: center; min-width: 0; }
.telao-media-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; }
.telao-media-container :is(img,video) { max-width: 94vw; max-height: 85dvh; width: auto !important; height: auto !important; object-fit: contain !important; border-radius: 14px; }
.telao-exit-btn { position: absolute; right: 20px; top: 20px; z-index: 2; min-height: 44px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; border: 1px solid #ffffff4d; border-radius: 99px; color: white; background: #19171cc2; font-size: 12px; }
.telao-caption-banner { position: absolute; bottom: 20px; max-width: min(90vw,750px); display: flex; align-items: center; gap: 18px; padding: 14px 20px; background: #19171ced; border: 1px solid #ffffff2b; border-radius: 14px; text-align: left; overflow-wrap: anywhere; }
.telao-caption-banner strong { display: block; font: 600 25px/1.2 var(--font-serif); }
.telao-caption-banner span { font-size: 13px; }
.camera-guide-dialog { width: min(480px,calc(100% - 28px)); max-height: calc(100dvh - 28px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); color: var(--ink); overflow-y: auto; box-shadow: 0 24px 90px #0004; }
.camera-guide-dialog::backdrop { background: #252326ba; backdrop-filter: blur(5px); }
.camera-guide-content { padding: 26px 24px 18px; }
.camera-guide-content > .ui-icon { display: block; width: 45px; height: 45px; margin: 0 auto 16px; }
.camera-guide-content h2 { font: 500 38px/1.05 var(--font-serif); letter-spacing: -1.3px; text-align: center; }
.camera-guide-content > p:first-of-type { text-align: center; font-size: 13px; color: var(--muted); line-height: 1.6; margin: 12px 0 18px; }
.camera-guide-tips { list-style: none; margin: 0 0 16px; padding: 0; }
.camera-guide-tips li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.camera-guide-tips li:last-child { border: 0; }
.guide-icon { display: grid; place-items: center; width: 42px; height: 42px; background: var(--sage-soft); color: var(--sage); border-radius: 50%; flex-shrink: 0; }
.guide-icon .ui-icon { width: 22px; height: 22px; }
.camera-guide-tips strong { display: block; font-size: 13px; }
.camera-guide-tips p { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 3px; }
.camera-permission-note { padding: 12px; border: 1px solid var(--line); border-radius: 11px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.55; margin-bottom: 14px; }
.camera-guide-content > .btn-text { display: block; width: 100%; margin-top: 6px; }
.camera-guide-content .btn-primary-pill { font-size: 12px; gap: 8px; }
.no-script-message { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; padding: 30px; z-index: 3000; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (min-width: 768px) {
  .screen { padding-inline: 32px; }
  #screen-home { max-width: 1160px; padding-inline: 42px; }
  .brand-bar { margin-bottom: 36px; }
  .home-composition { display: grid; grid-template-columns: 1.08fr 1fr; gap: 12px 48px; align-items: start; }
  .home-intro { grid-column: 2; grid-row: 1; text-align: left; padding-top: 16px; }
  .home-intro .couple-names { font-size: clamp(43px,4.6vw,62px); line-height: 1.1; }
  .home-description { margin: 14px 0 14px; font-size: 14px; }
  .home-tagline { font-size: 24px; letter-spacing: .5px; margin-top: 8px; }
  .hero-couple-card { grid-column: 1; grid-row: 1/3; aspect-ratio: 4/5; margin-bottom: 0; }
  .hero-couple-card img { object-position: 43% 50%; }
  .home-actions { grid-column: 2; grid-row: 2; }
  .quick-actions-grid { margin-bottom: 0; }
  .action-card { padding-block: 17px; }
  .home-preview-section { margin-top: 36px; }
  .preview-section-header h2 { font-size: 34px; }
  .home-preview-section .feed-state { padding-block: 30px; }
  .page-heading h2 { font-size: 54px; }
  #screen-gallery,#screen-mural { max-width: 840px; }
  .mural-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .gallery-select-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .frame-option-card { width: 94px; flex-basis: 94px; }
  .frame-name { font-size: 12px; }
  .ratio-card { min-height: 155px; }
  .camera-viewport-wrap { height: min(57dvh,560px); }
  .selected-items-drawer { max-width: 720px; }
}
@media (max-width: 359px) {
  .screen { padding-inline: 16px; }
  .couple-names { font-size: 35px; }
  .home-tagline { font-size: 20px; }
  .preview-section-header h2 { font-size: 23px; }
  .action-card { gap: 12px; }
  .frame-option-card { width: 64px; flex-basis: 64px; }
  .camera-guide-content { padding-inline: 18px; }
  .camera-guide-content h2 { font-size: 34px; }
  .drawer-actions button { padding-inline: 8px; gap: 4px; font-size: 10px; }
}
@media (max-height: 680px) {
  .camera-screen { padding-top: max(12px,env(safe-area-inset-top)); padding-bottom: max(14px,env(safe-area-inset-bottom)); }
  .camera-step-title { font-size: 23px; }
  .camera-viewport-wrap { height: 45dvh; }
  .camera-bottom-deck { gap: 7px; padding-top: 10px; }
  .shutter-btn-photo,.shutter-btn-video { width: 64px; height: 64px; }
  .camera-guide-content { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation: none !important; transition: none !important; }
}
