:root {
  color-scheme: light;
  --ink: #17342b;
  --muted: #576b60;
  --pine: #1a4638;
  --pine-dark: #112c25;
  --paper: #f6f5ee;
  --white: #fffefa;
  --line: #d7ddd2;
  --gold: #f5d892;
  --radius: 1.1rem;
  font: 16px/1.58 system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 20rem; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: .18rem solid #b46b28; outline-offset: .22rem; }
section, #confirm { scroll-margin-top: 1.5rem; }
.wrap { width: min(72rem, calc(100% - 4rem)); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font: 700 1.25rem/1.2 Georgia, serif; }
.brand-mark { display: grid; place-items: center; border-radius: 50%; width: 2rem; height: 2rem; background: var(--pine); color: var(--gold); font: 1.05rem system-ui, sans-serif; }
.top nav { display: flex; gap: clamp(.55rem, 2vw, 1.4rem); align-items: center; }
.top nav a { white-space: nowrap; font-size: .92rem; font-weight: 650; text-underline-offset: .3em; }

.hero { display: grid; grid-template-columns: 1fr 1.16fr; min-height: 29rem; align-items: stretch; overflow: hidden; border-radius: 1.6rem; background: var(--pine-dark); color: var(--white); }
.hero-copy { align-self: center; padding: clamp(2rem, 4vw, 3.4rem); z-index: 1; }
.eyebrow { margin: 0 0 .5rem; color: var(--muted); font-weight: 760; font-size: .77rem; text-transform: uppercase; letter-spacing: .12em; }
.hero .eyebrow { color: var(--gold); }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.08; letter-spacing: -.04em; }
h1 { font-size: clamp(2.3rem, 4.7vw, 4.05rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3rem); }
h3 { margin: 0; font-size: 1.08rem; }
.intro { max-width: 30rem; margin: 1.15rem 0 1.4rem; color: #e2e9de; }
.hero .primary { background: var(--gold); color: #213225; border-color: var(--gold); }
.hero .primary:hover { background: #fce8b4; border-color: #fce8b4; }
.hero-note { display: block; width: fit-content; margin: .7rem 0 0; font-size: .88rem; color: #cbd9cd; text-underline-offset: .24em; }
.hero-facts { display: grid; gap: .25rem; margin: 0 0 1.2rem; padding: .65rem .85rem; border-left: 2px solid var(--gold); background: #ffffff0a; }
.hero-facts strong { color: #fff3d6; }
.hero-facts span { color: #e2e9de; font-size: .88rem; }
.hero-picture { margin: 0; position: relative; background: #2f392d; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.example-section { margin-top: 3rem; }
.examples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.examples-grid article { padding: .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.examples-grid video { width: 100%; aspect-ratio: 16/9; border-radius: .62rem; background: var(--pine-dark); }
.example-caption { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: .55rem .25rem .22rem; }
.example-caption h3 { font-size: .96rem; }
.example-caption small { color: var(--muted); font-variant-numeric: tabular-nums; }

.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; padding: .74rem 1.14rem; border: 1px solid transparent; border-radius: .64rem; line-height: 1.35; min-height: 2.8rem; text-decoration: none; font-size: .96rem; font-weight: 720; text-align: center; }
.primary { background: var(--pine); color: white; }
.primary:hover { background: #24604d; }
.secondary { background: var(--white); color: var(--pine); border-color: #becdc1; }
.secondary:hover { background: #eef3eb; }
.text-button { border: 0; padding: .2rem .35rem; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: .2em; font-size: .91rem; }

.builder { max-width: 53rem; margin: 3.7rem auto 0; }
.section-heading { margin: 0 0 1.45rem; }
form, .panel { padding: clamp(1.2rem, 3vw, 2.3rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.form-part + .form-part { margin-top: 2rem; }
legend { margin-bottom: .55rem; font-size: 1.23rem; font-weight: 750; padding: 0; }
.hint { color: var(--muted); margin: .1rem 0 .85rem; }
small.hint { margin: 0; }
.child { padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: .75rem; margin-bottom: .9rem; }
.child-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.child-fields { display: grid; grid-template-columns: 8.7rem 1fr; gap: 1rem; }
.photo-pick { position: relative; display: grid; place-items: center; aspect-ratio: 273 / 337; overflow: hidden; padding: 0; border: 1px dashed #8ea797; border-radius: .6rem; background: #f1f6ee; cursor: pointer; }
.photo-pick:focus-within { outline: .18rem solid #b46b28; outline-offset: .2rem; }
.photo-pick input { cursor: pointer; position: absolute; inset: 0; opacity: 0; width: 100%; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 39%; position: absolute; inset: 0; }
.crop-photo { margin-top: .3rem; min-height: 2.25rem; }
.photo-placeholder { display: grid; justify-items: center; font-size: .85rem; font-weight: 680; text-align: center; padding: .3rem; }
.photo-placeholder span { font-size: 1.45rem; font-weight: 400; }
.child-copy label { display: grid; gap: .25rem; font-weight: 650; font-size: .93rem; }
.child-copy label + label { margin-top: .6rem; }
.child-copy input, .contact-field input, textarea { width: 100%; min-height: 2.6rem; background: #fff; color: var(--ink); border: 1px solid #b8c7bb; border-radius: .45rem; padding: .48rem .64rem; font-weight: 400; }
.contact-field { display: grid; gap: .35rem; max-width: 26rem; margin-top: 1rem; }
textarea { resize: vertical; }
.counter { font-size: .83rem; margin: .25rem 0 0; }
.form-actions, .result-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.5rem; }
.confirm-child { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.confirm-child img { width: 4.25rem; aspect-ratio: 273 / 337; object-fit: cover; object-position: 50% 39%; border-radius: .45rem; }
.confirm-child p { margin: .15rem 0; overflow-wrap: anywhere; }
.stress-field { margin-top: .55rem; }
.stress-field legend { margin-bottom: .25rem; color: var(--muted); font-size: .83rem; font-weight: 650; }
.stress-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.stress-option { display: flex; align-items: center; min-height: 2.75rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: .55rem; gap: .4rem; cursor: pointer; }
.stress-option:has(:checked) { background: #e7f0e6; border-color: #71937c; color: var(--pine-dark); }
.stress-option input { margin: 0; accent-color: var(--pine); }
.spelling-changes { display: block; margin-top: .35rem; color: var(--muted); }
.consent { display: flex; align-items: flex-start; gap: .56rem; font-size: .94rem; margin-top: 1.2rem; }
.consent input { accent-color: var(--pine); margin-top: .34rem; flex-shrink: 0; }
.error { margin: .9rem 0 0; padding: .7rem .85rem; background: #f9ebe7; color: #8b2d22; border-radius: .5rem; font-weight: 630; }

#photo-crop, #order-dialog, #admin-erase { width: min(29rem, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); padding: clamp(.85rem, 4vw, 1.4rem); color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
dialog::backdrop { background: rgb(17 44 37 / .65); }
#order-dialog h2, #admin-erase h2 { font-size: 1.8rem; }
#crop-title { margin-bottom: .45rem; font-size: 1.8rem; }
#crop-preview { display: block; margin-inline: auto; width: min(100%, 16rem, 37dvh); height: auto; background: white; border-radius: .35rem; outline: 1px solid var(--line); cursor: grab; touch-action: none; }
#crop-preview:active { cursor: grabbing; }
#crop-preview:focus-visible { outline: .18rem solid #b46b28; }
.crop-zoom { display: flex; gap: .8rem; align-items: center; margin-top: .9rem; }
.crop-zoom input { flex: 1; min-width: 0; accent-color: var(--pine); }
.crop-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .45rem; margin-top: .9rem; }
.crop-actions .text-button { margin-right: auto; }

.panel { max-width: 58rem; margin: 1.9rem auto 0; }
.panel h1 { font-size: clamp(2.05rem, 4.2vw, 3.45rem); }
.result-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin: 0 0 .9rem; }
.result video { width: 100%; aspect-ratio: 16/9; border-radius: .7rem; background: #0c1c17; margin-top: 1.1rem; }
.order-reference { margin: .15rem 0 .5rem; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.order-disclosure { margin: 1rem 0; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--muted); font-size: .92rem; }
.order-disclosure summary { cursor: pointer; color: var(--pine); font-weight: 700; }
.order-disclosure p { margin: .65rem 0; }
.order-disclosure .text-button { margin-top: .5rem; }
.recovery-copy { margin-top: .65rem; }
.restore-form, .dialog-actions { padding: 0; margin-top: .7rem; border: 0; background: transparent; }
.inline-field { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.inline-field input { flex: 1 1 14rem; min-width: 0; width: 100%; padding: .5rem .65rem; border: 1px solid #b8c7bb; border-radius: .45rem; color: var(--ink); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.order-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-decoration: none; padding: 1rem .5rem; border-top: 1px solid var(--line); }
.order-item:hover { background: #eff4ec; }
.order-item small { display: block; color: var(--muted); }
.order-item span { color: var(--pine); font-weight: 680; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 1.2rem 0 1.8rem; margin-top: 3.2rem; gap: .3rem 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }

.admin-orders { margin-block: 1.5rem 3rem; }
.admin-scroll { overflow-x: auto; }
#admin-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .92rem; }
#admin-table th, #admin-table td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
#admin-table td:first-child { font-family: ui-monospace, monospace; font-size: .82rem; }
.admin-actions > * + * { margin-left: .65rem; }

@media (max-width: 48rem) {
  .wrap { width: calc(100% - 2rem); }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 1.7rem 1.4rem; }
  .hero-picture { height: clamp(12rem, 53vw, 22rem); }
  .builder { margin-top: 2.6rem; }
  .examples-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  .brand { font-size: 1.05rem; }
  .top { min-height: 4.2rem; }
  .child-fields { grid-template-columns: 1fr; gap: .73rem; }
  .child-photo { width: 7rem; }
  .confirm-child { grid-template-columns: 3.2rem minmax(0, 1fr); gap: .6rem; }
  .confirm-child img { width: 3.2rem; }
  .examples-grid { grid-template-columns: 1fr; }
  .top nav a { font-size: .8rem; }
  .result-head { flex-wrap: wrap; }
  .crop-actions .primary, .crop-actions .secondary { padding-inline: .65rem; }
}

@media (max-width: 23rem) {
  .top { flex-wrap: wrap; gap: .4rem; padding-block: .65rem; }
}
