/* Phone polish for the owner screens. Desktop rules stay in the other stylesheets.
   Everything here is inside the shared phone width so 1280px keeps the full layout. */

@media (max-width: 800px) {
  body.pgos-app .shell-bar {
    flex-wrap: nowrap;
    align-items: center;
    padding: 8px 12px 4px;
    gap: 8px;
  }

  body.pgos-app .shell-kbd {
    display: none;
  }

  body.pgos-app .shell-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }

  body.pgos-app .shell-bar .desk-search,
  body.pgos-app .shell-bar .desk-search-field {
    width: 100%;
    max-width: 100%;
  }

  body.pgos-app .shell-bar .desk-search {
    flex: 1 1 0;
    min-width: 0;
  }

  body.pgos-app .shell-bar .header-tools {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: 0;
  }

  body.pgos-app main.content > section:has(article),
  body.pgos-app main.content > section:has(.card),
  [data-theme="dark"] body.pgos-app main.content > section:not(.coach-page):not(.copilot-page):not(.learn-panel):not(.pp-learn):has(article),
  [data-theme="dark"] body.pgos-app main.content > section:not(.coach-page):not(.copilot-page):not(.learn-panel):not(.pp-learn):has(.card) {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  body.pgos-app .shell-menu > summary {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    box-sizing: border-box;
    justify-content: center;
  }

  body.pgos-app .watch-how a,
  body.pgos-app a.number-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
  }

  body.pgos-app main.content a.underline,
  body.pgos-app main.content a.ref-terms {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
  }

  body.pgos-app main.content :not(.phone-tabs) > a:not([class]) {
    box-sizing: border-box;
    min-height: 44px;
  }

  body.pgos-app .shell-bar .desk-search-field {
    width: 100%;
    box-sizing: border-box;
  }

  body.pgos-app .shell-bar .desk-search-field input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    font-size: 16px;
  }

  body.pgos-app .desk-search-field .voice-mic,
  body.pgos-app .desk-search-field .desk-search-go {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  body.pgos-app .try-bar {
    padding: 6px 12px;
    gap: 8px;
  }

  body.pgos-app .try-bar p {
    font-size: 14px;
    line-height: 1.25;
  }

  body.pgos-app .try-bar strong {
    display: inline;
    margin-right: 0.35rem;
    font-size: 14px;
  }

  body.pgos-app .page-header {
    padding-top: 8px;
  }

  body.pgos-app .page-header h1 {
    margin: 0;
    font-size: 1.35rem;
  }

  body.pgos-app .page-header .eyebrow {
    margin: 0 0 2px;
    font-size: 11px;
  }

  body.pgos-app .watch-how {
    margin: 4px 0 0;
  }

  body.pgos-app #watch-how-read,
  body.pgos-app .number-pop-source:not(:has(a.number-help)) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  body.pgos-app .price-hero p.number-source.number-pop-source {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--color-heading);
  }

  body.pgos-app .number-source:has(a.number-help) {
    font-size: 0;
    line-height: 0;
  }

  body.pgos-app .number-source:has(a.number-help) a.number-help {
    font-size: 1rem;
    line-height: 1;
  }

  .number-pop {
    position: fixed;
    z-index: 80;
    max-width: min(20rem, calc(100vw - 24px));
    max-height: min(40vh, calc(100vh - 24px));
    overflow: auto;
    margin: 0;
    padding: 8px 12px;
    background: var(--color-card);
    color: var(--color-heading);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .number-pop[hidden] { display: none; }

  body.pgos-app a,
  body.pgos-app button,
  body.pgos-app summary,
  body.pgos-app label {
    touch-action: manipulation;
    transition: none;
  }

  body.pgos-app a:active,
  body.pgos-app button:active,
  body.pgos-app summary:active,
  body.pgos-app label:active,
  body.pgos-app .phone-tabs a:active {
    background-color: var(--color-citrine);
    color: var(--color-indigo);
    transition: none;
  }

  .phone-tabs a span {
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  body.pgos-app .upload-page form button[type="submit"] {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
  }

  body.pgos-app .next-line a.btn-primary {
    flex: 1 0 100%;
    width: 100%;
    min-height: 48px;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
  }

  body.pgos-app a.journey-next {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
  }

  body.pgos-app:has(.rhythm .rhythm-go) .journey-card a.journey-next {
    background: var(--color-card);
    color: var(--color-heading);
    border: 2px solid var(--color-heading);
  }

  body.pgos-marketing h1 {
    font-size: 30px;
    line-height: 1.15;
  }

  body.pgos-app main a.ask-number {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
  }

  body.pgos-app main p > a:only-child:not(.number-help):not(.btn):not(.btn-primary):not(.ask-number):not(.journey-next):not(.attention-primary):not(.a11y-primary):not(.cash-primary):not(.home-primary):not(.check-go):not(.rhythm-go):not(.coach-go) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
  }

  body.pgos-marketing .m-header {
    padding: 12px 16px;
  }

  body.pgos-marketing .m-header nav a,
  body.pgos-marketing .affiliate-bar > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
  }

  body.pgos-marketing .sign-card {
    margin-top: 24px;
    padding: 24px 16px;
  }

  body.pgos-marketing .sign-card summary,
  body.pgos-marketing.affiliate-page summary {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  body.pgos-marketing.affiliate-page .partner-lead a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    box-sizing: border-box;
  }

  body.pgos-marketing .sign-card input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
    min-height: 44px;
    font-size: 16px;
    box-sizing: border-box;
  }

  body.pgos-marketing a.number-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
  }

  body.pgos-marketing .sign-card p > a:only-child:not(.number-help),
  body.pgos-marketing .grid-2 .card > p > a:only-child:not(.number-help) {
    display: flex;
    align-items: center;
    min-height: 44px;
    overflow-wrap: anywhere;
  }

  body.pgos-marketing .btn-row .btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  body.pgos-app .try-bar a,
  body.pgos-app .try-talk a,
  body.pgos-app .home-check a,
  body.pgos-app .profile-card li > a,
  body.pgos-app .process-links a,
  body.pgos-app .map .box h3 {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
  }
}
