:root {
  color-scheme: dark;
  font-family: Arial, sans-serif;
  color: #edf1e8;
  background: #0b191d;
  --muted: #9bb4b0;
  --line: #2a4043;
  --mint: #a2e7cd;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 90% 15%, #1c343329, transparent 60%); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a, summary, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button, .download { cursor: pointer; }
button { border: 1px solid var(--line); background: #1b3336; color: #edf1e8; border-radius: 10px; min-height: 44px; padding: 10px 16px; }
button:hover, .download:hover { background: #28494a; }
a:hover { color: var(--mint); }
:is(input, textarea, button, a, summary):focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
[hidden] { display: none !important; }
.site-header { max-width: 1340px; margin: auto; padding: 24px 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { font: 700 26px Georgia, serif; letter-spacing: -.8px; white-space: nowrap; }
.brand-dot { color: var(--mint); }
main { max-width: 1240px; margin: auto; padding: 48px 48px 24px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--mint); }
.intro .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.intro .eyebrow > span { height: 6px; width: 6px; border-radius: 50%; background: var(--mint); }
.intro h1 { font: 400 clamp(36px, 4.6vw, 60px)/1.1 Georgia, serif; letter-spacing: -2px; margin: 0; }
.intro h1 em { color: #b8d6c9; font-weight: 400; }
.intro > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 16px 0 0; }
.studio { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 54px; margin-top: 40px; align-items: start; }
.workspace { min-width: 0; }
.section-label { display: block; color: #dce6df; font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: .01em; margin: 0 0 12px; }
.reference-card { display: flex; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #12272b; align-items: center; }
.reference { width: 78px; height: 94px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.identity { min-width: 0; flex: 1; }
.identity h3 { font: 400 21px/1.2 Georgia, serif; margin: 0 0 4px; }
.identity > span { font-size: 11px; color: var(--muted); }
.reference-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 3px; }
.reference-controls button { background: none; border: 0; border-radius: 4px; padding: 6px 0; color: var(--mint); font-size: 12px; font-weight: 600; }
.reference-controls button:hover { text-decoration: underline; }
#reset-reference { color: var(--muted); font-weight: 400; }
.reference-controls button:disabled { opacity: .5; cursor: wait; }
.photo-help { margin-top: 4px; }
summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 400 18px Arial, sans-serif; margin-left: auto; }
details[open] > summary::after { content: '−'; }
.photo-help summary { font-size: 11px; color: var(--muted); }
.photo-help summary::after { font-size: 15px; }
.photo-help p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 10px; }
.destination-field { margin-top: 18px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; fill: none; stroke: #86b5a7; stroke-width: 1.5; }
input:not([type=radio]), textarea { display: block; width: 100%; border: 1px solid #385053; border-radius: 10px; background: #102328; color: #edf1e8; font-size: 16px; }
#destination { padding: 15px 14px 15px 42px; }
input::placeholder, textarea::placeholder { color: #8aa3a0; opacity: 1; }
.note { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
#reference-status { color: var(--mint); }
#reference-status:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 24px 0 20px; min-width: 0; }
legend { padding: 0; }
.scenes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scenes label { position: relative; cursor: pointer; min-width: 0; }
.scenes input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.scene-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #11252a; color: #b6c6c2; font-size: 12px; line-height: 1.4; height: 100%; transition: background .15s, border-color .15s; }
.scene-card > svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.scene-detail { display: block; opacity: .8; font-size: 11px; }
.scene-check { position: absolute; top: 10px; right: 10px; font-size: 11px; visibility: hidden; }
.scenes input:checked + .scene-card { background: #203d38; border-color: #91d7bc; color: #bcf0d8; }
.scenes input:checked + .scene-card .scene-check { visibility: visible; }
.scenes label:hover .scene-card { border-color: #80ab9c; }
.scenes input:focus-visible + .scene-card { outline: 2px solid var(--mint); outline-offset: 4px; }
.direction-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.direction-details summary { min-height: 52px; font-size: 13px; }
.optional { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 3px 7px; border-radius: 20px; }
.direction-body { padding-bottom: 14px; }
textarea { padding: 14px; line-height: 1.5; resize: vertical; min-height: 92px; }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.primary { display: flex; justify-content: center; align-items: center; gap: 12px; flex: 1; min-height: 52px; background: var(--mint); color: #102b24; border-color: var(--mint); font-weight: 600; font-size: 14px; }
.primary:hover { background: #b8f3dc; }
.primary:disabled { opacity: .6; cursor: wait; }
.primary > span { font-size: 19px; }
.generation-note { text-align: center; font-size: 10px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; }
#status { color: var(--mint); font-size: 13px; line-height: 1.6; }
#status:empty { display: none; }
#status.error { color: #ffc4ac; }
.results { min-width: 0; }
.results-heading { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 0 2px; margin-bottom: 12px; }
.results-heading h2 { margin: 0; }
.results-heading > span { font-size: 10px; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, #24413c80, transparent 65%), #102328; min-height: 576px; padding: 45px 24px; overflow: hidden; }
.postcards { position: relative; width: 240px; height: 212px; margin: 8px 0 24px; }
.postcard-back { position: absolute; inset: 3px 8px 12px; border: 1px solid #7c9b85; border-radius: 5px; background: #28443c; transform: rotate(-11deg); }
.postcard-front { position: absolute; inset: 0; background: #d7ddc9; color: #344f43; border-radius: 4px; padding: 14px; transform: rotate(5deg); box-shadow: 0 14px 38px #06110f55; }
.postcard-label { display: block; text-align: left; font-size: 7px; font-weight: 600; letter-spacing: .2em; margin: 0 0 9px; }
.postcard-art { display: block; width: 100%; height: 134px; background: #b8cdb7; border-radius: 2px; }
.postcard-sun { fill: #ece0b0; }
.postcard-hills { fill: #708d78; }
.postcard-road { fill: none; stroke: #d0d9b7; stroke-width: 3; }
.postcard-flight, .postcard-bird { fill: none; stroke: #344f43; stroke-width: 1.5; stroke-linecap: round; }
.postcard-flight { stroke-dasharray: 3 5; }
.postcard-caption { display: flex; justify-content: space-between; font: italic 13px Georgia, serif; padding-top: 10px; }
.empty > .eyebrow { font-size: 8px; letter-spacing: .18em; color: #aac8bb; margin: 10px 0 14px; }
.empty h3 { font: 400 38px/1.1 Georgia, serif; letter-spacing: -1px; margin: 0; }
#preview-message { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 16px 0 0; }
.preview-loader { display: none; width: 20px; height: 20px; border: 2px solid #466258; border-top-color: var(--mint); border-radius: 50%; margin-top: 16px; animation: turn 1s linear infinite; }
.results[aria-busy=true] .preview-loader { display: block; }
@keyframes turn { to { transform: rotate(360deg); } }
.results-note { color: var(--muted); font-size: 10px; text-align: center; line-height: 1.6; margin: 14px 8px 0; }
.gallery { display: grid; gap: 20px; }
.gallery figure { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #12272b; }
.gallery img { width: 100%; height: auto; display: block; }
.gallery figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px; gap: 14px; }
.gallery figcaption > div { min-width: 0; flex: 1 1 150px; overflow-wrap: anywhere; }
.gallery h3 { font: 400 23px/1.2 Georgia, serif; margin: 0 0 6px; }
.gallery small { font-size: 11px; color: var(--muted); }
.download { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--mint); font-size: 12px; white-space: nowrap; }
.studio-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding: 22px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.studio-footer > span { font: italic 14px Georgia, serif; align-self: center; }
.studio-footer nav { display: flex; gap: 24px; }
.studio-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1000px) and (min-width: 761px) {
  .site-header { padding-inline: 30px; }
  main { padding-inline: 30px; }
  .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; }
  .postcards { transform: scale(.85); margin-inline: -15px; }
  .empty h3 { font-size: 32px; }
  .reference-controls { gap: 0 10px; }
}
@media (max-width: 760px) {
  .site-header { padding: 12px 20px; }
  .brand { font-size: 22px; }
  main { padding: 26px 20px max(16px, env(safe-area-inset-bottom)); }
  .intro .eyebrow { font-size: 9px; margin-bottom: 12px; }
  .intro h1 { font-size: clamp(30px, 8.5vw, 48px); letter-spacing: -1.3px; }
  .intro > p:last-child { font-size: 12px; margin-top: 10px; }
  .studio { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 26px; }
  .section-label { font-size: 12px; margin-bottom: 10px; }
  .reference-card { gap: 14px; padding: 10px; }
  .reference { width: 68px; height: 82px; }
  .identity h3 { font-size: 20px; }
  .reference-controls { margin: 0; }
  .reference-controls button { font-size: 11px; }
  .destination-field { margin-top: 10px; }
  fieldset { margin: 20px 0 16px; }
  .scene-card { padding: 12px; gap: 7px; }
  .scene-card > svg { width: 24px; height: 24px; }
  .actions { margin-top: 18px; }
  .empty { min-height: 430px; padding: 32px 20px; }
  .postcards { transform: scale(.8); height: 212px; margin: -12px 0 -2px; }
  .empty h3 { font-size: 32px; }
  .studio-footer { margin-top: 32px; padding-top: 14px; flex-direction: column; align-items: center; gap: 2px; }
  .studio-footer nav { gap: 28px; }
}
@media (max-width: 350px) {
  .site-header { padding-inline: 16px; }
  main { padding-inline: 16px; }
  .brand { font-size: 20px; }
  .reference-controls { gap: 0 8px; }
  .scenes { gap: 7px; }
  .scene-card { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
