/* CineClic HQ on a phone (2026-11-05). Loaded LAST, after cinema.css and every tab's own css.
   One job: a phone gets a slim top bar, a thumb bar at the bottom (4 main tabs and Menu) and a Menu sheet
   of big plain words (the carlhauser look: active white, the rest grey). Nothing here changes a desktop screen.
   Everything sits inside the 720px query; the bar and the sheet are display:none above it. */
.mnav, .msheet { display: none; }

@media (max-width: 720px), (max-height: 500px) and (hover: none) {
  html:not([data-z]) .shell { display: block; min-height: 100vh; }
  html:not([data-z]) main { min-width: 0; width: 100%; max-width: 100vw; padding: 18px 16px calc(96px + env(safe-area-inset-bottom, 0px)); overflow-x: clip; }

  /* top bar: the wordmark on the left, the bell on the right; the tabs moved to the bottom bar and the Menu */
  html:not([data-z]) .side { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: auto; position: sticky; top: 0; z-index: 12; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg); overflow: visible; }
  html.va-on:not([data-z]) .side { top: 38px; }
  html:not([data-z]) .side .logo { margin: 0; font-size: 15px; }
  html:not([data-z]) .side-tabs { display: none; }
  html:not([data-z]) .side-foot { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; }
  html:not([data-z]) .side-foot #tourBtn, html:not([data-z]) .side-foot .tabs-sw, html:not([data-z]) .side-foot .me, html:not([data-z]) .side-foot #signOut, html:not([data-z]) .side-foot .va-pick { display: none; }
  html:not([data-z]) .notif-wrap { margin: 0; }
  html:not([data-z]) .notif-bell { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  html:not([data-z]) .notif-panel { position: fixed; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; width: auto; max-height: 70vh; overflow-y: auto; z-index: 46; }

  /* bottom bar */
  .mnav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; padding: 0 6px env(safe-area-inset-bottom, 0px); background: var(--bg); border-top: 1px solid var(--line); }
  .mnav button { position: relative; min-height: 56px; padding: 8px 2px 6px; background: none; border: 0; border-radius: 0; color: var(--dim); font: 600 12.5px/1.15 var(--display); letter-spacing: -.01em; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; -webkit-tap-highlight-color: transparent; }
  .mnav button.on { color: var(--ink); }
  .mnav button.on::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; background: var(--ink); }
  .mnav button:active { color: var(--muted); }
  html.mnav-open, html.mnav-open body { overflow: hidden; }

  /* Menu sheet */
  .msheet { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 45; background: color-mix(in srgb, var(--bg) 96%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: calc(14px + env(safe-area-inset-top, 0px)) 20px calc(14px + env(safe-area-inset-bottom, 0px)); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
  .msheet.open { opacity: 1; visibility: visible; transition: opacity .2s; }
  .msheet-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; }
  .msheet-top .logo { margin: 0; font-size: 15px; }
  .msheet-x { min-width: 44px; min-height: 44px; background: none; border: 0; color: var(--ink); font: 400 26px/1 var(--body); cursor: pointer; }
  .msheet-list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 16px; }
  .msheet-i { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 0; padding: 7px 0; color: var(--dim); font: 600 30px/1.12 var(--display); letter-spacing: -.03em; cursor: pointer; min-height: 48px; }
  .msheet-i.on { color: var(--ink); }
  .msheet-i:active { color: var(--muted); }
  .msheet-sep { margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
  .msheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .msheet-foot b { color: var(--ink); font-weight: 600; }
  .msheet-out { min-height: 44px; padding: 0 18px; border-radius: 999px; background: none; border: 1px solid var(--hair); color: var(--ink); font: 600 13px/1 var(--body); cursor: pointer; }

  /* thumb sized controls everywhere a person taps */
  main button, main .mini, main .btn, main select, main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { min-height: 40px; }
  main .btn.sm, main .mini { padding-top: 8px; padding-bottom: 8px; }
  main input, main select, main textarea { font-size: 16px; }

  /* tap size: every control is at least 40 by 40 where it is a button, and small links get a bigger invisible hit area */
  main button, main .mini, main .btn, main .appr-btn, main .chip.link { min-width: 40px; }
  main .appr-btn { padding-left: 10px; padding-right: 10px; }
  .card-check { width: 40px; height: 40px; }
  .card-check input { width: 22px; height: 22px; }
  main a.card-drive, main a.chip.link, main .carousel-picker-retire { position: relative; }
  main a.card-drive::after, main a.chip.link::after { content: ""; position: absolute; inset: -12px -8px; }
  main button.carousel-star { min-width: 34px; }
  main a:not(.btn):not(.mini):not(.chip) { padding-block: 2px; }

  /* Admin > Team: one person per block (name, lane, role, status, buttons) instead of a wide row */
  .tablewrap:has(table.team) { overflow: visible; }
  table.team, table.team tbody { display: block; overflow: visible; min-width: 0; width: 100%; }
  table.team tr:first-child { display: none; }
  table.team tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.team td { display: block; padding: 0; border: 0; min-width: 0; }
  table.team td:first-child { grid-column: 1 / -1; font-size: 17px; }
  table.team td input, table.team td select { width: 100%; }
  table.team td.row-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  /* the post panel: the caption box keeps room under the text for the Templates and Copy caption buttons */
  .drawer .sch-caption-wrap textarea, .drawer #spCaption { padding-bottom: 12px; }
  .drawer .sch-caption-wrap .sch-caption-btns { position: static; display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

  /* calm pictures (2026-11-10, Joe: "the thumbnails are too large and its not easy on the eye"): a card is a compact row, a small poster beside its words,
     so a screen shows 4 to 5 cards instead of one. The empty "+ Platform / + Style" hints stay on the desktop; the card panel still edits them. */
  .card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .card .card-thumb { grid-row: 1; aspect-ratio: 4 / 5; width: 84px; border-radius: 2px; }
  .card .card-body { padding: 0; min-width: 0; }
  .card .card-title { font-size: 15px; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card .card-title::after { display: none; }
  .card .card-meta { margin: 0 0 6px; gap: 2px 4px; }
  .card .card-meta .chip.empty, .card .card-meta .chip-edit.empty { display: none; }
  .card .card-meta .chip { font-size: 12px; }
  .card .card-actions { gap: 6px; }
  .card .card-check { width: 32px; height: 32px; top: 2px; left: 2px; }
  .card .card-check input { width: 18px; height: 18px; }
  .card .nodata, .card .still-tag { font-size: 8px; padding: 3px 5px 2px; top: 4px; }
  .card .card-drive { display: none; }
  .board .col { padding: 0 14px 14px; }
  .board .col .col-head { position: sticky; top: 0; }
  /* other tabs: pictures are posters, not billboards */
  .broll-grid, .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .style-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hook-card-foot { flex-wrap: wrap; row-gap: 8px; }
  .hook-card-foot .copy { margin-left: 0; }
  .broll-grid:has(> .card) { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* the approve and deny ticks sit in a bar along the foot of the small poster, clear of the Done box at its top left */
  .card .card-thumb .card-approval { top: auto; bottom: 0; left: 0; right: 0; transform: none; justify-content: center; gap: 0; background: rgba(0,0,0,.62); }
  .card .card-thumb .card-approval .appr-btn { min-width: 0; min-height: 28px; flex: 1; padding: 0; border-radius: 0; font-size: 14px; }
  .card .card-thumb .appr-badge { top: auto; bottom: 4px; right: 4px; transform: none; }
  #toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 47; }

  /* the board: one column at a time, swipe sideways, each column snaps */
  .board { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px 14px; scroll-padding: 0 16px; gap: 0; }
  html:not([data-z]) .col { width: 88vw; min-width: 88vw; scroll-snap-align: start; padding-right: 0; }

  /* long headings and tab bars never push the page wider */
  main h1, main h2 { overflow-wrap: anywhere; }
  main .tabs, main [role="tablist"], .sch-views, .view-toggle { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  main table { display: block; max-width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { .msheet { transition: none; } }
