@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Inter:wght@400;500;600&display=swap");

:root { --ink: #1a1a1a; --soft: #6b6b6b; --line: #ece9e4; --paper: #f6f5f2; --warn-bg: #fff1e0; --warn: #8a4b08; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #fff; color: var(--ink); font: 14px/1.45 Inter, system-ui, sans-serif; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.muted { color: var(--soft); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.warn { color: var(--warn); }
.brand { font-family: "Cormorant Garamond", serif; font-size: 24px; font-weight: 600; line-height: 1.05; }
h2.sub { margin: 22px 0 10px; font-size: 15px; font-weight: 600; }

.btn { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid #d6d3cd; background: #fff; cursor: pointer; white-space: nowrap; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.round { width: 44px; min-height: 44px; padding: 0; border-radius: 22px; font-size: 18px; }
.btn.wide { display: block; width: 100%; margin: 0 0 10px; min-height: 48px; }
.btn:disabled { opacity: .4; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Whole window, no page scroll: header, the conversation filling the rest, the input at the bottom. */
.app { height: 100dvh; display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; }
.top { flex: 0 0 auto; padding: calc(10px + env(safe-area-inset-top)) 14px 0; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.top-text { flex: 1 1 auto; min-width: 0; }
.back { width: 36px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--soft); }
.tabs { display: flex; gap: 4px; }
.tab { flex: 1 1 0; min-height: 40px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--soft); cursor: pointer; font-size: 13px; }
.tab b { color: var(--ink); font-weight: 600; margin-left: 2px; }
.tab:hover { border-bottom-color: var(--line); }
.scroll { overflow-y: auto; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

.chat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 14px 20px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14px; }
.msg.ai { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.wide { max-width: 100%; width: 100%; }
.msg.open { box-shadow: inset 3px 0 0 var(--warn); }
.msg-text { white-space: pre-wrap; }
.typing { align-self: flex-start; color: var(--soft); font-size: 13px; }

/* Pictures inside a message: they wrap, every one in view, no sideways sliding. */
.refs-group { margin-bottom: 12px; }
.refs-title { font-size: 11px; font-weight: 600; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.refs { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.ref { margin: 0; }
.ref > img { display: block; border-radius: 10px; cursor: pointer; }
.ref figcaption { font-size: 11.5px; color: var(--ink); margin-top: 4px; max-width: 320px; }
.crop { display: block; border-radius: 10px; background-color: #eee; background-repeat: no-repeat; cursor: pointer; }

.big { position: relative; display: inline-block; max-width: 100%; cursor: pointer; }
.big img { display: block; max-width: 100%; max-height: 62dvh; border-radius: 12px; }
.box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55); border-radius: 4px; pointer-events: none; }
.box-tag { position: absolute; top: 2px; left: 2px; min-width: 18px; padding: 0 5px; border-radius: 6px; background: #fff; font-size: 11px; font-weight: 600; text-align: center; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }

.foot { flex: 0 0 auto; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.status { padding: 8px 16px 0; color: var(--soft); min-height: 26px; }
.chat-input { display: flex; gap: 8px; padding: 6px 12px 12px; }
.chat-input input { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 16px; border: 0; border-radius: 23px; background: var(--paper); outline: none; font-size: 15px; }

/* The view of the work, outside the chat: full-screen sheets. */
.overlay { position: fixed; inset: 0; z-index: 20; background: #fff; display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; }
.overlay-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--line); }
.overlay-body { flex: 1 1 auto; min-height: 0; padding: 14px; }
.add-body { padding-top: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile, .pick { position: relative; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.tile img, .pick img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--paper); }
.tile .no { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(255,255,255,.92); font-size: 11.5px; display: flex; align-items: center; justify-content: center; }
.tile .st { display: block; margin-top: 4px; font-size: 11.5px; color: var(--soft); }
.tile.asking .st, .tile.error .st { color: var(--warn); }
.tile.queued img { opacity: .55; }
.pick .n { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.pick.taken img { opacity: .35; }
.pick.on img { outline: 3px solid var(--ink); outline-offset: -3px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.card.off { opacity: .6; }
.card-name { display: block; margin: 10px 0 2px; padding: 0; border: 0; background: none; text-align: left; font-weight: 600; font-size: 15px; cursor: pointer; }
.card-meta { font-size: 12px; color: var(--soft); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; background: var(--warn-bg); color: var(--warn); }
.item-row { padding: 10px 0; border-top: 1px solid var(--line); }
.item-row .what { font-weight: 600; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rules li { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 12px; border-radius: 12px; background: var(--paper); }
.rules li span { flex: 1 1 auto; }
.x { width: 32px; height: 32px; border: 0; border-radius: 16px; background: none; color: var(--soft); cursor: pointer; font-size: 16px; }

/* The list of ministores. */
.page { flex: 1 1 auto; min-height: 0; padding: 16px 14px; }
.new-gallery { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--paper); margin-bottom: 18px; }
.new-gallery label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--soft); }
.new-gallery input { height: 44px; padding: 0 14px; border: 1px solid #d6d3cd; border-radius: 12px; font-size: 15px; color: var(--ink); background: #fff; }
.gallery-row { display: flex; flex-direction: column; gap: 2px; padding: 14px 4px; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 13px; max-width: 90vw; }

.login { display: flex; align-items: center; justify-content: center; }
.login-box { width: min(340px, 90vw); display: flex; flex-direction: column; gap: 12px; }
.login-box label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--soft); }
.login-box input { height: 44px; padding: 0 14px; border: 1px solid #d6d3cd; border-radius: 12px; font-size: 15px; color: var(--ink); }

/* The card as the customer sees it, inside a message. */
.card-view { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.cv-photo img { display: block; height: 300px; max-width: 100%; border-radius: 12px; background: #000; cursor: pointer; }
.cv-info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cv-name { font-size: 16px; font-weight: 600; }
.cv-price { font-size: 15px; font-weight: 600; }
.cv-row { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 18px; background: #fff; font-size: 12.5px; }
.swatch img { width: 28px; height: 28px; object-fit: cover; border-radius: 14px; }
.swatch .dot { width: 28px; height: 28px; border-radius: 14px; background: var(--line); }
.size { padding: 4px 10px; border: 1px solid #d6d3cd; border-radius: 14px; background: #fff; font-size: 12.5px; }
.ref.dropped img { opacity: .35; }
.shop { display: flex; gap: 10px; align-items: flex-start; }
.shop-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.shop-tile { display: block; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.shop-tile img { display: block; width: 100%; object-fit: cover; border-radius: 14px; }
.shop-name { display: block; margin-top: 6px; font-size: 13px; color: #2a2a2a; }
.shop-price { display: block; font-size: 14px; font-weight: 600; }

/* A phone-sized window on the real customer page (390 × 844, shown smaller). */
.phone-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 10px; }
.phone-side { flex: 1 1 220px; min-width: 0; }
.phone { flex: 0 0 auto; width: 254px; height: 549px; padding: 8px; border-radius: 34px; background: #111; box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden; }
.phone iframe { width: 390px; height: 844px; border: 0; border-radius: 28px; background: #fff; transform: scale(.6103); transform-origin: 0 0; }
.phone-center { display: flex; justify-content: center; }
.phone.big-phone { width: 342px; height: 732px; padding: 10px; border-radius: 44px; }
.phone.big-phone iframe { transform: scale(.8256); border-radius: 36px; }

/* Completing a card: the customer's card at about 60% of the width, the ways to make a photo beside it. */
.app.working { max-width: 1100px; }
.work { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 12px 14px 6px; height: min(58vh, 640px); border-bottom: 1px solid var(--line, #e7e4de); }
.preview { position: relative; min-width: 0; height: 100%; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px #e7e4de; }
.pv { position: absolute; inset: 0; }
.pv iframe { width: 100%; height: 100%; border: 0; display: block; }
.tools { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tools-title { font-size: 12px; color: #6b6b6b; letter-spacing: .3px; text-transform: uppercase; }
.tool { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid #e0ddd6; border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.tool:hover { border-color: #1a1a1a; }
.tool b { font-size: 14.5px; font-weight: 600; }
.tool span { font-size: 12px; color: #6b6b6b; line-height: 1.3; }
.make-note { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 6px; font-size: 13px; }
.make-note input { height: 44px; padding: 0 14px; border: 1px solid #e0ddd6; border-radius: 12px; font-size: 14px; }
@media (max-width: 560px) { .work { height: 52vh; gap: 8px; padding: 8px 8px 4px; } .tool { padding: 9px 10px; } .tool span { display: none; } }

/* The preview is a vertical phone, 9:16 (390 × 693 points), shown smaller to fit. */
.preview { height: 100%; aspect-ratio: 9 / 16; border-radius: 22px; background: #111; padding: 6px; box-shadow: none; }
.pv { position: absolute; inset: 6px; overflow: hidden; border-radius: 17px; background: #fff; }
.pv iframe { width: 390px; height: 693px; transform-origin: 0 0; }

/* --- Mockup 3/12: the draft showcase in a phone is the work table ------------------------------- */
.mk { height: 100dvh; display: flex; flex-direction: column; max-width: 1180px; margin: 0 auto; }
.mk-top { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.mk-main { flex: 1 1 auto; min-height: 0; display: flex; gap: 24px; padding: 16px; }
.mk-phone-wrap { flex: 0 0 auto; height: 100%; display: flex; }
.mk-phone { height: 100%; aspect-ratio: 9 / 16; padding: 8px; border-radius: 30px; background: #111; }
.mk-screen { height: 100%; overflow-y: auto; scrollbar-width: none; border-radius: 23px; background: #fff; position: relative; }
.mk-screen::-webkit-scrollbar { display: none; }
.mk-shop { padding: 18px 12px 0; text-align: center; font-family: "Cormorant Garamond", serif; font-size: 24px; font-weight: 600; }
.mk-sub { padding: 2px 12px 12px; text-align: center; font-size: 11px; color: var(--soft); }
.mk-cols { display: flex; gap: 8px; padding: 0 8px 16px; align-items: flex-start; }
.mk-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mk-look img { display: block; width: 100%; border-radius: 12px; background: var(--paper); }
.mk-tags { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.mk-tag { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: left; font-size: 10.5px; line-height: 1.25; cursor: pointer; }
.mk-tag b { flex: 0 0 auto; }
.mk-tag.on, .mk-item.on { border-color: var(--ink); }
.mk-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 4px; border-bottom: 1px solid var(--line); font-family: "Cormorant Garamond", serif; font-weight: 600; }
.mk-back { border: 0; background: none; cursor: pointer; font: 500 13px Inter, sans-serif; }
.mk-frame { position: relative; height: 62%; background: #000; }
.mk-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mk-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.mk-label { position: absolute; left: 6px; bottom: 6px; display: flex; flex-direction: column; padding: 5px 8px; border-radius: 9px; background: rgba(255,255,255,.93); font-size: 11.5px; }
.mk-label b { font-size: 13px; }
.mk-row { display: flex; gap: 6px; padding: 8px 10px 0; flex-wrap: wrap; }
.mk-sw { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px #d6d6d6; }
.mk-sw img { width: 100%; height: 100%; object-fit: cover; }
.mk-size { min-width: 34px; padding: 5px 9px; border: 1px solid #d6d6d6; border-radius: 14px; text-align: center; font-size: 11px; }
.mk-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.mk-h { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.mk-doubt { display: flex; gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: var(--warn-bg); font-size: 13px; }
.mk-doubt img { width: 54px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; flex: 0 0 auto; }
.mk-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; margin-bottom: 6px; border: 1px solid transparent; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.mk-item:hover { background: var(--paper); }
.mk-item img, .mk-item > span:first-child { width: 40px; height: 52px; object-fit: contain; background: var(--paper); border-radius: 8px; flex: 0 0 auto; }
.mk-item-t { display: flex; flex-direction: column; min-width: 0; }
.mk-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px 12px 56px; }
.mk-tools .small { width: 100%; }
.mk-talk { flex: 0 0 auto; border-top: 1px solid var(--line); }
.mk-last { padding: 10px 16px 0; font-size: 13px; color: var(--soft); max-height: 3.2em; overflow: hidden; }
@media (max-width: 760px) {
  .mk-main { flex-direction: column; overflow-y: auto; }
  .mk-phone-wrap { height: auto; justify-content: center; }
  .mk-phone { height: 70vh; }
}

.mk-look { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.mk-cap { display: block; padding: 6px 2px 0; font-size: 10.5px; line-height: 1.3; color: #2a2a2a; }
.mk-count { position: absolute; top: 6px; right: 6px; padding: 2px 7px; border-radius: 9px; background: rgba(255,255,255,.9); font-size: 10px; }
.mk-frame { height: 55%; }
.mk-prods { padding: 4px 10px 14px; }
.mk-prod { padding: 9px 0; border-bottom: 1px solid var(--line); }
.mk-prod-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mk-chip { padding: 3px 8px; border: 1px solid #d6d6d6; border-radius: 12px; font-size: 10.5px; }
.mk-tool-p { width: 100%; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 2px 0; }
.mk-tags-all { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mk-ct { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border: 1px solid #d6d3cd; border-radius: 4px 14px 14px 4px; background: #fff; font-size: 13px; cursor: grab; user-select: none; }
.mk-ct.noprice { border-style: dashed; }
.mk-ct i { color: var(--warn); font-style: normal; font-size: 11px; }
.mk-ct small { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--paper); color: var(--soft); text-align: center; font-size: 11px; }
.mk-ct.small { font-size: 12px; padding: 3px 4px 3px 8px; cursor: default; }
.mk-ct.edit { cursor: default; border-color: var(--ink); }
.mk-ct.edit input { width: 90px; height: 30px; padding: 0 8px; border: 1px solid #d6d3cd; border-radius: 8px; }
.mk-ct.edit input + input { width: 52px; }
.mk-ct.edit .btn { min-height: 30px; }
.mk-x { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--soft); cursor: pointer; }
.mk-x:hover { background: var(--paper); color: var(--ink); }
.mk-item { cursor: default; align-items: flex-start; }
.mk-thumb { padding: 0; border: 0; background: none; cursor: pointer; flex: 0 0 auto; }
.mk-thumb img { width: 48px; height: 64px; object-fit: contain; background: var(--paper); border-radius: 8px; display: block; }
.mk-in { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.drop-on { outline: 2px dashed var(--ink); outline-offset: 2px; border-radius: 12px; }
.mk-faded { opacity: .22; }
.mk-ct.focus { background: var(--ink); color: #fff; border-color: var(--ink); }
.mk-ct.focus small { background: rgba(255,255,255,.2); color: #fff; }

/* --- Mockup «cartellini»: one card at a time, tags by hand, fast on the phone ---------------------- */
.q { height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.q-top { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 6px; }
.q-strip { flex: 0 0 auto; display: flex; gap: 6px; padding: 4px 12px 8px; overflow-x: auto; scrollbar-width: none; }
.q-strip::-webkit-scrollbar, .q-row::-webkit-scrollbar { display: none; }
.q-th { position: relative; flex: 0 0 auto; width: 44px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 10px; background: var(--paper); overflow: hidden; cursor: pointer; }
.q-th img { width: 100%; height: 100%; object-fit: contain; display: block; }
.q-th span { position: absolute; left: 2px; bottom: 2px; padding: 0 4px; border-radius: 6px; background: rgba(255,255,255,.9); font-size: 10px; }
.q-th.on { border-color: var(--ink); }
.q-th.done::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #2f8a4f; }
.q-photo { position: relative; flex: 1 1 auto; min-height: 0; background: #000; }
.q-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.q-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.q-count { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 9px; background: rgba(255,255,255,.9); font-size: 11px; }
.q-on { flex: 0 0 auto; padding: 10px 12px 4px; }
.q-label { margin: 0 0 6px; font-size: 11px; color: var(--soft); letter-spacing: .2px; }
.q-hint { margin: -2px 0 8px; padding: 6px 10px; border-radius: 10px; background: #fbf3e2; font-size: 12px; color: #7a5200; }
.q-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.q-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 8px 0 12px; border: 1px solid #d6d3cd; border-radius: 4px 18px 18px 4px; background: #fff; font-size: 14px; white-space: nowrap; cursor: pointer; user-select: none; -webkit-user-select: none; }
.q-tag b { font-weight: 600; }
.q-tag.q-add { padding: 0 14px; border-style: dashed; border-radius: 18px; color: var(--soft); }
.q-tag.here { background: var(--ink); border-color: var(--ink); color: #fff; }
.q-tray { flex: 0 0 auto; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)) 12px; border-top: 1px solid var(--line); }
.q-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-right: 12px; }
.q-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.35); }
.q-sheet-box { width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: #fff; }
.q-view-box { height: 92dvh; }
.q-sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.q-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.q-chip { min-height: 40px; padding: 0 14px; border: 1px solid #d6d3cd; border-radius: 20px; background: #fff; font-size: 14px; cursor: pointer; }
.q-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.q-input { width: 100%; height: 44px; margin: 0 0 14px; padding: 0 14px; border: 1px solid #d6d3cd; border-radius: 12px; font-size: 16px; }
.q-plus { display: flex; align-items: center; justify-content: center; border: 1px dashed #c9c5bd; background: #fff; font-size: 22px; color: var(--soft); }
.q-main { position: absolute; left: 8px; bottom: 8px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: rgba(255,255,255,.92); font-size: 12px; cursor: pointer; }
.q-main.is { background: var(--ink); color: #fff; cursor: default; }
.q-sz { font-style: normal; font-size: 12px; color: var(--soft); }
.q-tag.here .q-sz { color: rgba(255,255,255,.7); }
.q-dash { border-style: dashed; color: var(--soft); }
.q-chip.small { min-height: 34px; padding: 0 10px; font-size: 13px; }
.q-pick { margin: 4px 0 14px; padding: 10px; border-radius: 14px; background: var(--paper); }
.q-chip.out { border-style: dashed; color: var(--soft); text-decoration: line-through; background: #fff; }
.q-tag.part { border-style: dashed; }
.q-miss { font-style: normal; font-size: 11.5px; color: var(--warn); }
.q-field { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 0 0 8px; padding: 0 14px; border: 1px solid #d6d3cd; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; font-size: 15px; }
.q-field.open { border-color: var(--ink); }
.q-field-l { flex: 0 0 64px; font-size: 12px; color: var(--soft); }
.q-field-v { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.q-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.q-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px #cfcac2; background: #e9e6e0; }
.q-dot.one { background: conic-gradient(#b3262e, #e8c547, #2f6b45, #1f3a6b, #5e3a78, #b3262e); }
.q-dot.free { background: repeating-linear-gradient(45deg, #e9e6e0 0 3px, #cfcac2 3px 6px); }
.q-dot.out { opacity: .35; background-image: linear-gradient(135deg, transparent 45%, #1a1a1a 45% 55%, transparent 55%); }
/* the catalogue: one white block, the swatches inside it with their names, no box each */
.q-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px 2px; margin-bottom: 8px; padding: 10px 8px; border-radius: 14px; background: #fff; }
.q-swatch { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0; border: 1px solid transparent; border-radius: 10px; background: none; cursor: pointer; font-size: 10.5px; line-height: 1.15; text-align: center; }
.q-swatch .q-dot { width: 24px; height: 24px; }
.q-swatch.on { border-color: var(--ink); }
.q-swatch.out { border: 1px dashed var(--soft); color: var(--soft); text-decoration: line-through; }
/* Colours always visible on the tag, big enough to tell apart. */
.q-tag .q-dot, .mk-cap .q-dot { width: 18px; height: 18px; }
.q-field .q-dot { width: 22px; height: 22px; }
.q-dots { gap: 4px; }
.q-ref-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.q-ref-pick input { width: 52px; height: 40px; padding: 0; border: 0; background: none; }
.q-ref-photos { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.q-ref-photos img { height: 220px; border-radius: 10px; cursor: crosshair; flex: 0 0 auto; }
.q-ref-photos img { height: 90px; cursor: pointer; border: 2px solid transparent; }
.q-ref-photos img.on { border-color: var(--ink); }
.q-stage { position: relative; margin: 0 0 8px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: move; }
.q-stage img { display: block; width: 100%; border-radius: 10px; pointer-events: none; }
.q-circle { position: absolute; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
.q-stage-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.q-stage-row input[type=range] { flex: 1 1 120px; }
.q-dot.q-dot-big { width: 44px; height: 44px; }
.q-stage { overflow: hidden; border-radius: 10px; }
#q-pal { z-index: 25; }
.q-link { display: block; margin: 0 0 10px; padding: 0; border: 0; background: none; color: var(--soft); text-decoration: underline; font-size: 13px; cursor: pointer; }
.q-pal-row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.q-pal-row span { flex: 1 1 auto; }
.q-pal-dot { position: relative; width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px #cfcac2; cursor: pointer; overflow: hidden; }
.q-pal-dot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.q-ref-pick .q-input { margin: 0; flex: 1 1 auto; }
.q-addph { position: absolute; left: 8px; top: 8px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: rgba(255,255,255,.92); font-size: 12px; cursor: pointer; }
.q-srcs { display: flex; gap: 6px; margin-bottom: 10px; }
.q-srcs .q-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.q-src-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: calc(92dvh - 180px); overflow-y: auto; margin-bottom: 10px; }
.q-src-note { grid-column: 1 / -1; margin: 0 0 4px; }
.q-cand { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--paper); aspect-ratio: 3 / 4; overflow: hidden; cursor: pointer; }
.q-cand img { width: 100%; height: 100%; object-fit: contain; display: block; }
.q-cand.on { border-color: var(--ink); }
.q-cand .n { position: absolute; top: 4px; right: 4px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.q-srcs { flex-wrap: wrap; }
.q-make { border-style: dashed; }
.q-make-form { grid-column: 1 / -1; padding-top: 8px; }
.q-prompt { height: 76px; padding: 10px 14px; resize: none; font: inherit; }
/* The card's photos all at once: whole, the main one marked; a selected one shows its actions. */
.q-photo { background: #f3f1ec; overflow-y: auto; }
.q-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
.q-grid.many { grid-template-columns: repeat(3, 1fr); }
.q-cell { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; background: #fff; overflow: hidden; }
.q-cell.sel { box-shadow: 0 0 0 2px var(--ink); }
.q-pic { width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.q-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.q-badge { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 10.5px; }
.q-acts { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.q-acts button { flex: 1 1 0; min-height: 34px; border: 0; border-radius: 17px; background: rgba(255,255,255,.95); font-size: 12px; cursor: pointer; }
.q-acts button[data-delph] { color: #a3261e; }
.q-addcell { border: 1.5px dashed #c9c5bd; background: transparent; color: var(--soft); font-size: 14px; cursor: pointer; }
.q-big { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(0,0,0,.9); }
.q-big img { max-width: 100%; max-height: 85dvh; object-fit: contain; }
/* One big, the rest as small previews. */
.q-photo { display: flex; flex-direction: column; background: #f3f1ec; overflow: hidden; }
.q-view-big { position: relative; flex: 1 1 auto; min-height: 0; }
.q-view-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.q-view-big .q-acts { left: 8px; right: auto; bottom: 8px; }
.q-view-big .q-acts button, .q-view-big .q-badge { flex: 0 0 auto; padding: 0 12px; }
.q-view-big .q-badge { position: static; display: inline-flex; align-items: center; min-height: 34px; border-radius: 17px; font-size: 12px; }
.q-thumbs { flex: 0 0 auto; display: flex; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: none; background: #fff; border-top: 1px solid var(--line); }
.q-thumbs::-webkit-scrollbar { display: none; }
.q-tn { position: relative; flex: 0 0 auto; width: 48px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #f3f1ec; overflow: hidden; cursor: pointer; }
.q-tn img { width: 100%; height: 100%; object-fit: contain; display: block; }
.q-tn.on { border-color: var(--ink); }
.q-tn span { position: absolute; left: 2px; top: 1px; font-size: 11px; color: var(--ink); text-shadow: 0 0 3px #fff; }
.q-tn-add { border: 1.5px dashed #c9c5bd; background: #fff; color: var(--soft); font-size: 20px; }
/* Compact bar; the rest of the page keeps to the screen: the photo gives way, the tags never leave it. */
.q-top { gap: 6px; padding: calc(6px + env(safe-area-inset-top)) 10px 6px; border-bottom: 1px solid var(--line); }
.q-which { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 2px 6px; border: 0; background: none; text-align: left; cursor: pointer; }
.q-which b { font-size: 16px; }
.q-which b::after { content: " ▾"; font-weight: 400; color: var(--soft); }
.q-nav { width: 40px; min-height: 40px; font-size: 20px; }
.q-cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.q-cards-grid .q-th { width: 100%; height: auto; aspect-ratio: 3 / 4; }
.q-photo { min-height: 160px; }
.q-on { max-height: 30dvh; overflow-y: auto; }
.q-tray { flex: 0 0 auto; }
/* The photo picker: header, sources, then the photos scroll and the button always stays on screen. */
#q-src .q-sheet-box { display: flex; flex-direction: column; overflow: hidden; }
#q-src .q-sheet-top, #q-src .q-srcs, #q-src-ok { flex: 0 0 auto; }
#q-src .q-src-grid { flex: 1 1 auto; min-height: 0; max-height: none; align-content: start; }
#q-src-ok { margin: 0; }
/* Picker cells keep their 3:4 shape inside a grid of fixed height (padding sets the height, not the row). */
.q-cand { aspect-ratio: auto; height: 0; padding-bottom: 133%; }
.q-cand img { position: absolute; inset: 0; }
.q-make-foot { flex: 0 0 auto; padding-top: 8px; border-top: 1px solid var(--line); }
.q-make-foot p { margin: 0 0 6px; }
.q-kinds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.q-kinds .q-chip { flex: 0 0 auto; }
.q-make-foot .q-prompt { height: 56px; margin-bottom: 8px; }
.q-make-foot .btn.wide { margin: 0; }
.q-ai-btn { position: fixed; right: max(14px, calc(50vw - 246px)); bottom: calc(130px + env(safe-area-inset-bottom)); z-index: 15; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; }
.q-ai-log { max-height: 30dvh; overflow-y: auto; margin-bottom: 8px; }
.q-ai-me { margin: 6px 0; padding: 8px 12px; border-radius: 14px; background: var(--paper); font-size: 14px; }
.q-ai-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.q-ai-form .q-input { margin: 0; }
#q-ai-hints .q-chip { text-align: left; }
.q-thumbs .q-ai-btn { position: static; margin-left: auto; flex: 0 0 auto; align-self: center; box-shadow: none; }
.q-shoplink { display: inline-flex; align-items: center; }
.q-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; padding: 24px; text-align: center; color: var(--soft); }

/* Mockup (3/12): associate the tags that are the same product, one kind at a time, four per screen. */
.a-page .q-which { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; text-align: left; }
.a-kinds { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 12px 8px; }
.a-kind { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; font-size: 13px; }
.a-kind.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.a-st { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ece9e4; color: #555; font-size: 11px; font-style: normal; }
.a-st.ok { background: #e3efe5; color: #2f6b45; }
.a-st.bad { background: #c0392b; color: #fff; }
.a-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px; }
.a-cell { display: flex; flex-direction: column; min-height: 0; padding: 6px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; }
.a-cell.set { border-color: #cfc9be; }
.a-cell.bad { border-color: #c0392b; }
.a-ph { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 10px; background: var(--paper); overflow: hidden; cursor: pointer; }
.a-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.a-letter { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.a-cell.bad .a-letter { background: #c0392b; }
.a-n { position: absolute; top: 6px; right: 6px; padding: 2px 7px; border-radius: 9px; background: rgba(255,255,255,.9); font-size: 10.5px; }
.a-cap { display: flex; justify-content: space-between; gap: 6px; padding: 5px 2px 0; font-size: 13px; }
.a-cap.small { padding-top: 0; font-size: 11px; }
.a-ls { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 5px; }
.a-l { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #d6d3cd; background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
.a-l.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.a-new { color: var(--soft); font-weight: 400; font-size: 17px; }
.a-pager { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 0; }
.a-sum { flex: 0 0 auto; max-height: 24dvh; overflow-y: auto; padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.a-row { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; font-size: 13px; }
.a-row span { color: var(--soft); }
.a-row.bad span { color: #c0392b; }
.a-title b::after { content: none; }
.a-single { flex: 1 1 100%; margin: 2px 2px 0; font-size: 11.5px; color: var(--soft); }
/* Tags of one letter stacked like cards on the first one. */
.a-cell.stack { position: relative; box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 #cfc9be; }
.a-cell.stack.s3 { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 #cfc9be, 8px 8px 0 -1px #fff, 8px 8px 0 0 #ddd8cf; }
.a-cell.stack.bad { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 #c0392b; }
.a-cell.stack.bad.s3 { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 #c0392b, 8px 8px 0 -1px #fff, 8px 8px 0 0 #e0a59e; }
.a-grid { padding-right: 18px; }
.a-bad { color: #c0392b; }
.a-openbtn { min-height: 32px; font-size: 13px; }
.a-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.a-item img { width: 54px; height: 72px; object-fit: contain; border-radius: 8px; background: var(--paper); flex: 0 0 auto; }
.a-item > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.a-item .a-ls { padding: 0; flex: 0 0 auto; max-width: 50%; justify-content: flex-end; }
.a-alert { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.45); }
.a-alert-box { width: 100%; max-width: 380px; padding: 18px 16px 8px; border-radius: 18px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.a-alert-head { font-weight: 600; color: #c0392b; margin-bottom: 6px; }
.a-alert-box p { margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.a-none { grid-column: 1 / -1; margin: 20px 4px; color: var(--soft); text-align: center; }
.q-next-step { display: flex; align-items: center; justify-content: center; margin-top: 12px; text-decoration: none; }
textarea.q-input { font: inherit; resize: none; }

/* Two tags with the same name in a card (5/12): fixed together in one sheet. */
.q-tag.q-warn { border-color: #d9a441; background: #fff8e8; color: #7a5410; border-radius: 18px; }
.q-same-row { padding: 10px 0; border-bottom: 1px solid #eee; }
.q-same-row:last-child { border-bottom: 0; margin-bottom: 8px; }
.q-same-tag { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 14px; }

/* Controllo (5/12): the check before publishing. */
.a-next { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; margin: 0 14px calc(10px + env(safe-area-inset-bottom)); min-height: 46px; text-decoration: none; }
.r-page { display: flex; flex-direction: column; height: 100dvh; }
.r-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 14px calc(24px + env(safe-area-inset-bottom)); }
.r-box { margin-bottom: 14px; }
.r-box.warn { padding: 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }
.r-prob { margin-top: 6px; }
.r-prob a { color: inherit; font-weight: 600; }
.r-run { display: flex; align-items: center; gap: 10px; padding: 14px 0 4px; font-size: 15px; }
.r-spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: r-spin 1s linear infinite; }
@keyframes r-spin { to { transform: rotate(360deg); } }
.r-err { color: #a3261b; }
.r-q, .r-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.r-tech { margin-top: 8px; }
.r-tech summary { cursor: pointer; padding: 4px 0; }
.r-tech .r-desc { margin-top: 6px; }
.r-q.done { opacity: .55; }
.r-q p { margin: 8px 0; }
.r-tags { display: flex; flex-wrap: wrap; gap: 8px; }
button.r-tag { background: #fff; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.r-tag { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid #e2ddd4; border-radius: 10px; color: inherit; text-decoration: none; font-size: 12.5px; line-height: 1.3; }
.r-tag img { width: 40px; height: 52px; object-fit: cover; border-radius: 6px; }
.r-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.r-acts a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.r-label { display: block; margin: 8px 0 6px; }
.r-desc { width: 100%; box-sizing: border-box; }
.r-desc { height: auto; min-height: 8.5em; line-height: 1.45; padding-top: 8px; padding-bottom: 8px; }
.q-same-off { margin-top: 6px; padding: 4px 0; border: 0; background: none; color: #a3261b; font-size: 12.5px; cursor: pointer; }
/* Publish box at the end of the check */
.r-pub { margin-top: 18px; }
.r-inner { display: grid; gap: 8px; margin-bottom: 12px; }
.r-way { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.r-way b { display: block; font-size: 14px; }
.r-way span { font-size: 12px; color: #6b6b6b; }
.r-way.on { border-color: #1a1a1a; box-shadow: 0 0 0 1px #1a1a1a; }
/* Choosing photos: the ring chooses without opening; a tap opens the photo big (5/12) */
.q-ring { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.18); box-shadow: 0 0 3px rgba(0,0,0,.35); }
.q-cand .n { pointer-events: none; top: 6px; right: 6px; z-index: 1; }
.q-cand.on .q-ring { background: var(--ink); }
.q-view { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #111; }
.q-view[hidden] { display: none; }
.q-vtop { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
.q-vcount { color: #ddd; font-size: 14px; padding-right: 6px; }
.q-vtrack { flex: 1 1 auto; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.q-vtrack::-webkit-scrollbar { display: none; }
.q-vslide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.q-vslide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.q-varrow { position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 30px; cursor: pointer; }
.q-varrow.l { left: 0; border-radius: 0 12px 12px 0; }
.q-varrow.r { right: 0; border-radius: 12px 0 0 12px; }
@media (hover: none) { .q-varrow { display: none; } }
.q-vfoot { flex: 0 0 auto; display: grid; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
.q-vpick { background: #fff; }
.q-vpick.on { background: #e8f3e8; border-color: #2e7d32; color: #1b5e20; }
.q-vpick { background: transparent; border: 1.5px solid #fff; color: #fff; }
.q-vpick.on { background: #e8f3e8; border-color: #e8f3e8; color: #1b5e20; }
.q-vadd { background: #fff; border-color: #fff; color: #111; font-weight: 600; }
.q-vadd[hidden] { display: none; }
/* The card's tags lie on the photo itself (5/12): on the photo = in the card; the tray below = to take from */
.q-view-big { container-type: size; }
.q-fit { position: absolute; inset: 0; margin: auto; }
.q-fit img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-onph { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-height: calc(100% - 64px); overflow-y: auto; scrollbar-width: none; }
.q-onph .q-tag { min-height: 36px; font-size: 13.5px; border-color: transparent; background: rgba(255,255,255,.96); box-shadow: 0 2px 10px rgba(0,0,0,.22); }
.q-onph .q-tag.q-add { background: rgba(255,255,255,.82); border: 1.5px dashed #1a1a1a; color: #1a1a1a; box-shadow: none; }
.q-onph .q-tag.q-warn { border-color: #d9a441; background: #fff8e8; }
.q-tag.here { background: #f3f1ec; border-color: #e2ddd4; color: #8a8a8a; }
.q-tag.here .q-sz { color: #a8a39a; }
.q-in { font-size: 11.5px; color: #2e7d32; margin-right: 2px; }
.q-fab { font-style: normal; font-size: 11px; color: #6b6b6b; padding: 1px 6px; border-radius: 8px; background: #f1eee8; white-space: nowrap; }
.q-tag.here .q-fab { color: #a8a39a; }
/* New tag: the button to put it on the card never leaves the view; the chosen kind folds to one chip (5/12) */
.q-okbar { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); margin: 12px -14px calc(-14px - env(safe-area-inset-bottom)); padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 14px -10px rgba(0,0,0,.25); }
.q-namehint { align-self: center; margin-left: 4px; }
.q-chip-off { color: #a3261e; }
.q-chip-dots { display: inline-flex; align-items: center; gap: 6px; }
#q-new [hidden] { display: none !important; }
#q-ok.off { background: #d9d5ce; border-color: #d9d5ce; color: #555; }
.q-chip-need { border: 1.5px dashed #1a1a1a; }
/* The card's name, on the photo before its tags (5/12) */
.q-cardname { width: 100%; max-width: 340px; height: 42px; padding: 0 12px; border: 1.5px dashed rgba(26,26,26,.55); border-radius: 10px; background: rgba(255,255,255,.88); font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 600; font-size: 21px; color: #1a1a1a; outline: 0; }
.q-cardname::placeholder { font-family: inherit; font-size: 15px; font-style: italic; font-weight: 500; color: #6b6b6b; }
.q-cardname:not(:placeholder-shown) { border-style: solid; border-color: transparent; background: rgba(255,255,255,.96); box-shadow: 0 2px 10px rgba(0,0,0,.22); }
.q-cardname:focus { border: 1.5px solid #1a1a1a; }
/* Altre schede: whole cards to copy (5/12) */
.q-src-grid.cards { grid-template-columns: 1fr 1fr; gap: 10px; }
.q-src-gal { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.q-rc { display: block; padding: 0 0 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; overflow: hidden; cursor: pointer; }
.q-rc img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--paper); }
.q-rc-n { display: block; padding: 6px 8px 0; font-size: 11.5px; color: #6b6b6b; }
.q-rc-t { display: block; padding: 2px 8px 0; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 17px; }
.q-rc-tags { display: block; padding: 2px 8px 0; font-size: 12.5px; line-height: 1.3; }
.q-cvtitle { flex: 0 0 auto; padding: 0 16px 6px; color: #fff; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 24px; }
.q-cvtags { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; max-height: 30dvh; overflow-y: auto; }
#q-src-ok[hidden] { display: none; }
/* Making a photo from inside the card (6/12) */
.q-tn-make { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font-size: 18px; }
.q-tn-make small { font-size: 11px; }
.q-sheet-low { background: rgba(0,0,0,.12); }
.q-sheet-low .q-sheet-box { max-height: 62dvh; }
.q-mk-refs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.q-mk-refs .q-tn.on { outline: 3px solid var(--ink); }
.q-mk-kinds { display: grid; gap: 6px; margin-bottom: 8px; }
.q-mk-kind { padding: 8px 12px; }
.q-mk-prompt { width: 100%; min-height: 84px; padding: 10px 12px; resize: vertical; font: inherit; font-size: 15px; margin-bottom: 8px; }
.q-mk-refs .q-tn.off { opacity: .35; } .q-mk-refnote { margin: 0 0 8px; }
/* «Fatto» in a picker: green and wide, it is what confirms the choice (6/12) */
.q-done { margin-top: 12px; background: #2e7d32; border-color: #2e7d32; color: #fff; font-weight: 600; min-height: 46px; }
.q-mk-tools { display: flex; gap: 6px; margin: -2px 0 10px; }
.q-mk-ins { border-color: var(--ink); font-weight: 500; }
/* Crea foto, compact: the sheet takes the room it needs, rows are one line each (6/12) */
.q-sheet-low .q-sheet-box.q-mk-box { max-height: 92dvh; padding-top: 10px; }
.q-mk-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.q-mk-top b { font-size: 16px; }
.q-mk-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.q-mk-l { flex: 0 0 38px; padding-top: 8px; font-size: 11px; letter-spacing: .3px; color: var(--soft); text-transform: uppercase; }
.q-mk-row .q-chips { margin-bottom: 0; gap: 5px; }
.q-mk-row .q-chip { min-height: 32px; padding: 0 11px; font-size: 13px; }
.q-mk-refs { display: flex; gap: 5px; flex-wrap: wrap; margin: 0; }
.q-mk-refs .q-tn { width: 38px; height: 50px; }
.q-mk-refnote { align-self: center; margin: 0; white-space: nowrap; }
.q-mk-box .q-mk-prompt { min-height: 72px; margin: 2px 0 6px; font-size: 14.5px; }
.q-mk-box .q-mk-tools { margin: 0 0 4px; }
.q-mk-box .q-mk-ins { min-height: 32px; font-size: 13px; }
.q-mk-box .q-okbar { margin-top: 6px; }
.q-mk-box .q-mk-prompt { min-height: 130px; }
/* Elimina on the photo: red, and redder when it asks for the second tap (6/12) */
.q-acts .q-act-del { color: #b3261e; }
.q-acts .q-act-del.ask { background: #b3261e; color: #fff; }
/* «Photo Model 1 · 2» at the other end of the colours button (6/12) */
.q-mk-box .q-mk-tools { align-items: center; justify-content: space-between; }
.q-mk-model { display: flex; align-items: center; gap: 8px; }
.q-mk-model .q-mk-l { flex: none; padding: 0; }
.q-seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.q-seg button { min-width: 38px; min-height: 32px; border: 0; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.q-seg button.on { background: var(--ink); color: #fff; }
/* A colour from the fabric (6/12): the photo viewer's frame, the circle on the photo, name and confirm below */
.q-fab-title { color: #fff; font-weight: 600; font-size: 15px; }
.q-tessuto .q-vtop { gap: 10px; }
.q-tessuto .q-vcount { margin-left: auto; }
.q-fab-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; touch-action: none; user-select: none; -webkit-user-select: none; cursor: move; }
.q-fab-fit { position: relative; }
.q-fab-fit img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.q-tessuto.one .q-varrow { display: none; }
.q-tessuto .q-varrow { z-index: 2; }
.q-fab-row { display: flex; align-items: center; gap: 10px; }
.q-fab-row .q-input { flex: 1 1 auto; margin: 0; }
.q-fab-dot { flex: none; width: 44px; height: 44px; box-shadow: 0 0 0 2px #fff; }
.q-fab-l { color: #ddd; font-size: 13px; flex: none; }
.q-fab-row input[type=range] { flex: 1 1 auto; }
.q-tessuto .q-done { margin-top: 2px; }
.q-swatch-fab .q-dot { display: inline-flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 0 0 1.5px var(--ink); font-size: 18px; color: var(--ink); }
.q-fab-fit { overflow: hidden; }
/* Colour from the photo: which colour it is for */
.q-fab-names { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.q-fab-names::-webkit-scrollbar { display: none; }
.q-fab-names .q-chip { flex: none; background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.q-fab-names .q-chip.on { background: #fff; color: #111; border-color: #fff; }
.q-tessuto .q-done:disabled { background: #333; border-color: #333; color: #999; }
/* Colours of a tag (6/12): a colour is a name and its swatch. Rows: swatch (touch to change), name, state, remove */
.q-dot.free { background: repeating-conic-gradient(#d9d6d0 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.q-crows { display: grid; gap: 6px; margin-bottom: 12px; }
.q-crow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: #fff; }
.q-crow b { flex: 1 1 auto; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-cico { position: relative; flex: none; display: inline-flex; padding: 0; border: 0; background: none; cursor: pointer; }
.q-cico .q-dot { width: 36px; height: 36px; }
button.q-cico::after { content: "✎"; position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 10px; line-height: 17px; text-align: center; }
.q-cseg { display: inline-flex; flex: none; border: 1px solid #d6d3cd; border-radius: 16px; overflow: hidden; }
.q-cseg button { border: 0; background: #fff; padding: 0 10px; min-height: 30px; font-size: 12px; cursor: pointer; }
.q-cseg button.on { background: var(--ink); color: #fff; }
.q-cx { flex: none; border: 0; background: none; font-size: 18px; color: var(--soft); cursor: pointer; padding: 0 4px; }
.q-swatch.in { opacity: .35; pointer-events: none; }
#q-swed { z-index: 25; }
.q-swed-box { text-align: center; }
.q-swed-big { position: relative; display: block; width: 150px; height: 150px; margin: 6px auto 8px; border-radius: 50%; box-shadow: 0 0 0 1px #cfcac2; cursor: pointer; }
.q-swed-big.free { background: repeating-conic-gradient(#d9d6d0 0 25%, #fff 0 50%) 0 0 / 18px 18px; }
.q-swed-big input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.q-swed-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0 14px; }
.q-swed-box .q-done { margin: 0; }
/* a reel among the card's photos */
.q-reelb { position: absolute; left: 10px; bottom: 64px; z-index: 2; padding: 4px 10px; border-radius: 14px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; pointer-events: none; }
.q-tn-reel { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-style: normal; line-height: 20px; text-align: center; }
.q-src-reel { grid-column: 1 / -1; }
.q-src-reel p { margin: 0 0 10px; }
.q-src-reel .q-input { height: 52px; margin: 0; }
/* Order by dragging (6/12): a visible handle on every photo, in both ways of working */
.q-drag { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; font-style: normal; color: #1a1a1a; background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.q-tn .q-drag { left: 2px; bottom: 2px; width: 20px; height: 20px; border-radius: 6px; font-size: 13px; }
.q-lift { z-index: 6; transform: scale(1.06); box-shadow: 0 10px 26px rgba(0,0,0,.28); transition: transform .12s; }
.q-mode { flex: 0 0 auto; padding: 0 10px; font-size: 13px; }
/* The page way: the card as the customer sees it (photos two by two, the touched one big; the tags below) */
.q-pg { padding: 10px 12px 24px; overflow-y: auto; height: 100%; box-sizing: border-box; background: #fff; }
.q-pg-name { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 8px 10px; border: 1.5px dashed #cfcac2; border-radius: 10px; background: #fff; font: italic 18px "Cormorant Garamond", serif; }
.q-pg-hint { margin: 2px 2px 8px; font-size: 12px; color: var(--soft); }
.q-pg-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 6px; }
.q-pg-mp { position: relative; border-radius: 10px; overflow: hidden; background: #f3f1ec; cursor: pointer; }
.q-pg-mp img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; pointer-events: none; }
.q-pg-mp.wide { grid-column: span 2; border-radius: 14px; }
.q-pg-mp.wide img { aspect-ratio: auto; object-fit: contain; }
.q-pg-mp .q-drag { left: 8px; top: 8px; width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.q-pg-n { position: absolute; left: 48px; top: 15px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: rgba(255,255,255,.9); font-size: 11px; line-height: 20px; text-align: center; }
.q-pg-star { position: absolute; right: 8px; top: 12px; padding: 2px 8px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; }
.q-pg-reel { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; }
.q-pg-acts { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.q-pg-acts button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 17px; background: rgba(255,255,255,.95); font-size: 12px; cursor: pointer; }
.q-pg-acts button[data-delph] { color: #a3261e; }
.q-pg-add { min-height: 48px; border: 1.5px dashed #c9c5bd; border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; }
.q-pg-lab { margin: 16px 2px 2px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--soft); }
.q-pg-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px 28px; align-items: center; gap: 6px; padding: 10px 2px; border-bottom: 1px solid #ece9e4; cursor: pointer; }
.q-pg-tn { font-size: 14px; }
.q-pg-tp { font-family: "Cormorant Garamond", serif; font-size: 18px; text-align: right; }
.q-pg-new { margin-top: 12px; }
/* the photo being moved: marked, not enlarged */
.q-lift { transform: none; box-shadow: 0 0 0 3px var(--ink); opacity: .75; }
/* the card's subtitle, under its name: smaller, like on the customer page */
.q-cardsub { height: 36px; font-size: 15px; font-weight: 500; }
.q-pg-name.q-cardsub { margin-top: -2px; padding: 6px 10px; }
/* The tray of tags already made: they go to a new line and scroll up and down inside a band of about three rows */
#q-tray { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow-x: hidden; overflow-y: auto; max-height: 160px; padding-bottom: 2px; scrollbar-width: auto; }
.q-tt { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; min-height: 58px; padding: 6px 10px; border: 1px solid #d6d3cd; border-radius: 4px 16px 16px 4px; background: #fff; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.q-tt1, .q-tt2 { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.q-tt-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.q-tt1 b { flex: 0 0 auto; font-size: 14px; font-weight: 600; }
.q-tt2 { font-size: 12px; color: var(--soft); overflow: hidden; }
.q-tt2 .q-dot { width: 14px; height: 14px; }
.q-tt2 .q-fab { overflow: hidden; text-overflow: ellipsis; }
.q-tt.here { background: #f3f1ec; border-color: #e2ddd4; color: #8a8a8a; }
#q-tray > .small { grid-column: 1 / -1; }
.q-sheet-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.q-del { color: #a3261e; }
.q-tray-top { display: flex; align-items: center; gap: 8px; padding-right: 12px; margin-bottom: 6px; }
.q-tray-top .q-label { flex: 1 1 auto; min-width: 0; margin: 0; }
.q-tray-new { flex: 0 0 auto; min-height: 34px; }
.q-tray[hidden] { display: none; }
.q-pg-traytop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 8px; }
.q-pg-traytop .q-pg-lab { margin: 0; }
.q-pg-tray { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.q-pg-tray > .small { grid-column: 1 / -1; }
/* tags already made: six at a time, the rest found by name (no long list) */
#q-tray { max-height: none; overflow: visible; }
.q-tray-find { height: 40px; margin: 0 12px 6px 0; width: calc(100% - 12px); }
.q-pg .q-tray-find { width: 100%; margin: 0 0 8px; }
.q-tray-more { grid-column: 1 / -1; }
.q-tray-more:empty { display: none; }
/* a ceiling: about two and a half rows, then the box scrolls inside (a bit of the next row shows there is more) */
#q-tray, .q-pg-tray { max-height: 162px; overflow-y: auto; overflow-x: hidden; scrollbar-width: auto; overscroll-behavior: contain; padding-right: 4px; }
.q-pg-tray { max-height: 228px; border-radius: 12px; }
.q-pg-newtag { display: block; width: 100%; margin-top: 10px; }
/* Photo way: the tray takes one row under the photo; open, it rises over the photo (the photo keeps its size) */
.q-tray { position: relative; height: 118px; padding: 0; z-index: 4; }
.q-tray-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 0 calc(8px + env(safe-area-inset-bottom)) 12px; background: #fff; border-top: 1px solid var(--line); }
.q-tray-in.open { border-radius: 18px 18px 0 0; border-top: 0; box-shadow: 0 -8px 28px rgba(0,0,0,.2); }
.q-tray-handle { display: flex; justify-content: center; width: calc(100% - 12px); height: 18px; padding: 6px 0 0; border: 0; background: none; cursor: grab; touch-action: none; }
.q-tray-handle i { width: 40px; height: 4px; border-radius: 2px; background: #cfcac2; }
.q-tray-top { margin-bottom: 6px; }
.q-tray-all { flex: 0 0 auto; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.q-tray-all:empty { display: none; }
.q-tray-in:not(.open) #q-tray { max-height: 58px; overflow: hidden; }
.q-tray-in:not(.open) .q-tray-find { display: none; }
.q-tray-in:not(.open) .q-tray-more { display: none; }
.q-tray-in.open #q-tray { max-height: 55vh; }
/* Photo way: the photo takes the whole width; when it is taller than the space it bleeds over the top and bottom edges */
.q-view-big { overflow: hidden; }
.q-fit-wide img { inset: auto; left: 0; top: 50%; width: 100%; height: auto; transform: translateY(-50%); object-fit: initial; }
.q-tray-empty { grid-column: 1 / -1; padding: 6px 0; }
/* The owner's path (Schede › Associa › Controllo › Pubblica), under the top bar of every step */
.q-steps { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; background: #fff; }
.q-st { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px 0 4px; border-radius: 15px; font-size: 13px; color: #8a8a8a; text-decoration: none; }
.q-st i { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #cfcac2; font-style: normal; font-size: 11px; }
.q-st.done { color: var(--ink); }
.q-st.done i { border-color: var(--ink); background: var(--ink); color: #fff; }
.q-st.on { background: #f3f1ec; color: var(--ink); font-weight: 600; }
.q-st.on i { border-color: var(--ink); }
.q-st-sep { flex: 0 0 auto; color: #cfcac2; font-size: 12px; }
.q-st-next { flex: 0 0 auto; margin-left: auto; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 13px; line-height: 32px; text-decoration: none; }
/* the next step is always in sight: the steps shrink (on a phone only the current one keeps its name) */
.q-steps { overflow: visible; gap: 8px; }
.q-st-list { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 520px) { .q-st:not(.on) .q-st-name { display: none; } .q-st:not(.on) { padding: 0 2px; } }
/* Controllo, one thing per screen: where you are and the arrows, then the screen itself. */
.r-nav { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.r-nav[hidden] { display: none; }
.r-where { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; }
.r-one { border-bottom: 0; }
.r-ask { font-size: 17px; line-height: 1.4; }
.r-parts { display: flex; flex-direction: column; gap: 6px; }
.r-part { display: block; }
.r-part .q-label { margin: 6px 0 4px; }
.r-end { margin-top: 14px; justify-content: space-between; }
.r-again { margin-top: 10px; }
.r-one.r-q.done { opacity: 1; }
.r-one.r-q.done .r-tags, .r-one.r-q.done .r-ask { opacity: .6; }
.r-part textarea.q-input { min-height: 0; }
.r-one .q-label { margin-top: 12px; }
/* Controllo: the cards a screen is about, under its buttons. */
.r-cards { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.r-card { margin-top: 10px; }
.r-card-ph { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; }
.r-card-ph a { flex: 0 0 auto; scroll-snap-align: start; }
.r-card-ph img { display: block; height: 220px; width: auto; border-radius: 8px; background: #f2f0ec; }
.r-solved { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px; background: #e7f2e7; color: #2f6b2f; font-size: 12.5px; }
.r-nav { flex-wrap: wrap; }
.r-busy { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
/* Controllo: a tag shows its colours, sizes and fabric, to read a question without opening it. */
.r-cols { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.r-col { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.r-col.out { color: var(--soft); text-decoration: line-through; }
.r-sz { display: block; margin-top: 2px; font-size: 12.5px; color: var(--soft); }
/* the colour's name in a tag row opens it, like its swatch */
.q-cname { flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; cursor: pointer; text-decoration: underline dotted #b9b3a8; text-underline-offset: 3px; }
.q-swed-name { display: block; width: 100%; margin-bottom: 10px; }
/* Pubblica: the styles beside the showcase as the customer will see it, in a phone */
.r-styles { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.r-styl { flex: 1 1 260px; min-width: 0; }
.r-phone { flex: 0 0 auto; width: 270px; height: 584px; margin: 0 auto; overflow: hidden; border: 7px solid #1a1a1a; border-radius: 30px; background: #fff; }
.r-phone iframe { width: 390px; height: 844px; border: 0; transform: scale(.6564); transform-origin: 0 0; }
.r-sgroup { margin-bottom: 12px; padding: 12px; border-radius: 14px; background: #f6f4ef; }
.r-sgroup > b { display: block; }
.r-sgroup > .small { display: block; margin-bottom: 4px; }
.r-sgroup .q-label { margin-top: 10px; }
/* Controllo: every sales sheet at a glance, and on each sheet whether the shop assistant already uses it. */
.r-alist { display: flex; flex-direction: column; margin-top: 10px; border-top: 1px solid var(--line); }
.r-arow { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.r-arow img, .r-arow > i { flex: 0 0 auto; width: 40px; height: 52px; object-fit: cover; border-radius: 6px; background: #f2f0ec; }
.r-aname { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.r-st { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; background: #f6ecd9; color: #8a5a12; font-size: 12.5px; white-space: nowrap; }
.r-st.on { background: #e7f2e7; color: #2f6b2f; }
.r-itop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.r-stmore { margin: 4px 0 10px; }
/* Settings of the shop */
.set-form .set-sec { margin-top: 10px; }
.set-logo { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.set-logo .set-l { color: var(--soft); }
.set-logo img { max-width: 200px; max-height: 80px; object-fit: contain; align-self: flex-start; background: #fff; border-radius: 8px; padding: 6px; }
.set-check { flex-direction: row !important; align-items: center; gap: 6px !important; }
.set-check input { height: auto !important; }
.set-link { word-break: break-all; margin: 0; }
.set-ok { padding: 10px 14px; border-radius: 12px; background: #e7f2e7; color: #2f6b2f; }
.set-err { padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }
.top-set { margin-left: auto; }
/* Orders */
.ord { padding: 12px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.ord-off { opacity: .55; }
.ord-top { display: flex; justify-content: space-between; align-items: center; }
.ord-st { padding: 3px 10px; border-radius: 999px; background: #f6ecd9; color: #8a5a12; font-size: 12.5px; }
.ord-st.on { background: #e7f2e7; color: #2f6b2f; }
.ord-items { margin: 4px 0; padding-left: 18px; font-size: 14px; }
/* Pubblica: online or off, and until when */
.r-online { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.r-onrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r-switch { display: flex; gap: 6px; }
.r-until { display: flex; flex-direction: column; gap: 4px; }
.r-untilrow { display: flex; gap: 8px; align-items: center; }
.r-untilrow .q-input { flex: 1 1 auto; min-height: 42px; }
.r-online p { margin: 0; }
.gal-st { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #f2efe9; color: #6b6b6b; align-self: flex-start; }
.gal-st.on { background: #e7f2e7; color: #2f6b2f; }
