/* Public root uses the owner-readable company control center. The retired
   three-column prototype stays hidden; its command-deck visual language is now
   carried by the real company, worker, review, and ComfyUI status surfaces. */
.command-deck > .gm-overview {
  display: block !important;
}

.command-deck > .legacy-dashboard {
  display: none !important;
}

/* The company page must stay usable when iPhone Safari reports a wider layout
   viewport (browser chrome, display zoom, or an old cached shell). Show one
   selected project instead of shrinking the desktop list beside it. */
@media (max-width: 1180px), (pointer: coarse) {
  .command-deck.is-subpage {
    width: 100% !important;
    height: auto !important;
    min-height: 100svh;
    aspect-ratio: auto !important;
    overflow: visible !important;
  }

  .company-projects {
    width: 100%;
    padding: 4px 0 calc(24px + env(safe-area-inset-bottom)) !important;
  }

  .company-toolbar {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px !important;
  }

  .company-toolbar input,
  .company-toolbar > select:not(.company-mobile-picker) {
    display: none !important;
  }

  .company-mobile-picker {
    display: block !important;
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    color: #ffe3c6;
    background: #0c0b0a;
    border: 1px solid rgba(255, 106, 42, .5);
    border-radius: 9px;
    font-size: 18px;
    font-weight: 800;
  }

  .company-layout {
    display: block !important;
    margin-top: 12px !important;
  }

  .company-list {
    display: none !important;
  }

  .company-detail {
    width: 100%;
    max-height: none !important;
    padding: 18px 16px !important;
    overflow: visible !important;
  }

  .company-detail > header {
    align-items: flex-start;
    gap: 12px;
  }

  .company-detail > header h2 {
    font-size: clamp(28px, 7vw, 34px) !important;
    line-height: 1.15;
  }

  .company-focus {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .company-focus section {
    display: grid;
    grid-template-columns: minmax(82px, 28%) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 13px 14px !important;
  }

  .company-detail h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px !important;
  }

  .company-detail p,
  .company-detail summary {
    font-size: 18px !important;
    line-height: 1.55;
  }
}

@media (max-width: 430px) {
  .company-toolbar > div span {
    display: none;
  }

  .company-detail {
    padding: 15px 12px !important;
  }

  .company-detail > header {
    padding-bottom: 10px;
  }

  .company-focus section {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .company-detail details {
    margin-top: 12px;
    padding-top: 10px;
  }
}
