/* The card pages (docs/15_DESIGN.md 7.6 to 7.9): the QR screen and its "You connected" sheet,
   the Scan view, the page a scan opens and the public card, the card editor and its preview,
   the first card. Built on tamsme.css's tokens (and me.css for the signed-in pages' head band,
   cards and dialogs): white page, hairlines, ink for the one next action, mint for "yours,
   done, live", violet for sharing. No inline styles anywhere (the CSP forbids them). Phone
   first: every screen fits 390 px without sideways scrolling; tap targets 44 px, small labels
   13 px, inputs 16 px. */

/* ------------------------------------------------------------------ the QR screen (/me/qr) */
.page-qr .site-header, .page-qr .site-footer { display: none; }
.qrs { max-width: 480px; margin: 0 auto; padding: env(safe-area-inset-top) 20px calc(env(safe-area-inset-bottom) + 28px); }
.qrs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.qrs-top .wordmark { font-size: 18px; }
.qrs-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--tint); border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; transition: background .15s, border-color .15s; }
.qrs-close:hover { background: #fff; border-color: var(--line-hover); color: var(--text); }
.qrs-main { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 6px; }
.qrs-banner { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; text-align: left;
  background: var(--violet-tint); border: 1px solid var(--violet-line); color: var(--violet-text); font-size: 14.5px; font-weight: 600; }
.qrs-banner .icon { flex: none; }
.qrs-name { font-size: 28px; line-height: 1.12; letter-spacing: -.03em; max-width: 100%; }
.qrs-role { margin-top: 4px; font-size: 15.5px; color: var(--dim); max-width: 100%; overflow-wrap: anywhere; }
.qrs-code { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 20px auto 16px; border-radius: 18px; overflow: hidden; background: #fff;
  border: 1px solid var(--line-card); box-shadow: 0 1px 1px rgba(16,24,40,.03), 0 22px 44px -22px rgba(16,24,40,.28); }
.qrs-qr { position: absolute; inset: 0; }
.qrs-qr svg { display: block; width: 100%; height: 100%; }
.qrs-live { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.qrs-changes { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.qrs-pulse { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(56,217,190,.22); }
.qrs-progress { display: block; width: 168px; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.qrs-progress i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left center; transition: transform 1s linear; }
.qrs-public-note { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 360px; }
.qrs-address { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-size: 18px; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink-2); overflow-wrap: anywhere; }
.qrs-address .icon { flex: none; color: var(--violet-text); }
.qrs-public-help { font-size: 14px; line-height: 1.45; color: var(--violet-text); }
/* A computer: room for "Публична QR визитка" on one line beside "Сканирай" (v1-30). */
@media (min-width: 641px) { .page-qr .qrs { max-width: 540px; } }
/* A landscape phone: the code beside the name and the buttons, as tall as the screen allows, so it
   is whole on screen and can be scanned (v2-22: its bottom was cut). */
@media (orientation: landscape) and (max-height: 500px) {
  .page-qr .qrs { max-width: 820px; }
  .page-qr .qrs-top { min-height: 52px; }
  .page-qr .qrs-main { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; align-items: start; text-align: left; padding-top: 0; }
  .page-qr .qrs-main > * { grid-column: 2; }
  .page-qr .qrs-main > .qrs-code { grid-column: 1; grid-row: 1 / span 12; width: min(300px, calc(100vh - 64px)); margin: 0; }
  .page-qr .qrs-live, .page-qr .qrs-public-note { align-items: flex-start; }
  .page-qr .qrs-links { justify-content: flex-start; }
}

/* "Свали QR кода" and how to keep it in the phone went (review 2026-11-22b r8-11: the owner wants
   no download of the code). With no signal, in the code's place once it is near its end: the code
   is out of date, said plainly (r8-4; cards/_qr_modal.html, static/js/qr.js shows it). */
.qrs-stale { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px;
  background: var(--warn-tint); color: var(--warn); text-align: center; }
.qrs-stale-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px;
  background: #fff; border: 1px solid var(--warn-line); }
.qrs-stale-title { font-size: 19px; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.qrs-stale-text { max-width: 280px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.qrs-actions { display: flex; gap: 10px; width: 100%; margin-top: 20px; }
.qrs-btn { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 12px; font-size: 15.5px; white-space: normal; text-align: center; line-height: 1.2; }
.qrs-btn[aria-pressed="true"] { background: var(--violet-tint); border-color: var(--violet-line); color: var(--violet-text); }
.qrs-noscript { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--tint);
  border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); text-align: left; }
.qrs-noscript .icon { flex: none; margin-top: 2px; }
.qrs-fine { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; max-width: 360px; font-size: 13px; line-height: 1.45; color: var(--faint); text-align: left; }
.qrs-fine .icon { flex: none; margin-top: 1px; }
.qrs-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.qrs-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.qrs-links a:hover { border-color: var(--line-hover); color: var(--text); }
.qrs-links .icon { color: var(--faint); }
.qrs.is-backup .qrs-code { border-color: var(--violet-line); }
@media (prefers-reduced-motion: no-preference) {
  .qrs-pulse { animation: qrs-pulse 1.8s ease-in-out infinite; }
  @keyframes qrs-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(56,217,190,.24); } 50% { box-shadow: 0 0 0 8px rgba(56,217,190,.06); } }
}

/* ------------------------------------------------------------------ the "You connected" sheet */
.qr-sheet { position: fixed; inset: auto 0 0 0; width: auto; max-width: 560px; max-height: 92%; margin: 0 auto; padding: 0; border: 0;
  border-radius: 22px 22px 0 0; background: #fff; color: var(--text); box-shadow: 0 -24px 60px -24px rgba(12,14,16,.5); overflow: auto; overscroll-behavior: contain; }
.qr-sheet::backdrop { background: rgba(12,14,16,.45); }
.qr-sheet-body { display: flex; flex-direction: column; gap: 14px; padding: 10px 20px calc(env(safe-area-inset-bottom) + 20px); }
.qr-sheet-grip { align-self: center; width: 40px; height: 4px; border-radius: 999px; background: var(--line-strong); }
.qr-sheet-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qr-sheet-head img.avatar { object-fit: cover; }
.qr-sheet-who { flex: 1 1 160px; min-width: 0; }
.qr-sheet-title { font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.qr-sheet-role { font-size: 14.5px; color: var(--dim); overflow-wrap: anywhere; }
.qr-sheet-role:empty { display: none; }
.qr-sheet-chip { gap: 5px; height: 26px; font-size: 13px; }
.qr-sheet-done { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .qr-sheet[open] { animation: sheet-rise .2s ease-out; }
  @keyframes sheet-rise { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* ------------------------------------------------------------------ the contact panel (sheet and scan page) */
.cpanel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cpanel-label { font-size: 13px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.cpanel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chip-toggle { gap: 6px; min-height: 44px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip-toggle .icon { display: none; }
.chip-toggle:hover { background: var(--tint); }
.chip-toggle.is-on, .chip-toggle.is-on:hover { background: var(--mint-tint); border-color: var(--mint-line); color: var(--mint-deep); font-weight: 600; }
.chip-toggle.is-on .icon { display: inline; color: var(--mint-text); }
.cpanel-note { width: 100%; min-height: 88px; resize: vertical; border-radius: 12px; font-size: 16px; line-height: 1.45; margin-bottom: 4px; }
.cpanel-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cpanel-remind { min-height: 44px; white-space: normal; text-align: left; }
.cpanel-remind.is-on, .cpanel-remind.is-on:hover { background: var(--mint-tint); border-color: var(--mint-line); color: var(--mint-deep); }
.cpanel-remind .icon { color: var(--faint); }
.cpanel-remind.is-on .icon { color: var(--mint-text); }
.cpanel-met { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.cpanel-met-icon { display: inline-flex; flex: none; margin-top: 2px; color: var(--faint); }
.cpanel-met-line { min-width: 0; overflow-wrap: anywhere; }
/* "смени" sits in the line of text; its padding (pulled back by the margin) makes it a 44 px tap target */
.cpanel-change { display: inline; min-height: 0; margin: -12px 0; padding: 12px 6px; border: 0; border-radius: 8px; background: none;
  color: var(--mint-text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cpanel-change:hover { background: var(--mint-tint); color: var(--mint-deep); }
.cpanel-picker { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint); }
.cpanel-picker[hidden] { display: none; }
.cpanel-search { width: 100%; height: 44px; background: #fff; }
.cpanel-search input, .cpanel-search input:focus { width: 100%; height: 42px; font-size: 16px; box-shadow: none; }
.cpanel-events { display: flex; flex-direction: column; gap: 4px; max-height: 260px; margin: 0; padding: 0; list-style: none; overflow: auto; }
.cpanel-events button { flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 48px; height: auto; padding: 8px 12px;
  border-radius: 10px; text-align: left; white-space: normal; line-height: 1.3; }
.cpanel-events button.is-current { border-color: var(--mint-line); background: var(--mint-tint); color: var(--mint-deep); }
.cpanel-ev-title { font-size: 14.5px; font-weight: 600; color: inherit; }
.cpanel-ev-when { font-size: 13px; font-weight: 400; color: var(--dim); }
.cpanel-empty { padding: 6px 4px; font-size: 13.5px; color: var(--dim); }
.cpanel-picker > .btn { align-self: flex-start; min-height: 40px; }
.cpanel-status { min-height: 18px; margin-top: -4px; font-size: 13.5px; font-weight: 500; color: var(--mint-deep); }
.cpanel-status.is-error { color: var(--warn); }

/* ------------------------------------------------------------------ the Scan view */
.scan { padding: 0; border: 0; background: var(--dark); color: var(--dark-text); }
.scan[open] { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; display: flex; flex-direction: column; overflow: hidden; }
.scan::backdrop { background: rgba(12,14,16,.7); }
.scan-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px),
    radial-gradient(520px 300px at 26% 108%, rgba(56,217,190,.3), transparent 70%),
    radial-gradient(520px 300px at 76% 108%, rgba(167,139,250,.28), transparent 70%), var(--dark); }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; background: transparent; }
.scan-frame { position: absolute; left: 50%; top: 46%; width: min(70%, 290px); aspect-ratio: 1; transform: translate(-50%, -50%); }
.scan-c { position: absolute; width: 44px; height: 44px; border: 0 solid; }
.scan-tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-color: var(--violet); border-top-left-radius: 16px; }
.scan-bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-color: var(--violet); border-bottom-left-radius: 16px; }
.scan-tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-color: var(--mint); border-top-right-radius: 16px; }
.scan-br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-color: var(--mint); border-bottom-right-radius: 16px; }
.scan-line { position: absolute; left: 7%; right: 7%; top: 50%; height: 2px; border-radius: 999px; background: var(--grad); box-shadow: 0 0 14px 2px rgba(56,217,190,.55); }
@media (prefers-reduced-motion: no-preference) {
  .scan-line { animation: scan-sweep 2.4s ease-in-out infinite alternate; }
  @keyframes scan-sweep { from { top: 8%; } to { top: 92%; } }
}
.scan-pill { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 999px; background: rgba(12,14,16,.62); border: 1px solid rgba(255,255,255,.18); color: #fff;
  font-size: 14px; font-weight: 500; white-space: nowrap; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.scan-pill .icon { color: var(--mint); }
.scan-x { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 12px; z-index: 2; width: 44px; height: 44px; min-height: 0; padding: 0;
  border-radius: 50%; background: #fff; border: 0; color: var(--ink); box-shadow: 0 6px 18px -8px rgba(0,0,0,.6); }
.scan-x:hover { background: var(--mint-tint); color: var(--ink); }
.scan-sheet { position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; gap: 6px; margin-top: -22px; padding: 22px 20px calc(env(safe-area-inset-bottom) + 18px);
  border-radius: 22px 22px 0 0; background: #fff; color: var(--text); }
.scan-title { font-size: 20px; letter-spacing: -.02em; }
.scan-text { font-size: 15px; line-height: 1.45; color: var(--dim); }
.scan-msg { margin-top: 6px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 500; line-height: 1.4;
  background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--warn); }
.scan-msg.is-ok { background: var(--mint-tint); border-color: var(--mint-line); color: var(--mint-deep); }
.scan-done { width: 100%; margin-top: 10px; }
a.scan-x { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
/* The Scan page (/me/scan, owner 2026-11-23: "both should work"): behind the view, which opens over
   it at once, what the page is for and the way back to the QR window. */
.scan-page { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto;
  padding: 48px 20px 64px; text-align: center; }
.scan-page-title { font-size: 24px; letter-spacing: -.02em; }
.scan-page-text { font-size: 15px; line-height: 1.45; color: var(--dim); }
/* The QR window's Scan button, apart from the code: a hairline, then the button. */
.qw-scan { display: flex; justify-content: center; width: 100%; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.qw-scan-btn { width: min(100%, 320px); }
@media (min-width: 720px) {
  .scan[open] { inset: 0; width: 420px; height: min(780px, calc(100% - 48px)); margin: auto; border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); }
  .scan-sheet { border-radius: 22px 22px 0 0; }
}

/* ------------------------------------------------------------------ the page a scan opens, the public card */
.page-card main { background: #fff; }
.cp { display: flex; flex-direction: column; gap: 16px; max-width: 600px; margin: 0 auto; padding: 26px 16px 72px; }
.cp-note, .cp-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.cp-note .icon, .cp-banner .icon { flex: none; margin-top: 2px; }
.cp-note { background: var(--mint-tint); border: 1px solid var(--mint-line); color: var(--mint-deep); font-weight: 500; }
.cp-banner { background: var(--tint); border: 1px solid var(--line); color: var(--ink-2); }
.cp-banner-warn { background: var(--warn-tint); border-color: var(--warn-line); color: var(--warn); font-weight: 500; }
.cp-banner-violet { background: var(--violet-tint); border-color: var(--violet-line); color: var(--violet-text); }
.cp-banner-violet a { color: var(--violet-text); font-weight: 600; }

.pc { background: #fff; border: 1px solid var(--line-card); border-radius: 22px; box-shadow: var(--shadow-card); overflow: hidden; }
.pc-stage { position: relative; height: 104px; padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.6) 0, rgba(255,255,255,0) 50%),
    repeating-linear-gradient(90deg, rgba(11,133,115,.08) 0 1px, transparent 1px 6px),
    radial-gradient(420px 180px at 18% 130%, #d9f8f0, rgba(217,248,240,0) 70%),
    radial-gradient(420px 180px at 84% 130%, #e7e0fd, rgba(231,224,253,0) 70%), var(--stage); }
.pc-chip { position: absolute; top: 14px; right: 14px; gap: 5px; height: 28px; padding: 0 11px; font-size: 13px; box-shadow: 0 4px 12px -6px rgba(16,24,40,.25); }
.pc-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: -48px; padding: 0 22px 18px; position: relative; }
.pc-avatar { width: 96px; height: 96px; font-size: 32px; letter-spacing: -.02em; background-color: #fff; border: 4px solid #fff;
  box-shadow: 0 10px 26px -12px rgba(12,14,16,.45); }
.avatar-initials.pc-avatar { background: var(--grad); }
.pc-name { margin-top: 10px; font-size: clamp(27px, 4vw, 34px); line-height: 1.08; letter-spacing: -.032em; }
.pc-role { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; font-size: 16.5px; line-height: 1.4; color: var(--dim); }
.pc-company { color: var(--ink-2); font-weight: 500; }
.pc-talk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 22px 18px; }
.pc-talk > :only-child { grid-column: 1 / -1; }
.pc-box { padding: 12px 14px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); min-width: 0; }
.pc-box-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--mint-deep); text-transform: uppercase; letter-spacing: .04em; }
.pc-box-text { margin-top: 5px; font-size: 15.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.pc-rows { margin: 0; padding: 8px 10px 10px; list-style: none; border-top: 1px solid var(--line); }
.pc-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 9px 12px; border-radius: 14px; color: var(--text); text-decoration: none;
  transition: background .15s; }
.pc-row:hover { background: var(--tint); color: var(--text); }
.pc-row-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--mint-tint); border: 1px solid var(--mint-line); color: var(--mint-deep); }
.pc-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pc-row-label { font-size: 13px; color: var(--faint); }
.pc-row-value { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.pc-row-go { margin-left: auto; color: var(--faint); }
/* A ticked phone's WhatsApp: its icon beside the phone's (owner, 2026-11-22: "whatsapp icon should
   just show the whatsapp icon next to the phone icon, not to copy the whole phone in the business
   card"). The phone's link leaves the room (`.pc-wa-room`); the WhatsApp link sits over it, a link
   of its own, 44 px to press. */
.pc-li { position: relative; }
.pc-wa-room { flex: none; width: 40px; height: 40px; }
.pc-wa { position: absolute; top: 50%; left: 64px; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--mint-line); background: var(--mint-tint); color: var(--mint-deep);
  transform: translateY(-50%);
  transition: background .15s; }
.pc-wa::after { content: ""; position: absolute; inset: -2px; }
.pc-wa:hover { background: var(--mint-line); color: var(--mint-deep); }
.pc-wa:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.pv-row-wa[hidden] { display: none; }
.pc-only-name { padding: 0 22px 20px; font-size: 14.5px; color: var(--dim); }

.cp-next { display: flex; flex-direction: column; gap: 14px; }
.cp-wide { width: 100%; }
.cp-actions { display: flex; flex-direction: column; gap: 10px; }
.cp-actions-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-actions-row .btn { flex: 1 1 200px; }
.cp-more > summary { list-style: none; justify-content: flex-start; width: 100%; padding: 0 16px; white-space: normal; text-align: left; line-height: 1.25; }
.cp-more > summary::-webkit-details-marker { display: none; }
.cp-more > summary > span { flex: 1; }
.cp-caret { color: var(--faint); transition: transform .15s; }
.cp-more[open] > summary { border-color: var(--ink); }
.cp-more[open] .cp-caret { transform: rotate(180deg); }
.cp-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; padding: 18px 16px; border: 1px solid var(--line-card); border-radius: 18px;
  background: #fff; box-shadow: var(--shadow-card); }
.cp-form-help { font-size: 14.5px; line-height: 1.45; color: var(--dim); }
.ce-error { color: var(--warn); font-size: 13.5px; font-weight: 500; }
.cp-error-line { padding: 10px 12px; border-radius: 12px; background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--warn); font-size: 14.5px; }
.cp-error-line a { color: var(--warn); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cp-error-go { display: flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 4px; }
.cp-error-go .icon { flex: none; }
/* A signed-out person at a QR визитка: the owner's three buttons (2026-11-23), one under the other,
   each as wide and as tall as the others, their words centred (cards/card.html; the `.login-box`
   class keeps the Terms box and Google's form together for static/js/terms.js). The guest's old
   actions (Save to contacts, e-mail, Leave your details, the sign-up box) went with their rules. */
.cp-three { padding: 18px 16px 16px; border: 1px solid var(--line-card); border-radius: 18px; background: #fff; box-shadow: var(--shadow-card); }
.cp-three-lead { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; color: var(--text); text-align: center; }
.cp-three-why { margin: -6px 0 4px; font-size: 14px; line-height: 1.45; color: var(--dim); text-align: center; }
.cp-three form { margin: 0; }
.cp-three .cp-three-btn { min-height: 52px; white-space: normal; text-align: center; line-height: 1.25; }
.cp-three .cp-more > summary.cp-three-btn { justify-content: center; padding: 0 14px; text-align: center; }
.cp-three .cp-more > summary.cp-three-btn > span { flex: 0 1 auto; }
.cp-three .cp-pass .cp-form { margin-top: 10px; box-shadow: none; }
.cp-three .login-submit { min-height: 52px; white-space: normal; }
.cp-three + .cp-fine { justify-content: flex-start; padding: 0 6px; text-align: left; }  /* icon and words together when they wrap */
/* A narrow phone (360 px): each button's words on one line. */
@media (max-width: 380px) {
  .cp-three { padding: 16px 12px 14px; }
  .cp-three .cp-three-btn, .cp-three .login-submit { padding: 0 10px; font-size: 15px; gap: 8px; }
  .cp-three .cp-pass .cp-form { padding: 16px 12px; }
}
/* Under a guest's three buttons (owner, 2026-11-23): signed in in another browser, scan there with the
   header's scan icon. Quiet: small, dim, no box; the two icons drawn as the header's buttons. */
.cp-elsewhere { margin: 0; padding: 0 6px; font-size: 13.5px; line-height: 1.6; color: var(--dim); text-align: left; }
.cp-key { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0 1px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); vertical-align: -7px; }
.cp-fine { display: flex; align-items: flex-start; justify-content: center; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--faint); text-align: center; }
.cp-fine .icon { flex: none; margin-top: 2px; }
.cp-saved { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--mint-tint); border: 1px solid var(--mint-line); color: var(--mint-deep); }
.cp-saved-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: var(--ink); }
.cp-saved-title { font-size: 16.5px; font-weight: 600; }
.cp-saved-sub { font-size: 13.5px; color: var(--mint-deep); }
.cp-panel { padding: 18px 16px; border: 1px solid var(--line-card); border-radius: 18px; background: #fff; box-shadow: var(--shadow-card); }
.cp-confirm { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; border-radius: 18px; border: 1px solid var(--line);
  background-color: var(--tint); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.cp-confirm-title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.cp-confirm-text { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.cp-confirm form { margin-top: 4px; }
.cp-msg { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 12px; padding: 38px 22px; border: 1px solid var(--line); border-radius: 22px;
  text-align: center; background-color: var(--tint); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.cp-msg-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; background: var(--grad); color: #fff;
  box-shadow: 0 10px 24px -14px rgba(12,14,16,.45); }
.cp-msg-title { font-size: 26px; line-height: 1.15; letter-spacing: -.028em; }
.cp-msg-text { max-width: 440px; font-size: 16px; line-height: 1.5; color: var(--dim); }
.cp-msg .cp-actions-row { justify-content: center; margin-top: 8px; width: 100%; }
.cp-msg .cp-actions-row .btn { flex: 0 1 auto; }
@media (max-width: 520px) {
  .pc-talk { grid-template-columns: minmax(0, 1fr); }
  .pc-head { padding: 0 18px 16px; }
  .pc-talk { padding: 0 18px 16px; }
  .cp-msg .cp-actions-row .btn { flex: 1 1 100%; }
}

/* ------------------------------------------------------------------ the card editor (/me/card) */
.ce { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "top top" "main side"; gap: 18px 32px; align-items: start;
  padding-top: 26px; padding-bottom: 80px; }
.ce-top { grid-area: top; display: flex; flex-direction: column; gap: 12px; }
.ce-main { grid-area: main; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ce-side { grid-area: side; position: sticky; top: 20px; min-width: 0; scroll-margin-top: 20px; }
.ce-quick { display: flex; flex-wrap: wrap; gap: 10px; }
.ce-form { display: flex; flex-direction: column; gap: 18px; }
.ce-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 16px 0; border-top: 1px solid var(--line); }
.me-card-head + .ce-field { border-top: 0; padding-top: 0; }
.ce-field:last-child { padding-bottom: 0; }
.ce-field > label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ce-field input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; font-size: 16px; }
.ce-field small { font-size: 13px; color: var(--dim); }
.ce-field.has-error input { border-color: var(--warn); }
.ce-field small.ce-error { color: var(--warn); font-weight: 500; }
.ce-all-see { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; padding: 10px 12px; border-radius: 12px;
  background: var(--mint-tint); border: 1px solid var(--mint-line); font-size: 14px; line-height: 1.45; color: var(--mint-deep); }
.ce-all-see .icon { flex: none; margin-top: 2px; }
.ce-save { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; padding: 12px 0 calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }

.ce-photo-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ce-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ce-photo-actions form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ce-file { position: relative; overflow: hidden; cursor: pointer; }
.ce-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 0; }
.ce-file:focus-within { outline: 2px solid var(--mint-text); outline-offset: 2px; }

/* The card's own address (owner, 2026-11-21): zdrasti.live/[input], the old ones, the QR. */
.ce-addr-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 14px 16px;
  border-radius: 14px; background: var(--tint); border: 1px solid var(--line); }
.ce-addr-text { min-width: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.ce-addr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ce-addr-actions .btn { min-height: 44px; }
.ce-addr .qr-dl { margin-top: 14px; }
.ce-addr-form { margin-top: 6px; }
.ce-addr-field { border-top: 0; padding-bottom: 10px; }
.ce-addr-input { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; }
.ce-addr-input:focus-within { outline: 2px solid var(--mint-text); outline-offset: 1px; }
.ce-addr-host { display: inline-flex; align-items: center; flex: none; padding: 0 4px 0 14px; font-size: 16px; color: var(--dim); background: var(--tint);
  border-right: 1px solid var(--line); white-space: nowrap; }
.ce-field .ce-addr-input input { flex: 1; min-width: 0; height: 46px; padding: 0 12px 0 6px; border: 0; border-radius: 0; box-shadow: none; outline: none; }
.ce-addr-field.has-error .ce-addr-input { border-color: var(--warn); }
.ce-addr-drop { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; }
.ce-addr-drop legend { padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ce-addr-drop.has-error { border-color: var(--warn); }
.ce-addr-drop-item { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.ce-addr-drop-item input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.ce-addr-drop .ce-error { display: block; font-size: 13px; color: var(--warn); font-weight: 500; }
.ce-addr-save { min-height: 44px; }
.ce-addr-old { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ce-addr-old-title { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ce-addr-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; padding: 0; list-style: none; }
.ce-addr-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.ce-addr-old-text { min-width: 0; font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.ce-addr-del { flex: none; min-height: 44px; }
.ce-renew { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ce-renew .btn { min-height: 44px; }

.ce-preview { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 20px;
  background-color: var(--tint); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.ce-preview-head h2 { font-size: 19px; letter-spacing: -.02em; }
.ce-preview-head p { margin-top: 2px; font-size: 13.5px; color: var(--dim); }
.ce-pv { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.ce-pv-cap { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ce-pv-cap .icon { color: var(--mint-text); }
.pv { background: #fff; border: 1px solid var(--line-card); border-radius: 18px; box-shadow: var(--shadow-card); overflow: hidden; }
.pv-stage { height: 58px;
  background: repeating-linear-gradient(90deg, rgba(11,133,115,.08) 0 1px, transparent 1px 6px),
    radial-gradient(240px 110px at 18% 130%, #d9f8f0, rgba(217,248,240,0) 70%), radial-gradient(240px 110px at 84% 130%, #e7e0fd, rgba(231,224,253,0) 70%), var(--stage); }
.pv-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: -34px; padding: 0 16px 12px; }
.pv-avatar { width: 68px; height: 68px; font-size: 23px; border: 3px solid #fff; background-color: #fff; object-fit: cover; box-shadow: 0 8px 20px -12px rgba(12,14,16,.45); }
.avatar-initials.pv-avatar { background: var(--grad); }
.pv-name { margin-top: 6px; font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pv-role { font-size: 13.5px; color: var(--dim); overflow-wrap: anywhere; }
.pv-talk { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 12px; }
.pv-talk:not(:has(> :not([hidden]))) { display: none; }
.pv-box { padding: 8px 10px; border-radius: 10px; background: var(--tint); border: 1px solid var(--line); }
.pv-box-label { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--mint-deep); text-transform: uppercase; letter-spacing: .04em; }
.pv-box-text { margin-top: 2px; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.pv-rows { margin: 0; padding: 8px 16px 14px; list-style: none; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.pv-rows:not(:has(> :not([hidden]))) { display: none; }
.pv-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.pv-row-icon { display: inline-flex; flex: none; color: var(--mint-text); }
.pv-row-value { min-width: 0; overflow-wrap: anywhere; }

.crop-dialog { width: min(420px, calc(100% - 32px)); }
.crop-view { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 6px auto 0; overflow: hidden; border-radius: 16px; background: var(--dark);
  touch-action: none; cursor: grab; user-select: none; }
.crop-view.is-dragging { cursor: grabbing; }
.crop-view img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(12,14,16,.5); outline: 2px solid rgba(255,255,255,.9); outline-offset: -2px; pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; color: var(--faint); }
.crop-zoom input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; accent-color: var(--mint-text); box-shadow: none; }
.crop-status { min-height: 18px; font-size: 13.5px; color: var(--mint-deep); text-align: center; }

@media (min-width: 1100px) {
  .ce { grid-template-columns: minmax(0, 1fr) 400px; }
}
@media (max-width: 860px) {
  .ce { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "side" "main"; gap: 18px; padding-top: 20px; }
  .ce-side { position: static; }
}
@media (max-width: 640px) {
  .ce-quick .btn { flex: 1 1 100%; }
  .ce-preview { padding: 14px; border-radius: 18px; }
  .ce-addr-actions, .ce-addr-actions .btn, .qr-dl-btn, .ce-addr-save, .ce-renew .btn { width: 100%; }
  .ce-addr-actions .btn { flex: 1 1 0; }
  .ce-photo-actions, .ce-photo-actions form { width: 100%; }
  .ce-photo-actions .btn { flex: 1 1 100%; min-height: 44px; }
  .ce-save .btn { width: 100%; }
}

/* ------------------------------------------------------------------ the first card */
.cm { display: flex; flex-direction: column; gap: 16px; max-width: 640px; padding-top: 26px; padding-bottom: 80px; }
.cm .me-card-head h2 { font-size: 19px; }
.cm-card .ce-field:first-of-type { border-top: 0; padding-top: 0; }
.cm-go { display: flex; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 640px) {
  .cm-go .btn { width: 100%; }
}

/* ------------------------------------------------------------------ the card container (owner, 2026-11-21) */
.ce-need { font-weight: 500; color: var(--faint); }
.ce-tick { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 2px; cursor: pointer; font-size: 15px; color: var(--ink-2); }
.ce-tick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ce-tick-box { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px;
  border: 1.5px solid var(--line-strong); background: #fff; color: transparent; transition: background .15s, border-color .15s; }
.ce-tick input:checked + .ce-tick-box { background: var(--ink); border-color: var(--ink); color: var(--mint); }
.ce-tick input:focus-visible + .ce-tick-box { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.ce-tick-text { display: inline-flex; align-items: center; gap: 7px; }
.ce-tick-text .icon { color: var(--mint-text); flex: none; }

.ce-kindwrap { padding: 16px 0 0; border-top: 1px solid var(--line); }
.ce-kind { min-width: 0; margin: 0; padding: 0; border: 0; }
.ce-kind-legend { padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ce-kind-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ce-kind-item { position: relative; display: flex; min-width: 0; cursor: pointer; }
.ce-kind-item input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ce-kind-face { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 64px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-2); transition: border-color .15s, background .15s; }
.ce-kind-face > .icon { flex: none; margin-top: 2px; color: var(--faint); }
.ce-kind-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ce-kind-words b { font-size: 16px; font-weight: 600; color: var(--text); }
.ce-kind-words small { font-size: 13px; line-height: 1.35; color: var(--dim); }
.ce-kind-item:hover .ce-kind-face { border-color: var(--line-hover); }
.ce-kind-item input:checked + .ce-kind-face { border-color: var(--ink); background: var(--tint); box-shadow: inset 0 0 0 1px var(--ink); }
.ce-kind-item input:checked + .ce-kind-face > .icon { color: var(--mint-text); }
.ce-kind-item input:focus-visible + .ce-kind-face { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.ce-kind .ce-error { display: block; margin-top: 8px; }

.ce-block { margin-top: 14px; padding: 4px 16px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--tint); scroll-margin-top: 20px; }
.ce-block-title { display: flex; align-items: center; gap: 7px; padding: 12px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--mint-deep); }
.ce-block .ce-field:first-of-type { border-top: 0; }
.ce-block .ce-field input[type="text"], .ce-block .ce-field input[type="tel"], .ce-block .ce-field input[type="url"] { background: #fff; }
.ce-block-fine { margin-top: 10px; }
/* Фирма / Соло: only the chosen kind's block (static/js/card_editor.js also sets `hidden`). */
/* Фирма adds the Фирма part, Соло the website under the choice (owner, 2026-11-22: "should add/remove
   the business container and add website below the choice"). */
.ce-acc:has(input[name="kind"][value="solo"]:checked) [data-kind-block="company"],
.ce-acc:has(input[name="kind"][value="company"]:checked) [data-kind-block="solo"] { display: none; }
.ce-solo { margin-top: 4px; }
.ce-solo .ce-field:first-child { border-top: 0; }

.ce-ro { padding: 8px 0 4px; }
.ce-ro-name { font-size: 17px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ce-ro-rows { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ce-ro-rows li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.ce-ro-rows .icon { flex: none; color: var(--mint-deep); }
.ce-ro-note { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.ce-ro-note .icon { flex: none; margin-top: 2px; color: var(--faint); }
.ce-vis-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ce-co-link { margin-top: 12px; }
.ce-co-link .btn { min-height: 44px; }

.co-logo { display: inline-block; flex: none; width: 20px; height: 20px; margin-right: 6px; border-radius: 5px; border: 1px solid var(--line);
  object-fit: cover; vertical-align: -4px; background: #fff; }
.pc-company, .pv-company, .ce-ro-company { display: inline-flex; align-items: center; min-width: 0; }
.pv-company[hidden] { display: none; }

/* The editor's two parts, one open at a time (owner, 2026-11-22: "Единия контейнер трябва да се
   казва Личен профил, другия Фирма. И винаги само единия да е отворен - тоест да са акордеон
   логика"; templates/cards/_container.html). Each part is a white card; its head is the whole
   press (64 px at least), the caret turning as it opens. */
.ce-acc { display: flex; flex-direction: column; gap: 14px; }
.ce-part { background: #fff; border: 1px solid var(--line-card); border-radius: var(--radius); box-shadow: var(--shadow-card);
  scroll-margin-top: 20px; transition: border-color .15s; }
.ce-part[open] { border-color: var(--line-strong); }
.ce-part-head { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 16px 20px; list-style: none; cursor: pointer;
  border-radius: var(--radius); }
.ce-part-head::-webkit-details-marker { display: none; }
.ce-part-head:hover .ce-part-title { text-decoration: underline; text-underline-offset: 3px; }
.ce-part-head:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.ce-part-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ce-part-title { font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: var(--text); }
.ce-part-help { font-size: 14px; color: var(--dim); }
.ce-part-caret { flex: none; margin-left: auto; color: var(--ink-2); transition: transform .2s ease; }
.ce-part[open] .ce-part-caret { transform: rotate(180deg); }
.ce-part-body { padding: 0 20px 20px; }
.ce-part-body > .ce-all-see { margin-top: 2px; }
/* Two fields a row from 720 px (owner: "Name and position - in one row in PC", "linkedin and
   facebook - in one row in PC"); one under the other on a phone. */
.ce-pair { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .ce-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; } }
/* "(по избор)" after a label: quieter than the label. */
.ce-opt { font-weight: 500; color: var(--faint); }
/* The WhatsApp tick on the phone's own row (owner: "put the checkbox on the same row as the phone
   and just rename it to whatsapp"). */
.ce-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ce-line > input { flex: 1 1 auto; min-width: 0; }
.ce-line > .ce-tick { flex: none; margin: 0; }
.ce-ro-wa { display: inline-flex; margin-left: 4px; color: var(--mint-deep); }
/* "Публичен профил" over Личен профил's fields (owner, 2026-11-22: "should be just - публичен профил"). */
.ce-public { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 5px 10px; border-radius: 999px;
  background: var(--mint-tint); border: 1px solid var(--mint-line); color: var(--mint-deep); font-size: 13px; font-weight: 600; }
.ce-public .icon { flex: none; }
/* The pictures on one row: the photo, then the banner taking the rest (owner, 2026-11-22: "make
   upload and remove avatar buttons just icons, add banner for the personal profile on the same
   row"); the logo and the company's banner the same in Фирма. Each: its name, then the picture
   with its icon buttons stacked beside it. */
.ce-media { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 12px 0 16px; scroll-margin-top: 20px; }
.ce-pic { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ce-pic-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ce-pic-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ce-pic-img, .ce-pic-none { flex: none; width: 80px; height: 80px; border: 1px solid var(--line); background: #fff; object-fit: cover; }
.ce-pic-round .ce-pic-img, .ce-pic-round .ce-pic-none { border-radius: 50%; }
.ce-pic-square .ce-pic-img, .ce-pic-square .ce-pic-none { border-radius: 16px; }
.ce-pic-wide .ce-pic-img, .ce-pic-wide .ce-pic-none { flex: 1 1 auto; width: auto; min-width: 0; max-width: 320px; height: auto; aspect-ratio: 4 / 1;
  border-radius: 12px; }
.ce-pic-none { display: inline-flex; align-items: center; justify-content: center; color: var(--faint); border-style: dashed; border-color: var(--dash); }
.ce-pic-round .ce-pic-none { border: 0; background: var(--grad); color: #fff; font-size: 26px; font-weight: 600; }
.ce-pic-tools { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ce-pic-tools .icon-btn { width: 37px; height: 37px; min-height: 0; padding: 0; border-radius: 11px; }
.ce-pic.has-error .ce-pic-none, .ce-pic.has-error .ce-pic-img { border-color: var(--warn); }
.ce-media + .ce-field, .ce-media + .ce-pair .ce-field { border-top: 1px solid var(--line); }
/* "Смени адреса" in Личен профил: zdrasti.live/[input], its save and the old addresses' list as icons. */
.ce-part .ce-addr-field { border-top: 1px solid var(--line); padding-bottom: 16px; scroll-margin-top: 20px; }
.ce-addr-field .ce-line > .ce-addr-input { flex: 1 1 auto; }
.ce-addr-field .ce-line > .icon-btn { flex: none; width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 12px; }
/* The card's address, "Свали постоянния QR код" and the new codes under the preview (owner: "add the
   url below the preview on the right. Add download QR below the URL"). */
.ce-side-addr { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.ce-side-addr .ce-addr-now { flex-wrap: nowrap; padding: 8px 8px 8px 14px; }
.ce-side-addr .ce-addr-text { font-size: 16px; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 3px; }
.ce-side-addr .ce-addr-text:hover { text-decoration-color: currentColor; }
.ce-addr-copy { flex: none; min-height: 0; padding: 0; border-radius: 11px; }
.ce-addr-copy .feed-copy-label { display: inline-flex; }
.ce-addr-copy .feed-copy-label[hidden], .ce-addr-copy[hidden] { display: none; }
.ce-side-addr .qr-dl { margin-top: 0; }
.ce-side-addr .ce-renew { margin-top: 0; }
/* A banner's crop: a 4 x 1 strip (static/js/cropper.js "wide"). */
.crop-dialog.is-wide { width: min(640px, calc(100% - 32px)); }
.crop-dialog.is-wide .crop-view { width: 100%; aspect-ratio: 4 / 1; }
.crop-dialog.is-wide .crop-ring { border-radius: 10px; }
/* The card's banner across its top (the public card's stage, the preview's). */
.pc-stage.has-banner, .pv-stage.has-banner { position: relative; overflow: hidden; height: auto; aspect-ratio: 4 / 1; background: var(--tint); }
.pc-stage.has-banner::before, .pc-stage.has-banner::after, .pv-stage.has-banner::before, .pv-stage.has-banner::after { display: none; }
.pc-banner, .pv-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-stage .pc-chip { z-index: 1; }  /* over the banner */
.pc-stage.has-banner + .pc-head, .pv-stage.has-banner + .pv-head { position: relative; z-index: 1; }  /* the photo over the banner's edge */

@media (max-width: 640px) {
  .ce-part-head { padding: 14px 16px; gap: 12px; }
  .ce-part-body { padding: 0 16px 16px; }
  .ce-media { gap: 14px; }
  .ce-pic-round .ce-pic-img, .ce-pic-round .ce-pic-none, .ce-pic-square .ce-pic-img, .ce-pic-square .ce-pic-none { width: 68px; height: 68px; }
}
/* A narrow phone: the photo or the logo over its banner, so the banner's preview takes the width
   (review 2026-11-22b r8-15: beside "Лого на фирмата (по избор)" the company's was a 45 x 10 px sliver). */
@media (max-width: 400px) {
  .ce-media { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ce-pic-wide .ce-pic-img, .ce-pic-wide .ce-pic-none { max-width: none; }
}

/* The cropper's extra controls (static/js/cropper.js). */
.crop-view:focus-visible { outline: 3px solid var(--mint-text); outline-offset: 3px; }
.crop-dialog.is-square .crop-ring { border-radius: 14px; }
.crop-zoom { gap: 8px; }
.crop-step { flex: none; width: 44px; min-height: 44px; padding: 0; border-radius: 12px; color: var(--ink-2); }
.crop-keys { font-size: 13px; color: var(--dim); text-align: center; }

@media (max-width: 640px) {
  .ce-block { padding: 2px 12px 14px; }
  .ce-kind-face { padding: 10px 12px; }
  .ce-co-link .btn { width: 100%; }
}
@media (max-width: 400px) {
  .ce-kind-seg { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ Моята фирма and the invitation (docs/18) */
/* The page's column starts where its header does (visual review 2026-11-22, v1-14: the cards were a
   centred column under a left-aligned title and tabs), at most 760 px wide. */
.co { display: flex; flex-direction: column; gap: 18px; padding-top: 26px; padding-bottom: 80px; }
.co > * { width: 100%; max-width: 760px; }
/* Oneself without a name: the way to add it (v1-15); a name made from the e-mail: "Добави име" (v1-27). */
.co-add-name, .op-add-name { display: inline-flex; align-items: center; min-height: 44px; margin-left: 6px; font-size: 14.5px; font-weight: 600;
  color: var(--mint-deep); vertical-align: middle; }
.co-data-logo { flex: none; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); object-fit: cover; }
.co-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.co-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); text-decoration: none; }
.co-row:hover { background: var(--tint); border-color: var(--line-strong); color: var(--text); }
.co-row > .icon { flex: none; color: var(--mint-text); }
.co-row > span { display: flex; flex-direction: column; min-width: 0; }
/* The company phone's WhatsApp icon beside the phone's, a link of its own (as the card's `.pc-wa`). */
.co-li { position: relative; }
.co-wa-room { flex: none; width: 28px; height: 28px; }
.co-wa { position: absolute; top: 50%; left: 43px; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; background: var(--mint-tint); color: var(--mint-deep); transform: translateY(-50%); }
.co-wa::after { content: ""; position: absolute; inset: -6px; }
.co-wa:hover { background: var(--mint-line); color: var(--mint-deep); }
.co-wa:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.co-row-label { font-size: 12.5px; font-weight: 600; color: var(--faint); }
.co-row-value { font-size: 15px; overflow-wrap: anywhere; }
.co-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.co-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.co-person:first-child { border-top: 0; padding-top: 0; }
.co-person-who { min-width: 0; flex: 1 1 220px; }
.co-person-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.co-me { font-weight: 500; color: var(--dim); }
.co-person-sub { margin-top: 2px; font-size: 14px; color: var(--dim); overflow-wrap: anywhere; }
.co-role { vertical-align: 1px; }
.co-expired { color: var(--warn); }
.co-person-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.co-person-actions form { margin: 0; }
.co-person-actions .btn { min-height: 44px; }
.co-leave { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.co-leave .btn { min-height: 44px; }
.co-invite-form { display: flex; flex-direction: column; gap: 14px; }
.co-invite-form .ce-field { padding: 0; border-top: 0; }
.co-invite-form > .btn { align-self: flex-start; }
.co-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.co-roles legend { grid-column: 1 / -1; margin-bottom: 8px; padding: 0; }
.co-role-item { position: relative; display: flex; min-width: 0; cursor: pointer; }
.co-role-item input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.co-role-item > span { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 56px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: #fff; }
.co-role-item b { font-size: 15.5px; font-weight: 600; }
.co-role-item small { font-size: 13px; line-height: 1.35; color: var(--dim); }
.co-role-item input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--tint); }
.co-role-item input:focus-visible + span { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.co-sub { margin: 22px 0 8px; font-size: 15px; color: var(--ink-2); }
.co-confirm, .co-join-card { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.co-confirm h2, .co-join-h { font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
.co-confirm p, .co-join-card > p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.co-confirm-icon.is-danger { background: var(--warn-tint); color: var(--warn); }
.co-confirm-buttons, .co-join-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.co-confirm-buttons .btn, .co-join-actions .btn { min-height: 48px; }
.co-join-actions form { margin: 0; }
.co-join { align-items: center; }
.co-join-role { font-weight: 600; }
.co-join-fine { display: flex; align-items: flex-start; gap: 7px; font-size: 13.5px !important; color: var(--dim) !important; }
.co-join-fine .icon { flex: none; margin-top: 3px; }
.co-join-q { font-size: 17px !important; font-weight: 600; color: var(--text) !important; }
@media (max-width: 640px) {
  .co { padding-top: 18px; }
  .co-person-actions, .co-person-actions form, .co-person-actions .btn { width: 100%; }
  .co-invite-form > .btn, .co-confirm-buttons .btn, .co-join-actions .btn, .co-join-actions form { width: 100%; }
  .co-confirm-buttons { flex-direction: column-reverse; }
}
@media (max-width: 400px) {
  .co-roles { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ my code in the big modal (owner, 2026-11-21) */
/* The modal's own size is tamsme.css's `.modal:has(.modal-qr)`; this is its inside. */
.qrs-modal { max-width: 560px; margin: 0 auto; padding: 22px 22px 26px; text-align: center; }
.qrs-modal .qrs-main { padding-top: 22px; }
.qrs-eyebrow { margin: 0; padding-top: 6px; text-align: center; color: var(--faint); }
.qrs-modal .qrs-name { font-size: 26px; }
.qrs-modal .qrs-code { width: min(360px, 100%); }
.qrs-make .cp-msg-icon { margin: 8px auto 4px; }
.qrs-make-text { max-width: 400px; margin: 8px auto 0; font-size: 16px; line-height: 1.5; color: var(--dim); }
.qrs-make .qrs-actions { justify-content: center; }
.qrs-make .qrs-btn { flex: 0 1 auto; }
@media (max-width: 640px) {
  .qrs-modal { padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 22px); }
  .qrs-modal .qrs-code { width: min(340px, 100%); }
  .qrs-modal .qrs-actions { flex-direction: column; }
  .qrs-make .qrs-btn { flex: 1 1 auto; }
}
.pv-row-tag { font-weight: 600; color: var(--ink-2); }

/* ------------------------------------------------------------------ the QR window (cards/_qr_modal.html)
   Owner, 2026-11-22: "The QR code should always be in a big modal that opens from the QR button
   above which is always visible and should have 3 tabs: QR itself, Preview, EDIT. Edit shouldn't
   have the preview on the side. Clickable URL should be under the QR and simple edit URL should be
   in the edit. nothing else". The window is wider than the old QR modal, so the Edit tab keeps its
   two fields a row (tamsme.css `.modal:has(.qw)`). */
.qw { max-width: 720px; margin: 0 auto; padding: 18px 24px 28px; }
.qw-title { display: flex; align-items: center; min-height: 48px; margin: 0 0 12px; padding-right: 60px; font-size: 22px; letter-spacing: -.02em; outline: none; }  /* room for the X */
.qw .modal-top .modal-close { top: 2px; right: 0; }  /* level with the title */
.qw-tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint); }
.qw-tab { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 10px;
  border-radius: 11px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none; }
.qw-tab:hover { color: var(--text); background: rgba(255,255,255,.6); }
.qw-tab[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 0 0 1px var(--line); }
.qw-tab[aria-selected="true"] .icon { color: var(--mint-text); }
.qw-tab:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.qw-panel[hidden] { display: none; }
/* QR: the code, the card's address as a link under it, "Свали". */
.qw-qr { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qw-qr .qrs-code { width: min(360px, 100%); margin: 6px auto 14px; }
.qw-url { margin: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.qw-url a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.qw-url a:hover { text-decoration-color: currentColor; }
.qw-dl { margin: 14px 0 0; }
.qw-dl .btn { min-height: 44px; }
.qw-make { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 6px; }
/* Preview: the card as everyone sees it. */
.qw-preview .pc { max-width: 480px; margin: 0 auto; }
/* Edit: the form only, its save under it. */
.qw-edit .ce-save { padding-bottom: 0; }
@media (max-width: 640px) {
  .qw { padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 22px); }
  .qw-tab { font-size: 14px; gap: 5px; padding: 0 6px; }
}

/* ------------------------------------------------------------------ paper business cards (docs/23_PAPER_CARDS.md) */
/* The Scan page's second way, /me/scan?paper=1: the switch QR код | Хартиена визитка, a card-shaped
   frame, and one press that takes the picture, reads it and saves it (static/js/paper-card.js); the
   card just saved shows above the button with Отвори, the camera on for the next. */
.paper [hidden] { display: none !important; }
.seg.scan-ways { align-self: flex-start; margin: 0 0 8px; }
.seg.scan-ways a { width: auto; padding: 0 14px; }
.seg.scan-ways span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.scan-frame.is-card { width: min(86%, 380px); aspect-ratio: 85 / 55; }
/* Nothing is read by itself in this way: no sweep, the shutter takes the picture. */
.scan-frame.is-card .scan-line { display: none; }
.paper { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.paper-take { display: flex; flex-direction: column; gap: 10px; }
.paper-buttons { display: flex; flex-direction: column; gap: 8px; }
.paper-buttons .btn { width: 100%; }
.paper-pick { cursor: pointer; }
.paper-left { font-size: 13.5px; color: var(--faint); text-align: center; }
.paper-last { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--tint); }
.paper-last img { flex: none; width: 96px; aspect-ratio: 85 / 55; object-fit: cover; border-radius: 8px; background: var(--tint); }
.paper-last-text { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; font-weight: 500;
  line-height: 1.35; color: var(--ink-2); }
.paper-spin { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--mint-line);
  border-top-color: var(--mint-deep); }
@media (prefers-reduced-motion: no-preference) {
  .paper-spin { animation: paper-spin .8s linear infinite; }
  @keyframes paper-spin { to { transform: rotate(360deg); } }
}
/* While a card is read nothing can be pressed (owner, 2026-11-23): the shutter, the gallery, the
   switch, the way back and the X go; the picture and "Чета визитката..." stay. */
.scan.is-paper-reading .scan-x, .scan.is-paper-reading .seg.scan-ways, .scan.is-paper-reading .scan-done,
.scan.is-paper-reading .paper-buttons, .scan.is-paper-reading .paper-left { display: none !important; }
.paper-used-up { margin-top: 2px; }
