/* Lal Dhaaga: unbleached cloth, one red thread. Loaded last on the main-site pages only.
   Every rule starts with body.ld so the couple's page and the admin page can't be touched.
   Desktop from 768px, a different phone layout below it. Later tasks add their own sections. */

/* ---- Cloth and type ---- */
body.ld {
  color-scheme: light;
  color: #2A211C;
  background-color: #E8E1D4;
  background-image: repeating-linear-gradient(0deg, rgba(90, 70, 50, .055) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(90, 70, 50, .045) 0 1px, transparent 1px 3px);
  font: 400 17px/1.5 Laila, 'Noto Sans Devanagari', Georgia, serif;
  caret-color: #B3261E;
}
body.ld ::selection { background: rgba(179, 38, 30, .22); color: #2A211C; }
body.ld h1, body.ld h2, body.ld h3 { max-width: none; margin: 0; color: #2A211C; font-family: Kalam, 'Noto Sans Devanagari', cursive; font-weight: 700; letter-spacing: 0; text-wrap: auto; }
body.ld h1, body.ld h1.builder-question { font-size: clamp(44px, 4.6vw, 60px); line-height: 1.03; overflow-wrap: anywhere; }
body.ld h2 { font-size: 30px; line-height: 1.08; }
body.ld p { margin: 0; }
body.ld .ld-main p, body.ld .account-list li, body.ld .account-list .field-error { overflow-wrap: anywhere; }
body.ld .ld-hand { font-family: Kalam, 'Noto Sans Devanagari', cursive; }
body.ld .ld-muted, body.ld .account-muted { color: #5A4E44; }
body.ld .builder-lead { color: #4A3F36; font-size: 20px; }
body.ld .account-note { color: #4A3F36; font-size: 15px; }
body.ld .ld-m, body.ld .ld-th.ld-m { display: none; }

/* ---- Page widths (base.css and builder.css set a narrow phone column) ---- */
body.ld .builder, body.ld .account { width: 100%; max-width: 1160px; min-height: 60svh; margin-inline: auto; padding: 24px 40px 72px; gap: 20px; }

/* ---- Thread art ---- */
body.ld .ld-th { display: block; overflow: visible; filter: drop-shadow(1px 2px 1px rgba(60, 30, 20, .26)); pointer-events: none; }
body.ld .ld-th path { fill: none; stroke: #B3261E; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
body.ld .ld-th path.ld-tw { stroke: #fff; stroke-opacity: .3; stroke-width: 1.4; stroke-dasharray: 3 6; }
body.ld .ld-art-signin { width: 100%; height: auto; }
body.ld .ld-art-bow { width: min(240px, 70%); height: auto; }
body.ld .ld-art-doneBow { width: min(280px, 70%); height: auto; margin-bottom: 14px; }
body.ld .ld-art-loose { width: min(300px, 80%); height: auto; }
body.ld .ld-art-parcel { display: block; width: min(100%, 420px); height: auto; filter: drop-shadow(1px 2px 1px rgba(60, 30, 20, .26)); pointer-events: none; }
body.ld .ld-peg { display: block; width: 16px; height: 46px; }

/* ---- Header ---- */
body.ld .ld-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 16px 40px; }
body.ld .ld-logo { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; color: inherit; font: 700 28px/1 Kalam, cursive; text-decoration: none; }
body.ld .ld-logo i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #7E1A14; }
body.ld .ld-top-r { display: flex; align-items: center; gap: 20px; }

/* ---- Links ---- */
body.ld .ld-link, body.ld .btn-link, body.ld .legal-footer a, body.ld .legal a, body.ld .account a:not([class]) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline dashed #B3261E 1.5px;
  text-underline-offset: 5px;
}
body.ld .ld-link:hover, body.ld .btn-link:hover, body.ld .legal-footer a:hover, body.ld .legal a:hover, body.ld .account a:not([class]):hover { color: #7E1A14; }

/* ---- Buttons: red cloth with a dashed stitch drawn as an outline ---- */
body.ld .btn-primary, body.ld .btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: #B3261E;
  color: #FBF8F2;
  outline: 1.5px dashed #F4C9BF;
  outline-offset: -6px;
  cursor: pointer;
  font: 600 18px Laila, Georgia, serif;
  text-align: center;
  text-decoration: none;
}
body.ld .btn-primary:hover { background: #9A1F18; }
body.ld .btn-quiet { background: transparent; color: #2A211C; outline-color: #2A211C; }
body.ld .btn-quiet:hover { background: rgba(90, 70, 50, .08); }
body.ld .account-actions .btn-quiet { min-height: 44px; padding: 0 16px; font-size: 15px; outline-offset: -4px; }
body.ld .account-actions-block > .btn-quiet { min-height: 44px; padding: 0 16px; font-size: 15px; outline-offset: -4px; }
body.ld .btn-primary.ld-small { min-height: 44px; padding: 0 16px; font-size: 15px; outline-offset: -4px; }
body.ld .btn-primary:disabled, body.ld .btn-quiet:disabled { opacity: .6; cursor: default; }
/* Focus must read differently from the stitch, so it is a solid ring and comes after every outline above. */
body.ld :focus-visible,
body.ld .btn-primary:focus-visible,
body.ld .btn-quiet:focus-visible,
body.ld .account-actions .btn-quiet:focus-visible,
body.ld .account-actions-block > .btn-quiet:focus-visible,
body.ld .btn-primary.ld-small:focus-visible { outline: 2px solid #2A211C; outline-offset: 2px; }
/* A heading takes focus only so the screen reader lands on it, so it shows no ring. */
body.ld h1.builder-question:focus-visible { outline: none; }

/* ---- Fields: a dashed red underline, not a box ---- */
body.ld .field { gap: 0; }
body.ld .field-label { color: #4A3F36; font: 400 15px Laila, Georgia, serif; }
body.ld .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.ld .field textarea,
body.ld .field select {
  width: 100%;
  min-height: 48px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px dashed #B3261E;
  border-radius: 0;
  background: transparent;
  color: #2A211C;
  font: 400 23px/1.25 Kalam, 'Noto Sans Devanagari', cursive;
}
body.ld .field input[type="date"], body.ld .field input[type="time"], body.ld .field select { font: 400 18px Laila, Georgia, serif; }
body.ld .field ::placeholder { color: #5A4E44; opacity: 1; }
body.ld .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"])[aria-invalid="true"],
body.ld .field textarea[aria-invalid="true"],
body.ld .field select[aria-invalid="true"],
body.ld .field:has(> .field-error:not([hidden])) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.ld .field:has(> .field-error:not([hidden])) textarea,
body.ld .field:has(> .field-error:not([hidden])) select { border-bottom: 2px solid #7E1A14; }
body.ld .field-error { color: #7E1A14; font: 500 15px Laila, Georgia, serif; }
body.ld .field-check { gap: 8px; color: #4A3F36; font: 400 17px Laila, Georgia, serif; }
body.ld .field-check input { accent-color: #B3261E; }

/* ---- Banners ---- */
body.ld .builder-banner { padding: 12px 40px; border-bottom: 0; background: #FBF8F2; color: #2A211C; outline: 1.5px dashed #B3261E; outline-offset: -4px; font: 400 15px Laila, Georgia, serif; }

/* ---- Cards, figures and progress ---- */
body.ld .account-card { gap: 6px; padding: 20px; border: 0; border-radius: 0; background: #FBF8F2; box-shadow: 0 16px 26px -16px rgba(60, 40, 20, .55); }
body.ld .account-card h2 { font-size: 30px; }
body.ld .account-row strong { font: 700 34px/1 Kalam, cursive; }
body.ld .account-link { color: #7E1A14; font: 400 22px/1.25 Kalam, cursive; }
body.ld .builder-progress { height: 10px; border-radius: 0; background: #D8CFBF; }
body.ld .builder-progress span { background: #B3261E; transition: none; }

/* ---- Footer ---- */
body.ld .legal-footer { gap: 0 20px; padding: 16px; border-top: 1.5px dashed rgba(90, 70, 50, .4); color: #2A211C; font-size: 15px; }

/* ---- Legal pages ---- */
body.ld .legal { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin: 0 auto; padding: 24px 40px 72px; color: #2A211C; font-size: 17px; line-height: 1.5; }
body.ld .legal h1 { margin: 0; font-size: 64px; line-height: 1; }
body.ld .legal h2 { margin-top: 16px; font: 600 20px/1.3 Laila, serif; }
body.ld .legal p, body.ld .legal ul { margin: 0; }
body.ld .legal li { margin: 0 0 4px; }
body.ld .legal-back { align-self: flex-start; font-size: 15px; }
body.ld .legal-draft { color: #5A4E44; font-size: 15px; }
body.ld .legal-details li { border-bottom: 1.5px dashed rgba(90, 70, 50, .5); }
body.ld .legal-details strong { color: #2A211C; font-weight: 600; }

/* ---- Hoop: a wooden ring holding a stitched heart or the page's real QR ---- */
body.ld .ld-hoop { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 520px; aspect-ratio: 1; margin: 0 auto; border: 16px solid #A98660; border-radius: 50%; background: #FFFFFF; box-shadow: inset 0 0 0 2px #7C5F3F, 0 22px 34px -20px rgba(60, 40, 20, .6); }
body.ld .ld-hoop::before { content: ""; position: absolute; left: 50%; top: -30px; width: 34px; height: 20px; margin-left: -17px; background: #7C5F3F; }
body.ld .ld-hoop-qr { display: block; width: 72%; height: auto; }
body.ld .ld-hoop-small { width: 210px; max-width: 210px; border-width: 8px; }
body.ld .ld-hoop-small .ld-hoop-qr { width: 136px; }
body.ld .ld-hoop-small::before { top: -18px; width: 20px; height: 12px; margin-left: -10px; }

/* ---- Print: a photo on paper, or an empty dashed spot ---- */
body.ld .ld-print { position: relative; padding: 8px; background: #FBF8F2; box-shadow: 0 16px 26px -14px rgba(60, 40, 20, .55); }
body.ld .ld-print img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
body.ld .ld-print.is-empty { aspect-ratio: 4 / 5; padding: 0; background: transparent; box-shadow: none; outline: 1.5px dashed #B3261E; outline-offset: -2px; }

/* ---- Home ---- */
body.ld .builder.ld-home { max-width: none; min-height: 0; padding: 0; gap: 0; }
body.ld .ld-hero { display: grid; grid-template-columns: 5fr 6fr; gap: 24px; align-items: center; width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 40px 24px; }
body.ld .ld-hero h1.builder-question { font-size: clamp(68px, 8vw, 104px); line-height: .98; }
body.ld .ld-hero-t { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }
body.ld .ld-hero .builder-lead { max-width: 26em; }
body.ld .ld-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
body.ld .ld-hero-a { position: relative; }
body.ld .ld-hero-img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent); mask-composite: intersect; }
body.ld .ld-hero-note { position: absolute; left: 24%; right: 24%; top: 32%; text-align: center; font-size: 30px; line-height: 1.15; }
body.ld .ld-steps { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px 72px; }
body.ld .ld-steps .ld-art-wire { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 80px; }
body.ld .ld-steps ol { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 44px 0 0; list-style: none; }
body.ld .ld-tag { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px 24px 24px; background: #FBF8F2; box-shadow: 0 16px 26px -16px rgba(60, 40, 20, .55); }
body.ld .ld-steps li:nth-child(1) .ld-tag { transform: rotate(-1.2deg); }
body.ld .ld-steps li:nth-child(2) .ld-tag { transform: rotate(.8deg) translateY(14px); }
body.ld .ld-steps li:nth-child(3) .ld-tag { transform: rotate(-.6deg); }
body.ld .ld-tag h2 { font-size: 30px; line-height: 1.08; }
body.ld .ld-tag .ld-peg { position: absolute; left: 50%; top: -30px; margin-left: -8px; }
body.ld .ld-sample { position: relative; width: min(220px, 72%); margin: 34px auto 4px; transform: rotate(-1.4deg); }
body.ld .ld-sample img { display: block; width: 100%; height: auto; box-shadow: 0 12px 20px -12px rgba(60, 40, 20, .55); }
body.ld .ld-stand { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; }
body.ld .ld-stand img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 24px 40px -24px rgba(60, 40, 20, .7); }
body.ld .ld-stand figcaption { color: #5A4E44; font-size: 14px; line-height: 1.4; text-align: center; }
body.ld .ld-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px 40px 88px; }
body.ld .ld-band h2 { font-size: clamp(44px, 5vw, 64px); line-height: 1.02; overflow-wrap: anywhere; }
body.ld .ld-band-t { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
body.ld .ld-pricetag { align-self: flex-start; padding: 4px 14px; background: #F4EFE5; outline: 1.5px dashed #B3261E; outline-offset: -4px; font: 700 22px Kalam, cursive; }

/* ---- Questions: progress rail, the question, and the "so far" panel ---- */
body.ld .builder.ld-flow { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 48px; align-items: start; max-width: 1280px; min-height: 0; padding: 16px 40px 56px; }
body.ld .ld-rail { position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
body.ld .ld-rail .ld-wline { position: absolute; left: 7px; top: 8px; width: 6px; height: calc(100% - 16px); }
body.ld .ld-rail li { position: relative; display: flex; align-items: center; gap: 14px; min-height: 34px; color: #5A4E44; font-size: 15px; }
body.ld .ld-rail li.ld-now { color: #2A211C; font-weight: 600; }
body.ld .ld-rail li.ld-done { color: #2A211C; }
body.ld .ld-kn { position: relative; display: block; flex: none; width: 20px; height: 20px; }
body.ld .ld-kn::after { content: ""; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #E8E1D4; box-shadow: inset 0 0 0 2px #B3261E; }
body.ld .ld-done .ld-kn::after { background: #7E1A14; box-shadow: none; }
body.ld .ld-now .ld-kn::after { left: 3px; top: 3px; width: 14px; height: 14px; background: #B3261E; box-shadow: 0 0 0 3px #E8E1D4; }
body.ld .ld-q { display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 600px; }
body.ld .ld-q .builder-body { gap: 18px; min-width: 0; }
body.ld .ld-q .field-stack { gap: 18px; }
body.ld .ld-q .field-row { gap: 16px; }
body.ld .ld-q .builder-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
body.ld .ld-q .builder-secondary { display: contents; }
body.ld .ld-q .builder-actions .btn-link { flex: 0 0 100%; justify-content: flex-start; }
body.ld .ld-knotbar { position: relative; display: none; height: 24px; margin: 4px 0 0; }
body.ld .ld-kline { position: absolute; left: -16px; right: -16px; top: 11px; height: 2.6px; background: #B3261E; }
body.ld .ld-knotbar ul { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
body.ld .ld-knotbar li { display: block; width: 20px; height: 24px; padding-top: 2px; }
body.ld .ld-side { position: relative; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
body.ld .ld-sofar { font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
body.ld .ld-hang { position: relative; }
body.ld .ld-hang .ld-art-sideWire { position: absolute; left: -20px; top: 10px; width: calc(100% + 40px); height: 50px; }
body.ld .ld-prints { position: relative; display: flex; flex-direction: column; gap: 32px; padding: 38px 20px 0; }
body.ld .ld-prints .ld-print:nth-child(odd) { transform: rotate(1.6deg); }
body.ld .ld-prints .ld-print:nth-child(even) { transform: rotate(-1.4deg); }
body.ld .ld-print .ld-peg, body.ld .ld-tag .ld-peg { position: absolute; left: 50%; top: -30px; margin-left: -8px; }
body.ld .memory-list { gap: 0; }
body.ld .memory-list li { flex-direction: row; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed rgba(90, 70, 50, .5); font: 400 22px/1.2 Kalam, 'Noto Sans Devanagari', cursive; }
body.ld .memory-list small { flex: none; color: #5A4E44; font: 400 14px Laila, Georgia, serif; }
body.ld .track-list { gap: 0; }
body.ld .track-option { gap: 12px; min-height: 56px; border-bottom: 1.5px dashed rgba(90, 70, 50, .5); }
body.ld .track-option input { flex: none; width: 20px; height: 20px; accent-color: #B3261E; }
body.ld .track-option span { flex-grow: 1; }
body.ld .track-option .btn-quiet { min-height: 44px; padding: 0 16px; font-size: 15px; outline-offset: -4px; }

/* The photo picker is a pegged print. The file input stays hidden, so focus shows on the print. */
body.ld .photo-picker { position: relative; display: flex; align-items: center; justify-content: center; width: 200px; max-width: 100%; height: 230px; min-height: 0; margin: 34px 0 4px 12px; padding: 10px; overflow: visible; border: 0; border-radius: 0; background: #FBF8F2; box-shadow: 0 16px 26px -14px rgba(60, 40, 20, .55); transform: rotate(-1.4deg); cursor: pointer; }
body.ld .photo-picker::before { content: ""; position: absolute; left: 50%; top: -30px; width: 16px; height: 46px; margin-left: -8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 46'%3E%3Crect x='1' width='14' height='46' rx='3' fill='%23A98660'/%3E%3Crect x='7.4' width='1.2' height='46' fill='%237C5F3F'/%3E%3Crect x='1' y='20' width='14' height='3' fill='%238D7050'/%3E%3C/svg%3E") center / contain no-repeat; }
body.ld .photo-picker:focus-within { outline: none; }
body.ld .photo-picker:has(input:focus-visible) { outline: 2px solid #2A211C; outline-offset: 4px; }
body.ld .photo-picker-label { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; outline: 1.5px dashed #B3261E; outline-offset: -2px; font: 400 24px/1.1 Kalam, 'Noto Sans Devanagari', cursive; text-align: center; }
body.ld .photo-preview:not([hidden]) { position: absolute; left: 10px; top: 10px; display: block; width: calc(100% - 20px); height: calc(100% - 20px); max-height: none; border-radius: 0; object-fit: cover; }
body.ld .photo-preview:not([hidden]) + .photo-picker-label { position: absolute; left: 10px; right: 10px; bottom: 10px; width: auto; height: auto; padding: 4px 8px; outline: 0; background: rgba(251, 248, 242, .92); font-size: 18px; }

/* ---- Checkout and sign-in: a panel (form beside art) or a centred message ---- */
body.ld .account.ld-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
body.ld .ld-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
body.ld .ld-main .field-stack { gap: 12px; }
body.ld .ld-main > .btn-primary, body.ld .ld-main > .btn-link { align-self: flex-start; }
body.ld .ld-art { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
body.ld .ld-signin-art { width: 100%; }
body.ld .ld-signin-note { margin-top: 8px; text-align: center; font-size: 26px; }
body.ld .ld-parcel-block { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
body.ld .ld-parcel-block .ld-print { width: min(260px, 70%); margin-top: 34px; }
body.ld .ld-parcel-cap { text-align: center; font-weight: 600; overflow-wrap: anywhere; }
body.ld .ld-parcel-block .ld-pricetag { align-self: center; }
body.ld .ld-done-art { display: flex; flex-direction: column; align-items: center; width: 100%; }
body.ld .ld-done-art .ld-hoop { max-width: 460px; }
body.ld .ld-pay .ld-hoop { max-width: 400px; }
body.ld .ld-pay .account-card { gap: 6px; }
body.ld .account-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 17px; }
body.ld .account-link { display: block; padding: 8px 0; min-height: 44px; }
body.ld #signin-code:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { letter-spacing: .5em; font: 700 34px Kalam, cursive !important; }
body.ld .account.ld-centre { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 640px; min-height: 0; padding: 48px 24px 96px; text-align: center; }
body.ld .ld-centre h1.builder-question { font-size: clamp(46px, 5vw, 64px); line-height: 1.04; }
body.ld .ld-centre .account-stack, body.ld .ld-centre .account-actions, body.ld .ld-centre .account-list li { align-items: center; justify-content: center; }
body.ld .ld-centre .builder-progress { width: 100%; }
body.ld .ld-centre .account-list { width: 100%; }
body.ld .ld-wait { position: relative; width: 100%; height: 230px; }
body.ld .ld-wait .ld-art-sideWire { position: absolute; left: -24px; top: 0; width: calc(100% + 48px); height: 60px; }
body.ld .ld-wait .ld-prints { position: absolute; left: 0; right: 0; top: 34px; flex-direction: row; justify-content: space-around; gap: 12px; padding: 0; }
body.ld .ld-wait .ld-print { width: 17%; transform: none; }
body.ld .ld-wait .ld-print.is-empty { padding: 0; }

/* ---- My pages: pegged cards on a thread ---- */
body.ld .account.ld-pages { gap: 24px; }
body.ld .ld-cards { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; padding-top: 44px; }
body.ld .ld-wire3 { position: absolute; left: -40px; top: 0; width: calc(100% + 80px); height: 60px; }
body.ld .ld-page-card { position: relative; gap: 12px; min-width: 0; padding: 32px 24px 24px; }
body.ld .ld-page-card > .ld-peg { position: absolute; left: 50%; top: -22px; width: 16px; height: 46px; margin-left: -8px; }
/* Only the first row hangs from the thread. */
body.ld .ld-page-card:nth-of-type(n+3) > .ld-peg { display: none; }
body.ld .ld-page-card h2 { font-size: 38px; line-height: 1.05; overflow-wrap: anywhere; }
body.ld .ld-page-card .account-link { overflow-wrap: anywhere; }
body.ld .ld-mini { display: flex; align-items: center; gap: 16px; }
body.ld .ld-mini-t { flex: 1 1 0; min-width: 0; }
body.ld .ld-mini .ld-hoop-small { flex: none; margin: 0; }
body.ld .ld-page-card .account-actions > * { min-width: 0; }
body.ld .account.ld-pages .account-signout { align-self: flex-start; margin-top: 0; }

/* ---- Heart QR step ---- */
body.ld .account.ld-panel.ld-qr-panel { align-items: start; }
body.ld .ld-qr-panel .ld-art { position: sticky; top: 16px; }
body.ld .ld-qr-stage { position: relative; width: 100%; max-width: 520px; background: #FFFFFF; box-shadow: 0 16px 26px -16px rgba(60, 40, 20, .55); }
body.ld .ld-qr-heart svg { display: block; width: 100%; height: auto; }
/* Placed over the oval by qr-step.js. Only this layer turns off touch scrolling, so the page still scrolls around it. */
body.ld .ld-qr-face { position: absolute; border-radius: 50%; outline: 1.5px dashed #B3261E; outline-offset: 2px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
body.ld .ld-qr-face:active { cursor: grabbing; }
body.ld .ld-qr-upload { position: relative; align-self: flex-start; }
body.ld .ld-qr-file { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
body.ld .ld-qr-upload:has(.ld-qr-file:focus-visible) { outline: 2px solid #2A211C; outline-offset: 2px; }
body.ld .ld-qr-sliders { display: flex; flex-direction: column; gap: 8px; }
body.ld .ld-qr-slider { display: flex; flex-direction: column; }
body.ld .ld-qr-slider input[type="range"] { width: 100%; min-height: 44px; margin: 0; accent-color: #B3261E; cursor: pointer; }
body.ld .ld-qr-group { display: flex; flex-direction: column; gap: 8px; }
body.ld .ld-qr-choices { display: flex; flex-wrap: wrap; gap: 8px; }
body.ld .ld-qr-swatch { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
body.ld .ld-qr-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #E8E1D4, 0 0 0 5px #2A211C; }
body.ld .ld-qr-choices .btn-quiet { flex: 1 1 auto; width: auto; min-height: 44px; padding: 0 12px; font-size: 15px; outline-offset: -4px; }
body.ld .ld-qr-choices .btn-quiet[aria-pressed="true"] { background: #2A211C; color: #FBF8F2; outline-color: #FBF8F2; }
body.ld .ld-qr-choices .btn-quiet:focus-visible, body.ld .ld-qr-choices .btn-quiet[aria-pressed="true"]:focus-visible { outline: 2px solid #2A211C; outline-offset: 2px; }
body.ld .ld-qr-status { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 14px; background: #FBF8F2; }
body.ld .ld-qr-status[data-state="passed"] { font-weight: 600; }
body.ld .ld-qr-status[data-state="passed"]::before { content: ""; flex: none; width: 20px; height: 18px; margin-top: 4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21S1 14 1 7C1 3.5 4 1 7 1C9 1 11 2 12 4C13 2 15 1 17 1C20 1 23 3.5 23 7C23 14 12 21 12 21Z' fill='%23B3261E'/%3E%3C/svg%3E") center / contain no-repeat; }
body.ld .ld-qr-status[data-state="failed"], body.ld .ld-qr-status[data-state="error"] { color: #7E1A14; }
body.ld .ld-qr-panel .ld-main > .btn-quiet { align-self: flex-start; min-height: 44px; padding: 0 16px; font-size: 15px; outline-offset: -4px; }
body.ld .ld-qr-panel .ld-main > .btn-quiet:focus-visible { outline: 2px solid #2A211C; outline-offset: 2px; }
body.ld .ld-qr-save-problem:empty { display: none; }
body.ld .ld-qr-change { align-self: flex-start; }

/* ---- Tablet and small laptops: narrower columns so the question keeps room ---- */
@media (min-width: 1024px) and (max-width: 1199.98px) {
  body.ld .builder.ld-flow { grid-template-columns: 200px minmax(0, 1fr) 240px; gap: 32px; padding-inline: 32px; }
  /* Two cards across leave the heading about 170px beside the larger hoop, so the name is a little smaller. */
  body.ld .ld-page-card h2 { font-size: 34px; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  /* Two across leaves the heading about 80px beside the hoop, so the cards stack and the thread goes. */
  body.ld .ld-cards { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }
  body.ld .ld-wire3, body.ld .ld-page-card > .ld-peg { display: none; }
  body.ld .builder.ld-flow { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding-inline: 32px; }
  body.ld .ld-side { display: none; }
  /* The form keeps its room (about 400px at 768px), and the art takes what is left. */
  body.ld .account.ld-panel { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); gap: 32px; padding-inline: 32px; }
}

/* ---- The phone version: one column, no side panels ---- */
@media (max-width: 767.98px) {
  body.ld .ld-d { display: none !important; }
  body.ld .ld-m { display: block !important; }
  body.ld .ld-top { padding: 12px 16px; }
  body.ld .ld-logo { font-size: 24px; }
  body.ld .builder, body.ld .account { padding: 8px 16px 40px; }
  body.ld h1, body.ld h1.builder-question { font-size: 42px; }
  body.ld .btn-primary, body.ld .btn-quiet { width: 100%; }
  body.ld .account-actions .btn-quiet { width: auto; }
  body.ld .builder-banner { padding: 12px 16px; }
  body.ld .legal { padding: 8px 16px 40px; }
  body.ld .legal h1 { font-size: 52px; }
  body.ld .legal-footer { gap: 0 14px; }
  body.ld .ld-hoop { max-width: 320px; border-width: 12px; }
  body.ld .ld-hoop-small { width: 210px; max-width: 210px; border-width: 8px; }
  body.ld .ld-hero { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 0 16px 24px; }
  body.ld .ld-hero h1.builder-question { font-size: 56px; }
  body.ld .ld-hero-t { align-items: stretch; }
  body.ld .ld-hero-a { order: -1; }
  body.ld .ld-sample { margin-top: 14px; }
  body.ld .ld-steps { padding: 8px 16px 48px 44px; }
  body.ld .ld-steps .ld-art-wireDown { position: absolute; left: 18px; top: 0; width: 8px; height: 100%; }
  body.ld .ld-steps ol { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0; }
  body.ld .ld-steps li .ld-tag { transform: none; padding: 16px; }
  body.ld .ld-tag .ld-peg { display: none; }
  body.ld .ld-tag h2 { font-size: 26px; }
  body.ld .ld-band { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 32px; padding: 0 16px 48px; }
  body.ld .ld-band h2 { font-size: 44px; }
  body.ld .ld-band-t { align-items: stretch; }
  body.ld .builder.ld-flow { display: flex; flex-direction: column; gap: 16px; padding: 0 16px 32px; }
  body.ld .ld-rail, body.ld .ld-side { display: none; }
  body.ld .ld-knotbar { display: block; }
  body.ld .ld-q .builder-actions { flex-direction: column; align-items: stretch; }
  body.ld .ld-q .builder-secondary { display: flex; gap: 12px; }
  body.ld .ld-q .builder-secondary > * { flex: 1 1 0; width: auto; }
  body.ld .ld-q .builder-actions .btn-link { flex: none; }
  body.ld .account.ld-panel { display: flex; flex-direction: column; align-items: stretch; gap: 24px; padding: 4px 16px 40px; }
  body.ld .account.ld-panel.ld-art-first { flex-direction: column-reverse; }
  body.ld .ld-main > .btn-primary { align-self: stretch; }
  body.ld .ld-done-art .ld-hoop { max-width: 320px; }
  body.ld .ld-qr-panel .ld-art { position: static; }
  body.ld .ld-qr-upload, body.ld .ld-qr-panel .ld-main > .btn-quiet { align-self: stretch; }
  body.ld .ld-cards { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }
  body.ld .ld-page-card { padding: 20px 16px; }
  body.ld .ld-page-card > .ld-peg { display: none; }
  /* Beside the hoop a name gets about 120px, so on a phone it sits under it. */
  body.ld .ld-mini { flex-direction: column; align-items: stretch; }
  body.ld .ld-mini .ld-hoop-small { align-self: center; }
  body.ld .ld-page-card h2 { font-size: 34px; }
  body.ld .account.ld-centre { padding: 24px 16px 56px; }
  body.ld .ld-centre h1.builder-question { font-size: 44px; }
  body.ld .ld-wait { height: 150px; }
  body.ld .ld-wait .ld-art-sideWire { left: -16px; width: calc(100% + 32px); }
  body.ld .ld-wait .ld-print { padding: 4px; }
}
