@font-face { font-family: "Preview Modern"; src: url("/assets/fonts/modern") format("truetype"); font-display: swap; }
@font-face { font-family: "Preview Friendly"; src: url("/assets/fonts/friendly") format("truetype"); font-display: swap; }
@font-face { font-family: "Preview Elegant"; src: url("/assets/fonts/elegant") format("truetype"); font-display: swap; }
@font-face { font-family: "Preview Cinematic"; src: url("/assets/fonts/cinematic") format("truetype"); font-display: swap; }
@font-face { font-family: "Preview Classic"; src: url("/assets/fonts/classic") format("truetype"); font-display: swap; }
@font-face { font-family: "Preview Typewriter"; src: url("/assets/fonts/typewriter") format("truetype"); font-display: swap; }
@font-face { font-family: "Preview Large TV"; src: url("/assets/fonts/large-tv") format("truetype"); font-display: swap; }
:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #59657a;
  --brand: #1858a8;
  --brand-dark: #10437f;
  --soft: #edf4fc;
  --line: #d8e0eb;
  --danger: #a52727;
  --success: #197347;
  --shadow: 0 10px 30px rgba(30, 51, 78, .09);
  --font-body: "Ubuntu Sans", "Inter", "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Ubuntu Sans", "Aptos Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f5f7fa; font: 18px/1.5 var(--font-body); }
.shell { width: min(100% - 32px, 980px); margin-inline: auto; }
.site-nav { position: sticky; z-index: 20; top: 0; color: white; background: rgba(7, 35, 70, .96); box-shadow: 0 4px 18px rgba(4, 22, 43, .2); backdrop-filter: blur(12px); }
.nav-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-brand { color: white; font-size: 1.08rem; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.nav-brand span { color: #b9dcff; }
.site-menu { display: flex; align-items: center; gap: 5px; }
.site-menu a { padding: 10px 15px; border-radius: 9px; color: white; font-weight: 750; text-decoration: none; }
.site-menu a:hover, .site-menu a:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
.menu-toggle { display: none; min-height: 44px; padding: 8px 13px; border: 1px solid rgba(255, 255, 255, .38); border-radius: 9px; color: white; background: transparent; font: 800 1rem/1 var(--font-body); cursor: pointer; }
#photos-heading, #settings-heading { scroll-margin-top: 86px; }
.hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; padding: 54px 0; color: white; background: radial-gradient(circle at 18% 18%, rgba(75, 157, 242, .52), transparent 34%), radial-gradient(circle at 78% 80%, rgba(49, 160, 109, .34), transparent 34%), linear-gradient(135deg, #092c58 0%, #155fae 58%, #174a82 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(4, 24, 48, .42), transparent 62%); }
.hero .shell { position: relative; z-index: 2; }
.hero-copy { max-width: 58%; }
.hero-art { position: absolute; z-index: 1; right: max(20px, calc((100vw - 1060px) / 2)); bottom: 0; height: min(100%, 600px); max-width: 46vw; object-fit: contain; object-position: right bottom; opacity: .5; pointer-events: none; user-select: none; }
.eyebrow { margin: 0 0 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .88; font-size: .78rem; }
h1, h2, h3 { font-family: var(--font-display); }
h1 { max-width: 680px; margin: 0; font-size: clamp(2.8rem, 6vw, 5.15rem); font-weight: 850; line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
h1 span { color: #b9dcff; }
.intro { max-width: 570px; margin: 24px 0 0; font-size: clamp(1.08rem, 2.5vw, 1.34rem); line-height: 1.55; opacity: .94; }
main { padding-block: 28px 60px; }
.panel { margin-bottom: 22px; padding: clamp(20px, 4vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.step-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.step-heading > span { flex: 0 0 40px; display: grid; place-items: center; height: 40px; border-radius: 50%; color: white; background: var(--brand); font-weight: 800; }
h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); line-height: 1.2; }
h2 small { font-size: .65em; color: var(--muted); font-weight: 500; }
.step-heading p, .hint { margin: 5px 0 0; color: var(--muted); }
.upload-zone { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 28px; border: 3px dashed #91afd2; border-radius: 16px; text-align: center; background: var(--soft); transition: .15s ease; }
.upload-zone:hover, .upload-zone.dragging, .upload-zone:focus-within { border-color: var(--brand); background: #e1eefc; }
.upload-picker { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 24px; border: 0; border-radius: 12px; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.upload-picker:hover, .upload-picker:focus-visible { color: var(--brand); outline: 3px solid rgba(24, 88, 168, .25); }
.upload-picker strong { font-size: 1.25rem; }
.upload-zone > span:last-of-type { color: var(--muted); }
.upload-icon { font-size: 3rem; line-height: 1; color: var(--brand); }
#photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.privacy { margin: 14px 0 0; padding-left: 28px; color: var(--muted); font-size: .92rem; background: linear-gradient(#507092, #507092) 4px 6px / 15px 15px no-repeat; }
.upload-diagnostics { margin-top: 14px; background: #f5f8fc; }
.diagnostic-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.small-button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--brand); border-radius: 9px; color: var(--brand); background: white; font: 800 .92rem/1.2 var(--font-body); cursor: pointer; }
.small-button:hover { color: white; background: var(--brand); }
.upload-diagnostics pre { max-height: 230px; overflow: auto; margin: 0; padding: 12px; border-radius: 8px; color: #dcecff; background: #102238; font: .78rem/1.45 ui-monospace, "Cascadia Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.photo-summary { display: flex; justify-content: space-between; gap: 10px; margin: 24px 0 12px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.photo-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(30, 51, 78, .08); }
.photo-card.dragging { opacity: .45; }
.photo-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #e6e8ed; }
.photo-number { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 20px; color: white; background: rgba(12, 26, 45, .83); font-weight: 800; }
.card-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; }
.card-controls button { min-height: 43px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fc; color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.card-controls button:hover { border-color: var(--brand); color: var(--brand); }
.card-controls .remove { color: var(--danger); }
.caption-label { display: block; padding: 0 10px 12px; color: var(--muted); font-size: .85rem; }
.caption-label input { margin-top: 4px; }
.field-grid { display: grid; gap: 18px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { color: #354156; font-weight: 700; }
label small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; }
input, select { width: 100%; min-height: 52px; margin-top: 7px; padding: 10px 13px; border: 2px solid #bcc8d7; border-radius: 10px; color: var(--ink); background: white; font: inherit; }
input[type="range"] { min-height: 32px; padding: 0; accent-color: var(--brand); }
input[type="color"] { min-height: 52px; padding: 5px; cursor: pointer; }
output { float: right; color: var(--brand); font-weight: 800; }
input:focus, select:focus { outline: 3px solid rgba(24, 88, 168, .2); border-color: var(--brand); }
details { margin-top: 22px; padding: 4px 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
summary { min-height: 54px; display: flex; align-items: center; color: var(--brand); font-weight: 800; cursor: pointer; }
.view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 430px; margin-bottom: 8px; padding: 5px; border-radius: 12px; background: #e7edf5; }
.view-switch button { min-height: 50px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; font: 800 1rem/1.2 inherit; cursor: pointer; }
.view-switch button[aria-pressed="true"] { color: white; background: var(--brand); box-shadow: 0 3px 10px rgba(24, 88, 168, .22); }
.advanced-studio { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 24px; margin: 22px 0 28px; align-items: start; }
.preview-column { position: sticky; top: 14px; }
.design-preview { --preview-font: "Preview Modern"; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; color: white; background: linear-gradient(145deg, #111b2b, #344760); box-shadow: 0 12px 30px rgba(17, 31, 49, .2); touch-action: none; }
.preview-backdrop { position: absolute; inset: -8%; background-position: center; background-size: cover; filter: blur(18px) brightness(.62); transform: scale(1.08); }
.design-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.design-preview.card-mode > img, .design-preview.card-mode .preview-backdrop { display: none; }
.design-preview.card-mode { background: linear-gradient(160deg, #121a28, #314258); }
.preview-title-layer { position: absolute; z-index: 3; left: 50%; top: 50%; display: grid; max-width: 86%; padding: .6em .85em; border-radius: .45em; transform: translate(-50%, -50%); font-family: var(--preview-font), sans-serif; line-height: 1.08; text-align: center; text-shadow: 0 2px 4px rgba(0, 0, 0, .7); cursor: grab; user-select: none; }
.preview-title-layer:active { cursor: grabbing; }
.preview-title-layer:focus-visible { outline: 3px solid #70b6ff; outline-offset: 3px; }
.preview-title-layer.placeholder-copy { opacity: .68; }
.preview-title-layer.preview-fade { animation: preview-fade 1.8s ease both; }
@keyframes preview-fade { from { opacity: 0; transform: translate(-50%, -44%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.preview-title-layer strong, .preview-title-layer span { display: block; overflow-wrap: anywhere; }
.preview-title-layer strong { font-size: clamp(1rem, 5vw, 3.8rem); }
.preview-title-layer span { margin-top: .25em; font-size: clamp(.75rem, 3vw, 2.2rem); }
.preview-caption { position: absolute; z-index: 3; left: 50%; bottom: 8%; max-width: 84%; padding: .38em .7em; border-radius: .4em; transform: translateX(-50%); font-family: var(--preview-font), sans-serif; font-size: clamp(.7rem, 2.2vw, 1.45rem); line-height: 1.15; text-align: center; text-shadow: 0 2px 4px rgba(0, 0, 0, .75); }
.safe-area { position: absolute; z-index: 4; inset: 5%; border: 1px dashed rgba(255, 255, 255, .52); border-radius: 5px; pointer-events: none; }
.preview-help { margin: 10px 3px 0; color: var(--muted); font-size: .86rem; }
.design-controls { display: grid; gap: 15px; }
.compact-fields { gap: 12px; }
.position-control { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.position-control legend { padding-inline: 5px; color: #354156; font-weight: 700; }
.position-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 190px; }
.position-grid button { aspect-ratio: 1; min-height: 36px; border: 1px solid #aebdce; border-radius: 7px; background: #edf3fa; cursor: pointer; }
.position-grid button::after { content: ""; display: block; width: 8px; height: 8px; margin: auto; border-radius: 50%; background: var(--brand); }
.position-grid button:hover, .position-grid button.active { color: white; border-color: var(--brand); background: var(--brand); }
.position-grid button:hover::after, .position-grid button.active::after { background: white; }
.video-estimate { margin: 22px 0 0; padding: 14px 16px; border-radius: 10px; color: #244a75; background: var(--soft); font-weight: 800; }
.message { margin: 16px 0; padding: 15px 18px; border-radius: 10px; }
.error { color: var(--danger); background: #fff0f0; border: 1px solid #edbdbd; }
.warning { color: #684b00; background: #fff7d8; border: 1px solid #e7cf78; }
.create-button { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: center; padding: 14px 22px; border: 0; border-radius: 13px; color: white; background: var(--brand); font: 800 1.25rem/1.2 inherit; text-decoration: none; cursor: pointer; box-shadow: 0 7px 18px rgba(24, 88, 168, .25); }
.create-button:hover { background: var(--brand-dark); }
.create-button:disabled { cursor: not-allowed; background: #9aa7b8; box-shadow: none; }
.result-panel { text-align: center; }
.render-splash { --rob-scale: .88; position: fixed; z-index: 100; inset: 0; display: grid; min-height: 100dvh; overflow: hidden; padding: clamp(18px, 4vw, 48px); color: white; text-align: center; background: radial-gradient(circle at 50% 42%, #2b79be 0%, #124e89 34%, #071f3e 72%); isolation: isolate; }
.splash-portrait { position: absolute; z-index: -1; inset: 0; display: grid; place-items: center; overflow: hidden; }
.splash-glow { position: absolute; width: min(75vw, 780px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(157, 218, 255, .32), rgba(61, 150, 216, .07) 48%, transparent 70%); filter: blur(8px); }
.splash-portrait img { position: relative; width: auto; height: min(72vh, 720px); max-width: none; object-fit: contain; transform: scale(var(--rob-scale)); transform-origin: 50% 57%; filter: drop-shadow(0 24px 32px rgba(1, 15, 31, .38)); transition: transform 1.4s cubic-bezier(.2, .75, .25, 1); will-change: transform; }
.splash-status { align-self: end; width: min(100%, 620px); margin-inline: auto; padding: clamp(18px, 4vw, 28px); border: 1px solid rgba(255, 255, 255, .2); border-radius: 18px; background: rgba(5, 27, 53, .76); box-shadow: 0 18px 50px rgba(1, 14, 29, .35); backdrop-filter: blur(16px); }
.splash-status h2 { margin: 0; color: white; font-size: clamp(1.5rem, 5vw, 2.35rem); }
.splash-status .eyebrow { margin-bottom: 7px; color: #b9dcff; }
.splash-status #progress-message { margin: 8px 0 0; color: rgba(255, 255, 255, .86); }
.splash-status .job-reference { color: rgba(255, 255, 255, .68); }
.splash-status .progress-track { background: rgba(255, 255, 255, .18); }
.progress-track { height: 20px; margin: 20px 0 8px; overflow: hidden; border-radius: 20px; background: #e4e9ef; }
#progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2871bf, #31a06d); transition: width .4s ease; }
.success-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: white; background: var(--success); font-size: 2rem; font-weight: 800; }
video { width: 100%; max-height: 70vh; margin: 22px 0; border-radius: 12px; background: black; }
.download-button { max-width: 540px; margin: auto; }
.secondary-button { width: 100%; max-width: 540px; min-height: 56px; margin: 0 auto 12px; border: 2px solid var(--brand); border-radius: 12px; color: var(--brand); background: white; font: 800 1.08rem/1.2 inherit; cursor: pointer; }
.secondary-button:hover { color: white; background: var(--brand); }
.create-another-button { margin-top: 12px; }
.job-reference { color: var(--muted); font-size: .88rem; }
.youtube-help { margin-top: 28px; padding: 22px; text-align: left; border-radius: 12px; background: var(--soft); }
.youtube-help h3 { margin-top: 0; }
.youtube-help li + li { margin-top: 9px; }
footer { padding: 22px 0 34px; color: var(--muted); text-align: center; font-size: .9rem; }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  body { font-size: 17px; }
  .shell { width: min(100% - 20px, 980px); }
  .nav-inner { position: relative; min-height: 58px; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 7px; }
  .site-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(250px, calc(100vw - 20px)); display: none; padding: 8px; border-radius: 12px; background: #092c58; box-shadow: 0 12px 30px rgba(4, 22, 43, .3); }
  .site-menu.open { display: grid; }
  .site-menu a { min-height: 48px; display: flex; align-items: center; }
  .hero { min-height: 700px; align-items: flex-start; padding: 38px 0 24px; }
  .hero::after { background: linear-gradient(180deg, rgba(4, 24, 48, .5), transparent 68%); }
  .hero-copy { max-width: 100%; }
  .hero-art { right: 3%; bottom: 0; width: auto; height: 58%; max-width: 82%; object-position: right bottom; }
  h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .intro { max-width: 100%; margin-top: 18px; }
  main { padding-top: 16px; }
  .panel { border-radius: 14px; padding: 18px 15px; }
  .field-grid.two { grid-template-columns: 1fr; }
  .advanced-studio { grid-template-columns: 1fr; }
  .preview-column { position: static; }
  .design-preview { max-height: 62vh; }
  .upload-zone { min-height: 180px; padding: 22px 15px; }
  .photo-summary { flex-direction: column; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-card { display: grid; grid-template-columns: 42% 58%; }
  .photo-card img { height: 100%; min-height: 190px; aspect-ratio: auto; }
  .photo-card .photo-number { left: 7px; }
  .photo-card-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .card-controls { grid-template-columns: repeat(2, 1fr); }
  .caption-label { padding-bottom: 10px; }
  .create-button { position: sticky; bottom: 8px; z-index: 3; }
  .render-splash { padding: 12px; }
  .splash-portrait img { height: min(68vh, 600px); }
  .splash-status { padding: 18px 15px; border-radius: 15px; }
  .download-button { position: static; }
}
@media (max-width: 380px) {
  .photo-card { grid-template-columns: 1fr; }
  .photo-card img { min-height: 180px; max-height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .splash-portrait img { transform: scale(1) !important; }
}
