/* Mockup generator (components/mockups.js). Uses the shared tokens; 8 px corners and 48 px targets everywhere in this screen. */
.mk .card, .mk .note, .mk .btn { border-radius: 8px; }
.mk .btn { min-height: 48px; }
.mk-card h3 { margin-bottom: 12px; }
.mk-drop { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px; border: 2px dashed var(--line); border-radius: 8px; background: var(--bg); }
.mk-drop.over { border-color: var(--brand); background: #e6f2ee; }
.mk-drop .meta { flex: 1 1 220px; margin: 0; }
.mk-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.mk-file:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.mk-drop label.btn { cursor: pointer; }
.mk-file-info { margin: 10px 0 0; overflow-wrap: anywhere; }
.mk .note { margin: 10px 0 0; }
.note.ok { background: #e3f4e8; border-color: #b9e0c4; }

.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mk-chip { min-height: 48px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; }
.mk-chip[aria-pressed="true"] { border-color: var(--brand); background: #e6f2ee; color: var(--brand); }
.mk-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
.mk-sw { width: 48px; height: 48px; padding: 0; display: grid; place-items: center; background: none; border: 0; border-radius: 8px; }
.mk-sw i { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 2px solid #c9ccd1; }
.mk-sw[aria-pressed="true"] i { outline: 3px solid var(--brand); outline-offset: 2px; }
.mk-colname { margin-left: 8px; }

.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-view { display: block; width: 100%; max-width: 560px; height: auto; aspect-ratio: 1; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: #fbf8f1; }

.mk-stage { position: relative; overflow: hidden; width: 100%; max-width: 460px; margin: 0 auto; border: 1.5px solid var(--line); border-radius: 8px; background: var(--c, #fff); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.mk-stage.check { background: repeating-conic-gradient(#e9e9e9 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.mk-stage:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mk-art { position: absolute; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.mk-art:active { cursor: grabbing; }
.mk-art::after { content: ""; position: absolute; inset: -14px; } /* bigger grab area for small designs and fingers */
.mk-art img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.mk-safe { position: absolute; border: 1.5px dashed rgba(31, 111, 92, .7); border-radius: 2px; pointer-events: none; }
.mk-stage.dark .mk-safe { border-color: rgba(255, 255, 255, .6); }
.mk-hide { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; pointer-events: none; font-size: 12px; font-weight: 700; color: var(--ink); background: repeating-linear-gradient(45deg, rgba(20, 22, 26, .18) 0 6px, rgba(20, 22, 26, .07) 6px 12px); }
.mk-hide span { background: rgba(255, 255, 255, .85); padding: 1px 6px; border-radius: 4px; writing-mode: vertical-rl; transform: rotate(180deg); }
.mk-hint { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--ink-2); font-size: 14px; pointer-events: none; }
.mk-stage.dark .mk-hint { color: #e8e8e8; }
.mk-cap { margin: 8px 0 0; }

label.mk-range { margin: 10px 0 0; }
.mk input[type=range] { width: 100%; min-height: 48px; margin: 0; accent-color: var(--brand); }
.mk-status { min-height: 8px; }

.mk-vars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mk-var { display: grid; gap: 4px; justify-items: center; padding: 6px; font-weight: 600; font-size: 13px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; min-height: 48px; }
.mk-var img, .mk-ph { display: block; width: 100%; aspect-ratio: 1; border-radius: 6px; background: #fbf8f1; }
.mk-ph { background: linear-gradient(90deg, #f1ede2, #fbf8f1, #f1ede2); }
.mk-var[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }

@media (max-width: 900px) {
  .mk-grid { grid-template-columns: 1fr; }
  .mk-grid .mk-prev { order: -1; } /* live preview first on phones */
}
@media (max-width: 600px) {
  .mk-vars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk .row > .btn { flex: 1 1 100%; }
  .mk-drop > .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .mk * { transition: none !important; } }
