/* QUALITAG — self-contained trade portal design. No external fonts or frameworks. */
:root {
  color-scheme: light;
  --ink: #203443; --muted: #526674; --teal: #244C75; --danger: #82362f;
  --paper: #fff; --line: #cbd5dc; --steel-light: #f7fafb; --steel-dark: #aab6bc;
  --font: -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --space-1: 6px; --space-2: 12px; --space-3: 18px; --space-4: 26px;
  --radius: 9px; --radius-panel: 16px; --shadow: 0 3px 14px #20344308;
  --focus: 3px solid #356DA6;
  --order-action-shadow: 0 2px 0 #d9dee0,2px 6px 10px #20344329;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--font); line-height: 1.5;
  background: repeating-linear-gradient(0deg,#ffffff24 0 1px,#43546106 1px 2px,transparent 2px 4px),linear-gradient(115deg,#d2d9dc,#f4f6f7 42%,#d5dde0); }
button,input,textarea,select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: var(--focus); outline-offset: 3px; scroll-margin-block: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
h1,h2,p { margin-top: 0; }
/* Brand plaque retains its natural ratio. The header wraps before controls overlap. */
.site-header { padding: 28px 0 10px; }
.header-inner,.page-shell { width: min(1152px,calc(100% - 36px)); margin: auto; }
.hero-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: 22px 26px; border: 1px solid #aab6bd; border-radius: var(--radius-panel);
  background: repeating-linear-gradient(0deg,#ffffff24 0 1px,#43546105 1px 2px,transparent 2px 4px),linear-gradient(110deg,#dce2e5,#fafbfb 45%,#e2e8ea); box-shadow: inset 0 1px #fff,var(--shadow); }
.hero-branding { display: flex; align-items: center; gap: 24px; min-width: 0; flex: 1 1 680px; }
.brand-logo { display: block; width: clamp(230px,28vw,340px); max-width: 100%; height: auto; flex: none; filter: drop-shadow(0 5px 7px #18212920); }
.hero-copy { min-width: 0; border-left: 1px solid #9aa8b060; padding-left: 23px; }
h1 { font-size: clamp(26px,2.65vw,35px); line-height: 1.16; letter-spacing: -.035em; margin-bottom: 10px; }
.eyebrow { margin-bottom: 9px; color: #3c6670; font-size: 11px; font-weight: 750; letter-spacing: .15em; }
.intro-copy { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.header-aside { font-size: 11px; color: #405e6a; letter-spacing: .035em; }
.header-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #356DA6; }
.button-outline { min-height: 44px; padding: 10px 15px; border: 1px solid #a9b3b9; border-radius: var(--radius); background: linear-gradient(#fff,#e8edef); color: var(--ink); font-size: 13px; font-weight: 650; }
.page-shell { padding: 18px 0 30px; }
/* Opaque form panels protect legibility over the lightly brushed steel surface. */
.panel { margin-bottom: 18px; padding: 28px 30px; border: 1px solid #d0d9de; border-radius: var(--radius-panel); background: var(--paper); box-shadow: var(--shadow); }
.section-heading { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 5px; font-size: 21px; line-height: 1.3; letter-spacing: -.02em; }
.section-heading p { margin-bottom: 0; font-size: 13px; color: var(--muted); }
.step { flex: none; display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #aab5bc; border-radius: var(--radius); background: linear-gradient(#fff,#e6eaec); font-size: 12px; font-weight: 700; }
.field-grid { display: grid; gap: var(--space-3); }
.account-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span,.choice-fieldset legend { font-size: 13px; font-weight: 650; color: #344653; }
.field em { margin-left: 4px; color: #5f727d; font-style: normal; font-weight: 400; }
.required { color: #963334; }
.field input,.field textarea,.field select,.engraving-row > .tag-text-line { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #9facb5; border-radius: var(--radius); background: #fff; color: var(--ink); padding: 11px 12px; box-shadow: inset 0 2px 4px #253a460b; font-size: 16px; }
.field input:focus,.field textarea:focus,.field select:focus,.engraving-row > .tag-text-line:focus { border-color: #356DA6; outline: 2px solid #356DA6; outline-offset: 2px; }
input::placeholder,textarea::placeholder { color: #667782; opacity: 1; }
.field small,.field-help { color: #536772; font-size: 12px; line-height: 1.6; }
.field textarea { resize: vertical; min-height: 150px; }
.field-help { margin: 12px 0 0; }
.notes-grid { grid-template-columns: 1fr 1fr; }
/* Native radios enforce one shape/material. Product photographs identify each style in the selected metal. */
.choice-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice-fieldset legend { padding-bottom: 12px; }
.selection-layout { display: block; }
.shape-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--shape-tile-gap, 12px); }
.shape-card { position: relative; cursor: pointer; min-width: 0; }
.shape-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.shape-card-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(155deg,#fff,#f4f7f8); text-align: center; pointer-events: none; }
.shape-card-inner img { display: block; width: 100%; max-width: 165px; height: 148px; object-fit: contain; }
.shape-card-inner small { margin-top: 10px; font-size: 12px; color: #435d6a; font-weight: 650; }
.shape-card:last-child { grid-column: span 2; }
.shape-card:last-child img { max-width: 280px; }
.shape-card:hover .shape-card-inner { border-color: #7696a2; }
.shape-card input:checked + .shape-card-inner { border: 1px solid #356DA6; padding: 14px 10px; outline: 2px solid #356DA6; outline-offset: 2px; background: #EDF2F8; box-shadow: none; }
.shape-card input:focus-visible + .shape-card-inner { outline: var(--focus); outline-offset: 3px; }
.tag-subfields { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.quantity-field { max-width: 120px; }
/* Each grid row contains text AND its matching A/B controls within one scrolling area. */
.engraving-head { display: flex; justify-content: space-between; padding: 0 86px 8px 16px; font-size: 10px; font-weight: 750; letter-spacing: .1em; color: #526b77; }
.engraving-scroll { border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: #f5f8f9; }
.engraving-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto 68px; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius); }

.engraving-row > .tag-text-line { font-weight: 600; }
.side-buttons { display: flex; gap: 6px; }
.side-buttons button { min-width: 44px; min-height: 44px; border: 1px solid #9faeb7; border-radius: var(--radius); font-size: 14px; font-weight: 700; color: #344e5b; background: linear-gradient(#fff,#e6ecf0); }
.side-buttons button[aria-pressed=true] { color: #fff; border-color: #244C75; background: #356DA6; }
.add-line { font-size: 14px; min-height: 44px; margin-top: 10px; border: 0; border-radius: 7px; background: transparent; color: #244C75; padding: 8px 12px; font-weight: 650; }
.add-line:hover, .add-line:focus-visible { background: #EDF2F8; }
/* One restrained metallic primary action, with clear processing/disabled states. */
.form-alert { margin-top: 15px; padding: 14px 16px; background: #fff2f1; border: 1px solid #c78f89; color: var(--danger); border-radius: var(--radius); font-size: 14px; white-space: pre-line; }
.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 28px 5px 12px; font-size: 12px; color: #4b6572; }
/* Reflow rather than shrink controls at narrow widths and increased browser zoom. */
@media(max-width:850px) { .hero-branding { flex-basis: 100%; } }
@media(max-width:700px) {
  .header-inner,.page-shell { width: calc(100% - 24px); }
  .site-header { padding-top: 14px; }
  .hero-banner { padding: 18px; }
  .hero-branding { flex-direction: column; align-items: flex-start; gap: 15px; }
  .brand-logo { width: min(340px,100%); }
  .hero-copy { border: 0; padding: 0; }
  .panel { padding: 22px 18px; }
  .account-grid,.notes-grid { grid-template-columns: 1fr; }
  .shape-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .shape-card:last-child { grid-column: span 3; }
  .shape-card-inner { min-height: 185px; }
  .shape-card-inner img { height: 122px; }
  .engraving-head { padding-right: 16px; }
  .engraving-row { grid-template-columns: 22px minmax(0,1fr) auto; gap: 6px; }
  .site-footer { flex-direction: column; gap: 5px; }
}
@media(max-width:420px) {
  .shape-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shape-card:last-child { grid-column: span 2; }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 19px; }
  .engraving-scroll { padding: 5px; }
  .engraving-row { padding: 5px 1px; }
  .engraving-row > .tag-text-line { padding: 7px; }
  .side-buttons { gap: 3px; }
  .side-buttons button { min-width: 36px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* 2026 refinement: proportionate product images, prominent materials and movable print lines. */
.shape-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.shape-card:last-child { grid-column: auto; }
.shape-card-inner { min-height: 0; padding: 14px 12px; }
.shape-card input:checked + .shape-card-inner { padding: 14px 12px; }
.product-image-stage { width: 100%; aspect-ratio: 5 / 4; position: relative; display: block; overflow: visible; }
.shape-card-inner .product-image-stage img { position: absolute; left: 50%; top: 50%; width: 100%; max-width: none; height: auto; transform: translate(-50%,-50%); filter: drop-shadow(0 3px 3px #27313b16); }
.tag-subfields { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,250px); align-items: stretch; gap: 24px; }
.choice-fieldset legend, .quantity-field > label { font-size: 17px; font-weight: 650; line-height: 1.4; }
.quantity-field { max-width: none; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f6f9fa; justify-content: center; }

.quantity-field input { width: 84px; max-width: 100%; padding-inline: 8px; text-align: center; appearance: textfield; -moz-appearance: textfield; font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 650; min-height: 52px; }
.quantity-field input::-webkit-inner-spin-button, .quantity-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Header and row use exactly the same columns and share the scrollbar width. */
.engraving-scroll { max-height: none; overflow: visible; padding: 8px; position: relative; }
.engraving-row,.engraving-head { display: grid; grid-template-columns: 30px 24px minmax(0,1fr) 100px; column-gap: 8px; }
.engraving-row { padding: 7px 3px; background: transparent; }
.engraving-head { position: static; margin: -8px 0 4px; padding: 12px 3px 10px; background: #f5f8f9; align-items: center; font-size: 10px; }
.engraving-head span:first-child { grid-column: 1 / 4; }
.engraving-head span:last-child { grid-column: 4; text-align: center; }
.side-buttons { grid-column: 4; justify-content: space-between; gap: 8px; }
.side-buttons button { width: 46px; min-width: 0; min-height: 44px; border-color: #94a3ac; background: linear-gradient(160deg,#fff 0%,#e7edf0 55%,#cbd5dc 100%); box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px #6a7e8a35,0 3px 0 #94a4ae,0 4px 5px #20344318; transform: translateY(-1px); transition: transform .12s,box-shadow .12s; }
.side-buttons button:active { transform: translateY(2px); box-shadow: inset 0 2px 4px #20344325,0 1px 0 #94a4ae; }
.side-buttons button[aria-pressed=true] { background: linear-gradient(#3E709E,#28537C); color: #fff; border-color: #244C75; transform: translateY(1px); box-shadow: inset 0 2px 4px #1D3D5D50,0 1px 0 #1D3D5D; }
.drag-handle { grid-column: 1; width: 30px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #536d79; font-size: 26px; cursor: grab; touch-action: none; user-select: none; border-radius: 6px; }
.drag-handle:hover { background: #e2eaee; }
.drag-handle:active { cursor: grabbing; }
.engraving-row.is-dragging { background: #e3ecef; box-shadow: 0 0 0 2px #6e949e,0 5px 12px #20344320; position: relative; z-index: 3; }
.engraving-scroll.is-reordering { user-select: none; }
.site-footer { display: block; text-align: center; }
@media(max-width:850px) { .shape-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .tag-subfields { grid-template-columns: 1fr; } .quantity-field { display: grid; grid-template-columns: 1fr 124px; align-items: center; } .quantity-field small { grid-column: 1 / -1; } }
@media(max-width:600px) { .shape-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }  .engraving-row,.engraving-head { grid-template-columns: 24px 18px minmax(0,1fr) 86px; column-gap: 5px; } .side-buttons { gap: 6px; } .side-buttons button { width: 40px; } .drag-handle { width: 24px; } }
@media(max-width:360px) { .engraving-row,.engraving-head { grid-template-columns: 24px minmax(0,1fr) 86px; } .engraving-head span:first-child { grid-column: 1 / 3; } .engraving-head span:last-child,.side-buttons { grid-column: 3; } }

/* All supplied tag images share one canvas width; their transparent padding sets relative tag size. */

.engraving-actions { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.engraving-actions .add-line { margin-top: 0; }
.remove-line-action { margin-left: auto; }
@media(max-width:400px) { .engraving-actions button { font-size: 12px; padding-left: 2px; padding-right: 2px; } }

.shape-card-inner .tag-dimension { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 6px; margin-top: 5px; }
.tag-width-19 { --dimension-width: 44%; }
.tag-width-22 { --dimension-width: 51%; }
.tag-width-25 { --dimension-width: 58%; }
.tag-width-28 { --dimension-width: 65%; }
.tag-width-38 { --dimension-width: 88%; }

.quantity-control { display: flex; align-items: center; gap: 6px; }
.quantity-control:focus-within > input { border-color: #356DA6; outline: 2px solid #356DA6; outline-offset: 2px; }
.quantity-arrows { display: flex; flex-direction: column; gap: 2px; }
.quantity-arrows button { display: flex; align-items: center; justify-content: center; width: 34px; min-height: 26px; padding: 0; border: 1px solid #9faeb7; border-radius: 5px; background: linear-gradient(#fff,#e6ecf0); color: #344e5b; font-size: 19px; line-height: 1; }
.quantity-arrows button:hover:not(:disabled), .quantity-arrows button:focus-visible { background: #EDF2F8; border-color: #356DA6; }
.quantity-arrows button:active:not(:disabled) { background: #d9e6e8; }

.shape-card-inner .product-image-stage img { z-index: 1; }

/* A continuous writing surface, with separate accessible inputs and side controls. */
.engraving-scroll { padding: 8px; background: #fff; border-color: #9facb5; box-shadow: inset 0 2px 4px #253a460b; }
.engraving-scroll:focus-within { border-color: #356DA6; outline: 2px solid #356DA6; outline-offset: 2px; }
.engraving-row { grid-template-columns: 30px minmax(0,1fr) 100px; column-gap: 8px; padding: 2px 0; min-height: 48px; border-radius: 0; }
.engraving-row > .tag-text-line { grid-column: 2; grid-row: 1; resize: none; white-space: pre; overflow: hidden; height: 44px; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 20px; font-weight: 500; line-height: 1.4; }
.engraving-row > .tag-text-line:focus { border: 0; outline: none; box-shadow: none; }
#OrderForm .engraving-card:has(.line-tools:not([hidden])) .engraving-row.is-selected {
  background: #e3ecef;
}
.engraving-row > :is(.drag-handle,.side-buttons) { grid-row: 1; }
.side-buttons { grid-column: 3; }
@media(max-width:600px) { .engraving-row { grid-template-columns: 24px minmax(0,1fr) 86px; column-gap: 5px; } }
@media(forced-colors:active) { .engraving-scroll:focus-within { outline: 2px solid Highlight; } }

/* Six close-set lines and a matching drag-help symbol. */
.account-grid .field input { font-size: 22px; font-weight: 650; }
.engraving-row { min-height: 36px; padding-top: 0; padding-bottom: 0; }
.engraving-row > .tag-text-line { min-height: 36px; height: 36px; padding-top: 4px; padding-bottom: 4px; }
.engraving-row .side-buttons button { min-height: 30px; height: 30px; padding: 2px 0; line-height: 1.2; }
.engraving-row .drag-handle { min-height: 36px; }
.drag-help-icon { display: inline-block; vertical-align: middle; margin-right: 4px; font-size: 24px; line-height: 1; color: #536d79; }

.remove-dialog { width: min(460px,calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px; border: 1px solid #a4b5bd; border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 15px 55px #20344340; }
.remove-dialog::backdrop { background: #20344366; }
.validation-notice { border-top: 4px solid var(--teal); border-radius: var(--radius-panel); }
.validation-notice p { margin-bottom: 20px; color: var(--muted); }
.email-validation-example { white-space: pre-line; font-size: inherit; }
.remove-dialog h2 { margin: 0 0 14px; font-size: 21px; }
.remove-dialog p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; }
.action-confirm-details { margin: 12px 0 18px; padding-left: 24px; font-size: 17px; line-height: 1.5; }
.action-confirm-details li + li { margin-top: 6px; }
.clear-detail-options { list-style: none; padding-left: 0; }
.clear-detail-options label { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.clear-detail-options input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: #28537C; }
.clear-detail-options label:has(input:disabled) { opacity: .65; cursor: default; }
.clear-detail-options input:focus-visible { outline: 3px solid #28537C; outline-offset: 3px; }
.remove-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.remove-dialog-actions button { min-height: 44px; padding: 9px 16px; border: 1px solid #a4b5bd; border-radius: 7px; color: #244C75; background: #f4f8f9; font-weight: 650; }
.remove-dialog-actions button:hover { background: #EDF2F8; }
.remove-dialog .dialog-primary { background: #244C75; color: #fff; border-color: #244C75; }

/* Remove the extra flat shadow strip; retain the silhouette shadow and photographed edges. */
.product-image-stage::before { content: none; }
.remove-dialog #removeLineMessage { margin-top: 0; }

/* The eighth square card groups both material choices immediately after the bone. */
.material-card { width: 100%; aspect-ratio: 1; min-width: 0; align-self: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(155deg,#fff,#f4f7f8); }
.material-card .material-fieldset { min-width: 0; height: 100%; display: flex; flex-direction: column; }
.material-card .material-fieldset legend { padding-bottom: 8px; font-size: 17px; line-height: 1.4; }
.material-options { display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(2,minmax(0,1fr)); gap: 8px; min-width: 0; min-height: 0; flex: 1; }
.material-choice { position: relative; display: flex; min-width: 0; min-height: 0; padding: 2px; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.material-caption { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; color: #1f3946; }
.material-name { font-size: 13px; font-weight: 650; line-height: 1.3; }
.material-choice input { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--teal); }
.tag-subfields { display: block; }
.quantity-field { width: 100%; max-width: none; }
@media(max-width:600px) { .material-card { padding: 8px; } .material-card .material-fieldset legend { padding-bottom: 5px; font-size: 15px; } .material-options { gap: 6px; } .material-name { font-size: 12px; } }

/* Clear separation of remembered account details and the current order. */
.account-grid { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); }
.order-number-row { max-width: 300px; margin-bottom: 24px; }
.order-number-row input { font-size: 22px; font-weight: 650; }
.order-part h3 { margin: 0 0 16px; font-size: 20px; line-height: 1.35; }
.order-part .tag-style-heading { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
.order-part + .order-part { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.print-side-help { margin: -8px 0 16px; }
#rememberStatus:empty { display: none; }
.hero-banner { padding: 14px 18px; }
.hero-branding { gap: 24px; }
.brand-logo { width: clamp(280px,28vw,360px); }
.hero-copy { border: 0; padding: 0; }
.hero-copy h1 { font-size: clamp(24px,2.5vw,30px); margin-bottom: 6px; }
.header-description { max-width: 48ch; margin: 0 0 6px; font-size: 13px; color: #536772; line-height: 1.4; }
.header-aside { margin: 0; font-size: 11px; font-weight: 650; line-height: 1.4; }
.material-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
@media(min-width:851px) { .material-card { transform: translateY(-10px); } }
@media(max-width:700px) {
 .account-grid { grid-template-columns: 1fr; }
 .hero-branding { flex-direction: column; align-items: center; gap: 12px; }
 .brand-logo { width: min(340px,100%); }
 .hero-copy { width: 100%; text-align: center; }
 .header-description { margin-left: auto; margin-right: auto; font-size: 12px; }
}

/* Every additional order is a separate, full-width card directly below its source. */
#ordersList { display: flex; flex-direction: column; gap: 18px; }
#ordersList > .tag-order { margin-bottom: 0; min-width: 0; scroll-margin-top: 18px; }
.order-footer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 18px; margin-top: 24px; }
.tag-order-actions { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f6f9fa; }
.tag-workspace .quantity-field { min-width: 0; }
.remove-tag-order { margin: 0 0 0 auto; font-size: 12px; }
.remember-address-choice { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.remember-address-choice input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--teal); }
.remember-address-choice small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 5px; }
.tag-order + .tag-order { border-top: 2px solid #9db5be; }
@media(max-width:600px) { .order-footer { grid-template-columns: 1fr; } .tag-order-actions { flex-direction: row; flex-wrap: wrap; } .tag-order-actions button { flex: 1 1 160px; } .tag-order .section-heading { flex-wrap: wrap; } }

/* Keep delivery guidance with its actions, and address memory with its field. */
.tag-order-actions { max-width: none; }
.address-fields { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media(max-width:600px) {
  .tag-order-actions { max-width: none; }
}

/* Match the spacing between cards and the shared delivery section. */
#ordersList { margin-bottom: 18px; }

/* Account and order identifiers lead each card without repeated headings. */
.header-aside { font-size: 15px; font-weight: 750; color: #244e55; }
.header-dot { width: 10px; height: 10px; margin-right: 8px; background: #356DA6; }
.account-grid .field > span,.order-number-row .field > span { font-size: 18px; }
.account-grid .field em { font-size: 16px; }
.order-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.order-card-header .order-number-row { flex: 1 1 300px; min-width: 0; margin-bottom: 0; }
@media(max-width:600px) { .order-card-header { flex-wrap: wrap; } .order-card-header .remove-tag-order { margin-left: 0; } }

/* Shared heading typography and matching header/account column geometry. */
.hero-banner { padding: 28px 30px; }
.hero-branding { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: 18px; width: 100%; flex-basis: 100%; }
.hero-branding .brand-logo { width: min(340px,100%); min-width: 0; }
.hero-copy { text-align: left; }
.hero-copy .header-description { margin: 8px 0 0; font-size: 13px; }
.form-heading,
.hero-copy h1.form-heading,
.field > span.form-heading,
.field > label.form-heading,
.choice-fieldset legend.form-heading,
.order-part h3.form-heading,
.form-heading em { font-family: var(--font); font-size: 18px; font-weight: 650; font-style: normal; line-height: 1.5; letter-spacing: normal; color: #344653; }
.hero-copy h1.form-heading { margin: 0; }
.field > span.form-heading em { font-size: inherit; font-weight: 400; color: inherit; }
.notes-grid { align-items: start; }
@media(max-width:700px) {
  .hero-banner { padding: 22px 18px; }
  .hero-branding { grid-template-columns: 1fr; gap: 15px; }
  .hero-copy { width: 100%; text-align: left; }
  .account-grid { grid-template-columns: 1fr; }
}

/* Account introduction, delivery choice and email-before-submit layout. */
.hero-branding { display: flex; justify-content: center; flex-basis: 100%; }
.account-panel .hero-copy { margin-bottom: 22px; }
.account-panel .header-description { max-width: 70ch; }
.account-panel .account-grid { grid-template-columns: minmax(0,440px); }
.delivery-choice { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0; padding: 0; border: 0; min-width: 0; }
.delivery-choice legend.form-heading { padding: 0 0 8px; font-size: 18px; font-weight: 650; color: #344653; }
.delivery-choice label { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; }
.delivery-choice input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--teal); }
.address-help,.address-status { margin: 0; }
.address-status:empty { display: none; }
@media(max-width:700px) {
  .account-panel .account-grid { grid-template-columns: 1fr; }
}

/* Unframed logo and equal-size quantity/add-tag panels. */
.hero-banner { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.add-tag-question { margin: 0 0 4px; font-size: 16px; font-weight: 650; line-height: 1.5; }
.shared-postage-note { display: block; margin-top: 4px; font-size: 13px; }
@media(max-width:600px) { .add-tag-question { flex: 1 1 100%; } }

/* Four-digit account entry and shift-independent engraving presentation. */
#StoreNoXX { width: 112px; max-width: 100%; text-align: center; }
.engraving-row > .tag-text-line { text-transform: uppercase; }

/* Open brand header, aligned delivery fields and a calmer submission area. */
.hero-branding { display: grid; grid-template-columns: minmax(240px,340px) minmax(0,1fr); align-items: center; gap: 44px; }
.hero-copy h1.form-heading { font-size: clamp(24px,2.4vw,32px); font-weight: 750; line-height: 1.2; color: #24434e; }
.hero-copy .header-description { max-width: 48ch; margin: 12px 0 0; font-size: 15px; line-height: 1.6; }
.account-panel { padding: 0 0 22px; margin-bottom: 22px; border: 0; border-bottom: 1px solid #bdcbd1; border-radius: 0; background: transparent; box-shadow: none; }
.delivery-panel > .delivery-choice { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #e1e8eb; }
.delivery-panel .notes-grid { align-items: start; }
@media(max-width:700px) {
  .hero-branding { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
  .hero-copy { width: 100%; text-align: left; }
  .hero-copy .header-description { margin-left: 0; margin-right: 0; }
}

/* One add-tag action with an accessible choice dialog and aligned lower columns. */
.add-tag-question { font-size: 18px; font-weight: 650; line-height: 1.5; }
.shared-postage-note { font-size: 12px; font-weight: 400; line-height: 1.6; color: var(--muted); }
.add-tag-dialog { width: min(560px,calc(100% - 32px)); }
.add-tag-dialog > p { font-size: 14px; line-height: 1.6; color: var(--muted); white-space: normal; }
.tag-choice-options { display: grid; gap: 12px; margin-bottom: 20px; }
.tag-choice-option { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; width: 100%; min-height: 44px; padding: 16px; border: 1px solid #b1c6cc; border-radius: 10px; background: #f7fafb; color: var(--ink); text-align: left; }
.tag-choice-option:hover { border-color: var(--teal); background: #EDF2F8; }
.tag-choice-title { font-size: 16px; font-weight: 650; }
.tag-choice-option small { font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--muted); }

/* Quantity qualifier matches the regular-weight optional labels. */
.quantity-field > label.form-heading em { font-size: inherit; font-weight: 400; font-style: normal; color: inherit; }

@media(max-width:600px) { .shared-postage-note { flex: 1 1 100%; margin: 0; } }

/* Balance Quantity and Additional Tags with shared visual rows. */
.tag-workspace > .quantity-field,
.order-footer > .tag-order-actions { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto 56px 1fr; align-items: start; align-content: start; gap: 12px; width: 100%; max-width: none; padding: 18px; justify-self: stretch; }
.order-footer .add-tag-question,
.order-footer .shared-postage-note,
.tag-workspace .quantity-field > small { margin: 0; }
.tag-workspace .quantity-control { height: 56px; align-self: start; }
.tag-workspace .quantity-control input { height: 56px; }
.order-footer .tag-order-actions > button { width: fit-content; max-width: 100%; min-height: 56px; height: 56px; justify-self: start; }
@media(max-width:600px) { .order-footer { grid-template-columns: 1fr; } }


/* Keep secure-setup recovery beside its error message. */
.form-alert { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.form-alert-text { flex: 1 1 320px; min-width: 0; }
.form-alert #retrySession { flex: none; }


/* Compact open heading and discreet business contact footer. */
.site-header { padding: 20px 0 4px; }
.hero-branding { grid-template-columns: minmax(220px,300px) minmax(0,1fr); gap: 32px; }
.hero-branding .brand-logo { width: min(300px,100%); }
.hero-copy .header-description { margin-top: 8px; }
.page-shell { padding-top: 12px; }
.site-footer { display: block; margin-top: 24px; padding: 22px 5px 4px; border-top: 1px solid #bdcbd1; text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); }
.site-footer .footer-business { margin: 0 0 2px; font-size: 18px; font-weight: 650; color: var(--ink); }
.site-footer address { margin: 0; font-size: 16px; font-style: normal; }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 20px; row-gap: 4px; margin-top: 6px; }
.footer-contact a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact a:hover { color: var(--ink); }
.footer-contact a:focus-visible { outline: 2px solid #356DA6; outline-offset: 4px; border-radius: 2px; }
.footer-contact { align-items: center; }
.footer-clear-details { min-height: 44px; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-clear-details:hover:not(:disabled) { color: var(--ink); }
.footer-clear-details:focus-visible { outline: 2px solid #356DA6; outline-offset: 4px; border-radius: 2px; }
.site-footer .saved-details-status { max-width: 720px; margin: 10px auto 0; }
.site-footer .saved-details-status:empty { display: none; }
.site-footer .footer-copyright { margin: 10px 0 0; font-size: 11px; }
@media(max-width:700px) {
  .site-header { padding-top: 14px; }
  .hero-branding { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .hero-branding .brand-logo { width: min(280px,100%); }
}

/* Keep the account introduction and entry together beside the logo. */
:is(#OrderForm,.review-summary-details) > .site-header { padding: 8px 0 22px; }
:is(#OrderForm,.review-summary-details) > .site-header .header-inner { width: 100%; }
.hero-copy .account-panel { margin: 16px 0 0; padding: 0; border: 0; }
.hero-copy .account-grid { grid-template-columns: minmax(0,1fr); }
.hero-copy .account-grid .field { display: grid; grid-template-columns: 112px minmax(0,1fr); column-gap: 14px; row-gap: 6px; align-items: center; }
.hero-copy .account-grid .field > .form-heading { grid-column: 1 / -1; }
.hero-copy .account-grid .field > input { grid-column: 1; }
.hero-copy .account-grid .field > small { grid-column: 2; margin: 0; }
.hero-copy #rememberStatus:empty { display: none; }
@media(max-width:700px) {
  :is(#OrderForm,.review-summary-details) > .site-header { padding-top: 0; padding-bottom: 20px; }
  .hero-copy .account-panel { margin-top: 14px; }
}

/* Larger branding, proportionate number fields and tighter section spacing. */
.hero-branding { grid-template-columns: minmax(240px,340px) minmax(0,1fr); }
.hero-branding .brand-logo { width: min(340px,100%); }
.order-card-header .order-number-row { max-width: none; }
.order-number-row > .field { display: grid; grid-template-columns: 224px minmax(0,1fr); column-gap: 14px; row-gap: 8px; align-items: center; }
.order-number-row > .field > .form-heading { grid-column: 1 / -1; }
.order-number-row > .field > input { grid-column: 1; width: 224px; max-width: 100%; }
.order-number-row > .field > small { grid-column: 2; margin: 0; }
.order-part + .order-part { margin-top: 18px; padding-top: 0; border-top: 0; }
.delivery-panel > .delivery-choice { margin-bottom: 10px; padding-bottom: 0; border-bottom: 0; }
@media(max-width:700px) {
  .hero-branding { grid-template-columns: 1fr; }
  .hero-branding .brand-logo { width: min(340px,100%); }
  .hero-copy .account-grid .field { grid-template-columns: minmax(0,1fr); }
  .hero-copy .account-grid .field > small { grid-column: 1; }
  .order-number-row > .field { grid-template-columns: minmax(0,1fr); }
  .order-number-row > .field > small { grid-column: 1; }
}

/* One engraving card, matching the Quantity and Additional Tags panels. */
.tag-order .engraving-card {
  --engraving-padding: 18px;
  display: grid; gap: 12px; min-width: 0; margin-top: 18px; padding: var(--engraving-padding);
  border: 1px solid var(--line); border-radius: 12px; background: #f6f9fa;
}
.engraving-content { display: grid; align-content: start; gap: inherit; min-width: 0; }
.engraving-card > h3.form-heading,
.engraving-card .print-side-help { margin: 0; }
.engraving-card .engraving-scroll { min-width: 0; border-radius: 8px; }
.engraving-card .engraving-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 8px 12px; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent;
}
.line-edit-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; width: 100%; }
.engraving-card .engraving-actions .add-line {
  display: flex; align-items: center; gap: 6px; text-align: left;
  min-width: 0; min-height: 44px; margin: 0; padding: 4px 6px;
}
.line-tool-symbol { flex: 0 0 1em; font-size: 20px; font-weight: 800; line-height: 1; text-align: center; }
.engraving-card .engraving-actions .add-line,
.shared-add-tags > button {
  border: 1px solid #94a3ac; border-radius: 7px; color: #344e5b;
  background: linear-gradient(160deg,#fff 0%,#e7edf0 55%,#cbd5dc 100%);
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px #6a7e8a35,0 3px 0 #94a4ae,0 4px 5px #20344318;
  transform: translateY(-1px); transition: transform .12s,box-shadow .12s;
  font-size: 13px; line-height: 1.3;
}
.engraving-card .engraving-actions .add-line:hover:not(:disabled):not([aria-disabled=true]),
.engraving-card .engraving-actions .add-line:focus-visible:not(:disabled):not([aria-disabled=true]),
.shared-add-tags > button:hover:not(:disabled),
.shared-add-tags > button:focus-visible:not(:disabled) { border-color: #94a3ac; }
.line-edit-actions [aria-disabled=true] { opacity: .58; cursor: not-allowed; }
@media(max-width:600px) {
  .tag-order .engraving-card { padding: 12px; gap: 10px; }
}

/* Keep the order number, its helper and confirmation controls together. */
.tag-order .order-number-card {
  min-width: 0; padding: 18px; margin-bottom: 18px; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #f6f9fa;
}
@media(max-width:600px) {
  .tag-order .order-number-card { padding: 12px; }
}

/* Keep submitted details readable while their result is unresolved. */
.submission-protection { margin: 12px 0 0; padding: 12px 16px; border: 1px solid #9dbfc1; border-radius: 9px; background: #edf6f5; color: #244e55; font-size: 14px; line-height: 1.5; }
#OrderForm :is(input, textarea)[readonly]:not([data-custom-keypad-entry]) { background-color: #f4f7f8; }

/* Shared appearance and small-screen actions for every website confirmation. */
.remove-dialog-actions { flex-wrap: wrap; }
.remove-dialog-actions button { overflow-wrap: anywhere; }
.remove-dialog .dialog-primary:hover { background: #1D3D5D; border-color: #1D3D5D; }
@media(max-width:480px) {
  .remove-dialog { padding: 20px; }
  .remove-dialog-actions button { flex: 1 1 140px; }
}

/* Give narrow-screen engraving text more room; move buttons remain available. */
@media(max-width:600px) {
  .engraving-row { grid-template-columns: minmax(0,1fr) 58px; column-gap: 4px; }
  .engraving-row .drag-handle { display: none; }
  .engraving-row > .tag-text-line { grid-column: 1; min-width: 0; }
  .engraving-row .side-buttons { grid-column: 2; gap: 2px; justify-content: flex-end; }
  .engraving-row .side-buttons button { width: 28px; min-width: 28px; padding-inline: 0; }
}

@media(max-width:600px) {
  .engraving-card .engraving-scroll { padding-inline: 2px; }
  .engraving-row > .tag-text-line { font-size: 18px; padding-left: 2px; padding-right: 2px; }
}

/* Separate number cards; later orders retain the right-hand desktop column. */
.tag-order .order-number-card {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start;
  padding: 0; border: 0; border-radius: 0; background: transparent; gap: 16px;
}
.order-number-card > .account-panel,
.order-number-card > .order-number-row {
  margin: 0; min-width: 0; padding: 18px; border: 1px solid var(--line);
  border-radius: 12px; background: #f6f9fa; box-shadow: none;
}
.order-number-card > .account-panel { grid-column: 1; }
.order-number-card > .order-number-row { grid-column: 2; }
.order-number-card .account-grid { grid-template-columns: minmax(0,1fr); }
.order-number-card .field {
  display: grid; grid-template-columns: 112px minmax(0,1fr);
  column-gap: 12px; row-gap: 8px; align-items: center;
}
.order-number-card .field > .form-heading { grid-column: 1 / -1; }
.order-number-card .field > input { grid-column: 1; width: 112px; max-width: 100%; padding-inline: 6px; }
.order-number-card .field > small { grid-column: 2; margin: 0; overflow-wrap: anywhere; }
.order-number-card .remove-tag-order { display: block; margin: 12px 0 0 auto; }
@media(max-width:600px) {
  .tag-order .order-number-card { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .order-number-card > .account-panel,
  .order-number-card > .order-number-row { grid-column: 1; padding: 12px; }
  .order-number-card .field { column-gap: 10px; }
  .order-number-card .field > input { font-size: 20px; }
  .order-number-card .field > small { font-size: 12px; line-height: 1.4; }
}

/* One shared add-tag card, after every tag editor and just before delivery. */
.shared-add-tags { margin: 18px 0; padding: 18px; align-items: flex-start; }
.shared-add-tags > button { width: fit-content; max-width: 100%; min-height: 44px; }
.shared-add-tags > p { margin: 0; }

/* Persistent corner action on each order-number card. */
.order-number-card > .order-number-row { position: relative; }
.order-number-card .order-number-row > .field > .form-heading { padding-right: 32px; }
.order-number-card .remove-tag-order {
  position: absolute; top: 6px; right: 6px; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; min-height: 36px; margin: 0; padding: 0;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: var(--ink); font-size: 28px; line-height: 1;
}
.order-number-card .remove-tag-order:hover { background: #e3ecef; border-color: var(--line); }

/* A card without a neighbour uses the full available row. */
.order-number-card > .order-number-row:only-child { grid-column: 1 / -1; }

/* Keep a standalone order-number card in the right-hand wide-screen column. */
@media(min-width:601px) {
  .order-number-card > .order-number-row:only-child { grid-column: 2; }
}

/* A matching container around tag styles and their material choices. */
.tag-order .tag-style-card {
  min-width: 0; padding: var(--tag-style-padding, 18px); border: 1px solid var(--line);
  border-radius: 12px; background: #f6f9fa;
  scroll-margin-block-start: 6px;
}
.tag-config > .choice-fieldset > legend:focus-visible { outline: none; }
@media(max-width:600px) {
  .tag-order .tag-style-card { padding: 12px; }
}

/* Quantity matches the account card width, including the narrow-screen stack. */
.order-footer { column-gap: 16px; }

/* Explanations beside their controls, with explicit copy line breaks. */
.tag-workspace > .quantity-field {
  grid-template-columns: 124px minmax(0,1fr); grid-template-rows: auto auto;
  align-items: center; column-gap: 12px;
}
.tag-workspace > .quantity-field > label { grid-column: 1 / -1; }
.tag-workspace > .quantity-field > .quantity-control { grid-column: 1; grid-row: 2; }
.tag-workspace > .quantity-field > small { grid-column: 2; grid-row: 2; min-width: 0; }
.shared-add-tags {
  display: grid; grid-template-columns: max-content minmax(0,1fr);
  gap: 12px; align-items: center;
}
.shared-add-tags > .add-tag-question { grid-column: 1 / -1; }
.shared-add-tags > button { grid-column: 1; grid-row: 2; }
.shared-add-tags > .shared-postage-note { grid-column: 2; grid-row: 2; min-width: 0; }
.hero-copy h1.form-heading { font-size: 24px; }
@media(max-width:600px) {
  .tag-workspace > .quantity-field { grid-template-columns: 100px minmax(0,1fr); column-gap: 10px; }
  .tag-workspace .quantity-control input { width: 60px; }
  .tag-workspace > .quantity-field > small { font-size: 12px; line-height: 1.4; }
}

/* Keep the trade audience on its own line in the narrow header layout. */
@media(max-width:700px) {
  .hero-copy .trade-audience { display: block; }
}

/* Eight order digits retain the same side space as four account digits. */
.order-number-card .field > input { font-variant-numeric: tabular-nums; text-align: center; }
.order-number-card .order-number-row > .field { grid-template-columns: max-content minmax(0,1fr); }
.order-number-card .order-number-row > .field > input { width: calc(112px + 4ch); }

/* Match the order-number card and input, with Quantity on the right. */
.tag-workspace > .quantity-field { grid-template-columns: max-content minmax(0,1fr); row-gap: 8px; }
.tag-workspace .quantity-control input { width: calc(112px + 4ch); padding-inline: 6px; flex: 0 0 auto; }
.order-number-card .order-number-row > .field > input,
.tag-workspace .quantity-control input { height: 56px; min-height: 56px; }
@media(max-width:850px) {
  .tag-workspace > .quantity-field { grid-template-columns: minmax(0,1fr); }
  .tag-workspace > .quantity-field > small { grid-column: 1; grid-row: 3; }
}
@media(max-width:600px) {
  .tag-workspace > .quantity-field { padding: 12px; }
  .tag-workspace .quantity-control input { font-size: 20px; }
}

/* Account on the left and order number on the right on wide screens. */
@media(min-width:601px) {
  .order-number-card > .account-panel { grid-column: 1; grid-row: 1; }
  .order-number-card > .order-number-row,
  .order-number-card > .order-number-row:only-child { grid-column: 2; grid-row: 1; }
}
@media(max-width:600px) {
  .order-number-card > .account-panel,
  .order-number-card > .order-number-row { grid-row: auto; }
}

/* Subsequent-set removal sits at the far right of the containing white panel. */
.tag-order { position: relative; }
.order-number-card > .order-number-row { position: static; }
.order-number-card .order-number-row > .field > .form-heading { padding-right: 0; }
.order-number-card .remove-tag-order { top: 42px; right: 30px; }
@media(max-width:700px) {
  .order-number-card .remove-tag-order { top: 36px; right: 18px; }
}
@media(max-width:600px) {
  .order-number-card .remove-tag-order { top: 30px; right: 24px; }
  .tag-order:not(:first-child) .order-number-row > .field > .form-heading { padding-right: 36px; }
}

/* Disabled line actions remain readable and distinct from available actions. */
.engraving-card .engraving-actions .add-line:disabled,
.engraving-card .engraving-actions .add-line[aria-disabled=true],
.shared-add-tags > button:disabled {
  opacity: 1; color: #8b9198; background: #eef0f2; border-color: #dfe3e7;
  box-shadow: none; transform: none; cursor: not-allowed;
}

/* Momentary press feedback matches the A/B buttons without a latched state. */
.engraving-card .engraving-actions .add-line:active:not(:disabled):not([aria-disabled=true]),
.shared-add-tags > button:active:not(:disabled) {
  transform: translateY(2px); box-shadow: inset 0 2px 4px #20344325,0 1px 0 #94a4ae;
}
/* Keep Add Order Form at the end of the order. */
.tag-order .tag-workspace > .order-footer {
  margin-top: 18px; gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr));
  grid-auto-rows: auto; align-items: stretch;
}
:is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
  margin: 0; padding: 18px; grid-template-columns: max-content minmax(0,1fr);
  grid-template-rows: auto auto; gap: 8px 12px; align-items: center; align-content: start;
}
.order-footer .shared-add-tags > .add-tag-question { grid-column: 1 / -1; font-size: 17px; line-height: 1.4; }
.order-footer .shared-add-tags > button { grid-column: 1; grid-row: 2; }
.order-footer .shared-add-tags > .additional-tags-help {
  grid-column: 2; grid-row: 2; margin: 0; min-width: 0;
  color: var(--muted); font-size: 12px; line-height: 1.6;
}
.delivery-panel > .shared-postage-note { margin: 0 0 18px; font-weight: 650; }
@media(max-width:850px) {
  .tag-order .tag-workspace > .order-footer { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:600px) {
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags { padding: 12px; }
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags > button { flex: none; }
}

/* Additional editors have one full-width number card with its own corner close action. */
.tag-order .order-number-card > .order-number-row:only-child {
  grid-column: 1 / -1; width: 100%; max-width: none; position: relative;
}
.tag-order .order-number-row:only-child > .field > .form-heading { padding-right: 36px; }
.tag-order .order-number-row:only-child > .remove-tag-order { top: 6px; right: 6px; }

/* Delivery: heading, destination choice and address form one clear sequence. */
.delivery-panel > .delivery-heading { margin: 0; }
.delivery-panel > .shared-postage-note { margin: 6px 0 20px; font-weight: 400; }
.delivery-panel .address-fields { gap: 14px; }
.delivery-panel .delivery-choice {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px;
  margin: 0; padding: 0; border: 0;
}
.delivery-panel .delivery-choice legend {
  padding: 0; margin-bottom: 10px; color: var(--ink); font-size: 14px; font-weight: 650;
}
.delivery-panel .address-fields > .field { gap: 0; }
.delivery-panel .address-fields > .field > .sr-only { margin: 0; }
@media(max-width:360px) {
  .delivery-panel .delivery-choice { gap: 8px; }
}



/* A balanced delivery row; optional notes take space only when opened. */
.delivery-panel .notes-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
.delivery-panel .address-fields {
  display: grid; grid-template-columns: minmax(220px,.8fr) minmax(0,1.4fr);
  align-items: start; gap: 24px;
}
.delivery-destination-panel,.delivery-address-entry { min-width: 0; }
.delivery-panel .delivery-choice { grid-template-columns: minmax(0,1fr); gap: 10px; }
.delivery-address-entry .field { gap: 0; }
.delivery-address-entry .address-status:empty { display: none; }
.delivery-address-entry > .field-help { margin: 8px 0 0; }
.delivery-address-entry > .delivery-help { margin-top: 16px; }
.engraving-footer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; min-width: 0; }
#OrderForm :is(.notes-toggle, .line-tools-toggle) {
  display: flex; align-items: center; gap: 6px 10px; width: fit-content;
  min-height: 44px; padding: 6px 10px; font-size: 14px; list-style: none; cursor: pointer;
}
#OrderForm .notes-toggle { grid-column: 1; grid-row: 1; max-width: 100%; }
#OrderForm .notes-toggle > span { min-width: 0; }
#OrderForm .line-tools-toggle { justify-self: end; }
#OrderForm :is(.notes-toggle, .line-tools-toggle)[aria-expanded=true]:not(:disabled) {
  color: #fff; background: var(--control-selected); border-color: #244C75; box-shadow: var(--control-inset);
}
#OrderForm :is(.notes-toggle, .line-tools-toggle)::after {
  content: ''; flex: none; width: 8px; height: 8px; margin-inline-start: auto;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
#OrderForm :is(.notes-toggle, .line-tools-toggle)[aria-expanded=true]::after { transform: rotate(225deg); }
.notes-added {
  display: block; color: var(--teal); font-size: 11px; line-height: 1.2;
}
.notes-toggle[aria-expanded=true] .notes-added { display: none; }
#OrderForm .line-tools .remove-line-action:not(:disabled) {
  color: #773b33; border-color: #a96d62;
  background: linear-gradient(#fffdfc,#f6e6e2);
  box-shadow: inset 0 1px 1px #fff,0 3px 0 #a96d62;
}
.line-notes-editor { min-width: 0; }
.line-notes-editor .notes-field { display: grid; grid-template-columns: minmax(0,1fr); }
.notes-field > textarea, .notes-field::after { grid-area: 1 / 1; }
.line-notes-editor .notes-field > textarea { min-height: 72px; resize: none; font-size: var(--keypad-letter-size); line-height: 1.4; }
/* The hidden copy gives the textarea room for wrapped text and trailing blank lines. */
.notes-field::after {
  content: attr(data-notes) " "; visibility: hidden; pointer-events: none;
  font-size: var(--keypad-letter-size); line-height: 1.4; padding: 11px 12px; border: 2px solid transparent;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
#OrderForm .notes-field {
  max-height: var(--notes-editor-space, none);
  grid-template-rows: minmax(0, auto);
}
#OrderForm .notes-field::after { max-height: var(--notes-editor-space, none); overflow: hidden; }
#OrderForm .notes-field > textarea {
  min-height: min(72px, var(--notes-editor-space, 100vh));
  max-height: var(--notes-editor-space, none);
}
@media(max-width:700px) {
  .delivery-panel .address-fields { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .delivery-panel .delivery-choice { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Full-width additional cards align their contents with the first right-hand card. */
@media(min-width:601px) {
  .tag-order .order-number-card > .order-number-row:only-child {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    /* Match the 16px card gap plus the two 18px inner paddings. */
    column-gap: 52px;
  }
  .order-number-row:only-child > .field { grid-column: 2; min-width: 0; }
}

/* Guidance sits over side choices; notes balance the editing controls below. */
.engraving-header { display: grid; gap: 8px; min-width: 0; }
.engraving-header > .form-heading { margin: 0; }
@media(min-width:851px) {
  .engraving-header { grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 16px; align-items: end; }
}

/* Additional sets have a clear identity card paired with their number card. */
.order-number-card > .order-position-card {
  grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 18px;
  min-width: 0; padding: 18px; align-self: stretch;
  border: 1px solid #244C75; border-radius: 12px; background: #244C75;
}
.order-position-number {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  min-width: 2ch; padding: 0; color: #fff; font-size: 72px; font-weight: 750; line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.order-position-card > div { min-width: 0; padding-left: 18px; border-left: 1px solid #ffffff40; }
.order-position-title { margin: 0 0 6px; color: #fff; font-size: 20px; line-height: 1.35; font-weight: 650; }
.order-position-card p { margin: 0; color: #EDF2FB; font-size: 13px; line-height: 1.5; }
@media(min-width:601px) and (max-width:850px) {
  .order-number-card > .order-position-card { gap: 12px; }
  .order-position-number { font-size: 48px; }
  .order-position-card > div { padding-left: 12px; }
  .order-position-title { font-size: 18px; }
}
.order-number-card > .order-position-card + .order-number-row {
  grid-column: 2; grid-row: 1; position: relative; align-self: stretch;
}
.order-position-card + .order-number-row > .field > .form-heading { padding-right: 36px; }
.order-position-card + .order-number-row > .remove-tag-order { top: 6px; right: 6px; }
@media(max-width:600px) {
  .order-number-card > .order-position-card,
  .order-number-card > .order-position-card + .order-number-row { grid-column: 1; grid-row: auto; }
  .order-number-card > .order-position-card { padding: 12px; gap: 12px; }
  .order-position-number { font-size: 48px; }
  .order-position-card > div { padding-left: 12px; }
  .order-position-title { font-size: 18px; }
}

/* With multiple forms, the shared account stands below the logo, outside form cards. */
.standalone-account {
  margin: 0 0 16px; padding: 18px; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px; background: #f6f9fa; box-shadow: none;
}
.standalone-account .account-grid { grid-template-columns: minmax(0,1fr); }
.standalone-account .field {
  display: grid; grid-template-columns: 112px minmax(0,1fr);
  column-gap: 12px; row-gap: 8px; align-items: center;
}
.standalone-account .field > .form-heading { grid-column: 1 / -1; }
.standalone-account .field > input {
  grid-column: 1; width: 112px; max-width: 100%; padding-inline: 6px;
  text-align: center; font-variant-numeric: tabular-nums;
}
.standalone-account .field > small { grid-column: 2; margin: 0; overflow-wrap: anywhere; }
@media(max-width:600px) {
  .standalone-account { padding: 12px; margin-bottom: 12px; }
  .standalone-account .field > input { font-size: 20px; }
}

/* Keep form identities readable; stack companion cards before their text crowds. */
.order-position-title { white-space: nowrap; }
.order-position-instruction > span { display: block; }
@media(max-width:1100px) {
  .order-number-card > .order-position-card,
  .order-number-card > .order-position-card + .order-number-row { grid-column: 1 / -1; grid-row: auto; }
}
/* Preserve the divider and text grouping as the card gets narrower. */
@media(max-width:600px) {
  .order-number-card > .order-position-card {
    display: flex; align-items: center; gap: clamp(8px,2.2vw,12px);
    padding: clamp(10px,3vw,12px);
  }
  .order-position-number { font-size: clamp(44px,9vw,48px); }
  .order-position-card > div {
    display: block; flex: 1 1 auto; min-width: 0;
    padding-left: clamp(8px,2.2vw,12px); border-left: 1px solid #ffffff40;
  }
  .order-position-title { font-size: clamp(13px,4.2vw,18px); }
}

/* Keep the mobile introduction brief while retaining the full desktop heading. */
@media(max-width:700px) {
  .hero-copy .heading-prefix, .hero-copy .header-description { display: none; }
  .hero-copy .heading-tags { text-transform: capitalize; }
}

/* Two concise mobile lines, scaled to the screen without changing desktop copy. */
.hero-copy .mobile-heading, .hero-copy .mobile-intro { display: none; }
@media(max-width:700px) {
  .hero-copy .desktop-heading, .hero-copy .desktop-intro { display: none; }
  .hero-copy .mobile-heading, .hero-copy .mobile-intro { display: inline; }
  .hero-copy h1.form-heading { font-size: clamp(14px,4.6vw,24px); line-height: 1.25; white-space: nowrap; }
  .hero-copy .header-description { display: block; margin-top: 8px; font-size: clamp(12px,3.7vw,18px); line-height: 1.4; white-space: nowrap; }
}
@media(max-width:280px) {
  .hero-copy h1.form-heading, .hero-copy .header-description { white-space: normal; }
}

/* Header wraps by available space so the account cannot squeeze the introduction. */
.site-header .hero-branding {
  display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: center; gap: 24px; width: 100%;
}
.site-header .brand-logo { width: 360px; max-width: 100%; flex: 0 1 360px; }
.site-header .hero-copy { flex: 1 1 360px; min-width: 0; width: auto; text-align: left; container-type: inline-size; }
.site-header .standalone-account { flex: 0 1 360px; margin: 0; padding: 16px; width: 100%; min-width: 0; }
.site-header #rememberStatus:empty { display: none; }
@media(min-width:701px) {
  .site-header .hero-copy .header-description { font-size: 15px; line-height: 1.5; max-width: none; }
}
@media(max-width:1100px) {
  .site-header .hero-branding { gap: 16px 24px; }
  .site-header .brand-logo { width: 300px; flex-basis: 300px; }
  .site-header .standalone-account { flex-basis: 100%; }
}
@media(max-width:700px) {
  .site-header .hero-branding { flex-direction: column; align-items: stretch; gap: 12px; }
  .site-header .brand-logo { width: min(290px,100%); flex: 0 1 auto; align-self: center; }
  .site-header .hero-copy { flex: 0 1 auto; width: 100%; text-align: center; }
  .site-header .standalone-account { flex: 0 1 auto; padding: 12px; }
}

/* Full-page visual refresh: clear sections and a single primary order action.
   Retain field geometry, selection/focus outlines and responsive identity grouping. */
.panel { margin-bottom: 24px; padding: 24px; border-color: var(--line); }
#ordersList { gap: 24px; margin-bottom: 24px; }
.tag-order + .tag-order { border-top: 1px solid var(--line); }
.tag-order .tag-style-card,
.tag-order .engraving-card,
.order-number-card > .order-number-row,
.tag-workspace > .quantity-field,
:is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags,
.site-header .standalone-account { background: #f7fafb; }
.shape-card-inner { background: #fff; }
.tag-order .engraving-card { margin-top: 16px; gap: 16px; }
.tag-order .tag-workspace > .order-footer { margin-top: 16px; gap: 16px; }
.tag-order .order-number-card { margin-bottom: 16px; }
.form-heading,
.field > span.form-heading,
.field > label.form-heading,
.choice-fieldset legend.form-heading,
.order-part h3.form-heading { color: var(--ink); }
.hero-copy h1.form-heading { color: var(--ink); }
.field small,.field-help,
.order-number-card .field > small,
.tag-workspace > .quantity-field > small,
.order-footer .shared-add-tags > .additional-tags-help,
.print-side-help,
.shape-card-inner small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.order-position-card p { font-size: 14px; }
@media(min-width:1101px) {
  .order-position-card .order-position-instruction { font-size: 16px; }
}
.engraving-header { gap: 12px; }
.engraving-card .engraving-scroll { background: #fff; }
.engraving-head { background: #fff; }
.site-footer { margin-top: 24px; padding-top: 24px; font-size: 14px; }
.site-footer .footer-copyright { font-size: 12px; }
@media(max-width:700px) {
  .panel { padding: 18px; }
  #ordersList { gap: 20px; margin-bottom: 20px; }
}
@media(max-width:600px) {
  .tag-order .engraving-card { gap: 12px; }
  .tag-order .order-number-card .field > small,
  .tag-workspace > .quantity-field > small { font-size: 14px; line-height: 1.5; }
}

/* Clear add-tag hierarchy: description first, action alongside or beneath it. */
:is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
  grid-template-columns: max-content minmax(0,1fr);
  grid-template-rows: auto auto; gap: 8px 12px; align-content: start;
}
.order-footer .shared-add-tags > .add-tag-question { grid-column: 1 / -1; margin: 0; }
.order-footer .shared-add-tags > .additional-tags-help {
  grid-column: 2; grid-row: 2; align-self: center; text-align: left;
}
.order-footer .shared-add-tags > .additional-tags-help > .delivery-phrase { display: block; }
.order-footer .shared-add-tags > button {
  grid-column: 1; grid-row: 2; align-self: center;
  padding-inline: 16px; font-size: 14px; font-weight: 650; white-space: nowrap;
}
.delivery-panel > .shared-postage-note,
.delivery-panel .delivery-help { font-size: 14px; line-height: 1.5; color: var(--muted); }
@media(min-width:701px) {
  .site-header .hero-copy .header-description { font-size: 20px; line-height: 1.4; font-weight: 500; }
}
@media(max-width:600px) {
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto; gap: 8px;
  }
  .order-footer .shared-add-tags > .additional-tags-help { grid-column: 1; grid-row: 3; }
  .order-footer .shared-add-tags > button {
    grid-column: 1; grid-row: 2; width: 100%; justify-self: stretch;
    margin-top: 4px; min-height: 48px; height: auto;
  }
}

/* Shared A/B feedback for actions, disclosures and native radio choices.
   Geometry stays local; actions release, while open/selected controls stay inset. */
:root {
  --control-face: linear-gradient(160deg,#fff 0%,#e7edf0 55%,#cbd5dc 100%);
  --control-raised: inset 0 1px 1px #fff,inset 0 -1px 1px #6a7e8a35,0 3px 0 #94a4ae,0 4px 5px #20344318;
  --control-down: inset 0 2px 4px #20344325,0 1px 0 #94a4ae;
  --control-selected: linear-gradient(#3E709E,#28537C);
  --control-inset: inset 0 2px 4px #1D3D5D50,0 1px 0 #1D3D5D;
}
:is(#OrderForm,.remove-dialog) :is(button:not(.drag-handle, .tag-picker-image-button, .envelope-stamp, .button-primary, .remove-tag-order),summary.button-outline) {
  border: 1px solid #94a3ac; border-radius: 7px; color: #344e5b;
  background: var(--control-face); box-shadow: var(--control-raised);
  transform: translateY(-1px); transition: transform .12s,box-shadow .12s,background-color .12s;
}
:is(#OrderForm,.remove-dialog) :is(button:not(.drag-handle, .tag-picker-image-button, .envelope-stamp, .button-primary, .remove-tag-order),summary.button-outline):hover:not(:disabled):not([aria-disabled=true]) {
  border-color: #6f8794;
}
:is(#OrderForm,.remove-dialog) :is(button:not(.drag-handle, .tag-picker-image-button, .envelope-stamp, .button-primary, .remove-tag-order),summary.button-outline):active:not(:disabled):not([aria-disabled=true]) {
  transform: translateY(2px); box-shadow: var(--control-down);
}
:is(#OrderForm,.remove-dialog) button[aria-pressed=true],
#OrderForm details[open] > summary.button-outline {
  color: #fff; border-color: #244C75; background: var(--control-selected);
  transform: translateY(1px); box-shadow: var(--control-inset);
}
.remove-dialog .remove-dialog-actions .dialog-primary {
  color: #fff; background: var(--teal); border-color: #244C75;
}
.remove-dialog .remove-dialog-actions .dialog-primary:hover:not(:disabled) { background: #1D3D5D; }
:is(#OrderForm,.remove-dialog) button:disabled:not(.tag-picker-image-button, .envelope-stamp, .button-primary),
:is(#OrderForm,.remove-dialog) button[aria-disabled=true]:not(.tag-picker-image-button, .envelope-stamp, .button-primary) {
  color: #8b9198; background: #eef0f2; border-color: #dfe3e7;
  opacity: 1; box-shadow: none; transform: none; cursor: not-allowed;
}
:is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags { background: #244C75; border-color: #244C75; }
.order-footer .shared-add-tags > .add-tag-question { color: #fff; }
.order-footer .shared-add-tags > .additional-tags-help { color: #EDF2FB; }
@media(prefers-reduced-motion:reduce) {
  :is(#OrderForm,.remove-dialog) :is(button,summary.button-outline) { transition: none; }
}
@media(forced-colors:active) {
  :is(#OrderForm,.remove-dialog) :is(button,summary.button-outline) { border-color: ButtonText; }
  #OrderForm details[open] > summary.button-outline { outline: 2px solid Highlight; }
}

/* Material and delivery share the raised and pressed finishes of A/B. */
#OrderForm .material-card { aspect-ratio: auto; align-self: stretch; }
#OrderForm .material-fieldset { justify-content: center; }
#OrderForm .choice-buttons {
  --choice-gap: 12px;
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--choice-gap);
  min-width: 0;
}
#OrderForm .material-options {
  flex: 0 0 auto; grid-template-columns: minmax(0,1fr); grid-template-rows: repeat(2,1fr);
  width: min(100%, 152px); align-self: center;
}
#OrderForm .radio-choice {
  position: relative; display: grid; grid-template-columns: minmax(0,1fr); align-items: center;
  min-width: 0; min-height: 44px; padding: 5px 8px;
  font-size: 15px; font-weight: 700; line-height: 1.25; text-align: center; overflow-wrap: anywhere;
  border: 1px solid #94a3ac; border-radius: 7px; color: #344e5b; cursor: pointer;
  background: var(--control-face); box-shadow: var(--control-raised);
  transform: translateY(-1px);
  transition: translate .34s cubic-bezier(.22,.7,.25,1), transform .12s, box-shadow .12s;
}
#OrderForm .material-choice .material-caption { position: static; display: block; color: inherit; }
#OrderForm .material-choice .material-name { font: inherit; }
#OrderForm .radio-choice input {
  position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0;
}
#OrderForm .radio-choice:hover:not(:has(input:checked, input:disabled)) { border-color: #6f8794; }
#OrderForm .radio-choice:active:not(:has(input:disabled)) {
  transform: translateY(2px); box-shadow: var(--control-down);
}
#OrderForm .radio-choice:has(input:checked) {
  color: var(--ink); border-color: #356DA6;
  outline: 2px solid #356DA6; outline-offset: 2px;
  z-index: 1;
}
#OrderForm .radio-choice:has(input:focus-visible) { outline: var(--focus); outline-offset: 3px; z-index: 2; }
#OrderForm .radio-choice:has(input:disabled) { opacity: .65; cursor: not-allowed; }
#OrderForm .choice-buttons:has(input:checked) > .radio-choice:not(:has(input:checked)) {
  color: #56656e;
  background: linear-gradient(160deg,#fff 0%,#eef2f4 55%,#dfe7eb 100%);
}
/* Swap equal-sized slots visually while keeping the native radios in DOM order. */
#OrderForm .choice-buttons:has(> .radio-choice:last-child input:checked) {
  --choice-swap: calc(100% + var(--choice-gap));
}
#OrderForm .choice-buttons:has(> .radio-choice:last-child input:checked) > .radio-choice:first-child {
  translate: 0 var(--choice-swap);
}
#OrderForm .choice-buttons > .radio-choice:last-child:has(input:checked) {
  translate: 0 calc(-1 * var(--choice-swap));
}
@media(max-width:850px) {
  #OrderForm .choice-buttons:not(.material-options):has(> .radio-choice:last-child input:checked) > .radio-choice:first-child {
    translate: var(--choice-swap) 0;
  }
  #OrderForm .choice-buttons:not(.material-options) > .radio-choice:last-child:has(input:checked) {
    translate: calc(-1 * var(--choice-swap)) 0;
  }
}
@media(max-width:600px) {
  #OrderForm .radio-choice { font-size: 14px; }
  #OrderForm .material-options { width: max-content; max-width: 100%; }
  #OrderForm .material-choice { padding-inline: 10px; }
}
@media(min-width:851px) {
  #OrderForm .material-options { width: min(100%, 180px); }
  #OrderForm .choice-buttons:not(.material-options) {
    grid-template-columns: minmax(0,1fr); grid-template-rows: repeat(2,1fr);
    width: min(100%, 180px);
  }
  #OrderForm .radio-choice { min-height: 52px; font-size: 18px; }
}
@media(prefers-reduced-motion:reduce) {
  #OrderForm .radio-choice { transition: none; }
}
@media(forced-colors:active) {
  #OrderForm .radio-choice { border-color: ButtonText; }
  #OrderForm .radio-choice:has(input:checked) {
    border-color: Highlight; outline-color: Highlight;
  }
}
/* Keep the delivery reminder together as two phrases, breaking only when needed.
   max-width allows each phrase to reflow at extreme zoom or very small widths. */
.additional-tags-help > .delivery-phrase { display: inline-block; max-width: 100%; }

/* Heading and tagline use the same full-width text box and inherited alignment. */
.site-header .hero-copy .header-description {
  width: 100%; max-width: none; margin-inline: 0; text-align: inherit;
}

/* One-line heading: fit the text to its own column, not the overall viewport. */
.site-header .hero-copy h1.form-heading {
  white-space: nowrap; font-size: clamp(10px,4.2vw,24px); line-height: 1.25;
}
@supports (font-size: 1cqi) {
  .site-header .hero-copy h1.form-heading { font-size: min(24px,5.2cqi); }
}
/* Give the account its own row before the enlarged logo/text become crowded. */
@media(max-width:1180px) {
  .site-header .standalone-account { flex-basis: 100%; }
}
@media(max-width:700px) {
  .site-header .standalone-account { flex: 0 1 auto; }
}

/* Emphasise the shared address without changing the phrase's preferred wrapping. */
.additional-tags-help .same-delivery-address { text-decoration: underline; text-underline-offset: 3px; }

/* The Add label and quantity numeral share a font-size token at every breakpoint. */
:root { --tag-control-font-size: 22px; }
.tag-workspace .quantity-control input,
.order-footer .shared-add-tags > button { font-size: var(--tag-control-font-size); }
.order-footer .shared-add-tags > button { min-width: 84px; }
@media(max-width:600px) { :root { --tag-control-font-size: 20px; } }

/* The insertion card shares the numbered order-form identity and divider. */
:is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
  grid-column: 2; display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 18px;
  margin: 0; padding: 18px; border: 1px solid #244C75; border-radius: 12px;
  background: #244C75;
}
.shared-add-tags > .order-position-card {
  display: flex; align-items: center; gap: 18px; min-width: 0;
  flex: 1 1 320px;
}
.order-footer .shared-add-tags > button {
  flex: 0 0 auto; width: auto; height: auto; min-height: 48px;
  margin: 0 0 0 auto; padding: 10px 16px; font-size: 18px;
}
@media(min-width:601px) and (max-width:850px) {
  .shared-add-tags > .order-position-card { gap: 12px; }
}
@media(max-width:600px) {
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
    padding: clamp(10px,3vw,12px); gap: 12px;
  }
  .shared-add-tags > .order-position-card { gap: clamp(8px,2.2vw,12px); flex-basis: 100%; }
  .shared-add-tags .order-position-title { white-space: normal; }
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags > button { width: auto; flex: 0 0 auto; }
}

/* Use the full footer width on small screens. */
@media(max-width:850px) {
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags { grid-column: 1; }
}

.shared-add-tags .order-position-title { white-space: normal; }

/* Keep the destination phrase together on its own line when space permits. */
.shared-add-tags .delivery-address-line { display: block; text-wrap: balance; }
@media(max-width:600px) {
  /* Natural flow keeps the raised button below the text even when it wraps. */
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags { row-gap: 0; }
}

/* Keep the wide-screen action in its own right-hand column, vertically centred. */
@media(min-width:851px) {
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
    display: grid; grid-template-columns: minmax(0,1fr) max-content;
    grid-template-rows: auto; align-content: center; align-items: center; column-gap: 12px;
  }
  .shared-add-tags > .order-position-card { grid-column: 1; grid-row: 1; }
  .order-footer .shared-add-tags > button { grid-column: 2; grid-row: 1; align-self: center; }
  .shared-add-tags .order-position-title,
  .shared-add-tags .order-position-instruction { overflow-wrap: anywhere; }
}
@media(min-width:851px) and (max-width:1100px) {
  .shared-add-tags > .order-position-card { gap: 10px; }
  .shared-add-tags .order-position-number { font-size: 48px; }
  .shared-add-tags .order-position-card > div { padding-left: 10px; }
  .order-footer .shared-add-tags > button { font-size: 16px; padding-inline: 10px; }
}
/* Full wording fits comfortably below the text in a compact mobile button. */
@media(max-width:600px) {
  :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags > button {
    min-height: 38px; min-width: 0; padding: 6px 12px;
    font-size: 16px; line-height: 1.25; max-width: 100%; white-space: normal;
  }
}

#OrderForm { --delivery-column-gap: 18px; }
.order-completion {
  --envelope-inset: clamp(8px, 1.1vw, 14px);
  --delivery-option-gap: 6px;
  --delivery-option-pad: 4px;
}
.envelope-face {
  --envelope-address-room: 166px;
  --envelope-address-start: 30%;
  position: relative; display: grid;
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: clamp(calc(30% + 0.6 * var(--envelope-inset) + 0.6px), calc(100% - var(--envelope-address-room)), 46%) minmax(0,1fr);
  aspect-ratio: 3 / 2;
  padding: var(--envelope-inset);
  border: 1px solid #cbd1d4; border-radius: 3px;
  background: linear-gradient(150deg,#fff 45%,#f4f5f5);
  box-shadow: 0 2px 0 #d9dee0, 2px 6px 10px #20344329;
}
.envelope-face > .field {
  grid-column: 1; grid-row: 2; min-height: 0;
  margin-inline-start: var(--envelope-address-start);
}
.envelope-stamp {
  position: absolute; top: var(--envelope-inset); right: var(--envelope-inset);
  /* Include the envelope's two 1px borders in the stamp's height calculation. */
  height: calc(30% + 0.6px); padding: 0; border: 0; background: transparent; appearance: none; cursor: pointer;
}
.envelope-stamp img { display: none; width: auto; height: 100%; }
#OrderForm:not(:has(:is(#postageFirst, #postageSecond):checked)) .envelope-unselected,
#OrderForm:has(#postageFirst:checked) .envelope-first-class,
#OrderForm:has(#postageSecond:checked) .envelope-second-class { display: block; }
@media(max-width:500px) {
  .envelope-face { --envelope-address-room: 112px; --envelope-address-start: 15%; }
}
@media(max-width:350px) {
  .order-completion { --envelope-inset: 5px; }
  .envelope-face { --envelope-address-start: 10%; }
}
.postage-memory { border: 0; padding: 0; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.postage-error { color: var(--danger); margin: 12px 0 0; }
#OrderForm .delivery-choice { display: block; }
#OrderForm .delivery-heading { margin-bottom: 14px; }
#OrderForm .delivery-options {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  grid-auto-rows: 1fr; gap: var(--delivery-option-gap); border-radius: 9px;
}
#OrderForm .delivery-choice .delivery-options { padding: var(--delivery-option-pad); }
#OrderForm .delivery-options label {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 6px 10px; border: 1px solid #a9bbc5; border-radius: 6px;
  color: var(--ink); background: #fff; font-weight: 650; cursor: pointer;
}
#OrderForm .delivery-choice .delivery-options label {
  position: relative;
  transition: translate 380ms cubic-bezier(.2,.75,.25,1);
}
#OrderForm .delivery-choice .delivery-options label > span { white-space: nowrap; }
#OrderForm .delivery-choice .delivery-options label:has(input:checked) { z-index: 1; }
html:has(.choice-spotlight[open]) { overflow: hidden; scrollbar-gutter: stable; }
#OrderForm .choice-spotlight {
  position: fixed; inset: auto;
  top: var(--choice-top); left: var(--choice-left); width: var(--choice-width);
  max-width: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; box-shadow: none;
}
#OrderForm .choice-spotlight > .delivery-options {
  width: 100%; background: #e8eef0; box-shadow: 0 4px 12px #20344366;
}
@media(min-width:601px) {
  #OrderForm .delivery-choice .delivery-options:has(#deliveryCustomer:checked) label[for="deliveryCustomer"] {
    translate: calc(-100% - var(--delivery-option-gap)) 0;
  }
  #OrderForm .delivery-choice .delivery-options:has(#deliveryCustomer:checked) label[for="deliveryShop"] {
    translate: calc(100% + var(--delivery-option-gap)) 0;
  }
}
#OrderForm .delivery-options label:has(input:checked) {
  border-color: #356DA6; outline: 2px solid #356DA6; outline-offset: 1px;
}
#OrderForm .delivery-options label:has(input:focus-visible) { outline: var(--focus); outline-offset: 2px; }
#OrderForm .delivery-options label:has(input:disabled) { opacity: .7; cursor: not-allowed; }
#OrderForm .delivery-options input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: #356DA6; }
#OrderForm .delivery-options small { display: block; font-size: 12px; font-weight: 400; }
.delivery-postage { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.delivery-postage sup { line-height: 0; }
#postageError, #postageMemory { margin: 6px 0 0; }
@media(max-width:600px) {
  #OrderForm .delivery-options input { width: 14px; height: 14px; }
  #OrderForm .delivery-choice .delivery-options { grid-template-columns: minmax(0,1fr); padding: 0; }
  #OrderForm .delivery-choice .delivery-options:has(#deliveryShop:checked) label[for="deliveryShop"] {
    translate: 0 calc(100% + var(--delivery-option-gap));
  }
  #OrderForm .delivery-choice .delivery-options:has(#deliveryShop:checked) label[for="deliveryCustomer"] {
    translate: 0 calc(-100% - var(--delivery-option-gap));
  }
  #OrderForm .delivery-choice small { color: var(--muted); margin-top: 2px; }
  #OrderForm .delivery-address-entry { margin-top: 12px; }
  #OrderForm .delivery-postage .delivery-options { display: flex; flex-wrap: wrap; }
  #OrderForm .delivery-postage .delivery-options label {
    flex: 1 0 min(100%, 8.5em);
    min-width: 0;
    justify-content: center;
    padding-inline: 5px;
    gap: 5px;
    font-size: .875rem;
    line-height: 1.3;
  }
}
@media(max-width:300px) {
  #OrderForm .delivery-choice .delivery-options label { padding-inline: 8px; }
}
@media(prefers-reduced-motion:reduce) {
  #OrderForm .delivery-choice .delivery-options label { transition: none; }
}

/* One final panel pairs the order-copy email with the primary action. */
#OrderForm .submit-panel {
  --submit-panel-padding: 24px;
  --submit-panel-border: 1px;
  display: grid; grid-template-columns: minmax(0,1.65fr) minmax(175px,1fr);
  align-items: end; gap: 12px 18px;
  margin-top: 18px; padding: var(--submit-panel-padding);
  border: var(--submit-panel-border) solid var(--line); border-radius: var(--radius-panel);
  color: var(--ink); background: var(--steel-light); box-shadow: var(--shadow);
}
#OrderForm .copy-email-field > .form-heading { font-size: 16px; font-weight: 650; line-height: 1.35; }
#OrderForm .copy-email-field > .form-heading > span { font-weight: 400; }
#OrderForm .copy-email-field .email-purpose {
  display: inline-block; white-space: nowrap; font-weight: 400;
}
#OrderForm .copy-email-field > input { height: 56px; min-height: 56px; }
#OrderForm #EmailAddX::placeholder { font-size: .8em; }
#OrderForm #EmailAddX:focus::placeholder { color: transparent; opacity: 0; }
#OrderForm .submit-panel > :is(.security-status,#emailError) {
  grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted);
}
#OrderForm .submit-panel > #emailError { color: var(--danger); }
#OrderForm #SubmitButton {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-width: 0; min-height: 58px; padding: 10px 20px; gap: 14px;
  border: 1px solid #244C75; border-radius: 11px;
  color: #fff; background: linear-gradient(180deg,#3E709E 0%,#28537C 58%,#1D3D5D 100%); text-align: center;
  box-shadow: inset 0 1px 0 #ffffff50,0 4px 0 #1D3D5D,0 8px 16px #20344326;
  font-size: 19px; font-weight: 700; line-height: 1.2;
  transition: background .12s,box-shadow .12s,transform .12s;
}
#OrderForm #SubmitButton::before {
  content: ''; display: block; flex: none;
  width: 28px; height: 28px; border: 0; border-radius: 0; background-color: currentColor;
  -webkit-mask: url("assets/review-details.svg") center / contain no-repeat;
  mask: url("assets/review-details.svg") center / contain no-repeat;
}
#OrderForm #SubmitButton[aria-busy="true"]::before { content: '…' / ''; }
#OrderForm #SubmitButton:not(:disabled):hover { background: linear-gradient(180deg,#4A7FB0,#315F89 58%,#264E73); }
#OrderForm #SubmitButton:not(:disabled):active {
  transform: translateY(3px); background: linear-gradient(#28537C,#1D3D5D);
  box-shadow: inset 0 2px 5px #102f4060,0 1px 0 #1D3D5D;
}
#OrderForm #SubmitButton:focus-visible { outline: var(--focus); outline-offset: 3px; }
#OrderForm #SubmitButton:disabled { opacity: 1; }
#OrderForm #SubmitButton:disabled:not([aria-busy="true"]) {
  border-color: var(--line); color: var(--muted); background: #e4e9ed; box-shadow: none;
}
#OrderForm #SubmitButton:disabled:not([aria-busy="true"])::before { border-color: currentColor; }
@media(max-width:700px) {
  #OrderForm .submit-panel { grid-template-columns: minmax(0,1fr); padding: 18px; }
}
@media(prefers-reduced-motion:reduce) { #OrderForm #SubmitButton { transition: none; } }
@media(forced-colors:active) {
  #OrderForm #SubmitButton { border-color: ButtonText; }
  #OrderForm #SubmitButton:disabled:not([aria-busy="true"]) { color: GrayText; border-color: GrayText; }
}

/* Selection cards are controls: suppress touch text/image callouts while keeping page scrolling. */
.shape-card, .material-choice { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }

/* Approved form sizes: widths include padding/borders and use each input's digit metrics. */
#OrderForm #StoreNoXX { width: 6ch; font-size: 24px; }
#OrderForm .order-number-row .field > input { width: 10ch; font-size: 24px; }
#OrderForm .quantity-control input { width: 5ch; }
:is(.order-number-card,.shared-add-tags) .order-position-title { font-size: 24px; }
@media(min-width:601px) and (max-width:850px) {
  :is(.order-number-card,.shared-add-tags) .order-position-title { font-size: 22px; }
}
@media(max-width:600px) {
  #OrderForm { --mobile-order-title-size: clamp(18px,4.2vw,22px); }
  :is(.order-number-card,.shared-add-tags) .order-position-title { font-size: var(--mobile-order-title-size); white-space: normal; }
}

/* Compact number rows: label on the left, its input to the right. */
:is(#OrderForm,.review-summary-details) .standalone-account .field,
:is(#OrderForm,.review-summary-details) .order-number-row > .field {
  display: grid; grid-template-columns: minmax(0,max-content) max-content;
  align-items: center; justify-content: end; column-gap: 12px; row-gap: 8px;
}
:is(#OrderForm,.review-summary-details) .standalone-account .field > .form-heading,
:is(#OrderForm,.review-summary-details) .order-number-row > .field > .form-heading {
  grid-column: 1; grid-row: 1; margin: 0; padding-right: 0;
  overflow-wrap: anywhere; text-align: right;
}
:is(#OrderForm,.review-summary-details) .standalone-account .field > input,
:is(#OrderForm,.review-summary-details) .order-number-row > .field > input { grid-column: 2; grid-row: 1; }

/* Shared compact height; script raises this together if a label needs more room. */
#OrderForm { --compact-card-height: 72px; }
:is(#OrderForm,.review-summary-details) .site-header .standalone-account,
:is(#OrderForm,.review-summary-details) .order-number-card > .order-position-card,
:is(#OrderForm,.review-summary-details) .order-number-card > .order-number-row,
:is(#OrderForm,.review-summary-details) .tag-workspace > .quantity-field {
  min-height: var(--compact-card-height); height: auto;
  align-self: start; align-content: center;
}
#OrderForm .tag-workspace > .quantity-field {
  display: grid; grid-template-columns: max-content minmax(0,1fr);
  grid-template-rows: auto auto; column-gap: 10px; row-gap: 3px;
}
#OrderForm .tag-workspace > .quantity-field > .quantity-control {
  grid-column: 1; grid-row: 1 / 3; align-self: center;
}
#OrderForm .tag-workspace > .quantity-field > label {
  grid-column: 2; grid-row: 1; align-self: end; margin: 0;
}
#OrderForm .tag-workspace > .quantity-field > small {
  grid-column: 2; grid-row: 2; align-self: start; margin: 0; overflow-wrap: anywhere;
}

/* A 35% lower baseline: retain input readability and let tall content grow together. */
:is(#OrderForm,.review-summary-details) .site-header .standalone-account,
:is(#OrderForm,.review-summary-details) .order-number-card > .order-position-card,
:is(#OrderForm,.review-summary-details) .order-number-card > .order-number-row,
:is(#OrderForm,.review-summary-details) .tag-workspace > .quantity-field { padding: 6px 12px; }
:is(#OrderForm,.review-summary-details) .standalone-account .field > input,
:is(#OrderForm,.review-summary-details) .order-number-row > .field > input {
  height: 56px; min-height: 56px; padding-block: 6px;
}
#OrderForm .order-number-card > .order-position-card { gap: 12px; }
#OrderForm .order-number-card .order-position-number { font-size: 52px; }
#OrderForm .order-number-card .order-position-card > div { padding-left: 12px; }
#OrderForm .order-number-card .order-position-title { margin-bottom: 2px; }
#OrderForm :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
  padding: 6px 12px; gap: 10px; min-height: 72px;
}
#OrderForm .shared-add-tags .order-position-card > div { padding-left: 12px; }
#OrderForm .shared-add-tags .order-position-title { margin-bottom: 2px; }
@media(max-width:600px) {
  #OrderForm .shared-add-tags .order-position-card > div {
    flex: 1 1 0;
    container-type: inline-size;
    padding-left: 8px;
  }
  #OrderForm .shared-add-tags .order-position-title {
    font-size: clamp(.8125rem, 8.8cqi, var(--mobile-order-title-size));
  }
}

/* Put the Add action in the leading column beside the divider. */
#OrderForm :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
  display: grid; grid-template-columns: max-content minmax(0,1fr);
  grid-template-rows: auto; align-content: start; align-items: start;
  min-height: var(--compact-card-height); height: auto; align-self: start;
  column-gap: 12px; row-gap: 0;
}
#OrderForm .shared-add-tags > .order-position-card {
  grid-column: 2; grid-row: 1; align-self: start; margin: 0;
}
#OrderForm :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags > button {
  grid-column: 1; grid-row: 1; align-self: start; justify-self: start;
  margin: 0; width: auto; min-width: 0; min-height: 44px;
  padding: 8px 12px; white-space: nowrap;
}
@media(max-width:600px) {
  #OrderForm :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
    column-gap: 8px;
    padding-inline-end: 7px;
  }
}

/* Shorter number boxes keep the numeral centered without reducing its font size. */
:is(#OrderForm,.review-summary-details) .standalone-account .field > input,
:is(#OrderForm,.review-summary-details) .order-number-row > .field > input,
:is(#OrderForm,.review-summary-details) .quantity-control input {
  height: 44px; min-height: 44px; padding-block: 3px;
  line-height: normal; text-align: center;
}
#OrderForm .tag-workspace .quantity-control { height: 54px; align-items: center; }
/* The action and the badge/text share the same vertical center line. */
#OrderForm :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags {
  align-content: center; align-items: center;
}
#OrderForm .shared-add-tags > .order-position-card { align-self: center; }
#OrderForm :is(.tag-order,.detached-add-order) .order-footer > .shared-add-tags > button {
  align-self: center; height: 44px; min-height: 44px;
}
/* Keep the account beside and vertically centered against the logo on wide screens. */
@media(min-width:1181px) {
  :is(#OrderForm,.review-summary-details) .site-header .hero-branding {
    display: grid; grid-template-columns: 360px minmax(0,1fr) minmax(210px,260px);
    align-items: center; gap: 24px;
  }
  :is(#OrderForm,.review-summary-details) .site-header .standalone-account { align-self: center; }
}

/* White account frame uses the same outer gutter as the order-number panel below. */
:is(#OrderForm,.review-summary-details) .site-header .account-outer-card {
  width: 100%; min-width: 0; flex: 0 1 310px; align-self: center;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: #fff; box-shadow: var(--shadow);
}
:is(#OrderForm,.review-summary-details) .site-header .account-outer-card .standalone-account {
  width: 100%; margin: 0; min-width: 0;
}
@media(min-width:1181px) {
  :is(#OrderForm,.review-summary-details) .site-header .hero-branding {
    grid-template-columns: 360px minmax(0,1fr) minmax(260px,310px);
  }
}
@media(max-width:1180px) {
  :is(#OrderForm,.review-summary-details) .site-header .account-outer-card { flex-basis: 100%; }
}
@media(max-width:700px) {
  :is(#OrderForm,.review-summary-details) .site-header .account-outer-card { flex: 0 1 auto; padding: 18px; }
}
/* Keep Quantity full width in the stack, with its controls right aligned. */
#OrderForm .tag-workspace > .quantity-field {
  grid-template-columns: minmax(0,max-content) max-content;
  justify-content: end; column-gap: 8px;
  margin: 16px 0 0; width: 100%;
}
#OrderForm .tag-workspace > .quantity-field > label,
#OrderForm .tag-workspace > .quantity-field > small { grid-column: 1; text-align: right; }
#OrderForm .tag-workspace > .quantity-field > .quantity-control { grid-column: 2; }

/* Center the heading in its available column; tighten the stacked mobile pair. */
:is(#OrderForm,.review-summary-details) .site-header .hero-copy { text-align: center; }
@media(max-width:700px) {
  :is(#OrderForm,.review-summary-details) .site-header .hero-copy .header-description { margin-top: 4px; }
}

/* Use the raised, underlined o in the short number labels. */
.number-abbreviation sup {
  font-size: .65em; line-height: 0; vertical-align: super; margin-inline-start: 1px;
  text-decoration: underline; text-underline-offset: 1px;
}
:is(#OrderForm,.review-summary-details) .standalone-account .field > .form-heading,
:is(#OrderForm,.review-summary-details) .order-number-row > .field > .form-heading { white-space: nowrap; overflow-wrap: normal; }

/* Keep side guidance beside Tag Text, anchored to the card's upper-right corner. */
#OrderForm .engraving-header {
  grid-template-columns: minmax(0,1fr) minmax(0,max-content);
  align-items: center; column-gap: 8px;
}
#OrderForm .engraving-footer .print-side-help {
  grid-column: 2; grid-row: 1; justify-self: end; align-self: start;
  margin: 0; padding: 2px 4px 0 0; text-align: right; font-size: 13px;
}
#OrderForm .engraving-header > .form-heading { grid-column: 1; grid-row: 1; }
#OrderForm .engraving-footer .print-side-help > span { display: block; }
#OrderForm .engraving-footer .print-side-help > span:last-child { font-size: .93em; }

/* Consistent steel frame with a pale inset writing surface and clear focus. */
#OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]) {
  border: 2px solid #879ba7; border-radius: 8px;
  border-top-color: #a7b7c0; border-bottom-color: #6c8391;
  background: linear-gradient(180deg,#fff 0%,#fff 60%,#f2f6f8 100%);
  box-shadow: inset 0 1px 0 #fff,inset 0 2px 4px #2034430d,
    0 2px 0 #b4c1c9,0 3px 6px #20344312;
}
#OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]):focus,
#OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]):focus-within,
#OrderForm .engraving-scroll.is-keyboard-target {
  border-color: #356DA6; outline: 3px solid #356DA6; outline-offset: 2px;
  background: #fff;
}
#OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]):disabled,
#OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"])[readonly]:not([data-custom-keypad-entry]) {
  background: #edf1f3; box-shadow: inset 0 1px 3px #20344312;
}
#OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]):disabled { cursor: not-allowed; opacity: .75; }
@media(forced-colors:active) {
  #OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]) { background: Canvas; border-color: ButtonText; box-shadow: none; }
  #OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]):focus,
  #OrderForm :is(.number-box, .engraving-scroll, #PostalAdd, #EmailAddX, #AnyNotesX, [data-field="AnyNotesX"]):focus-within,
  #OrderForm .engraving-scroll.is-keyboard-target { outline-color: Highlight; border-color: Highlight; }
}

/* Approved label scale, consistent across desktop and mobile. */
:is(#OrderForm,.review-summary-details) .standalone-account .field > .form-heading,
:is(#OrderForm,.review-summary-details) .order-number-row > .field > .form-heading,
:is(#OrderForm,.review-summary-details) .quantity-field > .form-heading,
:is(#OrderForm,.review-summary-details) .choice-fieldset > legend.form-heading,
:is(#OrderForm,.review-summary-details) .engraving-header > .form-heading { font-size: 20px; }
#OrderForm .quantity-control input { font-size: 24px; }

/* Address and tag text share the same readable type scale and line height. */
#OrderForm { --entered-tag-text-size: 20px; }
#OrderForm .engraving-row > .tag-text-line,
#OrderForm #PostalAdd { font-size: var(--entered-tag-text-size); line-height: 1.4; }
#OrderForm #PostalAdd { font-weight: 600; }
#OrderForm .engraving-row > .tag-text-line { letter-spacing: var(--tag-letter-spacing, .045em); }
#OrderForm .envelope-face #PostalAdd,
#OrderForm .envelope-face #PostalAdd[readonly]:not([data-custom-keypad-entry]) {
  border-radius: 0;
  height: 100%; min-height: 0; resize: none; overflow-y: auto;
  background: transparent; box-shadow: none; border: 1px solid transparent;
}
#OrderForm .envelope-face #PostalAdd::placeholder { color: #6d7780; }
#OrderForm .envelope-face { background: #fff; }
#OrderForm:not(:has(.delivery-choice input:checked)) .envelope-face #PostalAdd[readonly] {
  background: transparent; box-shadow: none;
}
@media(max-width:500px) {
  #OrderForm .envelope-face #PostalAdd { font-size: 16px; line-height: 1.25; padding: 5px 8px; }
}
@media(max-width:350px) {
  #OrderForm .envelope-face #PostalAdd { line-height: 1.05; padding-block: 2px; }
}
#OrderForm .envelope-face #PostalAdd:focus {
  max-height: var(--address-editor-space, none);
  background: transparent; border-color: transparent;
  outline: none;
}
#OrderForm .envelope-face:has(#PostalAdd[aria-invalid="true"]) { border-color: var(--danger); }
@media(forced-colors:active) {
  #OrderForm .delivery-options label:has(input:checked) { outline-color: Highlight; }
}
@media(max-width:600px) { #OrderForm { --entered-tag-text-size: 18px; } }
/* Quieter routine feedback; genuine storage/setup errors remain available. */
#OrderForm .postage-memory:empty,
#OrderForm #securityStatus:empty { display: none; }
/* Equal-height footer actions keep wrapped rows close without crowding the text. */
.site-footer .footer-contact { row-gap: 0; }
.site-footer .footer-contact > a,
.site-footer .footer-contact > .footer-clear-details {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 3px 0; line-height: 1.4;
}

/* Small inline outlines share link colour; text remains the accessible link name. */
.site-footer .footer-contact > a { gap: 6px; white-space: nowrap; }
.site-footer .footer-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; }

/* Additional-order removal belongs to the numbered identity card. */
#OrderForm .order-number-card > .order-position-card { position: relative; }
#OrderForm .order-number-card > .order-position-card:has(> .remove-tag-order) {
  padding-right: 12px;
}
/* Only the upper text lines avoid the X; the caption keeps the full column below it. */
#OrderForm .order-number-card > .order-position-card > div { display: flow-root; flex: 1 1 0%; min-width: 0; }
#OrderForm .order-number-card > .order-position-card:has(> .remove-tag-order) > div::before {
  content: ""; float: right; width: 36px; height: 36px;
}
#OrderForm .order-position-card > .remove-tag-order {
  position: absolute; top: 4px; right: 4px; margin: 0;
  width: 36px; height: 36px; min-height: 36px;
  color: #fff; border: 1px solid #ffffff66; background: #ffffff0d;
}
#OrderForm .order-position-card > .remove-tag-order:hover:not(:disabled) {
  background: #ffffff26; border-color: #ffffffb3;
}
#OrderForm .order-position-card > .remove-tag-order:focus-visible {
  outline: 3px solid #fff; outline-offset: 2px;
}

/* Reversible picker trial: no selection starts with the familiar full grid. */
#OrderForm .tag-picker-trial { --tag-picker-columns: 4; --tag-picker-heading-size: 20px; }
#OrderForm .tag-picker-trial .tag-config > .choice-fieldset > legend {
  font: inherit; font-size: var(--tag-picker-heading-size); font-weight: 650; line-height: 1.5;
  padding-bottom: 12px; color: var(--ink); white-space: nowrap;
}
/* Share the row height with Bone in the full grid and the selected tile in the compact grid. */
#OrderForm .tag-picker-trial .shape-grid > .shape-card > .shape-card-inner { height: 100%; }
#OrderForm .tag-picker-trial .material-card { padding: 0; transform: none; }
#OrderForm .is-tag-picker-collapsed .shape-grid { position: relative; }
#OrderForm .tag-picker-image-button {
  position: absolute; inset: 0; z-index: 2; width: 100%;
  display: flex; justify-content: flex-end; align-items: flex-start;
  padding: 8px; border: 0; border-radius: 12px; background: transparent; color: #244C75;
}
#OrderForm .tag-picker-image-button > span {
  display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid currentColor; border-radius: 6px; background: #fff;
}
#OrderForm .tag-picker-image-button > span::before {
  content: ""; width: 9px; height: 9px; margin-top: -4px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@media(min-width:851px) {
  #OrderForm .tag-picker-image-button > span { width: 32px; height: 32px; }
  #OrderForm .tag-picker-image-button > span::before { width: 11px; height: 11px; }
}
@media (hover: hover) and (pointer: fine) {
  #OrderForm .tag-picker-image-button:hover:not(:disabled) { box-shadow: inset 0 0 0 2px currentColor; }
}
#OrderForm .tag-picker-image-button:focus-visible { outline: var(--focus); outline-offset: 4px; }
#OrderForm .tag-picker-trial.is-tag-picker-collapsed .tag-config {
  display: grid; grid-template-columns: repeat(var(--tag-picker-columns),minmax(0,1fr));
  gap: 8px 12px; align-items: stretch;
}
#OrderForm .tag-picker-trial.is-tag-picker-collapsed .tag-config > .choice-fieldset {
  grid-column: 1; grid-row: 1; min-width: 0;
  display: flex; flex-direction: column;
}
#OrderForm .tag-picker-trial.is-tag-picker-collapsed .shape-grid {
  flex: 1; grid-template-columns: minmax(0,1fr);
}
#OrderForm .tag-picker-trial.is-tag-picker-collapsed .tag-config > .material-card {
  grid-column: 2; grid-row: 1;
  padding-top: calc(1.5 * var(--tag-picker-heading-size) + 12px);
}
.tag-picker-ghost { pointer-events: none; }
@media(max-width:850px) { #OrderForm .tag-picker-trial { --tag-picker-columns: 3; } }
@media(max-width:600px) {
  #OrderForm .tag-picker-trial { --tag-picker-columns: 2; --tag-picker-heading-size: clamp(16px,5.5vw,20px); }
}

/* Let the active number card grow around the compact keypad. */
#OrderForm {
  --keypad-letter-size: 17px;
  --keypad-action-size: 14px;
  --keypad-motion-duration: 540ms;
  --keypad-motion-easing: cubic-bezier(.35,.1,.25,1);
}
:is(#OrderForm,.review-summary-details) .standalone-account:has(> #rememberStatus:empty) > .account-grid,
:is(#OrderForm,.review-summary-details) .order-number-row > .field {
  min-height: calc(var(--compact-card-height) - 14px);
  align-content: center;
}
@media (min-width: 1181px) and (any-pointer: coarse) {
  :is(#OrderForm,.review-summary-details) .site-header .account-outer-card { align-self: start; }
}
#OrderForm .number-keypad {
  --keypad-tap-face: #dce8ed;
  --keypad-tap-border: #7495a3;
  grid-column: 1 / -1; grid-row: auto;
  width: 100%; min-width: 0;
}
/* Leave room for the touch caret handle below the number field. */
#OrderForm .number-keypad-content { padding-block: 12px 3px; }
#OrderForm .tag-workspace > .quantity-field:has(> .number-keypad:not([hidden])) {
  grid-template-columns: minmax(0,1fr) max-content;
}
#OrderForm .number-keypad.is-sliding { overflow: clip; }
#OrderForm .number-keypad-keys {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)) minmax(0,1.3fr); gap: 8px 6px;
}
#OrderForm .number-keypad-keys > button {
  width: 100%; min-width: 0; min-height: 38px; margin: 0; padding: 3px 0;
  font-size: 19px; font-weight: 700; touch-action: manipulation;
}
#OrderForm .number-keypad-keys > .number-keypad-done {
  background: linear-gradient(#3E709E,#28537C); border: 1px solid #28537C; border-radius: 7px;
  box-shadow: inset 0 1px 1px #ffffff38,0 3px 0 #1D3D5D;
  color: #fff; font-size: clamp(12px, 4vw, 16px);
}
#OrderForm .number-keypad-keys > .number-keypad-done:active:not(:disabled) {
  transform: translateY(2px); box-shadow: var(--control-inset);
}
#OrderForm .number-keypad-keys > button:focus-visible { outline: var(--focus); outline-offset: 1px; }
#OrderForm .number-keypad-error { margin: 8px 0 0; color: #8e2119; font-size: 14px; }
#OrderForm .number-keypad-error, #validationNoticeMessage, #formAlertText { white-space: pre-line; }
@media (max-width: 480px) {
  #validationNoticeMessage.account-number-help { font-size: clamp(13px, calc(4.5vw + 0.5px), 17px); }
}
@media (max-width: 300px) {
  #OrderForm .number-keypad-keys { column-gap: 3px; }
}

#OrderForm .notes-keyboard {
  --keypad-key-border: #3d4149;
  --keypad-tap-face: #515865;
  --keypad-tap-border: #a2aab5;
  padding: 8px 5px; border: 1px solid #0b0c0f; border-radius: var(--radius-panel);
  background: #0b0c0f; box-shadow: var(--shadow);
}
#OrderForm :is(.number-keypad, .notes-keyboard) button:is([data-keypad-key], [data-notes-key]) {
  display: grid; place-items: center; text-align: center;
}
#OrderForm .notes-keyboard button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#OrderForm .notes-keyboard :is(.notes-keyboard-done, button[aria-pressed="true"]) {
  border-color: #a4c1c7;
}
#keypadPreview {
  position: fixed; z-index: 40; inset: var(--key-preview-top) auto auto var(--key-preview-left);
  width: var(--key-preview-width); height: 50px; margin: 0; padding: 0;
  display: grid; place-items: center; overflow: visible; pointer-events: none; visibility: hidden;
  border: 1px solid #a2aab5; border-radius: 9px; background: #525a66;
  color: #fff; font-size: 30px; font-weight: 700; line-height: 1;
  box-shadow: 0 3px 10px #0006;
}
#keypadPreview.is-visible { visibility: visible; }
#keypadPreview[popover]:not(:popover-open) { display: none; }
#keypadPreview::after {
  content: ''; position: absolute; inset: 100% auto auto var(--key-preview-stem);
  width: 14px; height: 8px; transform: translateX(-50%); background: inherit;
  clip-path: polygon(0 0,100% 0,50% 100%);
}
@media (max-width: 850px) {
  #OrderForm {
    --keyboard-page-gutter: 18px;
    --keyboard-edge: max(var(--keyboard-page-gutter), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --keyboard-card-width: calc(100vw - 2 * var(--keyboard-edge));
  }
  #OrderForm :is(.notes-keyboard.is-tag-text-keyboard, .line-notes-editor > .notes-keyboard) {
    width: var(--keyboard-card-width); max-width: none;
    margin-inline: calc((100% - var(--keyboard-card-width)) / 2);
  }
  #OrderForm .engraving-content > .notes-keyboard.is-tag-text-keyboard {
    justify-self: center; margin-inline: 0;
  }
  #OrderForm .detached-add-order { padding: 12px; }
}
#OrderForm .detached-add-order > .order-footer { grid-template-columns: minmax(0,1fr); margin: 0; }
#OrderForm .detached-add-order > .order-footer > .shared-add-tags { grid-column: 1; }
#OrderForm .detached-add-order { padding-block: 12px; }
@media (max-width: 700px) { #OrderForm { --keyboard-page-gutter: 12px; } }
@media (max-width: 600px) {
  #OrderForm .engraving-card .engraving-scroll { padding: 0 2px; }
  #OrderForm .engraving-row { min-height: 32px; }
  #OrderForm .engraving-row > .tag-text-line { min-height: 32px; height: 32px; padding-block: 2px; }
  #OrderForm .engraving-row .drag-handle { min-height: 32px; }
  #OrderForm .engraving-row .side-buttons > button { height: 28px; min-height: 28px; }
  #OrderForm .engraving-row .side-buttons > button:not(:active) { transform: none; }
  #OrderForm .engraving-row .side-buttons > button:not(:active, [aria-pressed="true"]) {
    box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px #6a7e8a35, 0 1px 0 #94a4ae;
  }
}

/* A full-width dock with centred keys on larger touchscreens. */
#OrderForm .notes-keyboard button[data-notes-key] {
  color: #f7f8fa; background: #2d3037; border-color: #3d4149;
  box-shadow: inset 0 1px 0 #ffffff14; transform: none;
}
#OrderForm .notes-keyboard button[data-notes-key][aria-pressed="true"] {
  background: #424751;
}
#OrderForm .notes-keyboard button[data-notes-key]:active:not(:disabled) {
  background: #1b1d22; box-shadow: inset 0 2px 4px #0008; transform: none;
}
#OrderForm .notes-keyboard .notes-keyboard-done {
  background: #3b4550; border-color: #61707e;
}
/* Scale the measured 872px Samsung reference to the available keypad width. */
#OrderForm .notes-keyboard {
  container-type: inline-size;
  display: grid; width: 100%; max-width: 480px; padding: 0;
  margin: 8px auto 0; scroll-margin: 8px;
  background: #0a0a0b;
}
#OrderForm .notes-keyboard > .notes-keyboard-row {
  --keypad-unit: calc(min(100cqw, 480px) / 872);
  display: grid; width: min(100%, 480px); height: calc(96 * var(--keypad-unit));
  margin: calc(27 * var(--keypad-unit)) auto 0;
  column-gap: calc(13 * var(--keypad-unit));
  padding-inline: calc(19 * var(--keypad-unit)) calc(18 * var(--keypad-unit));
}
#OrderForm .notes-keyboard > [data-tag-number-row] {
  height: calc(79 * var(--keypad-unit)); margin-top: calc(17 * var(--keypad-unit));
}
#OrderForm .notes-keyboard > .notes-keyboard-row:nth-child(-n+2) {
  grid-template-columns: repeat(10,minmax(0,1fr));
  padding-inline: calc(20 * var(--keypad-unit)) calc(19 * var(--keypad-unit));
}
#OrderForm .notes-keyboard > .notes-keyboard-row:nth-child(3) {
  grid-template-columns: repeat(9,minmax(0,1fr));
  padding-inline: calc(63 * var(--keypad-unit)) calc(61 * var(--keypad-unit));
  column-gap: calc(14 * var(--keypad-unit));
}
#OrderForm .notes-keyboard:not(.is-symbol-keyboard) > .notes-keyboard-row:nth-child(4) {
  grid-template-columns: calc(102 * var(--keypad-unit)) 0 repeat(7,minmax(0,1fr)) 0 calc(102 * var(--keypad-unit));
  margin-top: calc(28 * var(--keypad-unit));
}
#OrderForm .notes-keyboard:not(.is-symbol-keyboard) [data-letter="z"] { grid-column: 3; }
#OrderForm .notes-keyboard:not(.is-symbol-keyboard) [data-notes-key="delete"] { grid-column: 11; }
#OrderForm .is-symbol-keyboard > .notes-keyboard-row:nth-child(4) {
  grid-template-columns: repeat(7,minmax(0,1fr)) minmax(0,1.4fr);
}
#OrderForm .is-symbol-keyboard > .notes-keyboard-row:has(> [data-tag-hash]:not([hidden])) {
  grid-template-columns: repeat(8,minmax(0,1fr)) minmax(0,1.4fr);
}
#OrderForm .notes-keyboard > .notes-keyboard-actions {
  grid-template-columns: minmax(0,113fr) minmax(0,70fr) minmax(0,305fr) minmax(0,72fr) repeat(2,minmax(0,103fr));
  height: calc(95 * var(--keypad-unit)); margin-bottom: calc(18 * var(--keypad-unit));
}
#OrderForm .is-email-keyboard > .notes-keyboard-actions {
  grid-template-columns: minmax(0,113fr) minmax(0,70fr) repeat(2,minmax(0,146fr)) minmax(0,72fr) repeat(2,minmax(0,103fr));
}
#OrderForm .notes-keyboard > .notes-keyboard-row > button {
  min-width: 0; min-height: 0; margin: 0; padding: 0; touch-action: manipulation;
  border: 1px solid transparent; border-radius: calc(15 * var(--keypad-unit));
  background: #484748; color: #fff;
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: clamp(20px, calc(47 * var(--keypad-unit)), 27px); font-weight: 600; line-height: 1.05;
  box-shadow: inset 0 1px 0 #ffffff12;
}
#OrderForm .notes-keyboard > .notes-keyboard-row > :is([data-notes-key="shift"], [data-notes-key="delete"], .notes-keyboard-done) {
  background: #171719;
}
#OrderForm .notes-keyboard > .notes-keyboard-row > [data-notes-key="shift"] { font-size: 24px; line-height: 1; }
#OrderForm .notes-keyboard > .notes-keyboard-row > [data-notes-key="delete"] { font-size: 22px; }
#OrderForm .notes-keyboard > .notes-keyboard-actions > :is([data-notes-key="space"], [data-notes-key="return"], [data-notes-key="symbols"], [data-email-domain], .notes-keyboard-done) {
  font-size: clamp(12px, calc(34 * var(--keypad-unit)), 19px);
}
#OrderForm .notes-keyboard > .notes-keyboard-row > .notes-keyboard-done { color: #91b0ff; }
#OrderForm .notes-keyboard > .notes-keyboard-row > button[aria-pressed="true"] { background: #353943; }
#OrderForm .notes-keyboard[popover] {
  --dock-safe-bottom: env(safe-area-max-inset-bottom, 36px);
  position: fixed; inset: auto 0 calc(env(safe-area-inset-bottom, 0px) - var(--dock-safe-bottom));
  width: 100%; max-width: none; max-height: 70vh; max-height: 70dvh;
  margin: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 env(safe-area-inset-right, 0px) var(--dock-safe-bottom) env(safe-area-inset-left, 0px);
  border: 0; border-top: 1px solid #24272c; border-radius: 0;
  translate: 0 100%;
  transition: translate var(--keypad-motion-duration) var(--keypad-motion-easing),
    display var(--keypad-motion-duration) allow-discrete, overlay var(--keypad-motion-duration) allow-discrete;
}
#OrderForm .notes-keyboard[popover]:popover-open:not(.is-offscreen) { translate: 0 0; }
#OrderForm .notes-keyboard.is-offscreen { pointer-events: none; }
@starting-style {
  #OrderForm .notes-keyboard[popover]:popover-open:not(.is-offscreen) { translate: 0 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #OrderForm .notes-keyboard[popover] { transition: none; }
}
html.has-docked-keypad { scroll-padding-bottom: calc(var(--keypad-dock-height, 0px) + 8px); }
/* Only the final editor needs extra room near the end of the page. */
.has-docked-keypad body:has(.is-email-keyboard:popover-open) {
  padding-bottom: var(--keypad-dock-height, 0px);
}
@media (hover: hover) and (pointer: fine) {
  #OrderForm .notes-keyboard button[data-notes-key]:hover:not(:disabled) {
    background: #424751;
  }
}
@media (hover: none) {
  #OrderForm .notes-keyboard button[data-notes-key]:hover:not(.is-recent-key, .notes-keyboard-done, [aria-pressed="true"]) {
    border-color: var(--keypad-key-border);
  }
}
#OrderForm :is(.number-keypad, .notes-keyboard) button:is([data-keypad-key], [data-notes-key]).is-recent-key {
  background: var(--keypad-tap-face); border-color: var(--keypad-tap-border);
  box-shadow: inset 0 0 0 1px var(--keypad-tap-border);
}

/* Match the blue Done action on the number and text keypads. */
#OrderForm .notes-keyboard .notes-keyboard-actions > button.notes-keyboard-done,
#OrderForm .notes-keyboard .notes-keyboard-actions > button.notes-keyboard-done:hover:not(:disabled) {
  background: linear-gradient(#3E709E,#28537C); border: 1px solid #28537C; border-radius: 7px;
  box-shadow: inset 0 1px 1px #ffffff38,0 3px 0 #1D3D5D;
  color: #fff; font-size: clamp(12px, 4vw, 16px); font-weight: 700; line-height: 1.5;
}
#OrderForm .notes-keyboard .notes-keyboard-actions > button.notes-keyboard-done:active:not(:disabled) {
  transform: translateY(2px); box-shadow: var(--control-inset);
}

/* Use two columns when the order has ample width. */
#OrderForm {
  container: order-form-space / inline-size;
  --order-panel-padding: 24px;
  --order-panel-border: 1px;
  --order-panel-inset: calc(var(--order-panel-padding) + var(--order-panel-border));
  --tag-style-padding: 18px;
  --shape-tile-gap: 12px;
}
#OrderForm > :is(.detached-add-order,.order-completion) {
  width: calc(100% - 2 * var(--order-panel-inset));
  margin-inline-start: var(--order-panel-inset);
}
@media(max-width:850px) {
  #OrderForm > :is(.detached-add-order,.order-completion) {
    width: 100%;
    margin-inline-start: 0;
  }
}
#OrderForm .delivery-panel {
  margin-bottom: 0;
  border-bottom: 0;
  border-end-start-radius: 0;
  border-end-end-radius: 0;
  padding-bottom: 0;
}
#OrderForm .delivery-postage {
  margin-top: 0;
  padding: 14px var(--order-panel-padding) var(--order-panel-padding);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  background: var(--paper);
}
@media(max-width:700px) {
  #OrderForm { --order-panel-padding: 18px; }
}
#OrderForm .tag-workspace { min-width: 0; }
#OrderForm .tag-order > .tag-workspace > .order-footer:not(:has(> *)) { display: none; margin: 0; }
#OrderForm .tag-workspace > .order-footer { grid-template-columns: minmax(0,1fr); }
#OrderForm .tag-workspace > .order-footer > .shared-add-tags { grid-column: 1; width: 100%; }
@media(min-width:851px) {
  #OrderForm .tag-workspace > :is(.quantity-field,.order-footer) { width: calc((100% - 16px) / 2); }
}
/* Match the header's two-column breakpoint as well as the available order width. */
@media(min-width:1101px) {
  #OrderForm .tag-order {
    padding-inline: var(--order-panel-padding);
    border-inline-width: var(--order-panel-border);
  }
  #OrderForm .tag-order.has-compact-tag-picker { padding-bottom: var(--order-panel-padding); }
@container order-form-space (min-width: 1050px) {
  #OrderForm .envelope-face > .field { margin-inline: 15%; }
  #OrderForm > .order-completion,
  #OrderForm .tag-order {
    /* In the four-tile grid, Bone is in column three. Its centre sets the gutter midpoint. */
    --tag-workspace-width: calc(100cqi - 2 * var(--order-panel-inset));
    --left-card-width: calc(0.625 * var(--tag-workspace-width) - (var(--tag-style-padding) + 1px) / 4 + var(--shape-tile-gap) / 8 - var(--delivery-column-gap) / 2);
  }
  #OrderForm > .detached-add-order {
    width: 100%;
    margin-inline-start: 0;
    padding-inline: var(--order-panel-padding);
  }
  #OrderForm > .order-completion {
    --envelope-column: calc((100cqi - 2 * var(--order-panel-inset) - var(--delivery-column-gap)) / 2);
    /* The destination pair fills the same half-width as the envelope. */
    --stamp-width: calc(var(--envelope-column) * .2 * 88 / 105);
    --delivery-options-width: var(--envelope-column);
    --delivery-button-width: calc((var(--delivery-options-width) - 2 * var(--delivery-option-pad) - var(--delivery-option-gap)) / 2);
    --postage-option-height: 44px;
    width: 100%;
    margin-inline-start: 0;
    display: grid;
    grid-template-columns: var(--envelope-column) minmax(0,1fr);
    grid-template-rows: auto auto;
    gap: 14px var(--delivery-column-gap);
    padding: 0 var(--order-panel-padding) var(--order-panel-padding);
    border: var(--order-panel-border) solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--paper); box-shadow: var(--shadow);
  }
  #OrderForm .delivery-panel {
    grid-column: 1; grid-row: 1 / 3;
    display: grid; grid-template-rows: subgrid;
    padding: var(--order-panel-padding) 0 0;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  #OrderForm .delivery-choice > :is(.delivery-options, .delivery-options-space) {
    width: var(--delivery-options-width); max-width: 100%;
  }
  #OrderForm .delivery-choice .delivery-options { background: #e8eef0; }
  #OrderForm .delivery-actions {
    grid-column: 2; grid-row: 2;
    display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
    min-width: 0;
  }
  #OrderForm .delivery-postage {
    /* Centre the pair of choices on the stamp. */
    --postage-options-half-height: calc(var(--postage-option-height) + var(--delivery-option-pad) + var(--delivery-option-gap) / 2);
    margin-block-start: calc(var(--envelope-inset) + 1px + var(--envelope-column) * .1 - var(--postage-options-half-height));
    width: calc(var(--delivery-button-width) + 2 * var(--delivery-option-pad));
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #OrderForm .delivery-postage .delivery-options {
    grid-template-columns: minmax(0,1fr);
    padding: var(--delivery-option-pad); background: #e8eef0;
  }
  #OrderForm .delivery-postage .delivery-options label {
    min-height: var(--postage-option-height);
  }
  #OrderForm .submit-panel {
    --submit-panel-padding: 18px;
    grid-template-columns: minmax(0,1fr);
    margin-top: 0;
    padding-block: 12px;
  }
  #OrderForm .submit-panel #SubmitButton {
    width: min(100%, var(--delivery-button-width));
    padding-inline: 10px; white-space: nowrap;
  }
  #OrderForm .tag-order .order-number-card {
    grid-template-columns: var(--left-card-width) minmax(0,1fr);
    column-gap: var(--delivery-column-gap);
  }
  #OrderForm .tag-workspace {
    display: grid;
    grid-template-columns: var(--left-card-width) minmax(0,1fr);
    gap: 16px var(--delivery-column-gap); align-content: start;
  }
  #OrderForm .tag-workspace > .tag-style-card { grid-column: 1 / -1; grid-row: 1; }
  #OrderForm .tag-workspace > .engraving-card { grid-column: 1; grid-row: 2; margin-top: 0; align-content: start; }
  #OrderForm .tag-workspace > .quantity-field {
    grid-column: 2; grid-row: 2; align-self: start; width: 100%; margin: 0;
  }
  #OrderForm:not(.is-measuring-compact-cards) .tag-order:not(.has-compact-tag-picker) > .tag-workspace > .quantity-field {
    align-self: stretch; align-content: start;
    padding: 18px; grid-template-rows: 44px auto; row-gap: 0;
  }
  #OrderForm .tag-order:not(.has-compact-tag-picker) > .tag-workspace > .quantity-field > label {
    align-self: center;
  }
  #OrderForm .tag-workspace > .order-footer { grid-column: 2; grid-row: 3; width: 100%; margin: 0; }
  #OrderForm .line-notes-editor textarea { min-height: var(--compact-card-height); }
  /* Span the right-hand cards so Add Order Form follows the bottom of Tag Text. */
  #OrderForm .tag-order:not(.has-compact-tag-picker) > .tag-workspace:has(> .order-footer > .shared-add-tags) {
    grid-template-rows: auto minmax(min-content,1fr) max-content;
  }
  #OrderForm .tag-order:not(.has-compact-tag-picker) > .tag-workspace > .engraving-card {
    row-gap: 8px;
  }
  #OrderForm .tag-order:not(.has-compact-tag-picker) > .tag-workspace:has(> .order-footer > .shared-add-tags) > .engraving-card {
    grid-row: 2 / 4;
  }
  #OrderForm .tag-order:not(.has-compact-tag-picker) .engraving-content { row-gap: 16px; }
  #OrderForm .tag-order:not(.has-compact-tag-picker) > .tag-workspace > .order-footer {
    align-self: end;
  }
  #OrderForm .tag-order.has-compact-tag-picker > .tag-workspace {
    /* The final track absorbs any extra Tag Text height below the right stack. */
    grid-template-rows: max-content max-content max-content 1fr; row-gap: 0;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace > .tag-style-card {
    grid-column: 2; grid-row: 1;
    /* Reserve room for the default five-line panel regardless of the current line count. */
    min-height: max(0px, calc(24rem - var(--compact-card-height) - 6px));
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace > .engraving-card {
    grid-column: 1; grid-row: 1 / 5; margin-top: 0;
    align-self: start; align-content: start;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace > .engraving-card:has(.engraving-scroll > .engraving-row:nth-child(5):last-child):not(:has(:is(.line-tools, .line-notes-editor):not([hidden]))) {
    grid-row-end: 3; align-self: stretch;
  }
  /* Seven lines reach the Add card, when this order has one. */
  #OrderForm .has-compact-tag-picker > .tag-workspace:has(> .order-footer > .shared-add-tags) >
    .engraving-card:has(.engraving-scroll > .engraving-row:nth-child(7):last-child):not(:has(:is(.line-tools, .line-notes-editor):not([hidden]))) {
    grid-row-end: 4; align-self: stretch; align-content: stretch;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace:has(> .order-footer > .shared-add-tags) >
    .engraving-card:has(.engraving-scroll > .engraving-row:nth-child(7):last-child):not(:has(:is(.line-tools, .line-notes-editor):not([hidden]))) > .engraving-content {
    align-content: stretch;
    grid-template-rows: auto 1fr auto;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace:has(> .order-footer > .shared-add-tags) >
    .engraving-card:has(.engraving-scroll > .engraving-row:nth-child(7):last-child):not(:has(:is(.line-tools, .line-notes-editor):not([hidden]))) .engraving-scroll {
    display: grid; grid-auto-rows: 1fr;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace > .quantity-field {
    align-self: start; margin-top: 6px;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace > .order-footer {
    margin-top: 6px;
  }
  #OrderForm .has-compact-tag-picker > .tag-workspace .tag-picker-trial { --tag-picker-columns: 2; }
}
}

/* Compact spacing and a shared outer card inset for the stacked phone layout. */
@media (max-width: 600px) {
  #OrderForm { --order-panel-padding: 12px; }
  :is(#OrderForm,.review-summary-details) .site-header .account-outer-card,
  :is(#OrderForm,.review-summary-details) :is(.tag-order, .detached-add-order, .delivery-postage, .submit-panel) {
    padding: var(--order-panel-padding);
  }
  #OrderForm .tag-order .order-number-card { row-gap: 8px; }

  #OrderForm .tag-picker-trial:not(.is-tag-picker-collapsed) .shape-grid { --shape-tile-gap: 8px; }
  #OrderForm .tag-picker-trial:not(.is-tag-picker-collapsed) .shape-grid > .shape-card > .shape-card-inner {
    padding-block: 7px;
  }
  #OrderForm .tag-order .tag-workspace > :is(.engraving-card, .quantity-field) { margin-top: 12px; }
  #OrderForm .tag-workspace > .order-footer:not(:has(> .shared-add-tags)) { display: none; }
  #OrderForm .engraving-content > .engraving-footer { margin-top: -4px; }
  #OrderForm #detachedAddOrder { margin-bottom: 16px; }

  #OrderForm .delivery-panel {
    padding: var(--order-panel-padding) var(--order-panel-padding) 0;
    scroll-margin-block-start: 6px;
  }
  #OrderForm .delivery-heading { margin-bottom: 10px; }
  #OrderForm .delivery-address-entry { margin-top: 8px; }
  #OrderForm .submit-panel { margin-top: 14px; row-gap: 8px; }
  #OrderForm .submit-panel #SubmitButton { margin-top: 4px; }
}

/* Final order review, separate from blank-tag and saved-data confirmations. */
#actionConfirmDialog.review-confirmation {
  width: min(600px,calc(100% - 32px)); padding: 28px 25px 30px;
  border: 1px solid #c9d6dd; border-top: 5px solid #356DA6; border-radius: 16px;
  box-shadow: 0 20px 55px #20344336; text-align: center;
}
#actionConfirmDialog.review-confirmation::before {
  content: '✓' / ''; display: grid; place-items: center; width: 46px; height: 46px;
  margin: 0 auto 17px; border-radius: 50%; background: #EDF2F8;
  border: 1px solid #C6D7E8; color: #356DA6; font-size: 27px;
}
#actionConfirmDialog.review-confirmation h2 {
  font-size: 25px; line-height: 1.25; letter-spacing: -.025em; margin: 0 0 14px;
}
#actionConfirmDialog.review-confirmation > p {
  margin: 0 0 26px; color: #536975; font-size: 16px; line-height: 1.6;
}
#actionConfirmDialog.review-confirmation .remove-dialog-actions {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px;
}
#actionConfirmDialog.review-confirmation button {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 54px; padding: 10px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 700; transform: none;
}
#actionConfirmDialog.review-confirmation #cancelActionConfirm {
  border: 1px solid #96aab4; color: #213b49;
  background: linear-gradient(#fff,#e9eff2 48%,#d4dfe4);
  box-shadow: inset 0 1px 0 #fff,0 4px 0 #8b9ea7;
}
#actionConfirmDialog.review-confirmation #cancelActionConfirm::before {
  content: ''; width: 25px; height: 25px; flex: none;
  background: url("assets/return-arrow.svg?v=20261121-soft-navy") center / contain no-repeat;
}
#actionConfirmDialog.review-confirmation #acceptActionConfirm {
  border: 1px solid #244C75; color: #fff;
  background: linear-gradient(#3E709E,#28537C 58%,#1D3D5D);
  box-shadow: inset 0 1px 0 #ffffff55,0 4px 0 #1D3D5D,0 7px 13px #20344320;
  font-size: 17px;
}
#actionConfirmDialog.review-confirmation #acceptActionConfirm::before {
  content: '✓' / ''; display: grid; place-items: center; flex: none;
  width: 25px; height: 25px; border: 1px solid #ffffff65; border-radius: 50%; font-size: 17px;
}
#actionConfirmDialog.review-confirmation #acceptActionConfirm:hover { background: linear-gradient(#4A7FB0,#315F89,#264E73); }
#actionConfirmDialog.review-confirmation button:active { transform: translateY(2px); box-shadow: inset 0 2px 4px #20344335,0 1px 0 #1D3D5D; }
#actionConfirmDialog.review-confirmation button:focus-visible { outline: var(--focus); outline-offset: 4px; }
#actionConfirmDialog.review-confirmation[open] { animation: none; }
#OrderForm #SubmitButton[aria-busy="true"]::before {
  content: ''; border: 2px solid #ffffff55; border-top-color: #fff; animation: order-sending-spin .8s linear infinite;
  -webkit-mask: none; mask: none; background: transparent; border-radius: 50%;
}
@keyframes review-dialog-enter { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes order-sending-spin { to { transform: rotate(360deg); } }
@media(max-width:600px) {
  #actionConfirmDialog.review-confirmation { padding: 24px 20px 27px; }
  #actionConfirmDialog.review-confirmation h2 { font-size: clamp(20px,5vw,25px); }
  #actionConfirmDialog.review-confirmation .remove-dialog-actions { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion:reduce) {
  #actionConfirmDialog.review-confirmation[open], #OrderForm #SubmitButton[aria-busy="true"]::before { animation: none; }
}

/* Review the exact submission details while keeping both decisions visible. */
#actionConfirmDialog.review-confirmation[open] {
  display: flex; flex-direction: column; max-height: calc(100dvh - 32px);
}
#actionConfirmDialog.review-confirmation::before,
#actionConfirmDialog.review-confirmation > :is(h2,p,.remove-dialog-actions) { flex: none; }
#actionConfirmDialog.review-confirmation .order-review-summary {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  margin-bottom: 24px; padding: 2px 3px 4px; text-align: left;
  flex: 0 1 auto; overflow-wrap: anywhere;
}
.order-review-summary:focus-visible { outline: none; }
.review-summary-details { display: grid; gap: 18px; min-width: 0; }
.review-summary-details :is(h3,h4,p,figure) { margin: 0; }
.review-summary-details h3, .review-summary-details :where(.review-quantity-heading) { font-size: 21px; line-height: 1.3; font-weight: 700; }
.review-account,.review-summary-order,.review-summary-delivery,.review-email {
  border: 1px solid #c7d4de; border-radius: 16px; background: #fff; padding: 20px; min-width: 0;
}
.review-account { display: flex; align-items: baseline; justify-content: flex-end; gap: 16px; font-size: 17px; }
.review-account strong { font-size: 23px; letter-spacing: .5px; }
.review-summary-orders { display: grid; gap: 18px; min-width: 0; }
.review-summary-order {
  display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr);
  grid-template-rows: auto auto 1fr; gap: 16px; align-items: start;
}
.review-section { padding: 18px; border: 1px solid #c7d4de; border-radius: 12px; background: #f6f9fa; min-width: 0; }
.review-order-banner { display: flex; align-items: center; gap: 14px; padding: 10px 17px; border-radius: 12px; background: #244C75; color: #fff; min-height: 80px; }
.review-order-ordinal { font-size: 45px; font-weight: 800; line-height: 1.2; padding-right: 14px; border-right: 1px solid #78949d; }
.review-order-banner h3 { font-size: 24px; color: #fff; }
.review-order-banner p { margin-top: 3px; font-size: 15px; color: #e1edf0; }
.review-order-identity { display: flex; align-items: baseline; justify-content: flex-end; gap: 16px; align-self: stretch; }
.review-summary-order-number { font-size: 25px; font-weight: 600; letter-spacing: .6px; }
.review-engraving { grid-column: 1; grid-row: 2 / 4; align-self: stretch; }
.review-style { grid-column: 2; grid-row: 2; }
.review-style-body { display: flex; align-items: center; gap: 18px; margin-top: 0; }
.review-product { width: 58%; flex: none; padding: 8px; border: 1px solid #c7d4de; border-radius: 10px; background: #fff; text-align: center; }
.review-product img { display: block; width: 100%; height: 145px; object-fit: contain; }
.review-product figcaption { font-size: 14px; font-weight: 600; margin: 4px 0; }
.review-material { font-size: 18px; font-weight: 600; }
.review-quantity { grid-column: 2; grid-row: 3; display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.review-quantity small { font-size: 14px; color: #536975; }
.review-quantity > strong { font-size: 29px; font-weight: 600; }
.review-summary-printing { margin-top: 0; padding: 12px 15px; border: 1px solid #99adb8; border-radius: 8px; background: linear-gradient(#fff,#f8fafb); box-shadow: 0 2px 3px #20344320; color: #203443; font-size: 22px; font-weight: 600; line-height: 1.65; letter-spacing: .5px; }
.review-summary-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.review-summary-line > span { white-space: pre-wrap; min-width: 0; }
.review-summary-side { flex: none; font-size: 12px; font-weight: 400; letter-spacing: normal; color: #536975; }
.review-summary-blank { margin-top: 14px; color: #536975; font-size: 17px; }
.review-summary-notes { margin-top: 16px; font-size: 17px; line-height: 1.5; white-space: pre-wrap; color: #203443; }
.review-summary-notes h4 { margin-bottom: 6px; font-size: 17px; font-weight: 700; }
.review-completion { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 18px; align-items: end; }
.review-summary-delivery { container-type: inline-size; }
.review-summary-envelope { position: relative; container-type: inline-size; width: 100%; min-width: 0; aspect-ratio: 3 / 2; margin-top: 0; border: 1px solid #cbd1d4; border-radius: 3px; background: linear-gradient(145deg,#fff,#fff 65%,#f4f5f5); box-shadow: 0 2px #d9dee0,2px 4px 7px #2034431c; }
.review-summary-envelope-label { position: absolute; top: 5%; left: 4%; right: 28%; color: #6e7b83; font-size: 13px; }
.review-summary-stamp { position: absolute; top: 4%; right: 3.5%; height: 26%; width: auto; max-width: 25%; object-fit: contain; }
.review-summary-address { position: absolute; top: 44%; left: 23%; right: 5%; white-space: pre-wrap; color: #000; font-size: clamp(16px,4.2cqw,24px); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.review-email small { display: block; margin-top: 5px; color: #536975; font-size: 14px; }
.review-email-label { display: block; color: #6e7b83; font-size: 13px; font-weight: 400; }
.review-email p {
  margin-top: 5px; font-size: 18px; font-weight: 400; overflow-wrap: anywhere;
  /* Tighten the visible label gap without shifting the actions below it. */
  position: relative; top: -4px;
}
@media(max-width:700px) {
  .review-summary-order { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; gap: 12px; }
  .review-order-banner { grid-column: 1; grid-row: 1; }
  .review-order-identity { grid-column: 1; grid-row: 2; justify-content: space-between; }
  .review-style { grid-column: 1; grid-row: 3; }
  .review-engraving { grid-column: 1; grid-row: 4; }
  .review-quantity { grid-column: 1; grid-row: 5; }
  .review-completion { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:600px) {
  .review-summary-details,.review-summary-orders { gap: 14px; }
  .review-account,.review-summary-order,.review-summary-delivery,.review-email { padding: 12px; border-radius: 14px; }
  .review-section { padding: 12px; }
  .review-summary-details h3, .review-summary-details :where(.review-quantity-heading) { font-size: 19px; }
  .review-order-banner { padding: 9px 13px; min-height: 68px; }
  .review-order-banner h3 { font-size: 22px; }
  .review-order-banner p { font-size: 12px; }
  .review-order-ordinal { font-size: 38px; }
  .review-product img { height: 110px; }
  .review-material { font-size: 17px; }
  .review-summary-printing { font-size: 19px; padding: 10px 12px; letter-spacing: .3px; }
  .review-summary-side { font-size: 11px; }
  .review-summary-notes { font-size: 16px; }
  .review-summary-envelope-label { font-size: 12px; }
  .review-email p { font-size: 18px; }
}
#OrderForm .tag-style-next-step {
  display: inline-block; margin-inline-start: 12px; padding: 5px 9px;
  border-radius: 5px; background: #EDF2F8; color: #244C75;
  font-size: 13px; font-weight: 600; vertical-align: middle;
}

@media(min-width:851px) {
  #actionConfirmDialog.review-confirmation { width: min(860px,calc(100% - 64px)); }
}
.copy-notes-choice h3 { font-size: 20px; line-height: 1.35; margin: 0 0 16px; }
.copy-notes-choice .copy-notes-preview {
  padding: 14px; margin: 0 0 18px; border: 1px solid #d7e2e7; border-radius: 8px;
  background: #f6f9fa; white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 35dvh; overflow-y: auto; font-size: 15px; line-height: 1.5;
}
.copy-notes-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.copy-notes-actions button { flex: 1 1 170px; min-height: 48px; padding: 10px; font-weight: 650; }

/* Final readability adjustments for entry and review. */
#OrderForm .copy-email-field > input,.review-email p { font-size: 18px; font-weight: 400; }
@media(min-width:851px) {
  #OrderForm .engraving-row > .tag-text-line { font-size: 23px; font-weight: 650; line-height: 1.2; }
  #OrderForm #PostalAdd { font-size: 22px; }
  #OrderForm .copy-email-field > input,.review-email p { font-size: 24px; }
}
#actionConfirmDialog.review-confirmation { padding-top: 20px; }
#actionConfirmDialog.review-confirmation::before { display: none; }
#actionConfirmDialog.review-confirmation h2 { margin-bottom: 10px; }
#actionConfirmDialog.review-confirmation > #actionConfirmMessage { margin-bottom: 14px; }

/* A complete review screen, with the form retained behind the view. */
.review-screen-brand { display: none; }
body.is-reviewing-order { overflow: hidden; }
body.is-reviewing-order > main { display: none; }
#actionConfirmDialog.review-confirmation[open] {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 20px max(24px,calc((100vw - 1120px) / 2)) 24px;
  border: 0; border-radius: 0; box-shadow: none; overflow: hidden;
  display: grid; grid-template-columns: minmax(0,1fr);
  grid-template-rows: auto auto minmax(0,1fr) auto; gap: 14px;
  background: repeating-linear-gradient(0deg,#ffffff18 0 1px,#43546108 1px 2px,transparent 2px 4px),
    linear-gradient(115deg,#b8c5cc,#d7e0e5 45%,#bac8cf);
}
#actionConfirmDialog.review-confirmation .review-screen-brand { display: block; }
.review-screen-brand img { display: block; width: 280px; max-width: 100%; height: auto; margin: auto; }
#actionConfirmDialog.review-confirmation h2 { margin: 0; color: #203443; }
#actionConfirmDialog.review-confirmation .order-review-summary {
  min-height: 0; height: 100%; margin: 0; padding: 0 3px 4px; border: 0;
  border-radius: 0; background: transparent; box-shadow: none;
}
#actionConfirmDialog.review-confirmation .remove-dialog-actions {
  margin: 0; padding: 14px; border: 1px solid #aebfc9; border-radius: 14px; background: #f3f7f9;
}
@media(max-width:600px) {
  #actionConfirmDialog.review-confirmation[open] { padding: 12px; gap: 10px; }
  .review-screen-brand img { width: 220px; }
  #actionConfirmDialog.review-confirmation h2 { font-size: 21px; }
  #actionConfirmDialog.review-confirmation .order-review-summary { padding: 0 2px 4px; }
  #actionConfirmDialog.review-confirmation .remove-dialog-actions { padding: 10px; gap: 10px; }
}
@media(max-height:600px) {
  #actionConfirmDialog.review-confirmation[open] { padding-block: 8px 14px; gap: 8px; }
  .review-screen-brand img { width: 155px; }
  #actionConfirmDialog.review-confirmation h2 { font-size: 20px; }
  #actionConfirmDialog.review-confirmation .remove-dialog-actions { padding: 8px; }
}

/* The review reuses the order-form header and number frames, without editable inputs. */
#actionConfirmDialog.review-confirmation[open] { grid-template-rows: minmax(0,1fr) auto; }
#actionConfirmDialog.review-confirmation > #actionConfirmTitle {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.review-summary-details { --compact-card-height: 72px; }
#actionConfirmDialog .review-form-header .hero-copy h1 { margin: 0; }
#actionConfirmDialog .review-form-header .field { min-height: 58px; align-content: center; }
#actionConfirmDialog .review-form-header .field > .review-number { grid-column: 2; grid-row: 1; }
#actionConfirmDialog :is(.review-number,.review-quantity > strong) {
  display: block; padding: 3px 12px; height: 44px; min-height: 44px; line-height: 34px;
  font: 650 24px/34px var(--font); text-align: center; color: var(--ink);
  border: 2px solid #879ba7; border-radius: 8px; border-top-color: #a7b7c0; border-bottom-color: #6c8391;
  background: linear-gradient(180deg,#fff 0%,#fff 60%,#f2f6f8 100%);
  box-shadow: inset 0 1px 0 #fff,inset 0 2px 4px #2034430d,0 2px 0 #b4c1c9,0 3px 6px #20344312;
}
#actionConfirmDialog .review-account-number { width: 6ch; }
#actionConfirmDialog .review-summary-order-number { width: 10ch; letter-spacing: normal; font-weight: 650; }
#actionConfirmDialog .review-order-identity {
  display: block; padding: 0; border: 0; background: transparent;
}
#actionConfirmDialog .review-order-identity .order-number-row {
  width: 100%; max-width: none; margin: 0; min-height: 72px; padding: 6px 12px;
  display: grid; align-content: center; border: 1px solid var(--line); border-radius: 12px; background: #f7fafb;
}
#actionConfirmDialog .review-order-identity .field {
  display: grid; grid-template-columns: max-content max-content; align-items: center; justify-content: end; gap: 12px;
}
#actionConfirmDialog .review-order-identity .field > .form-heading {
  font-size: 20px; margin: 0; color: var(--ink); white-space: nowrap;
}
#actionConfirmDialog .review-form-header .standalone-account .field > .form-heading { font-size: 20px; }
@media(max-width:700px) {
  #actionConfirmDialog .review-order-identity { align-self: start; }
}

/* Match the form's paper, steel and wide-card proportions in the read-only review. */
#actionConfirmDialog.review-confirmation[open] {
  padding-inline: max(24px,calc((100vw - 1173px) / 2));
  background: repeating-linear-gradient(0deg,#ffffff24 0 1px,#43546106 1px 2px,transparent 2px 4px),linear-gradient(115deg,#d2d9dc,#f4f6f7 42%,#d5dde0);
}
#actionConfirmDialog .review-form-header .hero-copy h1.form-heading {
  font-size: clamp(26px,3cqi,34px); font-weight: 750; line-height: 1.25; white-space: nowrap;
}
#actionConfirmDialog .review-number {
  white-space: nowrap; overflow-wrap: normal; word-break: normal; padding-inline: 6px;
  font-variant-numeric: tabular-nums;
}
.review-summary-details,.review-summary-orders { gap: 24px; }
.review-summary-order { padding: 24px; gap: 16px 18px; }
.review-summary-order,.review-summary-delivery,.review-email { border-color: var(--line); border-radius: var(--radius-panel); }
.review-section { background: #f7fafb; border-color: var(--line); }
.review-summary-details h3, .review-summary-details :where(.review-quantity-heading) { font-size: 20px; font-weight: 700; }
.review-order-banner { background: var(--teal); padding: 6px 12px; min-height: 72px; gap: 12px; }
.review-order-ordinal { font-size: 52px; font-weight: 800; letter-spacing: -.04em; padding-right: 12px; }
.review-order-banner h3 { font-size: 24px; }
.review-order-banner p { font-size: 16px; color: #fff; }
.review-material { font-size: 20px; font-weight: 650; }
.review-product { background: #EDF2F8; border-color: #879ba7; }
.review-product figcaption { color: #536975; font-weight: 650; }
.review-summary-printing { background: #fff; border: 2px solid #879ba7; border-top-color: #a7b7c0; border-bottom-color: #6c8391; box-shadow: inset 0 1px 0 #fff,inset 0 2px 4px #2034430d,0 2px 0 #b4c1c9,0 3px 6px #20344312; }
@media(min-width:851px) {
  .review-summary-order { grid-template-columns: minmax(0,calc(62.5% - 12.25px)) minmax(0,1fr); }
}
@media(max-width:700px) {
  #actionConfirmDialog .review-form-header .hero-copy h1.form-heading { font-size: clamp(24px,6.8vw,30px); }
}
@media(max-width:600px) {
  #actionConfirmDialog.review-confirmation[open] { padding-inline: 12px; }
  .review-summary-details,.review-summary-orders { gap: 14px; }
  .review-summary-order { padding: 12px; gap: 12px; }
  .review-order-ordinal { font-size: 44px; }
  .review-order-banner h3 { font-size: 22px; }
  .review-order-banner p { font-size: 13px; }
  .review-material { font-size: 17px; }
}

#actionConfirmDialog .review-quantity > strong { width: 5ch; flex: none; }

/* Keep the review scrollbar at the window edge, outside the centred cards. */
#actionConfirmDialog.review-confirmation[open] {
  --review-page-inset: max(24px,calc((100vw - 1173px) / 2)); padding-inline: 0;
}
#actionConfirmDialog.review-confirmation .order-review-summary { padding: 0 var(--review-page-inset) 4px; }
#actionConfirmDialog.review-confirmation .remove-dialog-actions { margin-inline: var(--review-page-inset); }
.review-summary-order { grid-template-rows: auto auto; }
.review-engraving { grid-row: 2; }
.review-style-body { display: grid; grid-template-columns: minmax(0,1fr) max-content; gap: 18px; }
.review-product { width: 100%; }
.review-style-body > .review-quantity { grid-column: auto; grid-row: auto; }
.review-quantity { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.review-quantity small { font-size: 12px; text-align: center; }
@media(max-width:700px) { .review-engraving { grid-row: 4; } }
@media(max-width:600px) {
  #actionConfirmDialog.review-confirmation[open] { --review-page-inset: 12px; }
  .review-style-body { gap: 12px; }
}
@media(max-width:350px) {
  .review-quantity :is(h3,h4) { font-size: 17px; }
  .review-product img { height: 90px; }
  .review-summary-address { font-size: clamp(12px,5cqw,16px); }
}

/* Review uses balanced columns; the selected photograph fills its own square. */
#OrderForm .submit-panel { grid-template-columns: minmax(0,1fr); }
#OrderForm .submit-panel #SubmitButton { width: 100%; }
.review-product img { height: clamp(150px,19vw,260px); aspect-ratio: auto; }
.review-style { padding-block: 12px; }
.review-engraving { align-self: start; }
/* Bone photographs have generous blank space above/below their wide silhouette. */
.review-product[data-shape="6"] {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  height: clamp(110px,11vw,150px);
}
.review-product[data-shape="6"] img { flex: none; }
@media(min-width:701px) {
  .review-summary-order,.review-completion { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .review-engraving,.review-style { align-self: stretch; }
  .review-style { display: grid; align-content: center; }
}

/* Trim each photograph's transparent margins while preserving the tag's scale. */
.review-product:not([data-shape="6"]) {
  --review-photo-height: clamp(150px,19vw,260px);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  height: max(110px,calc(var(--review-photo-height) * var(--review-silhouette-height, .75) + 36px));
}
.review-product:not([data-shape="6"]) img { flex: none; }
.review-product[data-shape="0"] { --review-silhouette-height: .51; }
.review-product[data-shape="1"] { --review-silhouette-height: .59; }
.review-product[data-shape="2"] { --review-silhouette-height: .67; }
.review-product[data-shape="3"] { --review-silhouette-height: .75; }
.review-product[data-shape="4"] { --review-silhouette-height: .63; }
.review-product[data-shape="5"] { --review-silhouette-height: .66; }

/* Give the fixed review actions a distinct steel frame without a scroll shadow. */
#actionConfirmDialog.review-confirmation .remove-dialog-actions {
  position: relative; z-index: 2; border: 3px solid #8097a3; background: #d6e0e5;
}
@media(max-width:700px) {
  #actionConfirmDialog .review-summary-details > .review-form-header { padding-bottom: 0; }
  .review-summary-address { top: 36%; }
}


/* Finish the review like the form: email and decisions beside the envelope, footer below. */
#actionConfirmDialog.review-confirmation[open] { grid-template-rows: minmax(0,1fr); }
.review-completion { align-items: start; }
.review-delivery-actions { display: flex; flex-direction: column; align-self: stretch; justify-content: space-between; gap: 16px; min-width: 0; }
@media(min-width:701px) { .review-delivery-actions { padding-block: 21px; } }
#actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions {
  margin: 0; grid-template-columns: minmax(0,1fr); width: 100%; gap: 14px;
}
#actionConfirmDialog.review-confirmation .site-footer { margin-top: 0; }
#actionConfirmDialog.review-confirmation .site-footer .footer-clear-details {
  display: inline-flex; width: auto; min-height: 44px; height: auto; padding: 6px 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit;
  font: inherit; text-decoration: underline; text-underline-offset: 3px; transform: none;
}
#actionConfirmDialog.review-confirmation .site-footer .footer-clear-details:focus-visible { outline: var(--focus); }
#actionConfirmDialog.review-confirmation .site-footer .footer-business { margin: 0 0 2px; font-size: 18px; font-weight: 650; }
#actionConfirmDialog.review-confirmation .site-footer .footer-copyright { margin: 10px 0 0; font-size: 12px; }

/* Review decisions use the same paper cards as the email and delivery details. */
#actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions {
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: #fff; padding: 20px;
}
@media(min-width:1101px) {
  .review-completion { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: #fff; }
  .review-completion > .review-summary-delivery { padding: 0; border: 0; border-radius: 0; background: transparent; }
  .review-completion > .review-delivery-actions { padding-block: 0; }
  .review-completion .review-email,
  #actionConfirmDialog.review-confirmation .review-completion .remove-dialog-actions { background: #f7fafb; }
}
@media(max-width:600px) {
  #actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions { padding: 12px; border-radius: 14px; }
}

/* Use the same centred shell as the form; reserve scrollbar space symmetrically. */
#actionConfirmDialog.review-confirmation .order-review-summary {
  padding-inline: 0; scrollbar-gutter: stable both-edges;
}
.review-summary-details { width: min(1152px,calc(100vw - 36px)); max-width: 100%; margin-inline: auto; }
#actionConfirmDialog.review-confirmation .site-footer .footer-clear-details { min-height: 32px; padding-block: 3px; line-height: 1.4; }
@media(min-width:1101px) {
  .review-completion { padding: 24px; }
  .review-summary-envelope {
    --review-envelope-inset: clamp(8px,1.1vw,14px);
    display: grid; grid-template-columns: minmax(0,1fr);
    grid-template-rows: clamp(calc(30% + .6 * var(--review-envelope-inset) + .6px),calc(100% - 166px),46%) minmax(0,1fr);
    padding: var(--review-envelope-inset); background: #fff;
    box-shadow: 0 2px 0 #d9dee0,2px 6px 10px #20344329;
  }
  .review-summary-stamp {
    top: var(--review-envelope-inset); right: var(--review-envelope-inset);
    height: calc(30% + .6px); max-width: none;
  }
  .review-summary-address {
    position: static; grid-column: 1; grid-row: 2; align-self: stretch;
    margin-inline: 15%; padding: 11px 12px; border: 1px solid transparent;
    min-height: 0; font-size: 22px; line-height: 1.4;
  }
}
@media(max-width:700px) {
  #actionConfirmDialog.review-confirmation .order-review-summary { scrollbar-gutter: auto; }
  .review-summary-details { width: calc(100% - 24px); }
}

@media(min-width:1101px) {
  #actionConfirmDialog.review-confirmation[open] { padding-block: 12px 26px; }
  #actionConfirmDialog .review-summary-details > .review-form-header { padding-bottom: 23px; }
  .review-summary-details { row-gap: 0; }
  .review-summary-details > .review-completion { margin-top: 24px; }
  #actionConfirmDialog.review-confirmation .review-summary-details > .site-footer { margin-top: 24px; }
}

/* Give the primary actions the same type, tick and lower breathing room. */
#OrderForm .submit-panel { padding-bottom: 24px; }
#actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions { padding-bottom: 24px; }
#actionConfirmDialog.review-confirmation #acceptActionConfirm {
  min-height: 58px; padding: 10px 20px; gap: 14px; border-radius: 11px;
  font-size: 19px; font-weight: 700; line-height: 1.2;
}
#actionConfirmDialog.review-confirmation #acceptActionConfirm::before { width: 28px; height: 28px; font-size: 18px; }

/* Shared compact phone geometry for entry and review. */
@media(max-width:600px) {
  body,#actionConfirmDialog.review-confirmation { background-attachment: fixed; }
  .review-summary-details { --order-panel-padding: 12px; }
  #OrderForm > .site-header { padding-bottom: 14px; }
  .review-completion,.review-delivery-actions { gap: 14px; }
  .review-summary-order,.review-summary-delivery,.review-email,
  #actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions { border-radius: var(--radius-panel); }
  .review-email,
  #actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions { background: var(--steel-light); }
  .review-email p { margin-top: 4px; font-size: 18px; font-weight: 400; }
  .review-summary-envelope {
    --review-envelope-inset: clamp(8px,1.1vw,14px);
    display: grid; grid-template-columns: minmax(0,1fr);
    grid-template-rows: clamp(calc(30% + .6 * var(--review-envelope-inset) + .6px),calc(100% - var(--review-address-room,166px)),46%) minmax(0,1fr);
    padding: var(--review-envelope-inset); background: #fff;
    box-shadow: 0 2px 0 #d9dee0,2px 6px 10px #20344329;
  }
  .review-summary-stamp { top: var(--review-envelope-inset); right: var(--review-envelope-inset); height: calc(30% + .6px); max-width: none; }
  .review-summary-address {
    position: static; grid-column: 1; grid-row: 2; align-self: stretch;
    margin-inline: 30% 0; padding: 11px 12px; border: 1px solid transparent;
    min-height: 0; overflow: auto; color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.4;
  }
  #OrderForm + .site-footer { margin-top: 14px; }
  .site-footer { padding-top: 20px; }
  #actionConfirmDialog.review-confirmation .site-footer { padding-top: 20px; }
}
@media(max-width:500px) {
  .review-summary-envelope { --review-address-room: 112px; }
  .review-summary-address { margin-inline-start: 15%; padding: 5px 8px; font-size: 16px; line-height: 1.25; }
}
@media(max-width:350px) {
  .review-summary-envelope { --review-envelope-inset: 5px; }
  .review-summary-address { margin-inline-start: 10%; padding-block: 2px; line-height: 1.05; }
}

/* Equal compact lower insets on the phone entry and review screens. */
@media(max-width:600px) {
  main.page-shell:has(> #OrderForm) { padding-bottom: 16px; }
  #OrderForm .submit-panel,
  #actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions { padding-bottom: 12px; }
  #actionConfirmDialog.review-confirmation[open] { padding-bottom: 12px; }
}

/* Position the address within i, measured from the stamp bottom to envelope bottom. */
.address-layout-measure {
  position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none;
  white-space: pre; overflow-wrap: normal; padding: 0; border: 0; box-sizing: content-box;
}
.envelope-face.is-address-positioned { grid-template-rows: var(--address-stamp-row) minmax(0,1fr); }
#OrderForm .envelope-face.is-address-positioned #PostalAdd { padding-top: var(--address-text-offset); }
.review-summary-envelope.is-address-positioned .review-summary-address {
  position: absolute; grid-area: auto; align-self: auto;
  left: var(--address-block-left); right: auto; width: var(--address-block-width);
  top: var(--address-block-top); bottom: auto; margin: 0; height: auto;
  max-height: var(--address-block-max-height); padding-block: 0; overflow: auto;
}

/* Keep the envelope ratio fixed; legacy over-limit addresses remain scrollable. */
.envelope-face,.review-summary-envelope { min-height: 0; }
#OrderForm .envelope-face.is-address-positioned #PostalAdd { padding-bottom: 0; max-height: none; overflow: auto; white-space: pre; overflow-wrap: normal; }
.review-summary-envelope.is-address-positioned .review-summary-address { overflow: auto; }

/* Pale teal is the resting choice surface; white marks the selected tag/metal. */
@media(forced-colors:none) {
  #OrderForm .shape-card-inner { background: #EDF2F8; }
  #OrderForm .shape-card input:checked + .shape-card-inner { background: #fff; }
  #OrderForm .material-options > .material-choice,
  #OrderForm .material-options.choice-buttons:has(input:checked) > .material-choice.radio-choice:not(:has(input:checked)) { background: #EDF2F8; }
  #OrderForm .material-options > .material-choice:has(input:checked) { background: #fff; }
  .review-product { background: #fff; }
}

/* Fit review frames to the visible 480px artwork, without extra padding around the silhouette. */
.review-style-body {
  container-type: inline-size; --review-quantity-column: 100px; --review-group-gap: 48px;
  grid-template-columns: max-content var(--review-quantity-column); justify-content: center; gap: var(--review-group-gap);
}
.review-style-body .review-product {
  --review-shape-width: .5; --review-shape-height: .505; --review-shape-x: 0; --review-shape-y: -.00625;
  --review-photo-size: min(clamp(150px,19vw,260px),calc((100cqi - var(--review-quantity-column) - var(--review-group-gap)) / var(--review-shape-width)));
  display: flex; align-items: center; justify-content: center; overflow: visible; flex: none; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  width: calc(var(--review-photo-size) * var(--review-shape-width));
  height: calc(var(--review-photo-size) * var(--review-shape-height));
}
.review-style-body .review-product img {
  width: var(--review-photo-size); height: var(--review-photo-size); max-width: none; flex: none; pointer-events: none;
  transform: translate(calc(var(--review-photo-size) * var(--review-shape-x)),calc(var(--review-photo-size) * var(--review-shape-y)));
}
.review-style-body .review-product[data-shape="1"] { --review-shape-width: .582; --review-shape-height: .586; --review-shape-x: -.00104; --review-shape-y: -.00729; }
.review-style-body .review-product[data-shape="2"] { --review-shape-width: .66; --review-shape-height: .665; --review-shape-x: -.00208; --review-shape-y: -.00729; }
.review-style-body .review-product[data-shape="3"] { --review-shape-width: .75; --review-shape-height: .75; --review-shape-x: -.00104; --review-shape-y: -.00417; }
.review-style-body .review-product[data-shape="4"] { --review-shape-width: .655; --review-shape-height: .63; --review-shape-x: -.00208; --review-shape-y: -.00729; }
.review-style-body .review-product[data-shape="5"] { --review-shape-width: .665; --review-shape-height: .655; --review-shape-x: -.00104; --review-shape-y: -.00313; }
.review-style-body .review-product[data-shape="6"] { --review-shape-width: .9; --review-shape-height: .438; --review-shape-x: -.00104; --review-shape-y: -.00625; }
#actionConfirmDialog .review-quantity > strong { width: 100px; height: 54px; min-height: 54px; font-size: 28px; line-height: 44px; }
.review-summary-printing { line-height: 1.35; }
@media(max-width:600px) {
  .review-style-body { --review-quantity-column: 94px; --review-group-gap: 36px; }
  #actionConfirmDialog .review-quantity > strong { width: 90px; height: 50px; min-height: 50px; font-size: 26px; line-height: 40px; }
}
@media(max-width:350px) {
  .review-style-body { --review-quantity-column: 80px; }
  #actionConfirmDialog .review-quantity > strong { width: 78px; height: 48px; min-height: 48px; font-size: 24px; line-height: 38px; }
}

/* The review starts with 01 and finishes at its decisions, without page furniture. */
/* Use the same outer inset on every side of the independent Add card. */
#OrderForm > .detached-add-order { padding: var(--order-panel-padding); }
@media(max-width:850px) {
  #OrderForm .engraving-row > .tag-text-line { font-size: 19px; font-weight: 600; }
}

#actionConfirmDialog.review-confirmation[open] { padding-top: 6px; padding-bottom: 6px; }
#actionConfirmDialog.review-confirmation .order-review-summary {
  padding-block: 0;
  display: flex;
  flex-direction: column;
}
/* Auto margins centre a short review and collapse when its content needs scrolling. */
.review-summary-details { flex: 0 0 auto; margin-block: auto; }
.review-delivery-actions { padding-bottom: 0; }
/* Centre a common-width label group so both review icons share the same axis. */
#actionConfirmDialog.review-confirmation .review-completion .review-email { background: #fff; }
#actionConfirmDialog.review-confirmation .review-completion .remove-dialog-actions { background: #fff; }
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm) {
  min-height: 58px; padding: 10px 12px;
  font-size: 19px; font-weight: 700; line-height: 1.2;
}
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm)::before { content: none; }
.review-action-content {
  display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center;
  gap: 14px; width: fit-content; max-width: 100%; text-align: center;
}
.review-action-content::before {
  content: '✓' / ''; display: grid; place-items: center;
  width: 28px; height: 28px; border: 1px solid #ffffff65; border-radius: 50%;
  background-color: transparent; font-size: 18px;
}
#cancelActionConfirm .review-action-content::before {
  content: ''; border: 0; border-radius: 0; clip-path: none;
  background: transparent url("assets/edit-details.svg?v=20261121-soft-navy") center / contain no-repeat;
}
#acceptActionConfirm .review-action-content { grid-template-columns: minmax(0,1fr) 32px; }
#acceptActionConfirm .review-action-content::before { content: none; }
#acceptActionConfirm .review-action-content::after {
  content: ''; width: 32px; height: 32px;
  background: transparent url("assets/send-order.svg?v=20261121-native-size") center / 32px 32px no-repeat;
}
/* Let the envelope, email and decisions sit directly on the review background. */
#actionConfirmDialog.review-confirmation .review-summary-details > .review-completion,
#actionConfirmDialog.review-confirmation .review-completion > .review-summary-delivery {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
#actionConfirmDialog.review-confirmation .review-summary-envelope { background-color: #fff; }

/* Centre each icon and label together, with full-width cards on wide screens. */
.review-contact-actions { display: grid; gap: 12px; min-width: 0; container: review-actions / inline-size; }
#OrderForm #SubmitButton { justify-content: center; text-align: center; padding-inline: 12px; }
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm) { justify-content: center; text-align: center; }
@media(min-width:1101px) {
  @container order-form-space (min-width:1050px) {
    #OrderForm .submit-panel {
      width: 100%; max-width: 100%;
    }
    #OrderForm .submit-panel #SubmitButton {
      width: 100%; white-space: normal;
    }
  }
  #actionConfirmDialog.review-confirmation .review-delivery-actions .remove-dialog-actions {
    width: 100%; max-width: 100%; padding: 20px;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  #actionConfirmDialog.review-confirmation .review-delivery-actions { justify-content: flex-end; }
  .review-contact-actions {
    gap: 18px;
  }
}
#actionConfirmDialog.review-confirmation .review-contact-actions > .remove-dialog-actions {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  grid-template-columns: minmax(0,1fr);
}
@container review-actions (min-width:34rem) {
  #actionConfirmDialog.review-confirmation .review-contact-actions > .remove-dialog-actions {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* Keep the email on its own card, with the review action directly beneath it. */
#OrderForm .submit-panel {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  row-gap: 12px;
}
#OrderForm .submit-panel > .email-entry-card {
  min-width: 0; padding: 12px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-panel); background: var(--steel-light); box-shadow: var(--shadow);
}
#OrderForm .email-entry-card > #emailError { display: block; margin-top: 8px; color: var(--danger); }
#OrderForm .email-entry-card > #emailError[hidden] { display: none; }
#OrderForm .submit-panel #SubmitButton { margin-top: 0; }
@media(max-width:600px) {
  #OrderForm .submit-panel > .email-entry-card { padding: 12px; }
}
@media(min-width:1101px) {
  #OrderForm .submit-panel { row-gap: 8px; padding-bottom: 4px; }
}

/* A soft lift replaces the solid lower ledge on the three order actions. */
#OrderForm #SubmitButton:not(:disabled),
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm) {
  box-shadow: 0 3px 10px #20344345;
  transition: background .12s,box-shadow .16s ease;
  word-spacing: .06em;
  transform: none;
}
#OrderForm #SubmitButton:not(:disabled):is(:active,.is-action-pressed),
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm):is(:active,.is-action-pressed) {
  transform: none; box-shadow: inset 0 1px 3px #20344318,0 1px 3px #20344320;
}
/* Press feedback stays entirely in the shadow; content and scroll bounds stay put. */
#OrderForm #SubmitButton.is-pointer-focused:focus,
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm).is-pointer-focused:focus {
  outline: none;
}
#OrderForm #SubmitButton:focus,
#actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm):focus { outline: none; }
body.is-keyboard-navigation #OrderForm #SubmitButton:focus-visible,
body.is-keyboard-navigation #actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm):focus-visible {
  outline: var(--focus); outline-offset: 3px;
}
/* Correction dialogs can autofocus a button after a pointer-triggered prompt. */
body:not(.is-keyboard-navigation) .remove-dialog button:focus { outline: none; }
/* Include shadow clearance in the scrollable content so Submit stays complete. */
#actionConfirmDialog.review-confirmation .order-review-summary { padding-bottom: 12px; }
@media(prefers-reduced-motion:reduce) {
  #OrderForm #SubmitButton:not(:disabled),
  #actionConfirmDialog.review-confirmation :is(#cancelActionConfirm,#acceptActionConfirm) { transition: none; }
}

/* Match the review envelope's lift and balance the space around the email card. */
#actionConfirmDialog.review-confirmation .review-summary-envelope { box-shadow: var(--order-action-shadow); }
#actionConfirmDialog.review-confirmation .review-email { padding-bottom: 14px; }
@media(max-width:600px) {
  #actionConfirmDialog.review-confirmation .review-email { padding-bottom: 9px; }
}
@media(min-width:1101px) {
  #actionConfirmDialog.review-confirmation .review-completion { align-items: end; }
  #actionConfirmDialog.review-confirmation .review-delivery-actions { padding-block: 0; justify-content: flex-end; }
}

#OrderForm .submit-panel > .email-entry-card,
#actionConfirmDialog.review-confirmation .review-email { box-shadow: var(--order-action-shadow); }
#OrderForm .remove-tag-order {
  transform: none; box-shadow: none; transition: none; animation: none;
}
button,[role="button"],summary.button-outline {
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}

/* Give the outer paper cards one shared lift, without raising nested controls. */
#OrderForm .site-header .account-outer-card,
#OrderForm :is(.tag-order,.detached-add-order),
#actionConfirmDialog.review-confirmation .review-summary-order {
  box-shadow: var(--order-action-shadow);
}
/* On stacked layouts, Dispatch and Postage form the two halves of one card. */
#OrderForm .delivery-panel {
  box-shadow: var(--order-action-shadow); clip-path: inset(-20px -20px 0);
}
#OrderForm .delivery-postage {
  box-shadow: var(--order-action-shadow); clip-path: inset(0 -20px -20px);
}
@media(min-width:1101px) {
  @container order-form-space (min-width:1050px) {
    #OrderForm > .order-completion { box-shadow: var(--order-action-shadow); }
    #OrderForm :is(.delivery-panel,.delivery-postage) { box-shadow: none; clip-path: none; }
  }
}

/* One scroll owner keeps both ends reachable as content and the viewport settle. */
#actionConfirmDialog.review-confirmation[open] {
  inset: 0; width: 100%; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; min-height: 0;
  outline: none;
  display: flex; flex-direction: column; gap: 0;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  padding: max(6px,env(safe-area-inset-top,0px)) 0 max(18px,env(safe-area-inset-bottom,0px));
}
#actionConfirmDialog.review-confirmation .order-review-summary {
  flex: 1 0 auto; width: 100%; height: auto; max-height: none;
  overflow: visible; padding: 0; scrollbar-gutter: auto;
}
@media(max-width:700px) {
  #actionConfirmDialog.review-confirmation[open] { scrollbar-gutter: auto; }
}

/* Quiet company footer: the navy review action stays visually dominant. */
.site-footer {
  margin: 24px 0 0; padding: 28px 28px 0; border: 1px solid #CBD8E5;
  border-radius: 20px; background: linear-gradient(130deg,#F5F8FC,#E8EFF6);
  box-shadow: 0 3px 10px #2034430D; color: #244C75; text-align: left; line-height: 1.5;
}
.site-footer .footer-intro { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.site-footer .footer-company { min-width: 0; }
.site-footer .footer-intro:has(.footer-brand-image) { justify-content:center; }
.site-footer .footer-brand-image { display:block; width:min(580px,100%); height:auto; border-radius:12px; box-shadow:0 3px 10px #20344325; }
.site-footer .footer-seal {
  flex: none; display: grid; place-items: center; width: 50px; height: 56px;
  background: #FFFFFF80; border: 1px solid #C6D7E8; border-radius: 15px;
  transform: rotate(-5deg);
}
.site-footer .footer-seal img { display: block; width: 34px; height: 34px; transform: rotate(5deg); }
.site-footer .footer-business { margin: 0 0 4px; font-size: 23px; font-weight: 650; color: #244C75; letter-spacing: .01em; }
.site-footer address { font-size: 14px; color: #526674; overflow-wrap: anywhere; }
@media(min-width:1101px) {
  .site-footer address { font-size: 16px; }
  .site-footer .footer-intro { margin-bottom: 14px; }
}
.site-footer .footer-contact { display: grid; grid-template-columns: 1fr 1.18fr 1.12fr .85fr 1.3fr; gap: 10px; margin: 0; }
.site-footer .footer-contact > :is(a,.footer-clear-details) {
  display: flex; align-items: center; justify-content: flex-start; gap: 11px; min-width: 0;
  min-height: 60px; padding: 10px 13px; border: 1px solid #CCD9E6; border-radius: 12px;
  background: #FFFFFF65; color: #244C75; text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.5;
}
.site-footer .footer-contact > :is(a,.footer-clear-details) > span { overflow-wrap: anywhere; }
.site-footer .footer-contact > a { white-space: normal; }
.site-footer .footer-contact .footer-icon { display: block; width: 28px; height: 28px; flex: 0 0 28px; color: #456D94; }
.site-footer .footer-contact > :is(a,.footer-clear-details):hover:not(:disabled) { background: #fff; border-color: #A5BCD2; }
.site-footer .footer-contact > :is(a,.footer-clear-details):focus-visible { outline: var(--focus); outline-offset: 3px; }
body:not(.is-keyboard-navigation) .site-footer .footer-contact > :is(a,.footer-clear-details):focus { outline: none; }
.site-footer .footer-contact > .footer-clear-details { justify-content: center; background: transparent; border-color: transparent; color: #607485; font-weight: 400; text-align: center; }
.site-footer .footer-clear-details .footer-icon { color: #607485; }
.site-footer .footer-copyright { border-top: 1px solid #CBD8E5; margin: 6px 0 0; padding: 8px 0; font-size: 11px; color: #607485; text-align: center; }
@media(min-width:1101px) {
  .site-footer .footer-copyright { border-top: 0; }
}
main.page-shell:has(> #OrderForm) { padding-bottom: 6px; }
@media(max-width:1100px) {
  .site-footer .footer-contact { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer .footer-contact > .footer-clear-details { grid-column: 1 / -1; justify-content: center; }
}
@media(max-width:700px) {
  .site-footer { padding: 19px 16px 0; border-radius: 17px; margin-top: 18px; }
  .site-footer .footer-intro { gap: 12px; margin-bottom: 18px; }
  .site-footer .footer-seal { width: 39px; height: 45px; border-radius: 12px; }
  .site-footer .footer-seal img { width: 28px; height: 28px; }
  .site-footer .footer-business { font-size: 19px; }
  .site-footer address { font-size: 12px; }
  .site-footer .footer-contact { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 8px; }
  .site-footer .footer-contact > :is(a,.footer-clear-details) { gap: 8px; min-height: 44px; padding: 5px 10px; font-size: 12px; }
  .site-footer .footer-contact .footer-icon { width: 25px; height: 25px; flex-basis: 25px; }
  .site-footer .footer-contact > .footer-clear-details { grid-column: 1 / -1; justify-content: center; }
  .site-footer .footer-copyright { font-size: 10px; }
}
@media(max-width:360px) {
  .site-footer .footer-contact > :is(a,.footer-clear-details) { gap: 6px; padding-inline: 6px; font-size: 11px; }
  .site-footer .footer-contact .footer-icon { width: 22px; height: 22px; flex-basis: 22px; }
}

/* Destination stays selected while its alternative is folded away. */
#OrderForm .delivery-choice .delivery-options { position: relative; }
#OrderForm .delivery-choice .delivery-options label > span { user-select: none; -webkit-user-select: none; }
#OrderForm .delivery-choice .delivery-options label { translate: none !important; transition: none; }
#OrderForm .delivery-choice .delivery-options.is-collapsed { grid-template-columns: minmax(0,1fr); }
#OrderForm .delivery-choice .delivery-options.is-collapsed label { translate: none !important; transition: none; padding-right: 54px; }
#OrderForm .delivery-choice .delivery-options > .delivery-expand {
  position: absolute; z-index: 3; right: var(--delivery-chevron-gap, 8px); top: 50%; transform: translateY(-50%) !important;
  display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px;
  padding: 5px; border: 1px solid #A5BCD2; border-radius: 7px;
  background: #F5F8FC; color: #244C75; box-shadow: none;
}
.site-footer .footer-business { white-space: nowrap; }
.site-footer address { white-space: nowrap; max-width: 100%; }
.site-footer .footer-contact { grid-template-columns: repeat(6,minmax(0,1fr)); align-items:stretch; }
.site-footer .footer-contact > .footer-clear-details {
  grid-column:auto; border-color:#CCD9E6; background:#FFFFFF35;
}
@media(max-width:1100px) {
  .site-footer .footer-contact { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:700px) {
  .site-footer .footer-contact { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(min-width:601px) {
  #OrderForm .delivery-choice .delivery-options.is-collapsed { width: var(--selected-delivery-width) !important; }
  #OrderForm .delivery-choice .delivery-options.is-collapsed label { padding-right: 40px; }
  #OrderForm .delivery-choice .delivery-options.is-collapsed label small { font-size: 11px; }
  #OrderForm .delivery-choice .delivery-options > .delivery-expand { right: var(--delivery-chevron-gap, 5px); width: 30px; height: 32px; min-height: 32px; }
}

/* Line Tools provides movement controls without a drag gutter beside the text. */
#OrderForm .engraving-row .drag-handle { display:none; }
.draft-status { margin:0 0 18px; padding:12px 16px; border:1px solid #B5A36C; border-radius:10px; background:#FFF9E9; color:#493E22; line-height:1.5; white-space:pre-line; }
#OrderForm .engraving-row > .tag-text-line { grid-column:1; }
#OrderForm .engraving-row .side-buttons { grid-column:2; }
@media(min-width:601px) {
  #OrderForm .engraving-row { grid-template-columns:minmax(0,1fr) 100px; }
}
@media(min-width:1101px) {
  #OrderForm .has-compact-tag-picker .tag-config > .choice-fieldset > legend.form-heading {
    padding-top:7px; padding-bottom:5px;
  }
  #OrderForm .has-compact-tag-picker .shape-grid { margin-top:18px; }
}
@media(max-width:600px) {
  .review-style-body { --review-quantity-column:82px; }
  #actionConfirmDialog .review-quantity { gap:6px; }
  #actionConfirmDialog .review-quantity :is(h3,h4) { font-size:16px; }
  #actionConfirmDialog .review-quantity > strong {
    width:76px; height:44px; min-height:44px; font-size:23px; line-height:34px;
  }
  #actionConfirmDialog .review-style { padding-block:10px; }
}
@media(max-width:350px) {
  .review-style-body { --review-quantity-column:72px; }
  #actionConfirmDialog .review-quantity > strong { width:70px; }
}


/* Match every footer action's icon/text inset and visual weight. */
.site-footer .footer-contact > :is(a,.footer-clear-details) {
  padding-inline: 17px; justify-content: flex-start; text-align: left;
}
.site-footer .footer-contact > .footer-clear-details {
  color: #244C75; font-weight: 500; background: #FFFFFF65; border-color: #CCD9E6;
}
.site-footer .footer-clear-details .footer-icon { color: #456D94; }
@media(max-width:700px) {
  .site-footer .footer-contact > :is(a,.footer-clear-details) { padding-inline: 14px; }
}
@media(max-width:360px) {
  .site-footer .footer-contact > :is(a,.footer-clear-details) { padding-inline: 10px; }
}

/* Touch editors use one caret, tied to the visible custom keypad. */
#OrderForm.uses-touch-keypad :is(input, textarea) { caret-color: transparent; }
.touch-keypad-caret {
  position: fixed; width: 1.5px; background: #173653; pointer-events: none;
  z-index: 10000; animation: touch-caret-blink 1s step-end infinite !important;
}
.touch-keypad-caret[hidden] { display: none; }
@keyframes touch-caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media print { .touch-keypad-caret { display: none; } }

/* Saved email choices stay beside the heading without adding a form row. */
#OrderForm .email-entry-card { position: relative; }
#OrderForm .email-entry-card:has(#savedEmailToggle:not([hidden])) .form-heading { padding-right: 104px; min-height: 44px; }
#OrderForm .saved-email-toggle { position: absolute; top: 12px; right: 12px; min-height: 44px; padding: 6px 9px; font-size: 12px; }
#savedEmailDialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.saved-email-options { display: grid; gap: 8px; margin-bottom: 16px; }
.saved-email-options > button { min-height: 44px; width: 100%; text-align: left; overflow-wrap: anywhere; padding: 10px 12px; }
