/* "Design your own" editor. Phone first; desktop (≥ 960px) puts the tools in a side panel.
   Tokens from tokens.css; no shadows; 44px+ tap targets; navy focus ring. */

.mkd [hidden] { display: none !important; }
.mk-designer-body { margin: 0; background: var(--mk-white); overscroll-behavior: none; }

.mkd { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; font-family: var(--mk-font); color: var(--mk-navy); }

/* Header */
.mkd-head { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px; border-bottom: 1px solid var(--mk-line); background: var(--mk-white); }
.mkd-head__title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; padding: 0 4px; }
.mkd-head__title strong { font-size: 15px; font-weight: var(--mk-weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkd-head__title span { font-size: var(--mk-size-caption); color: var(--mk-text-muted); }
.mkd-icon-btn { flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 50%; color: var(--mk-navy); cursor: pointer; }
.mkd-icon-btn svg, .mkd-tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mkd-icon-btn:disabled { opacity: var(--mk-disabled-opacity, .4); cursor: default; }
.mkd-icon-btn:not(:disabled):hover { background: var(--mk-panel); }
.mkd :focus-visible { outline: 3px solid var(--mk-focus-ring); outline-offset: 2px; }

/* Stage */
.mkd-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mkd-stage { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 6px; background: #F2F2F2; }
.mkd-sides { flex: 0 0 auto; display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 0 12px; scroll-padding: 0 12px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); }
.mkd-sides::-webkit-scrollbar { display: none; }
.mkd-spot { position: relative; flex: 0 0 auto; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 2px 4px; border: 2px solid transparent; border-radius: 12px; background: var(--mk-white); font: inherit; font-size: 11px; font-weight: var(--mk-weight-strong); line-height: 1.15; color: var(--mk-navy); cursor: pointer; }
.mkd-spot__img { width: 42px; height: 48px; border-radius: 6px; }
.mkd-spot span { max-width: 100%; min-height: 2.3em; display: flex; align-items: center; text-align: center; white-space: normal; }
.mkd-spot.is-on { border-color: var(--mk-navy); }
.mkd-spot.has-art::after { content: ""; position: absolute; top: 4px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--mk-yellow, #F5B301); border: 2px solid var(--mk-white); }
.mkd-size:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.mkd-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; width: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.mkd-canvas-wrap .canvas-container { touch-action: none; }
.mkd-empty { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; pointer-events: none; text-align: center; font-size: 14px; color: var(--mk-text-muted); background: rgba(255,255,255,.88); border-radius: 999px; padding: 8px 14px; }
.mkd-empty p { margin: 0; }
.mkd[data-state="loading"] .mkd-empty, .mkd:not([data-state="loading"]) .mkd-loading { display: none; }
.mkd-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--mk-text-muted); font-size: 14px; }
.mkd-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--mk-line); border-top-color: var(--mk-navy); animation: mkd-spin .8s linear infinite; }
@keyframes mkd-spin { to { transform: rotate(360deg); } }
.mkd-warn { max-width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--mk-radius-control); background: var(--mk-yellow-tint); font-size: 13px; line-height: 1.35; }
.mkd-warn.is-error { background: #fdecec; color: var(--mk-error); }
.mkd-warn { flex-wrap: wrap; }
.mkd-warn__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.mkd-warn button.is-main { background: var(--mk-error); border-color: var(--mk-error); color: #fff; }
.mkd-warn:not(.is-error) button.is-main { background: var(--mk-navy, #10243E); border-color: var(--mk-navy, #10243E); }
.mkd-warn button { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border-radius: var(--mk-radius-button); border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-weight: var(--mk-weight-strong); cursor: pointer; }

/* Tools */
.mkd-panel { flex: 0 0 auto; background: var(--mk-white); border-top: 1px solid var(--mk-line); }
.mkd-tools { display: flex; justify-content: space-around; padding: 4px 4px 0; }
.mkd-tool { flex: 1 1 0; min-width: 56px; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; border-radius: var(--mk-radius-control); font: inherit; font-size: 12px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; }
.mkd-tool:hover { background: var(--mk-panel); }
.mkd-tool--done { color: var(--mk-navy); }
.mkd-tool--done svg { stroke-width: 2.6; }

.mkd-buy { box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--mk-line); }
.mkd-price { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.mkd-price__amount { font-size: 22px; font-weight: var(--mk-weight-display); }
.mkd-price__note { font-size: var(--mk-size-caption); color: var(--mk-text-muted); }
.mkd-preview-btn { min-height: 52px; min-width: 140px; }
.mkd-preview-btn:disabled, .mkd-add:disabled { opacity: var(--mk-disabled-opacity, .45); cursor: not-allowed; }

/* Sheets */
.mkd-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(16,36,62,.32); }
.mkd-sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 46dvh; overflow-y: auto; padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--mk-white); border-top: 1px solid var(--mk-line); border-radius: 24px 24px 0 0; }
.mkd-sheet--tall { max-height: 92dvh; }
.mkd-sheet__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 52px; background: var(--mk-white); }
.mkd-sheet__head strong { font-size: 17px; }
.mkd-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mkd-row-label { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; font-size: 13px; font-weight: var(--mk-weight-strong); text-transform: uppercase; letter-spacing: var(--mk-tracking-caps, .06em); color: var(--mk-text-muted); }
.mkd-fonts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.mkd-font { flex: 0 0 auto; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--mk-line); border-radius: var(--mk-radius-control); background: var(--mk-white); font-size: 18px; color: var(--mk-navy); cursor: pointer; white-space: nowrap; }
.mkd-font.is-on { border-color: var(--mk-navy); border-width: 2px; }
.mkd-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.mkd-swatch { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--mk-line-strong); cursor: pointer; padding: 0; box-sizing: border-box; }
.mkd-swatch.is-on { outline: 2px solid var(--mk-navy); outline-offset: 3px; }
.mkd-swatches--garment .mkd-swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; font-size: 12px; text-align: center; }

/* Preview sheet */
.mkd-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 420px)); justify-content: center; gap: 10px; }
.mkd-preview figure { margin: 0; background: var(--mk-panel); border-radius: var(--mk-radius-card); overflow: hidden; }
.mkd-preview img { width: 100%; display: block; }
.mkd-preview figcaption { padding: 6px 10px; font-size: 13px; font-weight: var(--mk-weight-strong); }
.mkd-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.mkd-size { min-width: 56px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--mk-line-strong); border-radius: var(--mk-radius-control); background: var(--mk-white); font: inherit; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; }
.mkd-size.is-on { background: var(--mk-navy); border-color: var(--mk-navy); color: var(--mk-white); }
.mkd-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.mkd-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--mk-line-strong); border-radius: var(--mk-radius-control); }
.mkd-stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; color: var(--mk-navy); cursor: pointer; }
.mkd-stepper input { width: 44px; height: 44px; border: 0; text-align: center; font: inherit; font-weight: var(--mk-weight-strong); -moz-appearance: textfield; }
.mkd-stepper input::-webkit-outer-spin-button, .mkd-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mkd-facts { margin: 14px 0; padding: 12px 14px; list-style: none; background: var(--mk-panel); border-radius: var(--mk-radius-card); font-size: 13px; line-height: 1.45; display: grid; gap: 6px; }
.mkd-facts li#mkd-breakdown { font-weight: var(--mk-weight-strong); }
.mkd-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.mkd-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--mk-navy); flex: 0 0 auto; }
.mkd-check .mkd-link { min-height: 0; display: inline; padding: 0; font-size: 13px; }
.mkd-error { margin: 10px 0 0; color: var(--mk-error); font-size: 14px; font-weight: var(--mk-weight-strong); }
.mkd-add { width: 100%; min-height: 56px; margin-top: 0; font-size: 17px; }
/* Add to kart stays in view at the bottom of the preview sheet. */
.mkd-sheet--tall { padding-bottom: 0; }
.mkd-sheet__foot { position: sticky; bottom: 0; z-index: 1; margin: 14px -16px 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--mk-white); border-top: 1px solid var(--mk-line); }
.mkd-sheet__foot .mkd-error { margin: 0 0 8px; }


/* Zoom toggle, toast */
.mkd-zoom { position: absolute; right: 10px; top: 8px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mk-line); border-radius: 50%; background: rgba(255,255,255,.92); color: var(--mk-navy); cursor: pointer; }
.mkd-zoom svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* Messages (warning, toast) sit in a fixed-height slot under the design (--mkd-msg-h, one line), so
   showing or hiding one never changes the canvas size or zoom. A taller message grows upward over the
   product margin under the print area (the e2e suite checks it never reaches the outline). Phone held
   sideways: they go in the side panel instead. */
.mkd-msgs { --mkd-msg-h: 52px; position: relative; z-index: 6; flex: 0 0 var(--mkd-msg-h); height: var(--mkd-msg-h); width: 100%; pointer-events: none; }
.mkd-msgs__in { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 12px; box-sizing: border-box; }
.mkd-msgs__in > * { pointer-events: auto; }
.mkd-warn__text { flex: 1 1 160px; min-width: 0; }
.mkd-toast { position: relative; flex: 0 0 auto; width: 100%; z-index: 6; max-width: 640px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; padding: 10px 12px; border-radius: 14px; background: var(--mk-navy); color: var(--mk-white); font-size: 14px; line-height: 1.35; box-sizing: border-box; }
.mkd-toast #mkd-toast-text { flex: 1 1 200px; }
.mkd-toast__btns { flex: 1 0 auto; max-width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mkd-toast__btns button { max-width: 100%; white-space: normal; }
.mkd-toast button.is-main { background: var(--mk-yellow, #F5B301); border-color: var(--mk-yellow, #F5B301); color: var(--mk-navy); }
.mkd.has-toast .mkd-empty { visibility: hidden; }
.mkd-toast button { flex: 0 0 auto; min-height: 40px; padding: 0 12px; border: 1.5px solid currentColor; border-radius: var(--mk-radius-button); background: transparent; color: inherit; font: inherit; font-weight: var(--mk-weight-strong); cursor: pointer; }

/* Print method chip (buy bar) and sheet */
.mkd-method-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 32px; margin-top: 4px; padding: 0 6px 0 10px; border: 1px solid var(--mk-line-strong); border-radius: 999px; background: var(--mk-white); font: inherit; font-size: 12px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; }
.mkd-method-chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.mkd-methods { display: grid; gap: 10px; }
.mkd-method { display: grid; gap: 4px; width: 100%; padding: 12px 14px; text-align: left; border: 1.5px solid var(--mk-line-strong); border-radius: var(--mk-radius-card); background: var(--mk-white); font: inherit; color: var(--mk-navy); cursor: pointer; }
.mkd-method.is-on { border: 2px solid var(--mk-navy); background: var(--mk-panel); }
.mkd-method:disabled { cursor: not-allowed; opacity: .6; }
.mkd-method__head { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.mkd-method__head em { font-style: normal; font-weight: var(--mk-weight-strong); white-space: nowrap; }
.mkd-method__desc { font-size: 13px; line-height: 1.4; color: var(--mk-text-muted); }
.mkd-method__limit { font-size: 12px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); }
.mkd-method:disabled .mkd-method__limit { color: var(--mk-text-muted); }
.mkd-hint { margin: 12px 0 0; font-size: 12px; color: var(--mk-text-muted); }
.mkd-preview__err { padding: 16px; font-size: 13px; color: var(--mk-error); }

/* Docks: panels that sit under the design (above the keyboard) instead of covering it */
.mkd-dock { flex: 0 0 auto; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--mk-white); border-top: 1px solid var(--mk-line); }
.mkd-dock__bar { display: flex; align-items: center; gap: 8px; }
.mkd-dock__bar--title { align-items: center; justify-content: space-between; min-height: 44px; }
.mkd-dock__bar--title strong { font-size: 16px; }
.mkd-dock__done { flex: 0 0 auto; min-height: 44px; padding: 0 16px; }
.mkd-segs { display: flex; gap: 4px; margin: 8px 0 6px; padding: 3px; border-radius: 999px; background: var(--mk-panel); }
.mkd-seg { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 14px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; }
.mkd-seg.is-on { background: var(--mk-white); box-shadow: 0 0 0 1px var(--mk-line); }
.mkd-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.mkd-chips::-webkit-scrollbar, .mkd-fonts::-webkit-scrollbar, .mkd-swatches--row::-webkit-scrollbar { display: none; }
.mkd-chip { flex: 0 0 auto; min-height: 34px; padding: 0 12px; border: 1px solid var(--mk-line-strong); border-radius: 999px; background: var(--mk-white); font: inherit; font-size: 13px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; white-space: nowrap; }
.mkd-chip.is-on { background: var(--mk-navy); border-color: var(--mk-navy); color: var(--mk-white); }
.mkd-dock .mkd-font { min-height: 48px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-size: 19px; }
.mkd-swatches--row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 6px; }
.mkd-swatches--row .mkd-swatch { flex: 0 0 auto; width: 40px; height: 40px; }
.mkd-swatch--none { background: linear-gradient(135deg, transparent 46%, var(--mk-error) 46%, var(--mk-error) 54%, transparent 54%), var(--mk-white); }
.mkd-dock .mkd-row-label { margin: 6px 0 2px; }
.mkd-dock .mkd-swatches--garment { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 4px; }
.mkd-dock .mkd-swatches--garment .mkd-swatch-wrap { flex: 0 0 auto; }
.mkd-style-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.mkd-align { display: inline-flex; border: 1.5px solid var(--mk-line-strong); border-radius: var(--mk-radius-control); overflow: hidden; }
.mkd-align button { width: 48px; height: 44px; border: 0; background: var(--mk-white); color: var(--mk-navy); cursor: pointer; }
.mkd-align button + button { border-left: 1px solid var(--mk-line); }
.mkd-align button.is-on { background: var(--mk-navy); color: var(--mk-white); }
.mkd-align svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mkd-slider { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: var(--mk-weight-strong); }
.mkd-slider span { flex: 0 0 64px; }
.mkd-slider input { flex: 1; accent-color: var(--mk-navy); height: 44px; }
.mkd-slider output { flex: 0 0 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--mk-text-muted); }
.mkd-slider input:disabled { opacity: .4; }

/* Side layout (desktop, and phones held sideways): canvas left, tools and buying on the right. A phone held
   upright stays in the phone layout when the keyboard leaves it wider than tall (min-width 520px).
   Docks and the print type sheet open inside the panel (designer.js moves them there), above the price
   and Preview & buy, which always stay in view. Same query as SIDE_Q in designer.js. */
@media (min-width: 960px), (orientation: landscape) and (max-height: 500px) and (min-width: 520px) {
	.mkd-main { flex-direction: row; }
	.mkd-panel { flex: 0 0 380px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-top: 0; border-left: 1px solid var(--mk-line); }
	.mkd-panel > .mkd-tools { flex: 0 0 auto; }
	.mkd.has-side-open .mkd-panel > .mkd-tools { display: none; }
	.mkd-panel > .mkd-dock, .mkd-panel > .mkd-sheet { position: static; z-index: auto; flex: 1 1 auto; min-height: 0; width: auto; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 16px; border: 0; border-radius: 0; }
	.mkd-buy { margin-top: auto; flex: 0 0 auto; min-height: 0; border-top: 1px solid var(--mk-line); }
	.mkd-scrim { background: rgba(16,36,62,.24); }
	/* Preview & buy: a wide drawer so the previews can be big. */
	.mkd-sheet--tall { left: auto; right: 0; top: 0; bottom: 0; width: min(960px, calc(100vw - 80px)); max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--mk-line); padding-left: 24px; padding-right: 24px; }
	.mkd-sheet--tall .mkd-sheet__foot { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
	.mkd-dock .mkd-fonts, .mkd-dock .mkd-swatches--row, .mkd-dock .mkd-swatches--garment { flex-wrap: wrap; }
	.mkd-dock .mkd-font { max-width: none; }
}
@media (min-width: 960px) {
	.mkd-stage { padding: 24px; }
	.mkd-msgs { --mkd-msg-h: 48px; }
	.mkd-msgs__in { padding: 0; }
	.mkd-tools { flex-direction: column; gap: 10px; padding: 20px 16px; }
	.mkd-tool { flex: 0 0 auto; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; justify-items: start; min-height: 72px; padding: 12px 16px; border: 1.5px solid var(--mk-line); text-align: left; font-size: 16px; }
	.mkd-tool svg { grid-row: 1 / span 2; width: 28px; height: 28px; justify-self: center; }
	.mkd-tools .mkd-tool .mkd-tool__desc { display: block; font-size: 13px; font-weight: 400; color: var(--mk-text-muted); }
	.mkd-tool:hover { border-color: var(--mk-navy); }
	.mkd-tools--layer { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
	.mkd-tools--layer .mkd-tool { flex: 1 1 30%; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 64px; padding: 6px; text-align: center; font-size: 12px; }
	.mkd-tools--layer .mkd-tool svg { width: 22px; height: 22px; }
	.mkd-head__title strong { font-size: 17px; }
	.mkd-buy { padding: 16px; }
}
/* Phone held sideways: slim header, compact print spots, 2 x 2 tools; the design gets the height. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 520px) {
	.mkd-head { height: 44px; }
	.mkd-head__title { flex-direction: row; align-items: baseline; gap: 8px; }
	.mkd-head__title strong { font-size: 14px; }
	.mkd-icon-btn { width: 40px; height: 40px; }
	.mkd-head-btn { min-height: 40px; }
	.mkd-stage { padding: 4px 0; gap: 4px; }
	.mkd-spot { flex-direction: row; width: auto; padding: 2px 10px; border-radius: 999px; min-height: 36px; }
	.mkd-spot__img { display: none; }
	.mkd-spot span { min-height: 0; white-space: nowrap; }
	.mkd-spot.has-art::after { top: 2px; right: 2px; }
	.mkd-empty { display: none; }
	.mkd-zoom { top: 4px; width: 40px; height: 40px; }
	.mkd-panel { flex-basis: 300px; overflow-y: auto; }
	.mkd-panel > .mkd-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 8px; }
	.mkd-panel > .mkd-tools--layer { grid-template-columns: repeat(3, 1fr); padding: 4px 8px; }
	.mkd-tool { min-height: 44px; flex-direction: row; gap: 6px; padding: 0 6px; }
	.mkd-tools--layer .mkd-tool { min-height: 44px; font-size: 11px; }
	.mkd-buy { position: sticky; bottom: 0; background: var(--mk-white); flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
	.mkd-price__amount { font-size: 18px; }
	.mkd-method-chip { min-height: 30px; margin-top: 2px; }
	.mkd-preview-btn { flex: 1 1 100%; min-height: 44px; }
	.mkd-panel > .mkd-dock, .mkd-panel > .mkd-sheet { padding: 8px 12px; flex: 0 0 auto; overflow: visible; }
	.mkd-sheet--tall { width: min(760px, calc(100vw - 40px)); }
	.mkd-preview { grid-template-columns: repeat(auto-fit, minmax(140px, 240px)); }
	.mkd-toast { padding: 6px 10px; font-size: 13px; }
	/* Messages sit at the top of the panel (designer.js moves them), never over the short design. */
	.mkd-panel > .mkd-msgs { flex: 0 0 auto; height: auto; }
	.mkd-panel > .mkd-msgs .mkd-msgs__in { position: static; padding: 6px 8px 0; }
	.mkd-panel > .mkd-msgs .mkd-warn { width: 100%; box-sizing: border-box; flex-wrap: nowrap; gap: 8px; padding: 6px 8px; font-size: 12px; }
	.mkd-panel > .mkd-msgs .mkd-warn__text { flex: 1 1 auto; }
	.mkd-panel > .mkd-msgs .mkd-warn__acts { flex: 0 1 auto; flex-direction: column; gap: 4px; }
	.mkd-panel > .mkd-msgs .mkd-warn button { min-height: 32px; padding: 0 8px; }
	/* Text dock: the font list gets the panel's full height (the price and Preview come back with Done). */
	.mkd-panel:has(> #dock-text:not([hidden])) > .mkd-buy { display: none; }
	.mkd-panel > #dock-text { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
	.mkd-panel > #dock-text .mkd-pane[data-pane="font"]:not([hidden]) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
	.mkd-panel > #dock-text .mkd-fonts { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
	.mkd-panel > #dock-text .mkd-pane:not([data-pane="font"]) { overflow-y: auto; min-height: 0; }
	.mkd-panel > #dock-text .mkd-segs { margin: 6px 0 4px; }
	.mkd-panel > #dock-text > *, .mkd-panel > #dock-text .mkd-chips { flex-shrink: 0; }
	.mkd-panel > #dock-text > .mkd-pane[data-pane="font"] { flex-shrink: 1; }
	.mkd-panel > #dock-text .mkd-font { min-height: 50px; padding: 4px 10px; }
	.mkd-panel > #dock-text { padding: 6px 10px 0; }
	.mkd-panel > #dock-text .mkd-type { min-height: 40px; }
	.mkd-panel > #dock-text .mkd-dock__done { min-height: 40px; }
	.mkd-panel > #dock-text .mkd-segs { margin: 4px 0 2px; padding: 2px; }
	.mkd-panel > #dock-text .mkd-seg { min-height: 38px; }
	.mkd-panel > #dock-text .mkd-chips { padding-bottom: 4px; }
	.mkd-panel > #dock-text .mkd-chip { min-height: 32px; }
	.mkd-panel > #dock-text .mkd-fonts { padding: 2px 2px 10px; scroll-padding-top: 4px; }
	.mkd-panel > #dock-text .mkd-font-group { margin: 2px 0 0; font-size: 11px; }
	.mkd-panel > #dock-text .mkd-font-group:first-child { display: none; } /* the chip above says it */
}

/* Item tools: side layout, under the main tools, only for a selection (designer.js); phone upright, the one
   action slot shares their place (the phone block at the end). */
.mkd-tools--layer { box-sizing: border-box; min-height: 64px; background: var(--mk-panel); border-bottom: 1px solid var(--mk-line); padding: 2px 4px; }
.mkd-tools--layer .mkd-tool { min-height: 52px; }
.mkd-layer-hint { display: none; flex: 1 1 auto; align-self: center; margin: 0; text-align: center; font-size: 13px; color: var(--mk-text-muted); }
.mkd:not(.has-layer) .mkd-tools--layer > .mkd-tool { display: none; }
.mkd:not(.has-layer) .mkd-tools--layer > .mkd-layer-hint { display: block; }
.mkd-tool__desc { display: none; }
.mkd-empty__where { margin: 2px 0 0 !important; font-size: 12px; }
.mkd-empty { white-space: normal; max-width: calc(100% - 32px); }
.mkd-share { width: 100%; min-height: 48px; margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--mk-navy); border-radius: var(--mk-radius-button); background: var(--mk-white); font: inherit; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; }
.mkd-share svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.mkd-add:not(.is-ready) { opacity: .7; }
.mkd-check input { width: 24px; height: 24px; }
@keyframes mkd-flash { 0%, 100% { background: transparent; } 30% { background: var(--mk-yellow-tint, #FFF4CC); } }
.mkd-flash { animation: mkd-flash 1.2s ease 2; border-radius: 8px; }

/* Print type sheet */
.mkd-methods .mkd-row-label { margin: 10px 0 0; }
.mkd-method__name { display: inline-flex; align-items: center; gap: 8px; }
.mkd-method__dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--mk-line-strong); }
.mkd-method__dot.is-full { background: conic-gradient(#FF5F6D, #FFC371, #7CFFCB, #5EC8FF, #B983FF, #FF5F6D); }
.mkd-method__dot.is-thread { background: repeating-linear-gradient(45deg, #10243E 0 3px, #F5B301 3px 6px); }
.mkd-hint--top { margin: 0 0 8px; }
.mkd-sheet#sheet-method { max-height: 80dvh; }

/* Header: Start over */
.mkd-head-btn { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); cursor: pointer; }
.mkd-head-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mkd-head-btn:not(:disabled):hover { background: var(--mk-panel); }
.mkd-head-btn:disabled { opacity: var(--mk-disabled-opacity, .4); cursor: default; }
/* Next step */
.mkd-preview-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.mkd-preview-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; }
@keyframes mkd-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,179,1,.0); } 50% { box-shadow: 0 0 0 8px rgba(245,179,1,.35); } }
.mkd-pulse { animation: mkd-pulse 1s ease 3; }
/* Fonts: one grid, grouped, scrolls vertically */
.mkd-dock .mkd-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: min(34dvh, 260px); overflow-y: auto; overflow-x: hidden; padding: 2px 2px 8px; overscroll-behavior: contain; }
.mkd-font-group { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12px; font-weight: var(--mk-weight-strong); text-transform: uppercase; letter-spacing: .06em; color: var(--mk-text-muted); }
.mkd-dock .mkd-font { max-width: none; min-height: 60px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; padding: 6px 10px; text-align: left; }
.mkd-font__sample { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; line-height: 1.45; }
.mkd-font__name { font-family: var(--mk-font); font-size: 11px; font-weight: 400; color: var(--mk-text-muted); }
/* Side layout: the font grid scrolls with the panel. */
@media (min-width: 960px), (orientation: landscape) and (max-height: 500px) and (min-width: 520px) {
	.mkd-dock .mkd-fonts { max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Very wide screens (the owner's 2457 px): the header, print spots and side panel scale up for reading
   distance; the design keeps the rest of the width. */
@media (min-width: 1800px) {
	.mkd-head, .mkd-panel { zoom: 1.2; }
	.mkd-panel { flex-basis: 400px; }
	.mkd-spot { width: 80px; font-size: 13px; }
	.mkd-spot__img { width: 50px; height: 57px; }
	.mkd-toast { max-width: 760px; font-size: 16px; }
	.mkd-warn { font-size: 15px; }
	.mkd-msgs { --mkd-msg-h: 56px; }
}
@media (min-width: 2300px) {
	.mkd-head, .mkd-panel { zoom: 1.3; }
}
/* Very wide screens: bigger previews (each up to 600 px) in a wider drawer. */
@media (min-width: 1600px) {
	.mkd-sheet--tall { width: min(1320px, calc(100vw - 160px)); }
	.mkd-preview { grid-template-columns: repeat(auto-fit, minmax(240px, 600px)); }
}

/* Size presets (designer.js renderSizePresets): the selected layer's live size, then Small / Medium /
   Large / Fit area for the print type and spot in use. In the layer tools (its own line under the
   buttons) and in the text editor. Fixed slots: values change, the layout never does. */
.mkd-szp-row { display: flex; align-items: stretch; gap: 4px; min-width: 0; box-sizing: border-box; }
.mkd-tools--layer { flex-wrap: wrap; }
.mkd-tools--layer > .mkd-szp-row { flex: 1 1 100%; order: 10; padding: 2px 0 4px; }
.mkd-szp-now, .mkd-szp { flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px 3px; box-sizing: border-box; border-radius: var(--mk-radius-control); font: inherit; line-height: 1.15; text-align: center; }
/* The readout always shows in full (it takes its own width); the presets share the rest. */
.mkd-szp-now { flex: 0 0 auto; padding: 2px 2px; color: var(--mk-navy); }
.mkd-szp-now small { font-size: 11px; color: var(--mk-text-muted); white-space: nowrap; }
.mkd-szp-now b { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mkd-szp-row.is-wrong .mkd-szp-now b { color: var(--mk-error); }
.mkd-szp { border: 1.5px solid var(--mk-line-strong); background: var(--mk-white); color: var(--mk-navy); cursor: pointer; }
.mkd-szp b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.mkd-szp span { font-size: 11px; color: var(--mk-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mkd-szp:not(:disabled):hover { border-color: var(--mk-navy); }
.mkd-szp.is-on { background: var(--mk-navy); border-color: var(--mk-navy); color: var(--mk-white); }
.mkd-szp.is-on span { color: inherit; }
.mkd-szp.is-fix { border: 2px solid var(--mk-yellow, #F5B301); background: var(--mk-yellow-tint, #FFF4CC); animation: mkd-pulse 1s ease 3; }
.mkd-szp:disabled { opacity: .4; cursor: default; }
.mkd-szp-row--dock { margin: 8px 0 2px; }
/* Phone held sideways: the presets take a full row of the 3-column grid. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 520px) {
	.mkd-panel > .mkd-tools--layer > .mkd-szp-row { grid-column: 1 / -1; }
	.mkd-szp-row--dock { margin: 4px 0 0; }
}
@media (min-width: 960px) {
	.mkd-szp-now b, .mkd-szp b { font-size: 13px; }
	.mkd-szp span, .mkd-szp-now small { font-size: 12px; }
	.mkd-szp-now, .mkd-szp { min-height: 48px; }
}
/* Text editor: the words are typed on the design (in place); this button brings the keyboard back. */
.mkd-type { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1.5px dashed var(--mk-line-strong); border-radius: var(--mk-radius-control); background: var(--mk-white); font: inherit; font-size: 15px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); text-align: left; cursor: text; }
.mkd-type svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mkd-type span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkd-type.is-typing { border-style: solid; border-color: var(--mk-navy); background: var(--mk-yellow-tint, #FFF6D6); }
.mkd-type.is-more { border-style: solid; cursor: pointer; }
.mkd-type__aa { display: none; width: 22px; flex: none; font-size: 16px; font-weight: var(--mk-weight-display); text-align: center; }
.mkd-type.is-more svg { display: none; }
.mkd-type.is-more .mkd-type__aa { display: inline-block; }
/* Phone, typing on the design (designer.js markTyping): the canvas gets the room above the keyboard. The
   spot tabs, messages and the long text panel step aside; the compact bar (Font, colour & size / Done) stays. */
.mkd.is-typing .mkd-sides, .mkd.is-typing .mkd-msgs, .mkd.is-typing .mkd-zoom { display: none !important; }
.mkd.is-typing #dock-text > :not(.mkd-dock__bar) { display: none !important; }
.mkd.is-typing .mkd-stage { padding: 0; }
/* Print type sheet: a type refused only for its size offers to resize the design for it. */
.mkd-method-fix { width: 100%; min-height: 44px; margin-top: -4px; padding: 8px 14px; border: 1.5px solid var(--mk-navy); border-radius: var(--mk-radius-button); background: var(--mk-yellow, #F5B301); font: inherit; font-size: 14px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); text-align: center; cursor: pointer; }
.mkd-method-fix:disabled { opacity: .6; cursor: progress; }

/* ===================================================================================================
   Phone layout ("Proposal A · Lean editor", 2026-11-16). Phone held upright only: the side layout
   (desktop, phones held sideways) is untouched. Same query as "not SIDE_Q" in designer.js.
   Header 48 · spot pills 44 · the design · messages 48 · ONE action slot 64 · price bar 72.
   Every bar has a fixed height, so the canvas never changes size (re-zooms) while editing.
   =================================================================================================== */
@media (min-width: 960px), (orientation: landscape) and (max-height: 500px) and (min-width: 520px) {
	.mkd .mkd-ph { display: none !important; }
}
@media (max-width: 959.98px) and (orientation: portrait), (max-width: 959.98px) and (min-height: 501px), (max-width: 519.98px) {
	.mkd { --mkd-head-h: 48px; --mkd-pills-h: 44px; --mkd-msg-h: 48px; --mkd-slot-h: 64px; --mkd-buy-h: 72px; }
	.mkd .mkd-dt, .mkd #mkd-reset, .mkd .mkd-zoom, .mkd .mkd-tool[data-tool="print"], .mkd .mkd-layer-hint { display: none !important; }

	/* Header: close, product + colour, Undo, Redo, the menu */
	.mkd-head { height: var(--mkd-head-h); gap: 0; padding: 0 4px; }
	.mkd-head .mkd-icon-btn { width: 44px; }
	.mkd-pop { position: absolute; z-index: 60; display: flex; flex-direction: column; min-width: 220px; padding: 6px; background: var(--mk-white); border: 1px solid var(--mk-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(16,36,62,.18); }
	.mkd-pop > button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 15px; font-weight: var(--mk-weight-strong); color: var(--mk-navy); text-align: left; cursor: pointer; white-space: nowrap; }
	.mkd-pop > button:hover, .mkd-pop > button:focus-visible { background: var(--mk-panel); }
	.mkd-pop svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
	.mkd-pop--menu { top: calc(var(--mkd-head-h) - 4px); right: 8px; }

	/* The design area: no padding; pills, canvas and the message slot stacked. */
	.mkd-stage { gap: 0; padding: 0; overflow: visible; }
	.mkd.is-typing .mkd-stage { overflow: hidden; }

	/* Spot pills (owner's order: Front, chests, sleeves, Back last). A dot marks a spot with art; the row
	   fades at the edges and the active pill scrolls into view, so more spots are obvious. */
	.mkd-sides { box-sizing: border-box; width: 100%; max-width: none; height: var(--mkd-pills-h); flex: 0 0 var(--mkd-pills-h); align-items: center; gap: 8px; padding: 0 16px; scroll-padding: 0 24px; background: var(--mk-white); border-bottom: 1px solid var(--mk-line); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent); }
	.mkd.one-spot .mkd-sides { display: none; }
	.mkd-spot { flex-direction: row; width: auto; min-height: 34px; gap: 6px; padding: 0 14px; border: 1.5px solid var(--mk-line-strong); border-radius: 999px; font-size: 14px; line-height: 1; white-space: nowrap; }
	.mkd-spot__img { display: none; }
	.mkd-spot span { min-height: 0; white-space: nowrap; }
	.mkd-spot.is-on { background: var(--mk-navy); border-color: var(--mk-navy); color: var(--mk-white); }
	.mkd-spot.has-art::after { content: none; }
	.mkd-spot.has-art::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--mk-yellow, #F5B301); }

	/* "Now 8.4 x 2.3 in" while the size presets show. */
	.mkd-size-now { display: none; position: absolute; left: 12px; top: 10px; z-index: 5; padding: 6px 12px; border: 1px solid var(--mk-line); border-radius: 999px; background: rgba(255,255,255,.94); font-size: 14px; font-weight: var(--mk-weight-strong); font-variant-numeric: tabular-nums; pointer-events: none; }
	.mkd.is-sizing.has-layer .mkd-size-now { display: block; }
	.mkd-size-now.is-wrong { color: var(--mk-error); }

	/* Messages: a fixed slot under the design; never over the design or its outline. A long message is
	   clamped to two lines; its buttons scroll sideways. A question (it waits for an answer) may cover the
	   tools below it instead, never the design. */
	.mkd-msgs { --mkd-msg-h: 48px; flex: 0 0 var(--mkd-msg-h); height: var(--mkd-msg-h); }
	.mkd-msgs__in { top: 0; bottom: auto; padding: 2px 8px 0; gap: 4px; }
	.mkd-warn { box-sizing: border-box; width: 100%; min-height: 44px; flex-wrap: nowrap; gap: 8px; padding: 4px 6px 4px 10px; font-size: 13px; line-height: 1.25; }
	.mkd-warn__text { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.mkd-warn__acts { flex: 0 1 auto; max-width: 58%; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
	.mkd-warn__acts::-webkit-scrollbar { display: none; }
	.mkd-warn button { min-height: 36px; padding: 0 10px; white-space: nowrap; }
	.mkd-toast { min-height: 44px; flex-wrap: nowrap; padding: 4px 6px 4px 12px; gap: 8px; border-radius: 12px; font-size: 13px; line-height: 1.25; }
	.mkd-toast #mkd-toast-text { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.mkd-toast__btns { flex: 0 1 auto; max-width: 60%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
	.mkd-toast__btns button { white-space: nowrap; }
	.mkd-toast__btns button:first-child { margin-left: auto; }
	.mkd-toast__btns:empty { display: none; }
	.mkd-toast.is-ask { flex-wrap: wrap; padding: 10px 10px 8px 12px; box-shadow: 0 10px 30px rgba(16,36,62,.25); }
	.mkd-toast.is-ask #mkd-toast-text { flex-basis: 100%; -webkit-line-clamp: 4; }
	.mkd-toast.is-ask .mkd-toast__btns { max-width: 100%; flex: 1 1 100%; flex-wrap: wrap; overflow: visible; justify-content: flex-end; }
	.mkd-toast.is-ask .mkd-toast__btns button:first-child { margin-left: 0; }
	.mkd-toast.is-hint #mkd-toast-text::before { content: "\2713\00a0\00a0"; color: var(--mk-yellow, #F5B301); font-weight: var(--mk-weight-strong); }
	.mkd-empty { bottom: 10px; }

	/* ONE action slot (64 px): nothing selected: Add text / Add photo / Colour; a layer selected: Type
	   (or Replace) / Style / Size / More / Done; Size: Small / Medium / Large / Biggest in the same place. */
	.mkd-panel { position: relative; }
	.mkd-panel > .mkd-tools { box-sizing: border-box; height: var(--mkd-slot-h); min-height: 0; padding: 4px; align-items: stretch; background: var(--mk-white); border-bottom: 0; overflow: visible; }
	.mkd.has-layer .mkd-panel > #mkd-tools { display: none; }
	.mkd:not(.has-layer) .mkd-panel > #mkd-layer-tools { display: none; }
	.mkd-panel > .mkd-tools .mkd-tool { min-height: 0; flex: 1 1 0; font-size: 13px; }
	.mkd-tool[data-tool="text"] { order: 1; } .mkd-tool[data-tool="photo"] { order: 2; } .mkd-tool[data-tool="colour"] { order: 3; }
	.mkd-tools--layer { position: relative; flex-wrap: nowrap; background: var(--mk-panel); }
	.mkd-tools--layer > [data-act="center"], .mkd-tools--layer > [data-act="duplicate"], .mkd-tools--layer > [data-act="forward"] { display: none; }
	.mkd.layer-photo .mkd-tools--layer [data-act="style"] { display: none; }
	.mkd-tool__aa { font-size: 19px; line-height: 22px; font-weight: var(--mk-weight-display); }
	.mkd-tool[data-act="size"] { position: relative; }
	.mkd-tool[data-act="size"].has-fix::after { content: ""; position: absolute; top: 8px; left: calc(50% + 10px); width: 9px; height: 9px; border-radius: 50%; background: var(--mk-yellow, #F5B301); box-shadow: 0 0 0 2px var(--mk-panel); }
	.mkd-pop--more { right: 8px; bottom: calc(100% + 6px); }
	.mkd-panel .mkd-pop--more > .mkd-tool { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 15px; }
	.mkd-panel .mkd-pop--more > .mkd-tool:hover { background: var(--mk-panel); }
	.mkd-tools--layer > .mkd-szp-row { display: none; flex: 1 1 auto; order: 2; padding: 0; gap: 6px; }
	.mkd-szp-back { display: none; flex: 0 0 40px; order: 1; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--mk-navy); cursor: pointer; }
	.mkd-szp-back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
	.mkd.is-sizing .mkd-tools--layer > .mkd-tool, .mkd.is-sizing .mkd-tools--layer > .mkd-pop { display: none !important; }
	.mkd.is-sizing .mkd-tools--layer > .mkd-szp-back { display: flex; }
	.mkd.is-sizing .mkd-tools--layer > .mkd-szp-row { display: flex; }
	.mkd-tools--layer > .mkd-szp-row .mkd-szp-now { display: none; }
	.mkd-tools--layer > .mkd-szp-row .mkd-szp { min-height: 0; border-radius: 12px; gap: 2px; }
	.mkd-tools--layer > .mkd-szp-row .mkd-szp b { font-size: 14px; }
	.mkd-tools--layer > .mkd-szp-row .mkd-szp span { font-size: 12px; }
	.mkd-tools--layer > .mkd-szp-row .mkd-szp.is-on { background: var(--mk-yellow-tint, #FFF4CC); border: 2px solid var(--mk-navy); color: var(--mk-navy); }
	.mkd-tools--layer > .mkd-szp-row .mkd-szp.is-fix { background: var(--mk-yellow, #F5B301); border-color: var(--mk-yellow, #F5B301); }

	/* Price bar: price and print area on one line, the print type chip under them, Preview & buy. */
	.mkd-buy { box-sizing: border-box; height: calc(var(--mkd-buy-h) + env(safe-area-inset-bottom)); min-height: 0; gap: 10px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)) 16px; }
	.mkd-price { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; row-gap: 4px; min-width: 0; }
	.mkd-price__amount { font-size: 21px; line-height: 24px; white-space: nowrap; }
	.mkd-price__note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
	.mkd-method-chip { grid-column: 1 / -1; justify-self: start; max-width: 100%; min-height: 32px; margin: 0; gap: 6px; padding: 0 8px; font-size: 13px; }
	.mkd-method-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.mkd-chip-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--mk-line-strong); background: conic-gradient(#FF5F6D, #FFC371, #7CFFCB, #5EC8FF, #B983FF, #FF5F6D); }
	.mkd-chip-dot.is-thread { background: repeating-linear-gradient(45deg, #10243E 0 3px, #F5B301 3px 6px); }
	.mkd-preview-btn { flex: 0 0 auto; min-width: 150px; min-height: 48px; }

	/* Style (font, colour, curve) and the print type: sheets under the design, which stays in view above
	   them (zoomed to the layer for Style). The pills and messages step aside. */
	.mkd.is-sheet .mkd-sides, .mkd.is-sheet .mkd-msgs, .mkd.is-sheet .mkd-size-now { display: none !important; }
	.mkd:not(.is-typing) #dock-text { position: relative; box-sizing: border-box; flex: 0 0 46%; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 8px; border-radius: 20px 20px 0 0; border-top: 1px solid var(--mk-line); }
	.mkd:not(.is-typing) #dock-text[hidden] { display: none; }
	.mkd:not(.is-typing) #dock-text > .mkd-dock__bar { position: absolute; top: 12px; right: 16px; }
	.mkd:not(.is-typing) #dock-text .mkd-type { display: none; }
	.mkd:not(.is-typing) #dock-text .mkd-segs { margin: 0 92px 8px 0; flex: none; }
	.mkd:not(.is-typing) #dock-text .mkd-dock__done { min-height: 46px; padding: 0 18px; }
	#dock-text .mkd-szp-row--dock { display: none !important; }
	#dock-text .mkd-pane:not([hidden]) { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
	#dock-text .mkd-pane[data-pane="font"]:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
	#dock-text .mkd-chips { flex: none; }
	.mkd-dock .mkd-fonts { flex: 1 1 auto; min-height: 0; max-height: none; }
	.mkd-type .mkd-type__aa { display: inline-block; }
	.mkd-type svg { display: none; }

	#sheet-method { position: relative; z-index: auto; left: auto; right: auto; bottom: auto; flex: 0 0 58%; box-sizing: border-box; max-height: none; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 6px 16px calc(8px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
	#sheet-method[hidden] { display: none; }
	#sheet-method .mkd-sheet__head { flex: none; min-height: 48px; }
	#sheet-method .mkd-sheet__head .mkd-link { min-height: 44px; padding: 0 18px; border-radius: var(--mk-radius-button); background: var(--mk-yellow, #F5B301); text-decoration: none; font-size: 15px; }
	#sheet-method .mkd-methods { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
	#sheet-method .mkd-method, #sheet-method .mkd-method-fix { box-sizing: border-box; width: auto; min-width: 0; max-width: 100%; }
	#sheet-method .mkd-methods .mkd-row-label { grid-column: 1 / -1; margin: 2px 0 0; font-size: 11px; }
	#sheet-method .mkd-method { min-height: 46px; gap: 0; padding: 4px 10px; align-content: center; border-radius: 12px; }
	#sheet-method .mkd-method.is-best { grid-column: 1 / -1; }
	#sheet-method .mkd-method__head { display: block; font-size: 14px; line-height: 1.2; }
	#sheet-method .mkd-method__name { display: flex; gap: 8px; min-width: 0; }
	#sheet-method .mkd-method__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	#sheet-method .mkd-method__name strong small { font-size: 10px; font-weight: 400; color: var(--mk-text-muted); }
	#sheet-method .mkd-method__head em { display: block; padding-left: 26px; font-size: 12px; font-weight: 400; color: var(--mk-text-muted); }
	#sheet-method .mkd-method__desc, #sheet-method .mkd-method__limit { display: none; }
	#sheet-method .mkd-method:disabled .mkd-method__desc { display: block; padding-left: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.3; }
	#sheet-method .mkd-method-fix { grid-column: 1 / -1; margin: 0; min-height: 40px; padding: 4px 12px; }
	#sheet-method .mkd-method-about { flex: none; margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--mk-panel); font-size: 12px; line-height: 1.3; max-height: calc(2.6em + 12px); box-sizing: border-box; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	#sheet-method .mkd-method-about:empty { display: none; }
}

/* Close up (a chest or sleeve on a phone): the whole product, the spot marked, in the canvas's corner (markInset). */
.mkd-inset { display: none; position: absolute; left: 8px; top: 8px; width: 48px; height: 56px; border-radius: 10px; background: #fff; box-shadow: 0 1px 4px rgba(16, 36, 62, .18); pointer-events: none; }
.mkd.is-close .mkd-inset { display: block; }
.mkd.is-typing .mkd-inset { display: none; }
