/* Mobile layouts for the existing desktop form components. */
@media (max-width: 900px) {
  .gk-public-register-page,
  .gk-featured-page {
    --form-inset: clamp(8px, 3vw, 18px);
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    padding: var(--form-inset);
  }

  .gk-public-register-page > main.gk-newspaper-form,
  .gk-featured-page > main.gk-featured-window {
    box-sizing: border-box;
    width: min(100%, 560px);
    max-height: calc(100vh - 2 * var(--form-inset));
    max-height: calc(100dvh - 2 * var(--form-inset));
    min-height: 0;
    margin: 0;
    overflow: hidden auto;
    overscroll-behavior-y: contain;
    border-radius: 20px;
    scroll-padding-block: 110px 18px;
    direction: rtl;
  }

  .gk-public-register-page > main.gk-newspaper-form {
    --form-ink: #392b20;
    --form-subtle: #65513b;
    --form-edge: #c9b38d;
    --form-panel: #fffcf4a6;
    height: auto;
    border: 1px solid var(--form-edge);
    color: var(--form-ink);
    background: linear-gradient(150deg, #fcf7ecf7, #ece0cbeb);
    -webkit-backdrop-filter: blur(14px) saturate(110%);
    backdrop-filter: blur(14px) saturate(110%);
    box-shadow: 0 18px 50px #160e09a6, inset 0 1px #fff;
    scrollbar-color: #ad8c5a #f0e5d4;
  }

  .gk-public-register-page .gk-register-overlay {
    background: linear-gradient(160deg, #1d150ab0, #0a0806d9);
  }

  .gk-public-register-page .gk-newspaper-form > .gk-newspaper-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 25;
    display: grid;
    gap: 5px;
    padding: 13px 55px 14px;
    border: 0;
    border-block-end: 2px solid #b7955a;
    background: linear-gradient(135deg, #fffaf0, #eadbc1);
    box-shadow: 0 4px 12px #654a2017;
  }

  .gk-public-register-page .gk-newspaper-form .gk-newspaper-title {
    display: grid;
    justify-items: center;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 0;
    text-align: center;
  }

  .gk-public-register-page .gk-newspaper-title > h1 {
    color: var(--form-ink);
    font-size: clamp(17px, 5vw, 24px);
    font-weight: 800;
    line-height: 1.45;
    text-shadow: none;
  }

  .gk-public-register-page .gk-newspaper-title > .gk-free-badge {
    order: 1;
    padding: 3px 9px;
    border: 1px solid #b69761;
    border-radius: 20px;
    color: #654719;
    background: #f3e2ba;
    box-shadow: none;
    font-size: 12px;
  }

  .gk-public-register-page .gk-newspaper-form .gk-form-close {
    top: 10px;
    left: 9px;
    right: auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    line-height: 1;
  }

  .gk-public-register-page .gk-newspaper-form .gk-ad-auth-banner {
    width: auto;
    margin: 12px 12px 0;
    border-radius: 12px;
  }

  .gk-public-register-page .gk-newspaper-form #gkPublicAdForm > .gk-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "image" "fields" "actions";
    gap: 12px;
    align-items: start;
    padding: 12px;
  }

  .gk-public-register-page #gkPublicAdForm :is(.gk-form-sidebar, .gk-form-fields, .gk-form-actions) {
    min-width: 0;
    padding: 12px;
    border: 1px solid #c9b38da3;
    border-radius: 14px;
    background: var(--form-panel);
  }

  .gk-public-register-page #gkPublicAdForm .gk-image-upload {
    display: grid;
    gap: 9px;
    justify-items: stretch;
    margin: 0;
    color: var(--form-ink);
  }

  .gk-public-register-page #gkPublicAdForm .gk-image-upload h2 {
    margin: 0;
    color: var(--form-ink);
    font-size: 15px;
    font-weight: 800;
    text-align: start;
  }

  .gk-public-register-page #gkPublicAdForm .gk-image-preview {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    aspect-ratio: 16 / 8;
    border: 1px dashed #aa8755;
    border-radius: 11px;
    background: linear-gradient(135deg, #fff9ec, #eddfc4);
  }

  .gk-public-register-page #gkPublicAdForm :is(.gk-image-help, .gk-field-group > small) {
    color: var(--form-subtle);
    font-size: 11px;
    line-height: 1.7;
  }

  .gk-public-register-page #gkPublicAdForm :is(.gk-field-group > label, .gk-features-section legend) {
    color: var(--form-ink);
    font-size: 13px;
    line-height: 1.65;
  }

  .gk-public-register-page #gkPublicAdForm .gk-fields-grid { gap: 10px; }
  .gk-public-register-page #gkPublicAdForm :is(input:not([type="file"], [type="checkbox"]), textarea) {
    min-width: 0;
    border-radius: 9px;
    background-color: #fffdf7;
  }

  .gk-public-register-page #gkPublicAdForm .gk-price-input input { border-radius: 0 9px 9px 0; }
  .gk-public-register-page #gkPublicAdForm :is(.gk-image-select, .gk-publication-open, .gk-submit-ad) {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    font-size: 13px;
  }

  .gk-public-register-page #gkPublicAdForm .gk-submit-ad {
    background: linear-gradient(125deg, #866035, #593a22);
    border-color: #684526;
  }

  .gk-featured-page > main.gk-featured-window {
    --form-gold: #edcd8e;
    --form-edge: #ba97577a;
    --form-panel: linear-gradient(150deg, #2b251be8, #181614de);
    height: calc(100vh - 2 * var(--form-inset));
    height: calc(100dvh - 2 * var(--form-inset));
    border: 1px solid #a38048;
    color: #fff2d7;
    background: linear-gradient(150deg, #1c1916f2, #121211e8);
    -webkit-backdrop-filter: blur(16px) saturate(115%);
    backdrop-filter: blur(16px) saturate(115%);
    box-shadow: 0 18px 48px #000a, inset 0 1px #ffe5b038;
    scrollbar-color: #a7864d #211d18;
  }

  .gk-featured-page .gk-featured-overlay {
    background: linear-gradient(150deg, #30200bb3, #0b0908db);
  }

  .gk-featured-page .gk-featured-window > .gk-featured-header {
    padding: 13px 14px 12px;
    border-block-end: 2px solid #b39050;
    background: radial-gradient(ellipse at top right, #504024, #241d15 68%);
    box-shadow: 0 5px 14px #0004;
  }

  .gk-featured-page .gk-featured-header .gk-featured-heading {
    justify-content: flex-start;
    gap: 9px;
    padding-inline-end: 45px;
  }

  .gk-featured-page .gk-featured-heading h1 {
    color: #ffedc7;
    font-size: clamp(19px, 5.6vw, 26px);
    line-height: 1.4;
  }

  .gk-featured-page .gk-featured-heading p { color: #ead7b4; font-size: 11px; line-height: 1.65; }
  .gk-featured-page .gk-featured-window > .gk-featured-close {
    top: 9px;
    left: 9px;
    width: 44px;
    height: 44px;
    border: 1px solid #a8884f;
    border-radius: 12px;
    color: #fff1cc;
    background: #261f16;
  }

  .gk-featured-page .gk-featured-header .gk-featured-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin: 11px 0 0;
    padding: 0;
  }

  .gk-featured-page .gk-featured-steps::before { content: none; }

  .gk-featured-page .gk-featured-steps > li {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 6px 3px;
    border: 1px solid var(--form-edge);
    border-radius: 9px;
    text-align: center;
    background: #1b1814;
  }

  .gk-featured-page .gk-featured-steps > li.active {
    border-color: #cfaa63;
    background: #46361f;
  }

  .gk-featured-page .gk-featured-steps > li strong { font-size: 10px; line-height: 1.5; }

  .gk-featured-page .gk-featured-window .gk-ad-auth-banner {
    width: auto;
    margin: 12px 12px 0;
    border: 1px solid var(--form-edge);
    border-radius: 12px;
    background: var(--form-panel);
  }

  .gk-featured-page .gk-featured-window > #gkFeaturedForm {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "gallery" "details" "payment";
    align-items: start;
    direction: rtl;
    padding: 12px;
    gap: 12px;
  }

  .gk-featured-page #gkFeaturedForm :is(.gk-featured-gallery, .gk-featured-details,
      .gk-featured-plans, .gk-featured-benefits, .gk-featured-summary) {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--form-edge);
    border-radius: 14px;
    background: var(--form-panel);
    box-shadow: inset 0 1px #f4d09220;
  }

  .gk-featured-page #gkFeaturedForm :is(.gk-gallery-heading, .gk-details-heading,
      .gk-payment-heading, .gk-benefits-heading, .gk-summary-heading) h2 {
    color: var(--form-gold);
    font-size: 14px;
    line-height: 1.6;
  }

  .gk-featured-page #gkFeaturedForm .gk-featured-main-preview {
    min-height: 0;
    aspect-ratio: 16 / 8;
    border: 1px dashed #c19b5e;
    border-radius: 11px;
    background: #171411;
  }

  .gk-featured-page #gkFeaturedForm .gk-featured-payment {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .gk-featured-page #gkFeaturedForm :is(.gk-featured-field input, .gk-featured-field textarea) {
    min-width: 0;
    min-height: 44px;
    background: #141312;
    border-color: var(--form-edge);
    color: #fff1da;
  }

  .gk-featured-page #gkFeaturedForm :is(.gk-featured-image-button, .gk-featured-submit) {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    font-size: 13px;
  }

  .gk-featured-page #gkFeaturedForm .gk-featured-submit {
    color: #25190a;
    border-color: #ddba73;
    background: linear-gradient(135deg, #f8dfa5, #cb9f51);
  }

  .gk-featured-page #gkFeaturedForm .gk-plan-card:has(input:checked) {
    border-color: #d2ab64;
    background: linear-gradient(145deg, #624925, #392c1c);
    box-shadow: 0 0 0 1px #ddbb7557;
  }

  :is(#gkPublicAdForm, #gkFeaturedForm) :is(button, a, input, textarea, select):focus-visible,
  #gkFeaturedForm .gk-plan-card:has(:focus-visible) {
    outline: 2px solid #b18a41;
    outline-offset: 2px;
  }
}
