/* qr.studio link-in-bio editor (same tokens as css/studio.css, light only) */
:root {
  --s-bg: #f7f6ff; --s-card: #ffffff; --s-tint: #efedfb; --s-line: #e2def4; --s-ink: #17123a; --s-muted: #5c5880;
  --s-hot: #e8481f; --s-cta: #17123a; --s-cta-hover: #2b2466; --s-good: #0f7a4a; --s-bad: #b42318;
  --s-focus: 0 0 0 3px rgba(108, 92, 255, 0.45); --s-lift: 0 14px 34px -20px rgba(23, 18, 58, 0.38);
  color-scheme: light;
}
.ed { margin: 0; background: var(--s-bg); color: var(--s-ink); font: 400 16px/1.5 "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.ed *, .ed *::before, .ed *::after { box-sizing: border-box; }
.ed-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ed-bar { display: flex; justify-content: space-between; align-items: center; max-width: 1120px; margin: 0 auto; padding: 14px 16px; }
.ed-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--s-ink); text-decoration: none; font: 700 1.25rem "Bricolage Grotesque", sans-serif; min-height: 44px; }
.ed-brand .ed-dot { color: var(--s-hot); }
.ed-bar__link { color: var(--s-muted); text-decoration: none; font-weight: 600; padding: 10px 14px; border-radius: 999px; }
.ed-bar__link:hover { background: var(--s-tint); color: var(--s-ink); }

.ed-main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 64px; }
.ed-intro h1 { margin: 8px 0 8px; font: 700 clamp(2rem, 5vw, 3.25rem)/1.05 "Bricolage Grotesque", sans-serif; letter-spacing: -0.02em; text-wrap: balance; }
.ed-intro em { font-style: italic; color: var(--s-hot); }
.ed-lead { margin: 0 0 28px; max-width: 60ch; color: var(--s-muted); font-size: 1.0625rem; }

.ed-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .ed-grid { grid-template-columns: minmax(0, 1fr) 380px; } .ed-side { position: sticky; top: 16px; } }

.ed-form { display: grid; gap: 16px; min-width: 0; }
.ed-sec { background: var(--s-card); border: 1px solid var(--s-line); border-radius: 20px; padding: 20px; box-shadow: var(--s-lift); min-width: 0; }
.ed-sec h2 { margin: 0 0 14px; font: 700 1.125rem "Bricolage Grotesque", sans-serif; }
.ed-label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 0.9375rem; }
.ed-sec > .ed-label:first-of-type { margin-top: 0; }
.ed-input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--s-line); border-radius: 12px; background: var(--s-bg); color: var(--s-ink); font: inherit; }
textarea.ed-input { resize: vertical; min-height: 72px; }
.ed-input:focus, .ed-handle:focus-within { outline: none; border-color: var(--s-ink); box-shadow: var(--s-focus); }
.ed-hint { margin: 8px 0 0; font-size: 0.875rem; color: var(--s-muted); }
.ed-hint--good { color: var(--s-good); font-weight: 600; }
.ed-hint--bad { color: var(--s-bad); font-weight: 600; }

.ed-handle { display: flex; align-items: center; min-height: 52px; border: 1px solid var(--s-line); border-radius: 12px; background: var(--s-bg); padding-inline-start: 14px; font-size: 1.0625rem; }
.ed-handle span { color: var(--s-muted); white-space: nowrap; }
.ed-handle input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--s-ink); padding-block: 12px; padding-inline: 0 14px; outline: none; }
.ed-handle input[readonly] { color: var(--s-muted); }

.ed-avatar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ed-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font: 600 0.9375rem "Geist", sans-serif; text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.ed-btn--primary { background: var(--s-cta); color: #ffffff; }
.ed-btn--primary:hover { background: var(--s-cta-hover); }
.ed-btn--ghost { background: var(--s-card); border-color: var(--s-line); color: var(--s-ink); }
.ed-btn--ghost:hover { border-color: var(--s-ink); }
.ed-btn--text { background: none; color: var(--s-muted); text-decoration: underline; }
.ed-btn--danger { background: var(--s-card); border-color: #f1c4bf; color: var(--s-bad); }
.ed-btn--danger:hover { background: #fdecea; }
.ed-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ed-btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.ed-btn:focus-visible, .ed-icon:focus-visible, .ed a:focus-visible, .ed-preset input:focus-visible + span, .ed-color input:focus-visible { outline: none; box-shadow: var(--s-focus); }
#ed-avatar-file:focus-visible + label, .ed-avatar label:focus-within { box-shadow: var(--s-focus); }

.ed-rows { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ed-row { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--s-line); border-radius: 14px; background: var(--s-bg); }
.ed-row__fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.ed-row__tools { display: flex; flex-direction: column; gap: 4px; }
.ed-row--social { align-items: center; }
.ed-row--social .ed-field { flex: 1; min-width: 0; }
.ed-row__icon svg { width: 22px; height: 22px; fill: var(--s-ink); display: block; margin: 0 6px; }
.ed-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--s-line); border-radius: 10px; background: var(--s-card); color: var(--s-ink); font-size: 1.125rem; cursor: pointer; }
.ed-icon:disabled { opacity: 0.35; cursor: default; }
.ed-icon:not(:disabled):hover { border-color: var(--s-ink); }
@media (min-width: 640px) { .ed-row__fields { grid-template-columns: 2fr 3fr; } .ed-row__tools { flex-direction: row; } }
.ed-add-social { display: flex; gap: 8px; }
.ed-add-social select { flex: 1; min-width: 0; }

.ed-presets { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ed-presets legend { margin-top: 0; }
.ed-preset { position: relative; }
.ed-preset input { position: absolute; opacity: 0; }
.ed-preset span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--s-line); font-weight: 600; font-size: 0.875rem; cursor: pointer; }
.ed-preset--light span { background: #f7f6ff; color: #17123a; }
.ed-preset--dark span { background: #121019; color: #f4f2ff; }
.ed-preset--sunset span { background: linear-gradient(135deg, #ffd6c9, #d8d2ff); color: #17123a; }
.ed-preset--mint span { background: #e7f6ef; color: #0f2e24; }
.ed-preset--mono span { background: #ffffff; color: #111111; }
.ed-preset input:checked + span { border-color: var(--s-ink); box-shadow: 0 0 0 2px var(--s-ink) inset; }
.ed-look-row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; margin-top: 8px; }
.ed-color { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.ed-color input { width: 44px; height: 44px; padding: 0; border: 1px solid var(--s-line); border-radius: 10px; background: none; cursor: pointer; }
.ed-buttons { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ed-buttons legend { width: 100%; }
.ed-buttons label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.ed-buttons input { width: 18px; height: 18px; accent-color: var(--s-ink); }

.ed-actions { display: flex; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--s-bg) 70%, transparent); z-index: 2; }
.ed-actions .ed-btn--primary { min-height: 52px; padding-inline: 28px; font-size: 1rem; }
.ed-msg { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fdecea; color: var(--s-bad); font-weight: 600; }
.ed-msg--good { background: #e6f5ee; color: var(--s-good); }
.ed-danger { box-shadow: none; }

.ed-side { display: grid; gap: 16px; min-width: 0; }
.ed-done, .ed-stats { background: var(--s-card); border: 2px solid var(--s-ink); border-radius: 20px; padding: 20px; }
.ed-stats { border-width: 1px; border-color: var(--s-line); }
.ed-done h2, .ed-stats h2 { margin: 0 0 8px; font: 700 1.25rem "Bricolage Grotesque", sans-serif; }
.ed-done:focus { outline: none; box-shadow: var(--s-focus); }
.ed-done a#ed-done-url { color: var(--s-ink); font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
.ed-warn { padding: 10px 12px; border-radius: 12px; background: #fff4e5; color: #7a3d00; font-size: 0.9375rem; }
.ed-copy { display: flex; gap: 8px; }
.ed-copy .ed-input { font-size: 0.8125rem; min-width: 0; }
.ed-done-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.ed-stats p { margin: 0 0 8px; }
.ed-stats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9375rem; }
.ed-stats li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--s-line); padding-top: 6px; }
.ed-stats li span { overflow-wrap: anywhere; color: var(--s-muted); }
.ed-stats li strong { white-space: nowrap; font-variant-numeric: tabular-nums; }

.ed-preview-label { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-muted); }
.ed-phone { border: 10px solid #17123a; border-radius: 36px; overflow: hidden; box-shadow: var(--s-lift); max-width: 380px; width: 100%; justify-self: center; }
.ed-preview.bio { min-height: 560px; padding: 36px 16px 20px; }
.ed-preview .bio-link { min-height: 48px; }
.ed-preview .bio-foot { padding-top: 28px; font-size: 0.8125rem; }
.ed-placeholder { opacity: 0.45; }

.ed-copytext { max-width: 68ch; margin-top: 56px; color: var(--s-muted); line-height: 1.65; }
.ed-copytext h2 { color: var(--s-ink); font: 700 1.375rem "Bricolage Grotesque", sans-serif; margin: 28px 0 8px; }
.ed-copytext h3 { color: var(--s-ink); font-size: 1rem; margin: 20px 0 8px; }
.ed-copytext a, .ed-copytext code { color: var(--s-ink); }
.ed-copytext code { background: var(--s-tint); padding: 1px 6px; border-radius: 6px; }
.ed-foot { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: 0.9375rem; }
.ed-foot a { color: inherit; display: inline-block; padding: 10px 2px; }
@media (prefers-reduced-motion: reduce) { .ed * { transition: none !important; } }
.ed-field { display: grid; gap: 4px; }
.ed-input[aria-invalid="true"] { border-color: var(--s-bad); }
.ed-field-error { font-size: 0.8125rem; font-weight: 600; color: var(--s-bad); }
.ed [hidden] { display: none !important; }
/* the address is a URL: keep it left-to-right in RTL languages */
.ed-handle { direction: ltr; }
