/* The digital card: its own stylesheet, for its own tool.

   It does not extend the marketing page's. A card is opened by a stranger on a
   phone, usually once, and everything here serves that: large type, one
   column, and the action they came for under a thumb.

   The owner's accent arrives as --card from the page, so there is exactly one
   place it can be wrong.
*/

/* ==========================================================================
   QCARDS IDENTITY
   Its own palette, scoped to its own pages: teal into blue where Qanas is
   orange. Qanas's components are reused, recoloured through their tokens, so
   the operator pages that stay in Qanas keep Qanas's colours.
   ========================================================================== */
body.nfc-app, body.cards-body {
    --qc-1: #0FB5AE; --qc-2: #2563EB; --qc-ink: #0B2239; --qc-accent: #0E7C86;
    --grad-qc: linear-gradient(135deg, #0FB5AE 0%, #1290B5 55%, #2563EB 100%);
    --primary: #0E7C86; --primary-hover: #0B5F68; --primary-soft: #E3F5F4; --primary-text: #0B6670;
    --grad-brand: var(--grad-qc);
    --shadow-brand: 0 8px 24px rgba(18,144,181,.28);
    --teal-soft: #E8F0FE; --teal-text: #1D4ED8;
    --grad-teal: linear-gradient(135deg, #3B82F6, #2563EB);
    --shadow-teal: 0 8px 24px rgba(37,99,235,.24);
    /* QCards keeps its blue secondary buttons (style.css gives Qanas grey and orange). */
    --btn2-bg: var(--teal-soft); --btn2-text: var(--teal-text); --btn2-border: rgba(37,99,235,.24);
    --btn2-hover-bg: var(--grad-teal); --btn2-hover-text: #fff; --btn2-hover-border: transparent;
    --btn2-hover-shadow: var(--shadow-teal);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.nfc-app, :root:not([data-theme="light"]) body.cards-body {
        --primary-soft: rgba(15,181,174,.14); --primary-text: #5EEAD4;
        --teal-soft: rgba(37,99,235,.18); --teal-text: #93C5FD;
    }
}
:root[data-theme="dark"] body.nfc-app, :root[data-theme="dark"] body.cards-body {
    --primary-soft: rgba(15,181,174,.14); --primary-text: #5EEAD4;
    --teal-soft: rgba(37,99,235,.18); --teal-text: #93C5FD;
}
body.nfc-app .lang-option.active, body.nfc-app .chip.active { background: var(--qc-2); border-color: var(--qc-2); }
body.nfc-app :focus-visible, body.cards-body :focus-visible { outline-color: var(--qc-1); }
.qc-tile { display: inline-grid; place-items: center; flex: none; border-radius: 28%; color: #fff;
    background: var(--grad-qc); box-shadow: 0 6px 16px -8px rgba(37,99,235,.7); }
.qc-mark { display: block; }

/* The page the card sits on, which the main app's shell used to provide. */
.cards-body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text-on-dark); }

/* ==========================================================================
   THE DIGITAL CARD
   Opened by an NFC tap, on a phone, held at arm's length in a meeting. One
   column, large type, and the action people actually came for within reach of
   a thumb. The owner's accent colour arrives as --card from the page, so there
   is one place it can be wrong.
   ========================================================================== */
.nfc { --card: var(--qc-accent, #0E7C86); padding: 32px 16px 56px; }
.nfc-wrap { max-width: 460px; margin: 0 auto; }
.nfc-card {
    position: relative; overflow: hidden;
    border-radius: 26px; padding: 0 26px 28px; text-align: center;
    background: var(--bg-elev); color: var(--text); border: 1px solid var(--border);
    box-shadow: 0 30px 70px -34px rgba(0,0,0,.5);
}
/* A band of the owner's colour, so a company's cards look like that company's
   before a word is read. */
.nfc-top {
    height: 104px; margin: 0 -26px 0; display: flex; align-items: flex-start; justify-content: flex-start;
    padding: 14px 16px; box-sizing: border-box;
    background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--card) 55%, #000));
}
/* The owner's cover image fills the band; a soft shade at the bottom keeps
   the photo's white ring and the logo chip readable on any picture. */
.nfc-top.has-cover { background-size: cover; background-position: center; position: relative; }
.nfc-top.has-cover::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.28)); pointer-events: none; }
.nfc-top.has-cover .nfc-logo { position: relative; z-index: 1; }

/* In the corner, clear of the photo, and in its own colours: a company's logo
   is not ours to recolour. The white chip keeps a dark logo readable on any
   accent. */
.nfc-logo {
    max-height: 34px; max-width: 120px; object-fit: contain;
    padding: 6px 8px; border-radius: 10px; background: #fff;
    box-shadow: 0 4px 14px -6px rgba(0,0,0,.35);
}
.nfc-photo {
    width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
    margin: -56px auto 14px; display: block; position: relative;
    border: 4px solid var(--bg-elev); background: var(--bg);
    box-shadow: 0 8px 24px -10px rgba(0,0,0,.45);
}
/* Initials rather than a grey silhouette: a card missing its photo should
   still look like somebody's. */
.nfc-initials {
    display: grid; place-items: center; font-size: 38px; font-weight: 800; letter-spacing: .02em;
    color: #fff; background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--card) 55%, #000));
    text-transform: uppercase;
}
.nfc-name { font-size: 25px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.01em; }
.nfc-title { font-size: 15px; font-weight: 600; color: var(--card); margin: 0 0 2px; }
.nfc-company { font-size: 14.5px; color: var(--muted); margin: 0; }
.nfc-about { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 14px 0 0; }

.nfc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
/* Full width and first: saving the contact is why they tapped. */
.nfc-save {
    width: 100%; justify-content: center;
    background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--card) 62%, #000));
    border-color: transparent; color: #fff;
    box-shadow: 0 10px 26px -12px var(--card);
}
.nfc-act {
    flex: 1 1 calc(50% - 5px); display: inline-flex; align-items: center; justify-content: center;
    gap: 7px; padding: 13px 10px; border-radius: 14px; font-size: 14px; font-weight: 600;
    color: var(--text); background: var(--bg); border: 1px solid var(--border); text-decoration: none;
    transition: border-color .18s, transform .18s var(--lp-ease);
}
.nfc-act:hover { border-color: var(--card); transform: translateY(-2px); }
.nfc-act .ico { color: var(--card); flex: none; }

/* The exchange: offered, never in the way. The card above is complete without
   it, and it asks for a name plus one way to reply. */
.nfc-x {
    margin-top: 18px; border-radius: 18px; overflow: hidden;
    background: var(--bg-elev); color: var(--text); border: 1px solid var(--border);
}
.nfc-x > summary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px; cursor: pointer; list-style: none;
    font-size: 14.5px; font-weight: 600; color: var(--card);
}
.nfc-x > summary::-webkit-details-marker { display: none; }
/* The exchange is the visitor's main action: a gold button, not a quiet link. */
.nfc-x { border-color: #d9b45a; }
.nfc-x > summary { margin: 0; padding: 17px 18px; font-size: 16px; font-weight: 800; color: #2b1d00;
    background: linear-gradient(135deg, #b8862b 0%, #f1d27a 48%, #c9962f 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 18px rgba(184,134,43,.35); text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.nfc-x > summary:hover { filter: brightness(1.05); }
.nfc-x > summary:focus-visible { outline: 3px solid #8a6419; outline-offset: -3px; }
.nfc-x[open] > summary { margin-bottom: 16px; }
.nfc-x form { padding: 0 18px 20px; }
.nfc-x-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.nfc-x-grid .field { display: flex; flex-direction: column; gap: 5px; }
.nfc-x-grid .field.is-wide { grid-column: 1 / -1; }
.nfc-x-grid label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.nfc-x-grid input, .card-grid input {
    padding: 11px 13px; border-radius: 10px; font-size: 15px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.nfc-x-grid input:focus, .card-grid input:focus {
    outline: none; border-color: var(--card);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--card) 18%, transparent);
}
.nfc-x form .btn { width: 100%; justify-content: center; }
.nfc-x-note { margin: 12px 0 0; font-size: 12px; text-align: center; color: var(--muted); }

.nfc-thanks {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    margin-bottom: 18px; padding: 20px; border-radius: 18px; text-align: center;
    background: color-mix(in srgb, var(--gl-green) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--gl-green) 30%, transparent);
    color: var(--text-on-dark);
}
.nfc-thanks b { font-size: 17px; }
.nfc-thanks span:last-child { font-size: 13.5px; color: var(--muted-on-dark); }
.nfc-tick {
    display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
    color: #fff; background: var(--gl-green); margin-bottom: 4px;
}
/* The one mark of where the card came from: small, quiet, at the bottom. */
.nfc-by {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 22px auto 0; font-size: 12.5px; color: var(--muted-on-dark); text-decoration: none;
}
.nfc-by:hover { color: var(--qc-accent, #0E7C86); }
.nfc-by-mark { display: inline-flex; opacity: .8; }

/* The separate permission. Reads as a sentence, not as small print. */
.nfc-consent {
    display: flex; align-items: flex-start; gap: 10px; margin: 14px 0;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-on-dark);
    font-size: 12.5px; line-height: 1.7; color: var(--muted-on-dark); cursor: pointer;
}
.nfc-consent input { margin-top: 4px; flex: none; width: 16px; height: 16px; accent-color: var(--card, var(--qc-accent, #0E7C86)); }

/* Tag, revoke: a card with a message and at most one action. */
.nfc-plain { text-align: center; }
.nfc-plain form { margin-top: 16px; }
.nfc-state {
    display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
    color: #fff; background: var(--card, var(--qc-accent, #0E7C86)); margin: 6px auto 10px;
}
.nfc-state.is-off { background: var(--muted); }

/* ---------- The editor ---------------------------------------------------
   The link and its code come before the form: it is what people return for,
   and burying it under fifteen fields makes them hunt every time. */
.card-cols { align-items: start; }
.nfc-share h3 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.nfc-qr {
    display: grid; place-items: center; padding: 20px; margin: 16px 0;
    border-radius: 16px; background: var(--bg); border: 1px solid var(--border);
    color: var(--text);
}
.nfc-qr svg { width: 180px; height: 180px; }
.nfc-share-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.nfc-handle { margin-top: 14px; display: flex; align-items: flex-start; gap: 6px; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 20px; }
.card-grid .field { display: flex; flex-direction: column; gap: 5px; }
.card-grid .field.is-wide { grid-column: 1 / -1; }
.card-grid label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.card-grid input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
.card-grid label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-show { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 11.5px; color: var(--muted); cursor: pointer; }

/* Photo and logo, uploaded from the device. */
.card-images { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 6px; }
.card-image {
    display: flex; flex-direction: column; gap: 8px; padding: 14px;
    border: 1px dashed var(--border-strong); border-radius: 14px;
}
.card-image > label:first-of-type { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.card-image input[type="file"] { font-size: 12px; max-width: 100%; }
.card-image-preview {
    display: grid; place-items: center; width: 72px; height: 72px; border-radius: 14px;
    background: var(--bg); border: 1px solid var(--border); overflow: hidden;
}
.card-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.card-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }

/* Activating a piece: one code, one button. */
.card-activate { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; justify-content: center; }
.card-activate input { flex: 1 1 200px; max-width: 280px; font-family: ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
#pieces .card-activate { justify-content: flex-start; }

/* Send-to chips: WhatsApp, SMS, email, QR files, exports. */
.nfc-sendto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.nfc-sendto-l { font-size: 12px; font-weight: 600; color: var(--muted); margin-inline-end: 4px; }
.nfc-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
    font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none;
    background: var(--bg); border: 1px solid var(--border); cursor: pointer;
}
.nfc-chip:hover { border-color: var(--primary); color: var(--primary-text); }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head-row h3 { margin: 0; }
.card-head-row .nfc-sendto { margin-top: 0; }
.nfc-loc { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- The tool's own sections --------------------------------- */
.card-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; padding: 4px;
    border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); width: fit-content; max-width: 100%; }
.card-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px;
    font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.card-tabs a:hover { color: var(--text); background: var(--bg); }
.card-tabs a.is-on { color: var(--primary-text); background: var(--primary-soft); }
.nfc-chip.is-on { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }

/* ---------- First steps -------------------------------------------------- */
.card-checklist h3 { margin: 0; }
.card-check-pct { font-size: 13px; font-weight: 700; color: var(--primary-text); }
.card-check-bar { height: 6px; border-radius: 99px; background: var(--bg); margin: 12px 0 16px; overflow: hidden; }
.card-check-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .4s; }
.card-check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.card-check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.card-check-list li b { display: block; font-size: 13px; }
.card-check-list li small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.card-check-list li.is-done { opacity: .6; }
.card-check-list li.is-done b { text-decoration: line-through; }
.card-check-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    font-size: 12px; font-weight: 700; background: var(--bg); border: 1px solid var(--border-strong); }
.is-done .card-check-mark { background: var(--gl-green); border-color: var(--gl-green); color: #fff; }
.btn-link { background: none; border: 0; padding: 0; margin-top: 12px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; }

/* ---------- Onboarding ------------------------------------------------------ */
.card-start { max-width: 760px; margin: 0 auto; }
.card-steps { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 16px; }
.card-steps li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.card-steps li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--bg-elev); border: 1px solid var(--border-strong); font-size: 12.5px; }
.card-steps li.is-on { color: var(--text); }
.card-steps li.is-on span { background: var(--primary); border-color: var(--primary); color: #fff; }
.card-steps li.is-done span { background: var(--gl-green); border-color: var(--gl-green); color: #fff; }
.card-steps li + li::before { content: ""; width: 28px; height: 1px; background: var(--border-strong); }
.card-start-box h2 { margin: 0 0 4px; font-size: 22px; }
.card-start-photo { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; padding: 14px;
    border: 1px dashed var(--border-strong); border-radius: 14px; cursor: pointer; }
.card-start-photo .card-image-preview { border-radius: 50%; color: var(--muted); }
.card-start-photo input { margin-inline-start: auto; font-size: 12px; max-width: 220px; }
.card-start-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.card-start-carry { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; margin: 18px 0; }
.card-start-carry .nfc-qr { margin: 0; }
.card-start-wallets { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Analytics ---------------------------------------------------- */
.stats-head { margin-bottom: 16px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.stat-tile b { font-size: 30px; line-height: 1.1; }
.stat-tile span { font-size: 13px; font-weight: 600; }
.stat-tile small { font-size: 11.5px; color: var(--muted); }
.stat-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; margin-bottom: 8px;
    color: var(--primary-text); background: var(--primary-soft); }
.stat-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; margin-top: 14px; padding: 0 2px;
    border-bottom: 1px solid var(--border); }
.stat-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.stat-bar-fill { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--primary); opacity: .85; }
.stat-bar:hover .stat-bar-fill { opacity: 1; }
.stat-bar-dot { position: absolute; top: -10px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--gl-green); }
.stat-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.stat-rates { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.stat-rates b { font-size: 20px; }
.stat-rates span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 900px) {
    .card-check-list { grid-template-columns: 1fr 1fr; }
    .stat-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .card-check-list, .card-start-carry { grid-template-columns: 1fr; }
}

.nfc-wallet { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.nfc-wallet h4 { margin: 0 0 8px; font-size: 14px; }

@media (max-width: 760px) {
    .card-cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .nfc-x-grid, .card-grid, .card-images { grid-template-columns: 1fr; }
    .nfc-act { flex: 1 1 100%; }
}
/* The ways to reach the owner as one even grid, four to a row, each an icon
   with its name under it (as on a phone's contact card): every icon on the
   same line and the same size, whatever the length of its label. */
.nfc-actions { justify-content: center; }
.nfc-actions .nfc-act { flex: 0 0 calc((100% - 30px) / 4); min-width: 0; flex-direction: column; justify-content: flex-start;
    gap: 7px; padding: 12px 2px 10px; font-size: 12px; font-weight: 600; line-height: 1.2; }
.nfc-actions .nfc-act > span:not(.soc) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nfc-actions .nfc-act .soc { width: 42px !important; height: 42px !important; margin: 0; }
.nfc-actions .nfc-act .nfc-ok { position: absolute; top: 6px; inset-inline-end: 6px; }
@media (prefers-reduced-motion: reduce) {
    .nfc-act:hover { transform: none; }
}

/* ---------- Email signature -------------------------------------------- */
/* Shown on white whatever the theme: that is where it will be read. */
.sig-stage { padding: 26px; margin: 4px 0 16px; border-radius: 14px; background: #fff; border: 1px solid var(--border); overflow-x: auto; }
.sig-how { margin: 16px 0 8px; padding-inline-start: 18px; font-size: 13px; line-height: 1.9; color: var(--text-2); }

/* ---------- Integrations ------------------------------------------------- */
.int-scope { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 16px; }
.int-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.int-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.int-card .field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; }
.int-top { display: flex; gap: 12px; align-items: flex-start; }
.int-top h3 { margin: 0; }
.int-top p { margin: 2px 0 0; }
.int-top .badge { margin-inline-start: auto; }
.int-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
    font-weight: 800; font-size: 13px; color: #fff; background: #555; }
.int-hubspot { background: #FF7A59; }
.int-pipedrive { background: #1A1A1A; }
.int-webhook { background: var(--grad-qc); }
.int-last { margin: 0; }
.int-card .nfc-share-acts { margin-top: auto; }

/* ---------- Shop ---------------------------------------------------------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 12px; }
.shop-item { display: flex; flex-direction: column; gap: 6px; margin: 0; color: var(--text); text-decoration: none;
    transition: transform .18s, border-color .18s; }
.shop-item:hover { transform: translateY(-3px); border-color: var(--primary); }
.shop-item .hint { margin: 0; }
.shop-price { font-weight: 800; font-size: 16px; color: var(--primary-text); margin-top: auto; }
.shop-price.lg { font-size: 26px; margin-top: 16px; }
.shop-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.shop-points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 13.5px; }
.shop-points li { display: flex; gap: 8px; align-items: center; }
.shop-points .ico { color: var(--gl-green); }
.shop-ship-h { margin: 8px 0 0; font-size: 14px; }
.shop-status { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.shop-status select, .shop-status input { font-size: 12.5px; padding: 6px 8px; max-width: 150px; }
.card-grid .hint.is-wide { grid-column: 1 / -1; margin: -6px 0 0; }

/* The product drawings (templates/cards/_art.html). A card is 85.6 x 54 mm,
   so 1.586:1. All sizes are cqw of the .pa box, so they scale as one. */
.pa { container-type: inline-size; position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10;
    border-radius: 14px; margin-bottom: 8px; overflow: hidden;
    background: radial-gradient(120% 95% at 28% 12%, #fdfcf9 0%, #efebe3 55%, #e2ddd2 100%); }
[data-theme="dark"] .pa { background: radial-gradient(120% 95% at 28% 12%, #3a3a40 0%, #26262b 60%, #1c1c20 100%); }
/* a soft floor shadow under every piece */
.pa::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 9%; height: 7cqw; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(20,16,10,.35), transparent); filter: blur(2.5cqw); z-index: 0; }

/* ---- the cards */
.pa-card { position: relative; z-index: 1; width: 72cqw; aspect-ratio: 1.586; border-radius: 4.6cqw; padding: 5.6cqw 6cqw;
    box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
    transform: rotate(-7deg) translateY(-2cqw);
    box-shadow: 0 .55cqw 0 rgba(0,0,0,.18), 0 5cqw 8cqw -3cqw rgba(15,12,8,.55), 0 1.5cqw 2.5cqw -1cqw rgba(15,12,8,.3); }
.pa-top { display: flex; align-items: flex-start; justify-content: space-between; }
.pa-logo { display: grid; place-items: center; width: 13cqw; height: 13cqw; }
.pa-logo svg { width: 100%; height: 100%; }
.pa-logo img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 1.4cqw; }
.pa-nfc { width: 7cqw; height: 7cqw; opacity: .7; }
.pa-foot { display: flex; flex-direction: column; gap: .8cqw; min-width: 0; }
.pa-name { font-weight: 700; font-size: 5.2cqw; line-height: 1.15; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sub { font-size: 2.3cqw; font-weight: 600; letter-spacing: .28em; opacity: .65; }
/* the light that passes over the card */
.pa-shine { position: absolute; inset: -40% -60%; pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.28) 47%, rgba(255,255,255,.05) 52%, transparent 60%);
    transform: translateX(-18%); transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.shop-item:hover .pa-shine, .qc-bundle:hover .pa-shine, .shop-preview:hover .pa-shine, .qc-offer:hover .pa-shine { transform: translateX(22%); }
@media (prefers-reduced-motion: reduce) { .pa-shine { transition: none; } }

/* foils: text and marks drawn with a metallic gradient */
.pa-gold .pa-name, .pa-black .pa-name, .pa-custom .pa-name {
    background: linear-gradient(100deg, #9a7128 0%, #f3dc94 28%, #c9a046 46%, #fff1c2 58%, #b58a35 78%, #8a6420 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.pa-white .pa-name {
    background: linear-gradient(100deg, #6f747b 0%, #d9dde2 30%, #8a9097 50%, #f4f6f8 62%, #7c8289 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; }

/* pearl white with silver foil */
.pa-white .pa-card { color: #8a9097;
    background: radial-gradient(130% 120% at 15% 0%, #ffffff 0%, #f6f4ef 45%, #ebe7df 100%);
    box-shadow: 0 .55cqw 0 #d6d1c6, 0 5cqw 8cqw -3cqw rgba(15,12,8,.4), inset 0 0 0 .25cqw rgba(255,255,255,.9); }
.pa-white .pa-logo, .pa-white .pa-nfc { color: #9aa0a7; }

/* matte black with gold foil and a gold edge */
.pa-black .pa-card { color: #d8b866;
    background: radial-gradient(140% 120% at 20% 0%, #2c2c31 0%, #141416 55%, #0b0b0d 100%);
    box-shadow: 0 .55cqw 0 #000, 0 5cqw 8cqw -3cqw rgba(0,0,0,.7), inset 0 0 0 .35cqw rgba(214,175,90,.55); }
.pa-black .pa-sub { color: #c9a75a; }

/* the owner's colour, a guilloche pattern, gold foil */
.pa-custom .pa-card { color: #e6c879;
    background:
        repeating-radial-gradient(circle at 110% -10%, rgba(255,255,255,.06) 0 .35cqw, transparent .35cqw 1.6cqw),
        linear-gradient(140deg, color-mix(in srgb, var(--primary) 85%, #fff) 0%, var(--primary) 35%, color-mix(in srgb, var(--primary) 45%, #000) 100%);
    box-shadow: 0 .55cqw 0 color-mix(in srgb, var(--primary) 40%, #000), 0 5cqw 8cqw -3cqw rgba(0,0,0,.6), inset 0 0 0 .3cqw rgba(230,200,121,.45); }
.pa-custom .pa-logo img { background: #fff; padding: .8cqw; }
.pa-custom .pa-sub { color: #f1dc9f; }

/* brushed stainless steel, engraved by laser */
.pa-metal .pa-card { color: #3a3d42;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 .18cqw, rgba(0,0,0,.05) .18cqw .4cqw),
        linear-gradient(115deg, #8b8e94 0%, #e8e9ec 26%, #a2a5aa 46%, #f2f3f5 62%, #9a9da2 80%, #c9cbcf 100%);
    box-shadow: 0 .55cqw 0 #6d7075, 0 5cqw 8cqw -3cqw rgba(15,12,8,.55), inset 0 0 0 .2cqw rgba(255,255,255,.6); }
.pa-metal .pa-name, .pa-metal .pa-sub { color: rgba(38,40,44,.82); text-shadow: 0 .2cqw 0 rgba(255,255,255,.55); }
.pa-metal .pa-logo img { filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; }

/* ---- the band: matte silicone in perspective, a brushed gold plate */
.pa-bracelet { position: relative; z-index: 1; width: 62cqw; height: 34cqw; display: block; transform: rotate(-8deg) translateY(-3cqw); }
.pa-strap { position: absolute; inset: 0; border-radius: 50%; box-sizing: border-box; border: 5.4cqw solid #1b1b1e;
    box-shadow: 0 4cqw 6cqw -2.5cqw rgba(0,0,0,.6), inset 0 1cqw 1.4cqw rgba(255,255,255,.12), 0 .5cqw 0 #0c0c0e; }
.pa-strap::before { content: ""; position: absolute; inset: -5.4cqw; border-radius: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 30%); -webkit-mask: radial-gradient(closest-side, transparent 78%, #000 80%);
            mask: radial-gradient(closest-side, transparent 78%, #000 80%); }
.pa-plate { position: absolute; left: 50%; bottom: -1.6cqw; width: 18cqw; height: 9cqw; transform: translateX(-50%); border-radius: 2cqw;
    display: grid; place-items: center; color: #5a4214;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 .2cqw, transparent .2cqw .45cqw),
                linear-gradient(115deg, #a77b2c, #f0d68a 35%, #b98d3a 60%, #e9cd7d 85%, #9b7228);
    box-shadow: 0 1cqw 1.6cqw -.6cqw rgba(0,0,0,.6), inset 0 0 0 .2cqw rgba(255,255,255,.35); }
.pa-plate svg { width: 6.5cqw; height: 6.5cqw; }

/* ---- the sticker: a glossy black coin with a gold ring and mark */
.pa-coin { position: relative; z-index: 1; width: 40cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
    align-content: center; gap: .6cqw; transform: translateY(-2cqw); color: #e2c372;
    background: radial-gradient(circle at 34% 26%, #4a4a52 0%, #1b1b1f 42%, #08080a 100%);
    box-shadow: 0 .7cqw 0 #000, 0 5cqw 7cqw -2.5cqw rgba(0,0,0,.6), inset 0 0 0 1.3cqw #0d0d10, inset 0 0 0 1.75cqw #c9a14a; }
.pa-coin::before { content: ""; position: absolute; top: 9%; left: 18%; width: 44%; height: 26%; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.38), transparent); transform: rotate(-24deg); }
.pa-coin-mark svg { width: 12cqw; height: 12cqw; display: block; }
.pa-coin-word { font-size: 3.2cqw; font-weight: 700; letter-spacing: .12em;
    background: linear-gradient(100deg, #b38a36, #f3dc94 45%, #c49a42 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.shop-preview .pa { aspect-ratio: 16 / 9; }

@media (max-width: 900px) {
    .int-grid { grid-template-columns: 1fr; }
}

/* ---------- Dashboard studio: preview on one side, the form on the other -- */
.card-studio { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.card-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.card-side .card { margin: 0; }
.card-live { padding: 14px; border-radius: 20px; background: var(--bg); border: 1px dashed var(--border-strong); }
.card-live-l { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.nfc-card.is-mini { padding: 0 18px 18px; border-radius: 20px; box-shadow: 0 16px 40px -28px rgba(0,0,0,.5); }
.nfc-card.is-mini .nfc-top { height: 72px; margin: 0 -18px; }
.nfc-card.is-mini .nfc-photo { width: 78px; height: 78px; margin-top: -39px; }
.nfc-card.is-mini .nfc-name { font-size: 19px; }
.nfc-card.is-mini .nfc-actions .btn { pointer-events: none; }
.nfc-card.is-mini [hidden] { display: none !important; }
.card-live-acts { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.card-live-acts .nfc-act { padding: 8px; font-size: 12px; flex: 1 1 calc(50% - 3px); }

.card-notice { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; font-size: 13.5px; }
.card-notice b { display: block; }
.card-notice p { margin: 4px 0 10px; color: var(--muted); }
.card-notice.is-off { border-color: var(--danger, #c0392b); background: color-mix(in srgb, var(--danger, #c0392b) 6%, var(--bg-elev)); flex-direction: column; }
.card-notice.is-warn { border-color: var(--gl-orange, #e37138); flex-direction: column; }
.is-warn { color: var(--primary-text); font-weight: 600; }
.v-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700;
    color: #fff; background: var(--gl-green); }

.card-order { margin: 4px 0 18px; }
.card-order h4 { margin: 0 0 2px; font-size: 14px; }
.card-order ol { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; max-width: 420px; }
.card-order li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg);
    border: 1px solid var(--border); cursor: grab; font-size: 13.5px; }
.card-order li span:nth-child(2) { flex: 1; }
.card-order-grip { color: var(--muted); letter-spacing: -2px; }
.card-order .icon-btn { width: 28px; height: 28px; font-size: 14px; }

.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.verify-item { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--border); }
.verify-item .card-activate { margin: 0; justify-content: flex-start; }
.verify-item .card-activate input { max-width: 130px; }

.contact-mini { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.contact-mini a, .contact-mini li > span { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 9px 10px;
    border-radius: 10px; color: var(--text); text-decoration: none; }
.contact-mini a:hover { background: var(--bg); }
.contact-mini span { color: var(--muted); font-size: 13px; }
.contact-mini small { margin-inline-start: auto; color: var(--muted); font-size: 11.5px; }

/* ---------- Contacts ---------------------------------------------------- */
.contacts-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contacts-bar input[type=search] { flex: 1 1 260px; }
.contacts-bar select { max-width: 200px; }
.contacts-export { display: flex; gap: 6px; margin-inline-start: auto; }
.dup-badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
    color: var(--primary-text); background: var(--primary-soft); text-decoration: none; }
.tag-chip { display: inline-block; margin: 1px 2px; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; background: var(--bg);
    border: 1px solid var(--border); }
.contact-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 12px 0; font-size: 13.5px; }
.contact-dl dt { color: var(--muted); font-weight: 600; }
.contact-dl dd { margin: 0; }
.card textarea { width: 100%; font: inherit; }

/* ---------- Company ----------------------------------------------------- */
.co-create .card-activate { justify-content: flex-start; }
.co-create .card-activate input { max-width: 340px; letter-spacing: 0; text-transform: none; font-family: inherit; }
.co-policy { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 8px 0; border-radius: 12px;
    border: 1px solid var(--border); cursor: pointer; }
.co-policy b { display: block; font-size: 13.5px; }
.co-policy small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.co-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.co-join { max-width: 620px; margin: 0 auto; }
.admin-steps { margin: 6px 0 12px; padding-inline-start: 20px; font-size: 13px; line-height: 1.9; color: var(--text-2); }

/* ---------- Public card additions -------------------------------------- */
/* display:none, not a 1px clip: autofill and password managers treat a clipped
   field as visible and fill it, which made real people look like bots. */
.nfc-hp { display: none !important; }
.nfc-act { position: relative; }
.nfc-ok { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none;
    border-radius: 50%; color: #fff; background: var(--gl-green); font-style: normal; }
.nfc-verified { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 14px 0 0; font-size: 12px;
    font-weight: 600; color: var(--gl-green); }
.nfc-invite { display: flex; flex-direction: column; gap: 3px; margin-top: 16px; padding: 16px 18px; border-radius: 18px; text-align: center;
    text-decoration: none; color: var(--text-on-dark); background: color-mix(in srgb, var(--card, var(--qc-accent, #0E7C86)) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--card, var(--qc-accent, #0E7C86)) 35%, transparent); }
.nfc-invite span { font-size: 13px; color: var(--muted-on-dark); }

/* ---------- Analytics: sources ----------------------------------------- */
.src-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.src-list li { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.src-list b { text-align: end; }
.src-bar { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.src-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }

@media (max-width: 1100px) {
    .card-studio { grid-template-columns: 1fr; }
    .card-side { position: static; }
}
@media (max-width: 640px) {
    .verify-grid { grid-template-columns: 1fr; }
    .contacts-export { margin-inline-start: 0; }
}
.contacts-bar input[type=search] { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); font: inherit; font-size: 13.5px; }
.contacts-bar input[type=search]:focus { outline: none; border-color: var(--primary); }

/* ==========================================================================
   QANAS NFC SHELL
   Its own product: a top bar, not Qanas's sidebar, and a narrower page.
   ========================================================================== */
body.nfc-app { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.nfc-bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nfc-bar-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.nfc-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.nfc-brand b { display: block; font-size: 15px; line-height: 1.2; }
.nfc-brand small { display: block; font-size: 11px; color: var(--muted); }
.nfc-nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nfc-nav::-webkit-scrollbar { display: none; }
.nfc-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; white-space: nowrap;
    font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.nfc-nav a:hover { color: var(--text); background: var(--bg); }
.nfc-nav a.is-on { color: #fff; background: var(--grad-qc); box-shadow: 0 4px 12px -6px rgba(37,99,235,.6); }
.nfc-bar-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.nfc-me { padding: 4px 6px; gap: 4px; }
.nfc-me .avatar { width: 30px; height: 30px; }
.nfc-bar .user-menu-panel { top: calc(100% + 8px); bottom: auto; inset-inline-end: 0; inset-inline-start: auto; min-width: 240px; }
.nfc-main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 20px 40px; box-sizing: border-box; }
.nfc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 18px; }
.nfc-head .page-title { margin: 0; font-size: 24px; }
.nfc-head .page-subtitle { margin: 0; flex-basis: 100%; color: var(--muted); font-size: 13.5px; }
.nfc-head .page-actions:empty { display: none; }
.nfc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1240px; width: 100%;
    margin: 0 auto; padding: 18px 20px 26px; box-sizing: border-box; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.nfc-foot span:first-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

@media (max-width: 900px) {
    .nfc-bar-in { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
    .nfc-nav { order: 3; flex-basis: 100%; }
    .nfc-bar-tools { margin-inline-start: auto; }
    .nfc-brand small { display: none; }
    .nfc-main { padding: 18px 16px 32px; }
}
@media (max-width: 560px) {
    .nfc-nav a { flex-direction: column; gap: 3px; padding: 7px 10px; font-size: 11px; min-width: 58px; }
    .nfc-bar .lang-switch { display: none; }
}

/* On a phone the list scrolls sideways rather than breaking names letter by letter. */
.contacts-table { min-width: 820px; }

/* Upload boxes: the cover runs the full width, in its own shape. */
.card-image.is-cover { grid-column: 1 / -1; }
.card-image.is-cover .card-image-preview { width: 100%; height: auto; aspect-ratio: 5 / 2; border-radius: 12px; }

/* ---------- Pieces: make your own link, or activate a bought one ---------- */
.pieces-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 18px; }
.pieces-way { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); }
.pieces-way b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pieces-way .hint { margin: 4px 0 10px; }
.pieces-way .card-activate { margin: 0; justify-content: flex-start; }
.pieces-way .card-activate input { letter-spacing: 0; text-transform: none; font-family: inherit; }
.pieces-way .card-activate input[name=secret] { letter-spacing: .08em; text-transform: uppercase; font-family: ui-monospace, monospace; }
.own-new { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; margin: 12px 0 6px; padding: 16px;
    border-radius: 16px; border: 1px solid var(--primary); background: var(--primary-soft); }
.own-new .nfc-qr { margin: 0; padding: 12px; background: #fff; color: #000; }
.own-new .nfc-qr svg { width: 140px; height: 140px; }
.own-link { display: flex; gap: 8px; margin: 10px 0; }
.own-link input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 13px; }
.own-steps { margin: 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.9; }
/* Writing a piece from the phone (cards/_nfc_write.html) */
.nfc-write { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.nfc-write.is-small { margin: 6px 0 0; }
.nfc-write[hidden], .nfc-write [hidden] { display: none !important; }
.nfc-write-msg { flex-basis: 100%; margin: 0; font-size: 13px; }
.nfc-write-msg.is-ok { color: #15803d; } .nfc-write-msg.is-error { color: #b91c1c; } .nfc-write-msg.is-wait { color: inherit; opacity: .8; }
.nfc-other summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
/* The NFC page: what shows depends on whether this browser can write */
html:not(.has-web-nfc) .has-nfc-only { display: none !important; }
html.has-web-nfc .no-nfc-only { display: none !important; }
.nfc-tool .nfc-write .btn.lg { width: 100%; justify-content: center; }
.nfc-tool-label { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.nfc-pointer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nfc-pointer h3 { margin-bottom: 4px; }
@media (max-width: 600px) {          /* the pieces as stacked rows on a phone */
    .nfc-pieces thead { display: none; }
    .nfc-pieces tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
    .nfc-pieces td { border: 0; padding: 0; }
    .nfc-pieces td:nth-child(1) { grid-column: 1 / -1; }
    .nfc-pieces td:nth-child(2) { font-size: 12.5px; color: var(--text-2); align-self: center; }
    .nfc-pieces td:nth-child(4) { font-size: 12.5px; color: var(--text-2); }
    .nfc-pieces td:nth-child(4)::before { content: attr(data-label) ": "; }
    .nfc-pieces td:nth-child(5) { justify-self: end; }
}
/* The card editor: five fields, the rest added with "+ Add a field" */
.card-grid .field[hidden] { display: none !important; }
.add-field { grid-column: 1 / -1; }
.add-field > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
    padding: 9px 14px; border: 1.5px dashed var(--border); border-radius: 10px; font-weight: 700; font-size: 14px; }
.add-field > summary::-webkit-details-marker { display: none; }
.add-field-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.add-field-types button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-elev); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.add-field-types button:hover { border-color: currentColor; }
.own-copy { width: 26px; height: 26px; vertical-align: middle; margin-inline-start: 4px; }
@media (max-width: 700px) {
    .pieces-ways, .own-new { grid-template-columns: 1fr; }
}

/* ---------- The Wallet pass, previewed ------------------------------------
   White, mark at the top, the name large with the photo beside it, two
   labelled pairs, a large QR: the shape of the real pass. */
.pass-mock { width: 100%; max-width: 280px; margin: 4px auto 14px; padding: 16px 18px 18px; box-sizing: border-box;
    border-radius: 16px; background: #fff; color: #111827; border: 1px solid #e5e7eb;
    box-shadow: 0 18px 40px -24px rgba(0,0,0,.45); text-align: start; }
.pass-mock-logo { height: 18px; display: block; }
.pass-mock-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 12px; }
.pass-mock-name { font-size: 20px; line-height: 1.15; font-weight: 700; }
.pass-mock-photo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; }
.pass-mock-pairs { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.pass-mock-pairs small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; }
.pass-mock-qr { display: grid; place-items: center; margin-top: 22px; color: #000; }
.pass-mock-qr svg { width: 120px; height: 120px; }

/* ---------- The exchange form, owner side ---------------------------------- */
.form-switch { margin: 6px 0 12px; font-size: 14px; }
.form-fields { display: grid; gap: 6px; margin: 4px 0 10px; max-width: 620px; }
.form-field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px;
    border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }
.form-field-row.is-fixed { opacity: .75; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { color: #fff; background: var(--primary); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); }
#exchange-form textarea { width: 100%; max-width: 620px; }
#exchange-form h4 { margin: 14px 0 6px; font-size: 14px; }
#exchange-form .card-check { margin: 4px 0; }

/* ---------- The exchange form, visitor side -------------------------------- */
.x-opt { font-weight: 500; color: var(--muted); font-size: 11px; }
.nfc-x-grid textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.nfc-disclaimer { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); white-space: pre-line; }

/* ---------- Contacts: new ones, dates -------------------------------------- */
.contacts-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.contacts-date input { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.contacts-table tr.is-new td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-inline-end: 6px; vertical-align: middle; }
.contact-msg { white-space: pre-line; }
.nav-new { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #E11D48; }
.nfc-nav a.is-on .nav-new { background: #fff; color: var(--qc-2); }

/* ==========================================================================
   APPEARANCE: templates, button styles, fonts
   Classes on the public <main> and on the dashboard preview alike.
   ========================================================================== */
.font-plex, .font-plex .nfc-card { font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }
.font-tajawal, .font-tajawal .nfc-card { font-family: "Tajawal", system-ui, sans-serif; }
.font-cairo, .font-cairo .nfc-card { font-family: "Cairo", system-ui, sans-serif; }

/* minimal: no band, the photo sits on white with a ring in the card's colour */
.tpl-minimal .nfc-card { box-shadow: 0 10px 30px -22px rgba(0,0,0,.35); }
.tpl-minimal .nfc-top { height: 28px !important; background: none !important; }
.tpl-minimal .nfc-top::after { display: none; }
.tpl-minimal .nfc-logo { box-shadow: none; padding: 0; }
.tpl-minimal .nfc-photo { margin-top: 0 !important; border-color: var(--card); width: 96px; height: 96px; }
.tpl-minimal .nfc-name { letter-spacing: -.01em; }
.tpl-minimal .nfc-title { color: var(--card); }

/* bold: the page in the card's colour, the card dark, text light */
.nfc.tpl-bold { background: linear-gradient(160deg, var(--card), color-mix(in srgb, var(--card) 35%, #050816)); min-height: 100dvh; }
.tpl-bold .nfc-card { background: #0d1424; color: #f3f4f6; border-color: rgba(255,255,255,.08); }
.tpl-bold .nfc-top { background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--card) 40%, #000)); }
.tpl-bold .nfc-photo { border-color: #0d1424; }
.tpl-bold .nfc-company, .tpl-bold .nfc-about, .tpl-bold .nfc-loc { color: #cbd5e1; }
.tpl-bold .nfc-title { color: color-mix(in srgb, var(--card) 55%, #fff); }
.tpl-bold .nfc-act, .tpl-bold .nfc-link { background: rgba(255,255,255,.06); color: #f3f4f6; border-color: rgba(255,255,255,.12); }
.tpl-bold .nfc-text { color: #e5e7eb; }
.nfc.tpl-bold .nfc-by, .nfc.tpl-bold .nfc-x-note { color: rgba(255,255,255,.75); }
.card-live.tpl-bold { background: linear-gradient(160deg, var(--card), #050816); }

/* button styles */
.btn-outline .nfc-act, .btn-outline .nfc-link { background: transparent; border: 1.5px solid var(--card); color: var(--card); }
.tpl-bold.btn-outline .nfc-act, .tpl-bold.btn-outline .nfc-link { color: #fff; border-color: color-mix(in srgb, var(--card) 60%, #fff); }
.btn-pill .nfc-act, .btn-pill .nfc-link { border-radius: 999px; background: var(--card); color: #fff; border-color: transparent; }
.btn-pill .nfc-save { border-radius: 999px; }

/* ---------- Sections on the card ------------------------------------------ */
.nfc-sections { display: grid; gap: 10px; margin-top: 14px; text-align: start; }
.nfc-sections [hidden] { display: none !important; }
.nfc-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-radius: 14px;
    font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; background: var(--bg); border: 1px solid var(--border); }
.nfc-link:hover { border-color: var(--card); }
.nfc-text { padding: 4px 4px 0; font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.nfc-text b { display: block; margin-bottom: 2px; color: var(--text); }
.nfc-text p { margin: 0; white-space: pre-line; }
.card-live .nfc-sections { padding: 0 18px 18px; margin-top: -6px; }
.card-live .nfc-link { padding: 9px 12px; font-size: 12.5px; }

/* ---------- Sections editor ------------------------------------------------ */
.sec-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.sec-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 10px;
    border-radius: 12px; border: 1px solid var(--border); background: var(--bg); }
.sec-kind { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-text); }
.sec-fields { display: grid; gap: 6px; }
.sec-fields input, .sec-fields textarea, .sec-new-box input, .sec-new-box textarea { width: 100%; box-sizing: border-box; }
.sec-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sec-tools .icon-btn { width: 28px; height: 28px; }
.sec-new { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 14px; }
.sec-new-box { display: grid; gap: 6px; padding: 12px; border-radius: 12px; border: 1px dashed var(--border-strong); }
.sec-new-box b { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---------- Appearance chooser --------------------------------------------- */
#appearance h4 { margin: 14px 0 8px; font-size: 13.5px; }
.look-choices { display: flex; gap: 12px; flex-wrap: wrap; }
.look-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.look-choice input { position: absolute; opacity: 0; pointer-events: none; }
.look-choice b { font-size: 12.5px; }
.look-thumb { position: relative; display: block; width: 110px; height: 150px; border-radius: 14px; overflow: hidden;
    background: #fff; border: 2px solid var(--border); --card: #0E7C86; }
.look-choice input:checked + .look-thumb, .look-choice input:checked + .look-btn, .look-choice input:checked + .look-font {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.look-choice input:focus-visible + span { outline: 2px solid var(--primary); }
.look-thumb i { position: absolute; display: block; }
.lt-band { inset: 0 0 auto 0; height: 44px; background: linear-gradient(135deg, var(--card), #0B2239); }
.lt-photo { top: 28px; left: 50%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: #94a3b8; border: 3px solid #fff; }
.lt-line { top: 72px; left: 22%; right: 22%; height: 7px; border-radius: 4px; background: #334155; }
.lt-line.short { top: 86px; left: 32%; right: 32%; background: #94a3b8; }
.lt-btn { top: 108px; left: 14%; right: 14%; height: 18px; border-radius: 6px; background: var(--card); }
.look-thumb.tpl-minimal .lt-band { display: none; }
.look-thumb.tpl-minimal .lt-photo { top: 14px; border-color: var(--card); }
.look-thumb.tpl-bold { background: #0d1424; }
.look-thumb.tpl-bold .lt-photo { border-color: #0d1424; }
.look-thumb.tpl-bold .lt-line { background: #e5e7eb; }
.look-btn, .look-font { display: grid; place-items: center; min-width: 110px; height: 56px; padding: 0 10px; border-radius: 12px;
    border: 2px solid var(--border); background: #fff; --card: #0E7C86; }
.look-btn .nfc-act { padding: 6px 14px; font-size: 12px; flex: none; }
.look-font { font-size: 16px; color: #111827; }

/* ---------- Analytics additions -------------------------------------------- */
.stats-range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-range .nfc-sendto { margin: 0; }
.stat-tiles.is-rates .stat-tile b { font-size: 24px; }
.stat-bar { gap: 0; }
.stat-bar-click { position: absolute; bottom: 0; left: 30%; right: 30%; border-radius: 3px 3px 0 0; background: var(--qc-2, #2563EB); opacity: .9; }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.legend.is-view { background: var(--primary); }
.legend.is-click { background: var(--qc-2, #2563EB); }
@media (max-width: 700px) { .sec-new { grid-template-columns: 1fr; } .sec-row { grid-template-columns: 1fr; } }

/* On filled pill buttons the icon takes the button text colour, not the card colour. */
.btn-pill .nfc-act .ico, .btn-pill .nfc-link .ico { color: inherit; }

/* ---------- Import ------------------------------------------------------- */
.imp-steps { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0 0 14px; }
.imp-steps li { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--muted);
    background: var(--bg); border: 1px solid var(--border); }
.imp-steps li.is-on { color: #fff; background: var(--primary); border-color: var(--primary); }
.imp-steps li.is-done { color: var(--primary-text); background: var(--primary-soft); }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.imp-map .field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; }
.imp-counts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.imp-c { padding: 8px 14px; border-radius: 12px; font-size: 13px; background: var(--bg); border: 1px solid var(--border); }
.imp-c b { font-size: 17px; margin-inline-end: 4px; }
.imp-tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.imp-tag.is-ok { color: #fff; background: var(--gl-green, #16a34a); }
.imp-tag.is-duplicate { color: #92400e; background: #fef3c7; }
.imp-tag.is-repeat { color: #475569; background: #e2e8f0; }
.imp-tag.is-invalid { color: #fff; background: #dc2626; }
.imp-row.is-invalid td { opacity: .7; }

/* ---------- Offline QR, move to leads ----------------------------------- */
.offline-qr { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.offline-qr .nfc-qr { margin: 0; background: #fff; color: #000; }
.offline-qr .nfc-qr svg { width: 170px; height: 170px; }
.mv-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.mv-form .field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; min-width: 200px; }
@media (max-width: 700px) { .offline-qr { grid-template-columns: 1fr; } }

/* ==========================================================================
   QUICK START: /qcards, the ready page, the installable show page
   ========================================================================== */
body.cards-body .qc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    max-width: 1100px; margin: 0 auto; padding: 16px 20px; }
.qc-top .nfc-brand b { color: var(--text); }
.qc-top-acts { display: flex; align-items: center; gap: 8px; }
.qc-lang { font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 6px; border-radius: 6px;
    display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; box-sizing: border-box; }
.qc-lang.is-on { color: #fff; background: var(--qc-2); }
.qc-main { max-width: 1100px; margin: 0 auto; padding: 8px 20px 40px; }
.qc-hero { text-align: center; margin: 10px auto 26px; max-width: 680px; }
.qc-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 40px); line-height: 1.2; color: var(--text);
    background: var(--grad-qc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.qc-hero p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.qc-steps { list-style: none; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0; margin: 16px 0 0; counter-reset: s; }
.qc-steps li { counter-increment: s; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px;
    background: var(--bg-elev); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); }
.qc-steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    color: #fff; background: var(--grad-qc); font-size: 12px; }
.qc-build { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.qc-form { margin: 0; }
.qc-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px;
    border: 1px dashed var(--border-strong); cursor: pointer; }
.qc-photo .card-image-preview { border-radius: 50%; color: var(--muted); }
.qc-photo .card-image-preview img:not([hidden]) + .ico { display: none; }
.qc-photo input { margin-inline-start: auto; font-size: 12px; max-width: 200px; }
.qc-colours { display: flex; align-items: center; gap: 8px; margin: 4px 0 18px; flex-wrap: wrap; }
.qc-colour input { position: absolute; opacity: 0; pointer-events: none; }
.qc-colour span { display: block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.qc-colour input:checked + span { outline: 3px solid var(--text); outline-offset: 2px; }
.qc-colour input:focus-visible + span { outline: 3px solid var(--qc-1); outline-offset: 2px; }
.qc-go { width: 100%; justify-content: center; }
.qc-preview { position: sticky; top: 16px; display: grid; gap: 14px; }
.qc-after { list-style: none; padding: 14px; margin: 0; display: grid; gap: 10px; border-radius: 16px; background: var(--bg-elev);
    border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.qc-after li { display: flex; gap: 8px; align-items: center; }
.qc-after .ico { color: var(--qc-1); flex: none; }
.qc-foot { text-align: center; padding: 18px; font-size: 12px; color: var(--muted); display: flex; justify-content: center; align-items: center; gap: 6px; }
.qc-foot a { color: var(--muted); }

/* ready page */
.qc-ready { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
.qc-ready-card { display: grid; gap: 12px; position: sticky; top: 76px; }
.qc-ready-card .nfc-qr { margin: 0; background: #fff; color: #000; }
.qc-ready-card .nfc-qr svg { width: 160px; height: 160px; }
.qc-ways h3 { margin: 0 0 12px; }
.qc-way { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.qc-way b { font-size: 15px; }
.qc-way .hint { margin: 4px 0 12px; }
.qc-way-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: #fff; background: var(--grad-qc); }
.qc-way-do { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qc-way-qr { display: inline-flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: #fff; color: #000; }
.qc-way-qr svg { width: 74px; height: 74px; }
.qc-way-qr small { font-size: 11px; color: #4b5563; max-width: 110px; }
.qc-wall-prev { height: 160px; border-radius: 14px; box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); }

/* the installable show page: the owner's own screen, held up to someone */
.qc-show { min-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(160deg, var(--card), #0B2239); color: #fff; text-align: center; }
.qc-show-card { width: 100%; max-width: 380px; padding: 26px 22px; border-radius: 28px; background: #fff; color: #111827;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.qc-show-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: -70px auto 10px; display: block;
    border: 5px solid #fff; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.qc-show-card h1 { margin: 0; font-size: 24px; }
.qc-show-card p { margin: 4px 0 0; color: #4b5563; font-size: 14px; }
.qc-show-qr { margin: 18px auto 8px; width: min(78vw, 290px); color: #000; }
.qc-show-qr svg { width: 100%; height: auto; display: block; }
.qc-show-hint { font-size: 12.5px !important; color: #6b7280 !important; }
.qc-show-open { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--card); text-decoration: none; }
.qc-install { width: 100%; max-width: 380px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2); display: grid; gap: 10px; text-align: start; }
.qc-install .btn { justify-content: center; }
.qc-install-ios { margin: 0; padding-inline-start: 18px; font-size: 13.5px; line-height: 1.9; }
.qc-install-other { margin: 0; font-size: 13px; opacity: .9; }
.qc-show-by { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .75; margin: 0; }

@media (max-width: 900px) {
    .qc-build, .qc-ready { grid-template-columns: 1fr; }
    .qc-preview, .qc-ready-card { position: static; }
    .qc-preview { order: -1; }
}

/* ==========================================================================
   QCARDS LANDING
   ========================================================================== */
.qc-land { max-width: 1100px; margin: 0 auto; padding: 8px 20px 30px; }
.ql-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 24px 0 40px; }
.ql-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
    color: var(--primary-text); background: var(--primary-soft); }
.ql-hero h1 { margin: 14px 0 12px; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.12; letter-spacing: -.02em; color: var(--text); }
.ql-hero h1 em { font-style: normal; background: var(--grad-qc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ql-hero p { margin: 0; font-size: 16.5px; line-height: 1.8; color: var(--muted); max-width: 520px; }
.ql-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.ql-free { display: flex; align-items: center; gap: 6px; margin-top: 12px !important; font-size: 13px !important; }
.ql-free .ico { color: var(--gl-green, #16a34a); }

/* hero art: a phone with a card, waves, a physical card being tapped */
.ql-art { position: relative; height: 620px; }
/* the phone holds the real sample card (templates/_phone.html, static/phone.css) */
.ql-phone-slot { position: absolute; inset-inline-end: 6%; top: 0; z-index: 1; }
.ql-waves { position: absolute; top: 4%; inset-inline-end: 14%; z-index: 3; pointer-events: none; }
.ql-waves span { position: absolute; width: 26px; height: 26px; border: 2px solid var(--qc-1, #0FB5AE); border-radius: 50%;
    border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); opacity: 0; animation: qlwave 2.4s infinite; }
[dir="rtl"] .ql-waves span { transform: rotate(-135deg); }
.ql-waves span:nth-child(2) { width: 40px; height: 40px; margin: -7px; animation-delay: .4s; }
.ql-waves span:nth-child(3) { width: 54px; height: 54px; margin: -14px; animation-delay: .8s; }
@keyframes qlwave { 0% { opacity: 0; } 30% { opacity: .9; } 100% { opacity: 0; } }
.ql-tapcard { position: absolute; z-index: 2; inset-inline-start: 0; bottom: 0; width: 230px; transform: rotate(-8deg); }
.ql-tapcard .pa { background: none; aspect-ratio: auto; overflow: visible; }
.ql-tapcard .pa::after { display: none; }
.ql-tapcard .pa-card { width: 100cqw; transform: none; }
@media (prefers-reduced-motion: reduce) { .ql-waves span { animation: none; opacity: .6; } }

.ql-section { padding: 26px 0; }
.ql-section h2 { text-align: center; margin: 0 0 18px; font-size: 26px; color: var(--text); }
.ql-center { text-align: center; margin-top: -8px !important; margin-bottom: 18px !important; }
.ql-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ql-how-step { position: relative; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ql-num { position: absolute; top: 14px; inset-inline-end: 16px; font-size: 40px; font-weight: 800; color: var(--primary-soft); line-height: 1; }
.ql-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ql-feat { padding: 18px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--border); }
.ql-feat b { display: block; margin: 10px 0 4px; font-size: 15px; color: var(--text); }
.ql-feat .hint { margin: 0; }
.ql-feat-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--primary-text); background: var(--primary-soft); }
.ql-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ql-privacy { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; margin: 10px 0; }
.ql-privacy b { color: var(--text); }
.ql-final { text-align: center; padding: 36px 20px; margin: 20px 0 0; border-radius: 26px; background: var(--grad-qc); color: #fff; }
.ql-final h2 { margin: 0 0 16px; color: #fff; }
.ql-final .btn { background: #fff; color: #0B2239; }

/* the stepped builder */
.qc-wiz { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; counter-reset: w; flex-wrap: wrap; }
.qc-wiz li { counter-increment: w; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--border); }
.qc-wiz li::before { content: counter(w); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px;
    background: var(--bg-elev); border: 1px solid var(--border-strong); }
.qc-wiz li.is-on { color: #fff; background: var(--primary); border-color: var(--primary); }
.qc-wiz li.is-on::before { background: rgba(255,255,255,.25); border-color: transparent; }
.qc-wiz li.is-done { color: var(--primary-text); background: var(--primary-soft); }
.qc-step { border: 0; padding: 0; margin: 0 0 6px; }
.qc-step legend { font-size: 17px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.qc-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 14px; }
.qc-nav [data-next]:only-child { margin-inline-start: auto; }
.qc-consent-box p { margin: 0 0 12px; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.qc-consent { font-size: 14px !important; color: var(--text) !important; background: var(--primary-soft); border-color: var(--primary) !important; }
.qc-consent-points { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.qc-consent-points li { display: flex; gap: 6px; align-items: flex-start; }
.qc-consent-points .ico { color: var(--gl-green, #16a34a); flex: none; margin-top: 3px; }

/* ready page: the shop offer */
.qc-offer-items { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.qc-offer { width: 150px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); text-decoration: none; font-size: 12.5px; }
.qc-offer:hover { border-color: var(--primary); }
.qc-offer .pa { margin-bottom: 4px; }

@media (max-width: 900px) {
    .ql-hero { grid-template-columns: 1fr; }
    .ql-art { height: 560px; max-width: 440px; margin: 0 auto; width: 100%; }
    .ql-how, .ql-feats { grid-template-columns: 1fr; }
}

/* the sign-up condition, and the terms page */
.qc-terms { align-items: flex-start !important; gap: 10px !important; margin-top: 14px; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--primary); background: var(--primary-soft); font-size: 14px !important; color: var(--text) !important; }
.qc-terms input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.qc-terms a { font-weight: 700; color: var(--primary-text); }
.qc-terms-page { max-width: 820px; }
.qc-terms-page h1 { margin: 0 0 4px; font-size: 26px; color: var(--text); }
.qc-terms-page h2 { margin: 22px 0 6px; font-size: 16px; color: var(--text); }
.qc-terms-page p { margin: 0; line-height: 1.9; color: var(--text-2); font-size: 14.5px; }
.qc-terms-page .btn { margin-top: 22px; }

/* ==========================================================================
   SHOP AND CART: storefront, product, cart, checkout, bundles
   ========================================================================== */
.qc-toplink { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2, var(--muted));
    text-decoration: none; padding: 6px 8px; border-radius: 9px; }
.qc-toplink:hover { color: var(--primary-text); background: var(--primary-soft); }
.qc-cartlink em { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    border-radius: 9px; font-size: 11px; font-weight: 800; color: #fff; background: var(--grad-qc); }
.qc-flashes { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.qc-flashes .flash { margin: 0 0 10px; }
.qc-back { font-size: 13px; color: var(--muted); }

.shop-item-link { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; }
.shop-item form { margin: 0; }
.shop-item .btn { width: 100%; justify-content: center; }

.qc-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.qc-bundle { position: relative; margin: 0; display: flex; flex-direction: column; gap: 8px; border-color: var(--qc-1); }
.qc-bundle .btn { justify-content: center; }
.qc-off { display: inline-block; width: max-content; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800;
    color: #fff; background: #16a34a; }
.qc-bundle > .qc-off { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.qc-bundle-art { display: flex; gap: 6px; align-items: center; }
.qc-bundle-art .pa { flex: 1; min-width: 0; }
.qc-prices { display: inline-flex; gap: 8px; align-items: baseline; }
.qc-prices s { color: var(--muted); font-size: 13px; }
.qc-prices b { color: var(--primary-text); font-size: 17px; }

.qc-product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.qc-product > .card { margin: 0; }
.qc-product-name { margin: 0 0 6px; font-size: 26px; color: var(--text); }
.qc-in-bundles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; font-size: 13px; }

.qc-cart { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.qc-cart > .card { margin: 0; }
.qc-line { display: grid; grid-template-columns: 96px 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 0;
    border-bottom: 1px solid var(--border); }
.qc-line:first-child { padding-top: 0; }
.qc-line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qc-line-info .hint { margin: 0; }
.qc-line-qty { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.qc-line-qty input { width: 70px; }
.qc-line-total { min-width: 70px; text-align: end; }
.qc-cart-lines > .btn { margin-top: 12px; }
.qc-summary { position: sticky; top: 16px; display: grid; gap: 10px; }
.qc-sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.qc-sum-row.is-off { color: #16a34a; }
.qc-sum-row.is-total { padding-top: 10px; border-top: 1px solid var(--border); font-size: 17px; }
.qc-summary .hint { margin: 0; }
.qc-summary .btn-link { text-align: center; font-size: 13px; }
.qc-tip { padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--primary-soft); color: var(--text); display: grid; gap: 4px; }
.qc-empty { text-align: center; padding: 40px 20px; }

/* landing: the free digital card next to the pieces, and the comparison */
.ql-digital { border-color: var(--qc-1); background: linear-gradient(180deg, var(--primary-soft), var(--bg-elev) 60%); }
.ql-digital-art { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--grad-qc); }
.ql-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.ql-points li { display: flex; gap: 6px; align-items: center; }
.ql-points .ico { color: #16a34a; flex: none; }
.ql-cmp { max-width: 780px; margin: 0 auto; padding: 6px 0; overflow-x: auto; }
.ql-cmp table { width: 100%; border-collapse: collapse; }
.ql-cmp th, .ql-cmp td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--border); font-size: 14px; }
.ql-cmp tr:last-child td { border-bottom: 0; }
.ql-cmp th:first-child, .ql-cmp td:first-child { text-align: start; color: var(--text); }
.ql-cmp th { font-size: 13px; color: var(--muted); }
.ql-cmp .is-us { background: var(--primary-soft); color: var(--primary-text); font-weight: 700; }
.ql-yes, .ql-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.ql-yes { color: #fff; background: #16a34a; }
.ql-no { color: #dc2626; background: rgba(220, 38, 38, .1); }

/* ready page: pieces with their own add button, bundles in a row */
.qc-offer a { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.qc-offer form { margin: 0; }
.qc-offer .btn { width: 100%; justify-content: center; }
.qc-offer-bundle { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; padding: 10px 12px;
    border-radius: 12px; border: 1px dashed var(--qc-1); font-size: 13.5px; }
.qc-offer-bundle .btn { margin-inline-start: auto; }

/* admin: bundles */
.combo-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.combo-row.is-new { border-bottom: 0; }
.combo-row > input[name^="name"] { max-width: 210px; }
.combo-items { display: flex; flex-wrap: wrap; gap: 4px 12px; flex-basis: 100%; }
.combo-pct { display: inline-flex; align-items: center; gap: 4px; }
.combo-pct input { width: 80px; }

@media (max-width: 860px) {
    .qc-cart, .qc-product { grid-template-columns: 1fr; }
    .qc-summary { position: static; }
    .qc-line { grid-template-columns: 70px 1fr auto; }
    .qc-line-total { grid-column: 2; text-align: start; }
    .qc-toplink > span:not(.qc-fam-q) { display: none; }
}
/* small drawings: the bundle row and the cart lines. The ring and the tag are
   the inner spans; the outer box carries the same class name. */
.qc-bundle-art { height: 96px; }
.qc-bundle-art .pa { height: 100%; aspect-ratio: auto; margin: 0; }
.qc-bundle-art .pa-card { width: 80cqw; }
.qc-line-art .pa { margin: 0; }
.qc-cart, .qc-product { min-width: 0; }
.qc-cart > *, .qc-product > * { min-width: 0; }
@media (max-width: 860px) {
    .qc-cart, .qc-product { grid-template-columns: minmax(0, 1fr); }
    .qc-line { grid-template-columns: 64px minmax(0, 1fr) auto; }
    .qc-line-qty { grid-column: 2; }
    .qc-line-total { grid-column: 3; grid-row: 1; }
}

/* the terms popup on the builder: shown when they press create */
.qc-dlg { width: min(92vw, 440px); padding: 22px; border: 1px solid var(--border); border-radius: 18px;
    background: var(--bg-elev); color: var(--text); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.qc-dlg::backdrop { background: rgba(11, 34, 57, .55); backdrop-filter: blur(2px); }
.qc-dlg h3 { margin: 0 0 6px; font-size: 18px; }
.qc-dlg .qc-terms { margin-top: 10px !important; }
.qc-dlg .qc-nav { margin-top: 18px; }
.qc-dlg .qc-go { width: auto; }
.qc-dlg .qc-go:disabled { opacity: .45; cursor: not-allowed; }

/* one family with Qanas: the same tile ring, a link across, the same footer line */
.qc-tile { outline: 2px solid rgba(15, 181, 174, .38); outline-offset: 2px; }
.qc-fam-link { border: 1px solid var(--border); }
.qc-fam-q, .fam-mini { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; flex: none; }
.qc-fam-q, .fam-q { background: linear-gradient(135deg, #CE4F3A 0%, #E37138 55%, #E39C38 100%); }
.fam-qc { background: var(--grad-qc); }
.qc-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; align-items: center; }
.qc-foot-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }

/* contact and profile icons in their own colours (templates/cards/_social.html) */
.soc { display: inline-grid; place-items: center; flex: none; border-radius: 30%; box-shadow: 0 4px 10px -5px rgba(0,0,0,.35); }
.soc svg { display: block; }
.soc-whatsapp { background: #25D366; }
.soc-linkedin { background: #0A66C2; }
.soc-twitter { background: #000; }
.soc-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.soc-phone { background: #34C759; }
.soc-email { background: #1E88E5; }
.soc-website { background: #5B6475; }
.nfc-act .soc { margin-inline-end: 2px; }
.tpl-bold .soc { box-shadow: none; }
/* filled buttons: a thin ring keeps the tile apart from the button colour */
.btn-pill .nfc-act .soc { box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }

/* the exchange, shown (landing.html #exchange): a hand holds the phone over a
   card lying on a table; the phone shows the real card. Drawn, no photos. */
.qx-stage { position: relative; height: 560px; max-width: 760px; margin: 10px auto 0; overflow: hidden; border-radius: 28px;
    direction: ltr; background: radial-gradient(120% 90% at 50% 0%, #fbf9f5 0%, #eee9e0 60%, #e2dcd1 100%); }
[data-theme="dark"] .qx-stage { background: radial-gradient(120% 90% at 50% 0%, #34343a 0%, #222226 70%); }
/* behind: the phone, upright, a slight tilt */
.qx-phone { position: absolute; z-index: 1; left: 50%; top: 34px; transform: translateX(-10%) rotate(-6deg); }
/* in front: the card, brought to the phone and back */
.qx-table { position: absolute; z-index: 3; left: 8%; bottom: 46px; width: 330px; animation: qxcard 5.6s infinite ease-in-out; }
@keyframes qxcard { 0%, 100% { transform: translate(0, 0) rotate(-12deg); } 42%, 62% { transform: translate(110px, -70px) rotate(-8deg); } }
.qx-card { position: relative; }
.qx-card .pa { background: none; aspect-ratio: 1.586; overflow: visible; }
.qx-card .pa::after { display: none; }
.qx-card .pa-card { width: 100cqw; transform: none; box-shadow: 0 .55cqw 0 #000, 0 9cqw 12cqw -5cqw rgba(0,0,0,.55); }
/* the tap, spreading from the card's NFC mark toward the phone */
.qx-waves { position: absolute; right: 14%; top: 16%; width: 0; height: 0; z-index: 2; pointer-events: none; }
.qx-waves span { position: absolute; width: 70px; height: 70px; margin: -35px; border-radius: 50%; border: 2px solid rgba(15,181,174,.8);
    opacity: 0; animation: qxring 2.8s infinite cubic-bezier(.2,.6,.3,1); }
.qx-waves span:nth-child(2) { animation-delay: .9s; }
.qx-waves span:nth-child(3) { animation-delay: 1.8s; }
@keyframes qxring { 0% { transform: scale(.4); opacity: 0; } 20% { opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
/* what the phone says once the card is read */
.qx-toast { position: absolute; z-index: 5; right: 6%; top: 46%; display: flex; gap: 10px; align-items: center; padding: 11px 14px;
    border-radius: 16px; background: rgba(255,255,255,.96); color: #0B2239; box-shadow: 0 22px 40px -18px rgba(11,34,57,.5);
    border: 1px solid rgba(22,163,74,.3); animation: qxsaved 5.6s infinite; }
[dir="rtl"] .qx-toast { direction: rtl; }
.qx-toast .ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: #16a34a; padding: 6px; box-sizing: border-box; flex: none; }
.qx-toast span { display: grid; gap: 1px; }
.qx-toast b { font-size: 13.5px; }
.qx-toast small { font-size: 12px; color: #4b5563; }
@keyframes qxsaved { 0%, 50% { opacity: 0; transform: translateY(8px); } 58%, 92% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qx-table, .qx-waves span, .qx-toast { animation: none; } .qx-toast { opacity: 1; } }
.qx-steps { list-style: none; padding: 0; margin: 26px auto 0; max-width: 1000px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.qx-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--border); }
.qx-steps b { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; color: #fff; background: var(--grad-qc); font-size: 14px; }
.qx-steps span { font-size: 14px; line-height: 1.7; color: var(--text); }
@media (max-width: 700px) {
    .qx-stage { height: 520px; }
    .qx-table { left: 2%; width: 250px; bottom: 30px; }
    .qx-phone { left: 44%; transform: translateX(-10%) rotate(-6deg) scale(.9); transform-origin: top left; }
    .qx-toast { right: 4%; top: auto; bottom: 18px; }
    .qx-steps { grid-template-columns: 1fr; }
}

/* the QCards header on narrow screens (BUG-04): brand, cart and a menu */
.qc-top-wide { display: contents; }
.qc-langs { display: inline-flex; gap: 2px; }
.qc-menu { display: none; position: relative; }
.qc-menu > summary { list-style: none; cursor: pointer; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; }
.qc-menu > summary::-webkit-details-marker { display: none; }
.qc-menu-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 40; min-width: 220px; padding: 10px;
    display: grid; gap: 6px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border);
    box-shadow: 0 24px 50px -20px rgba(15,12,23,.35); }
.qc-menu-panel .qc-toplink { padding: 10px; font-size: 14px; }
.qc-menu-panel .qc-toplink > span { display: inline !important; }
.qc-menu-panel .qc-langs { padding: 4px 6px; }
.qc-menu-panel .btn { justify-content: center; }
@media (max-width: 600px) {
    body.cards-body .qc-top { padding: 12px 14px; gap: 8px; }
    .qc-top-wide { display: none; }
    .qc-menu { display: block; }
    .qc-top .nfc-brand small { display: none; }
    .qc-top-acts { gap: 4px; }
}

/* the builder on a phone: a fieldset is as wide as its widest content unless
   told otherwise, and the photo row (with the file input) was wider than 390px */
.qc-build > *, .qc-step, .qc-form { min-width: 0; }
@media (max-width: 600px) {
    .qc-photo { flex-wrap: wrap; }
    .qc-photo input { margin-inline-start: 0; max-width: 100%; }
}

/* A thumb needs about 40px: the cart link on a phone. */
@media (max-width: 560px) { .qc-toplink { min-height: 40px; min-width: 40px; justify-content: center; } }

/* Integrations: Jawab on top, the other destinations as equals below it. */
.int-hero { border: 2px solid var(--qc-2, #2563eb); padding: 22px; display: grid; gap: 14px; margin-bottom: 22px; }
.int-hero-top { display: flex; gap: 14px; align-items: flex-start; }
.int-hero-top img { flex: none; border-radius: 12px; }
.int-hero-top h2 { margin: 0 0 4px; font-size: 19px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.int-hero-top > div { flex: 1; }
.int-hero select { width: 100%; }
.int-others { margin: 4px 0 12px; font-size: 15px; color: var(--muted); }

/* The company page: a colour and a logo that read as fields, and a team list
   that a phone shows as one card per person instead of letter-wide columns. */
.co-color { display: flex; align-items: center; gap: 10px; }
.co-color input[type=color] { width: 54px; height: 44px; padding: 3px; border-radius: 10px; flex: none; cursor: pointer; }
.co-color b { font-size: 13px; color: var(--muted); }
.co-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; }
.co-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.co-file em { font-style: normal; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .co-team, .co-team tbody, .co-team tr, .co-team td { display: block; width: 100%; }
    .co-team thead { display: none; }
    .co-team tr { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
    .co-team td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
    .co-team td.co-who { display: block; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
    .co-team td.co-who * { overflow-wrap: anywhere; }
    .co-team td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; }
    .co-team td:last-child:empty { display: none; }
    .co-team .co-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
}

/* The way back to the account: on the home-screen card, and on your own card. */
.qc-show-manage { display: inline-flex; align-items: center; gap: 6px; margin: 18px auto 0; }
.nfc-owner-bar { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 12px; padding: 6px 12px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: var(--card, #0E7C86); background: rgba(14,124,134,.08); text-decoration: none; }

/* Contacts on a phone: the list first (filters fold behind a button), and a
   card per contact with each value labelled, not columns cut at the edge. */
.contacts-more { display: contents; }
.contacts-more > summary { display: none; }
.contacts-more-in { display: contents; }
@media (max-width: 700px) {
    .contacts-more { display: block; width: 100%; }
    .contacts-more > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; }
    .contacts-more > summary::-webkit-details-marker { display: none; }
    .contacts-more-in { display: grid; gap: 10px; margin-top: 10px; }
    .c-cards, .c-cards tbody, .c-cards tr, .c-cards td { display: block; width: 100%; }
    .c-cards thead { display: none; }
    .c-cards tr { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
    .c-cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .c-cards td.c-who { display: block; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
    .c-cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex: none; }
    .c-cards td[data-label] { overflow-wrap: anywhere; text-align: end; }
}

/* QCards, simpler (2026-10-26): the top bar has 3 tabs and "More"; the card
   page shows one part at a time beside its live preview. */
.nfc-nav { overflow: visible; }
.nfc-more { position: relative; }
.nfc-more > summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; white-space: nowrap;
    color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; list-style: none; }
.nfc-more > summary::-webkit-details-marker { display: none; }
.nfc-more > summary:hover { color: var(--text); background: var(--bg); }
.nfc-more > summary.is-on { color: #fff; background: var(--grad-qc); }
.nfc-more-panel { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 30; min-width: 200px; padding: 6px;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 34px -12px rgba(15,23,42,.3);
    display: flex; flex-direction: column; }
.nfc-nav .nfc-more-panel a { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; font-size: 14px; min-width: 0; color: var(--text); }
.nfc-nav .nfc-more-panel a.is-on { color: #fff; }

.qc-next { padding: 14px 16px; }
.qc-next-row { display: flex; align-items: center; gap: 12px; }
.qc-next-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qc-next-txt small { color: var(--muted); font-size: 12.5px; }
.qc-next .card-check-bar { margin: 12px 0 6px; }
.qc-due { margin: -6px 0 12px; }

.qc-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: 14px; position: sticky; top: 8px; z-index: 5; }
.qc-tabs a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 10px;
    color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.qc-tabs a[aria-selected="true"] { color: #fff; background: var(--grad-qc); }
.qc-panels { min-width: 0; }
.qc-panel > .card, .qc-panel > form.card { margin: 0 0 18px; }
.qc-fold { margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.qc-fold > summary { cursor: pointer; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.qc-fold[open] > summary { margin-bottom: 12px; color: var(--text); }
@media (max-width: 700px) {
    .nfc-more > summary { flex-direction: column; gap: 3px; padding: 7px 10px; font-size: 11px; min-width: 58px; }
    .nfc-nav { justify-content: space-between; }
    .qc-tabs a { flex-direction: column; gap: 3px; font-size: 12px; padding: 8px 4px; }
}
@media (max-width: 1100px) {
    /* One column: the fields come first, right under the tabs; the preview follows them. */
    .card-studio .qc-panels { order: 1; }
    .card-studio .card-side { order: 2; }
}
/* The company notice is a line, not a block that pushes the card down. */
.card.card-notice:not(.is-off) { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.card.card-notice:not(.is-off) b { font-weight: 600; }

/* ==========================================================================
   QCARDS ANDROID APP (2026-10-27)
   Inside the app (cookie qc_app, body.in-app) QCards wears formal colours:
   one navy, white surfaces, thin grey lines, no gradients. The home screen
   (.ah) uses the same palette everywhere.
   ========================================================================== */
body.nfc-app.in-app {
    --app-navy: #12304F; --app-navy-2: #0B2239; --app-line: #E2E6EC; --app-soft: #EEF2F7;
    --grad-qc: #12304F; --grad-brand: #12304F; --grad-teal: #12304F;
    --primary: #12304F; --primary-hover: #0B2239; --primary-soft: #EEF2F7; --primary-text: #12304F;
    --teal-soft: #EEF2F7; --teal-text: #12304F;
    --btn2-bg: #fff; --btn2-text: #12304F; --btn2-border: #CBD3DE;
    --btn2-hover-bg: #EEF2F7; --btn2-hover-text: #12304F; --btn2-hover-border: #12304F; --btn2-hover-shadow: none;
    --shadow-brand: none; --shadow-teal: none;
}
:root[data-theme="dark"] body.nfc-app.in-app {
    --app-navy: #9DB8D9; --app-line: #33363D; --app-soft: rgba(157,184,217,.10);
    --primary-soft: rgba(157,184,217,.12); --primary-text: #C9D8EA; --teal-soft: rgba(157,184,217,.12); --teal-text: #C9D8EA;
    --btn2-bg: transparent; --btn2-text: #C9D8EA; --btn2-border: #44474F; --btn2-hover-bg: rgba(157,184,217,.12); --btn2-hover-text: #fff;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.nfc-app.in-app {
        --app-navy: #9DB8D9; --app-line: #33363D; --app-soft: rgba(157,184,217,.10);
        --primary-soft: rgba(157,184,217,.12); --primary-text: #C9D8EA; --teal-soft: rgba(157,184,217,.12); --teal-text: #C9D8EA;
        --btn2-bg: transparent; --btn2-text: #C9D8EA; --btn2-border: #44474F; --btn2-hover-bg: rgba(157,184,217,.12); --btn2-hover-text: #fff;
    }
}
body.nfc-app.in-app .nfc-nav a.is-on, body.nfc-app.in-app .nfc-more > summary.is-on,
body.nfc-app.in-app .qc-tabs a[aria-selected="true"] { background: #12304F; box-shadow: none; }
body.nfc-app.in-app .nfc-brand .qc-tile, body.nfc-app.in-app .btn:not(.secondary):not(.danger) { box-shadow: none; }
body.nfc-app.in-app .btn:not(.secondary):not(.danger):not(.green) { background: #12304F; }
body.nfc-app.in-app .btn:not(.secondary):not(.danger):not(.green):hover { background: #0B2239; filter: none; }

.ah { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.ah-me { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--bg-elev); color: var(--text); text-decoration: none; }
.ah-me-photo { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
    background: #12304F; color: #fff; font-weight: 700; font-size: 18px; }
.ah-me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ah-me-txt small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-me-go { flex: none; font-size: 13px; font-weight: 600; color: var(--primary-text); }
.ah-acts { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); overflow: hidden; }
.ah-act { display: flex; align-items: center; gap: 14px; padding: 18px 16px; color: var(--text); text-decoration: none; min-height: 76px; }
.ah-act + .ah-act { border-top: 1px solid var(--border); }
.ah-act:hover, .ah-act:focus-visible { background: var(--bg-hover); }
.ah-act:active { background: var(--primary-soft); }
.ah-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    color: #12304F; background: #EEF2F7; border: 1px solid #D5DDE8; }
:root[data-theme="dark"] .ah-ic { color: #C9D8EA; background: rgba(157,184,217,.10); border-color: #44474F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ah-ic { color: #C9D8EA; background: rgba(157,184,217,.10); border-color: #44474F; } }
.ah-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ah-txt b { font-size: 16px; font-weight: 700; }
.ah-txt small { color: var(--muted); font-size: 13px; line-height: 1.55; }
.ah-chev { flex: none; color: var(--muted); }
[dir="rtl"] .ah-chev svg { transform: scaleX(-1); }
.ah-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ah-stats a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--bg-elev); color: var(--text); text-decoration: none; }
.ah-stats b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ah-stats span { color: var(--muted); font-size: 13px; }
body.nfc-app.in-app .qc-tile { background: #12304F; box-shadow: none; outline: 0; }
body.nfc-app.in-app .nfc-me .avatar { background: #12304F; box-shadow: none; }
/* Fields in the app glow navy, not Qanas orange. */
body.nfc-app.in-app :is(input, select, textarea):focus { box-shadow: 0 0 0 3px rgba(18,48,79,.16); }

/* ==========================================================================
   QCARDS APP, UX PASS (2026-10-27)
   ========================================================================== */
/* Contacts on a phone: a short row per person (name, work, how to reach,
   a follow-up when there is one). The table's desktop width no longer pushes
   the values off the screen. Source, sharing and date live on the contact. */
@media (max-width: 700px) {
    .contacts-table.c-cards { min-width: 0; }
    .c-cards tr { position: relative; padding: 12px 14px; }
    .c-cards td.c-who { border-bottom: 0; padding-bottom: 2px; margin-bottom: 0; }
    .c-cards td.c-who a b { font-size: 15.5px; }
    .c-cards td.c-who > a::after { content: ""; position: absolute; inset: 0; }      /* the whole row opens the contact */
    .c-cards td:nth-child(2) { display: block; text-align: start; color: var(--muted); font-size: 13.5px; }
    .c-cards td:nth-child(2)::before, .c-cards td:nth-child(4)::before { display: none; }
    .c-cards td:nth-child(3), .c-cards td:nth-child(6), .c-cards td:nth-child(7), .c-cards td.c-follow.is-none,
    .c-cards td:nth-child(4):not(:has(.tag-chip)) { display: none; }
    .c-cards td:nth-child(4) { justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
    .c-cards td.c-follow { font-size: 13px; padding-top: 6px; }
    .c-cards .dup-badge { position: relative; z-index: 1; }
}

/* Banner cards on top of a page, sliding one by one (cards.edit). */
.qc-slides { margin: 0 0 16px; }
.qc-slides-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.qc-slides-track::-webkit-scrollbar { display: none; }
.qc-slide { flex: 0 0 100%; scroll-snap-align: start; box-sizing: border-box; display: flex; align-items: center; gap: 14px;
    min-height: 92px; padding: 14px 16px; margin: 0; border: 1px solid var(--border); border-radius: 14px;
    background: var(--bg-elev); color: var(--text); text-decoration: none; box-shadow: none; }
.qc-slide.qc-next { background: var(--primary-soft); border-color: transparent; }
.qc-slide.qc-due { background: color-mix(in srgb, #F59E0B 12%, var(--bg-elev)); border-color: color-mix(in srgb, #F59E0B 30%, transparent); }
.qc-slide-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
    background: var(--bg-hover); color: var(--primary-text); }
.qc-slide.qc-due .qc-slide-ic { background: color-mix(in srgb, #F59E0B 22%, transparent); color: #9A5B00; }
.qc-slide-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.55; }
.qc-slide-txt b { font-size: 14.5px; }
.qc-slide-txt small { color: var(--muted); font-size: 12.5px; }
.qc-slide-txt .card-check-bar { margin-top: 6px; }
.qc-slide-acts { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.qc-slide-acts form { margin: 0; }
.qc-slide-acts .btn-link { font-size: 12px; }
.qc-slide-go { flex: none; color: var(--muted); }
[dir="rtl"] .qc-slide-go svg { transform: scaleX(-1); }
.qc-slide.card-notice .qc-slide-txt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.qc-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.qc-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--border-strong, #CBD3DE); cursor: pointer; transition: width .25s, background .25s; }
.qc-dots i.on { width: 20px; background: var(--primary); }
.qc-slides.is-single .qc-dots { display: none; }
@media (prefers-reduced-motion: reduce) { .qc-slides-track { scroll-behavior: auto; } }

/* The app's bottom tab bar: the main places under the thumb. On the website it
   is not drawn; in the app the top bar keeps only the brand, "More" and the account. */
.qc-tabbar { display: none; }
body.nfc-app.in-app .qc-tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--bg-elev); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgba(15, 30, 50, .06); }
body.nfc-app.in-app .qc-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
    border-radius: 12px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; min-height: 52px; justify-content: center; }
body.nfc-app.in-app .qc-tabbar a.is-on { color: #12304F; }
body.nfc-app.in-app .qc-tabbar a.is-on svg { background: #EEF2F7; border-radius: 10px; padding: 3px 12px; box-sizing: content-box; }
body.nfc-app.in-app .qc-tabbar a:active { background: var(--bg-hover); }
body.nfc-app.in-app .qc-tabbar .nav-new { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); }
:root[data-theme="dark"] body.nfc-app.in-app .qc-tabbar a.is-on { color: #C9D8EA; }
:root[data-theme="dark"] body.nfc-app.in-app .qc-tabbar a.is-on svg { background: rgba(157,184,217,.14); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.nfc-app.in-app .qc-tabbar a.is-on { color: #C9D8EA; }
    :root:not([data-theme="light"]) body.nfc-app.in-app .qc-tabbar a.is-on svg { background: rgba(157,184,217,.14); }
}
body.nfc-app.in-app { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
body.nfc-app.in-app .nfc-nav > a { display: none; }
body.nfc-app.in-app .nfc-foot { display: none; }

/* File pickers: a proper button in the page's language, not the browser's
   "Choose File / No file chosen". */
body.nfc-app input[type="file"] { max-width: 100%; font: inherit; font-size: 13px; color: var(--muted); }
body.nfc-app input[type="file"]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; margin-inline-end: 10px;
    padding: 8px 14px; border-radius: 10px; border: 1px solid var(--btn2-border); background: var(--btn2-bg); color: var(--btn2-text); cursor: pointer; }
/* In the app the top bar is one row: brand, then "More", theme and account. */
body.nfc-app.in-app .nfc-bar-in { flex-wrap: nowrap; }
body.nfc-app.in-app .nfc-nav { order: 2; flex: none; flex-basis: auto; margin-inline-start: auto; }
body.nfc-app.in-app .nfc-bar-tools { order: 3; margin-inline-start: 0; }
body.nfc-app.in-app .nfc-more > summary { flex-direction: row; min-width: 0; padding: 9px 10px; font-size: 13px; }
body.nfc-app.in-app .nfc-more > summary:not(.is-on) span { display: none; }
@media (max-width: 420px) { body.nfc-app.in-app .nfc-brand small { display: none; } }
/* A contact's Call, WhatsApp and Email, one tap each, above the details. */
.qc-reach { display: flex; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
.qc-reach .btn { flex: 1 1 0; justify-content: center; min-height: 46px; }
.qc-slide { min-height: 0; }
.qc-slide.card-notice .qc-slide-txt { -webkit-line-clamp: 3; font-size: 13px; }

/* ==========================================================================
   QCARDS APP, SIGN-IN AND SIGN-UP (2026-10-28)
   templates/cards/app_auth.html: a navy band with the mark, then one card.
   ========================================================================== */
body.qa-auth { min-height: 100vh; background: var(--bg); }
.qa-band { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: calc(34px + env(safe-area-inset-top)) 20px 64px; background: #12304F; color: #fff; text-align: center;
    border-radius: 0 0 28px 28px; }
.qa-band .qc-tile { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); margin-bottom: 6px; }
.qa-band b { font-size: 22px; letter-spacing: .01em; }
.qa-band small { font-size: 13px; color: rgba(255,255,255,.72); }
.qa-band .lang-switch { position: absolute; top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 14px;
    background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.qa-band .lang-option { color: rgba(255,255,255,.8); }
body.qa-auth .qa-band .lang-option.active { background: #fff; border-color: #fff; color: #12304F; }
.qa-main { box-sizing: border-box; width: 100%; max-width: 472px; margin: -44px auto 0 !important; padding: 0 16px calc(28px + env(safe-area-inset-bottom)) !important; position: relative; }
.qa-main > .flash { margin-bottom: 12px; }
body.qa-auth .auth-wrap { display: block; padding: 0; }
body.qa-auth .auth-card { width: 100%; box-sizing: border-box; padding: 24px 20px; border-radius: 20px; border: 1px solid var(--app-line);
    box-shadow: 0 18px 40px -24px rgba(18,48,79,.45); }
body.qa-auth .auth-title { font-size: 21px; margin: 0; }
body.qa-auth .auth-sub { margin: 4px 0 18px; }
body.qa-auth .field input { min-height: 48px; font-size: 16px; }   /* 16px: no zoom on focus */
body.qa-auth .btn.block { width: 100%; justify-content: center; min-height: 50px; font-size: 15.5px; border-radius: 14px; }
body.qa-auth .social-row { display: grid; gap: 10px; }
body.qa-auth .auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
body.qa-auth .auth-or::before, body.qa-auth .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
body.qa-auth .auth-switch { text-align: center; margin-top: 18px; font-size: 14.5px; color: var(--muted); }
body.qa-auth .auth-switch a { font-weight: 700; color: var(--primary-text); }
body.qa-auth .terms-box { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 14px;
    border-radius: 12px; border: 1px solid var(--border); font-size: 14px; line-height: 1.6; cursor: pointer; }
body.qa-auth .terms-box input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: #12304F; }
body.qa-auth .terms-box a { font-weight: 700; color: var(--primary-text); }
body.qa-auth .terms-box:has(input:checked) { border-color: #12304F; background: var(--app-soft); }
body.qa-auth .social-row a.is-locked { opacity: .5; }
body.qa-auth .terms-social-hint { margin-top: 8px; color: var(--gl-red, #c62828) !important; text-align: center; }
:root[data-theme="dark"] .qa-band { background: #0B2239; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qa-band { background: #0B2239; } }

/* In the app the details come first and the three pictures after them: a new
   card used to open on three empty photo boxes, the name a screen below. */
body.nfc-app.in-app #card-form { display: flex; flex-direction: column; }
body.nfc-app.in-app #card-form > * { order: 4; }
body.nfc-app.in-app #card-form > h3, body.nfc-app.in-app #card-form > h3 + .hint { order: 0; }
body.nfc-app.in-app #card-form > .card-grid { order: 1; }
body.nfc-app.in-app #card-form > .card-images { order: 2; margin-top: 8px; }
body.nfc-app.in-app #card-form > .card-images + .hint { order: 3; }
/* One box per contact on a phone: not a row in a frame in a card. */
@media (max-width: 700px) {
    body.nfc-app .card:has(> .table-wrap > .c-cards) { background: none; border: 0; box-shadow: none; padding: 0; }
    body.nfc-app .table-wrap:has(> .c-cards) { background: none; border: 0; box-shadow: none; overflow: visible; }
    body.nfc-app .c-cards tr { background: var(--bg-elev); }
}

/* Try the demo (cards_app.demo): the button under sign-in, the strip on top. */
body.qa-auth .qa-demo { margin-top: 14px; text-align: center; }
body.qa-auth .qa-demo .hint { margin-top: 6px; font-size: 12.5px; }
.qc-demo-bar { background: #FFF4D6; color: #6B4E00; text-align: center; font-size: 13px; padding: 7px 12px; }
.qc-demo-bar a { font-weight: 700; color: inherit; text-decoration: underline; margin-inline-start: 6px; }
:root[data-theme="dark"] .qc-demo-bar { background: #3A2F12; color: #F3D98B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qc-demo-bar { background: #3A2F12; color: #F3D98B; } }

/* The one-tap language button (app.html): shown wherever the AR/EN pair is hidden. */
.qc-lang { display: none; font-weight: 700; font-size: 14px; text-decoration: none; color: inherit; }
@media (max-width: 560px) { .qc-lang { display: inline-grid; place-items: center; } }

/* "My card" in the app (templates/cards/app_share.html): the card with its QR, then the ways to pass it on. */
.as { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.as-card { position: relative; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 22px; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px 18px;
    box-shadow: 0 18px 40px -26px rgba(18,48,79,.5); }
.as-top { align-self: stretch; height: 74px; margin: 0 -20px; background: linear-gradient(135deg, var(--card), #0B2239); }
.as-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin-top: -46px; border: 4px solid var(--bg-elev);
    background: #EEF2F7; display: grid; place-items: center; font-size: 34px; font-weight: 700; color: #12304F; }
.as-card h2 { margin: 10px 0 2px; font-size: 21px; }
.as-card p { margin: 0; color: var(--muted); font-size: 14px; }
.as-qr { width: min(240px, 70vw); margin: 16px auto 8px; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--app-line, #E2E6EC); color: #000; }
.as-qr svg { display: block; width: 100%; height: auto; }
.as-card small { color: var(--muted); font-size: 12.5px; }
.as-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-main .btn { justify-content: center; min-height: 50px; border-radius: 14px; }
.as-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: start; min-height: 96px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); color: var(--text); text-decoration: none;
    font: inherit; cursor: pointer; }
.as-tile svg { color: var(--primary-text); }
.as-tile b { font-size: 14px; }
.as-tile small { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.as-tile:active { background: var(--primary-soft); }
.as-saved { text-align: center; }
.as-edit { align-self: center; }

/* App home, big tiles (2026-10-29): the card on top, then one tile per place. */
.ah-me-go { display: inline-flex; align-items: center; gap: 6px; }
.ah-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ah-tile { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 16px;
    border: 1px solid var(--border); border-radius: 18px; background: var(--bg-elev); color: var(--text); text-decoration: none; }
.ah-tile .ah-ic { margin-bottom: auto; }
.ah-tile b { font-size: 16px; line-height: 1.35; }
.ah-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.ah-tile .ah-num { font-style: normal; font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ah-tile:active { background: var(--primary-soft); }
.ah-tile.is-main { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; background: #12304F; color: #fff; border-color: #12304F; }
.ah-tile.is-main .ah-ic { margin: 0; background: rgba(255,255,255,.12); color: #fff; border: 0; }
.ah-tile.is-main small { color: rgba(255,255,255,.75); }
.ah-tile.is-main b { font-size: 17px; }
.ah-tile.is-main small::before { content: ""; display: block; }
:root[data-theme="dark"] .ah-tile.is-main { background: #1B3A5C; border-color: #1B3A5C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ah-tile.is-main { background: #1B3A5C; border-color: #1B3A5C; } }

/* The scanner's camera (static/qc-camera.js): full screen, a card frame, the
   round button fills while the card is held steady, then takes it. */
.qc-cam { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; }
.qc-cam[hidden] { display: none; }
body.qc-cam-on { overflow: hidden; }
.qc-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qc-cam-shade { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.qc-cam-frame { position: relative; width: 86vw; max-width: 560px; aspect-ratio: 1.6; border-radius: 14px;
    box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); outline: 2px solid rgba(255,255,255,.55); transition: outline-color .2s; }
.qc-cam-frame.is-ok { outline-color: #34D399; }
.qc-cam-frame i { position: absolute; width: 30px; height: 30px; border: 4px solid #fff; }
.qc-cam-frame i:nth-child(1) { top: -4px; left: -4px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.qc-cam-frame i:nth-child(2) { top: -4px; right: -4px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.qc-cam-frame i:nth-child(3) { bottom: -4px; left: -4px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.qc-cam-frame i:nth-child(4) { bottom: -4px; right: -4px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.qc-cam-frame.is-ok i { border-color: #34D399; }
.qc-cam-hint { position: absolute; left: 0; right: 0; top: calc(50% + min(27vw, 175px) + 22px); text-align: center; margin: 0;
    font-size: 15px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); padding: 0 20px; }
.qc-cam-bar { position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom)); display: flex;
    align-items: center; justify-content: space-around; padding: 0 20px; }
.qc-cam-side { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; background: none; border: 0;
    color: #fff; font: inherit; font-size: 12px; opacity: .9; }
.qc-cam-side[aria-pressed="false"] { opacity: .45; }
.qc-cam-shot { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: rgba(255,255,255,.15); padding: 0; position: relative; }
.qc-cam-ring { position: absolute; inset: 5px; border-radius: 50%;
    background: conic-gradient(#34D399 calc(var(--p, 0) * 360deg), rgba(255,255,255,.85) 0); transition: background .15s; }
.qc-cam.is-taken .qc-cam-ring { background: #34D399; }
.qc-cam-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; width: 44px; height: 44px;
    border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; }

/* the app's account menu: Qanas named, not opened (the app is QCards only) */
.qc-also { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.qc-also .ico, .qc-also svg { flex: none; margin-top: 2px; }

/* My card, full screen for scanning (app_share.html) */
button.as-card { font: inherit; color: inherit; width: 100%; cursor: zoom-in; }
.as-full { position: fixed; inset: 0; z-index: 400; background: #fff; color: #111827; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; text-align: center; }
.as-full[hidden] { display: none; }
.as-full b { font-size: 22px; }
.as-full-qr { width: min(88vw, 72vh); aspect-ratio: 1; }
.as-full-qr svg { width: 100%; height: 100%; display: block; }
.as-full small { color: #4b5563; font-size: 14px; }
body.as-full-on { overflow: hidden; }

/* the card editor's image pickers (edit.html): our button, not the browser's */
.card-file { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; position: relative; }
.card-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.card-file-btn { cursor: pointer; }
.photo-pick-on .card-file [data-photo-pick] ~ .card-file-btn { display: none; }

/* the app's contact list (contacts.html, in_app) */
.qc-list { display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.qc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; min-height: 64px; }
.qc-row + .qc-row { border-top: 1px solid var(--border); }
.qc-row:active { background: var(--bg); }
.qc-av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 17px;
    color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 70% 92%); }
[data-theme="dark"] .qc-av { color: hsl(var(--h) 70% 85%); background: hsl(var(--h) 35% 24%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qc-av { color: hsl(var(--h) 70% 85%); background: hsl(var(--h) 35% 24%); } }
.qc-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qc-row-t b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.qc-row-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* English titles and numbers keep their own direction but line up with the
   name, on the page's side */
.qc-row-t small, .qc-row-t b { text-align: left; }
[dir="rtl"] .qc-row-t small, [dir="rtl"] .qc-row-t b { text-align: right; }
.qc-row-t b { justify-content: flex-start; }
.qc-row-t .dup-badge { align-self: flex-start; margin-top: 3px; }
.qc-row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.qc-src, .qc-due { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.qc-due { display: inline-flex; gap: 3px; align-items: center; }
.qc-due.is-warn { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.qc-empty { text-align: center; padding: 40px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* the search above it: one field, filters behind an icon */
.in-app .contacts-bar { position: relative; flex-wrap: nowrap; background: none; border: 0; box-shadow: none; padding: 0; margin-bottom: 12px; }
.in-app .contacts-bar input[type=search] { flex: 1 1 auto; min-width: 0; height: 46px; }
.in-app .contacts-bar > .btn, .in-app .contacts-more > summary { font-size: 0; gap: 0; width: 46px; height: 46px; padding: 0; justify-content: center; flex: none; }
.in-app .contacts-more > summary { display: inline-flex; align-items: center; list-style: none; }
.in-app .contacts-more > summary::-webkit-details-marker { display: none; }
.in-app .contacts-more[open] > .contacts-more-in { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-wrap: wrap; gap: 10px;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: 0 14px 34px -14px rgba(0,0,0,.35); }

/* a name, not a code: no spaced capitals (nfc.html) */
.card-activate.is-text input { letter-spacing: 0; text-transform: none; font-family: inherit; max-width: none; }

/* the scanner in the app: Save always in reach, just above the tabs */
body.nfc-app.in-app .scan-actions { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 20; margin-top: 12px; }
body.nfc-app.in-app .scan-actions .btn { width: 100%; justify-content: center; box-shadow: 0 10px 24px -10px rgba(15, 30, 50, .45); }

/* Dark: the owner's colour is often a deep navy, unreadable as text on a dark
   page. Text in that colour is lightened; fills and borders keep it. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nfc-title, :root:not([data-theme="light"]) .tpl-minimal .nfc-title,
    :root:not([data-theme="light"]) .nfc-owner-bar, :root:not([data-theme="light"]) .qc-show-open,
    :root:not([data-theme="light"]) .btn-outline .nfc-act, :root:not([data-theme="light"]) .btn-outline .nfc-link,
    :root:not([data-theme="light"]) .nfc-link, :root:not([data-theme="light"]) .nfc-x > summary { color: color-mix(in srgb, var(--card, #0E7C86) 40%, #fff); }
    :root:not([data-theme="light"]) .nfc-owner-bar { background: rgba(255,255,255,.08); }
}
:root[data-theme="dark"] .nfc-title, :root[data-theme="dark"] .tpl-minimal .nfc-title,
:root[data-theme="dark"] .nfc-owner-bar, :root[data-theme="dark"] .qc-show-open,
:root[data-theme="dark"] .btn-outline .nfc-act, :root[data-theme="dark"] .btn-outline .nfc-link,
:root[data-theme="dark"] .nfc-link, :root[data-theme="dark"] .nfc-x > summary { color: color-mix(in srgb, var(--card, #0E7C86) 40%, #fff); }
:root[data-theme="dark"] .nfc-owner-bar { background: rgba(255,255,255,.08); }
