/* Design Your Gift v2. The store's theme supplies the type and colours (host.js sets these variables from the
   tokens the page sends); the values here are neutral fallbacks only, not any store's brand. Lines and tints are
   drawn from the text colour. Nothing is fixed to the screen: the builder runs in a frame as tall as its content. */
:root {
  --ink: #1a1a1a;
  --heading-ink: var(--ink);
  --paper: #fff;
  --button: #1a1a1a;
  --button-ink: #fff;
  --pill-radius: 999px;
  --button-border: var(--button);
  --button-weight: 600;
  --button-size: 15px;
  --button-case: none;
  --button-tracking: normal;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-body);
  --heading-weight: 600;
  --line: color-mix(in srgb, var(--ink) 13%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 32%, transparent);
  --sunk: color-mix(in srgb, var(--ink) 4.5%, transparent);
  --muted: color-mix(in srgb, var(--ink) 64%, transparent);
  --good: #2f6b45;
  --warn: #9a4a12;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--heading-ink); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
img { display: block; max-width: 100%; }

.dyg { max-width: 1200px; margin: 0 auto; padding: 22px 24px 64px; }

/* ---- steps ---- */
.dyg-steps { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 0 0 26px; padding: 0; counter-reset: s; }
.dyg-steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.dyg-steps li + li::before { content: ""; width: 34px; height: 1px; background: var(--line-strong); }
.dyg-steps button { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; }
.dyg-steps button:disabled { opacity: .7; }
.dyg-step-no { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12.5px; }
.dyg-steps .is-active { color: var(--ink); font-weight: 600; }
.dyg-steps .is-active .dyg-step-no { background: var(--button); color: var(--button-ink); border-color: var(--button); }
.dyg-steps .is-done { color: var(--ink); }
.dyg-steps .is-done .dyg-step-no { border-color: var(--ink); }
.dyg-steps .is-done button:hover { text-decoration: underline; }

/* ---- layout ---- */
.dyg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.dyg-summary { position: sticky; top: 20px; }
.dyg-head { margin-bottom: 18px; }
.dyg-eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dyg-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.dyg-head p { margin: 6px 0 0; color: var(--muted); }
.dyg-h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.dyg-sub { margin: 10px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dyg-ghost { color: var(--muted); font-style: italic; }
.dyg-note { margin: 4px 0 0; padding: 14px; border-radius: var(--radius); background: var(--sunk); color: var(--muted); }

/* ---- blocks (step 1) ---- */
.dyg-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; margin-bottom: 14px; transition: border-color .2s; }
.dyg-block.is-done { border-color: var(--line-strong); }
.dyg-block-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.dyg-block-head h2 { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.dyg-block-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.dyg-block-no { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; }
.dyg-block.is-done .dyg-block-no { background: var(--good); border-color: var(--good); color: #fff; }

.dyg-who { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dyg-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; transition: border-color .15s, background .15s; }
.dyg-tile img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.dyg-tile:hover { border-color: var(--line-strong); }
.dyg-tile.is-on { border: 2px solid var(--ink); padding: 9px 5px; background: var(--sunk); font-weight: 600; }

/* Occasion and holiday tiles: the live step's artwork over the label. */
.dyg-occs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.dyg-occ { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; text-align: center; line-height: 1.25; }
.dyg-occ:hover { border-color: var(--line-strong); }
.dyg-occ.is-on { border: 2px solid var(--ink); padding: 9px 5px; background: var(--sunk); font-weight: 600; }
.dyg-occ-art svg { display: block; width: 36px; height: 36px; }
.dyg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dyg-chip { border: 1px solid var(--line-strong); border-radius: var(--pill-radius); padding: 8px 16px; font-size: 14px; transition: background .15s; }
.dyg-chip:hover { background: var(--sunk); }
.dyg-chip.is-on { background: var(--button); color: var(--button-ink); border-color: var(--button); }
.dyg-chip.is-small { padding: 5px 12px; font-size: 13px; }
.dyg-chips-wrap .dyg-sub:first-child { margin-top: 0; }
.dyg-other { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px 0 14px; }
.dyg-other .dyg-budget-other { border: 0 !important; width: 76px; padding: 7px 4px !important; background: none; }
.dyg-input { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; background: var(--paper); }
.dyg-input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }

/* ---- items (step 2) ---- */
.dyg-fill { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--sunk); margin-bottom: 20px; }
.dyg-fill span { color: var(--muted); }
/* The gift brought back after a refresh (saved-gift.js), with a way to start a new one instead. */
.dyg-restored { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px 10px 16px; border-radius: var(--radius); background: var(--sunk); margin-bottom: 18px; font-size: 14px; }
.dyg-restored p { margin: 0; flex: 1 1 260px; }
.dyg-restored .dyg-remove { margin-left: auto; }
/* Basket cards: the basket's photo, name and price; one is chosen. */
.dyg-hint { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.dyg-chosen { margin: 0 0 10px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--good); font-weight: 600; }
.dyg-baskets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.dyg-more { margin: -12px 0 26px; }
.dyg-basket { display: flex; flex-direction: column; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.dyg-basket:hover { border-color: var(--line-strong); }
.dyg-basket.is-on { border: 2px solid var(--ink); padding: 9px; }
.dyg-basket-img { position: relative; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; }
.dyg-basket-img img { max-height: 100%; object-fit: contain; }
.dyg-basket-name { font-size: 13.5px; line-height: 1.3; flex: 1; }
.dyg-basket .dyg-price { margin: 6px 0 0; }
.dyg-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.is-on > .dyg-radio { border: 5px solid var(--ink); }
.dyg-tabs { margin-bottom: 14px; }
.dyg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.dyg-prod { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.dyg-prod.is-in { border-color: var(--ink); }
.dyg-prod-img { aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; }
.dyg-prod-img img { max-height: 100%; object-fit: contain; }
.dyg-prod h3 { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.3; flex: 1; }
.dyg-price { margin: 6px 0 8px; font-weight: 600; }
.dyg-add { border: 1px solid var(--ink); border-radius: 999px; padding: 7px 0; font-size: 14px; font-weight: 600; }
.dyg-add:hover { background: var(--button); color: var(--button-ink); }
.dyg-qty { display: flex; align-items: center; justify-content: space-between; background: var(--button); color: var(--button-ink); border-radius: 999px; }
.dyg-qty button { width: 38px; height: 34px; font-size: 18px; color: inherit; }
.dyg-qty span { font-weight: 600; }

/* ---- card (step 3) ---- */
.dyg-card-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
.dyg-card-side { position: sticky; top: 20px; }
.dyg-card-side .dyg-sub { margin-top: 0; }
.dyg-card-part { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.dyg-switch { display: flex; align-items: center; gap: 12px; padding: 4px 0 18px; cursor: pointer; }
.dyg-switch input { position: absolute; opacity: 0; }
.dyg-switch-ui { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; }
.dyg-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.dyg-switch input:checked + .dyg-switch-ui { background: var(--good); }
.dyg-switch input:checked + .dyg-switch-ui::after { transform: translateX(18px); }
.dyg-switch input:focus-visible + .dyg-switch-ui { outline: 2px solid var(--ink); outline-offset: 2px; }
.dyg-switch strong { display: block; font-weight: 600; }
.dyg-switch small { color: var(--muted); }
.dyg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dyg-field { display: block; margin-bottom: 12px; position: relative; }
.dyg-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.dyg-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: var(--sunk); margin-bottom: 14px; }
.dyg-seg button { padding: 9px 6px; border-radius: 7px; font-size: 14px; color: var(--muted); }
.dyg-seg .is-on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 18%, transparent); }
.dyg-tone { margin-bottom: 12px; }
.dyg-tone .dyg-sub { display: block; margin-top: 0; }
.dyg-ideas { display: grid; gap: 10px; }
.dyg-idea { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.dyg-idea:hover { border-color: var(--line-strong); }
.dyg-idea.is-on { border: 2px solid var(--ink); padding: 13px; }
.dyg-idea .dyg-radio { margin-top: 2px; }
.dyg-idea p { margin: 0; }
.dyg-idea-text { flex: 1; border: 0; padding: 0; resize: vertical; background: none; font-weight: 600; min-height: 66px; }
.dyg-idea-text:focus { outline: none; }
.dyg-ideas-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; margin-top: 10px; }
.dyg-ideas-foot .dyg-sub { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; }
.dyg-own { resize: vertical; min-height: 140px; font-weight: 600; }
.dyg-count { position: absolute; right: 10px; bottom: 8px; font-weight: 600; color: var(--muted); font-size: 12px; }
.dyg-row { display: flex; justify-content: space-between; align-items: center; }
.dyg-arrows { display: flex; gap: 6px; margin-bottom: 10px; }
.dyg-arrows button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 20px; line-height: 1; }
.dyg-arrows button:hover { background: var(--sunk); }
.dyg-fronts { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: thin; }
.dyg-front-pick { flex: none; width: 116px; aspect-ratio: 5 / 7; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); position: relative; scroll-snap-align: start; }
.dyg-front-pick img { width: 100%; height: 100%; object-fit: cover; }
.dyg-front-pick.is-on { outline: 3px solid var(--ink); outline-offset: -3px; }
.dyg-tick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 13px; }

.dyg-preview { display: grid; gap: 8px; }
.dyg-preview.is-off { padding: 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }
/* The card opened out, as the builder's review shows it (cbd-open-card): two squares, front then inside. In the
   narrow column beside the form they stack, as the builder's review does on a phone. */
.dyg-open-card { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid #dfe3ea; border-radius: 12px; overflow: hidden; background: #fff; color: #1a1a1a; box-shadow: 0 14px 32px rgba(20, 32, 52, 0.1); }
.dyg-print-card { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; border-bottom: 1px solid #dfe3ea; }
.dyg-print-card img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dyg-print-card-text { position: absolute; inset: 7% 8% auto; text-align: center; font-weight: 700; font-size: 1.1rem; line-height: 1.1; color: #182230; text-wrap: balance; }
.dyg-open-card-inside { padding: 10% 8%; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 150px; }
.dyg-open-card-inside > div { width: 100%; }
.dyg-open-card-inside p { margin: 0; }
.dyg-open-card-to, .dyg-open-card-from { font-weight: 650; }
.dyg-open-card-message { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.55; margin: 1.1rem 0 !important; }
.dyg-open-card-note { text-align: center; color: #5e6878; font-size: 0.85em; margin: 0; }

/* ---- delivery (step 4) ---- */
.dyg-field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.dyg-search-row { display: flex; gap: 8px; max-width: 420px; }
.dyg-zip { flex: 1; font-size: 16px; letter-spacing: .04em; }
.dyg-btn-check { background: var(--button); color: var(--button-ink); border: 1px solid var(--button-border); padding: 10px 22px; }
.dyg-btn-check:disabled { opacity: .6; }
.dyg-alert { margin: 12px 0 0; color: var(--warn); font-weight: 600; font-size: 14px; }
.dyg-when { margin-top: 22px; }
/* The next three weeks in a strip, as the live step shows them; days it can't have stay visible, greyed, with why. */
.dyg-dates { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.dyg-date { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; padding: 9px 4px; border: 1px solid var(--line); border-radius: 10px; scroll-snap-align: start; }
.dyg-date:hover:not(:disabled) { border-color: var(--ink); }
.dyg-date.is-off { opacity: .38; cursor: not-allowed; }
.dyg-date strong { font-size: 20px; line-height: 1.15; }
.dyg-more-dates { margin-top: 8px; }
.dyg-chosen-date { margin: 8px 0 0; font-weight: 600; }
.dyg-calendar { margin-top: 12px; max-width: 340px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.dyg-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dyg-calendar-head button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 18px; }
.dyg-calendar-head button:disabled { opacity: .3; }
.dyg-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-bottom: 10px; }
.dyg-calendar-wd { font-size: 11px; color: var(--muted); padding: 4px 0; }
.dyg-calendar-grid button { aspect-ratio: 1; border-radius: 8px; font-size: 14px; }
.dyg-calendar-grid button:hover:not(:disabled) { background: var(--sunk); }
.dyg-calendar-grid button:disabled { opacity: .3; cursor: not-allowed; }
.dyg-calendar-grid button.is-on { background: var(--button); color: var(--button-ink); }
.dyg-date small { color: var(--muted); font-size: 12px; }
.dyg-date strong { font-size: 15px; }
.dyg-date.is-on { background: var(--button); color: var(--button-ink); border-color: var(--button); }
.dyg-date.is-on small { color: inherit; opacity: .8; }
.dyg-lines { margin: 0; }
.dyg-lines div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.dyg-lines dt { color: var(--muted); }
.dyg-lines dd { margin: 0; display: flex; justify-content: space-between; gap: 10px; }

/* ---- summary ---- */
.dyg-sum { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.dyg-sum h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.dyg-sum-for { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.dyg-meter { margin-bottom: 14px; }
.dyg-meter-bar { height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.dyg-meter-bar span { display: block; height: 100%; background: var(--good); transition: width .3s; }
.dyg-meter.is-over .dyg-meter-bar span { background: var(--warn); }
.dyg-meter p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.dyg-meter.is-over p { color: var(--warn); font-weight: 600; }
.dyg-sum-items { list-style: none; margin: 0 0 10px; padding: 0; max-height: 240px; overflow: auto; }
.dyg-sum-items li, .dyg-sum-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; border-top: 1px solid var(--line); }
.dyg-sum-items img, .dyg-sum-card img { width: 34px; height: 34px; object-fit: contain; }
.dyg-sum-card { margin-bottom: 10px; }
.dyg-sum-card img { object-fit: cover; border-radius: 3px; }
.dyg-sum-card strong { display: block; font-weight: 600; }
.dyg-sum-card small { color: var(--muted); display: block; line-height: 1.3; }
.dyg-sum-money { margin: 0 0 14px; }
.dyg-sum-money div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.dyg-sum-money dd { margin: 0; }
.dyg-sum-money .is-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 17px; font-weight: 700; }
.dyg-sum-missing { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.dyg-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--pill-radius); padding: 12px 20px; font-weight: var(--button-weight); font-size: var(--button-size); text-transform: var(--button-case); letter-spacing: var(--button-tracking); white-space: nowrap; }
.dyg-btn-main { width: 100%; background: var(--button); color: var(--button-ink); border: 1px solid var(--button-border); }
.dyg-btn-main.is-waiting { opacity: .45; }
.dyg-btn-ghost { border: 1px solid var(--ink); padding: 9px 16px; }
.dyg-btn-ghost:hover { background: var(--button); color: var(--button-ink); }
.dyg-link { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.dyg-back { display: block; margin: 12px auto 0; color: var(--muted); }


@media (max-width: 980px) {
  .dyg-card-layout { grid-template-columns: minmax(0, 1fr); }
  .dyg-card-side { position: static; order: -1; }
  /* Full width above the form: front beside inside, as the builder's review lays it out. */
  .dyg-open-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 640px; width: 100%; margin: 0 auto; }
  .dyg-print-card { border-bottom: 0; border-right: 1px solid #dfe3ea; }
  .dyg-open-card-inside { aspect-ratio: 1 / 1; min-height: 0; }
}
@media (max-width: 520px) {
  .dyg-open-card { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
  .dyg-print-card { border-right: 0; border-bottom: 1px solid #dfe3ea; }
  .dyg-open-card-inside { aspect-ratio: auto; padding: 10% 8%; }
}
@media (max-width: 860px) {
  .dyg { padding: 14px 16px 32px; }
  .dyg-layout { grid-template-columns: minmax(0, 1fr); }
  .dyg-steps { gap: 4px; margin-bottom: 18px; }
  .dyg-steps li { font-size: 12px; gap: 4px; }
  .dyg-steps li + li::before { width: 10px; }
  .dyg-steps li:not(.is-active) button { font-size: 0; gap: 0; }
  .dyg-steps button { padding: 4px 2px; }
  .dyg-head h1 { font-size: 23px; }
  .dyg-who { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .dyg-tile { padding: 8px 2px; font-size: 12px; }
  .dyg-tile.is-on { padding: 7px 1px; }
  .dyg-tile img { width: 46px; height: 46px; }
  .dyg-block { padding: 14px 14px 16px; }
  /* On a phone the baskets are one row to swipe through, so the items stay near. */
  .dyg-baskets { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .dyg-basket { flex: none; width: 150px; scroll-snap-align: start; }
  .dyg-fill { flex-direction: column; align-items: stretch; }
  .dyg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dyg-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .dyg-tabs .dyg-chip { flex: none; }
  .dyg-seg button { font-size: 13px; padding: 9px 2px; }
  .dyg-front-pick { width: 96px; }
}
@media (max-width: 420px) {
  .dyg-who { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dyg-two { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* ---- v2 additions ---- */
.dyg-problem { padding: 24px 0; font-size: 15px; text-align: center; }
.dyg-steps .dyg-step-word { white-space: nowrap; }
.dyg-tile > .dyg-occ-art svg { width: 58px; height: 58px; }
.dyg-btn:disabled { opacity: .45; cursor: default; }
.dyg-filled { margin: 6px 0 0; color: var(--good); font-weight: 600; font-size: 14px; }
.dyg-tools { margin-bottom: 12px; max-width: 420px; }
.dyg-subs { margin: -4px 0 14px; }
.dyg-shelf { margin-bottom: 22px; }
.dyg-shelf-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.dyg-meta { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.dyg-barred { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; padding: 7px 0; }
/* The chosen message and its count are bold (Greeting-Card-Requirements.md); the field is tall enough to read it. */
.dyg-idea-edit { flex: 1; position: relative; }
.dyg-idea-text { width: 100%; min-height: 120px; }
.dyg-idea .dyg-count, .dyg-field .dyg-count { position: static; display: block; text-align: right; font-weight: 700; color: var(--ink); }
.dyg-own { min-height: 176px; }
.dyg-print-card.is-plain { background: var(--sunk); }
.dyg-tone { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.dyg-tone .dyg-sub { margin: 0; }
.dyg-sum-head { display: flex; width: 100%; justify-content: space-between; align-items: baseline; text-align: left; cursor: default; }
.dyg-sum-peek { display: none; color: var(--muted); font-size: 14px; }
.dyg-sum-line { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; border-top: 1px solid var(--line); }
.dyg-sum-line img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; }
.dyg-sum-line strong { display: block; font-weight: 600; }
.dyg-sum-line small { color: var(--muted); display: block; line-height: 1.3; }
.dyg-sum-missing.is-problem { color: var(--warn); font-weight: 600; }
.dyg-lines dd > span { min-width: 0; }
.dyg-added { margin: 14px 0 0; font-weight: 600; }
.dyg-ticket { margin: 12px 0 0; padding: 12px; background: var(--sunk); border-radius: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dyg-restart { text-align: center; margin: 24px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  /* On a phone the summary follows the step: its head shows the count and total, and opens the list. */
  .dyg-summary { position: static; }
  .dyg-sum-head { cursor: pointer; }
  .dyg-sum-peek { display: inline; }
  .dyg-sum-head::after { content: "▾"; margin-left: 8px; color: var(--muted); }
  .dyg-sum.is-open .dyg-sum-head::after { content: "▴"; }
  .dyg-sum:not(.is-open) .dyg-sum-body { display: none; }
}
/* The next button again at the foot of each step, beside-the-summary layouts only (desktop and iPad Pro): a long step
   needs no scroll back up to it. On a phone the summary, with its button, already follows the step. Step 2 also has
   "Back to items" at the left of this row, on every screen size. */
.dyg-step-foot { display: flex; justify-content: flex-end; align-items: flex-start; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.dyg-step-foot.has-up { justify-content: space-between; }
.dyg-step-next { display: flex; flex-direction: column; align-items: flex-end; }
.dyg-step-foot .dyg-btn-main { width: auto; min-width: 280px; }
.dyg-step-foot .dyg-sum-missing { text-align: right; }
.dyg-to-items { flex: none; border: 1px solid var(--line-strong); border-radius: var(--pill-radius); padding: 8px 14px; font-size: 14px; }
.dyg-to-items:hover { background: var(--sunk); }
@media (max-width: 860px) {
  .dyg-step-foot { display: none; }
  .dyg-step-foot.has-up { display: flex; }
  .dyg-step-foot .dyg-step-next { display: none; }
}
/* ✕ beside each basket and item in the summary, to take it out. */
.dyg-sum-line, .dyg-sum-items li { grid-template-columns: 34px 1fr auto 24px; }
.dyg-remove { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; line-height: 1; color: var(--muted); }
.dyg-remove:hover { background: var(--sunk); color: var(--ink); }
