/* The Charm Bar: desktop composition (loaded after charm-bar.css, which is the untouched hand-off bundle).
   Lockup top left, running total top right, a tray under a short line on the left, the open box in the middle
   from the top of the page to the foot, the register and engraving card on the right, the toast on the box's
   front. The three sit close together, the box the biggest. Tablet and phone keep the hand-off layout:
   everything here sits inside the 1100px query.

   The box's renders are flat pictures taken from straight above. Here the pictures are folded in 3D about the
   hinge (the base towards you, the lid leaning back), so the box stands in perspective. Only the pictures are
   folded. The bracelet, its charms and the controls on the floor stay flat on the screen, so the page's own
   pointer maths (getScreenCTM) is untouched: never put a transform on .cb-base, .cb-velvet-base or .cb-bracelet. */

.cb-mark, .cb-pill, .cb-pick, .cb-lidmark, .cb-brandline { display: none; }
.cb-lidplane { display: contents; }

@media (min-width: 1100px) {
  .cb {
    position: relative;
    --cb-fold: 22deg;                              /* how far each half of the box folds from flat */
    --cb-grow: 1.14;                               /* 2026-11-14, owner: the bar a bit bigger than the window-fit size (it may run a little below the fold) */
    /* One measure for the whole composition: the width the script fits the box to (from the height left under
       the site header), held to what the window's width allows. The three columns come to 2.28 of it. */
    --cb-f: min(calc(var(--cb-fit-box, 600px) * var(--cb-grow)), 860px, calc(43.8vw - 62px));
    --cb-boxw: calc(var(--cb-f) * .95);            /* the box across its hinge */
    --cb-pick: clamp(24px, calc(var(--cb-f) * .057), 34px);
    --cb-span: calc(var(--cb-f) * 2.28 + 268px);   /* the three columns, their gaps, and 72px a side for the top bar */
  }

  /* ---- top bar: floats over the stage so the lid can rise beside it; on a wide window it keeps to the
     composition's corners rather than the window's */
  .cb-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 7;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
    width: auto; max-width: var(--cb-span); margin: 0 auto; padding: 16px 32px 0;
    pointer-events: none;
  }
  .cb-top > * { pointer-events: auto; }

  .cb-mark { display: flex; align-items: center; gap: 16px; color: var(--navy); pointer-events: none; }
  .cb-mark-lock { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
  .cb-mark-logo {
    display: block; width: 148px; aspect-ratio: var(--cb-logo-ratio, 8.3333); background: var(--navy);
    -webkit-mask: var(--cb-logo) left center / contain no-repeat; mask: var(--cb-logo) left center / contain no-repeat;
  }
  .cb-mark-name { font: 700 10px/1 var(--cb-typewriter); letter-spacing: .32em; text-transform: uppercase; }
  .cb-mark-line {
    padding-left: 16px; border-left: 1px solid rgba(16, 43, 73, .22);
    font: 500 17px/1.14 var(--serif); letter-spacing: .01em; white-space: nowrap;
  }

  .cb-top-end {
    flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px;
    max-width: calc(clamp(240px, 20vw, 300px) + 34px);
  }
  .cb-pill {
    display: inline-flex; align-items: baseline; gap: 10px; margin: 0; padding: 10px 18px 8px;
    border-radius: 999px; background: var(--navy); color: var(--cream);
    font: 400 13px/1 var(--cb-typewriter); white-space: nowrap;
    box-shadow: 0 12px 22px -14px rgba(5, 16, 34, .75);
  }
  .cb-pill strong { font: 700 15px/1 var(--cb-typewriter); color: var(--rose); }

  /* ---- stage: tray, box, register side by side in the middle of the page, the tray and the register sized
     from the box (0.7 and 0.48 of the measure; the box's column is its folded front, 1.1). */
  .cb-stage {
    max-width: none; padding: 4px 32px 18px; column-gap: 30px; justify-content: center;
    grid-template-columns: calc(var(--cb-f) * .7) calc(var(--cb-f) * 1.1) max(190px, calc(var(--cb-f) * .48));
  }

  /* ---- left: a short line, then the tray, standing on the same line as the box's front */
  .cb-col-tray { position: relative; align-self: end; padding-top: 0; }
  .cb-col-tray > .cb-h {
    position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important;
    padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
  }
  .cb-pick {
    display: block; margin: 0 0 27px 2px; color: var(--navy);
    font: 500 var(--cb-pick)/1.1 var(--serif); letter-spacing: .005em;
  }
  .cb-tray-note {          /* the charm under the pointer: one line between the heading and the tray */
    position: absolute; left: 2px; right: 2px; top: calc(var(--cb-pick) * 1.1 + 4px); min-height: 0; margin: 0;
    font-size: 12.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cb-tray-note strong { display: inline; margin-right: 9px; }

  /* A narrow tray (small laptops): names on one line and a touch smaller, so every tag stays two lines high. */
  @container (max-width: 350px) {
    .cb-slot-btn { padding: 0 4px 7px; }
    .cb-slot-tag { padding: 3px 4px; }
    .cb-slot-name { display: block; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
    .cb-slot-name, .cb-slot-price { font-size: 9.5px; letter-spacing: -.04em; }
  }

  /* ---- right: the register, a little smaller than the hand-off's; the card under it keeps its title on one line */
  .cb-tag-wrap { width: min(100%, 320px); }
  .cb-engrave-title { font-size: clamp(12.5px, calc(var(--cb-f) * .0285), 15px); }

  /* ---- centre: the box. Its lid starts at the top of the stage; folded, the base reaches a little past its
     own layout box (0.055 of the width), which the column's padding makes room for. */
  .cb-col-box { align-self: start; padding-bottom: calc(var(--cb-boxw) * .055); }
  .cb-box { width: min(100%, var(--cb-boxw)); }

  .cb-rendered.cb-lid-rendered .cb-base { perspective: calc(var(--cb-boxw) * 2.46); perspective-origin: 50% 0; }
  /* Each picture turns about the hinge: the base's top edge, seen from that picture's own box. */
  .cb-rendered.cb-lid-rendered .cb-base::before,
  .cb-rendered.cb-lid-rendered .cb-wrap3d { transform-origin: 47.222% 7.586%; transform: rotateX(var(--cb-fold)); }
  .cb-rendered.cb-lid-rendered .cb-lid-shade { transform-origin: 50% -20.43%; transform: rotateX(var(--cb-fold)); }
  .cb-rendered.cb-lid-rendered .cb-box .cb-lid { transform-origin: 50% 4.017%; transform: rotateX(var(--cb-fold)); }
  /* The lid's frames lie with the base while it is shut and swing back with the lid as it opens. */
  .cb-rendered.cb-lid-rendered .cb-lid3d {
    transform-origin: 50% 0; transform: rotateX(var(--cb-fold));
    transition: transform 1.1s var(--ease-lid);
  }
  .cb-rendered.cb-lid-rendered .cb-box.is-open .cb-lid3d { transform: rotateX(calc(var(--cb-fold) * -1)); }

  /* What sits on the open lid (the mark, the chain picker) lies in the lid's own plane. */
  .cb-lidplane {
    display: block; position: absolute; inset: 0; z-index: 7; pointer-events: none;
    transform-origin: 50% 0; transform: rotateX(calc(var(--cb-fold) * -1));
  }
  .cb-lidmark {
    position: absolute; left: 50%; top: -27%; width: 40%;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transform: translate(-50%, -50%); opacity: 0; pointer-events: none;
    transition: opacity .15s linear;
  }
  .cb-box.is-open .cb-lidmark { opacity: 1; transition: opacity .5s var(--ease) 1s; }
  .cb.is-boxed .cb-lidmark { opacity: 0; transition: opacity .12s linear; }
  .cb-lidmark-logo {
    display: block; width: 100%; aspect-ratio: var(--cb-logo-ratio, 8.3333); background: var(--cream);
    -webkit-mask: var(--cb-logo) center / contain no-repeat; mask: var(--cb-logo) center / contain no-repeat;
  }
  .cb-lidmark-name {
    padding-left: .34em; color: var(--rose);
    font: 400 10px/1 var(--cb-typewriter); letter-spacing: .34em; text-transform: uppercase; white-space: nowrap;
  }
  /* chain picker on the lid's lip */
  .cb-chainpick { top: -6.5%; opacity: 0; pointer-events: none; transition: opacity .15s linear; }
  .cb-box.is-open .cb-chainpick { opacity: 1; pointer-events: auto; transition: opacity .5s var(--ease) 1s; }
  .cb.is-boxed .cb-chainpick { opacity: 0; pointer-events: none; transition: opacity .12s linear; }

  /* On the floor: length pills in a row on the back wall, gold swatches and the count in the back corners, and
     the bracelet filling the folded floor with its charms down to the front edge (its size follows this box:
     change the insets, never transform it). */
  .cb-rendered .cb-velvet-base { overflow: visible; clip-path: inset(-30% -8% -12% -8%); }
  .cb-rendered .cb-base-bar { position: static; }
  .cb-seg {
    position: absolute; z-index: 2; left: 50%; bottom: 100%; margin: 0 0 1.4%; transform: translateX(-50%);
    flex-direction: row; border-radius: 999px;
  }
  .cb-seg label + label span { box-shadow: -1px 0 0 rgba(246, 242, 233, .25); }
  .cb-metal { position: absolute; z-index: 2; right: 3.5%; top: 4%; }
  .cb-rendered .cb-bracelet { top: -1.2%; bottom: -7.8%; left: -12%; right: -12%; }
  .cb-rendered .cb-empty { top: 47%; }
  .cb-rendered .cb-capacity { left: 3.5%; right: auto; top: 2.2%; bottom: auto; text-align: left; }

  /* ---- toast on the box's front */
  .cb-toast {
    position: absolute; left: 50%; top: 100%; bottom: auto; z-index: 8;
    width: max-content; max-width: min(92vw, 460px); margin: -32px 0 0;
    transform: translate(-50%, 8px);
  }
  .cb-toast.is-on { transform: translate(-50%, 0); }

  /* ---- brand line, bottom right */
  .cb-brandline {
    display: block; position: absolute; right: max(32px, calc((100% - var(--cb-span)) / 2 + 32px)); bottom: 7px;
    margin: 0; color: var(--slate); font: 400 11px/1 var(--cb-typewriter); letter-spacing: .06em;
    pointer-events: none;
  }
}

/* Phones: the staff-only "Store admin" corner pill would sit on the Charm Bar's own bottom bar (count and total).
   It stays in the phone menu. */
@media (max-width: 759px) {
  .staff-admin { display: none; }

  /* Phones (2026-11-11): no bar stuck to the foot of the screen. The count, the total and "Box it up" are on the
     register, straight under the tray. */
  .cb-mbar { display: none; }
  .cb { padding-bottom: 0; }

  /* One line above the box: what this is on the left, "How it works" on the right. */
  .cb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 8px; }
  .cb-logo { display: none; }
  .cb-mark { display: block; }
  .cb-mark-lock { display: none; }
  .cb-mark-line { font: 400 13.5px/1.3 "Jost", sans-serif; letter-spacing: .02em; color: var(--navy); }
  .cb-mark-line br { display: none; }
  .cb-how-open { gap: 7px; }
  .cb-how-label { display: inline; }

  /* The open lid carries the name, as on desktop, instead of standing empty. Only the mark is moved:
     .cb-base and the bracelet are never transformed. */
  .cb-lidmark {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    position: absolute; left: 50%; top: calc(var(--cb-lidroom, 150px) * -.52 + 19px); width: 46%; z-index: 7;   /* the middle of the lid's panel, measured at two lid heights */
    transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity .15s linear;
  }
  .cb-box.is-open .cb-lidmark { opacity: 1; transition: opacity .5s var(--ease) 1s; }
  .cb.is-boxed .cb-lidmark { opacity: 0; transition: opacity .12s linear; }
  .cb-lidmark-logo {
    display: block; width: 100%; aspect-ratio: var(--cb-logo-ratio, 8.3333); background: var(--cream);
    -webkit-mask: var(--cb-logo) center / contain no-repeat; mask: var(--cb-logo) center / contain no-repeat;
  }
  .cb-lidmark-name {
    padding-left: .34em; color: var(--rose);
    font: 400 8.5px/1 var(--cb-typewriter); letter-spacing: .34em; text-transform: uppercase; white-space: nowrap;
  }

  .cb-stage { gap: 20px; padding-bottom: 30px; }
  .cb-tag-wrap { width: min(100%, 330px); }
  .cb-hint-more { display: none; }
}

/* Phones held upright: the tray docks at the very foot of the screen (nothing under it any more), with its name
   and a one-line hint, and larger compartments and labels. */
@media (max-width: 759px) and (min-height: 560px) {
  .cb-col-tray {
    bottom: 0; padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: auto 1fr; align-items: baseline;
  }
  .cb-col-tray > * { grid-column: 1 / -1; }
  .cb-col-tray > .cb-h { grid-column: 1; margin: 0 0 8px 16px; font-size: 10.5px; }
  .cb-col-tray > .cb-sub.cb-hint-touch {
    grid-column: 2; display: block; margin: 0 16px 8px 10px; text-align: right;
    font: 400 11.5px/1.4 "Jost", sans-serif; letter-spacing: .02em; text-transform: none; color: var(--mist);
  }
  .cb-tray-grid { grid-auto-columns: 100px; }
  .cb-slot-name, .cb-slot-price { font-size: 10.5px; }
  .cb-toast { bottom: calc(176px + env(safe-area-inset-bottom)); }
  .cb.is-boxed .cb-toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@media (min-width: 1100px) and (prefers-reduced-motion: reduce) {
  .cb-rendered.cb-lid-rendered .cb-lid3d { transition: none; }
}

/* ---- This stylesheet loads on the Charm Bar page only, so these touch the site footer here and nowhere else
   (2026-11-14, owner: the footer looked bigger than the Charm Bar itself). Same content, tighter spacing. */
.template-page--charm-bar .footer { padding: 26px 0 16px; }
.template-page--charm-bar .footer__heading { margin-bottom: 8px; }
.template-page--charm-bar .footer__links li { margin-bottom: 3px; }
.template-page--charm-bar .footer__bottom { margin-top: 14px; }
.template-page--charm-bar .footer__copy { margin-top: 6px; }
@media (min-width: 1100px) { .cb-stage { padding-bottom: 34px; } }
@media (max-width: 749px) {
  .template-page--charm-bar .footer { padding: 22px 0 14px; }
  .template-page--charm-bar .footer__brand { margin-bottom: 10px; }
  .template-page--charm-bar .footer__heading { padding: 10px 0; margin: 0; }
  .template-page--charm-bar .footer__bottom { margin-top: 14px; }
  .template-page--charm-bar .footer__left { margin-top: 8px; }
  .template-page--charm-bar .footer__copy { margin-top: 6px; }
}

/* ---- Photo charms (2026-11-14: the owner's own charm pictures, served from /cdn/files/charm-bar/). In a tray
   compartment the bundle draws a photo charm larger than its built-in art, so a tall charm slid behind its name tag.
   Here it hangs a little smaller from the same point at the top. The charm on the bracelet is not touched. */
.cb-slot-art image[href^="/cdn/files/charm-bar/"] { transform-box: fill-box; transform-origin: 50% 0; transform: scale(.78); }
/* In the quick view a photo charm's cut-out is shown whole on the velvet, not cropped to fill the frame. */
.cb-qv-photo { position: relative; }
.cb-qv-photo img[src^="/cdn/files/charm-bar/"][src*=".png"] { position: absolute; inset: 8% 13%; width: 74%; height: 84%; max-width: none; max-height: none; object-fit: contain; }

/* ---- 2026-11-14, owner: the bracelet comes in one length and one gold, so the two pickers on the box floor are
   gone (the chain picker stays). The page keeps the bundle's defaults: 18 cm, yellow gold, six charms. */
.cb-seg, .cb-metal { display: none !important; }

/* ---- Sale prices (owner, 2026-11-14): the old price in red, struck through, before the price to pay. */
.cb-slot-price s, .cb-qv-price s { color: #c62828; text-decoration: line-through; text-decoration-thickness: 1px; margin-right: .5em; font-weight: 400; }
/* Every charm is on sale, so the "Sale" flag on each compartment only hid the top of the charm: the crossed-out
   price says it. The price to pay is navy, so it reads on the cream tag (rose on cream fails contrast). */
.cb-slot-badge { display: none; }
.cb-slot-price.is-sale, .cb-qv-price.is-sale, .cb-qv-price.is-sale span { color: var(--navy); font-weight: 700; }

/* ---- The free-bracelet offer (charm-bar-roomys.js): the bracelet's price struck through in red, as the charms' old prices. */
.cb-free-was { color: #c62828; text-decoration: line-through; text-decoration-thickness: 1px; margin-right: .4em; font-weight: 400; }

/* ---- The receipt's "You save" line, beside the total (charm-bar-roomys.js). */
.cb-summary-saved { margin: 2px 0 16px; text-align: right; font: 700 12px/1.3 var(--cb-typewriter); letter-spacing: .04em; color: #c62828; }
.cb-summary-saved[hidden] { display: none; }
.cb-summary-list li > span:last-child { color: var(--navy); }   /* the price to pay reads as strongly as the name */

/* ---- A tap adds a charm (charm-bar-roomys.js): the description it opens on the way is not shown. */
html.cb-quickadd dialog.cb-qv, html.cb-quickadd dialog.cb-qv::backdrop { opacity: 0 !important; transition: none !important; animation: none !important; }
.cb-slot-btn { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }   /* a long press is ours, not the phone's menu */

/* ---- Photo charms hang by their own loop (owner, 2026-11-14): the bundle's extra ring above a hanging charm is
   not drawn, and each charm is lifted so the chain runs through the top of its own loop. The lift is per charm
   (where its loop's hole sits, measured from the cut-outs), in the bracelet's own units. Only the picture moves:
   the bundle still swings the charm about the same point. */
.cb-charm:has(image[href^="/cdn/files/charm-bar/"]) > g + g { display: none; }
.cb-charm image[href^="/cdn/files/charm-bar/charm-bow.png"] { transform: translateY(-11.7px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-camera.png"] { transform: translateY(-14.3px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-cherries.png"] { transform: translateY(-11.9px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-coral.png"] { transform: translateY(-12.1px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-cowboy-hat.png"] { transform: translateY(-12.1px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-life-ring.png"] { transform: translateY(-10.6px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-lobster-claw.png"] { transform: translateY(-13.1px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-oyster.png"] { transform: translateY(-12.6px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-palette.png"] { transform: translateY(-16.9px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-pickleball.png"] { transform: translateY(-14.9px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-popsicle.png"] { transform: translateY(-12.5px); }
.cb-charm image[href^="/cdn/files/charm-bar/charm-tangerine.png"] { transform: translateY(-13.4px); }

/* ---- Phones, "Box it up" (charm-bar-roomys.js): the receipt is kept away while the box is seen closing. */
html.cb-print-wait .cb-summary { display: none !important; }

/* ---- The typewriter (owner's pick, 2026-11-14: Soul 2.0 concept 2, navy with rose keys) stands where the bundle's
   pink register stood. Only the picture and where the page's own parts sit on it change; the bundle still fills
   the same elements. Cut-out and the positions below come from
   Roomys JEwelery/Charm Bar/typewriter-concepts/_build/prep_typewriter2.py (typewriter-2-places.json).
   To go back to the register, remove this block. */
.cb-register { background-image: url("typewriter-2.webp") !important; background-size: contain !important; background-position: center !important; background-repeat: no-repeat !important;
  filter: drop-shadow(0 18px 16px rgba(5, 16, 34, .28)); }
.cb-reg-keys { display: none !important; }                       /* the register's lettered keys: the typewriter has its own */
.cb-reg-logo {                                                    /* the brand on the name plate, in gold */
  position: absolute !important; left: 40.54% !important; top: 47.84% !important;
  width: 22.47% !important; height: 3.76% !important; transform: none !important; opacity: 1 !important;
  background: #d9b56a !important; -webkit-mask: var(--cb-logo) center / contain no-repeat !important; mask: var(--cb-logo) center / contain no-repeat !important; }
.cb-reg-display {                                                 /* the count and total, typed on the sheet in the roller */
  left: 27.46% !important; top: 8.34% !important; width: 47.77% !important; height: 10.85% !important;
  background: none !important; box-shadow: none !important; border: 0 !important; padding: 0 3% !important; transform: none !important; }
.cb-reg-display .cb-tag-count { color: var(--navy) !important; }
.cb-reg-display .cb-tag-total { color: var(--navy) !important; font-weight: 700 !important; }
.cb-register .cb-boxit { left: 22% !important; top: 97% !important; width: 56% !important; height: 10% !important; border-radius: 4px !important; }   /* the key: a button under the machine */
.cb-tag-wrap { margin-bottom: 5% !important; }

/* ---- The typewriter a bit bigger (owner, 2026-11-14). From tablet up it is scaled in place, about its top middle,
   so the three columns keep their widths (there is no spare width to give its column); the room it then needs
   below is added under it. On phones its box is simply wider. */
@media (min-width: 760px) {
  .cb-register { scale: 1.2; transform-origin: 50% 0; }
  .cb-tag-wrap { margin-bottom: 26% !important; }
}
@media (max-width: 759px) {
  .cb-tag-wrap { width: min(100%, 372px); }
}

/* ---- The free-bracelet bar (owner, 2026-11-17: in place of the pink sentence that stood above the box). A small
   bar at the top right, one piece per charm needed, so it is full at five. The markup comes from views/charmbar.mjs
   while the offer is on; charm-bar-roomys.js fills the pieces as charms are hung. The bundle's own .cb-offer line
   stays in the page, hidden (its script writes to it on every change). */
.cb-goal {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 7px 10px; width: 156px; margin: 3px 0 0;
  color: var(--navy); font: 700 10px/1 var(--cb-typewriter); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.cb-goal-count { font-size: 11px; letter-spacing: .04em; }
.cb-goal-bar { grid-column: 1 / -1; display: flex; gap: 4px; }
.cb-goal-bar i { position: relative; flex: 1; height: 5px; border-radius: 3px; background: rgba(16, 43, 73, .17); overflow: hidden; }
.cb-goal-bar i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--navy);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease);
}
.cb-goal-bar i.is-on::after { transform: none; }
/* Desktop: the bar sits under the total, as wide as the total's own words (the pill's padding is 18px a side). The
   pill keeps one width whether the total has three figures or four, so the two always line up. The stage keeps
   the 27px the sentence's row used to take above it: without them the typewriter rises into the total on a short
   laptop window (1366 x 650). */
@media (min-width: 1100px) {
  .cb-pill { min-width: 183.4px; justify-content: space-between; }   /* 36px padding + 13 letters at 13px + 10px + 4 figures at 15px; the typeface is 0.6em a letter */
  .cb-goal { width: 147.4px; margin-right: 18px; }
  .cb-stage { padding-top: 31px; }
}
/* One line (name, bar, count) where there is no room for two: tablets, phones and short desktop windows. */
@media (max-width: 1099px), (max-height: 699px) {
  .cb-goal { display: flex; align-items: center; gap: 9px; width: auto; }
  .cb-goal-bar { order: 1; width: 96px; }
  .cb-goal-count { order: 2; }
}
@media (min-width: 1100px) and (max-height: 699px) {
  .cb-top-end { row-gap: 5px; }                    /* the typewriter stands close under the total here */
  .cb-goal { margin-top: 0; }
}
/* Tablet and phone: that line hangs under the top bar, at the right, where the sentence used to take a row or two. */
@media (max-width: 1099px) {
  .cb-top { position: relative; }
  .cb-top:has(.cb-goal) { padding-bottom: 30px; }
  .cb-goal { position: absolute; right: 32px; bottom: 9px; margin: 0; }
}
@media (max-width: 759px) {
  .cb-goal { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cb-goal-bar i::after { transition: none; }
}
