/* The organizer header owns its small-screen layout. The save status must not
   compete with the event title for a separate column. No scaling or clipping. */
@media (max-width: 820px), (max-width: 1100px) and (max-height: 500px) {
  .workspace-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
  }

  .workspace-top > .row:first-child {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .workspace-top .mobile-menu {
    width: 64px;
    min-width: 64px;
    min-height: 44px;
    padding: 10px 8px;
    justify-content: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .workspace-top .workspace-title {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .workspace-top .workspace-title strong {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: anywhere;
    font-size: 17px;
    line-height: 1.3;
  }

  .workspace-top > .save-state {
    display: block;
    width: 100%;
    justify-self: stretch;
    margin: 0;
    text-align: right;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}

/* Use the available content width, including CSS zoom, to keep words readable. */
.workspace-content { container: kasou-content / inline-size; }
@container kasou-content (max-width: 640px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .event-summary { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
  .event-summary-photo { height: 100%; min-height: 180px; }
  .event-summary > div { padding: 18px 14px 18px 0; }
  .mini-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); }
}
@container kasou-content (max-width: 380px) {
  .event-summary { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .event-summary-photo { height: 180px; }
  .event-summary > div { padding: 20px; }
}

/* Landscape phones and short tablet windows need height as well as width. */
@media (min-width: 651px) and (max-width: 1100px) and (max-height: 500px) {
  .workspace { display: block; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(300px,80vw); height: 100dvh; display: block; overflow-y: auto; transform: translateX(-110%); box-shadow: 30px 0 80px #0005; }
  .side.open { transform: none; }
  .side-nav { overflow: visible; }
  .mobile-menu { display: inline-flex; }
  .mobile-overlay { position: fixed; z-index: 49; inset: 0; background: #07151f99; }
  .participant-actions { left: 10px; right: 10px; bottom: var(--keyboard-inset); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .participant-actions .publication-state { grid-column: 1/-1; margin: 0; text-align: center; }
  .participant-actions .share-help { grid-column: 1/-1; text-align: center; }
  .participant-actions .btn { font-size: 14px; min-height: 44px; padding: 8px 6px; line-height: 1.2; white-space: normal; }
}

