*{box-sizing:border-box}body{margin:0;background:#0b0d0f;color:#f5f5f5;font-family:Inter,system-ui,sans-serif}header{height:72px;padding:0 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #24272b;background:#0b0d0fee;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.brand{font-weight:800;font-size:21px;letter-spacing:-.8px}.brand span,em{color:#ff5a1f;font-style:normal}nav{display:flex;gap:6px}.nav,.back{background:none;border:0;color:#999;padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:700}.nav.active,.nav:hover,.back:hover{background:#1a1d21;color:#fff}.view{display:none;max-width:1180px;margin:auto;padding:42px 5% 80px}.active-view{display:block}.hero{min-height:330px;border:1px solid #262a2f;border-radius:28px;padding:55px;background:linear-gradient(115deg,#171b20,#0f1114);display:flex;align-items:center;justify-content:space-between}.hero h1{font-size:56px;line-height:1.02;letter-spacing:-3px;margin:0 0 18px}.hero p:not(.eyebrow),.page-head p:last-child{color:#a8adb4;line-height:1.7}.hero-bike{font-size:150px;transform:rotate(-8deg);filter:drop-shadow(0 20px 25px #0008)}.eyebrow{font-size:11px!important;font-weight:800;letter-spacing:2px;color:#ff6a2a!important;margin:0 0 10px}.toolbar{display:flex;gap:12px;margin:25px 0}.search{flex:1;background:#15181b;border:1px solid #292d32;border-radius:12px;padding:0 15px;display:flex;align-items:center;gap:8px}.search input,.toolbar select{background:none;border:0;outline:0;color:#ddd;width:100%;padding:14px}.toolbar select{background:#15181b;border:1px solid #292d32;border-radius:12px;width:170px}.section-title{display:flex;align-items:end;justify-content:space-between;margin:35px 0 18px}.section-title h2,.page-head h2{margin:0;font-size:28px;letter-spacing:-1px}.muted{color:#8d939b;font-size:13px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.card{background:#14171a;border:1px solid #272b30;border-radius:18px;overflow:hidden;transition:.2s}.card:hover{transform:translateY(-3px);border-color:#454b52}.cover{height:155px;background:linear-gradient(135deg,#292e34,#16191c);display:flex;align-items:center;justify-content:center;font-size:70px;position:relative}.tag{position:absolute;top:12px;left:12px;background:#ff5a1f;padding:6px 9px;border-radius:7px;font-size:10px;font-weight:800}.card-body{padding:17px}.card h3{margin:0 0 12px;font-size:17px}.meta{display:grid;gap:8px;color:#a8adb4;font-size:12px}.people{margin-top:15px;border-top:1px solid #25282c;padding-top:13px;display:flex;justify-content:space-between;align-items:center}.join,.primary{background:#ff5a1f;color:#fff;border:0;border-radius:9px;padding:10px 14px;font-weight:800;cursor:pointer}.join.joined{background:#26372f;color:#7ee2ad}.secondary{background:#25292e;color:#ddd;border:0;border-radius:10px;padding:11px 15px;font-weight:800;cursor:pointer}.page-head{margin-bottom:25px}.form-card{background:#14171a;border:1px solid #292d32;border-radius:20px;padding:28px;max-width:900px}.row{display:grid;grid-template-columns:1fr 1fr;gap:16px}label{display:grid;gap:8px;font-size:12px;font-weight:700;color:#b7bbc0;margin-bottom:18px}label input,label select,label textarea{background:#0e1012;border:1px solid #2b3035;color:#fff;border-radius:10px;padding:13px;outline:none}label textarea{min-height:110px;resize:vertical}.field-title{font-size:13px;font-weight:800;margin:8px 0 12px}.pace-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px}.check{display:flex;align-items:center;gap:8px;background:#0e1012;border:1px solid #292d32;border-radius:10px;padding:13px;margin:0}.check input{accent-color:#ff5a1f}.save-profile{display:block;margin-top:18px}.bike-row{display:grid;grid-template-columns:1.2fr 1.4fr .7fr auto;gap:8px;margin-bottom:10px}.bike-row input{min-width:0}.remove{background:#25292e;color:#aaa;border:0;border-radius:9px;width:42px;cursor:pointer}.profile-card,.event-head,.participants,.chat-box{background:#14171a;border:1px solid #292d32;border-radius:20px}.profile-card{margin-top:20px;padding:25px;display:flex;gap:18px;align-items:center}.avatar{width:72px;height:72px;border-radius:50%;background:#ff5a1f;display:grid;place-items:center;font-size:26px;font-weight:800;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.chips{display:flex;flex-wrap:wrap;gap:7px}.chip{background:#24282d;color:#ddd;border-radius:20px;padding:6px 9px;font-size:11px}.event-head{padding:28px;margin-top:15px}.event-top{display:flex;justify-content:space-between;gap:20px}.event-top h2{font-size:32px;margin:5px 0 15px}.event-meta{display:flex;flex-wrap:wrap;gap:12px;color:#aaa;font-size:13px}.event-description{color:#aeb3b9;line-height:1.7}.event-actions{display:flex;gap:10px;align-items:flex-start}.participants{margin-top:18px;padding:25px}.participants h3{margin-top:0}.participant-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.person{display:flex;gap:12px;align-items:center;background:#0f1113;border:1px solid #25292d;border-radius:14px;padding:13px;cursor:pointer}.person .avatar{width:48px;height:48px;font-size:18px}.person-info b{display:block;font-size:13px}.person-info span{display:block;color:#888;font-size:11px;margin-top:4px}.chat-box{margin-top:15px;overflow:hidden}.chat-header{padding:20px;border-bottom:1px solid #292d32}.chat-header h2{margin:0 0 5px}.messages{height:430px;overflow:auto;padding:20px;display:flex;flex-direction:column;gap:12px}.msg{max-width:72%;background:#22262b;border-radius:13px;padding:10px 13px}.msg.mine{align-self:flex-end;background:#ff5a1f}.msg small{display:block;font-size:9px;opacity:.65;margin-bottom:4px}.chat-input{display:flex;gap:8px;padding:14px;border-top:1px solid #292d32}.chat-input input{flex:1;background:#0e1012;border:1px solid #292d32;color:#fff;border-radius:10px;padding:12px}.back{padding-left:0;margin-bottom:4px}.toast{position:fixed;right:22px;bottom:22px;background:#f5f5f5;color:#111;padding:13px 17px;border-radius:10px;font-size:13px;font-weight:800;transform:translateY(100px);transition:.25s;z-index:50}.toast.show{transform:translateY(0)}@media(max-width:850px){.grid{grid-template-columns:1fr 1fr}.hero{padding:35px}.hero h1{font-size:42px}.hero-bike{font-size:90px}.participant-grid{grid-template-columns:1fr}}@media(max-width:600px){header{padding:0 18px}.brand{font-size:18px}.nav{padding:8px}.view{padding:25px 18px 60px}.hero{min-height:300px;padding:28px}.hero-bike{display:none}.grid,.row,.pace-options{grid-template-columns:1fr}.toolbar{flex-direction:column}.toolbar select{width:100%}.bike-row{grid-template-columns:1fr 1fr}.bike-row input:nth-child(3){grid-column:1}.profile-card{align-items:flex-start;flex-wrap:wrap}.event-top{flex-direction:column}.event-actions{align-items:stretch}.msg{max-width:88%}}

.danger{background:#3a2020;color:#ff8d8d}.participant-title{display:flex;justify-content:space-between;gap:12px;align-items:center}.participant-title h3{margin:0}.owner-badge{font-size:11px;background:#2b241b;color:#ffb36e;border:1px solid #49351f;border-radius:20px;padding:7px 10px;font-weight:800}.person{justify-content:space-between}.person-main{display:flex;gap:12px;align-items:center;flex:1}.remove-member{background:#261a1a;color:#ff8d8d;border:1px solid #4b2828;border-radius:8px;padding:7px 9px;font-size:10px;font-weight:800;cursor:pointer}.photo-actions{display:flex;gap:8px;margin-top:8px}.remove-photo{background:#25292e;color:#aaa;border:0;border-radius:8px;padding:7px 10px;cursor:pointer;font-size:11px}

.social-hero{margin-top:15px;background:linear-gradient(120deg,#171b20,#101215);border:1px solid #292d32;border-radius:22px;padding:30px;display:flex;gap:22px;align-items:center}.social-hero .avatar{width:110px;height:110px;font-size:40px}.social-info h1{margin:0 0 6px;font-size:34px;letter-spacing:-1.5px}.social-info p{color:#a8adb4}.social-stats{display:flex;gap:28px;margin-top:15px}.social-stats b{font-size:18px;display:block}.social-stats span{font-size:10px;color:#858b93}.social-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;margin-top:18px}.social-panel{background:#14171a;border:1px solid #292d32;border-radius:18px;padding:22px}.social-panel h3{margin-top:0}.bike-card{display:flex;align-items:center;gap:12px;background:#0f1113;border:1px solid #25292d;border-radius:13px;padding:13px;margin-bottom:9px}.event-mini{background:#0f1113;border:1px solid #25292d;border-radius:13px;padding:13px;margin-bottom:9px;cursor:pointer}.event-mini b{display:block}.event-mini span{display:block;color:#888;font-size:11px;margin-top:5px}.follow-btn{background:#ff5a1f;color:#fff;border:0;border-radius:9px;padding:10px 14px;font-weight:800;cursor:pointer}.follow-btn.following{background:#26372f;color:#7ee2ad}.compat{font-size:10px;font-weight:800;color:#7ee2ad}.following-list{display:flex;flex-wrap:wrap;gap:7px}.following-list span{background:#24282d;border-radius:20px;padding:7px 10px;font-size:11px;color:#ddd}
@media(max-width:700px){.social-hero{align-items:flex-start;flex-wrap:wrap}.social-grid{grid-template-columns:1fr}.social-stats{gap:15px}}

.hero-home{margin-bottom:22px;border:1px solid #2c3035;border-radius:24px;padding:28px 30px;background:radial-gradient(circle at 80% 20%,#332016 0,#171a1d 42%,#111315 100%);display:flex;justify-content:space-between;gap:20px;align-items:flex-end}.hero-home h1{font-size:42px;line-height:1.02;margin:4px 0 12px;letter-spacing:-2px}.hero-home h1 span{color:#ff6a2a}.hero-home p:not(.eyebrow){max-width:650px;color:#aeb3ba}.feed-section{margin:18px 0}.feed-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:11px}.feed-head h2{margin:0}.feed-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.feed-card{background:#15181b;border:1px solid #292d32;border-radius:17px;padding:17px;cursor:pointer;transition:.15s}.feed-card:hover{transform:translateY(-2px);border-color:#454b52}.feed-card .feed-top{display:flex;justify-content:space-between;gap:8px}.feed-card h3{margin:10px 0 5px}.feed-card .meta{color:#9298a0;font-size:11px;line-height:1.6}.feed-match{display:inline-block;background:#20352a;color:#82e0aa;border-radius:20px;padding:5px 8px;font-size:10px;font-weight:800}.person-feed{display:flex;align-items:center;gap:11px}.person-feed .avatar{width:46px;height:46px}.person-feed b{display:block}.person-feed span{font-size:10px;color:#8e949c}.empty-feed{border:1px dashed #30353b;border-radius:15px;padding:22px;color:#888;text-align:center}
@media(max-width:850px){.feed-grid{grid-template-columns:1fr 1fr}.hero-home{align-items:flex-start;flex-direction:column}.hero-home h1{font-size:34px}}
@media(max-width:600px){.feed-grid{grid-template-columns:1fr}}

:root{--orange:#ff641f;--bg:#0d0f11;--panel:#15181b;--line:#292e34;--muted:#8c939b}
body{background:radial-gradient(circle at 80% -10%,rgba(255,100,31,.09),transparent 35%),var(--bg);padding-bottom:82px}
header{height:70px;background:rgba(13,15,17,.88);backdrop-filter:blur(18px);border-bottom:1px solid #22262b;position:sticky;top:0;z-index:20}
.brand{font-size:19px;font-weight:800}.brand span{color:var(--orange)}
.desktop-nav{display:flex;gap:5px}.desktop-nav .nav{background:transparent;color:#8f959c;border:0;border-radius:10px;padding:9px 12px;cursor:pointer;font-weight:700}.desktop-nav .nav.active,.desktop-nav .nav:hover{background:#202429;color:#fff}
.header-actions{display:flex;align-items:center;gap:8px}.icon-btn,.mini-profile{background:#1b1f23;border:1px solid #2a2f35;color:#ddd;border-radius:11px;cursor:pointer}.icon-btn{width:38px;height:38px;position:relative}.icon-btn i{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--orange);top:7px;right:7px;display:none}.mini-profile{padding:3px}.mini-profile .avatar{width:29px;height:29px}
.home-top{margin:12px 0 22px;border:1px solid #2d3137;border-radius:24px;padding:32px;background:linear-gradient(125deg,#181b1f 0%,#111315 60%,#24160f 100%);display:flex;justify-content:space-between;align-items:end;gap:20px}.home-top h1{font-size:42px;line-height:1.02;letter-spacing:-2px;margin:4px 0 10px}.home-top h1 em{color:var(--orange);font-style:normal}.home-top p:not(.eyebrow){color:#a5abb2;max-width:650px}
.feed-section{margin:24px 0}.feed-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:12px}.feed-head h2{margin:0}.feed-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.feed-card{background:linear-gradient(180deg,#181b1f,#131619);border:1px solid #292e34;border-radius:18px;padding:17px;cursor:pointer;transition:.16s}.feed-card:hover{transform:translateY(-3px);border-color:#464c53}.feed-card h3{margin:11px 0 7px}.feed-top{display:flex;justify-content:space-between;gap:8px}.feed-match{background:#1d3428;color:#80dfa8;padding:5px 8px;border-radius:20px;font-size:10px;font-weight:800}.meta{color:#90969e;font-size:11px;line-height:1.65}.person-feed{display:flex;align-items:center;gap:11px}.person-feed .avatar{width:45px;height:45px}.person-feed span{display:block;color:#8e949b;font-size:10px;margin-top:3px}.empty-feed{border:1px dashed #30353a;border-radius:16px;padding:25px;color:#858b92;text-align:center}
.bottom-nav{display:none}.notification-panel{position:fixed;top:64px;right:22px;width:330px;max-width:calc(100vw - 30px);background:#171a1e;border:1px solid #30353b;border-radius:16px;padding:15px;box-shadow:0 20px 60px #000b;z-index:40;display:none}.notification-panel.show{display:block}.notification-item{padding:11px 4px;border-bottom:1px solid #282d32;font-size:12px}.notification-item:last-child{border-bottom:0}.notification-item b{color:#fff}.fav-btn{background:#20252a;border:1px solid #32383f;color:#bbb;border-radius:9px;width:34px;height:34px;cursor:pointer}.fav-btn.active{color:#ff6740;border-color:#6b3021}.card .cover{position:relative;overflow:hidden}.cover-art{position:absolute;inset:0;opacity:.25;background:linear-gradient(135deg,#ff641f,#16191c 55%,#050607)}
@media(max-width:760px){body{padding-bottom:82px}header{height:58px;padding:0 14px}.desktop-nav{display:none}.home-top{padding:23px;align-items:flex-start;flex-direction:column}.home-top h1{font-size:34px}.feed-grid{grid-template-columns:1fr}.bottom-nav{position:fixed;display:flex;bottom:0;left:0;right:0;height:68px;background:rgba(17,19,22,.96);backdrop-filter:blur(18px);border-top:1px solid #292e34;z-index:30;justify-content:space-around}.bottom-nav .nav{border:0;background:transparent;color:#7f868e;font-size:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:55px}.bottom-nav .nav span{font-size:9px}.bottom-nav .nav.active{color:#fff}.bottom-nav .create-nav{width:46px;height:46px;min-width:46px;margin-top:8px;background:var(--orange);color:#fff;border-radius:15px;font-size:25px}.notification-panel{top:57px;right:10px}.grid{grid-template-columns:1fr!important}}

/* ===== PROFILE UI V7 ===== */
#profile.view{max-width:1100px;margin:0 auto}
.profile-shell{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}
.profile-sidebar,.profile-main-card,.profile-section-card{background:#15181b;border:1px solid #292e34;border-radius:18px;box-sizing:border-box}
.profile-sidebar{padding:22px;position:sticky;top:88px}
.profile-main-card{padding:22px}
.profile-section-card{padding:20px;margin-top:18px}
.profile-sidebar .avatar{width:118px;height:118px;margin:0 auto 16px;font-size:42px}
.profile-sidebar h2{text-align:center;margin:0 0 5px}
.profile-sidebar .profile-role{text-align:center;color:#8f969e;font-size:11px}
.profile-sidebar .profile-actions{display:grid;grid-template-columns:1fr;gap:9px;margin-top:18px}
.profile-sidebar .profile-actions button{width:100%;box-sizing:border-box}
.profile-stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:18px}
.profile-stat{background:#101214;border:1px solid #252a2f;border-radius:12px;padding:12px 7px;text-align:center;min-width:0}
.profile-stat strong{display:block;font-size:18px;line-height:1.1}
.profile-stat span{display:block;color:#858c94;font-size:9px;margin-top:5px}
.profile-main-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:18px;border-bottom:1px solid #282d32}
.profile-main-head h1{margin:0 0 6px;font-size:28px;letter-spacing:-1px}
.profile-main-head p{margin:0;color:#9299a1;line-height:1.55}
.profile-main-head .chips{justify-content:flex-end}
.profile-section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}
.profile-section-title h3{margin:0}
.profile-section-title span{font-size:10px;color:#747b83}
.profile-bikes-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.profile-bike{min-height:78px;background:#101214;border:1px solid #252a2f;border-radius:13px;padding:13px;display:flex;align-items:center;gap:12px;box-sizing:border-box}
.profile-bike-icon{width:42px;height:42px;border-radius:11px;background:#1d2125;display:grid;place-items:center;font-size:20px;flex:none}
.profile-bike-info{min-width:0}
.profile-bike-info b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-bike-info span{display:block;color:#7f8790;font-size:10px;margin-top:5px}
.profile-event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.profile-event{min-height:92px;background:#101214;border:1px solid #252a2f;border-radius:13px;padding:14px;cursor:pointer;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between}
.profile-event:hover{border-color:#414850}
.profile-event b{line-height:1.3}
.profile-event-meta{font-size:10px;color:#7f8790;line-height:1.5}
.profile-connections{display:flex;flex-wrap:wrap;gap:8px}
.profile-connection{background:#20252a;border:1px solid #30363d;border-radius:999px;padding:8px 11px;font-size:10px;cursor:pointer}
.profile-empty{border:1px dashed #30353a;border-radius:12px;padding:17px;text-align:center;color:#777f88;font-size:11px;grid-column:1/-1}
.profile-photo-preview{display:flex;justify-content:center;margin-bottom:10px}
.profile-photo-preview .avatar{width:90px;height:90px;font-size:32px}
.profile-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.profile-form-grid .full{grid-column:1/-1}
@media(max-width:850px){
 #profile.view{max-width:100%}
 .profile-shell{grid-template-columns:1fr}
 .profile-sidebar{position:static}
 .profile-sidebar .avatar{width:96px;height:96px}
 .profile-main-head{flex-direction:column}
 .profile-main-head .chips{justify-content:flex-start}
}
@media(max-width:560px){
 .profile-bikes-grid,.profile-event-grid,.profile-form-grid{grid-template-columns:1fr}
 .profile-form-grid .full{grid-column:auto}
 .profile-stat-row{gap:6px}
 .profile-main-card,.profile-section-card,.profile-sidebar{padding:16px}
}

.auth-bar{position:fixed;right:18px;top:80px;z-index:25;background:#15181bdd;border:1px solid #292e34;border-radius:12px;padding:8px 10px;display:flex;align-items:center;gap:12px;box-shadow:0 10px 35px #0008;backdrop-filter:blur(12px)}
.auth-bar strong{font-size:11px;display:block}.auth-bar span{font-size:9px;color:#8d939b}.auth-actions{display:flex;gap:6px}.auth-actions .secondary{padding:8px 10px;font-size:10px}
.auth-modal{position:fixed;inset:0;background:#000b;display:none;place-items:center;z-index:100;padding:20px}.auth-modal.show{display:grid}.auth-card{width:min(420px,100%);background:#15181b;border:1px solid #30353b;border-radius:20px;padding:25px;position:relative;box-shadow:0 30px 90px #000}.auth-card h2{margin:0 0 8px}.auth-close{position:absolute;right:15px;top:12px;background:none;border:0;color:#aaa;font-size:26px;cursor:pointer}.auth-switch{background:none;border:0;color:#ff6a2a;margin-top:12px;cursor:pointer;font-size:12px}.auth-bar .primary,.auth-bar .secondary{white-space:nowrap}
@media(max-width:760px){.auth-bar{top:64px;right:10px;left:10px;justify-content:space-between}.auth-bar>div:first-child{display:none}}

/* MotorMatch optimization v10 */
.auth-bar{position:sticky;top:0;z-index:30;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 22px;background:#101215;border-bottom:1px solid #24282d;font-size:12px}
.auth-bar>div:first-child{display:flex;align-items:center;gap:10px}.auth-bar span{color:#8e959d}
.auth-modal{display:none;position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.72);place-items:center;padding:20px}.auth-modal.show{display:grid}
.auth-card{position:relative;width:min(430px,100%);background:#15181b;border:1px solid #30353b;border-radius:22px;padding:26px;box-shadow:0 25px 80px rgba(0,0,0,.65)}
.auth-close{position:absolute;right:15px;top:13px;border:0;background:transparent;color:#aaa;font-size:26px;cursor:pointer}.auth-switch{width:100%;margin-top:12px;background:transparent;border:0;color:#ff8a5b;cursor:pointer;font-weight:700}
@media(max-width:600px){.auth-bar{padding:7px 14px}.auth-bar>div:first-child strong{display:none}.auth-bar span{font-size:11px}.auth-actions .secondary{padding:8px 10px}.header-actions{gap:5px}.desktop-nav{display:none}}

/* V15 FIX - chat list */
.chat-list{display:grid;gap:10px}.chat-list-item{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#14171a;border:1px solid #292d32;border-radius:14px;padding:15px;cursor:pointer}.chat-list-item:hover{border-color:#454b52}.chat-list-item b{display:block}.chat-list-item span{display:block;color:#8d939b;font-size:11px;margin-top:5px}.chat-list-item button{flex:none}
@media(max-width:600px){.chat-list-item{align-items:flex-start;flex-direction:column}.chat-list-item button{width:100%}}


/* ===== MotorMatch V15.8 — header auth + cloud footer ===== */

/* La vecchia barra superiore non viene più usata. */
.auth-bar{display:none!important}

/* Login/logout accanto all'icona profilo. */
.header-actions{display:flex;align-items:center;gap:8px}
.header-auth-btn{
  white-space:nowrap;
  padding:9px 12px;
  font-size:10px;
  line-height:1;
  border:1px solid #30363d;
}
#authLoginBtn{color:#f1f3f5}
#authLogoutBtn{color:#ff9a78}

/* Stato cloud consultabile in fondo alla pagina. */
.cloud-footer{
  width:100%;
  border-top:1px solid #24282d;
  background:rgba(13,15,17,.72);
  margin-top:20px;
}
.cloud-footer-inner{
  max-width:1180px;
  margin:0 auto;
  padding:22px 5%;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:11px;
  color:#8f969e;
}
.cloud-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#171b1f;
  border:1px solid #292e34;
  font-size:17px;
}
.cloud-copy{display:flex;flex-direction:column;gap:3px}
.cloud-copy strong{font-size:11px;color:#dce0e4}
.cloud-copy span{font-size:10px;color:#8f969e}

/* Il pannello notifiche resta ancorato all'area destra dell'header. */
.notification-panel{top:72px}

@media(max-width:760px){
  .header-actions{gap:5px}
  .header-auth-btn{padding:8px 9px;font-size:9px}
  .icon-btn{width:34px;height:34px}
  .mini-profile .avatar{width:27px;height:27px}
  .cloud-footer-inner{justify-content:flex-start;padding:18px 18px}
  .notification-panel{top:58px}
}

@media(max-width:430px){
  #authLoginBtn{max-width:112px;overflow:hidden;text-overflow:ellipsis}
  .header-auth-btn{font-size:8px;padding:8px}
}


/* ===== MotorMatch V15.9 — saluto dinamico + campanella centrata ===== */
#notificationBtn{
  align-items:center;
  justify-content:center;
  place-items:center;
  padding:0;
  line-height:1;
  text-align:center;
  font-size:16px;
}
#notificationBtn i{pointer-events:none}


/* ===== MotorMatch V15.11 — crea uscita + profilo ===== */
.profile-bike-refined{position:relative;min-height:92px;padding:15px 15px 15px 17px;background:linear-gradient(135deg,#121518,#0e1012);border-color:#30353b}
.profile-bike-refined:hover{border-color:#4b525a}
.profile-bike-number{position:absolute;top:9px;right:10px;min-width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:#20252a;color:#8f969e;font-size:9px;font-weight:800}
.profile-bike-refined .profile-bike-icon{width:48px;height:48px;border-radius:14px;font-size:23px;background:linear-gradient(145deg,#242a30,#171b1f)}
.travel-preference-display{display:inline-flex;align-items:center;min-height:38px;padding:9px 13px;background:#20252a;border:1px solid #30363d;border-radius:12px;color:#e3e6e9;font-size:11px;font-weight:700}
.profile-choice-block{background:#101214;border:1px solid #252a2f;border-radius:14px;padding:15px}
.profile-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:8px}
.travel-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.choice-tile{position:relative;display:flex;align-items:center;gap:9px;margin:0;padding:12px 13px;background:#161a1e;border:1px solid #2b3137;border-radius:12px;cursor:pointer;color:#bfc5cb;font-size:11px;transition:.15s}
.choice-tile:hover{border-color:#4a5159;background:#1b2025}
.choice-tile input{width:15px;height:15px;margin:0;accent-color:#ff641f}
.choice-tile:has(input:checked){border-color:#7a3b22;background:#2b1b14;color:#fff}
.bike-editor-list{display:grid;gap:10px}
.bike-editor-card{grid-template-columns:auto 1.1fr 1.35fr .65fr auto;align-items:center;padding:10px;margin:0;background:#101214;border:1px solid #292e34;border-radius:13px}
.bike-editor-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#1d2227;font-size:19px}
.bike-editor-card input{width:100%;background:#0d0f11;border:1px solid #2b3035;color:#fff;border-radius:9px;padding:11px}
.bike-editor-card .remove{width:38px;height:38px;border-radius:10px;color:#ff9a9a;background:#2a1919}
@media(max-width:700px){.profile-choice-grid,.travel-choice-grid{grid-template-columns:1fr}.bike-editor-card{grid-template-columns:auto 1fr auto}.bike-editor-card .bike-model{grid-column:2}.bike-editor-card .bike-year{grid-column:2}.bike-editor-card .remove{grid-column:3;grid-row:1}}


/* ===== MotorMatch V15.12 — conferma iscrizione + solo/coppia ===== */
.join-confirm-modal{
  position:fixed;inset:0;z-index:80;display:none;align-items:center;justify-content:center;
  padding:20px;background:rgba(0,0,0,.72);backdrop-filter:blur(8px)
}
.join-confirm-modal.show{display:flex}
.join-confirm-card{
  position:relative;width:min(560px,100%);background:#15181b;border:1px solid #30363d;
  border-radius:22px;padding:26px;box-shadow:0 28px 90px rgba(0,0,0,.55)
}
.join-confirm-card h2{margin:0 0 8px;font-size:27px}
.join-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0 14px}
.join-choice{
  margin:0;display:grid;grid-template-columns:auto 1fr;column-gap:10px;row-gap:3px;align-items:center;
  background:#101316;border:1px solid #2b3137;border-radius:15px;padding:16px;cursor:pointer;transition:.15s
}
.join-choice:hover{border-color:#4a5159;background:#171b1f}
.join-choice:has(input:checked){border-color:#8a4328;background:#2b1b14}
.join-choice input{grid-row:1/4;width:16px;height:16px;margin:0;accent-color:#ff641f}
.join-choice-icon{font-size:21px}
.join-choice strong{font-size:13px}
.join-choice small{color:#8f969e;font-size:10px}
.join-availability{margin:12px 0 18px;padding:11px 13px;border:1px solid #2b3137;border-radius:11px;background:#101316;color:#aeb4ba;font-size:11px}
.join-availability.warning{border-color:#6b3428;color:#ff9f84;background:#281915}
.join-confirm-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.participant-mode{color:#ff9b72!important;font-weight:700}
@media(max-width:560px){
  .join-choice-grid{grid-template-columns:1fr}
  .join-confirm-actions{display:grid;grid-template-columns:1fr}
  .join-confirm-actions button{width:100%}
}


/* ===== MotorMatch V15.13 — 3 modalità partecipazione ===== */
.join-choice-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.join-choice-grid-three .join-choice{min-height:118px}
.join-choice-grid-three .join-choice-icon{font-size:23px}
@media(max-width:760px){
  .join-choice-grid-three{grid-template-columns:1fr}
  .join-choice-grid-three .join-choice{min-height:auto}
}


/* ===== MotorMatch V15.14 — home, follow reciproco, chat privata ===== */
.brand-home{
  appearance:none;border:0;background:transparent;padding:0;margin:0;color:inherit;
  font:inherit;cursor:pointer;text-align:left
}
.brand-home:hover{opacity:.88}

.social-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.follow-status{
  display:inline-flex;align-items:center;min-height:30px;padding:7px 10px;border-radius:999px;
  background:#17261f;border:1px solid #274536;color:#82d7a5;font-size:9px;font-weight:800
}
.person-follow-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:12px}
.person-follow-card .person-feed{cursor:pointer}
.chat-section-title{margin:20px 0 8px}
.chat-section-title h3{margin:0;font-size:14px}


/* ===== MotorMatch V15.15 — stato follow reciproco ===== */
.follow-status.not-following-you{
  background:#1a1d20;
  border-color:#30363d;
  color:#8f969e;
}
.follow-status.is-following-you{
  background:#17261f;
  border-color:#274536;
  color:#82d7a5;
}


/* ===== MotorMatch V15.17 — chat header, città, unread ===== */
.chat-nav-btn{position:relative}
.chat-unread-dot{
  position:absolute;
  top:5px;
  right:5px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#ff3b30;
  border:2px solid #15181b;
  display:none;
  box-shadow:0 0 0 1px rgba(255,59,48,.15);
}
.chat-unread-dot.show{display:block}

.direct-chat-profile-header{
  display:flex;
  align-items:center;
  gap:15px;
  padding:20px 22px;
  border-bottom:1px solid #30353a;
  background:linear-gradient(180deg,#171a1d,#131619);
}
.direct-chat-avatar{
  width:58px!important;
  height:58px!important;
  flex:0 0 58px;
  font-size:21px!important;
}
.direct-chat-person{min-width:0}
.direct-chat-person h2{
  margin:0 0 7px;
  font-size:21px;
  line-height:1.1;
}
.direct-chat-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 12px;
  color:#9ba2a9;
  font-size:10px;
}
.direct-chat-meta span{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.social-location{
  margin:4px 0 10px;
  color:#a6adb4;
  font-size:11px;
  font-weight:700;
}

@media(max-width:600px){
  .direct-chat-profile-header{padding:16px}
  .direct-chat-avatar{width:50px!important;height:50px!important;flex-basis:50px}
  .direct-chat-person h2{font-size:18px}
  .direct-chat-meta{gap:5px 9px}
}

/* ===== MotorMatch V15.18 — link profilo dalla chat ===== */
.direct-chat-profile-link{cursor:pointer}
.direct-chat-person h2.direct-chat-profile-link:hover{color:#ff5a24}
.direct-chat-avatar.direct-chat-profile-link:hover{
  transform:scale(1.04);
  box-shadow:0 0 0 2px rgba(255,90,36,.55);
}
.direct-chat-avatar{transition:transform .15s ease,box-shadow .15s ease}


/* ===== MotorMatch V15.20 — unified chat fixes ===== */
.chat-unread-dot{display:none!important}
.chat-unread-dot.show{display:block!important}
.direct-chat-profile-link{cursor:pointer}
.direct-chat-person h2.direct-chat-profile-link:hover{color:#ff5a24}


/* ===== MotorMatch 20.0 ===== */
.explore-tools{display:grid;gap:12px;margin:18px 0 28px}.explore-search{width:100%}.filter-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:10px}.filter-grid label{display:grid;gap:6px;font-size:10px;color:#9299a1}.filter-grid select{width:100%}.form-hint{font-size:10px;color:#8c949c;margin:-2px 0 12px}.prelogin-welcome{max-width:720px;margin:28px auto;padding:28px;border:1px solid #292f35;border-radius:20px;background:#121518;text-align:center}.prelogin-welcome h2{font-size:24px;margin:0 0 8px}.next-ride-hero{margin:22px 0 30px;padding:22px;border:1px solid #55301f;border-radius:20px;background:linear-gradient(115deg,#171a1d,#2b1710);display:flex;align-items:center;justify-content:space-between;gap:20px;cursor:pointer}.next-ride-hero h2{font-size:28px;margin:4px 0}.next-ride-hero p{color:#aeb5bc}.next-ride-stats{display:grid;grid-template-columns:auto auto;gap:2px 10px;text-align:right}.next-ride-stats b{font-size:24px;color:#ff6b2b}.next-ride-stats span{font-size:9px;color:#9299a1;align-self:center}.score-row{display:flex;justify-content:space-between;align-items:center;gap:8px}.event-cancelled{opacity:.7}.event-alert{padding:12px 16px;border:1px solid #665324;background:#2b2514;color:#ffd86a;border-radius:12px;margin-bottom:12px}.event-alert.danger{border-color:#6a302d;background:#2a1716;color:#ff9b91}.organizer-notice{display:flex;gap:12px;align-items:center;padding:14px 16px;background:#172019;border:1px solid #294332;border-radius:12px;margin-bottom:12px}.organizer-notice span{color:#b6c0ba}.event-insights{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0}.insight-card{display:grid;gap:6px;padding:16px;border:1px solid #2b3137;border-radius:14px;background:#121518}.insight-card span{font-size:13px}.insight-card small{color:#9199a1}.event-map-card{margin:14px 0;border:1px solid #2b3137;border-radius:16px;overflow:hidden;background:#121518}.event-map-card>div{padding:14px 16px}.event-map-card h3{margin:0 0 4px}.event-map-card p{margin:0;color:#9aa2aa}.event-map-card iframe{width:100%;height:280px;border:0;display:block;filter:saturate(.75) brightness(.85)}.event-map-card.no-map{padding:18px}.match-score-panel{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;padding:10px 12px;margin:8px 0;background:#171b1e;border:1px solid #2c343b;border-radius:10px}.match-score-panel span{font-size:10px;color:#9ba2a9}.verified-badge{color:#73d5a0;font-weight:800}.notification-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}.notification-item{width:100%;text-align:left;display:grid;gap:3px;border:0;border-top:1px solid #292e33;background:transparent;color:#eef1f3;padding:11px 2px;cursor:pointer}.notification-item.unread{background:rgba(255,93,36,.06)}.notification-item span,.notification-item small{color:#9ca3aa}.notification-item.unread:before{content:"";position:absolute}.install-app-btn{margin-left:auto}.social-actions .danger{opacity:.85}
@media(max-width:1100px){.filter-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.filter-grid{grid-template-columns:1fr 1fr}.next-ride-hero{align-items:flex-start;flex-direction:column}.next-ride-stats{text-align:left}.event-insights{grid-template-columns:1fr}.event-map-card iframe{height:220px}.event-actions{gap:6px;flex-wrap:wrap}.event-actions button{flex:1 1 140px}.cloud-footer-inner{flex-wrap:wrap}.install-app-btn{margin-left:0}}
@media(max-width:460px){.filter-grid{grid-template-columns:1fr}.next-ride-hero h2{font-size:22px}}

/* ===== MotorMatch V20.2 — mobile viewport + touch optimization ===== */
html{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  width:100%;
  max-width:100%;
  min-height:100dvh;
  overflow-x:clip;
}
main,.view,header>*,.event-top>*,.social-info,.chat-input>*{min-width:0}
img,video,canvas,iframe{max-width:100%}
input,select,textarea,button{font-family:inherit}
input,select,textarea{max-width:100%}
.view,.form-card,.profile-shell,.profile-main-card,.profile-sidebar,
.profile-section-card,.event-head,.participants,.chat-box,.social-hero,
.social-panel,.next-ride-hero,.feed-card,.card{min-width:0;max-width:100%}
.event-top h2,.social-info h1,.feed-card h3,.card h3,.chat-header h2,
.direct-chat-person h2,.person-info,.meta{overflow-wrap:anywhere}

@media(max-width:760px){
  body{
    padding-bottom:calc(82px + env(safe-area-inset-bottom));
    overscroll-behavior-x:none;
  }
  header{
    width:100%;
    gap:8px;
    padding-left:max(14px,env(safe-area-inset-left));
    padding-right:max(14px,env(safe-area-inset-right));
  }
  .brand{flex:0 1 auto;white-space:nowrap}
  .header-actions{flex:0 0 auto}
  .view{
    width:100%;
    padding-left:max(16px,env(safe-area-inset-left));
    padding-right:max(16px,env(safe-area-inset-right));
  }
  /* Safari iOS ingrandisce la pagina quando un campo attivo usa meno di 16 px. */
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{
    font-size:16px!important;
    line-height:1.25;
  }
  input[type="date"],input[type="time"],select{width:100%}
  .search input{min-width:0}
  .form-card,.event-head,.participants,.social-panel{padding:18px}
  .form-card{width:100%}
  .row,.filter-grid,.event-insights{min-width:0}
  .people,.score-row,.participant-title,.profile-section-title{flex-wrap:wrap}
  .people>div{display:flex;flex-wrap:wrap;gap:7px}
  .people>div button{margin:0!important}
  .chat-input{align-items:center;padding:10px;gap:8px}
  .chat-input input{min-width:0;width:auto;padding:12px}
  .chat-input .primary{flex:0 0 auto;min-height:44px}
  .messages{
    height:clamp(260px,calc(100dvh - 285px),430px);
    padding:14px;
    -webkit-overflow-scrolling:touch;
  }
  .msg{overflow-wrap:anywhere}
  .bottom-nav{
    height:calc(68px + env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom);
    padding-left:env(safe-area-inset-left);
    padding-right:env(safe-area-inset-right);
  }
  .bottom-nav .nav{min-height:44px;touch-action:manipulation}
  .notification-panel{
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    width:auto;
    max-height:calc(100dvh - 140px);
    overflow-y:auto;
  }
  .auth-modal,.join-confirm-modal{
    padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  }
  .auth-card,.join-confirm-card{
    max-height:calc(100dvh - 28px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .toast{
    left:max(14px,env(safe-area-inset-left));
    right:max(14px,env(safe-area-inset-right));
    bottom:calc(82px + env(safe-area-inset-bottom));
    text-align:center;
  }
  button,.nav,.back,.choice-tile,.join-choice{touch-action:manipulation}
}

@media(max-width:430px){
  header{padding-left:10px;padding-right:10px}
  .brand{font-size:16px;letter-spacing:-.6px}
  .header-actions{gap:4px}
  .header-auth-btn{padding:8px 7px}
  .home-top,.hero,.next-ride-hero,.prelogin-welcome{padding:20px}
  .home-top h1,.hero h1{font-size:clamp(30px,10vw,34px);letter-spacing:-1.5px}
  .event-top h2{font-size:26px}
  .social-hero{padding:20px;gap:16px}
  .social-hero .avatar{width:84px;height:84px;flex:0 0 84px}
  .social-info h1{font-size:27px}
  .event-actions{display:grid;grid-template-columns:1fr;width:100%}
  .event-actions button{width:100%;min-height:44px}
  .join-confirm-card,.auth-card{padding:22px 18px}
}

/* ===== MotorMatch V20.3 — hidden toast must not appear as a white bar ===== */
.toast{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.toast.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

/* ===== MotorMatch V20.4 — fluid profile and all-device responsive layout ===== */
.profile-form,.profile-form-grid,.profile-form-grid>*,
.profile-form-grid label,.profile-choice-block,.bike-editor-list,
.bike-editor-card,.row,.row>*,.filter-grid,.filter-grid>*,
.social-grid,.social-grid>*,.feed-grid,.feed-grid>*{
  min-width:0;
  max-width:100%;
}
.profile-form,.profile-form-grid,.profile-form-grid label{width:100%}
.profile-form-grid input:not([type="checkbox"]):not([type="radio"]),
.profile-form-grid select,.profile-form-grid textarea,
.row input,.row select,.row textarea{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
}
.profile-form-grid input[type="file"]{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.profile-form-grid input[type="file"]::file-selector-button,
.profile-form-grid input[type="file"]::-webkit-file-upload-button{
  max-width:48%;
  margin-right:10px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-main-card,.profile-section-card{overflow:hidden}

@media(max-width:1024px){
  .view{padding-left:clamp(18px,4vw,38px);padding-right:clamp(18px,4vw,38px)}
  .profile-shell{grid-template-columns:minmax(250px,290px) minmax(0,1fr)}
  .profile-sidebar,.profile-main-card{padding:clamp(18px,2.5vw,22px)}
  .filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:900px){
  #profile.view{width:100%;max-width:100%}
  .profile-shell{grid-template-columns:minmax(0,1fr);width:100%}
  .profile-sidebar{position:static;top:auto}
  .profile-main-head{flex-direction:column}
  .profile-main-head .chips{justify-content:flex-start}
}

@media(max-width:700px){
  .profile-main-card,.profile-sidebar,.profile-section-card,
  .form-card,.social-panel,.event-head,.participants{
    width:100%;
    padding:16px;
    border-radius:16px;
  }
  .profile-form-grid,.profile-bikes-grid,.profile-event-grid,
  .row,.pace-options,.social-grid,.event-insights{
    grid-template-columns:minmax(0,1fr);
  }
  .profile-form-grid .full{grid-column:auto}
  .profile-section-title{align-items:flex-start}
  .profile-section-title>span{margin-left:auto;text-align:right}
  .bike-editor-card{
    width:100%;
    grid-template-columns:38px minmax(0,1fr) 38px;
  }
  .bike-editor-card .bike-model,.bike-editor-card .bike-year{grid-column:2}
  .bike-editor-card .remove{grid-column:3;grid-row:1}
  .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:480px){
  .view{padding-left:14px;padding-right:14px}
  .profile-main-card,.profile-sidebar,.profile-section-card,
  .form-card,.social-panel,.event-head,.participants{padding:14px}
  .profile-main-head h1{font-size:clamp(23px,8vw,28px)}
  .profile-section-title{gap:6px}
  .profile-section-title h3{font-size:clamp(16px,5.4vw,20px)}
  .profile-section-title>span{font-size:9px;max-width:38%}
  .profile-stat-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profile-stat{padding:10px 4px}
  .profile-form-grid{gap:10px}
  .profile-form-grid label{margin-bottom:12px}
  .profile-choice-block{padding:12px}
  .filter-grid{grid-template-columns:minmax(0,1fr)}
  .social-hero{flex-direction:column;align-items:flex-start}
  .social-actions,.person-follow-actions{width:100%}
  .social-actions button,.person-follow-actions button{flex:1 1 auto}
}

@media(max-width:360px){
  header{gap:4px;padding-left:8px;padding-right:8px}
  .brand{font-size:15px}
  .header-actions{gap:3px}
  .icon-btn{width:32px;height:32px}
  .mini-profile .avatar{width:25px;height:25px}
  .header-auth-btn{padding:7px 6px;font-size:8px}
  .view{padding-left:10px;padding-right:10px}
  .profile-main-card,.profile-sidebar,.profile-section-card{padding:12px}
}

/* ===== MotorMatch V21.0 — Legal Readiness ===== */
.legal-consent-group{display:grid;gap:10px;margin:14px 0;padding:14px;background:#101316;border:1px solid #2b3137;border-radius:14px}
.legal-consent-group>small{color:#8f969e;line-height:1.5}
.legal-check{display:flex;align-items:flex-start;gap:10px;margin:0;color:#d5d9dd;font-size:11px;line-height:1.45;font-weight:600}
.legal-check input{width:17px;height:17px;flex:0 0 17px;margin:1px 0 0;accent-color:#ff641f}
.legal-inline-link{display:inline;padding:0;border:0;background:transparent;color:#ff8a5b;font:inherit;font-weight:800;text-decoration:underline;cursor:pointer}
.legal-compliance-modal,.legal-document-modal{position:fixed;inset:0;display:none;place-items:center;padding:20px;background:rgba(0,0,0,.78);backdrop-filter:blur(10px)}
.legal-compliance-modal{z-index:145}.legal-document-modal{z-index:155}
.legal-compliance-modal.show,.legal-document-modal.show{display:grid}
.legal-compliance-card,.legal-document-card{position:relative;width:min(610px,100%);max-height:calc(100dvh - 40px);overflow:auto;background:#15181b;border:1px solid #30363d;border-radius:22px;padding:26px;box-shadow:0 30px 90px #000b}
.legal-compliance-card h2,.legal-document-card h2{margin:0 0 10px;letter-spacing:-.7px}
.legal-compliance-card>p:not(.eyebrow){color:#aeb4ba;line-height:1.6}
.legal-compliance-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}
.legal-document-card{width:min(760px,100%)}
.legal-document-body{color:#b4bac0;line-height:1.65;font-size:13px}
.legal-document-body h3{color:#f2f4f6;margin:22px 0 6px}
.legal-document-body p{margin:8px 0}
.legal-draft-warning{padding:12px 14px;border:1px solid #68452c;border-radius:12px;background:#281c14;color:#ffc29f!important}
.legal-version{margin-top:22px;padding-top:14px;border-top:1px solid #2a2f34;color:#777f87;font-size:9px}
.legal-footer-links{max-width:1180px;margin:0 auto;padding:18px 5% 0;display:flex;justify-content:center;flex-wrap:wrap;gap:5px 14px}
.legal-footer-links button{padding:4px;border:0;background:transparent;color:#858c94;font-size:9px;font-weight:700;cursor:pointer}
.legal-footer-links button:hover{color:#ff8a5b}
.privacy-account-card{border-color:#343b42}
.privacy-account-actions{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}
.privacy-account-actions button{min-height:42px}

@media(max-width:600px){
 .legal-compliance-modal,.legal-document-modal{padding:12px}
 .legal-compliance-card,.legal-document-card{max-height:calc(100dvh - 24px);padding:22px 17px;border-radius:18px}
 .legal-compliance-actions{display:grid;grid-template-columns:1fr}
 .legal-compliance-actions button,.privacy-account-actions button{width:100%}
 .legal-footer-links{padding:15px 16px 0;gap:6px 12px}
 .legal-check{font-size:12px}
}
