/* Mobile account/authentication frames 2:3–2:596. Desktop stays in product-figma.css. */
.mobile-auth-backdrop { display: none; }
@media (max-width: 600px), (orientation: landscape) and (pointer: coarse) and (max-height: 500px) {
  body:has(#modal:is([data-kind="sign-in"],[data-kind="create-profile"],[data-kind="account"])[open], #recovery-modal[open], #account-flow-modal[open]) .mobile-auth-backdrop {
    display: block; position: fixed; inset: 0; z-index: 9999; background: #fcfcfb; pointer-events: none;
    color: #626d76; font: 400 21px/47px Inter, sans-serif;
  }
  .mobile-auth-backdrop::before { content: ""; position: absolute; inset: 0 16px; background: repeating-linear-gradient(to bottom, transparent 0 46px, #e2e4e7 46px 47px); }
  .mobile-auth-backdrop span { position: absolute; top: 47px; left: 27px; }
  .mobile-auth-backdrop span + span { left: 145px; color: #386f9f; }
  body:has(#recovery-modal[open], #account-flow-modal[open]) #modal { visibility: hidden; }
  body:has(#recovery-modal[open], #account-flow-modal[open]) #modal::backdrop { background: transparent; }
  :is(#modal[data-kind="sign-in"], #modal[data-kind="create-profile"], #modal[data-kind="account"], #modal[data-kind="rename-list"], #recovery-modal[data-step], #account-flow-modal[data-flow]) {
    box-sizing: border-box; border: 1px solid #e2e4e7; border-radius: 6px; background: #fff; color: #29333b; box-shadow: none;
    font: 400 14px/21px Inter, sans-serif;
  }
  :is(#modal[data-kind="sign-in"], #modal[data-kind="create-profile"], #modal[data-kind="account"], #modal[data-kind="rename-list"], #recovery-modal[data-step], #account-flow-modal[data-flow])::backdrop { background: rgba(41,51,59,.13); }

  #modal[data-kind="sign-out"] {
    position: fixed; inset: auto 16px calc(max(18px, env(safe-area-inset-bottom)) + var(--auth-viewport-bottom, 0px)) 16px; margin: 0;
    width: calc(100% - 32px); max-width: none; min-width: 0; height: auto; min-height: 0;
    max-height: calc(var(--auth-viewport-height, 100dvh) - 36px); padding: 0 19px 19px; overflow: auto;
    box-sizing: border-box; border: 1px solid #e2e4e7; border-radius: 6px; background: #fff; color: #29333b;
    box-shadow: none; font: 400 14px/21px Inter, sans-serif;
  }
  #modal[data-kind="sign-out"]::backdrop { background: rgba(41,51,59,.13); }
  #modal[data-kind="sign-out"] h2 {
    height: 82px; min-height: 82px; margin: 0 -19px; padding: 17px 48px 0 19px;
    border-bottom: 1px solid #e2e4e7; background: #f6f7f8; color: #29333b;
    font: 500 21px/30px Inter, sans-serif;
  }
  #modal[data-kind="sign-out"] .close {
    top: 13px; right: 7px; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 12px;
    border: 0; border-radius: 3px; background: transparent; font-size: 0;
  }
  #modal[data-kind="sign-out"] .close::after {
    content: ""; position: absolute; top: 12px; left: 12px; width: 20px; height: 20px;
    background: url('/mobile-DialogCloseX.svg') center/contain no-repeat;
  }
  #modal[data-kind="sign-out"] .signout-warning { margin: 19px 0 0; color: #626d76; font: 400 14px/21px Inter, sans-serif; }
  #modal[data-kind="sign-out"] .signout-form { margin-top: 20px; }
  #modal[data-kind="sign-out"] .signout-confirm-button {
    height: 46px; min-height: 46px; border: 0; border-radius: 3px;
    background: #fff34d; color: #29333b; font: 500 14px/21px Inter, sans-serif;
  }

  #modal:is([data-kind="sign-in"],[data-kind="create-profile"],[data-kind="account"]) > h2 {
    position: absolute; inset: 0 0 auto; height: 82px; min-height: 82px; margin: 0; padding: 17px 48px 0 19px;
    border-bottom: 1px solid #e2e4e7; background: #f6f7f8; color: #29333b; font: 500 21px/30px Inter,sans-serif;
  }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) h2::after { position: absolute; top: 47px; left: 19px; margin: 0; color: #626d76; font: 400 12px/21px Inter,sans-serif; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"],[data-kind="account"],[data-kind="rename-list"]) .close,
  #recovery-modal[data-step] .recovery-close, #account-flow-modal[data-flow] .account-flow-close {
    position: absolute; top: 13px; right: 7px; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 12px;
    border: 0; border-radius: 3px; background: transparent; color: transparent; font-size: 0; z-index: 2;
  }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"],[data-kind="account"],[data-kind="rename-list"]) .close::after { content: ""; position: absolute; top: 12px; left: 12px; width: 20px; height: 20px; background: url('/mobile-DialogCloseX.svg') center/contain no-repeat; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"],[data-kind="account"]) .close img { display: none; }
  #recovery-modal[data-step] .recovery-close img, #account-flow-modal[data-flow] .account-flow-close img { content: url('/mobile-DialogCloseX.svg'); width: 20px; height: 20px; }
  #recovery-modal[data-step] .recovery-header, #account-flow-modal[data-flow] .account-flow-header { background: #f6f7f8; }
  #recovery-modal[data-step] .recovery-header h2, #account-flow-modal[data-flow] .account-flow-header h2 { color: #29333b; font: 500 21px/30px Inter,sans-serif; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) h2::after,
  #modal[data-kind="account"] .account-modal-subtitle,
  #recovery-modal[data-step] .recovery-header p, #account-flow-modal[data-flow] .account-flow-header p { top: 50px; color: #626d76; font: 400 12px/21px Inter,sans-serif; }

  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) :is(label,input,.social,.primary,.divider,.modal-bottom,.signup-policy) { margin: 0; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) label { height: 25px; color: #29333b; font: 500 14px/25px Inter,sans-serif; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) input,
  #recovery-modal[data-step] :is(#recovery-email,.recovery-password-control input), #account-flow-modal[data-flow] .account-password-control input {
    box-sizing: border-box; height: 48px; min-height: 48px; padding: 0 11px; border: 1px solid #e2e4e7; border-radius: 3px;
    background: #fff; color: #29333b; font: 400 14px/22px Inter,sans-serif;
  }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) input::placeholder,
  #recovery-modal[data-step] input::placeholder, #account-flow-modal[data-flow] .account-password-control input::placeholder { color: #626d76; opacity: 1; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) .social[data-provider="google"] {
    position: absolute; left: 19px; right: 19px; width: auto; height: 46px; min-height: 46px; padding: 0 10px 0 37px;
    border: 1px solid #e2e4e7; border-radius: 3px; background: #fff; color: #29333b; font: 500 14px/21px Inter,sans-serif;
  }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) .social[data-provider="google"] b { position: absolute; left: 21px; top: 12px; width: 21px; height: 21px; margin: 0; background: url('/mobile-GoogleMulticolorLogo.svg') center/contain no-repeat; font-size: 0; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) .divider { position: absolute; left: 19px; right: 19px; width: auto; height: 27px; color: #626d76; font: 400 12px/21px Inter,sans-serif; }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) .primary,
  #recovery-modal[data-step] .recovery-primary, #account-flow-modal[data-flow] .account-flow-primary {
    height: 46px; min-height: 46px; padding: 0 8px; border: 0; border-radius: 3px; background: #fff34d; color: #29333b; font: 500 14px/21px Inter,sans-serif;
  }
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) .modal-bottom,
  #modal:is([data-kind="sign-in"],[data-kind="create-profile"]) .modal-bottom button { color: #626d76; font: 400 13px/21px Inter,sans-serif; }
  #modal[data-kind="sign-in"] .social[data-provider="google"] { top: 107px; }
  #modal[data-kind="sign-in"] .divider { top: 169px; height: 30px; display: grid; grid-template-columns: minmax(0,95fr) 165px minmax(0,55fr); gap: 0; text-align: center; }
  #modal[data-kind="sign-in"] :is(label[for="auth-email"],#auth-email,label[for="auth-password"],#auth-password) { position: absolute; left: 19px; right: 19px; width: auto; }
  #modal[data-kind="sign-in"] label[for="auth-email"] { top: 219px; }
  #modal[data-kind="sign-in"] #auth-email { top: 248px; }
  #modal[data-kind="sign-in"] label[for="auth-password"] { top: 313px; }
  #modal[data-kind="sign-in"] #auth-password { top: 342px; }
  #modal[data-kind="sign-in"] .text-link[data-action="forgot"] { position: absolute; top: 398px; right: 19px; height: 31px; margin: 0; padding: 0; font: 400 13px/21px Inter,sans-serif; color: #626d76; }
  #modal[data-kind="sign-in"] form > .primary { top: 450px; margin: 0; }
  #modal[data-kind="sign-in"] .modal-bottom { top: 521px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px; }
  #modal[data-kind="sign-in"] .field-error { position: absolute; left: 19px; right: 19px; font-size: 11px; line-height: 14px; }
  #modal[data-kind="sign-in"] #auth-email-error { top: 297px; }
  #modal[data-kind="sign-in"] #auth-password-error { top: 390px; }
  #modal[data-kind="sign-in"] form > .error { font-size: 11px; line-height: 14px; }
  #modal[data-kind="create-profile"] .signup-name-field label { font-weight: 700; }
  #modal[data-kind="create-profile"] .signup-name-field input { margin-top: 4px; }
  #modal[data-kind="create-profile"] .divider { justify-content: center; font-size: 13px; }
  #modal[data-kind="create-profile"] .divider::before, #modal[data-kind="create-profile"] .divider::after { display: none; }
  #modal[data-kind="create-profile"] .signup-policy { color: #626d76; font: 400 12px/20px Inter,sans-serif; text-align: center; }
  #modal[data-kind="create-profile"] .signup-consent-links { display: block; }
  #modal[data-kind="create-profile"] .signup-policy a { color: #386f9f; }
  #modal[data-kind="create-profile"] .modal-bottom { display: flex; justify-content: center; align-items: center; gap: 4px; }

  #modal[data-kind="account"] .account-modal-subtitle { color: #626d76; font: 400 12px/21px Inter,sans-serif; }
  #modal[data-kind="account"] .account-email-heading { font: 500 14px/25px Inter,sans-serif; }
  #modal[data-kind="account"] .account-email-cell { padding: 0 10px; border-color: #e2e4e7; border-radius: 3px; background: #f6f7f8; color: #29333b; font: 400 13px/21px Inter,sans-serif; }
  #modal[data-kind="account"] .account-email-cell strong { font: 400 12px/21px Inter,sans-serif; }
  #modal[data-kind="account"] .account-verification-heading { top: 183px; font: 400 12px/19px Inter,sans-serif; }
  #modal[data-kind="account"] :is(.account-verification-button,.account-row) { padding-inline: 9px; border-color: #e2e4e7; border-radius: 3px; background: #fff; color: #29333b; font: 500 14px/21px Inter,sans-serif; }
  #modal[data-kind="account"] .account-verification-button:active:not(:disabled) { background: var(--sheet-blue); }
  #modal[data-kind="account"] .account-row-danger { color: #b84343; }
  #modal[data-kind="account"] .account-bug-form h3 { top: 458px; font: 500 16px/33px Inter,sans-serif; }
  #modal[data-kind="account"] .account-bug-form > p:not(.error) { top: 489px; color: #626d76; font: 400 13px/25px Inter,sans-serif; }
  #modal[data-kind="account"] .account-bug-compose { border-color: #e2e4e7; border-radius: 3px; }
  #modal[data-kind="account"] .account-bug-compose textarea { padding: 13px 11px 56px; font: 400 14px/22px Inter,sans-serif; }
  #modal[data-kind="account"] .account-bug-compose textarea::placeholder { color: #626d76; opacity: 1; }
  #modal[data-kind="account"] .account-bug-compose button { bottom: 12px; right: 13px; padding: 0; background: #fff34d; border-radius: 3px; color: #29333b; font: 500 13px/21px Inter,sans-serif; }

  /* Widths follow the viewport; fixed vertical rhythm matches the supplied 390px frames. */
  #recovery-modal[data-step] :is(.recovery-copy,form > label,#recovery-email,.recovery-error,.recovery-primary,.recovery-back-signin,.recovery-instruction,.recovery-email,.recovery-password-control,.recovery-help,.recovery-success-title,.recovery-success-copy,.recovery-back),
  #account-flow-modal[data-flow] :is(.account-code-instruction,.account-code-email,.account-timer,.account-flow-error,.account-flow-back-link,.account-password-copy,.account-password-copy + label,.account-password-control,.account-password-help,.account-flow-actions,.account-flow-helper,.account-final-warning),
  #account-flow-modal[data-flow] form > .account-flow-primary,
  #account-flow-modal[data-flow] .account-flow-success h3,
  #account-flow-modal[data-flow] .account-flow-success p,
  #account-flow-modal[data-flow] .account-flow-success .account-flow-primary,
  #account-flow-modal[data-flow] .account-delete-confirm > p:not(.account-flow-error) { left: 19px; right: 19px; width: auto; }
  #recovery-modal[data-step] .recovery-password-control input, #account-flow-modal[data-flow] .account-password-control input { width: 100%; padding-right: 60px; }
  #recovery-modal[data-step] .recovery-password-control button, #account-flow-modal[data-flow] .account-password-control button { color: #626d76; font: 500 12px/21px Inter,sans-serif; }
  #recovery-modal[data-step] form > label, #account-flow-modal[data-flow] .account-password-copy + label { font: 500 14px/25px Inter,sans-serif; }
  #recovery-modal[data-step="email"] form > label { top: 108px; }
  #recovery-modal[data-step="password"] form > label { top: 86px; }
  #recovery-modal[data-step="password"] .recovery-help { top: 178px; height: 52px; display: flex; align-items: center; font: 400 13px/21px Inter,sans-serif; }
  #recovery-modal[data-step] :is(.recovery-instruction,.recovery-email) { display: flex; align-items: center; }
  #recovery-modal[data-step] .recovery-instruction { top: 17px; height: 36px; }
  #recovery-modal[data-step] .recovery-email { top: 54px; height: 31px; }
  #recovery-modal[data-step] .recovery-code-control, #account-flow-modal[data-flow] .account-code-inputs { width: min(309px, calc(100% - 38px)); }
  #recovery-modal[data-step] .recovery-code-cells, #account-flow-modal[data-flow] .account-code-inputs { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; }
  #recovery-modal[data-step] .recovery-code-cells, #recovery-modal[data-step] .recovery-code-input { width: 100%; }
  #recovery-modal[data-step] .recovery-code-cells span, #account-flow-modal[data-flow] .account-code-inputs :is(input,span) { width: 100%; min-width: 0; border: 1px solid #e2e4e7; background: #fff; font: 400 22px/1 Inter,sans-serif; }
  #account-flow-modal[data-flow] .account-code-inputs input::placeholder { color: #9ba6af; opacity: 1; }
  #recovery-modal[data-step] .recovery-code-cells span { color: #9ba6af; }
  #recovery-modal[data-step] .recovery-resend img, #account-flow-modal[data-flow] .account-timer img { content: url('/mobile-TimerClock.svg'); }
  #recovery-modal[data-step] .recovery-resend strong, #account-flow-modal[data-flow] .account-timer strong { border-radius: 3px; background: #f6f7f8; color: #29333b; font: 500 16px/37px Inter,sans-serif; }
  #recovery-modal[data-step] .recovery-resend-button, #account-flow-modal[data-flow] .account-resend { opacity: 1; color: #626d76; font: 400 13px/21px Inter,sans-serif; }
  #recovery-modal[data-step] .recovery-resend-button:disabled, #account-flow-modal[data-flow] .account-resend:disabled { color: #9ba6af; }
  #recovery-modal[data-step] .recovery-resend-button { top: 242px; }
  #recovery-modal[data-step] :is(.recovery-back-signin,.recovery-back), #account-flow-modal[data-flow] .account-flow-back-link { color: #626d76; font: 400 13px/21px Inter,sans-serif; }
  #recovery-modal[data-step="verify"] .recovery-back { top: 376px; height: 35px; }
  #recovery-modal[data-step] .recovery-success-icon { left: calc(50% - 12.5px); content: url('/mobile-SuccessCheck.svg'); }
  #recovery-modal[data-step] .recovery-success-title { top: 81px; height: 53px; display: flex; justify-content: center; align-items: center; font: 500 17px/25px Inter,sans-serif; }
  #recovery-modal[data-step] .recovery-success-copy { top: 140px; height: 50px; display: flex; justify-content: center; align-items: center; font: 400 13px/21px Inter,sans-serif; }

  #account-flow-modal[data-flow] :is(.account-code-instruction,.account-code-email) { display: flex; align-items: center; height: 35px; }
  #account-flow-modal[data-flow] .account-code-email { height: 31px; }
  #account-flow-modal[data-flow] .account-flow-actions > button { width: 100%; font: 500 14px/21px Inter,sans-serif; }
  #account-flow-modal[data-flow] .account-flow-actions > button:first-child { height: 30px; min-height: 30px; font: 400 13px/21px Inter,sans-serif; color: #626d76; }
  #account-flow-modal[data-flow="change-password"] .account-password-help { top: 284px; height: 38px; display: flex; align-items: center; color: #626d76; font: 400 12px/21px Inter,sans-serif; }
  #account-flow-modal[data-flow="change-password"] .account-flow-actions > button:first-child { top: 49px; }
  #account-flow-modal[data-flow="password-code"] .account-code-instruction { top: 100px; }
  #account-flow-modal[data-flow="password-code"] .account-code-email { top: 136px; }
  #account-flow-modal[data-flow="password-code"] .account-code-inputs { top: 190px; }
  #account-flow-modal[data-flow="password-code"] .account-flow-helper { top: 360px; height: 40px; display: flex; align-items: center; font: 400 12px/20px Inter,sans-serif; }
  #account-flow-modal[data-flow="password-code"] .account-flow-actions > button:first-child { top: 60px; }
  #account-flow-modal[data-flow="delete-code"] .account-code-instruction { top: 85px; height: 23px; color: #626d76; font: 400 13px/20px Inter,sans-serif; }
  #account-flow-modal[data-flow="delete-code"] .account-code-email { top: 111px; }
  #account-flow-modal[data-flow="delete-code"] .account-flow-helper { height: 31px; display: flex; align-items: center; }
  #account-flow-modal[data-flow="delete-code"] .account-flow-primary:disabled { opacity: 1; background: #f6f7f8; border: 1px solid #e2e4e7; color: #626d76; }
  #account-flow-modal[data-flow="delete-code"] .account-delete-disabled:disabled { opacity: 1; background: #f6f7f8; border: 1px solid #e2e4e7; color: #626d76; }
  #account-flow-modal[data-flow="delete-confirm"] .account-delete-confirm img { content: url('/mobile-DeletionWarning.svg'); }
  #account-flow-modal[data-flow="delete-confirm"] .account-delete-confirm h3 { right: 17px; width: auto; font-weight: 500; }
  #account-flow-modal[data-flow="delete-confirm"] .account-flow-actions > button:first-child { top: 52px; font-size: 14px; }
  #account-flow-modal[data-flow="delete-verified"] .account-code-instruction { top: 91px; height: 22px; color: #626d76; font: 500 14px/21px Inter,sans-serif; }
  #account-flow-modal[data-flow="delete-verified"] .account-code-email { top: 118px; height: 25px; color: #626d76; font: 500 14px/21px Inter,sans-serif; }
  #account-flow-modal[data-flow="delete-verified"] .account-code-inputs.is-verified span { border-color: #3b875e; background: #f7fbf8; color: #2a694a; font-size: 17px; }
  #account-flow-modal[data-flow="delete-verified"] .account-verified-message { top: 218px; left: 53px; right: 23px; width: auto; height: 65px; padding: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #287849; font: 500 16px/25px Inter,sans-serif; }
  #account-flow-modal[data-flow="delete-verified"] .account-verified-message img { position: absolute; left: -33px; top: 8px; content: url('/mobile-DeleteVerified.svg'); }
  #account-flow-modal[data-flow="delete-verified"] .account-final-warning { text-align: center; color: #b84343; font: 400 14px/21px Inter,sans-serif; }
  #account-flow-modal[data-flow="delete-verified"] .account-delete-final { height: 47px; border-color: #b84343; background: #b84343; color: #fff; }
  #account-flow-modal[data-flow="delete-verified"] .account-flow-actions > button:first-child { top: 64px; }
  #account-flow-modal[data-flow] .account-flow-success > img { left: calc(50% - 12.5px); width: 25px; height: 25px; content: url('/mobile-SuccessCheck.svg'); }
  #account-flow-modal[data-flow] .account-flow-success h3 { top: 163px; height: 51px; display: flex; justify-content: center; align-items: center; font: 500 17px/25px Inter,sans-serif; }
  #account-flow-modal[data-flow] .account-flow-success p { top: 216px; height: 50px; display: flex; justify-content: center; align-items: center; font: 400 13px/21px Inter,sans-serif; }
  #account-flow-modal[data-flow="password-success"] .account-flow-success p { left: 27px; right: 27px; }
  #account-flow-modal[data-flow="delete-success"] .account-flow-success > img { top: 103px; width: 26px; height: 26px; left: calc(50% - 13px); content: url('/mobile-DeleteDone.svg'); }
  #account-flow-modal[data-flow="delete-success"] .account-flow-success h3 { top: 159px; height: 52px; }
  #account-flow-modal[data-flow="delete-success"] .account-flow-success p { top: 224px; height: 35px; }
  #account-flow-modal[data-flow="delete-success"] .account-flow-success .account-flow-primary { top: 274px; }
  @media (hover: hover) {
    #modal:is([data-kind="sign-in"],[data-kind="create-profile"],[data-kind="account"]) .primary:hover,
    #recovery-modal[data-step] .recovery-primary:hover, #account-flow-modal[data-flow] .account-flow-primary:hover { border-color: #fff34d; background: #fff34d; }
    #modal[data-kind="account"] .account-verification-button:hover:not(:disabled) { background: var(--interaction-feedback); }
    #account-flow-modal[data-flow="delete-verified"] .account-delete-final:hover { border-color: #b84343; background: #b84343; }
  }
  @media (max-width: 360px) {
    #recovery-modal[data-step] .recovery-header h2, #account-flow-modal[data-flow] .account-flow-header h2 { font-size: 18px; right: 42px; }
  }
}
