
/* Q-One v0.6 — Template Studio + Layout Architecture */
.template-studio-section{overflow:hidden}
.template-studio-title{background:linear-gradient(135deg,rgba(117,87,255,.065),rgba(46,230,166,.04))}
.template-filter-row{display:flex;gap:7px;overflow:auto;padding:0 20px 14px;scrollbar-width:none}
.template-filter-row::-webkit-scrollbar{display:none}
.template-filter-row button{flex:0 0 auto;border:1px solid var(--line);background:#fff;color:#71737d;border-radius:999px;padding:8px 12px;font:inherit;font-size:11px;cursor:pointer;transition:.2s var(--ease)}
.template-filter-row button.active{background:#17181c;color:#fff;border-color:#17181c;box-shadow:0 7px 18px rgba(20,20,25,.10)}
.full-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 20px 22px}
.full-template-card{position:relative;display:grid;grid-template-columns:112px minmax(0,1fr);align-items:stretch;text-align:start;border:1px solid var(--line);background:#fff;border-radius:18px;padding:0;overflow:hidden;cursor:pointer;transition:transform .22s var(--ease),border-color .22s,box-shadow .22s;min-height:126px}
.full-template-card:hover{transform:translateY(-3px);border-color:#cfc7ff;box-shadow:0 12px 28px rgba(27,22,55,.09)}
.full-template-card.active{border-color:#7557ff;box-shadow:0 0 0 2px rgba(117,87,255,.11),0 12px 28px rgba(27,22,55,.10)}
.full-template-card .template-visual{display:block;width:100%;height:100%;min-height:126px;position:relative;overflow:hidden;background:linear-gradient(145deg,var(--t1),var(--t2));color:var(--tt,#fff);isolation:isolate}
.full-template-card .template-visual::before{content:"";position:absolute;width:100px;height:100px;border-radius:50%;background:var(--t3);filter:blur(30px);opacity:.65;top:-35px;left:-20px}
.full-template-card .template-visual::after{content:"";position:absolute;inset:10px;border:1px solid rgba(255,255,255,.16);border-radius:14px;pointer-events:none}
.template-visual .tv-avatar{position:absolute;z-index:2;width:27px;height:27px;border-radius:50%;top:23px;right:25px;background:var(--ta);box-shadow:0 5px 16px rgba(0,0,0,.16)}
.template-visual .tv-copy{position:absolute;z-index:2;right:25px;top:58px;width:72px;height:6px;border-radius:9px;background:currentColor;opacity:.87}
.template-visual .tv-copy::after{content:"";position:absolute;right:0;top:11px;width:47px;height:4px;background:currentColor;opacity:.35;border-radius:9px}
.template-visual .tv-links{position:absolute;z-index:2;left:21px;right:21px;bottom:17px;display:grid;gap:4px}
.template-visual .tv-links i{height:13px;border-radius:7px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.14)}
.template-visual.tv-light .tv-links i{background:rgba(20,20,25,.07);border-color:rgba(20,20,25,.06)}
.template-visual.layout-split-mini .tv-avatar{right:auto;left:27px;top:32px}.template-visual.layout-split-mini .tv-copy{right:auto;left:26px;top:68px}.template-visual.layout-split-mini .tv-links{right:52%;left:19px;bottom:25px}
.template-visual.layout-editorial-mini .tv-avatar{width:34px;height:34px;border-radius:10px}.template-visual.layout-editorial-mini .tv-copy{width:105px;top:27px;right:67px}.template-visual.layout-editorial-mini .tv-links{grid-template-columns:repeat(2,1fr)}
.template-visual.layout-poster-mini .tv-avatar{right:50%;transform:translateX(50%);width:35px;height:35px;top:17px}.template-visual.layout-poster-mini .tv-copy{right:50%;transform:translateX(50%);top:59px;width:100px}.template-visual.layout-poster-mini .tv-links{grid-template-columns:repeat(2,1fr);bottom:13px}
.template-visual.layout-showcase-mini .tv-links{grid-template-columns:repeat(2,1fr)}
.template-visual.layout-compact-mini .tv-links{left:45px;right:45px}.template-visual.layout-minimal-mini .tv-links i{background:transparent;border:0;border-bottom:1px solid currentColor;border-radius:0;opacity:.26}
.full-template-card .template-meta{padding:12px 14px 12px 12px;display:grid;grid-template-columns:minmax(0,1fr);gap:5px;align-content:center;align-items:start;min-width:0}
.full-template-card .template-meta b,.full-template-card .template-meta small{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.full-template-card .template-meta em{display:inline-flex;align-items:center;gap:5px;justify-self:start;max-width:max-content;margin-top:4px}
.full-template-card .template-meta b{font-size:13px;color:#26272c}.full-template-card .template-meta small{font-size:10px;color:#91939c}.full-template-card .template-meta em{font-style:normal;font-size:10px;color:#7557ff;background:#f1efff;border-radius:999px;padding:4px 8px}

.layout-preset-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:0 20px 18px}
.layout-preset-grid>button{border:1px solid var(--line);background:#fff;border-radius:14px;padding:8px;cursor:pointer;color:#6d7079;transition:.2s var(--ease)}
.layout-preset-grid>button.active{border-color:#7557ff;background:#f9f8ff;color:#392f74;box-shadow:0 0 0 2px rgba(117,87,255,.08)}
.layout-preset-grid strong{display:block;font-size:9px;margin-top:5px;font-weight:600}
.layout-mini{height:45px;border-radius:9px;background:#f5f5f7;display:block;position:relative;overflow:hidden;border:1px solid #eeeeF2}
.layout-mini i,.layout-mini b,.layout-mini em{position:absolute;display:block;background:#9c9da5}
.layout-mini i{width:10px;height:10px;border-radius:50%;top:7px;right:8px}.layout-mini b{height:4px;width:24px;top:9px;right:22px;border-radius:5px}.layout-mini em{height:7px;left:8px;right:8px;bottom:8px;border-radius:4px;box-shadow:0 -10px 0 rgba(156,157,165,.45)}
.l-hero{background:#efecff}.l-hero i{width:18px;height:18px;right:50%;transform:translateX(50%)}.l-hero b{top:28px;right:50%;transform:translateX(50%)}.l-hero em{display:none}
.l-editorial i{border-radius:3px;width:15px;height:15px}.l-editorial b{width:35px}.l-editorial em{left:8px;right:8px;bottom:7px}
.l-split::after{content:"";position:absolute;top:5px;bottom:5px;left:50%;width:1px;background:#ddd}.l-split i{right:8px;top:12px}.l-split b{right:21px;top:15px}.l-split em{right:52%;left:6px;top:9px;bottom:auto;height:7px;box-shadow:0 10px 0 rgba(156,157,165,.5),0 20px 0 rgba(156,157,165,.35)}
.l-poster i{right:50%;transform:translateX(50%)}.l-poster b{right:50%;transform:translateX(50%);top:22px;width:30px}.l-poster em{bottom:5px}
.l-showcase em{height:14px;box-shadow:none}.l-compact em{left:14px;right:14px;height:5px;box-shadow:0 -8px 0 rgba(156,157,165,.45)}.l-minimal{background:#fff}.l-minimal em{background:transparent;border-bottom:1px solid #999;border-radius:0;box-shadow:0 -10px 0 -3px transparent;border-top:0}
.layout-controls{border-top:1px solid var(--line);padding-top:16px!important}

/* Layout engine */
.qone-profile{container-type:inline-size;--content-width:610px;--page-pad:19px;--avatar-size:86px}
.qone-profile>.profile-header,.qone-profile>.micro-stats,.qone-profile>.social-row,.qone-profile>.profile-links,.qone-profile>.powered{width:min(100%,var(--content-width));margin-inline:auto}
.qone-profile.header-glass .profile-header,.qone-profile.header-solid .profile-header,.qone-profile.header-outline .profile-header,.qone-profile.header-accent .profile-header{padding:18px;border-radius:calc(var(--radius) + 4px);margin-top:12px;margin-bottom:13px}
.qone-profile.header-glass .profile-header{background:rgb(var(--surface-rgb)/.11);border:1px solid rgb(var(--text-rgb)/.12);backdrop-filter:blur(var(--blur));box-shadow:0 12px 34px rgba(0,0,0,.08)}
.qone-profile.header-solid .profile-header{background:rgb(var(--surface-rgb)/.92);border:1px solid rgb(var(--text-rgb)/.07);box-shadow:0 12px 34px rgba(0,0,0,.12)}
.qone-profile.header-outline .profile-header{border:1px solid rgb(var(--text-rgb)/.26)}
.qone-profile.header-accent .profile-header{background:color-mix(in srgb,var(--accent) 24%,transparent);border:1px solid color-mix(in srgb,var(--accent) 50%,transparent)}

.qone-profile.template-layout-hero .profile-header{padding-top:25px;padding-bottom:21px}.qone-profile.template-layout-hero .avatar-orbit{width:calc(var(--avatar-size) * 1.12);height:calc(var(--avatar-size) * 1.12)}.qone-profile.template-layout-hero .profile-copy h1,.qone-profile.template-layout-hero .profile-copy h2{font-size:calc(var(--title-size) * 1.18)}
.qone-profile.template-layout-editorial .profile-header{flex-direction:row!important;align-items:center!important;text-align:start!important;gap:18px!important}.qone-profile.template-layout-editorial .avatar-orbit{margin:0!important;flex:none}.qone-profile.template-layout-editorial .profile-copy{flex:1}.qone-profile.template-layout-editorial .profile-copy h1,.qone-profile.template-layout-editorial .profile-copy h2{font-size:calc(var(--title-size) * 1.15)}
.qone-profile.template-layout-poster .profile-header{min-height:210px;justify-content:center;margin-top:18px}.qone-profile.template-layout-poster .avatar-orbit{width:calc(var(--avatar-size) * 1.18);height:calc(var(--avatar-size) * 1.18)}.qone-profile.template-layout-poster .profile-copy h1,.qone-profile.template-layout-poster .profile-copy h2{font-size:calc(var(--title-size) * 1.35);letter-spacing:-.02em}.qone-profile.template-layout-poster .social-row{margin-top:-7px}
.qone-profile.template-layout-showcase .profile-header{border-bottom:1px solid rgb(var(--text-rgb)/.15);padding-bottom:18px;margin-bottom:16px}.qone-profile.template-layout-showcase .profile-links{grid-template-columns:repeat(2,minmax(0,1fr))}
.qone-profile.template-layout-compact{--link-h:48px;--gap:6px}.qone-profile.template-layout-compact>.profile-header,.qone-profile.template-layout-compact>.micro-stats,.qone-profile.template-layout-compact>.social-row,.qone-profile.template-layout-compact>.profile-links,.qone-profile.template-layout-compact>.powered{width:min(100%,min(var(--content-width),500px))}.qone-profile.template-layout-compact .profile-header{margin-top:4px}.qone-profile.template-layout-compact .avatar-orbit{width:calc(var(--avatar-size)*.78);height:calc(var(--avatar-size)*.78)}
.qone-profile.template-layout-minimal .profile-link,.qone-profile.template-layout-minimal .public-link{background:transparent!important;border:0!important;border-bottom:1px solid rgb(var(--text-rgb)/.18)!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;padding-inline:2px}.qone-profile.template-layout-minimal .profile-header{margin-bottom:22px}.qone-profile.template-layout-minimal .micro-stats span{background:transparent;border-color:rgb(var(--text-rgb)/.13)}

@container (min-width:620px){
  .qone-profile.template-layout-split{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(300px,1.15fr);grid-template-areas:"identity links" "stats links" "social links" "brand links";column-gap:34px;align-content:center;padding-inline:max(var(--page-pad),34px)}
  .qone-profile.template-layout-split>.profile-header{grid-area:identity;width:100%;margin:0;align-self:end}
  .qone-profile.template-layout-split>.micro-stats{grid-area:stats;width:100%;margin:12px 0 10px;justify-content:flex-start}
  .qone-profile.template-layout-split>.social-row{grid-area:social;width:100%;margin:0;justify-content:flex-start}
  .qone-profile.template-layout-split>.profile-links{grid-area:links;width:100%;align-self:center}
  .qone-profile.template-layout-split>.powered{grid-area:brand;width:100%;text-align:start;margin-top:12px}
  .qone-profile.template-layout-split .profile-header{align-items:flex-start;text-align:start}
  .qone-profile.template-layout-split .avatar-orbit{margin-inline:0}
  .qone-profile.template-layout-split .profile-copy p{max-width:270px}
}
@container (max-width:619px){
  .qone-profile.template-layout-showcase .profile-links{grid-template-columns:1fr}
  .qone-profile.template-layout-poster .profile-header{min-height:175px}
  .qone-profile.template-layout-editorial .profile-header{gap:12px!important}
}
.v02-public-body .qone-profile.template-layout-split{--content-width:920px}.v02-public-body .qone-profile.template-layout-showcase{--content-width:760px}


/* Visual balance fixes */
.qone-profile.links-count-1.layout-grid .profile-links,.v02-public-body .qone-profile.links-count-1.layout-grid .public-links{grid-template-columns:1fr}
.qone-profile.template-layout-poster>.profile-header,.qone-profile.template-layout-poster>.micro-stats,.qone-profile.template-layout-poster>.social-row,.qone-profile.template-layout-poster>.profile-links,.qone-profile.template-layout-poster>.powered{width:min(100%,min(var(--content-width),430px))}
.qone-profile.template-layout-poster .profile-header{gap:14px;padding-inline:20px;align-items:center;text-align:center}
.qone-profile.template-layout-poster .profile-copy{max-width:320px;margin-inline:auto}
.qone-profile.template-layout-poster .profile-copy p{max-width:280px;margin-inline:auto}
.qone-profile.template-layout-poster .micro-stats{justify-content:center;flex-wrap:wrap;row-gap:7px}
.qone-profile.template-layout-poster .social-row{justify-content:center;margin-top:4px}
.qone-profile.template-layout-poster.layout-grid .profile-links{grid-template-columns:1fr}
.qone-profile.template-layout-showcase.links-count-1 .profile-links,.v02-public-body .qone-profile.template-layout-showcase.links-count-1 .public-links{grid-template-columns:1fr}
.qone-profile.template-layout-showcase .profile-links,.v02-public-body .qone-profile.template-layout-showcase .public-links{align-items:start}

@media(max-width:720px){.full-template-grid{grid-template-columns:repeat(2,1fr);padding-inline:14px}.layout-preset-grid{grid-template-columns:repeat(4,1fr);padding-inline:14px}.template-filter-row{padding-inline:14px}.full-template-card{grid-template-columns:96px minmax(0,1fr)}.full-template-card .template-visual{min-height:112px}}
@media(max-width:480px){.full-template-grid{grid-template-columns:1fr}.layout-preset-grid{grid-template-columns:repeat(2,1fr)}.full-template-card{grid-template-columns:104px minmax(0,1fr)}}
