/* Mobile refinements: a stable login viewport and compact settings. */
@media (max-width:800px){
  html:has(.access-shell),body:has(.access-shell){height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
  .access-shell{position:fixed;inset:0;top:var(--access-viewport-top,0px);height:100dvh;height:var(--access-viewport-height,100dvh);min-height:0;display:flex;flex-direction:column;overflow:hidden}
  .access-topbar{flex:0 0 auto;padding:calc(8px + env(safe-area-inset-top)) 16px 4px;gap:12px}
  .access-leaf{width:30px;height:30px;border-radius:9px}.access-leaf svg{width:21px;height:21px}
  .access-header-name{--header-brand-width:88px;--header-brand-height:30px;max-width:88px}
  .access-restricted{font-size:7px;letter-spacing:1px}
  .access-console{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;overflow:hidden}
  .access-identity{flex:0 0 auto;width:100%;padding:clamp(24px,4.5svh,38px) 20px 8px;gap:0}
  .access-wordmark{max-width:260px}.access-art-caption{font-size:7px;letter-spacing:2px;margin-top:0;padding-top:7px}
  .access-form-panel{flex:1;min-height:0;padding:0 16px calc(10px + env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start;justify-content:safe center;scrollbar-width:thin}
  .access-form-card{flex:0 0 auto;max-width:400px;padding:16px 20px;border-radius:16px}
  .access-form-card :is(.access-lock-emblem,.access-form-copy,.access-private){display:none}
  .access-lock-emblem{width:28px;height:28px;margin-bottom:9px;border-radius:8px}.access-lock-emblem svg{width:17px;height:17px}
  .access-form-card h2{font-size:22px;line-height:1.25;letter-spacing:-.65px;margin-bottom:6px}
  .access-form-copy{font-size:11px;line-height:1.5;margin-bottom:14px}
  .access-field{gap:5px;margin-bottom:10px;font-size:11px}.access-field input{height:44px;font-size:16px;padding-block:9px}
  .access-field-icon{top:13px;width:16px;height:16px}.access-password button{min-height:40px;width:50px}.access-eye-art{width:35px;height:24px}
  .access-options{gap:4px 10px;margin:0 0 9px;flex-wrap:wrap}.access-remember,.access-help-toggle{min-height:40px;font-size:11px}
  .access-submit{min-height:44px;padding:10px 12px;font-size:12px}.access-private{margin-top:10px;font-size:9px}
  .access-help-content{font-size:11px;line-height:1.5;padding:10px;margin-bottom:10px}.access-message{font-size:11px;margin-bottom:10px}
  .access-palette{flex:0 0 auto;margin-top:10px;max-width:400px}.access-palette-label{font-size:8px;margin-bottom:2px}
  .access-palette-options{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px}
  .access-palette-choice{width:100%;min-width:0;height:44px;padding:5px 2px;border-radius:8px}.access-palette-choice>.access-palette-gem{width:24px;height:29px}
  .access-palette-name{font-size:10px;line-height:1.4;min-height:14px;margin-top:3px}.access-form-footer{flex:0 0 auto;font-size:9px;margin-top:8px;line-height:1.5}.access-form-footer strong{font-size:10px}
}
/* Keep the form reachable with the keyboard, landscape, setup or expanded help. */
@media(max-width:800px) and (max-height:650px){
  .access-identity{padding:3px 20px 6px}.access-wordmark{max-width:170px}.access-art-caption{display:none}
  .access-form-card{padding:14px 18px}.access-lock-emblem{display:none}.access-palette{margin-top:5px}.access-form-footer{margin-top:4px}
}
@media(max-width:800px) and (max-height:500px){
  .access-identity,.access-topbar,.access-palette,.access-form-footer{display:none}
  .access-form-panel{padding-top:8px;justify-content:flex-start}.access-form-card h2,.access-form-copy,.access-private{display:none}
}
@media(max-width:800px) and (min-height:501px) and (max-height:600px){.access-identity,.access-form-footer{display:none}}
@media(max-width:800px){
  html[data-access-compact="true"] :is(.access-identity,.access-topbar,.access-palette,.access-form-footer){display:none}
  html[data-access-compact="true"] .access-form-panel{padding-top:8px;justify-content:flex-start}
  html[data-access-compact="true"] .access-form-card :is(h2,.access-form-copy,.access-lock-emblem,.access-private){display:none}
}
@media(max-width:760px){
  html[data-font][data-palette] .content .settings-workspace .settings-frame{grid-template-columns:56px minmax(0,1fr);gap:10px;align-items:start}
  html[data-font][data-palette] .content .settings-workspace.mobile-settings-collapsed .settings-frame{grid-template-columns:minmax(0,1fr)}
  html[data-font][data-palette] .content .settings-workspace .settings-menu{gap:5px}
  html[data-font][data-palette] .content .settings-workspace .settings-menu-item{width:56px;height:52px;min-height:52px;padding:6px 2px;gap:4px;border-radius:10px}
  html[data-font][data-palette] .content .settings-workspace .settings-menu-item>.icon{width:17px;height:17px}
  html[data-font][data-palette] .content .settings-workspace .mobile-tab-label{font-size:9px;line-height:1.25}
  html[data-font][data-palette] .content .settings-workspace .settings-category-head{margin-bottom:10px}
  .settings-workspace .mobile-settings-control{margin-top:5px!important;min-height:32px!important;font-size:10px!important;padding:5px 8px!important}
  html[data-font][data-palette] .content .settings-workspace .settings-appearance .panel-body{padding:12px}
  html[data-font][data-palette] .content .settings-workspace .palette-fieldset legend{font-size:12px;margin-bottom:10px}
  html[data-font][data-palette] .content .settings-workspace .infinity-palette-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  html[data-font][data-palette] .content .settings-workspace .infinity-palette-card{min-height:82px;padding:9px 5px 7px;gap:4px;border-radius:10px}
  html[data-font][data-palette] .content .settings-workspace .infinity-palette-card>.infinity-gem{width:28px;height:42px}
  html[data-font][data-palette] .content .settings-workspace .infinity-palette-card>span:not(.infinity-gem):not(.palette-choice):not(.palette-metal-swatch){font-size:10px;line-height:1.3;text-align:center;word-break:normal;overflow-wrap:normal}
  html[data-font][data-palette] .content .settings-workspace .palette-choice{width:8px;height:8px;top:7px;right:7px}
  html[data-font][data-palette] .content .settings-workspace .palette-metal-swatch{height:4px;width:70%;margin-top:2px}
  html[data-font][data-palette] .content .settings-workspace .appearance-format-controls{margin-top:14px;gap:8px}
  html[data-font][data-palette] .content .settings-workspace .appearance-save-status{font-size:10px;line-height:1.5}
  html[data-font][data-palette] .content .settings-workspace .appearance-footer{padding:10px 12px}
  html[data-font][data-palette] .content .settings-workspace .appearance-footer .btn{width:100%;min-height:40px;font-size:11px;padding:8px}
  html[data-font][data-palette] .content .settings-workspace :is(.settings-option-row,.settings-contact-row,.settings-content-head){gap:9px;padding:12px}
  html[data-font][data-palette] .content .settings-workspace :is(.settings-sync-actions,.settings-contact-actions){display:flex;flex-wrap:wrap;gap:8px;width:100%}
  html[data-font][data-palette] .content .settings-workspace :is(.settings-sync-actions,.settings-contact-actions)>.btn{flex:1 1 110px;min-width:0;min-height:40px;font-size:11px}
  html[data-font][data-palette] .content .settings-workspace .settings-content-head h3{font-size:14px;line-height:1.4}
  html[data-font][data-palette] .content .settings-workspace .settings-user-row>.btn{min-height:40px!important;padding:7px 10px!important}
  html[data-font][data-palette] .content .settings-workspace .settings-user-role{padding-left:0;font-size:11px}
  html[data-font][data-palette] .content .detail-hero .detail-score{font-size:clamp(24px,7vw,30px);line-height:1.2;overflow-wrap:normal}
  html[data-font][data-palette] .content .detail-title-row h2{font-size:17px;line-height:1.35}
  html[data-font="large"][data-palette] .content .settings-workspace .infinity-palette-card{min-height:94px}
  html[data-font="large"][data-palette] .content .settings-workspace .infinity-palette-card>span:not(.infinity-gem):not(.palette-choice):not(.palette-metal-swatch){font-size:12px}
}
@media(max-width:360px){
  .access-topbar{padding-inline:12px}.access-form-panel{padding-inline:12px}.access-form-card{padding-inline:16px}
  html[data-font][data-palette] .content .settings-workspace .settings-frame{grid-template-columns:50px minmax(0,1fr);gap:8px}
  html[data-font][data-palette] .content .settings-workspace .settings-menu-item{width:50px}
  html[data-font][data-palette] .content .settings-workspace .settings-appearance .panel-body{padding:10px}
}
