/* SNDR Hönnun studio, in Instaprent's Coutumes system: the product laid on her beige
   table, a white panel with one step at a time, square controls, extended caps for
   labels, the serif for text, one black button. Orange marks "Þín hönnun". Colours
   are literal because the studio opens in the top layer, outside the theme wrapper. */
.ds, .ds-ed, .ds-lay, .ds-mount {
  --table: #ece9e2;
  --table-2: #e2ded5;
  --paper: #ffffff;
  --ink: #111111;
  --ink-2: rgba(0, 0, 0, .62);
  --line: rgba(0, 0, 0, .14);
  --orange: #f67a32;
  --ok: #1d6b3a;
  --warn: #8a4a00;
  --warn-bg: #fdebd9;
  --err: #b3261e;
  --serif: 'IP Serif', Georgia, 'Times New Roman', serif;
  --ext: 'IP Ext', Arial, sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: var(--serif);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.ds *, .ds-ed *, .ds-lay *, .ds-mount * { box-sizing: border-box; }
:where(.ds, .ds-ed, .ds-lay, .ds-mount) button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; touch-action: manipulation; }
:where(.ds, .ds-ed, .ds-lay, .ds-mount) :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
html.ds-lock { overflow: hidden; }
/* nothing of the page shows around the studio, not even when the iPhone keyboard moves the view
   (the product page's own sticky "Hanna" bar used to peek out under the studio's bar) */
html.ds-lock body { visibility: hidden; }
html.ds-lock dialog.ds[open], html.ds-lock dialog.ds-ed[open], html.ds-lock dialog.ds-lay[open] { visibility: visible; }
/* placeholders a grandparent can read (Codex 10-17: the theme's 50% grey was 3.5:1) */
:where(.ds, .ds-ed) :is(input, textarea)::placeholder { color: #6a655e; opacity: 1; }
.ds .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons, labels ---------- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; background: var(--paper);
  font-family: var(--ext); font-weight: 700; font-size: 13px; line-height: 16px; letter-spacing: .02em; text-transform: uppercase;
  transition: transform 160ms var(--ease), background-color 160ms ease, opacity 160ms ease;
}
.ds-btn:active:not(:disabled) { transform: scale(.97); }
.ds-btn--ink { background: var(--ink); color: var(--paper) !important; }
.ds-btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.ds-btn--lg { min-height: 56px; padding: 0 28px; font-size: 14px; }
.ds-btn:disabled { opacity: .38; cursor: default; }
.ds-btn.is-busy span { opacity: .6; }
@media (hover: hover) and (pointer: fine) {
  .ds-btn--ghost:hover:not(:disabled) { background: rgba(0, 0, 0, .04); }
  .ds-btn--ink:hover:not(:disabled) { background: #2a2a2a; }
}
.ds-round {
  width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 160ms var(--ease);
}
.ds-round:active:not(:disabled) { transform: scale(.94); }
.ds-round:disabled { opacity: .35; cursor: default; }
.ds-label { margin: 0 0 10px; font-family: var(--ext); font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: .02em; text-transform: uppercase; }
.ds-link { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.ds-note { margin: 14px 0 0; font-size: 15px; line-height: 21px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.ds-note.is-warn { color: var(--warn); background: var(--warn-bg); padding: 12px 14px; }
.ds-note svg { flex: none; margin-top: 2px; }

/* ---------- the launcher on the product page ---------- */
.ds-launch { display: grid; gap: 14px; margin-top: 8px; }
.ds-go { width: 100%; }
.ds-launch-note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.ds-draft { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--table); }
.ds-draft { animation: ds-rise 220ms var(--ease) both; } /* the saved design arrives when the studio closes */
@keyframes ds-rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .ds-draft { animation: none; } }
.ds-draft p { margin: 0 0 4px; font-size: 15px; overflow-wrap: anywhere; }
.ds-draft .ds-label { margin-bottom: 4px; }
.ds-mini { flex: none; display: block; background: #fff; box-shadow: 0 1px 1px rgba(17, 17, 17, .06), 0 4px 12px -4px rgba(17, 17, 17, .25); }

/* ---------- the studio ---------- */
.ds {
  position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--table);
  display: none; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}
.ds[open] { display: grid; animation: ds-in 260ms var(--ease); }
.ds::backdrop { background: rgba(0, 0, 0, .3); }
@keyframes ds-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } }

.ds-top {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px 16px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.ds-top-l { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.ds-top h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-svc { display: inline-flex; align-items: center; gap: 6px; flex: none; font-family: var(--ext); font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .02em; text-transform: uppercase; }
.ds-svc i { width: 10px; height: 10px; background: var(--orange); }
.ds-saved { margin: 0; font-size: 13px; color: var(--ink-2); opacity: 0; transition: opacity 300ms ease; white-space: nowrap; }
.ds-saved.is-on { opacity: 1; }
.ds-x { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; background: none; font-family: var(--ext); font-weight: 700; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
@media (max-width: 599px) { .ds-svc, .ds-saved { display: none; } }

/* steps */
.ds-nav { background: var(--paper); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ds-nav::-webkit-scrollbar { display: none; }
.ds-steps { list-style: none; display: flex; margin: 0; padding: 0 8px; gap: 4px; min-width: max-content; }
.ds-steps button {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 0; background: none;
  color: var(--ink-2); border-bottom: 2px solid transparent;
}
.ds-steps button[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.ds-num {
  width: 24px; height: 24px; display: inline-grid; place-items: center; flex: none;
  font-family: var(--ext); font-weight: 700; font-size: 12px; box-shadow: inset 0 0 0 1px var(--line);
}
.ds-steps [aria-current] .ds-num { background: var(--ink); color: var(--paper); box-shadow: none; }
.ds-steps .is-done .ds-num { background: var(--table-2); color: var(--ok); box-shadow: none; }
.ds-lab { font-family: var(--ext); font-weight: 700; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }

/* body: preview + panel */
.ds-body { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(230px, 42%) minmax(0, 1fr); }
/* phones: while typing and checking, the words get the room; the product stays in sight, smaller */
@media (max-width: 899px) { .ds:is([data-step="texti"], [data-step="yfirfara"]) .ds-body { grid-template-rows: minmax(230px, 36%) minmax(0, 1fr); } }
/* phones, keyboard up for one of the panel's fields (set in fitViewport): the header, the steps, the
   price bar and the stage's buttons step aside; the print shows flat on top, the field below it */
@media (max-width: 899px) {
  .ds.is-typing { grid-template-rows: minmax(0, 1fr); }
  .ds.is-typing :is(.ds-top, .ds-nav, .ds-bar, .ds-more, .ds-viewseg, .ds-laybtn) { display: none; }
  .ds.is-typing .ds-body { grid-template-rows: minmax(120px, 42%) minmax(0, 1fr); }
  .ds.is-typing .ds-stage .ds-view:is(.is-flat, .is-mock, .is-mug) { padding: 8px 12px; }
  .ds.is-typing .ds-view.is-mock .ds-prodwrap, .ds.is-typing .ds-view.is-mug .ds-mugwrap { display: none; }
  .ds.is-typing .ds-view.is-mock .ds-flatbox { display: grid; }
  .ds.is-typing .ds-view.is-mug .ds-flatbox { display: grid; align-self: center; }
  .ds.is-typing .ds-pbody { padding-top: 14px; }
}
@media (min-width: 900px) { .ds-body { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) 440px; } }
.ds-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.ds-panel { display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); min-height: 0; min-width: 0; background: var(--paper); box-shadow: 0 -1px 0 var(--line); }
.ds-stage, .ds-pbody { min-width: 0; }
@media (min-width: 900px) { .ds-panel { box-shadow: -1px 0 0 var(--line); } }
.ds-pbody { overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px 28px; }
@media (min-width: 900px) { .ds-pbody { padding: 32px 32px 40px; } }
.ds-pbody h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 30px; outline: none; text-wrap: balance; }
.ds-lede { margin: 0 0 22px; font-size: 16px; line-height: 23px; color: var(--ink-2); }

/* preview: the flat print on the table */
.ds-view { width: 100%; height: 100%; min-height: 0; }
.ds-view.is-flat { display: grid; place-items: center; }
.ds-flat { position: relative; display: inline-block; line-height: 0; background: var(--frame, transparent); box-shadow: 0 1px 1px rgba(17, 17, 17, .06), 0 14px 30px -12px rgba(17, 17, 17, .35); }
.ds-flat.has-frame { padding: var(--fw); box-shadow: 0 1px 2px rgba(17, 17, 17, .12), 0 18px 34px -14px rgba(17, 17, 17, .45), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ds-flat.has-frame .ds-canvas { box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); }
.ds-canvas, .ds-flatc { display: block; touch-action: pan-y; }

/* preview: the mug, round, with the flat print below */
.ds-view.is-mug { display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 8px 16px 12px; gap: 8px; }
.ds-mugwrap { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 44px; justify-items: center; }
.ds-mugbox { position: relative; width: 100%; min-height: 0; overflow: hidden; display: grid; place-items: center; cursor: grab; touch-action: pan-y; outline: none; }
.ds-mugbox.is-dragging { cursor: grabbing; }
.ds-mugbox:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.ds-mugbox .ds-canvas { grid-area: 1 / 1; }
.ds-gl { animation: ds-fade 320ms var(--ease); }
@keyframes ds-fade { from { opacity: 0; } }

/* preview: her photo of the product with the print on it, the flat print beside it */
.ds-view.is-mock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 32%); gap: 28px; padding: 24px 28px; align-items: center; }
.ds-prodwrap { position: relative; min-width: 0; height: 100%; min-height: 0; display: grid; place-items: center; }
.ds-prodin { position: relative; line-height: 0; min-width: 120px; min-height: 120px; }
.ds-prodin:not(.is-ready) { width: min(100%, 460px); aspect-ratio: 1; background: linear-gradient(100deg, #e2ded5 30%, #ebe8e1 50%, #e2ded5 70%) 0 0 / 300% 100%; animation: ds-shimmer 1.4s linear infinite; }
.ds-prodin .ds-gl { box-shadow: 0 1px 1px rgba(17, 17, 17, .06), 0 14px 30px -12px rgba(17, 17, 17, .35); }
.ds-view.is-mock .ds-flatbox { width: auto; justify-self: stretch; display: grid; justify-items: center; align-content: center; }
.ds-view.is-mock .ds-flatin { width: max-content; }
.ds-guide { max-width: 34ch; margin: 10px auto 0; }
.ds-guide:empty { display: none; }
.ds-view.is-mock.no-product { grid-template-columns: minmax(0, 1fr); }
.ds-view.is-mock.no-product .ds-prodwrap { display: none; }
.ds-turn { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.ds-flatbox { width: min(100%, 720px); justify-self: center; }
.ds-cap { margin: 0 0 6px; font-size: 13px; line-height: 16px; color: var(--ink-2); text-align: center; }
.ds-flatin { position: relative; line-height: 0; box-shadow: 0 1px 1px rgba(17, 17, 17, .06), 0 6px 18px -8px rgba(17, 17, 17, .3); }
.ds-viewseg { display: none; }
@media (max-width: 899px) {
  .ds-turn span { display: none; }
  .ds-cap { font-size: 12px; }
  /* one button, top left: flips to the view it names ("Sjá prentið" / "Sjá púðann") */
  .ds-viewseg {
    position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 10px;
    border: 0; background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 8px 22px -10px rgba(0, 0, 0, .4);
    font-family: var(--ext); font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
    transition: transform 160ms var(--ease);
  }
  .ds-viewseg svg { flex: none; }
  .ds-viewseg:active { transform: scale(.97); }
  .ds-view.is-mug { padding-top: 62px; grid-template-rows: minmax(0, 1fr); }
  .ds-view.is-mug[data-show=mug] .ds-flatbox { display: none; }
  .ds-view.is-mug[data-show=flat] .ds-mugwrap { display: none; }
  .ds-view.is-mug[data-show=flat] { align-content: center; }
  .ds-view.is-mug[data-show=flat] .ds-flatbox { width: auto; }
  /* the strip is measured from the full-width box around it and sits centred in it */
  .ds-view.is-mug .ds-flatbox { justify-self: stretch; width: auto; display: grid; justify-items: center; align-content: center; }
  .ds-view.is-mug .ds-flatin { width: max-content; }
  .ds-view.is-mock { grid-template-columns: minmax(0, 1fr); padding: 62px 12px 10px; gap: 0; }
  .ds-view.is-mock .ds-cap:not(.ds-guide) { display: none; } /* the button already says which view this is */
  .ds-view.is-mock[data-show=product] .ds-flatbox { display: none; }
  .ds-view.is-mock[data-show=flat] .ds-prodwrap { display: none; }
  .ds-view.is-mock.no-product { padding-top: 16px; }
  .ds-view.no-product ~ .ds-viewseg, .ds-stage:has(.no-product) .ds-viewseg { display: none; }
}
@media (max-width: 599px) {
  /* phones: every step keeps its name, the number above it, so nobody has to guess what "3" is */
  .ds-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0 4px; gap: 2px; min-width: 0; }
  .ds-steps li { min-width: 0; }
  .ds-steps button { width: 100%; flex-direction: column; justify-content: center; gap: 5px; padding: 8px 2px 7px; min-height: 60px; }
  .ds-num { width: 24px; height: 24px; font-size: 12px; }
  .ds-lab { font-size: 10px; line-height: 12px; letter-spacing: .01em; text-align: center; overflow-wrap: anywhere; }
}

/* hit areas over the preview */
.ds-hot { position: absolute; inset: 0; pointer-events: none; }
.ds-hit { position: absolute; pointer-events: auto; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.ds-hit .ds-hit-pill { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.ds-hit.is-text { cursor: text; }
.ds-hit-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--paper); color: var(--ink);
  font-family: var(--ext); font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .02em; text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18); white-space: nowrap;
  transition: opacity 160ms ease, transform 160ms var(--ease);
}
.ds-hit.is-filled .ds-hit-pill { opacity: 0; transform: translateY(4px); }
.ds-hit.is-filled:focus-visible .ds-hit-pill { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) { .ds-hit.is-filled:hover .ds-hit-pill { opacity: 1; transform: none; } }
/* a chosen photo stays visible: on touch screens (and always on the product photo) its
   button is a small pencil at the photo's corner, not a label across it */
@media (hover: none) { .ds-hit.is-filled .ds-hit-pill { left: auto; top: 0; right: 0; translate: 35% -35%; opacity: 1; transform: none; padding: 7px; font-size: 0; gap: 0; border-radius: 50%; } }
.ds-prodin .ds-hit.is-filled .ds-hit-pill { left: auto; top: 0; right: 0; translate: 35% -35%; opacity: 1; transform: none; padding: 7px; font-size: 0; gap: 0; border-radius: 50%; }
/* On a phone the pencil is only shown on the photo step: elsewhere it would sit on the text being
   written. Tapping the photo still opens its editor on every step. */
@media (hover: none) { .ds-view:not([data-step="mynd"]) .ds-hit.is-filled .ds-hit-pill { opacity: 0; } }

/* ---------- step: layout and size ---------- */
.ds-layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 26px; }
.ds-layout {
  display: grid; gap: 6px; align-content: start; text-align: left; padding: 10px; border: 0; background: var(--table);
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 160ms ease, transform 160ms var(--ease);
}
.ds-layout:active { transform: scale(.98); }
.ds-layout.is-on { box-shadow: inset 0 0 0 2px var(--ink); background: #e6e2da; }
.ds-lthumb { width: 100%; display: block; box-shadow: 0 1px 1px rgba(17, 17, 17, .06), 0 4px 12px -6px rgba(17, 17, 17, .3); }
.ds-lname { font-family: var(--ext); font-weight: 700; font-size: 12px; line-height: 15px; letter-spacing: .02em; text-transform: uppercase; margin-top: 4px; }
.ds-lhint { font-size: 14px; line-height: 18px; color: var(--ink-2); }
.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px;
  transition: box-shadow 160ms ease, transform 160ms var(--ease);
}
.ds-chip small { font-family: var(--ext); font-size: 11px; color: var(--ink-2); }
.ds-chip.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.ds-chip:active:not(:disabled) { transform: scale(.97); }
.ds-chip:disabled { opacity: .45; cursor: default; }
.ds-sw { width: 18px; height: 18px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.ds-sw.is-none { background: linear-gradient(135deg, transparent 45%, rgba(0, 0, 0, .35) 45% 55%, transparent 55%), #fff; }

/* ---------- step: photos ---------- */
.ds-slot { display: grid; gap: 12px; padding: 16px 0 20px; border-bottom: 1px solid var(--line); }
.ds-slot:last-child { border-bottom: 0; }
.ds-drop {
  display: grid; place-items: center; gap: 6px; min-height: 150px; width: 100%; padding: 20px;
  border: 1.5px dashed rgba(0, 0, 0, .3); background: var(--table); text-align: center;
  transition: background-color 160ms ease, transform 160ms var(--ease);
}
.ds-drop:active { transform: scale(.99); }
.ds-same { width: 100%; margin-top: 8px; } /* the back of a ball: the front's photo again, one tap */
.ds-drop b { font-family: var(--ext); font-size: 14px; letter-spacing: .02em; text-transform: uppercase; }
.ds-drop span { font-size: 15px; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .ds-drop:hover { background: var(--table-2); }
  .ds-layout:hover:not(.is-on) { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
  .ds-chip:hover:not(:disabled):not(.is-on) { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45); }
  .ds-steps button:hover:not([aria-current]) { color: var(--ink); }
  .ds-round:hover:not(:disabled) { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45); }
  .ds-sugb:hover { background: var(--table-2); }
  .ds-link:hover { text-decoration-thickness: 2px; }
}
.ds-slot-row { display: flex; gap: 14px; align-items: center; }
.ds-slot-img { width: 88px; height: 88px; flex: none; background: var(--table); overflow: hidden; }
.ds-slot-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-slot-info { min-width: 0; flex: 1; }
.ds-status { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 15px; line-height: 21px; color: var(--ink-2); }
.ds-status svg { flex: none; margin-top: 2px; }
.ds-status.is-ok { color: var(--ok); }
.ds-status.is-warn { color: var(--warn); }
.ds-prog { display: block; height: 4px; margin-top: 8px; background: var(--table-2); overflow: hidden; }
.ds-prog i { display: block; height: 100%; background: var(--ink); transform-origin: left; transition: transform 200ms linear; }
.ds-slot-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.ds-toggle input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; }

/* ---------- step: text ---------- */
.ds-field { margin: 0 0 22px; }
.ds-field .ds-label { display: block; }
.ds-opt { font-family: var(--serif); font-weight: 400; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.ds-inwrap { position: relative; display: flex; align-items: stretch; }
.ds-inwrap input, .ds-inwrap textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border: 0; border-radius: 0; background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); font-family: var(--serif); font-size: 19px; line-height: 26px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
/* the serif's capital accents (Á, Ó, Ö) reach above its line: at 24px iOS cut them off, "Áslaug" read "Aslaug" */
.ds-inwrap input { padding-top: 13px; padding-bottom: 13px; }
.ds-inwrap textarea { resize: vertical; min-height: 96px; line-height: 27px; }
.ds-inwrap input:focus, .ds-inwrap textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.ds-inwrap input[type=date], .ds-inwrap input[type=time] { min-width: 0; }
.ds-inwrap.has-unit input { padding-right: 84px; }
.ds-unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--ink-2); pointer-events: none; }
.ds-meta { display: flex; align-items: baseline; gap: 12px; }
/* a calendar's own days: the list, then day + month + text + add (Ólína 16 Oct) */
.ds-dayfield .ds-help { margin: 4px 0 12px; }
.ds-days { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.ds-day { display: grid; grid-template-columns: 104px minmax(0, 1fr) 44px; align-items: stretch; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.ds-day-d { border: 0; background: none; padding: 0 0 0 12px; text-align: left; font-family: var(--serif); font-size: 16px; color: var(--ink-2); min-height: 48px; }
.ds-day-t { min-width: 0; border: 0; background: none; padding: 0 8px; font-family: var(--serif); font-size: 17px; color: var(--ink); min-height: 48px; -webkit-appearance: none; appearance: none; }
.ds-day-t:focus { outline: none; box-shadow: inset 0 -2px 0 var(--ink); }
.ds-day-x { border: 0; background: none; display: grid; place-items: center; color: var(--ink-2); min-height: 48px; }
.ds-day-x:hover { color: var(--ink); }
.ds-day-form { display: grid; gap: 8px; }
.ds-day-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.ds-day-sel, .ds-day-new {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 0; border-radius: 0; background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); font-family: var(--serif); font-size: 18px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.ds-day-sel { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; }
.ds-day-sel:focus, .ds-day-new:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.ds-day-add { width: 100%; justify-content: center; }
.ds-day-tl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.ds-day-tl .ds-label { margin: 0; }
/* the lettering choices fill the panel: two to a row on a phone (Codex 10-17: it had shrunk to one 132 px column) */
.ds-inwrap > .ds-fonts { flex: 1 1 auto; min-width: 0; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
/* the month captions: twelve short boxes under one heading */
.ds-capfield summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.ds-capfield summary::-webkit-details-marker { display: none; }
.ds-capfield summary::after { content: '+'; margin-left: auto; font-size: 22px; line-height: 1; }
.ds-capfield[open] summary::after { content: '–'; }
.ds-cap-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 4px 10px; margin-top: 8px; }
.ds-cap-row .ds-count, .ds-cap-row .ds-err { grid-column: 2; margin: 0; }
.ds-cap-row .ds-count:empty, .ds-cap-row .ds-err:empty { display: none; }
.ds-cap-l { font-family: var(--serif); font-size: 16px; color: var(--ink-2); }
.ds-cap-in { width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 0; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); font-family: var(--serif); font-size: 17px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.ds-cap-in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.ds-cap-row.has-err .ds-cap-in { box-shadow: inset 0 0 0 2px #b4432f; }
/* a calendar page up close */
.ds-zoombtn { justify-self: center; align-self: center; min-height: 44px; }
dialog.ds-zoom { background: #ece9e2; color: #1a1a1a; width: min(1100px, 100vw); height: min(940px, 100dvh); }
.ds-zoom-head { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 12px; background: #fff; color: #1a1a1a; border-bottom: 1px solid rgba(0, 0, 0, .12); }
.ds-zoom-head .ds-round { color: #1a1a1a; background: #fff; }
.ds-zoom-head .ds-pagebar-t, .ds-zoom-head .ds-x { color: #1a1a1a; }
.ds-zoom-head .ds-x { margin-left: auto; }
.ds-zoom-head .ds-pagebar-t { min-width: 0; }
.ds-zoom-in { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 24px; display: grid; justify-content: center; align-content: start; outline: none; }
.ds-zoom-cv { display: block; background: #fff; box-shadow: 0 10px 30px rgba(40, 34, 28, .18); }
@media (max-width: 699px) { .ds-zoom-in { padding: 16px; justify-content: start; } .ds-zoom-head { gap: 6px; } }
.ds-day-add:disabled { opacity: .45; }
.ds-meta .ds-help { flex: 1; min-width: 0; }
.ds-count { flex: none; margin: 8px 0 0 auto; font-family: var(--ext); font-size: 11px; line-height: 19px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ds-count:empty { display: none; }
.ds-count.is-over { color: var(--err); }
.ds-field.has-err input, .ds-field.has-err textarea { box-shadow: inset 0 0 0 2px var(--err); }
.ds-help { margin: 8px 0 0; font-size: 14px; line-height: 19px; color: var(--ink-2); }
.ds-help:empty, .ds-err:empty, .ds-soft:empty { display: none; }
.ds-err { margin: 8px 0 0; font-size: 15px; line-height: 20px; color: var(--err); }
.ds-soft { margin: 8px 0 0; font-size: 14px; line-height: 19px; color: var(--warn); }
.ds-derived { margin: 8px 0 0; font-size: 15px; color: var(--ink); }
.ds-sug { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.ds-sugb { min-height: 36px; padding: 0 12px; border: 0; background: var(--table); font-size: 15px; }

/* ---------- step: review ---------- */
.ds-proof { margin: 0 0 22px; }
.ds-proof img, .ds-proof-wait { display: block; width: 100%; height: auto; box-shadow: 0 1px 1px rgba(17, 17, 17, .06), 0 10px 26px -12px rgba(17, 17, 17, .4); background: #fff; }
.ds-proof:not(.is-mug) img, .ds-proof:not(.is-mug) .ds-proof-wait { width: min(100%, 300px); margin: 0 auto; }
.ds-proof-shape { position: relative; display: block; width: min(100%, 300px); margin: 0 auto; }
.ds-proof-shape img { width: 100% !important; margin: 0 !important; }
.ds-proof-shape .ds-outline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ds-proof-wait { display: grid; place-items: center; font-size: 15px; color: var(--ink-2); background: linear-gradient(100deg, #f4f2ee 30%, #fbfaf8 50%, #f4f2ee 70%) 0 0 / 300% 100%; animation: ds-shimmer 1.4s linear infinite; }
@keyframes ds-shimmer { to { background-position: -150% 0; } }
.ds-proof-fail { display: grid; gap: 12px; justify-items: start; padding: 18px; background: var(--warn-bg); color: var(--warn); }
.ds-proof-fail p { margin: 0; font-size: 16px; }
.ds-proof figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); text-align: center; }
.ds-read { padding: 16px; background: var(--table); margin-bottom: 20px; }
.ds-read dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.ds-read dt { font-size: 14px; color: var(--ink-2); }
.ds-read dd { margin: 0; font-size: 19px; line-height: 24px; overflow-wrap: anywhere; }
.ds-qty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.ds-qty .ds-label { margin: 0; }
.ds-stepper { display: inline-flex; align-items: center; gap: 12px; }
.ds-qty-n {
  width: 56px; height: 44px; padding: 0; border: 0; border-radius: 0; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
  text-align: center; font-family: var(--ext); font-weight: 700; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none;
}
.ds-qty-n:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.ds-qty-sum { margin-left: auto; font-family: var(--ext); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.ds-approve { display: flex; gap: 12px; align-items: flex-start; padding: 16px; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; line-height: 22px; cursor: pointer; }
.ds-approve input { width: 26px; height: 26px; flex: none; accent-color: var(--ink); margin: 0; }
.ds-approve:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.ds-miss { padding: 16px; background: var(--warn-bg); }
.ds-miss ul { margin: 0; padding: 0 0 0 18px; }
.ds-miss li { margin: 6px 0; }
.ds-miss .ds-link { color: var(--warn); text-align: left; }
.ds-done { display: flex; gap: 12px; align-items: center; padding: 18px; background: #e3efe6; color: var(--ok); margin-bottom: 18px; }
.ds-done p { margin: 0; font-size: 18px; color: var(--ink); }
.ds-done-btns { display: grid; gap: 10px; }

/* ---------- the bar ---------- */
.ds-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--paper); border-top: 1px solid var(--line);
}
.ds-bar-sum { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ds-bar-price { font-family: var(--ext); font-weight: 700; font-size: 17px; line-height: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-bar-note { font-size: 13px; line-height: 16px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-bar-btns { display: flex; gap: 8px; margin-left: auto; }
.ds-bar .ds-btn { white-space: nowrap; }
/* narrow phones: price and "Til baka" share the top line, the way forward gets the full width */
@media (max-width: 420px) {
  .ds-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .ds-bar-btns { display: contents; }
  .ds-bar .ds-back { grid-column: 2; grid-row: 1; min-height: 44px; padding: 0 2px 0 8px; gap: 6px; box-shadow: none; background: none; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
  .ds-bar .ds-back[hidden] { display: none; }
  .ds-bar-btns > :not(.ds-back) { grid-column: 1 / -1; }
}
.ds-bar .ds-btn--ghost { padding: 0 14px; }
.ds-bar .ds-btn--lg { padding: 0 18px; }
@media (max-width: 420px) {
  .ds-bar { flex-wrap: wrap; }
  .ds-bar-btns { width: 100%; }
  .ds-bar-btns .ds-btn--lg { flex: 1; }
}

.ds.is-dropping .ds-stage { box-shadow: inset 0 0 0 3px var(--orange); }

/* ---------- toast ---------- */
.ds-toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 5; width: min(92vw, 460px);
  padding: 14px 18px; background: var(--ink); color: var(--paper); font-size: 15px; line-height: 21px;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms var(--ease);
}
.ds-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the photo editor ---------- */
.ds-ed {
  width: min(960px, 100vw); height: min(780px, 100dvh); max-width: none; max-height: none; margin: auto; padding: 0; border: 0;
  background: #26241f; color: var(--paper); display: none; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
}
.ds-ed[open] { display: grid; animation: ds-in 220ms var(--ease); }
.ds-ed::backdrop { background: rgba(0, 0, 0, .55); }
@media (max-width: 767px) { .ds-ed { width: 100vw; height: 100dvh; } }
.ds-ed-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; }
.ds-ed-top h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 20px; }
.ds-ed-top .ds-btn--ink { background: var(--paper); color: var(--ink) !important; }
.ds-ed-stage { position: relative; min-height: 0; touch-action: none; cursor: grab; outline: none; -webkit-user-select: none; user-select: none; }
.ds-ed-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--paper); }
.ds-mugwrap { -webkit-user-select: none; user-select: none; }
.ds-ed-stage.is-dragging { cursor: grabbing; }
.ds-ed-stage canvas { position: absolute; inset: 0; display: block; }
.ds-ed-tools { display: grid; gap: 12px; padding: 14px 20px calc(16px + var(--safe-b)); background: var(--paper); color: var(--ink); }
.ds-ed-hint { margin: 0; font-size: 15px; line-height: 20px; color: var(--ink-2); }
.ds-ed-zoom { display: flex; align-items: center; gap: 12px; }
.ds-ed-zoom input { flex: 1; accent-color: var(--ink); height: 44px; }
.ds-ed-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ds-ed-q { margin: 0; font-size: 14px; }
.ds-ed-q span { display: inline-flex; gap: 6px; align-items: center; }
.ds-ed-q .is-ok { color: var(--ok); }
.ds-ed-q .is-warn { color: var(--warn); }

@media (prefers-reduced-motion: reduce) {
  .ds[open], .ds-ed[open] { animation: none; }
  .ds-proof-wait, .ds-prodin:not(.is-ready) { animation: none; }
  .ds-gl { animation: none; }
  .ds-btn, .ds-chip, .ds-layout, .ds-round, .ds-drop, .ds-hit-pill, .ds-toast { transition: none; }
}

/* ---------- the customer's changes: font, colour, size, place, added text and photos ----------
   One button under a field opens its box; everything is a plain tap, no dragging needed. */
.ds-fhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ds-fhead .ds-label { margin-bottom: 10px; }
.ds-remove { font-size: 14px; color: var(--err); min-height: 44px; }
.ds-field.is-added { padding: 14px 14px 4px; margin-inline: -14px; background: var(--table); }
.ds-slot > .ds-fhead { margin-bottom: 6px; }
.ds-styletog {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 10px; padding: 0 14px;
  border: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); text-align: left; font-size: 15px;
}
.ds-styletog span { flex: 1; }
.ds-styletog.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.ds-style { padding: 16px 14px 18px; background: var(--table); display: grid; gap: 4px; }
.ds-style .ds-label { margin: 10px 0 8px; }
.ds-style .ds-label:first-child { margin-top: 0; }
.ds-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.ds-font {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; justify-items: start; min-height: 64px; padding: 8px 12px; border: 0; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line); text-align: left;
}
.ds-font.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.ds-font-aa { max-width: 100%; font-size: 24px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-font-n { font-size: 13px; line-height: 16px; color: var(--ink-2); }
.ds-colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ds-color {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--c); flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), 0 0 0 3px var(--table);
}
.ds-color.is-on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), 0 0 0 3px var(--table), 0 0 0 5px var(--ink); }
.ds-color.is-orig { width: auto; border-radius: 22px; padding: 0 16px; background: var(--paper); font-size: 14px; }
.ds-size { display: flex; align-items: center; gap: 10px; }
.ds-size .ds-btn { flex: 1; min-height: 48px; padding: 0 10px; background: var(--paper); }
.ds-size-v { min-width: 56px; text-align: center; font-family: var(--ext); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.ds-pad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px); gap: 4px; justify-content: start; }
.ds-pad .ds-round { width: 52px; height: 52px; }
.ds-pad-u { grid-area: 1 / 2; } .ds-pad-l { grid-area: 2 / 1; } .ds-pad-r { grid-area: 2 / 3; } .ds-pad-d { grid-area: 3 / 2; }
.ds-style-reset { justify-self: start; margin-top: 12px; min-height: 44px; font-size: 14px; }
.ds-adds { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-add { flex: 1 1 180px; }
.ds-wish { margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .ds-styletog, .ds-font, .ds-color { transition: none; } }

/* ---------- move and resize, full screen ---------- */
/* "Hanna frjálst" on the product: words on every screen, the orange of "Þín hönnun", clear of the print */
.ds-laybtn {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 18px 6px 8px;
  border: 0; background: var(--paper); text-align: left; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 8px 22px -10px rgba(0, 0, 0, .4);
  transition: transform 160ms var(--ease), box-shadow 160ms ease;
}
.ds-laybtn i { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: var(--orange); color: var(--ink); }
.ds-laybtn span { display: grid; gap: 1px; }
.ds-laybtn b { font-family: var(--ext); font-weight: 700; font-size: 13px; line-height: 16px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.ds-laybtn small { font-size: 13px; line-height: 16px; color: var(--ink-2); white-space: nowrap; }
.ds-laybtn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ds-laybtn:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 10px 26px -10px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .35); } }
/* phones: top right, still in words; the short line would crowd the product */
@media (max-width: 899px) {
  .ds-laybtn { top: 10px; bottom: auto; right: 10px; min-height: 44px; gap: 8px; padding: 4px 12px 4px 4px; }
  .ds-laybtn i { width: 36px; height: 36px; }
  .ds-laybtn small { display: none; }
  .ds-laybtn b { font-size: 12px; }
  /* the product/print button has the top left corner; the mug's turn arrows go to its sides (like a gallery) */
  .ds-view.is-mug .ds-mugwrap { grid-template-rows: minmax(0, 1fr); } /* the arrows sit at its sides: no row under the mug */
  .ds-view.is-mug .ds-turn { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
  .ds-view.is-mug .ds-turn .ds-round { pointer-events: auto; }
  .ds-view.is-mug[data-show=flat] { padding-bottom: 10px; }
  .ds-stage:has(.ds-laybtn) .ds-view.is-flat { padding-top: 62px; }
}
/* the smallest phones (320–379): both corners' buttons drop their icons so the two still fit one row;
   "Hanna frjálst" keeps its orange as the whole button */
@media (max-width: 379px), (orientation: landscape) and (max-height: 500px) and (max-width: 899px) {
  .ds-viewseg { padding: 0 10px; }
  .ds-viewseg svg { display: none; }
  .ds-laybtn { padding: 0 12px; background: var(--orange); }
  .ds-laybtn i { display: none; }
}
/* computers: the card keeps clear of "Hanna frjálst" in the stage's bottom right corner */
@media (min-width: 900px) { .ds-stage:has(.ds-laybtn) .ds-view.is-flat { padding: 36px 0 84px; } }
.ds-lay-open { width: 100%; margin-top: 14px; background: var(--paper); }

/* ---------- "Hanna frjálst" ----------
   Phone: full screen; the print, the chosen tool's choices, then the tool bar along the bottom.
   Computer: a window over the studio (moved by its header, resized from its right and bottom edges),
   the tools in a column left of the print and the chosen tool's choices on the right (under the
   print when the window is narrow). Spec: _docs/INSTAPRENT-EDITOR-SPEC-2026-09-24.md §2–3. */
.ds-lay {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #26241f; color: var(--paper); display: none; grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
}
.ds-lay[open] { display: grid; animation: ds-in 220ms var(--ease); }
.ds-lay::backdrop { background: #26241f; }
.ds-lay[open]::backdrop { animation: ds-fade 220ms var(--ease); }
.ds-lay-head { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.ds-lay-head h3 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-lay-body { display: grid; min-height: 0; background: var(--paper); grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: "stage" "side" "bar"; }
.ds-lay-stage { grid-area: stage; position: relative; background: #26241f; min-height: 0; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.ds-lay-pw { position: absolute; inset: 0; display: grid; place-items: center; }
.ds-lay-c { display: block; box-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.ds-lay-side {
  grid-area: side; position: relative; display: grid; gap: 12px; align-content: start; min-height: 0; max-height: 44dvh; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; padding: 12px 16px 14px; background: var(--paper); color: var(--ink); border-top: 1px solid var(--line);
}
.ds-lay-hint { margin: 0; font-size: 15px; line-height: 21px; color: var(--ink-2); }
/* phones, keyboard up for the text being written (fitViewport): the header, the hint and the tool bar
   step aside; the print keeps the top, the words the rest. Done on the keyboard brings them back. */
@media (max-width: 899px) {
  .ds-lay.is-typing { grid-template-rows: minmax(0, 1fr); }
  .ds-lay.is-typing :is(.ds-lay-head, .ds-lay-bar, .ds-lay-hint) { display: none; }
  .ds-lay.is-typing .ds-lay-side { max-height: calc(var(--vvh, 400px) * .56); }
}
.ds-lay-btns { position: relative; display: grid; gap: 10px; }
.ds-lay-btns:empty { display: none; }
.ds-lay-btns .ds-label { margin: 0; }
.ds-lay-btns .ds-help { margin: -2px 0 0; }
.ds-lay-row { display: flex; gap: 8px; align-items: center; }
.ds-lay-row .ds-btn { flex: 1; min-height: 52px; padding: 0 10px; }

/* the tools: an icon with its word under it (never cut), a bar that scrolls sideways on a phone
   (its soft edge fades into the white behind it, set on .ds-lay-body) */
.ds-lay-bar {
  grid-area: bar; display: flex; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 6px 8px calc(6px + var(--safe-b)); background: var(--paper); color: var(--ink); border-top: 1px solid var(--line);
}
.ds-lay-bar::-webkit-scrollbar { display: none; }
.ds-tool {
  flex: none; display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 60px; min-height: 58px; padding: 6px 8px;
  border: 0; background: none; color: var(--ink); transition: background-color 160ms ease, transform 160ms var(--ease);
}
.ds-tool span { font-size: 13px; line-height: 16px; white-space: nowrap; }
.ds-tool.is-on { background: var(--table); box-shadow: inset 0 -2px 0 var(--orange); }
.ds-tool.is-del { color: var(--err); }
.ds-tool:disabled { opacity: .35; cursor: default; }
.ds-tool:active:not(:disabled) { transform: scale(.96); }
.ds-lay-bar.has-more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.ds-lay-bar.has-more-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px); mask-image: linear-gradient(to right, transparent, #000 40px); }
.ds-lay-bar.has-more-l.has-more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
@media (hover: hover) and (pointer: fine) { .ds-tool:hover:not(:disabled):not(.is-on) { background: rgba(0, 0, 0, .05); } }

/* the window on a computer */
.ds-lay.is-win { position: fixed; inset: auto; margin: 0; box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
.ds-lay.is-win[open] { animation: ds-pop 220ms var(--ease); }
@keyframes ds-pop { from { opacity: 0; transform: scale(.97); } }
.ds-lay.is-win::backdrop { background: rgba(0, 0, 0, .45); }
.ds-lay.is-win .ds-lay-head { padding-top: 10px; cursor: move; -webkit-user-select: none; user-select: none; touch-action: none; }
.ds-lay.is-win .ds-lay-body { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "bar stage" "bar side"; }
.ds-lay.is-win .ds-lay-bar { flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 8px 6px; border-top: 0; box-shadow: 1px 0 0 var(--line); -webkit-mask-image: none; mask-image: none; }
.ds-lay.is-win .ds-tool { width: 100%; min-width: 0; min-height: 64px; }
.ds-lay.is-win .ds-lay-side { max-height: 300px; }
.ds-lay.is-wide .ds-lay-body { grid-template-columns: 96px minmax(0, 1fr) clamp(260px, 30%, 340px); grid-template-rows: minmax(0, 1fr); grid-template-areas: "bar stage side"; }
.ds-lay.is-wide .ds-lay-side { max-height: none; border-top: 0; box-shadow: -1px 0 0 var(--line); padding: 22px 22px 26px; gap: 16px; }
.ds-lay.is-moving-win, .ds-lay.is-moving-win * { -webkit-user-select: none; user-select: none; }
.ds-lay-grip { display: none; position: absolute; z-index: 6; touch-action: none; }
.ds-lay.is-win:not(.is-full) .ds-lay-grip { display: block; }
.ds-lay-grip--r { top: 0; right: 0; bottom: 18px; width: 8px; cursor: ew-resize; }
.ds-lay-grip--b { left: 0; right: 18px; bottom: 0; height: 8px; cursor: ns-resize; }
.ds-lay-grip--rb { right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 55%, rgba(0, 0, 0, .28) 55% 62%, transparent 62% 72%, rgba(0, 0, 0, .28) 72% 79%, transparent 79%); }

/* the chosen thing: an orange frame, round corner handles, pill side handles on a text, a turn handle
   below on a thin line. Hit areas: 44 px to touch, 24 px (corners) / 16 × 28 px (sides) for a mouse. */
.ds-selx { position: absolute; z-index: 2; pointer-events: none; outline: 1.5px solid var(--orange); outline-offset: 1px; --hit: 24px; --sw: 16px; --sh: 28px; --rh: 32px; }
@media (pointer: coarse) { .ds-selx { --hit: 44px; --sw: 44px; --sh: 44px; --rh: 44px; } }
.ds-selx::after { content: ""; position: absolute; left: 50%; top: calc(100% + 2px); width: 1.5px; height: 22px; background: var(--orange); translate: -50% 0; }
.ds-selx.turn-up::after { top: auto; bottom: calc(100% + 2px); }
.ds-hd { position: absolute; pointer-events: auto; touch-action: none; }
.ds-hd--c::after, .ds-hd--s::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 0 1.5px var(--orange), 0 1px 3px rgba(0, 0, 0, .35); translate: -50% -50%; }
.ds-hd--c { width: var(--hit); height: var(--hit); }
.ds-hd--c::after { width: 12px; height: 12px; border-radius: 50%; }
.ds-hd--c[data-h=nw] { left: calc(var(--ox) - var(--hit)); top: calc(var(--oy) - var(--hit)); }
.ds-hd--c[data-h=nw]::after { left: calc(var(--hit) - var(--ox)); top: calc(var(--hit) - var(--oy)); }
.ds-hd--c[data-h=ne] { right: calc(var(--ox) - var(--hit)); top: calc(var(--oy) - var(--hit)); }
.ds-hd--c[data-h=ne]::after { left: var(--ox); top: calc(var(--hit) - var(--oy)); }
.ds-hd--c[data-h=se] { right: calc(var(--ox) - var(--hit)); bottom: calc(var(--oy) - var(--hit)); }
.ds-hd--c[data-h=se]::after { left: var(--ox); top: var(--oy); }
.ds-hd--c[data-h=sw] { left: calc(var(--ox) - var(--hit)); bottom: calc(var(--oy) - var(--hit)); }
.ds-hd--c[data-h=sw]::after { left: calc(var(--hit) - var(--ox)); top: var(--oy); }
.ds-hd--s { display: none; width: var(--sw); height: var(--sh); top: 50%; margin-top: calc(var(--sh) / -2); }
.ds-hd--s::after { width: 6px; height: 20px; border-radius: 3px; left: 50%; top: 50%; }
.ds-hd--s[data-h=w] { left: calc(var(--sw) / -2); }
.ds-hd--s[data-h=e] { right: calc(var(--sw) / -2); }
.ds-selx.has-sides .ds-hd--s { display: block; }
.ds-hd--r { left: 50%; top: calc(100% + 38px - var(--rh) / 2); width: var(--rh); height: var(--rh); margin-left: calc(var(--rh) / -2); display: grid; place-items: center; }
.ds-selx.turn-up .ds-hd--r { top: auto; bottom: calc(100% + 38px - var(--rh) / 2); }
.ds-hd--r b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--orange), 0 1px 4px rgba(0, 0, 0, .35); }
.ds-selx.no-scale .ds-hd--c, .ds-selx.no-scale .ds-hd--s, .ds-selx.no-turn .ds-hd--r, .ds-selx.no-turn::after { display: none; }
.ds-hov { position: absolute; z-index: 1; pointer-events: none; outline: 1px solid rgba(246, 122, 50, .75); outline-offset: 1px; }
.ds-ang { position: absolute; z-index: 4; padding: 4px 8px; background: var(--ink); color: var(--paper); pointer-events: none; font-family: var(--ext); font-weight: 700; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }

/* the quick bar (Zakeke 2026): above the chosen thing, gone while it moves */
.ds-qbar { position: absolute; z-index: 3; display: flex; gap: 2px; padding: 4px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .08); transition: opacity 120ms var(--ease); }
.ds-qb { display: grid; justify-items: center; gap: 2px; min-width: 60px; min-height: 50px; padding: 5px 8px; border: 0; background: none; color: inherit; transition: transform 160ms var(--ease); }
.ds-qb span { font-size: 12px; line-height: 14px; white-space: nowrap; }
.ds-qb.is-del { color: var(--err); }
.ds-qb:disabled { opacity: .35; cursor: default; }
.ds-qb:active:not(:disabled) { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .ds-qb:hover:not(:disabled) { background: rgba(0, 0, 0, .05); } }
.ds-lay-stage:is(.is-moving, .is-handling) .ds-qbar { opacity: 0; pointer-events: none; }

/* the full-screen editor's header: undo, redo, done */
.ds-lay-top { display: flex; gap: 8px; align-items: center; flex: none; }
.ds-lay-undo { background: transparent; color: var(--paper) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); padding: 0 14px; }
.ds-lay-undo:disabled { opacity: .35; }
@media (max-width: 599px) { .ds-lay-undo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .ds-lay-undo { width: 46px; padding: 0; } }
@media (max-width: 380px) { .ds-lay-head { padding-left: 14px; } .ds-lay-head h3 { font-size: 17px; } .ds-lay-top { gap: 6px; } .ds-lay-top .ds-btn--ink { padding: 0 14px; } }
.ds-lay-row .ds-btn.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.ds-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 30dvh; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.ds-lay.is-wide .ds-tray { max-height: none; }
/* the wide panel has room: its rows of choices wrap instead of scrolling sideways */
.ds-lay.is-wide .ds-lay-btns .ds-row { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.ds-lay.is-wide .ds-lay-btns .ds-fonts.ds-row .ds-font { flex: 1 1 132px; }
.ds-tray-i { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border: 0; background: var(--table); transition: transform 160ms var(--ease); }
.ds-tray-i img { width: 56px; height: 56px; object-fit: contain; }
.ds-tray-i span { font-size: 12px; line-height: 14px; color: var(--ink-2); }
.ds-tray-i:active { transform: scale(.96); }
.ds-lay-restore { justify-self: start; min-height: 44px; font-size: 15px; }
.ds-lay-btns input, .ds-lay-btns textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 0; border-radius: 0; background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--ink); font-family: var(--serif); font-size: 19px; line-height: 24px; color: var(--ink); -webkit-appearance: none; resize: none;
}
.ds-lay-btns input:focus, .ds-lay-btns textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--orange); }
.ds-lay-btns .ds-layouts { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 0; }
.ds-add-free { flex-basis: 100%; }
.ds-add-free i { width: 28px; height: 28px; display: grid; place-items: center; background: var(--orange); }
@media (max-width: 420px) { .ds-lay-row .ds-btn { padding: 0 6px; font-size: 11px; white-space: nowrap; } }
.ds-ghost { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .ds-lay[open], .ds-lay.is-win[open], .ds-lay[open]::backdrop { animation: none; }
  .ds-tool, .ds-qb, .ds-qbar, .ds-tray-i, .ds-laybtn { transition: none; }
}

/* more below: a soft fade and a plain "Meira fyrir neðan" button, so nobody misses a choice */
.ds-panel { position: relative; }
.ds-panel > .ds-pbody { grid-row: 1; grid-column: 1; }
.ds-panel { grid-template-rows: minmax(0, 1fr) auto auto; }
.ds-panel > .ds-bar { grid-row: 3; grid-column: 1; }
.ds-panel.has-more > .ds-pbody { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); }
/* its own strip above the bar: it points down, it never covers a word */
.ds-more {
  grid-row: 2; grid-column: 1; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; padding: 0 16px;
  border: 0; border-top: 1px solid var(--line); background: var(--table); color: var(--ink) !important; font-size: 14px;
}
.ds-more[hidden] { display: none; }
.ds-adds-wrap { display: grid; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.ds-adds-wrap .ds-adds { margin-top: 0; }
.ds-freebox { display: grid; gap: 6px; }
.ds-freebox .ds-help { margin: 0; }
.ds-style-move { margin: 12px 0 0; }
.ds-shape { margin-top: 12px; }
.ds-adds .ds-add { flex: 1 1 0; min-width: 0; }
.ds-adds-wrap .ds-add-free { width: 100%; }

/* one scrolling row each for letters, colours and shapes, so the print keeps its room on a phone */
.ds-row { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 6px 6px 8px; margin: -2px -6px 0; scroll-padding-inline: 6px; } /* 6px room: the chosen ring reaches 5px outside a colour */
.ds-row::-webkit-scrollbar { display: none; }
.ds-fonts.ds-row .ds-font { flex: 0 0 132px; }
.ds-colors.ds-row .ds-color { flex: 0 0 44px; }
.ds-colors.ds-row .ds-color.is-orig { flex: 0 0 auto; white-space: nowrap; }
.ds-chips.ds-row .ds-chip { flex: 0 0 auto; }

/* the front and the back of a product printed on both sides: two tabs above the choices */
.ds-sides { display: flex; margin: 0 0 18px; box-shadow: inset 0 0 0 1px var(--line); }
.ds-side {
  flex: 1 1 0; min-height: 48px; border: 0; background: var(--paper); color: var(--ink-2); font-size: 16px; letter-spacing: .02em;
  transition: background-color 160ms ease, color 160ms ease;
}
.ds-side + .ds-side { box-shadow: inset 1px 0 0 var(--line); }
.ds-side.is-on { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .ds-side:not(.is-on):hover { background: #f4f2ee; color: var(--ink); } }

/* Hanna frjálst: spacing steppers, ready words */
.ds-step { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.ds-step-l { flex: 1 1 auto; font-size: 15px; }
.ds-step-v { min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }
.ds-ideas { margin-top: 2px; }
.ds-ideas .ds-sugb { flex: 0 0 auto; white-space: nowrap; }
.ds-lay-straight { align-self: flex-start; min-height: 44px; }

/* the panel never scrolls sideways: its grids keep to its width, only a long row of choices scrolls */
.ds-pbody { overflow-x: hidden; }
.ds-slot, .ds-style, .ds-adds-wrap, .ds-freebox, .ds-lay-side, .ds-lay-btns { grid-template-columns: minmax(0, 1fr); }
.ds-field, .ds-row { min-width: 0; max-width: 100%; }
.ds-row.has-more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.ds-row.has-more-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px); mask-image: linear-gradient(to right, transparent, #000 40px); }
.ds-row.has-more-l.has-more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
/* a mouse cannot swipe: a thin bar to drag under a row that scrolls */
@media (hover: hover) and (pointer: fine) {
  .ds-row { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .28) transparent; padding-bottom: 10px; }
  .ds-row::-webkit-scrollbar { display: block; height: 6px; }
  .ds-row::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .28); border-radius: 3px; }
}

/* the tool bar says it goes on: a round arrow, pinned at the end it can still scroll to (no fade, it would hide the arrow) */
.ds-lay-bar { -webkit-mask-image: none !important; mask-image: none !important; }
.ds-barnav { position: sticky; z-index: 2; flex: none; align-self: center; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: 0 1px 8px rgba(0, 0, 0, .18), inset 0 0 0 1px var(--line); cursor: pointer; }
.ds-barnav[hidden] { display: none; }
.ds-barnav::before { content: ""; position: absolute; top: -8px; bottom: -8px; width: 32px; pointer-events: none; }
.ds-barnav--next { right: 0; margin-left: auto; }
.ds-barnav--next::before { right: 100%; background: linear-gradient(to right, transparent, var(--paper)); }
.ds-barnav--prev { left: 0; }
.ds-barnav--prev::before { left: 100%; background: linear-gradient(to left, transparent, var(--paper)); }
.ds-barnav:active { transform: scale(.94); }
.ds-lay.is-win .ds-barnav--next { right: auto; bottom: 4px; margin: auto auto 0; transform: rotate(90deg); }
.ds-lay.is-win .ds-barnav--prev { left: auto; top: 4px; margin: 0 auto; transform: rotate(90deg); }
.ds-lay.is-win .ds-barnav::before { display: none; }
@media (prefers-reduced-motion: reduce) { .ds-barnav:active { transform: none; } .ds-lay.is-win .ds-barnav--next, .ds-lay.is-win .ds-barnav--prev { transform: rotate(90deg); } }
.ds-lay.is-win .ds-barnav:active { transform: rotate(90deg) scale(.94); }

/* phones: an empty photo on the preview is a round photo icon with a plus, not a label across the print (Sindri) */
.ds-hit-plus { display: none; }
@media (hover: none), (max-width: 599px) {
  .ds-hit:not(.is-filled) .ds-hit-pill { width: 52px; height: 52px; padding: 0; gap: 0; border-radius: 50%; justify-content: center; }
  .ds-hit:not(.is-filled) .ds-hit-pill > svg { width: 24px; height: 24px; }
  .ds-hit:not(.is-filled) .ds-hit-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ds-hit-plus { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--orange); color: #fff; box-shadow: 0 0 0 2px var(--paper); }
  .ds-hit-plus svg { width: 12px; height: 12px; }
}

/* a symbol's own colours: its picture in the swatch */
.ds-color.is-img { background-size: 68%; background-position: center; background-repeat: no-repeat; }

/* ---------- phones held sideways (874 × 292 on an iPhone 17 in Safari) ----------
   Stacked, the preview took its 230 px and the panel and "Áfram" fell off the screen. Sideways the
   product goes left and the choices right, the way a computer shows them; the header and the steps
   get shorter; nothing sits under the Dynamic Island (the theme's viewport-fit=cover). */
.ds, .ds-lay:not(.is-win) { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
@media (orientation: landscape) and (max-height: 500px) and (max-width: 899px) {
  /* the product the full height on the left; the steps and "Loka" one row above the panel on the right */
  .ds[open] { grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
  .ds-body, .ds-top { display: contents; }
  .ds-top-l, .ds-saved { display: none; }
  .ds-stage { grid-column: 1; grid-row: 1 / -1; }
  .ds-nav { grid-column: 2; grid-row: 1; min-width: 0; box-shadow: -1px 0 0 var(--line); }
  .ds-x { grid-column: 3; grid-row: 1; align-self: stretch; padding-top: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .ds-panel { grid-column: 2 / -1; grid-row: 2; box-shadow: -1px 0 0 var(--line); }
  /* steps: numbers, and the name of the one you are on */
  .ds-steps button { min-height: 44px; padding: 0 8px; }
  .ds-steps button:not([aria-current]) .ds-lab { display: none; }
  /* the step you are on takes the room its name needs (equal columns broke "ÚTLIT" into "ÚTLI / T" at 568) */
  .ds-steps { grid-auto-columns: auto; justify-content: space-between; }
  .ds-steps .ds-lab { white-space: nowrap; }
  .ds-pbody { padding: 14px 18px 18px; }
  .ds-pbody h3 { font-size: 22px; line-height: 26px; }
  /* the bar on one line: price, back as an arrow, the way forward */
  .ds-bar { flex-wrap: nowrap; gap: 8px; padding-top: 8px; padding-bottom: calc(8px + var(--safe-b)); }
  .ds-bar-price { font-size: 15px; } /* at 568 wide "8.900 kr." was cut to "8.900 kr" by the button */
  .ds-bar-btns { flex: none; }
  .ds-bar .ds-back { min-width: 44px; padding: 0 10px; }
  .ds-bar .ds-back-lab { display: none; }
  .ds-bar .ds-btn--lg { min-height: 48px; }
  .ds.is-typing[open] { grid-template-rows: minmax(0, 1fr); }
  .ds.is-typing .ds-panel { grid-row: 1 / -1; }
}
}
/* "Hanna frjálst" sideways: the tools a column on the left, the print, its choices on the right
   (is-rail, set in placeWin; a computer's window has it too) */
.ds-lay.is-rail:not(.is-win) .ds-lay-head { padding-top: 6px; padding-bottom: 6px; }
.ds-lay.is-rail:not(.is-win) .ds-lay-body { grid-template-columns: 84px minmax(0, 1fr) minmax(260px, 40%); grid-template-rows: minmax(0, 1fr); grid-template-areas: "bar stage side"; }
.ds-lay.is-rail:not(.is-win) .ds-lay-side { max-height: none; border-top: 0; box-shadow: -1px 0 0 var(--line); }
.ds-lay.is-rail .ds-lay-bar { flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 8px 6px; border-top: 0; box-shadow: 1px 0 0 var(--line); -webkit-mask-image: none; mask-image: none; }
.ds-lay.is-rail .ds-tool { width: 100%; min-width: 0; min-height: 60px; }
.ds-lay.is-rail .ds-barnav--next { right: auto; bottom: 4px; margin: auto auto 0; transform: rotate(90deg); }
.ds-lay.is-rail .ds-barnav--prev { left: auto; top: 4px; margin: 0 auto; transform: rotate(90deg); }
.ds-lay.is-rail .ds-barnav::before { display: none; }
.ds-lay.is-rail .ds-barnav:active { transform: rotate(90deg) scale(.94); }
/* sideways with the keyboard up: the tool column steps aside too, the print and the words share the width */
.ds-lay.is-rail.is-typing:not(.is-win) .ds-lay-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 50%); grid-template-areas: "stage side"; }
.ds-lay.is-rail.is-typing:not(.is-win) .ds-lay-side { max-height: none; }

/* smaller computer screens: a narrower panel, so the product keeps the room (at 900 its photo had 156 px) */
@media (min-width: 900px) and (max-width: 1199px) {
  .ds-body { grid-template-columns: minmax(0, 1fr) 380px; }
  .ds-pbody { padding: 26px 24px 32px; }
  .ds-view.is-mock { grid-template-columns: minmax(0, 1fr) minmax(170px, 28%); gap: 20px; padding: 20px; }
}
/* the choices column is 260–340 px on a computer window: rows of buttons give a little, never clip */
.ds-lay-side .ds-lay-row { gap: 6px; }
.ds-lay-side .ds-lay-row .ds-btn { min-width: 0; padding: 0 8px; gap: 6px; }
.ds-lay-side .ds-lay-row .ds-size-v { min-width: 46px; }

/* tools as a line icon with a small word under it (the studio rail's look), for the panel's buttons:
   add text, photo, symbol, "Hanna frjálst", smaller and bigger, turn, fix and swap a photo */
.ds-icrow { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-ic {
  flex: 1 1 0; min-width: 64px; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 60px; padding: 8px 6px;
  border: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms ease;
}
.ds-ic span { font-size: 13px; line-height: 16px; white-space: nowrap; }
.ds-ic.is-main { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ds-ic:disabled { opacity: .35; cursor: default; }
.ds-ic:active:not(:disabled) { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .ds-ic:hover:not(:disabled) { background: rgba(0, 0, 0, .04); } }
@media (prefers-reduced-motion: reduce) { .ds-ic { transition: none; } }
.ds-icrow .ds-add-free { color: var(--orange-ink, #b4521a); }
.ds-size .ds-ic, .ds-lay-row .ds-ic { flex: 0 0 72px; min-width: 0; }
.ds-size, .ds-lay-row { justify-content: space-between; }
.ds-size-v { flex: 1; }
.ds-slot-btns .ds-ic { flex: 0 0 76px; }
.ds-ed-row .ds-ic { flex: 0 0 84px; }
.ds-adds-wrap > div > .ds-help { margin-top: 8px; }

/* icon + word tools: the rows own their widths (the older text-button rules must not reach in) */
.ds-icrow .ds-ic, .ds-icrow .ds-add, .ds-icrow .ds-add-free, .ds-adds-wrap .ds-icrow .ds-add-free { flex: 1 1 0; width: auto; min-width: 64px; }
.ds-ilink { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); min-height: 32px; }
.ds-ilink span { text-decoration: underline; text-underline-offset: 3px; }
.ds-ilink svg { flex: none; }
/* phones: the tool panel keeps one height whichever tool is open, so the print above it stays put
   instead of jumping up and down with each tool (09-26, iPhone) */
@media (max-width: 899px) {
  .ds-lay:not(.is-win):not(.is-wide):not(.is-rail):not(.is-typing) .ds-lay-side { min-height: min(37dvh, 280px); }
}
.ds-draft-del { margin-top: 2px; color: var(--ink-2); }
.ds-trashed { margin: 0; padding: 12px 14px; background: var(--table); font-size: 15px; }

/* ---------- a calendar: pages on the preview, many photos at once, every page's print file ---------- */
.ds-view.is-flat:has(.ds-pagebar) { align-content: center; gap: 12px; }
.ds-pagebar { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ds-pagebar-t { margin: 0; min-width: 9.5em; display: grid; text-align: center; font-size: 15px; line-height: 20px; }
.ds-pagebar-t span { font-size: 13px; color: var(--ink-2); }
.ds-many { display: grid; gap: 8px; justify-items: start; padding: 4px 0 12px; border-bottom: 1px solid var(--line); }
.ds-many .ds-help { margin: 0; }
.ds-slot.is-here .ds-slot-img { outline: 2px solid var(--ink); outline-offset: 2px; }
.ds-here { font-weight: 400; color: var(--ink-2); }
.ds-pages { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 12px; }
.ds-pages .ds-proof { margin: 0; }
.ds-pages .ds-proof img { width: 100%; }
.ds-pages a { display: block; }
.ds-pages a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ds-pages figcaption { margin-top: 6px; display: flex; gap: 4px; justify-content: center; align-items: center; }
.ds-page.is-low figcaption { color: var(--warn); }

/* ================= the calendar studio (Codex spec 10-17) ================= */
.ds-help-b { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; background: none; font-family: var(--ext); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ds-pillbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06); font-family: var(--ext); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.ds-pillbtn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ds-pill-wide { width: 100%; margin-top: 8px; }
.ds-zoombtn { justify-self: center; }
/* the 13 pages under the preview */
.ds-strip { list-style: none; margin: 0; padding: 2px 4px 6px; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; max-width: 100%; justify-self: stretch; }
.ds-strip li { flex: none; }
.ds-strip-b { display: grid; justify-items: center; gap: 3px; padding: 3px; border: 0; border-radius: 6px; background: none; font-family: var(--ext); font-size: 10px; letter-spacing: .04em; color: var(--ink-2); }
.ds-strip-cv { display: block; background: #fff; box-shadow: 0 0 0 1px var(--line); border-radius: 2px; }
.ds-strip-b.is-on { color: var(--ink); }
.ds-strip-b.is-on .ds-strip-cv { box-shadow: 0 0 0 2.5px var(--ink); }
.ds-view.is-flat:has(.ds-strip) { align-content: center; gap: 8px; }
/* groups of visual choices */
.ds-ghead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ds-ghead .ds-label { margin: 0; }
.ds-scope { font-size: 13px; color: var(--ink-2); }
.ds-tick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.ds-looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ds-look { position: relative; display: grid; gap: 4px; padding: 0; border: 0; background: none; text-align: left; }
.ds-look-pic { position: relative; display: block; padding: 6px; background: var(--table); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 160ms var(--ease); }
.ds-look-cv { display: block; width: 100%; height: auto; aspect-ratio: 210 / 297; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.ds-look.is-on .ds-look-pic { box-shadow: inset 0 0 0 3px var(--ink); }
.ds-look:hover:not(.is-on) .ds-look-pic { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ds-look-n { font-size: 16px; line-height: 20px; }
.ds-look-h { font-family: var(--ext); font-size: 11px; letter-spacing: .04em; color: var(--ink-2); }
.ds-pals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ds-pal { position: relative; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; }
.ds-pal-sw { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; padding: 8px; background: var(--table); box-shadow: inset 0 0 0 1px var(--line); }
.ds-pal-page { position: relative; display: block; height: 100%; border-radius: 3px; background: var(--a); box-shadow: 0 1px 4px rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ds-pal-ink { position: absolute; left: 14%; top: 22%; width: 50%; height: 14%; border-radius: 2px; background: var(--b); }
.ds-pal-acc { position: absolute; right: 14%; bottom: 20%; width: 22%; height: 22%; border-radius: 50%; background: var(--c); }
.ds-pal.is-on .ds-pal-sw { box-shadow: inset 0 0 0 3px var(--ink); }
.ds-pal .ds-tick { top: -6px; right: -6px; }
.ds-pal-n { font-size: 15px; }
.ds-ltiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-ltile { position: relative; display: grid; gap: 2px; justify-items: start; min-height: 88px; padding: 10px 12px; border: 0; border-radius: 8px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); text-align: left; overflow: hidden; }
.ds-ltile.is-on { box-shadow: inset 0 0 0 3px var(--ink); }
.ds-lt-a { font-size: 28px; line-height: 34px; white-space: nowrap; }
.ds-lt-b { font-size: 13px; line-height: 18px; color: var(--ink-2); white-space: nowrap; }
.ds-lt-n { margin-top: 2px; font-family: var(--ext); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.ds-callout { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; margin: 0 0 22px; padding: 12px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.ds-callout p { margin: 0; color: var(--ink); font-size: 15px; }
.ds-callout .ds-pillbtn, .ds-callout .ds-link { grid-column: 1 / -1; justify-self: start; }
.ds-callout.is-swap { background: #e8eef7; color: #1c3b66; }
/* the tour */
.ds-tour { margin: 0 0 18px; padding: 14px 16px; border-radius: 10px; background: #1f1d1a; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.ds-tour b { display: block; font-size: 18px; line-height: 24px; font-weight: 400; }
.ds-tour p { margin: 4px 0 0; font-size: 15px; line-height: 21px; color: rgba(255, 255, 255, .86); }
.ds-tour .ds-tour-k { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-family: var(--ext); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.ds-tour-b { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.ds-tour .ds-btn--ink { background: #fff; color: #111 !important; }
.ds-tour .ds-link { color: #fff; min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; }
/* photos */
.ds-many.is-empty { display: grid; justify-items: center; gap: 14px; padding: 22px 16px; border-radius: 10px; background: var(--table); text-align: center; }
.ds-many-art { position: relative; width: 150px; height: 104px; }
.ds-many-art i { position: absolute; top: 6px; width: 64px; height: 90px; background: #fff; border-radius: 3px; box-shadow: 0 3px 10px rgba(0, 0, 0, .15); }
.ds-many-art i::before { content: ''; position: absolute; inset: 6px 6px 34px; background: #cfc8bd; }
.ds-many-art i::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 10px; height: 14px; background: repeating-linear-gradient(90deg, #d9d4cc 0 6px, transparent 6px 9px); }
.ds-many-art i:nth-child(1) { left: 0; transform: rotate(-8deg); }
.ds-many-art i:nth-child(2) { left: 43px; z-index: 1; top: 0; }
.ds-many-art i:nth-child(3) { right: 0; transform: rotate(8deg); }
.ds-pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin-top: 16px; }
.ds-pcell { display: grid; gap: 4px; }
.ds-pcell-main { position: relative; display: block; padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: var(--table); box-shadow: inset 0 0 0 1px var(--line); }
.ds-pcell-img { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-2); }
.ds-pcell-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-pcell.is-here .ds-pcell-main { box-shadow: 0 0 0 3px var(--ink); }
.ds-pcell.is-from .ds-pcell-main { box-shadow: 0 0 0 3px #2e5d8c; }
.ds-pcell.is-free .ds-pcell-main { box-shadow: inset 0 0 0 1.5px var(--ink-2); background: repeating-linear-gradient(135deg, var(--table) 0 8px, #e6e2da 8px 16px); }
.ds-pcell-main .ds-prog { position: absolute; left: 6px; right: 6px; bottom: 6px; }
.ds-pcell-warn { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; }
.ds-pcell-n { font-size: 13px; line-height: 16px; }
.ds-pcell-t { display: flex; flex-wrap: wrap; gap: 4px; }
.ds-mini { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--ext); font-size: 10.5px; letter-spacing: .03em; }
.ds-mini:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (min-width: 900px) { .ds-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* text and days */
.ds-task { margin: 0 0 12px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.ds-task.is-open { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ds-task.has-err { box-shadow: inset 0 0 0 2px var(--err); }
.ds-task-h { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; background: none; text-align: left; }
.ds-task-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--table); }
.ds-task-t { display: grid; }
.ds-task-t b { font-weight: 400; font-size: 17px; line-height: 22px; }
.ds-task-t small { font-size: 14px; line-height: 19px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-task-b { padding: 4px 14px 16px; }
.ds-task-b .ds-field { margin-bottom: 10px; }
.ds-capnav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 4px 0 12px; text-align: center; }
.ds-capnav b { font-weight: 400; font-size: 18px; }
.ds-caplist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.ds-caplist button { display: grid; grid-template-columns: 92px 1fr; gap: 8px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 6px; background: var(--table); text-align: left; }
.ds-caplist b { font-weight: 400; }
.ds-caplist span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-dg { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 10px; background: var(--table); }
.ds-dg-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; text-align: center; }
.ds-dg-nav b { font-weight: 400; font-size: 18px; }
.ds-dg-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ds-dg-wd { text-align: center; font-family: var(--ext); font-size: 11px; color: var(--ink-2); padding: 2px 0; }
.ds-dg-wd.is-sun, .ds-dg-d.is-sun { color: #b4432f; }
.ds-dg-d { position: relative; aspect-ratio: 1; min-height: 40px; border: 0; border-radius: 50%; background: var(--paper); font-size: 16px; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .ds-dg-d:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } } /* no sticky ring on a phone */
.ds-dg-d.is-on { background: var(--ink); color: #fff; }
.ds-dg-d.has::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--orange); }
.ds-dg-sel { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 16px; color: var(--ink-2); }
.ds-dg-sel.is-set { color: var(--ink); }
.ds-day-d { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 380px) { .ds-dg-d { min-height: 36px; font-size: 15px; } .ds-pals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* phones and tablets (< 900 px): the strip of pages is the preview, the stage only as tall as it needs, gone until there are photos
   (Codex judge 10-17: the fixed stage left 240-300 px for the task) */
@media (max-width: 899px) {
  .ds.is-cal .ds-body, .ds.is-cal:is([data-step="texti"], [data-step="yfirfara"]) .ds-body { grid-template-rows: auto minmax(0, 1fr); }
  .ds.is-cal.no-photos .ds-body { grid-template-rows: minmax(0, 1fr); }
  .ds.is-cal.no-photos .ds-stage { display: none; }
  .ds.is-cal .ds-view.is-flat:has(.ds-strip) > .ds-flat { display: none; }
  .ds.is-cal .ds-view.is-flat { padding: 8px 0 6px; gap: 6px; align-content: start; }
  .ds.is-cal .ds-strip { padding: 4px 12px 4px; scroll-padding-inline: 12px; }
  .ds.is-cal .ds-strip-b { font-size: 11px; }
  .ds.is-cal .ds-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds.is-cal .ds-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds.is-cal .ds-stagetools .ds-pillbtn { padding: 0 12px; min-width: 44px; justify-content: center; }
  .ds.is-cal .ds-stagetools .ds-undo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.ds-stagetools { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ds-undo { padding: 0 14px; }
.ds-undo:disabled { opacity: .35; cursor: default; box-shadow: inset 0 0 0 1px var(--line); }
.ds-pillbtn.is-on { background: var(--ink); color: #fff !important; box-shadow: none; }
/* the zoom: a whole page or close enough to read */
.ds-zoom-in img.ds-zoom-cv { max-width: none; max-height: none; height: auto; }
.ds-zoom-modes { display: flex; justify-content: center; gap: 10px; padding: 10px 12px calc(10px + var(--safe-b, 0px)); background: #fff; border-top: 1px solid rgba(0, 0, 0, .12); }
/* photo tools big enough for a thumb (Codex judge 10-17: they were 32 px) */
.ds-mini { min-height: 44px; padding: 0 10px; font-size: 12px; }
.ds-pcell-t { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ds-pcell-t .ds-mini { justify-content: center; padding: 0 2px; flex-direction: column; gap: 1px; font-size: 10.5px; border-radius: 10px; min-width: 0; }
.ds-pcell.is-free .ds-pcell-t { grid-template-columns: minmax(0, 1fr); }
.ds-pcell.is-free .ds-pcell-t .ds-mini { flex-direction: row; gap: 6px; font-size: 12px; }
/* the date grid: bigger days, less nesting, a month jump */
.ds-task-b { padding: 4px 10px 14px; }
.ds-dg { padding: 10px 8px; gap: 8px; }
.ds-dg-grid { gap: 3px; }
.ds-dg-d { min-height: 44px; font-size: 17px; }
.ds-dg-mon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; background: none; }
.ds-dg-months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ds-dg-mb { min-height: 48px; border: 0; border-radius: 8px; background: var(--paper); font-size: 16px; }
.ds-dg-mb.is-on { background: var(--ink); color: #fff; }
@media (max-width: 380px) { .ds-dg-d { min-height: 40px; font-size: 16px; } .ds-dg { padding: 8px 4px; } }
/* the cover text and month words: grow with the text */
.ds-inwrap textarea.ds-onelinearea { min-height: 54px; resize: none; line-height: 26px; padding-top: 13px; padding-bottom: 13px; overflow: hidden; }
/* desktop: the forward button never runs past the panel */
.ds-bar .ds-btn--lg { min-width: 0; }
@media (min-width: 700px) and (max-width: 899px) { .ds.is-cal .ds-looks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ds.is-cal .ds-pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ds.is-cal .ds-pages { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ds-dg-grid, .ds-dg-months { width: 100%; max-width: 440px; justify-self: center; }
/* phones (Sindri 10-17 "flawless on mobile"): at 320×568 the header, steps, strip, tools and bar left the task
   about 110 px. The bar becomes one short line of price over two real buttons on every phone; on short
   phones (< 760 px tall) the header and steps shrink and the page tools sit beside the strip, not under it */
@media (max-width: 599px) {
  .ds.is-cal .ds-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; padding: 8px 12px calc(10px + var(--safe-b)); }
  .ds.is-cal .ds-bar-btns { display: contents; }
  .ds.is-cal .ds-bar-sum { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: baseline; gap: 10px; }
  .ds.is-cal .ds-bar-price { font-size: 16px; }
  .ds.is-cal .ds-bar .ds-back { grid-column: 1; grid-row: 2; min-height: 52px; padding: 0 14px 0 10px; gap: 4px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); text-decoration: none; font-size: 12px; }
  .ds.is-cal .ds-bar-btns > :not(.ds-back) { grid-column: 2; grid-row: 2; min-height: 52px; }
  .ds.is-cal .ds-bar .ds-back[hidden] ~ * { grid-column: 1 / -1; }
  .ds.is-cal .ds-bar .ds-btn--lg { padding: 0 12px; }
}
@media (max-width: 380px) {
  .ds.is-cal .ds-bar .ds-back-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds.is-cal .ds-bar .ds-back { padding: 0; width: 52px; justify-content: center; }
  .ds.is-cal .ds-lt-a { font-size: 24px; }
  .ds.is-cal .ds-lt-b { font-size: 12px; }
  .ds.is-cal .ds-ltile { padding: 10px; }
}
@media (max-width: 599px) and (max-height: 759px) {
  .ds.is-cal .ds-top { min-height: 48px; padding-top: calc(2px + env(safe-area-inset-top, 0px)); padding-bottom: 2px; }
  .ds.is-cal .ds-top h2 { font-size: 16px; }
  .ds.is-cal .ds-steps button { gap: 3px; min-height: 48px; padding: 5px 2px 4px; }
  .ds.is-cal .ds-num { width: 18px; height: 18px; font-size: 10px; }
  .ds.is-cal .ds-lab { overflow-wrap: normal; white-space: nowrap; }
  .ds.is-cal .ds-lab[data-short] { font-size: 0; }
  .ds.is-cal .ds-lab[data-short]::after { content: attr(data-short); font-size: 10px; }
  .ds.is-cal .ds-view.is-flat { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 6px 0 4px; column-gap: 6px; }
  .ds.is-cal .ds-strip { grid-column: 1; grid-row: 1; padding: 3px 4px 3px 12px; gap: 6px; }
  .ds.is-cal .ds-strip-b { font-size: 10px; padding: 2px; gap: 2px; }
  .ds.is-cal .ds-stagetools { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 44px 44px; gap: 4px; padding-right: 12px; }
  .ds.is-cal .ds-stagetools .ds-zoombtn { grid-column: 1 / -1; grid-row: 1; min-height: 44px; padding: 0 6px; gap: 4px; font-size: 11px; }
  .ds.is-cal .ds-stagetools .ds-undo { grid-row: 2; }
  .ds.is-cal .ds-stagetools .ds-zoombtn span[data-short] { font-size: 0; letter-spacing: 0; }
  .ds.is-cal .ds-stagetools .ds-zoombtn span[data-short]::after { content: attr(data-short); font-size: 11px; }
  .ds.is-cal .ds-pbody { padding-top: 16px; }
  .ds.is-cal .ds-pbody h3 { font-size: 22px; line-height: 26px; }
}
.ds-zoom-in:focus { outline: none; }
/* ---------- one decision per control (Sindri 10-18, _docs/PROMPT-OPTION-CONTROLS.md) ----------
   the legend shows the chosen value beside the label; 2–3 options are one track of equal segments, more wrap
   into an equal grid; swatches carry no text; sold out = faded and struck through, named in one line under */
fieldset.ds-fs { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset.ds-fs > legend.ds-label { float: left; width: 100%; padding: 0; }
fieldset.ds-fs > legend.ds-label + * { clear: both; }
.ds-label .ds-val, .ds-ghead .ds-val { margin-left: 10px; font-family: var(--serif); font-weight: 400; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.ds-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; width: 100%; max-width: 420px; padding: 3px; background: var(--table); box-shadow: inset 0 0 0 1px var(--line); }
.ds-seg.is-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); max-width: none; }
.ds-seg.is-grid.is-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-seg-b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--ink); font-size: 15px; line-height: 18px; text-align: center; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ds-seg-b > span { overflow: hidden; text-overflow: ellipsis; }
.ds-seg-b:hover:not(.is-on):not(:disabled) { background: var(--paper); }
.ds-seg-b.is-on { background: var(--ink); color: #fff; }
.ds-seg-b:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; position: relative; z-index: 1; }
.ds-seg-b:disabled { opacity: .45; text-decoration: line-through; cursor: default; }
.ds-seg.is-icons { max-width: 180px; }
.ds-color.is-none { background: linear-gradient(135deg, transparent 46%, rgba(0, 0, 0, .4) 46% 54%, transparent 54%), #fff; }
.ds-color.is-sold { opacity: .4; background-image: linear-gradient(135deg, transparent 46%, rgba(0, 0, 0, .55) 46% 54%, transparent 54%); cursor: default; }
.ds-color:focus-visible, .ds-font:focus-visible, .ds-pal:focus-visible, .ds-ltile:focus-visible, .ds-look:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ds-zoom-seg { width: min(320px, 100%); background: #f1efea; }
@media (max-width: 899px) { .ds-seg:not(.is-icons) { max-width: none; } }
@media (max-width: 699px) { .ds-zoom-in.is-fit { justify-content: center; } }
/* iOS pass 10-18: with the keyboard up the bar steps aside on a calendar too (the phone bar rule above outranked the is-typing hide) */
@media (max-width: 899px) { .ds.is-cal.is-typing .ds-bar { display: none; } }
/* photos on their way (Sindri's phone test 10-18): a strip above the bar counts them in and says when the work can go on */
.ds-panel { grid-template-rows: minmax(0, 1fr) auto auto auto; }
.ds-panel > .ds-upbar { grid-row: 2; grid-column: 1; }
.ds-panel > .ds-more { grid-row: 3; }
.ds-panel > .ds-bar { grid-row: 4; }
.ds-upbar { display: grid; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14px; line-height: 18px; }
.ds-upbar[hidden], .ds.is-typing .ds-upbar { display: none; }
.ds-upbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; }
.ds-upbar-t { font-variant-numeric: tabular-nums; }
.ds-upbar .ds-link { flex: none; min-height: 32px; }
.ds-upbar-track { display: block; height: 4px; border-radius: 2px; background: var(--table-2); overflow: hidden; }
.ds-upbar-track > i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform .45s var(--ease); }
.ds-upbar.is-done .ds-upbar-track > i { background: var(--ok); }
.ds-upbar.is-bad { background: var(--warn-bg); }
.ds-upbar.is-bad .ds-upbar-track > i { background: var(--warn); }
@media (prefers-reduced-motion: reduce) { .ds-upbar-track > i { transition: none; } }
