.mobile-credit,.mobile-wallet-card,.mobile-dock{display:none}
.quick-actions{width:min(calc(100% - 26px),440px);margin:auto auto max(15px,env(safe-area-inset-bottom));padding:18px;border:1px solid var(--border);border-radius:20px;background:var(--surface);color:var(--ink)}
.quick-actions::backdrop{background:#081a23a6}
.quick-actions .section-head{margin-bottom:12px}
.quick-actions h2,.quick-actions form{margin:0}
.quick-list{display:grid;gap:5px}
.quick-list a{min-height:44px;background:var(--soft)}
.profile-heading{margin-bottom:14px}
.profile-identity{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:18px;border-radius:16px;background:linear-gradient(135deg,#19465b,#1a665f);color:#fff;margin-bottom:14px}
.profile-identity>span{display:grid;place-items:center;width:44px;height:44px;border:1px solid #ffffff75;border-radius:11px;background:#ffffff25;font-weight:750}
.profile-identity h2,.profile-identity p{overflow-wrap:anywhere;color:inherit;margin:0}
.profile-identity p{color:#e2f3f3}
.profile-identity small{border:1px solid #ffffff80;border-radius:7px;padding:4px 6px}
.profile-wallet{display:flex;align-items:center;justify-content:space-between;gap:12px}
.profile-wallet strong{display:block;font-size:1.45rem}
.profile-links{display:grid;gap:9px}
.profile-links a{display:grid;grid-template-columns:38px minmax(0,1fr) 17px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:9px;min-height:49px;padding:5px 10px}
.profile-links a span{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;color:var(--primary);background:var(--soft)}
.profile-links a:hover{border-color:var(--primary)}
.drive-search{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:12px;padding:0 10px;background:var(--surface)}
.drive-search svg{flex:none;color:var(--primary)}
.drive-search input{min-width:0;border:0;background:transparent;width:100%;padding:10px 4px}
.result-list li[hidden]{display:none}
[data-drive-count]{margin:10px 0;color:var(--muted)}
.drive-views{display:flex;flex-wrap:wrap;gap:6px;margin-block:12px}
.drive-views button{flex-shrink:0;min-height:44px;white-space:nowrap}
.drive-views button[aria-pressed=true]{color:var(--primary);background:var(--soft);border-color:var(--primary)}
.drive-views small{font-variant-numeric:tabular-nums;color:var(--muted)}
.result-list [aria-pressed=true]{color:var(--primary);border-color:var(--primary)}
.result-list [aria-pressed=true] svg{fill:var(--soft)}
.shortcuts>a small{display:block;color:var(--muted);margin-top:3px;line-height:1.3}
@media(max-width:700px){
  :root{--mobile-top:env(safe-area-inset-top,0px);--mobile-bottom:env(safe-area-inset-bottom,0px);--header-height:calc(106px + var(--mobile-top))}
  .toolbar{display:grid;grid-template-columns:38px minmax(0,1fr) auto 36px;grid-template-rows:50px 40px;gap:5px 7px;padding:calc(5px + var(--mobile-top)) max(11px,env(safe-area-inset-right)) 6px max(11px,env(safe-area-inset-left));background:linear-gradient(105deg,var(--header-start),var(--header-end));z-index:6}
  .toolbar #toggle-menu{grid-area:1/1;min-height:38px;color:white;background:#ffffff15;border-color:#ffffff60}
  .toolbar .brand{grid-area:1/2;min-width:0;gap:7px;color:white}
  .toolbar .brand>span{min-width:0}
  .toolbar .brand strong{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:clamp(.82rem,3.65vw,1.04rem)}
  .toolbar .brand-mark{width:30px;height:30px;flex:none}
  .toolbar .avatar{grid-area:1/4;width:36px;height:36px;justify-self:end}
  .toolbar #search{grid-area:2/1/3/-1;width:100%;height:38px;background:var(--surface);color:var(--ink);border-color:var(--border);border-radius:10px}
  .toolbar #search input{color:var(--ink);font-size:16px}
  .toolbar #search svg{color:var(--primary)}
  .toolbar #search kbd{display:none}
  .mobile-credit{display:flex;gap:4px;align-items:center;grid-area:1/3;padding:7px 9px;border-radius:7px;background:#ffffff24;color:white;white-space:nowrap;font-size:.78rem}
  .mobile-credit [data-credit-amount]{font-weight:750;color:#ffde8a}
  body:not(.session-blocked) .layout{padding-bottom:calc(67px + var(--mobile-bottom))}
  .mobile-dock{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;position:fixed;inset:auto 0 0;z-index:4;align-items:center;justify-items:center;min-height:63px;padding:5px max(8px,env(safe-area-inset-right)) calc(5px + var(--mobile-bottom)) max(8px,env(safe-area-inset-left));background:var(--surface);border-top:1px solid var(--border);box-shadow:0 -6px 22px #091a2220}
  .mobile-dock .nav-link{display:grid;justify-items:center;align-content:center;gap:3px;height:49px;width:100%;max-width:92px;min-width:0;padding:2px;color:var(--muted);font-size:.72rem;line-height:1.15;text-align:center}
  .mobile-dock .nav-link[aria-current]{background:var(--soft);color:var(--primary);font-weight:760;border-radius:9px}
  .mobile-dock .nav-link svg{width:20px;height:20px}
  .mobile-add{display:grid;place-items:center;width:45px;height:45px;color:#fff;background:#156862;border:1px solid #ffffff60;border-radius:13px;cursor:pointer}
  .session-blocked .mobile-dock,.session-blocked .mobile-credit{display:none}
  .mobile-wallet-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;margin-bottom:14px;padding:12px;border-radius:13px;color:#fff;background:linear-gradient(122deg,#244857 0 58%,#1a665f 58%)}
  .mobile-wallet-card strong{display:block;font-size:1.2rem}
  .mobile-wallet-card .button{background:#eff8f6;color:#13484a;border:0;min-height:37px}
  .mobile-wallet-icon{display:grid;place-items:center;border-radius:9px;background:#ffdf91;color:#453411;width:38px;height:38px}
  #main :is(input:not([type=checkbox],[type=radio],[type=range],[type=file]),select,textarea){font-size:16px;max-width:100%}
  #main :is(.form-grid,.tool-detail,.panel,.result,.reader-view){min-width:0}
  #main input[type=file]{min-width:0;max-width:100%}
  #main :is(.processor-sources,.output-actions,.reader-controls,.reader-options)>.button{min-height:44px;max-width:100%;white-space:normal}
  #main .output-actions>a{overflow-wrap:anywhere}
  #main :is(.catalog-filters,.subcategory-nav,.portrait-nav,.wallet-table-wrap){overscroll-behavior-inline:contain}
  #main :is(a,button,input,select,textarea,summary){scroll-margin-block:calc(var(--header-height) + 8px) calc(72px + var(--mobile-bottom))}
  #main[data-page=home] .shortcuts>a{min-height:112px;padding:12px 8px;gap:7px}
  .shortcuts>a small{font-size:.8rem}
  #main[data-page=home] .home-intro{background:var(--surface);color:var(--ink);border-color:var(--border);padding:14px}
  #main[data-page=home] .home-intro p{color:var(--muted);line-height:1.4}
  #main[data-page=home] .home-intro .intro-mark{background:var(--soft);color:var(--primary)}
  #main[data-page=home] .home-intro .button{background:var(--soft);color:var(--primary);min-height:38px}
  .mobile-add{width:48px;height:48px;border-radius:50%;box-shadow:0 4px 12px #0a282640}
  #main[data-page=home] .featured-links{grid-template-columns:repeat(3,minmax(0,1fr))}
  #main[data-page=home] .featured-links>a{display:grid;justify-content:stretch;align-content:center;min-height:79px;font-size:.77rem;line-height:1.25}
  .wallet-overview{background:linear-gradient(125deg,#234c5d,#1b665f);color:#fff}
  .wallet-overview p,.wallet-overview h2{color:inherit}
  .wallet-overview .wallet-balance{font-size:1.75rem;margin-bottom:0}
}
@media(max-width:400px){
  .drive-views{gap:4px}
  .drive-views button{padding-inline:7px;gap:4px}
  .profile-wallet{flex-wrap:wrap}
  #main .processor-sources>.button{flex:1 1 100%;justify-content:flex-start}
}
@media(max-width:360px){.toolbar .brand-mark{width:27px;height:27px}.profile-identity{grid-template-columns:auto minmax(0,1fr)}.profile-identity small{grid-column:2;justify-self:start}}
@media(max-width:460px){
  .wallet-packs{grid-template-columns:1fr}
  .wallet-pack{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:13px}
  .wallet-pack>strong,.wallet-pack>b{color:var(--primary)}
}
@media print{.mobile-dock,.quick-actions{display:none!important}body .layout{padding:0!important}}
