/* Shared mobile layout; does not rely on :has(), container queries or dvh. */
.tt-modern.tt-home-page{overflow-x:visible}
@media(max-width:820px){
 html.tt-work-document{scrollbar-width:none}html.tt-work-document::-webkit-scrollbar{display:none}
 body.tt-workspace{min-width:0;width:100%;margin:0}
 .tt-workspace .main,.tt-workspace main{min-width:0;max-width:100%}
 .tt-workspace .tt-work-topbar{box-sizing:border-box;width:100%;padding:10px 12px;gap:8px;display:grid;grid-template-columns:minmax(0,1fr) auto}
 .tt-workspace .tt-work-topbar nav{grid-column:1/-1;display:flex;flex-wrap:wrap;width:100%;gap:4px 10px;justify-content:flex-start;margin:0;border-top:1px solid var(--tt-line);padding-top:7px}
 .tt-workspace .tt-work-topbar nav a{font-size:12px;line-height:1.7;min-height:34px;display:inline-flex;align-items:center}
 .tt-workspace .tt-work-toplabel{display:none}
 .tt-workspace .tt-work-theme{grid-column:2;grid-row:1;margin:0!important;justify-self:end}
 .tt-workspace .profile-editor{width:calc(100% - 24px)!important;margin:12px auto;max-width:none;min-width:0}
 .profile-editor .pe-workspace{display:flex;flex-direction:column;gap:14px;min-width:0}
 .profile-editor .pe-tools{order:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .profile-editor .pe-guide{order:2;width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .profile-editor .pe-side,.profile-editor .pe-card{min-width:0;max-width:100%;box-sizing:border-box}
 .profile-editor .pe-stage{order:1;width:100%;max-width:422px;position:relative;top:auto;margin:0 auto}
 .profile-editor .pe-heading{flex-wrap:wrap;gap:10px}.profile-editor .pe-heading-links{display:flex;flex-wrap:wrap;gap:7px;max-width:100%}
 .profile-editor .pe-links-card{display:block}.profile-editor .pe-links-card a{overflow-wrap:break-word}
 body.tt-workspace .user-studio{width:calc(100% - 24px);margin:14px auto}
 .tt-workspace .user-studio-heading{flex-wrap:wrap;gap:10px}
 .tt-workspace .user-profile-toolbar{display:flex;flex-wrap:wrap;gap:8px;padding:10px}
 .tt-workspace .user-profile-search{flex:1 1 100%;min-width:0}
 .tt-workspace .user-profile-toolbar>label:not(.user-profile-search){flex:1;min-width:0}
 .tt-workspace .user-profile-toolbar .select2-container{width:100%!important;min-width:0}
 .tt-workspace .user-profile-actions{min-width:0}
 .tt-workspace .user-profile-actions>:is(a,button){white-space:normal;text-align:center;min-width:0}
 .tt-workspace .modal-dialog,.tt-public-profile .modal-dialog{width:calc(100% - 16px)!important;max-width:560px!important;margin:8px auto!important;min-height:0!important}
 .tt-workspace .modal,.tt-public-profile .modal{padding:0!important;overflow:hidden!important;scrollbar-width:none;scrollbar-gutter:auto!important}
 .tt-workspace .modal #dialogContent,.tt-public-profile .modal #dialogContent{width:100%;max-width:100%;margin:0;padding:0}
 .tt-workspace .modal-content,.tt-public-profile .modal-content{max-height:calc(var(--tt-mobile-height,100vh) - 16px)!important;box-sizing:border-box}
 .tt-workspace .modal-body,.tt-public-profile .modal-body{min-height:0;overflow-y:auto;overflow-x:hidden;max-width:100%}
 .tt-workspace input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=hidden]),.tt-workspace select,.tt-workspace textarea,.tt-public-profile .modal input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.tt-public-profile .modal select,.tt-public-profile .modal textarea{font-size:16px!important}
}
@media(max-width:520px){
 .profile-editor .pe-stage{width:calc(100% + 24px);max-width:none;margin:0 -12px}
 .profile-editor .pe-phone{padding:0;border:0;border-radius:0;aspect-ratio:auto;background:none;box-shadow:none}
 .profile-editor .pe-screen{height:auto;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
 .profile-editor .pe-phone-top,.profile-editor .pe-phone-bottom,.profile-editor .pe-hardware,.profile-editor .pe-stage:before,.profile-editor .pe-phone:before,.profile-editor .pe-phone:after{display:none}
 body.tt-editor-page .profile-editor .node-page1{height:auto!important;max-height:none!important;min-height:0!important;flex:none;border-radius:0!important;overflow:visible!important;scrollbar-width:none}
 body.tt-editor-page .profile-editor .node-page1::-webkit-scrollbar{display:none}
 .profile-editor .device{max-width:none;width:100%;margin:0!important}
 .tt-workspace .pc-edit-modal .modal-content,.tt-public-profile .pc-edit-modal .modal-content{max-height:calc(var(--tt-mobile-height,100vh) - 16px)!important}
}
.pc-preview-navigation{box-sizing:border-box;width:calc(100% - 24px);max-width:414px;margin:8px auto;direction:rtl}
.pc-preview-navigation a{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:7px 11px;border:1px solid var(--tt-line);border-radius:10px;color:var(--tt-ink);background:var(--tt-paper);font:12px/1.8 TT,Tahoma,sans-serif;text-decoration:none}
.pc-preview-navigation svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pe-appearance-preview summary{font:12px/1.8 TT,Tahoma,sans-serif;cursor:pointer;padding:7px;color:var(--tt-ink)}
@media(max-width:700px){
 .pe-appearance-modal{padding:8px}
 .pe-appearance-modal .pe-appearance-layout{display:flex;flex-direction:column;width:100%;height:calc(var(--tt-mobile-height,100vh) - 16px);max-height:calc(var(--tt-mobile-height,100vh) - 16px);padding:8px;overflow:hidden;gap:7px}
 .pe-appearance-modal .pe-appearance-preview{display:block;order:0;width:100%;position:static;flex:none}
 .pe-appearance-modal .pe-appearance-screen{width:100%;height:150px;min-height:0;margin:5px auto}
 .pe-appearance-modal .pe-appearance-preview small{display:none}
 .pe-appearance-modal #pe-inline-settings{order:1;flex:1;min-height:0;max-height:none!important;overflow:hidden!important;padding:0}
 .pe-appearance-modal #pe-inline-settings>div,.pe-appearance-modal #pe-inline-settings form,.pe-appearance-modal #pe-inline-settings .modal-dialog{height:100%!important;max-height:100%!important;width:100%!important;margin:0!important;min-height:0!important}
 .pe-appearance-modal #pe-inline-settings .modal-content{height:100%!important;max-height:100%!important;display:flex;flex-direction:column;overflow:hidden!important}
 .pe-appearance-modal #pe-inline-settings .modal-header,.pe-appearance-modal #pe-inline-settings .card-footer{flex:none}
 .pe-appearance-modal #pe-inline-settings .modal-body{flex:1;min-height:0;overflow:auto!important}
}
.tt-profile-canvas .col-6 .pc-platform-card{display:grid!important;grid-template-columns:28px minmax(0,1fr);gap:7px!important;padding:9px!important}
.tt-profile-canvas .col-6 .pc-platform-card .pc-platform-arrow{display:none!important}
.tt-profile-canvas .col-6 .pc-platform-card .pc-platform-name{font-size:12px;line-height:1.8;word-break:normal;overflow-wrap:break-word}
.tt-profile-canvas .col-6 .pc-platform-card .pc-platform-icon{width:28px;height:28px}
.tt-profile-canvas .col-3 .pc-platform-card{display:flex!important;justify-content:center!important}
.tt-profile-canvas .col-3 .pc-platform-card .pc-platform-name,.tt-profile-canvas .col-3 .pc-platform-card .pc-platform-arrow{display:none!important}

/* Compact editor navigation lives with the side tools at every viewport. */
.profile-editor .pe-tools>.pe-heading-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:10px}
.profile-editor .pe-tools>.pe-heading-links a{justify-content:center;min-width:0;min-height:40px;padding:8px;font-size:12px;line-height:1.7;text-align:center}
.profile-editor .pe-profile-address{display:flex;align-items:center;gap:9px;min-height:44px;color:var(--tt-ink);border-radius:10px;line-height:1.8;transition:border-color .15s,background .15s}
.profile-editor .pe-profile-address>i{flex:none;font-size:18px;color:var(--pe-accent)}
.profile-editor .pe-profile-address>span{min-width:0;overflow-wrap:anywhere;unicode-bidi:plaintext}
.profile-editor .pe-profile-address:hover,.profile-editor .pe-profile-address:focus-visible{border-color:var(--pe-accent);outline:2px solid var(--pe-accent);outline-offset:2px}
@media(max-width:820px){
 .profile-editor .pe-heading{margin-bottom:10px;padding-bottom:9px}
 .profile-editor .pe-heading p{font-size:11px}
 .profile-editor .pe-heading h1{font-size:17px!important;line-height:1.8}
 .profile-editor .pe-tools{gap:8px}
 .profile-editor .pe-tools>.pe-heading-links{margin:0}
 .profile-editor .pe-tools .pe-card{padding:12px}
 .profile-editor .pe-card-heading{margin-bottom:9px}
 .profile-editor .pe-tools .pe-toolbar-compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .profile-editor .pe-tools .pe-toolbar-compact>button{grid-column:auto!important;grid-row:auto!important;min-height:44px;justify-content:center;font-size:12px;padding:8px 6px;gap:6px}
 .profile-editor .pe-toolbar-compact>button>i:last-child:not(:first-child){display:none}
 .profile-editor .pe-links-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .profile-editor .pe-links-card a{display:flex;align-items:center;gap:6px;margin:0;padding:6px 0;min-height:40px;font-size:11px;line-height:1.8}
 .profile-editor .pe-links-card a+a{border:0}
 .profile-editor .pe-links-card a>i:last-child{display:none}
}

/* On phones the document owns scrolling, including swipes across cards. */
@media(max-width:520px){
 .profile-editor .pe-screen{overflow:visible}
 .profile-editor .pe-stage .tt-profile-canvas .pe-item{touch-action:pan-y pinch-zoom;cursor:default}
 .profile-editor .pe-stage .pe-drag-handle{touch-action:none;cursor:grab}
}

/* Keep the editor's three navigation controls on one aligned row. */
.profile-editor .pe-tools>.pe-heading-links>:is(a,button){width:100%;min-width:0;min-height:40px;height:100%;margin:0;justify-content:center;align-self:stretch;padding:7px 5px;gap:4px;font-size:11px;line-height:1.6;text-align:center;white-space:nowrap}
.profile-editor .pe-tools>.pe-heading-links>a>i:last-child:not(:first-child){display:none}
@media(max-width:820px){.profile-editor .pe-tools>.pe-heading-links{grid-template-columns:repeat(2,minmax(0,1fr))}}
