/* Designer (inside .design-band), adapted from moments-renderer web/styles.css (PKC). Tokens from site.css only. */
.designer { display: grid; gap: 24px; padding-bottom: 8px; text-align: left; }
.stage { min-width: 0; background: var(--paper); border-radius: 14px; padding: 18px; }
.sheet { margin: 0; aspect-ratio: 3 / 4; width: 100%; background: #0f1b2d; border-radius: 2px; overflow: hidden; box-shadow: 0 1px 2px rgba(26, 32, 48, .08), 0 10px 28px rgba(26, 32, 48, .16); display: grid; place-items: center; }
.sheet svg { display: block; width: 100%; height: 100%; }
.loading { color: #c4c0b6; font-size: 14px; }
.stage-note { margin: 10px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.facts { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; color: var(--text-2); }
.facts li { padding: 6px 0; border-top: 1px solid var(--border); }
.facts li:first-child { border-top: 0; }
.facts li.note { color: var(--text); }
.controls { min-width: 0; }
.controls fieldset { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 16px 0 18px; display: grid; gap: 12px; }
.controls fieldset:first-of-type { border-top: 0; padding-top: 4px; }
.controls legend { float: left; width: 100%; margin: 0 0 2px; font-weight: 500; font-size: 17px; color: var(--text); padding: 0; }
.controls legend span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; vertical-align: 1px; }
.controls label { display: grid; gap: 6px; font-size: 14px; color: var(--text); }
.row.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.controls input[type=text], .controls input[type=date], .controls input[type=time], .controls input[type=number], .controls select { font: 400 16px/1.3 var(--font-text); color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 12px; width: 100%; min-height: 46px; appearance: none; -webkit-appearance: none; }
.controls input:focus-visible, .controls select:focus-visible, .swatch:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.controls input:disabled { color: var(--text-3); background: var(--surface-2); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.controls .check { display: flex; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.swatch { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; min-height: 46px; cursor: pointer; background: #fff; font-size: 15px; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .chip { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1px solid rgba(26, 32, 48, .25); display: grid; place-items: center; }
.swatch .chip i { width: 4px; height: 4px; border-radius: 50%; display: block; }
.swatch:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.controls .market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.controls .market label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; min-height: 46px; cursor: pointer; }
.controls .market label:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.controls .market input { accent-color: var(--accent); }
.buy-row { display: grid; gap: 8px; margin-top: 4px; }
.buy-row .btn { width: 100%; }
.buy-total { margin: 0; font-size: 18px; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .designer { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 48px; align-items: start; }
  .stage { position: sticky; top: 84px; padding: 28px; }
}
.controls .swatch { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.controls .sizes .swatch { justify-content: space-between; }
.controls .check { display: flex; align-items: center; }
/* basket */
.buy-row .btn-quiet { width: 100%; margin-top: 10px; }
.basket { margin-top: 14px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.basket h3 { margin: 0 0 6px; font-size: 18px; }
.basket ol { margin: 0 0 10px; padding-left: 20px; }
.basket li { padding: 4px 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.basket .link { background: none; border: 0; padding: 0 0 0 6px; color: var(--accent); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; min-height: 24px; }
.basket .btn-quiet { margin-top: 4px; width: 100%; min-height: 44px; font-size: 15px; }
.addons { margin: 4px 0 10px; }
.addons-h { margin: 0 0 6px; font-size: 15px; }
.addons-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.addons-list li { padding: 0; }
.addons-list .btn-quiet { margin-top: 0; }
#basket-tier { margin: 0 0 8px; }

/* Finish look on the live preview (a hint of the frame or panel; the print file itself never changes) */
.sheet { transition: box-shadow .2s, border-color .2s; }
.sheet[data-finish='framed-black'] { border: 14px solid #1d1d1f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 14px 30px rgba(26,32,48,.28); }
.sheet[data-finish='framed-white'] { border: 14px solid #f7f6f2; box-shadow: 0 0 0 1px #dcd8cf, 0 14px 30px rgba(26,32,48,.2); }
.sheet[data-finish='framed-walnut'] { border: 14px solid #5b3a24; box-shadow: 0 14px 30px rgba(26,32,48,.28); }
.sheet[data-finish='canvas'] { box-shadow: 6px 6px 0 rgba(26,32,48,.12), 0 16px 32px rgba(26,32,48,.24); }
.sheet[data-finish='acrylic'] { border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 18px 36px rgba(26,32,48,.26); }
.sheet[data-finish='metal'] { border-radius: 4px; box-shadow: 0 0 0 1px #c9ccd2, 0 16px 32px rgba(26,32,48,.24); }
.finishes { margin-bottom: 10px; }
.controls .finishes .swatch { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; border-radius: 14px; padding: 8px 14px; line-height: 1.3; }
.controls .finishes .swatch input { position: absolute; opacity: 0; pointer-events: none; }
.controls .finishes .swatch b { font-weight: 400; font-size: 13px; color: var(--text-2); }
.controls .finishes .swatch:has(input:checked) { box-shadow: 0 0 0 1px var(--text); border-color: var(--text); }
.controls .finishes .swatch:has(input:focus-visible) { outline: 2px solid var(--focus, #1d2b4f); outline-offset: 2px; }
.controls .finishes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
/* Street map: the preview is a PNG from /api/map-preview with a "Preview" label laid over it (no watermark opt). */
.map-sheet { position: relative; }
.map-sheet .map-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s var(--ease-out, ease); }
.map-sheet.is-drawing .map-img { opacity: .6; }
.map-mark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 12vw, 92px); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .34); text-shadow: 0 0 2px rgba(20, 27, 43, .4); transform: rotate(-28deg); }
.map-mark-pill { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(20, 27, 43, .7); color: #fff; font-size: 12px; }
.controls .sizes.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.controls .sizes.three .swatch { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; border-radius: 14px; padding: 8px 12px; line-height: 1.3; position: relative; }
.controls .sizes.three .swatch input { position: absolute; opacity: 0; pointer-events: none; }
.controls .sizes.three .swatch b { font-weight: 400; font-size: 13px; color: var(--text-2); }
.controls .sizes.three .swatch:has(input:checked) { box-shadow: 0 0 0 1px var(--text); border-color: var(--text); }
.controls .sizes.three .swatch:has(input:focus-visible) { outline: 2px solid var(--focus, #1d2b4f); outline-offset: 2px; }
/* Met, engaged, married: three place cards, each with a day (or month only), month and year. */
.row.three-date { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }

/* Design pass 5 Dec: option chips centre their content at every width (were left-aligned with a dead right side). */
.controls .swatch { justify-content: center; text-align: center; }
.controls .finishes .swatch, .controls .sizes.three .swatch { align-items: center; text-align: center; }
.controls .sizes .swatch:not(.finishes .swatch) { justify-content: center; gap: 8px; }
.search-hint { color: var(--text-2); font-size: 14px; cursor: default; padding: 10px 12px; }

/* Step flow (designer/main.js mountSteps, PKC's phone pattern): one step at a time over the full server form, a sticky
   compact preview on phones, a "2 of 4" line, Back and Next, optional things in "Change" panels, and a slim buy bar.
   Without JS none of these classes exist and the whole form shows as before. Tokens only. */
.controls [hidden], .kd-step[hidden] { display: none !important; }
.kd-steps { display: grid; }
.kd-head { display: grid; gap: 8px; margin: 0 0 16px; }
.kd-count { margin: 0; font-size: 14px; color: var(--text-2); }
.kd-count b { font-weight: 500; color: var(--text); }
.kd-track { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.kd-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s var(--ease-out); }
.kd-step { display: grid; gap: 16px; }
.kd-h { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.1; color: var(--text); }
.kd-h:focus { outline: none; }
.kd-h:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.kd-on .controls fieldset, .kd-on .controls fieldset:first-of-type { border-top: 0; padding: 0; gap: 14px; }
.kd-on .controls legend span { display: none; }
.kd-on .controls legend { margin-bottom: 0; font-size: 15px; color: var(--text-2); }
.kd-step:not(.kd-legends) > fieldset:first-of-type > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kd-on .controls fieldset.place-card { border: 1px solid var(--border); border-radius: 14px; padding: 6px 14px 14px; }
.kd-on .controls .place-card legend { float: none; width: auto; padding: 0 6px; margin-left: -6px; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); }
.kd-on .controls input[type=text], .kd-on .controls input[type=date], .kd-on .controls input[type=time], .kd-on .controls input[type=number], .kd-on .controls select { min-height: 52px; font-size: 17px; }
.kd-on .controls label { font-size: 15px; }
.kd-on .swatch, .kd-on .controls .market label { min-height: 52px; }
.kd-on .check { min-height: 44px; }
.kd-in { animation: kd-in .34s var(--ease-out) both; }
.kd-in-back { animation: kd-in-back .34s var(--ease-out) both; }
@keyframes kd-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes kd-in-back { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.kd-nav { display: flex; gap: 10px; margin-top: 20px; }
.kd-nav .btn { min-height: 52px; }
.kd-nav .kd-back { flex: 0 0 auto; padding-inline: 22px; }
.kd-nav .kd-back:disabled { opacity: .4; }
.kd-nav .kd-next { flex: 1; background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { .kd-nav .kd-next:hover { background: var(--accent-hover); } }
.kd-more { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.kd-more summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; cursor: pointer; font-size: 15px; border-radius: 14px; }
.kd-more summary::-webkit-details-marker { display: none; }
.kd-more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.kd-more-l { font-weight: 500; color: var(--text); flex: none; }
.kd-more-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; color: var(--text-2); }
.kd-more summary::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 2px 4px 0; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(45deg); transition: transform .2s var(--ease-out); }
.kd-more[open] summary::after { transform: translate(0, 4px) rotate(225deg); }
.kd-more-b { display: grid; gap: 14px; padding: 2px 16px 16px; }
.kd-more-b fieldset > legend { position: static !important; width: auto !important; height: auto !important; clip: auto !important; }
.kd-more[open] .kd-more-b { animation: kd-open .24s var(--ease-out) both; }
@keyframes kd-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.kd-on .controls:not(.kd-last) .buy-row > :not(.kd-bar):not(.basket) { display: none; }
.kd-bar { display: grid; gap: 8px; }
.kd-bar .buy-total b { font-weight: 500; }
.buy-total b::after { content: ', '; }
.kd-more-b .market { display: flex; flex-wrap: wrap; }
.kd-more-b .market label { flex: 1 1 auto; }
@media (prefers-reduced-motion: reduce) {
  .kd-in, .kd-in-back, .kd-more[open] .kd-more-b { animation: none; }
  .kd-track i, .kd-more summary::after { transition: none; }
}
@media (max-width: 899px) {
  .designer.kd-on { gap: 16px; padding-bottom: 96px; }
  /* Compact sticky preview under the header: about a third of the screen (PKC learned 42svh covered too much). */
  .kd-on .stage { position: sticky; top: var(--kd-top, 60px); z-index: 10; margin-inline: calc(-1 * var(--space-4)); padding: 10px var(--space-4); border-radius: 0; box-shadow: 0 10px 18px -16px color-mix(in srgb, var(--night) 45%, transparent); }
  .kd-on .sheet { width: auto; max-width: 100%; height: min(28svh, calc((100vw - 2 * var(--space-4)) / var(--kd-ar, .75))); margin: 0 auto; }
  .kd-on .stage-note, .kd-on .facts, .kd-on .kd-sky-hint, .kd-on .kd-sky-when { display: none; }
  /* The turning sky's "Back to my moment" floats on the preview instead of taking a row. */
  .kd-on .kd-sky-bar { position: absolute; left: auto; right: 10px; bottom: 10px; min-height: 0; margin: 0; justify-content: flex-end; pointer-events: none; }
  .kd-on .kd-sky-back.btn { pointer-events: auto; max-width: 104px; min-height: 44px; padding: 6px 12px; border-radius: 14px; white-space: normal; font-size: 13px; line-height: 1.2; }
  .kd-h { font-size: 28px; }
  /* The slim buy bar: price on the left, Buy on the right, pinned while the designer is on screen. */
  .kd-on .kd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 24; display: flex; align-items: center; gap: 14px; padding: 10px var(--space-4) calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -10px 22px -18px color-mix(in srgb, var(--night) 45%, transparent); transform: translateY(110%); transition: transform .28s var(--ease-out); }
  .kd-on .kd-bar.on { transform: none; }
  .kd-on .kd-bar .buy-total { flex: 1; min-width: 0; margin: 0; text-align: left; font-size: 13px; font-weight: 400; line-height: 1.3; color: var(--text-2); }
  .kd-on .kd-bar .buy-total b { display: block; font-size: 21px; color: var(--text); }
  .kd-on .kd-bar .buy-total b::after { content: none; }
  .kd-on .kd-bar .btn { width: auto; flex: none; min-height: 50px; padding-inline: 28px; font-size: 17px; }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) { .kd-on .kd-bar { transition: none; } }
/* Gifts: "Night sky" / "Street map" design toggle (plain links, works without JS) */
.design-pick { display: flex; gap: 0; justify-content: center; margin: 4px auto 6px; border: 1px solid var(--border); border-radius: 999px; padding: 3px; width: max-content; max-width: 100%; }
.design-pick a { padding: 9px 20px; border-radius: 999px; color: var(--text-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.design-pick a[aria-current] { background: var(--text); color: var(--paper, #fff); }
.design-pick-note { text-align: center; max-width: 52ch; margin: 0 auto 18px; }
/* /astrology/ free tools: the signs, large */
.astro-results:empty { display: none; }
.astro-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 8px; }
.astro-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.astro-who { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.astro-card dl { margin: 0; display: grid; gap: 4px; }
.astro-card dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 4px; }
.astro-card dl div:first-child { border-top: 0; }
.astro-card dt { color: var(--text-2); }
.astro-card dd { margin: 0; font-weight: 500; }
/* Mug design tiles (plain links, work without JS): two across on a phone, one row on a wide screen. Selected = ink. */
.design-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 880px; margin: 4px auto 8px; }
.design-tiles a { display: grid; gap: 2px; align-content: start; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); text-decoration: none; }
.design-tiles a b { font-weight: 500; }
.design-tiles a small { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.design-tiles a[aria-current] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (min-width: 900px) { .design-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }
.photo-stub { max-width: 560px; margin: 8px auto 24px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.photo-stub h3 { margin: 0 0 6px; }
/* Live character counter under a text box */
.char-count { display: block; font-size: 13px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; margin-top: 2px; }
.char-count.near { color: var(--text); font-weight: 500; }
/* Mug preview: turned round (canvas over the flat wrap) or laid flat */
.sheet.is-3d img.map-img { visibility: hidden; }
.mug3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.mug3d-canvas:active { cursor: grabbing; }
.mug-views { display: flex; justify-content: center; gap: 16px; margin: 6px 0 2px; }
.mug-views button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 2px; min-height: 44px; font: inherit; font-size: 14px; color: var(--text-2); cursor: pointer; }
.mug-views button[aria-pressed='true'] { color: var(--text); border-bottom-color: var(--text); }
