:root{--bg:#f5f7fa;--ink:#182335;--muted:#69798d;--line:#e3e8ef;--card:#fff;--accent:#6555e8;--accent2:#493acc;--shadow:0 16px 40px #1823350e}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',sans-serif}h1,h2,h3,h4,p{margin:0}h1,h2,h3{font-family:Manrope,sans-serif}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit}button{cursor:pointer}.shell{max-width:1170px;margin:auto;padding:0 24px}.header{height:78px;border-bottom:1px solid var(--line);background:#fffd;display:flex;align-items:center;position:sticky;top:0;z-index:5;backdrop-filter:blur(14px)}.nav{display:flex;align-items:center;justify-content:space-between;width:100%;gap:18px}.brand{display:flex;align-items:center;gap:11px;font-size:20px;font-family:Manrope;font-weight:800}.brand-symbol{display:grid;place-items:center;border-radius:13px;width:35px;height:35px;color:white;background:linear-gradient(130deg,#6555e8,#19b5be);font-size:25px}.nav-links{display:flex;gap:12px;align-items:center}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:43px;padding:10px 18px;background:var(--accent);border:1px solid var(--accent);border-radius:12px;font-weight:700;color:white;transition:.15s}.btn:hover{background:var(--accent2)}.btn.secondary{background:white;color:var(--ink);border-color:var(--line)}.btn.secondary:hover{background:#f2f1ff}.btn.ghost{color:var(--ink);background:transparent;border-color:transparent}.btn.small{min-height:37px;padding:8px 13px;font-size:13px}.btn.block{width:100%}.btn:disabled{opacity:.45;cursor:not-allowed}.hero{display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:45px;padding:96px 0}.eyebrow{color:var(--accent);text-transform:uppercase;letter-spacing:2px;font-size:12px;font-weight:800;margin-bottom:16px}.hero h1{font-size:clamp(38px,5.4vw,66px);line-height:1.12;letter-spacing:-2.8px;margin-bottom:24px}.hero p{color:var(--muted);line-height:1.8;font-size:17px;max-width:520px}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}.hero-art{background:linear-gradient(135deg,#e4e6ff,#e4f8f4);min-height:500px;border-radius:32px;display:grid;place-items:center;position:relative;overflow:hidden}.hero-art:before,.hero-art:after{content:"";width:220px;height:220px;border:1px solid #ffffffaa;border-radius:50%;position:absolute;top:-100px;right:-70px}.hero-art:after{top:auto;bottom:-130px;right:auto;left:-100px;width:330px;height:330px}.mini-card{width:280px;background:#fff;padding:27px;border-radius:25px;box-shadow:0 35px 80px #3543a022;position:relative;z-index:1;text-align:center;transform:rotate(-5deg)}.avatar{height:90px;width:90px;border-radius:50%;background:#ebe9ff;color:var(--accent);display:grid;place-items:center;font-size:33px;font-weight:800;margin:0 auto 16px;object-fit:cover}.mini-card h3{font-size:23px}.muted{color:var(--muted)}.mini-card p{font-size:13px;line-height:1.7}.fake-icons{display:flex;justify-content:center;gap:10px;margin-top:17px}.fake-icons span{padding:10px;background:#f6f6ff;border-radius:11px;color:var(--accent)}.section{padding:35px 0 80px}.section h2{font-size:32px;margin-bottom:12px}.section>p{color:var(--muted)}.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:19px;margin-top:30px}.feature{padding:27px;border:1px solid var(--line);background:white;border-radius:19px}.feature .emoji{font-size:29px;margin-bottom:17px}.feature h3{font-size:16px;margin-bottom:9px}.feature p{color:var(--muted);font-size:14px;line-height:1.7}.footer{padding:30px 0;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.center-wrap{min-height:calc(100vh - 160px);display:grid;place-items:center;padding:40px 20px}.panel{background:white;border:1px solid var(--line);border-radius:23px;box-shadow:var(--shadow);padding:30px}.auth{width:min(100%,440px)}.auth h2{font-size:27px;margin:10px 0}.auth .muted{font-size:14px;line-height:1.6}.form{display:grid;gap:15px;margin-top:24px}.field{display:grid;gap:7px}.field label{font-size:13px;font-weight:700}.field input,.field textarea{width:100%;padding:12px 13px;border:1px solid #dce1e9;border-radius:11px;background:white;color:var(--ink);outline:none}.field input:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6555e820}.field textarea{resize:vertical;min-height:80px}.hint{font-size:12px;color:var(--muted);line-height:1.6}.tabs{display:flex;gap:6px;padding:5px;background:#f0f2f8;border-radius:12px;margin-top:20px}.tab{flex:1;border:0;background:transparent;padding:11px;border-radius:9px;color:var(--muted);font-weight:700}.tab.active{color:var(--ink);background:white;box-shadow:0 2px 7px #0000000d}.layout{display:grid;grid-template-columns:210px 1fr;gap:26px;padding:35px 0 75px}.side{display:flex;flex-direction:column;gap:7px;align-self:start;position:sticky;top:105px}.side button{border:0;background:transparent;text-align:left;padding:13px 17px;border-radius:12px;color:var(--muted);font-weight:700}.side button.active,.side button:hover{color:var(--accent);background:#eceafd}.top-row{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:22px}.top-row h1{font-size:27px}.top-row p{color:var(--muted);margin-top:7px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px}.profile-form{display:grid;grid-template-columns:1fr 1fr;gap:15px}.profile-form .wide{grid-column:1/-1}.profile-view{background:white;border-radius:23px;border:1px solid var(--line);overflow:hidden;box-shadow:var(--shadow)}.cover{height:125px;background:linear-gradient(135deg,#a79ffc,#6b5ce9,#40c7c7)}.identity{text-align:center;padding:0 24px 26px}.identity .avatar{height:104px;width:104px;margin-top:-52px;border:5px solid white;font-size:37px}.identity h2{font-size:24px;overflow-wrap:anywhere}.identity .title{color:var(--accent);font-weight:700;font-size:14px;margin-top:8px}.identity .bio{font-size:14px;color:var(--muted);line-height:1.7;margin-top:14px;white-space:pre-line;overflow-wrap:anywhere}.social{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;padding:20px 0}.social a{color:#493acc;padding:9px 11px;background:#f1f0ff;border-radius:10px;font-size:13px;font-weight:700}.identity .btn{margin-top:9px}.qrcard{display:grid;place-items:center;padding:22px;border:1px solid var(--line);border-radius:16px;background:white}.qrcard canvas{max-width:100%;height:auto!important}.info-strip{display:flex;gap:10px;align-items:start;background:#f0f7ff;border-radius:12px;color:#3a587d;padding:13px;font-size:13px;line-height:1.6}.contact-item{padding:18px;border:1px solid var(--line);border-radius:14px;background:white;margin:10px 0}.contact-item h3{font-size:15px}.contact-item p{color:var(--muted);font-size:13px;margin-top:5px;overflow-wrap:anywhere}.empty{padding:45px 20px;text-align:center;color:var(--muted)}.public-wrap{max-width:520px;padding:35px 18px 80px;margin:auto}.public-wrap .profile-view{margin-bottom:17px}.form-section{padding:24px}.form-section h3{font-size:19px}.check{display:flex;align-items:start;gap:10px;font-size:12px;color:var(--muted);line-height:1.5}.check input{margin-top:3px}.public-url{word-break:break-word;background:#f5f6fa;border-radius:11px;padding:11px;font-size:13px;color:var(--muted)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#182335;color:white;padding:12px 20px;border-radius:12px;box-shadow:var(--shadow);opacity:0;transition:opacity .2s;pointer-events:none;max-width:90%;z-index:10;font-size:13px}#toast.on{opacity:1}.loader{padding:80px;text-align:center;color:var(--muted)}.error{background:#fff1f1;color:#9d3434;border-radius:12px;padding:12px;font-size:13px;margin:12px 0}.success{background:#eafaf3;color:#17654b;border-radius:12px;padding:12px;font-size:13px;margin:12px 0}@media(max-width:900px){.hero{grid-template-columns:1fr;padding:55px 0}.hero-art{min-height:370px}.dashboard-grid{grid-template-columns:1fr}.layout{grid-template-columns:1fr}.side{position:static;flex-direction:row;overflow:auto}.side button{white-space:nowrap}.feature-grid{grid-template-columns:1fr 1fr}}@media(max-width:540px){.shell{padding:0 16px}.nav-links{gap:4px}.nav-links .btn{font-size:12px;padding:8px 10px}.hero h1{letter-spacing:-1.5px}.feature-grid,.profile-form{grid-template-columns:1fr}.profile-form .wide{grid-column:auto}.panel{padding:20px}.section h2{font-size:26px}.hero-art{min-height:330px}.mini-card{transform:none}.top-row h1{font-size:22px}}

/* Profile image upload and themes — the Loop v1.1 */
.photo-editor,.theme-editor{display:grid;gap:12px;margin:12px 0 20px}
.photo-actions{display:flex;flex-wrap:wrap;gap:8px}
.photo-preview .avatar{width:100px;height:100px;font-size:28px;object-fit:cover}
.theme-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:9px}
.theme-pick{border:1px solid #dce2ec;border-radius:12px;padding:10px 6px;display:flex;gap:6px;align-items:center;justify-content:center;cursor:pointer;font-size:13px}
.theme-pick:has(input:checked){outline:2px solid #6555e8;outline-offset:1px}
.theme-dot{width:25px;height:25px;flex-shrink:0;border-radius:50%;background:linear-gradient(135deg,var(--c1),var(--c2))}
.theme-violet{--c1:#9884ff;--c2:#31b6c2;--button:#6555e8}
.theme-ocean{--c1:#0284c7;--c2:#22d3ee;--button:#0369a1}
.theme-emerald{--c1:#059669;--c2:#a3e635;--button:#047857}
.theme-sunset{--c1:#fb923c;--c2:#ef4444;--button:#c2410c}
.theme-rose{--c1:#ec4899;--c2:#a855f7;--button:#be185d}
.theme-midnight{--c1:#172554;--c2:#475569;--button:#1e3a8a}
.profile-view[class*=theme-] .cover{background:linear-gradient(115deg,var(--c1),var(--c2))!important}
.profile-view[class*=theme-] .btn:not(.secondary){background:var(--button)!important;border-color:var(--button)!important}
#theme-preview{max-width:430px;width:100%}
#theme-preview .profile-view{margin:0}

/* Professional theme collection — the Loop v1.2 */
.theme-executive-navy{--c1:#14263e;--c2:#344f6e;--button:#173453}
.theme-graphite{--c1:#252a32;--c2:#555e69;--button:#303945}
.theme-slate{--c1:#48596c;--c2:#8797a7;--button:#46596d}
.theme-forest{--c1:#153f36;--c2:#477a68;--button:#205545}
.theme-champagne{--c1:#a18b64;--c2:#e1d5bc;--button:#79633e}
.theme-burgundy{--c1:#4c2536;--c2:#87516a;--button:#662f4b}
.theme-ivory{--c1:#c8c4b9;--c2:#eeeae1;--button:#515a65}
.theme-steel-blue{--c1:#285377;--c2:#6f91ab;--button:#285377}
.theme-espresso{--c1:#46332d;--c2:#897063;--button:#574035}
.theme-teal-professional{--c1:#154e5a;--c2:#4e8991;--button:#196071}

/* Profile editor responsive layout and photo crop upgrade */
.theme-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:12px}
.theme-pick{min-width:0;min-height:64px;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:10px 12px;overflow-wrap:anywhere;white-space:normal;line-height:1.25;font-size:13px}
.theme-pick input{flex:0 0 auto;margin:0}
.theme-pick .theme-dot{flex:0 0 25px}
.theme-pick .theme-name{min-width:0;flex:1 1 auto;overflow-wrap:anywhere;word-break:normal}
.photo-preview{display:flex;justify-content:center;padding:18px 0 24px}
.photo-preview .avatar{width:180px;height:180px;border-radius:50%;object-fit:cover;font-size:48px;max-width:100%}
.crop-editor[hidden]{display:none!important}
.crop-editor{display:grid;gap:14px;max-width:440px;padding:18px;border:1px solid #dce2ec;border-radius:16px;background:#fff}
.crop-stage{width:min(100%,320px);aspect-ratio:1;touch-action:none;cursor:grab;overflow:hidden;border-radius:12px;margin:auto}
.crop-stage:active{cursor:grabbing}
.crop-stage canvas{width:100%;height:100%;display:block}
.crop-zoom-label{display:flex;align-items:center;gap:15px}
.crop-zoom-label input{flex:1;min-width:0}
.crop-actions{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:480px){.theme-options{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-pick{padding:10px 8px;gap:7px;font-size:12px}.photo-preview .avatar{width:152px;height:152px}}


/* Appearance settings — light/dark. Card color themes stay as their owners designed them. */
html[data-mode="dark"]{color-scheme:dark;--bg:#101520;--ink:#eff3fb;--muted:#adb9ca;--line:#344157;--card:#202a3a;--accent:#9d91ff;--accent2:#8072ed;--shadow:0 16px 42px #0005}
html[data-mode="dark"] body{background:var(--bg);color:var(--ink)}
html[data-mode="dark"] .header{background:#151d2cf2;border-color:var(--line)}
html[data-mode="dark"] .panel,html[data-mode="dark"] .feature,html[data-mode="dark"] .crop-editor{background:var(--card);color:var(--ink);border-color:var(--line)}
html[data-mode="dark"] .btn.secondary{background:#253249;color:var(--ink);border-color:#40506b}
html[data-mode="dark"] .btn.secondary:hover{background:#354365}
html[data-mode="dark"] .btn.ghost{color:var(--ink)}
html[data-mode="dark"] .side button.active,html[data-mode="dark"] .side button:hover{background:#352e62;color:#c4bbff}
html[data-mode="dark"] .tabs{background:#111b2b}
html[data-mode="dark"] .tab.active{background:#354157;color:#fff}
html[data-mode="dark"] .field input,html[data-mode="dark"] .field textarea,html[data-mode="dark"] .profile-form input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),html[data-mode="dark"] .profile-form textarea,html[data-mode="dark"] .form input:not([type="checkbox"]),html[data-mode="dark"] .form textarea{background:#172235;border-color:#45526b;color:#eef3ff}
html[data-mode="dark"] input::placeholder,html[data-mode="dark"] textarea::placeholder{color:#9eacc2}
html[data-mode="dark"] .info-strip,html[data-mode="dark"] .public-url,html[data-mode="dark"] .qrcard{background:#26334a;color:#e9eefa;border-color:#43516c}
html[data-mode="dark"] .theme-pick{background:#243147;color:var(--ink);border-color:#40506b}
html[data-mode="dark"] .theme-pick:has(input:checked){outline:2px solid var(--accent);border-color:var(--accent)}
html[data-mode="dark"] .contact-item{border-color:var(--line)}
html[data-mode="dark"] .footer{border-color:var(--line)}
html[data-mode="dark"] .feature p,html[data-mode="dark"] .muted,html[data-mode="dark"] .hint{color:var(--muted)}
html[data-mode="dark"] .loader{color:var(--muted)}
/* Public-facing colored profile cards remain unchanged in dark mode. */
html[data-mode="dark"] .profile-view{color:#182335;background:#fff}
html[data-mode="dark"] .profile-view .muted{color:#69798d}
html[data-mode="dark"] .profile-view .btn.secondary{background:#fff;color:#182335;border-color:#dce1e9}
html[data-mode="dark"] .profile-view .btn.secondary:hover{background:#f1f2fa}
@media(max-width:660px){.mode-toggle{padding:8px 10px!important;font-size:12px!important}.nav-links{gap:6px}.header .shell{padding-left:12px;padding-right:12px}.brand{font-size:17px}}

/* Single-row mobile header and accessible dropdown */
.mobile-actions,.mobile-menu{display:none}
@media(max-width:767px){
  .header{height:70px;min-height:70px;position:sticky;top:0;z-index:50}
  .header .shell.nav{padding:0 16px;flex-wrap:nowrap;gap:8px;justify-content:space-between}
  .header .brand{font-size:19px;white-space:nowrap;min-width:0;gap:9px}
  .header .brand-symbol{width:38px;height:38px;flex:0 0 38px}
  .header .nav-links{display:none!important}
  .mobile-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
  .mobile-icon{display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);font-size:23px;line-height:1;cursor:pointer}
  .mobile-icon:focus-visible,.mobile-menu a:focus-visible,.mobile-menu button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
  .mobile-menu:not([hidden]){display:flex;position:absolute;top:100%;right:12px;left:12px;flex-direction:column;gap:3px;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);box-shadow:0 16px 36px #0003;max-height:calc(100dvh - 90px);overflow:auto}
  .mobile-menu a,.mobile-menu button{display:block;width:100%;padding:13px 14px;text-align:left;color:var(--ink);background:transparent;border:0;border-radius:9px;font-size:15px;font-weight:650;line-height:1.3}
  .mobile-menu a:hover,.mobile-menu button:hover{background:var(--bg)}
  .mobile-menu button#mobile-logout{color:#bf4242;border-top:1px solid var(--line);border-radius:0;margin-top:5px}
  html[data-mode="dark"] .mobile-icon{background:#26334a;color:#f3f6fb;border-color:#46536c}
  html[data-mode="dark"] .mobile-menu{background:#1c2739;border-color:#46536c;color:#f3f6fb}
  html[data-mode="dark"] .mobile-menu a,html[data-mode="dark"] .mobile-menu button{color:#f3f6fb}
  html[data-mode="dark"] .mobile-menu button#mobile-logout{color:#f7a5a5}
  html[data-mode="dark"] .mobile-menu a:hover,html[data-mode="dark"] .mobile-menu button:hover{background:#2d3a52}
}
/* Keep biography readable on light-colored cards in both page modes */
.profile-view .bio,html[data-mode="dark"] .profile-view .bio{color:#334155!important;opacity:1!important}

/* Connections: high contrast on white cards in either display mode */
.contact-item,html[data-mode="dark"] .contact-item {background:#fff!important;color:#182335!important;border:1px solid #d9e1eb!important}
.contact-item h3,html[data-mode="dark"] .contact-item h3 {color:#182335!important;font-size:16px;font-weight:700}
.contact-item p,html[data-mode="dark"] .contact-item p {color:#334155!important;font-size:14px;line-height:1.5}
.contact-item .contact-date,html[data-mode="dark"] .contact-item .contact-date {color:#52657d!important;font-size:13px}
.contact-search-row {margin:18px 0 14px}
.contact-search-row label {display:block;font-weight:600;font-size:14px;margin-bottom:8px;color:inherit}
#contact-search,html[data-mode="dark"] #contact-search {display:block;box-sizing:border-box;width:100%;max-width:560px;background:#fff!important;color:#182335!important;border:1px solid #bcc9d9!important;border-radius:12px;padding:12px 14px;font:inherit;font-size:15px}
#contact-search::placeholder,html[data-mode="dark"] #contact-search::placeholder {color:#64748b!important}
#contact-search:focus {outline:2px solid #6555e8;outline-offset:2px}
.contact-count {margin:8px 0 0;font-size:13px;color:var(--muted)}

/* the Loop: fully featured responsive demo, including a real demo QR */
.demo-page{max-width:1120px;margin:0 auto;padding:54px 20px 80px}
.demo-intro{text-align:center;max-width:790px;margin:0 auto 38px}
.demo-tag{display:inline-block;font-size:12px;font-weight:800;letter-spacing:1.5px;color:#8e83ff;background:#6555e820;padding:9px 15px;border-radius:30px;margin-bottom:19px}
.demo-intro h1{font-family:Manrope,sans-serif;font-size:clamp(30px,4.4vw,54px);letter-spacing:-1.8px;line-height:1.13;margin:0 0 16px}
.demo-intro h1 span{color:#766af1}
.demo-intro p{color:var(--muted);font-size:16px;line-height:1.7}
.demo-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:22px;align-items:stretch}
.demo-profile .profile-view{height:100%;margin:0}
.demo-profile .identity{padding-bottom:28px}
.demo-profile .identity .bio{color:#334155!important}
.demo-profile .social{gap:8px}
.demo-qr-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:15px;padding:30px 22px;border:1px solid #455176;border-radius:24px;background:linear-gradient(155deg,#202d4a,#111a30);color:#f7f9ff}
.demo-qr-panel h2{font-size:27px}
.demo-qr-panel>p{color:#c6cee1;line-height:1.6;max-width:310px}
.demo-qr-icon{display:grid;place-items:center;width:60px;height:60px;border-radius:50%;background:#6555e84d;color:#ddd8ff;font-size:32px}
.demo-qr-box{display:grid;place-items:center;background:#fff;padding:15px;border-radius:17px;width:min(100%,270px)}
.demo-qr-box canvas{display:block;max-width:100%!important;width:100%!important;height:auto!important;aspect-ratio:1/1}
.demo-qr-panel .demo-qr-caption{font-size:13px;color:#c8d2e4}
.demo-qr-panel .btn.secondary{background:#fff;color:#172338;border-color:#fff;max-width:270px}
.demo-exchange{margin:28px auto 0;max-width:760px}
.demo-exchange>.hint{margin-top:9px}
.demo-disclaimer{font-size:12px;text-align:center;color:var(--muted);margin-top:19px}
@media(max-width:740px){.demo-page{padding:30px 16px 60px}.demo-layout{grid-template-columns:minmax(0,1fr)}.demo-qr-panel{min-height:390px}.demo-intro{margin-bottom:25px}.demo-intro h1{letter-spacing:-.8px}}

/* the Loop: executive Slate Navy navigation, consistent in both appearance modes */
.header,html[data-mode="dark"] .header {
  background: #243449 !important;
  border-bottom: 1px solid #40536a !important;
  color: #f8fafc;
}
.header .brand,html[data-mode="dark"] .header .brand {
  color: #fff !important;
  font-weight: 800;
  letter-spacing: -.35px;
}
.header .nav-links .btn,html[data-mode="dark"] .header .nav-links .btn {
  color: #f8fafc !important;
  background: #1d2b40 !important;
  border: 1px solid #50647f !important;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: none;
}
.header .nav-links .btn:hover,html[data-mode="dark"] .header .nav-links .btn:hover {
  background: #344861 !important;
  border-color: #8294ac !important;
}
.header .nav-links .btn.ghost,html[data-mode="dark"] .header .nav-links .btn.ghost {
  background: transparent !important;
  color: #fff !important;
  border-color: #8294ac !important;
}
.header .nav-links #logout,html[data-mode="dark"] .header .nav-links #logout {
  background: #243449 !important;
  color: #fff !important;
  border-color: #50647f !important;
}
.header .brand img.brand-logo {
  display:block; width:52px !important; height:52px !important;
  max-width:52px !important; max-height:52px !important;
  object-fit:cover; flex:0 0 auto;
  border:2px solid #fff !important;
  border-radius:14px !important;
  box-shadow: 0 1px 8px #0005;
}
/* Allow enough space for the full icon without breaking mobile navigation */
@media(max-width:767px){
  .header .brand img.brand-logo{width:44px !important;height:44px !important;max-width:44px !important;max-height:44px !important;border-radius:12px !important}
  .header .mobile-icon{background:#20324b !important;color:#fff !important;border-color:#63768f !important}
}

/* Demo: consistent card readability and presentation in LIGHT and DARK modes */
.demo-page{color:var(--ink)}
.demo-intro h1{color:var(--ink)!important}
.demo-intro p{color:var(--muted)!important}
.demo-layout{align-items:stretch}
.demo-profile{min-width:0}
.demo-profile .profile-view,html[data-mode="dark"] .demo-profile .profile-view {
  background:#fff!important;color:#182335!important;border:1px solid #dce3ec;
  box-shadow:0 12px 35px #071b2b16;
}
.demo-profile .profile-view h2{color:#182335!important}
.demo-profile .profile-view .muted{color:#526578!important}
.demo-profile .profile-view .bio{color:#334155!important;opacity:1!important}
.demo-profile .profile-view .social a{color:#4636a7!important;background:#f0eeff!important}
.demo-qr-panel,html[data-mode="dark"] .demo-qr-panel {
  background:linear-gradient(145deg,#263958,#111c31)!important;
  border:1px solid #5d7396!important;
  color:#fff!important;
}
.demo-qr-panel h2{color:#fff!important}
.demo-qr-panel > p{color:#d7e2f3!important}
.demo-qr-box{background:#fff!important}
.demo-qr-panel .btn.secondary,html[data-mode="dark"] .demo-qr-panel .btn.secondary {
  color:#172338!important;background:#fff!important;border-color:#fff!important;
}
.demo-exchange .field input,.demo-exchange .field textarea{
  width:100%;max-width:100%;
}
.demo-disclaimer{line-height:1.6}
@media(max-width:740px){.demo-layout{gap:16px}.demo-page{padding-left:16px;padding-right:16px}.demo-qr-panel{padding:26px 18px}}


/* Demo profile portrait — visual update only; existing demo layout and actions stay intact */
.demo-profile .profile-view .cover {
    background: linear-gradient(125deg, #334b70 0%, #142a47 48%, #0e1b31 100%) !important;
    height: 138px;
}
.demo-profile .identity .avatar {
    display:block;
    width:118px;
    height:118px;
    margin-top:-59px;
    object-fit:cover;
    object-position:center 39%;
    border:5px solid #fff;
    background:#d2deea;
    box-shadow:0 8px 26px rgba(8,25,46,.22);
}
.demo-profile .profile-view .title {color:#344e74 !important;}
.demo-profile .profile-view .social a {border:1px solid #e4e9f6;}
.demo-profile .profile-view .btn:not(.secondary) {
    background:#5849e8 !important;
    border-color:#5849e8 !important;
}
.demo-profile .profile-view .btn:not(.secondary):hover {background:#4535ca !important;}


/* Demo mobile polish — preserve card, QR, contact actions and two-column desktop layout */
.demo-profile .identity { padding-bottom: 20px; }
.demo-profile .identity .bio { margin-top: 10px; line-height: 1.55; }
.demo-profile .social { column-gap: 11px; row-gap: 10px; padding: 15px 0; }
.demo-profile .social a { display:inline-flex; align-items:center; justify-content:center; min-height: 39px; }
@media (max-width: 740px) {
  .demo-page { padding: 40px 20px 56px; }
  .demo-intro { margin-bottom: 22px; }
  .demo-layout { gap: 14px; }
  .demo-profile .profile-view .cover { height: 116px; }
  .demo-profile .identity { padding: 0 18px 17px; }
  .demo-profile .identity .avatar { width: 104px; height: 104px; margin-top: -52px; }
  .demo-profile .identity h2 { margin-top: 3px; }
  .demo-profile .identity .bio { margin-top: 10px; font-size: 13px; line-height: 1.55; }
  .demo-profile .social { column-gap: 11px; row-gap: 9px; padding: 14px 0; }
  .demo-profile .social a { min-height: 38px; }
  .demo-qr-panel { min-height: 0; padding: 24px 18px; gap: 11px; }
}
@media (max-width: 380px) {
  .demo-page { padding-left: 14px; padding-right: 14px; }
  .demo-profile .identity { padding-left: 14px; padding-right: 14px; }
}

/* the Loop — Official slogan in both modes */

/* Light mode */
.hero h1 {
    color: #142034;
}

/* Dark mode */
html[data-mode="dark"] .hero h1 {
    color: #F5F7FF;
}

/* Same purple gradient in BOTH modes */
.hero h1 .slogan-accent,
html[data-mode="dark"] .hero h1 .slogan-accent {
    background: linear-gradient(
        135deg,
        #776BFF 0%,
        #6051F4 50%,
        #4432A4 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #6051F4;
    display: inline-block;
}

/* FIX — Keep login/signup logo properly sized */
.auth .brand img.brand-logo {
    display: block !important;
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    border: 2px solid #FFFFFF;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Keep logo and brand name aligned */
.auth .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 18px;
}

/* Mobile login logo */
@media (max-width: 767px) {
    .auth .brand img.brand-logo {
        width: 42px !important;
        height: 42px !important;
        max-width: 42px !important;
        max-height: 42px !important;
    }
}

/* the Loop — Homepage phone preview only */
.hero-art.hero-phone {
    background: transparent;
    border-radius: 28px;
    min-height: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove old decorative circles */
.hero-art.hero-phone::before,
.hero-art.hero-phone::after {
    display: none;
}

/* Phone + QR image */
.hero-phone-image {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 24px;
}

/* Mobile */
@media (max-width: 767px) {
    .hero-art.hero-phone {
        min-height: 0;
    }

    .hero-phone-image {
        max-width: 100%;
        border-radius: 18px;
    }
}

/* Homepage phone preview — prevent clipping */
.hero-art.hero-phone {
    min-width: 0;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: transparent;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-art.hero-phone::before,
.hero-art.hero-phone::after {
    display: none;
}

.hero-phone-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 900px) {
    .hero-art.hero-phone {
        max-width: 650px;
        margin: 0 auto;
    }
}

/* the Loop — 3-column public business card page */

/* Desktop: business card | QR | exchange form */
@media (min-width: 1100px) {
    .public-wrap.public-three-column {
        display: grid;
        grid-template-columns:
            minmax(0, 1.1fr)
            minmax(0, 0.9fr)
            minmax(0, 1fr);
        gap: 22px;
        align-items: start;

        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
        padding: 40px 24px 80px;
    }

    /* Each section occupies its own column */
    .public-three-column > .profile-view,
    .public-three-column > .panel {
        min-width: 0;
        width: 100%;
        margin: 0 !important;
    }

    /* Keep QR code inside the middle column */
    .public-three-column .qrcard canvas {
        max-width: 100%;
        height: auto !important;
    }

    /* Exchange form stays inside right column */
    .public-three-column .form-section {
        padding: 24px 20px;
    }
}

/* Tablet: card on left, QR and form beneath */
@media (min-width: 768px) and (max-width: 1099px) {
    .public-wrap.public-three-column {
        max-width: 850px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        padding: 30px 20px 65px;
    }

    .public-three-column > .profile-view,
    .public-three-column > .panel {
        margin: 0 !important;
        min-width: 0;
    }

    .public-three-column > .form-section {
        grid-column: 1 / -1;
    }
}

/* Mobile: three sections stacked vertically */
@media (max-width: 767px) {
    .public-wrap.public-three-column {
        display: flex;
        flex-direction: column;
        gap: 18px;
        max-width: 520px;
        padding: 24px 16px 60px;
    }

    .public-three-column > .profile-view,
    .public-three-column > .panel {
        width: 100%;
        margin: 0 !important;
    }
}

/* the Loop — Equal-height public card columns */

/* Desktop: all three columns stretch to equal height */
@media (min-width: 1100px) {

    .public-wrap.public-three-column {
        align-items: stretch !important;
    }

    /* Stretch every column to the tallest one */
    .public-three-column > .profile-view,
    .public-three-column > .panel {
        height: 100% !important;
        min-height: 0;
        margin: 0 !important;
    }

    /* Keep the profile card content at the top */
    .public-three-column > .profile-view {
        display: flex;
        flex-direction: column;
    }

    /* Keep the QR section content centered */
    .public-three-column > .panel:not(.form-section) {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Keep the exchange form content at the top */
    .public-three-column > .form-section {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* Connection count and export toolbar (both appearance modes) */
.connection-badge { display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:1px 6px;margin-left:7px;border-radius:999px;background:#dc344d;color:#fff;font-size:11px;font-weight:800;line-height:1;vertical-align:middle; }
.connection-badge[hidden] {display:none!important;}
.connections-toolbar { display:flex;flex-wrap:wrap;gap:10px;margin:17px 0 4px; }
.connections-toolbar .btn { white-space:normal; }
@media(max-width:540px){.connections-toolbar .btn{flex:1 1 100%;}}
/* Preserve three-column desktop public card layout, responsive on smaller screens */
@media(min-width:1100px){.public-wrap.public-three-column{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr) minmax(0,1fr);align-items:stretch;gap:22px;max-width:1450px;width:100%;padding:40px 24px 80px}.public-three-column>.profile-view,.public-three-column>.panel{min-width:0;width:100%;height:100%;margin:0!important}.public-three-column>.profile-view{display:flex;flex-direction:column}.public-three-column>.panel:not(.form-section){display:flex;flex-direction:column;justify-content:center}}
@media(min-width:768px) and (max-width:1099px){.public-wrap.public-three-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:850px;gap:18px}.public-three-column>.profile-view,.public-three-column>.panel{min-width:0;margin:0!important}.public-three-column>.form-section{grid-column:1/-1}}
@media(max-width:767px){.public-wrap.public-three-column{display:flex;flex-direction:column;gap:18px;max-width:520px}.public-three-column>.profile-view,.public-three-column>.panel{width:100%;margin:0!important}}

/* Multi-select connections; selection does not change other pages */
.connections-toolbar{align-items:center}
.connection-select-item{padding:14px 16px!important}
.connection-checkbox-label{display:flex;align-items:flex-start;gap:14px;cursor:pointer;line-height:1.5}
.connection-checkbox-label input{width:19px;height:19px;margin:3px 0 0;flex-shrink:0;accent-color:#6555e8;cursor:pointer}
.connection-checkbox-label strong{display:block;font-size:15px;color:#182335}
.connection-checkbox-label .contact-item-detail{display:block;font-size:13px;color:#334155;margin-top:3px;overflow-wrap:anywhere}
.connection-delete-button:not(:disabled){color:#b42334!important;border-color:#d8a2ac!important;background:#fff4f4!important}
.connection-delete-button:disabled{opacity:.5}
#connection-selection-count{white-space:nowrap}
/* Cleaner five-action Connections toolbar */
.connections-toolbar {display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:18px 0;}
.connections-toolbar .btn {min-height:39px;padding:9px 12px;}
#connection-selection-count {margin-left:auto;white-space:nowrap;}
.connection-badge[hidden] {display:none !important;}
@media(max-width:620px){.connections-toolbar .btn{flex:1 1 auto!important;min-width:calc(50% - 8px)}#connection-selection-count{margin-left:0;width:100%;text-align:right;}}

