
/* Order step (2026-10-29): delivery, recipients, envelopes, more ornaments, ship-to, turnaround; summary at the side */
.order-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.order-main > .side-head { align-items: center; }
.order-main > .side-head h1 { margin: -.12em 0 0; }
.o-saved { font-size: .85rem; color: var(--ink-faint); }
.o-sec { background: var(--sheet); border: 1px solid var(--crease-soft); border-radius: 12px; padding: 14px 18px 16px; margin: 0 0 14px; scroll-margin-top: 12px; }
.o-sec h2 { font-size: 1.35rem; margin: 0 0 .5rem; }
.o-sec h3 { font-family: var(--sans); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--teal-deep); margin: .6rem 0 0; }
.o-sec p { margin: 0 0 .6rem; }
.o-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.o-choice, .o-tick { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--crease); border-radius: 10px; cursor: pointer; background: var(--sheet); margin: 0 0 8px; }
.o-choices .o-choice { margin: 0; }
.o-choice.on, .o-tick.on { border-color: var(--teal); background: var(--teal-wash); }
.o-choice input, .o-tick input { margin-top: 4px; accent-color: var(--teal); flex: none; width: 17px; height: 17px; }
.o-choice-text { display: flex; flex-direction: column; gap: 2px; }
.o-choice-text span { font-size: .88rem; color: var(--ink-soft); }
.o-fact { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px 10px; }
.o-fact span { font-size: .88rem; color: var(--ink-soft); }
.o-row-end { display: flex; justify-content: flex-end; margin-top: -2.1rem; margin-bottom: .6rem; }
.o-inside { margin: .2rem 0 .8rem; }
.o-inside > strong { display: block; margin-bottom: .35rem; font-size: .95rem; }
.o-inside .small-note { margin-top: .4rem; }
.o-greet { border-left: 3px solid var(--gold); padding: 6px 12px; margin: 0 0 .8rem; background: var(--gold-wash); border-radius: 0 8px 8px 0; }
.o-greet-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.o-greet-row .field { margin: .3rem 0; }
.o-greet-name { padding: 10px 12px; margin-bottom: .3rem; border: 1px dashed var(--crease); border-radius: var(--radius); color: var(--ink-faint); font-style: italic; }
.field input.short { width: 7.5em; }
.field input.tiny { width: 3.5em; }
.o-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: .4rem 0 .6rem; }
.o-tools label.btn { cursor: pointer; }
.o-template { position: relative; }
.o-template > summary { list-style: none; }
.o-template > summary::-webkit-details-marker { display: none; }
.o-template-menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--crease); border-radius: 10px; padding: 4px; box-shadow: 0 6px 18px rgba(16, 43, 69, .12); }
.o-counts { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: .2rem 0 .5rem; font-size: .92rem; }
.o-counts > span { font-weight: 600; margin-right: 4px; }
.chip.warn { border-color: var(--danger); color: var(--danger); }
.chip.warn.on { background: var(--ember-wash); }
.o-people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--crease-soft); }
.o-person { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--crease-soft); }
.o-person.editing { background: linear-gradient(var(--paper), var(--paper)); margin: 0 -18px; padding: 12px 18px; }
.o-badge { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; margin-top: 1px; }
.o-person.ok .o-badge { background: var(--teal); color: #fff; }
.o-person.check .o-badge { background: var(--gold); color: var(--ink); }
.o-person.fix .o-badge { background: var(--danger); color: #fff; }
.o-person-head { line-height: 1.3; }
.o-person-addr { font-size: .9rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.o-person-acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; justify-content: flex-end; max-width: 300px; }
.o-person-acts select { padding: 6px 8px; border: 1px solid var(--crease); border-radius: 8px; background: var(--sheet); font-size: .85rem; max-width: 100%; }
.o-verdict { font-size: .86rem; margin-top: .3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.o-verdict.ok { color: var(--teal-deep); }
.o-verdict.check { color: #7A5E10; }
.o-verdict.fix { color: var(--danger); }
.o-verdict .btn { min-height: 30px; padding: 4px 12px; font-size: .82rem; }
.o-edit { margin-top: .4rem; }
.o-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
.o-grid .field { margin: .35rem 0; grid-column: span 2; }
.o-grid .field.wide { grid-column: 1 / -1; }
.o-grid .field:has(input.short) { grid-column: span 1; }
.o-grid .field input.short { width: 100%; }
.o-import { margin: .2rem 0 .7rem; }
.o-import p { margin: .25rem 0 0; }
.o-address { margin-bottom: .2rem; }
.o-verdict-slot { min-height: 1.4em; }
.o-return { margin-top: .6rem; border-top: 1px dashed var(--crease-soft); padding-top: .2rem; }
.o-return .o-tick { margin-top: .6rem; }
/* the envelope preview, 9 × 6 */
.o-env-wrap { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 16px; align-items: start; }
.o-envelope { position: relative; aspect-ratio: 9 / 6; background: #FFFDF8; border: 1px solid var(--crease); border-radius: 4px; box-shadow: 0 2px 8px rgba(16, 43, 69, .08); overflow: hidden; font-size: 7px; color: var(--ink); }
/* the ornament's picture sits small in the lower left, under the return address and clear of the mailing address,
   scaled by its own proportions (max sizes only, so it never stretches) */
.o-envelope { container-type: size; }
.o-env-artbox { position: absolute; left: 4%; bottom: 5%; width: 27%; display: flex; flex-direction: column; align-items: center; }
.o-env-art { display: block; width: auto; height: auto; max-width: 100%; max-height: 30cqh; }
/* the words sit a little left of center under the picture; the arrow rises from their end to the picture's bottom edge */
.o-env-see { position: relative; margin-top: .9em; transform: translateX(-.9em); font: 700 3.4cqw/1.1 var(--sans); color: var(--ink); white-space: nowrap; }
.o-env-arrow { position: absolute; left: calc(100% + .1em); bottom: .3em; }
.o-env-arrow svg { display: block; width: 2em; height: 2.4em; }
.o-env-to { position: absolute; left: 34%; top: 44%; display: flex; flex-direction: column; font-size: 7.5px; line-height: 1.3; }
.o-env-from { position: absolute; left: 4%; top: 6%; max-width: 46%; display: flex; flex-direction: column; line-height: 1.25; color: var(--ink-soft); }
.o-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 .5rem; }
.o-sec-head h2 { margin: 0; }
.o-same { font-size: .88rem; }
.o-env-stamp { position: absolute; right: 4%; top: 7%; width: 11%; aspect-ratio: 4 / 5; border: 1px dashed var(--crease); background: var(--teal-wash); }
.o-qty { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.o-qty > div:first-child { display: flex; flex-direction: column; }
.o-qty .muted { font-size: .88rem; }
.o-stepper { display: inline-flex; border: 1px solid var(--crease); border-radius: 999px; overflow: hidden; flex: none; }
.o-stepper button { border: 0; background: var(--sheet); width: 40px; font-size: 1.2rem; cursor: pointer; }
.o-stepper button:hover { background: var(--teal-wash); }
.o-stepper input { width: 68px; border: 0; border-left: 1px solid var(--crease-soft); border-right: 1px solid var(--crease-soft); text-align: center; font-size: 1rem; padding: 8px 4px; -moz-appearance: textfield; }
.o-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.o-total-line { margin: .6rem 0 0; font-size: .92rem; color: var(--ink-soft); }
/* the summary */
.order-side { position: sticky; top: 12px; }
.o-summary { background: var(--sheet); border: 1px solid var(--crease); border-radius: 12px; padding: 14px 16px; }
.o-summary h2 { font-size: 1.35rem; margin: 0 0 .2rem; }
.o-lines { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: .6rem 0; font-size: .93rem; transition: opacity .2s; }
.o-lines.stale { opacity: .55; }
.o-lines dt { margin: 0; } .o-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.o-lines .total { font-weight: 600; border-top: 1px solid var(--crease-soft); padding-top: 6px; margin-top: 2px; }
.o-blockers { background: var(--ember-wash); border-radius: 8px; padding: 8px 12px; margin: .6rem 0; font-size: .9rem; }
.o-blockers ul { margin: .3rem 0 0; padding-left: 1.1em; }
.o-blockers li { margin: .15rem 0; }
.o-blockers .linkish { color: var(--ink); text-align: left; }
.o-approve { margin: .7rem 0 .6rem; }
.o-go { width: 100%; margin-bottom: .3rem; }
.o-go:disabled { opacity: .45; cursor: not-allowed; }
.o-mini { display: none; }
@media (max-width: 860px) {
  .order-page { grid-template-columns: 1fr; gap: 6px; }
  .order-side { position: static; scroll-margin-top: 12px; }
  .o-summary { scroll-margin-top: 12px; }
  .o-mini { display: flex; position: sticky; bottom: 0; z-index: 4; align-items: center; justify-content: space-between; gap: 10px;
    margin: 10px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--crease); }
  .o-mini.off { visibility: hidden; }
  .o-mini-text { display: flex; flex-direction: column; line-height: 1.2; }
  .o-mini-text span { font-size: .82rem; color: var(--ink-soft); }
  .view:has(.order-page) { padding-bottom: 0; }
}
@media (max-width: 640px) {
  .o-sec { padding: 12px 12px 14px; border-radius: 10px; }
  .o-person.editing { margin: 0 -12px; padding: 12px; }
  .o-choices { grid-template-columns: 1fr; }
  .o-env-wrap { grid-template-columns: 1fr; }
  .o-envelope { max-width: 260px; }
  .o-person { grid-template-columns: 24px minmax(0, 1fr); }
  .o-person-acts { grid-column: 2; justify-content: flex-start; max-width: none; }
  .o-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .o-row-end { margin-top: -.3rem; justify-content: flex-start; }
  .o-qty { flex-wrap: wrap; }
}
.o-grid .o-hint { grid-column: 1 / -1; margin: -.2rem 0 .35rem; }
.o-person-note { font-size: .86rem; color: var(--ink-soft); font-style: italic; margin-top: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.o-env-more { margin-top: 12px; }
