/* Compact mobile presentation for the existing account and submission forms. */
@media (max-width: 900px) {
  :is(#gkAccountModal[data-account-view="register"], #gkAccountModal[data-account-view="login"],
      #gkAccountModal[data-account-view="profile"]:not(:has(#gkAccountRecoveryRotateForm:not([hidden]))),
      .gk-account-modal.gk-ad-auth-overlay) {
    --gk-mobile-ink: #292820;
    --gk-mobile-muted: #655b4b;
    --gk-mobile-paper: #faf6ee;
    --gk-mobile-line: #d8ccbb;
    background: rgba(44, 39, 34, .48);
    padding: 10px;
  }

  :is(#gkAccountModal[data-account-view="register"], #gkAccountModal[data-account-view="login"],
      #gkAccountModal[data-account-view="profile"]:not(:has(#gkAccountRecoveryRotateForm:not([hidden]))),
      .gk-account-modal.gk-ad-auth-overlay) .gk-account-window {
    box-sizing: border-box;
    width: min(100%, 540px);
    max-height: calc(100dvh - 20px);
    margin: auto;
    overflow: hidden auto;
    border: 1px solid var(--gk-mobile-line);
    border-radius: 18px;
    color: var(--gk-mobile-ink);
    background: var(--gk-mobile-paper);
    box-shadow: 0 20px 56px #201a194d, inset 0 1px #fff;
    backdrop-filter: none;
  }

  /* Variable scopes exist only on the three account states and ad-form auth overlay. */
  :is(#gkAccountModal[data-account-view="register"], #gkAccountModal[data-account-view="login"],
      #gkAccountModal[data-account-view="profile"]:not(:has(#gkAccountRecoveryRotateForm:not([hidden]))),
      .gk-account-modal.gk-ad-auth-overlay) {
    & .gk-account-window::before { background: none; }
    & .gk-account-accent { display: none; }
    & .gk-account-inner { padding: 16px 14px; background: transparent; }
    & .gk-account-header {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 64px;
      margin-bottom: 10px;
      padding-inline: 42px;
    }
    & .gk-account-brand {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: row;
      gap: 9px;
      text-align: start;
    }
    & .gk-account-logo-frame {
      flex: 0 0 53px;
      width: 53px;
      height: 42px;
      padding: 0;
      border: 1px solid #cdb78b;
      border-radius: 9px;
      background: #242421;
      box-shadow: none;
    }
    & .gk-account-logo { object-fit: contain; }
    & :is(.gk-account-brand-name, .gk-account-title) { color: var(--gk-mobile-ink); font-size: 16px; text-shadow: none; }
    & :is(.gk-account-subtitle, .gk-account-privacy, .gk-account-field-help, .gk-account-options, .gk-account-message) {
      color: var(--gk-mobile-muted);
    }
    & .gk-account-close {
      position: absolute;
      inset: 0 auto auto 0;
      width: 44px;
      height: 44px;
      border-color: transparent;
      background: transparent;
      color: var(--gk-mobile-ink);
      box-shadow: none;
    }
    & .gk-account-tabs {
      width: 100%;
      padding: 0;
      gap: 0;
      margin: 8px 0 14px;
      border-color: var(--gk-mobile-line);
      background: #efe9df;
      box-shadow: none;
    }
    & .gk-account-tab { min-height: 44px; color: var(--gk-mobile-muted); }
    & .gk-account-tab[aria-selected="true"] {
      color: #fffdf6;
      background: #33332c;
      box-shadow: inset 0 -3px #b99143;
    }
    & :is(.gk-account-form-grid, .gk-account-bottom-row, #gkAccountLoginForm .gk-account-form-grid) {
      grid-template-columns: minmax(0, 1fr);
      gap: 11px;
    }
    & .gk-account-field-label { color: var(--gk-mobile-ink); font-weight: 750; }
    & .gk-account-input-shell {
      min-height: 46px;
      border-color: #cfc5b9;
      color: #745c36;
      background: #fffdf8;
      box-shadow: none;
    }
    & .gk-account-input-shell:focus-within { border-color: #9b762c; box-shadow: 0 0 0 3px #ba934221; }
    & .gk-account-input { color: var(--gk-mobile-ink); font-size: 16px; }
    & .gk-account-input::placeholder { color: #796f62; opacity: 1; }
    & .gk-account-password-toggle { color: #72552b; background: transparent; }
    & .gk-account-checkbox { accent-color: #9a762b; }
    & :is(.gk-account-rules-link, .gk-account-text-action) { color: #795315; }
    & :is(.gk-account-submit, #gkAccountContinue) {
      min-height: 44px;
      border-color: #b28b39;
      color: #fffdf7;
      background: #30312b;
      box-shadow: inset 0 -2px #b99143;
    }
    & :is(.gk-account-secondary, .gk-account-refresh, .gk-account-logout) {
      min-height: 44px;
      border-color: #c3a874;
      color: #654a1c;
      background: #fffaf0;
      box-shadow: none;
    }
    & :is(.gk-account-user-row, .gk-account-stats article, .gk-account-recovery-manage,
          .gk-account-notifications-launch, .gk-account-ad-card, .gk-ad-auth-context) {
      border-color: var(--gk-mobile-line);
      background: #fffaf2;
      color: var(--gk-mobile-ink);
      box-shadow: none;
    }
    & .gk-account-profile { border: 0; background: transparent; box-shadow: none; }
    & .gk-account-avatar { color: #4d4639; background: #e5d9c5; }
    & :is(.gk-account-profile h3, .gk-account-stats strong, .gk-account-my-ads-head h3,
          .gk-account-recovery-manage strong, .gk-account-notifications-copy strong,
          .gk-account-ad-title) { color: var(--gk-mobile-ink); }
    & :is(.gk-account-profile p, .gk-account-stats span, .gk-account-my-ads-head p,
          .gk-account-recovery-manage p, .gk-account-notifications-copy small, .gk-account-ad-meta,
          .gk-account-ad-message, .gk-account-ads-empty) { color: var(--gk-mobile-muted); }
    & .gk-account-message[data-state="error"] { color: #a23137; }
    & .gk-account-message[data-state="success"] { color: #256843; }
    & :is(button, a, input):focus-visible { outline: 2px solid #97701e; outline-offset: 2px; }
    & [hidden] { display: none !important; }
  }

  .gk-newspaper-form {
    width: min(100%, 620px);
    max-height: calc(100dvh - 16px);
    min-height: 0;
    margin-inline: auto;
    border: 1px solid #ede1cc;
    border-radius: 16px;
    color: #3c3023;
    background: linear-gradient(135deg, #fff9eee8, #efe6d4d9);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px #1c150c42;
  }
  .gk-newspaper-form .gk-newspaper-header { background: #f9f1e5; border-bottom-color: #c5ae85; }
  .gk-newspaper-form .gk-form-close { min-width: 40px; min-height: 40px; }
  .gk-newspaper-form .gk-form-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gk-newspaper-form .gk-image-preview { aspect-ratio: 1; min-height: 0; }
  .gk-newspaper-form #gkAdImagePreview { object-fit: contain; }
  .gk-newspaper-form :is(.gk-field-group input, .gk-field-group textarea, .gk-feature-row input) {
    color: #3c3020;
    background: #fffdf6;
    border-color: #baa583;
    font-size: 16px;
  }
  .gk-newspaper-form .gk-submit-ad { background: #74502b; color: #fff8eb; }
  .gk-newspaper-form :is(.gk-submit-ad, .gk-publication-open, .gk-form-cancel, .gk-image-select) { min-height: 44px; }
  .gk-newspaper-form .gk-ad-auth-banner[data-state] { background: #f8efde; border-color: #c5ae85; }
  .gk-newspaper-form .gk-ad-auth-banner :is(strong, small) { color: #604927; }
  .gk-newspaper-form .gk-ad-auth-banner > button { background: #fff7e7; color: #67451f; }

  body .gk-featured-window {
    background: linear-gradient(135deg, #181915e8, #0a0d0be0);
    backdrop-filter: blur(10px);
  }
  body .gk-featured-window :is(.gk-featured-gallery, .gk-featured-details, .gk-featured-plans,
      .gk-featured-benefits, .gk-featured-cost-box, .gk-ad-auth-banner[data-state]) {
    background: linear-gradient(135deg, #242820e0, #131912db);
  }
  body .gk-featured-window .gk-featured-header { background: linear-gradient(120deg, #20231bed, #12170ff0); }
}
