.erb-sheet{display:none;position:fixed;inset:auto 0 0;width:100%;max-width:600px;max-height:85dvh;margin:0 auto;padding:0;border:0;border-radius:16px 16px 0 0;background:var(--surface);color:var(--ink);overflow:hidden;flex-direction:column;box-shadow:0 -4px 16px rgb(22 19 31 / .12)}
.erb-sheet[open]{display:flex}
.erb-sheet::backdrop{background:rgb(22 19 31 / .48)}
.sheet-handle{height:26px;flex:none;display:grid;place-items:center;touch-action:none;cursor:grab}
.sheet-handle span{height:4px;width:64px;background:var(--border-2);border-radius:99px}
.sheet-head{display:flex;align-items:center;gap:12px;padding:0 12px 12px 20px;flex:none}
.sheet-head h2{font-family:var(--font);font-size:20px;line-height:1.3;letter-spacing:-.02em;flex:1;outline:none}
.sheet-close{width:44px;height:44px;border:0;background:transparent;border-radius:50%;cursor:pointer;font-size:28px;line-height:1;color:var(--muted);flex:none}
.sheet-close:hover{background:var(--surface-2)}
.sheet-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 20px 20px;scroll-padding-bottom:20px;-webkit-overflow-scrolling:touch}
.sheet-footer{padding:12px 20px max(16px,env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border);flex:none}
.sheet-footer:empty{display:none}
.sheet-body:last-of-type{padding-bottom:max(20px,env(safe-area-inset-bottom))}
.sheet-description{color:var(--muted);font-size:15px;line-height:1.6;margin-bottom:20px}
.sheet-actions{display:flex;gap:10px;margin-top:24px}.sheet-actions .btn{flex:1;min-height:48px}
.erb-sheet .m-menu{border:0;padding:0;gap:2px}.erb-sheet .m-menu-h{font-size:14px;text-transform:none;letter-spacing:normal;margin-bottom:6px}
.erb-sheet .m-menu a:not(.btn){display:flex;align-items:center;min-height:48px;border:0;border-radius:10px;padding:10px 12px;font-size:15px}
.erb-sheet .m-menu a[aria-current=page]{background:var(--primary-soft);color:var(--primary);font-weight:600}
.erb-sheet .m-menu .btn{min-height:48px;margin-top:12px}
.erb-sheet .grp-h{display:none}.erb-sheet .grp{padding:0;border:0}.erb-sheet .seg{margin-bottom:20px}.erb-sheet .seg button{min-height:44px}
.erb-sheet .sws{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.erb-sheet .sw,.erb-sheet .sw-t,.erb-sheet .sws .sw[data-bg="#FFFFFF"]{height:52px;min-height:44px;aspect-ratio:auto;border-radius:10px}
.erb-sheet .sws .sw[data-bg="#FFFFFF"],.erb-sheet .sw-t{grid-column:span 2}.erb-sheet .hint{margin-top:16px}
.erb-sheet .dl{border:0;padding:0}.erb-sheet .dl #dlBtn,.erb-sheet .dl #anotherBtn{display:flex;min-height:48px}.erb-sheet .dl .dl-free{display:block}.erb-sheet .dl-meta{margin-bottom:16px}
.erb-sheet .bq-bg{display:flex;flex-direction:column;align-items:stretch;gap:12px}.erb-sheet .bq-bg .bq-lbl{display:none}.erb-sheet .bq-sws{display:flex;gap:12px;flex-wrap:wrap}.erb-sheet .bq-sws .sw{width:48px;height:48px}
.sheet-login label{display:block;font-size:14px;font-weight:600;margin:18px 0 8px}.sheet-login input{width:100%;height:50px;border:1px solid var(--border-2);border-radius:10px;padding:12px;font:inherit;font-size:16px;background:var(--surface);color:var(--ink)}
.sheet-login input:focus-visible{outline-offset:2px}.sheet-login .login-error:empty{display:none}.sheet-login button{margin-top:24px;min-height:48px}.sheet-guest{display:block;min-height:44px;margin:12px auto 0;text-align:center}.sheet-account-name{font-weight:600;margin-bottom:10px}
.bq-bg-trigger{display:none}
.erb-sheet.is-auth .sheet-head{position:absolute;top:12px;right:12px;padding:0;z-index:1}
.erb-sheet.is-auth .sheet-head h2{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
.erb-sheet.is-auth .sheet-body{padding:32px 24px max(24px,env(safe-area-inset-bottom))}
.erb-sheet.is-auth .sheet-login button[type=submit]{margin-top:22px}
@media(min-width:768px){.erb-sheet.is-auth{inset:0;width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 48px);margin:auto;border:1px solid var(--border);border-radius:22px;box-shadow:none}.erb-sheet.is-auth .sheet-handle{display:none}.erb-sheet.is-auth .sheet-body{padding:40px 32px 28px}}
@media(max-width:767px){
  :root{--hdr:62px}
  .hdr-in{height:62px;gap:8px}
  .hdr-in .menu-btn{display:grid;place-items:center;order:4;flex:none;margin:0;width:40px;height:44px;padding:0;border-radius:50%}
  .hdr-in .menu-btn svg path{stroke-width:1.75}
  .hdr-in .brand{order:0;min-width:0;flex:1;gap:6px;font-size:clamp(14px,4.4vw,17px);white-space:nowrap}
  .hdr-in .brand .mark{width:26px;height:26px;flex:none}
  .hdr-in .auth-link{order:3;flex:none;display:flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:0 12px;margin:0;border:1px solid var(--border-2);border-radius:999px;font-size:13px;text-decoration:none;color:var(--ink)}
  .hdr-in .auth-link[data-authenticated=true]{width:40px;min-width:40px;padding:0;font-size:0;border-color:transparent;background:var(--surface-2)}
  .hdr-in .auth-link[data-authenticated=true]::after{content:"";width:21px;height:21px;background:var(--ink-2);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E") center/contain no-repeat}
  .m-tabs{display:grid;grid-template-columns:1fr 1fr;padding:0;gap:10px;background:transparent}
  .m-tabs button{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;border:1px solid var(--border-2);border-radius:12px;background:var(--surface);color:var(--ink);font-size:14px}
  .m-tabs button[aria-expanded=true]{border-color:var(--primary);color:var(--primary)}
  .ed-side>.dl{display:none}
  .pane-queue .bq-bg{display:none}
  .bq-bg-trigger{display:flex;justify-content:space-between;min-height:44px;width:100%}
}
@media(prefers-reduced-motion:reduce){.erb-sheet,.erb-sheet::backdrop{animation:none!important;transition:none!important}}

/* Login motion keeps native modal focus and inertness until exit completes. */
.erb-sheet.is-auth[open]{animation:erb-auth-in 220ms cubic-bezier(.16,1,.3,1) both}
.erb-sheet.is-auth[open]::backdrop{animation:erb-auth-backdrop-in 220ms ease-out both}
.erb-sheet.is-auth.is-closing[open]{animation:erb-auth-out 160ms ease-in both}
.erb-sheet.is-auth.is-closing[open]::backdrop{animation:erb-auth-backdrop-out 160ms ease-in both}
@keyframes erb-auth-in{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes erb-auth-out{from{opacity:1;transform:none}to{opacity:0;transform:translateY(6px) scale(.98)}}
@keyframes erb-auth-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes erb-auth-backdrop-out{from{opacity:1}to{opacity:0}}
@keyframes erb-auth-drawer-in{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes erb-auth-drawer-out{from{transform:translateY(0)}to{transform:translateY(100%)}}
@media(max-width:767px){.erb-sheet.is-auth[open]{animation-name:erb-auth-drawer-in}.erb-sheet.is-auth.is-closing[open]{animation-name:erb-auth-drawer-out}}

/* Download feedback stays above the mobile action bar. */
.erb-toast{position:fixed;right:24px;bottom:calc(24px + env(safe-area-inset-bottom));z-index:120;display:flex;align-items:center;gap:16px;max-width:min(440px,calc(100vw - 32px));padding:14px 16px;border:1px solid var(--border-2);border-radius:14px;background:var(--surface);color:var(--ink);box-shadow:var(--sh-2);font-size:14px;line-height:1.5;animation:erb-toast-in .18s ease-out}
.erb-toast[hidden]{display:none}.erb-toast.is-error{border-color:var(--error);color:var(--error)}
.erb-toast-close{flex:none;border:0;background:none;color:var(--muted);font-size:22px;line-height:1;width:32px;height:32px;border-radius:8px;cursor:pointer}.erb-toast-close:hover{background:var(--surface-2)}.erb-toast-close:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.zip-loading svg{display:none}.zip-loading::before{content:'';width:18px;height:18px;flex:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:erb-zip-spin .7s linear infinite}
.zip-loading:disabled{opacity:.85;cursor:wait}
@keyframes erb-zip-spin{to{transform:rotate(360deg)}}@keyframes erb-toast-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:767px){.erb-toast{left:16px;right:16px;bottom:calc(104px + env(safe-area-inset-bottom));max-width:none}body.batch-mixed-actions .erb-toast{bottom:calc(160px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.zip-loading::before,.erb-toast{animation:none}}
