/* Venice tickets — The Upcoming brand (same look as the Culture Desk Planner):
   yellow nav bar, light grey canvas, white cards. */
*{box-sizing:border-box}
[hidden]{display:none!important}

:root{
  --brand:#ffcc4b;
  --brand-strong:#ffc124;
  --brand-deep:#996213;           /* same amber, dark enough for white text (5.1:1) */
  --brand-deeper:#80520f;
  --brand-soft:#fff4d1;
  --brand-ink:#1a1a1a;
  --bg:#f6f7f9;
  --panel:#ffffff;
  --line:#e6e8ef;
  --txt:#0b1020;
  --mut:#54607a;
  --faint:#8b93a6;
  --input-bg:#f9fafc;
  --radius:12px;
  --radius-lg:16px;
  --shadow:0 10px 25px rgba(15,17,21,.06);
  --ring:0 0 0 4px rgba(255,204,75,.35);
  --ok:#16a34a;
  --bad:#dc2626;
  --acc:#b07d00;
}

html,body{background:var(--bg);color:var(--txt);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;margin:0;min-height:100vh}
a{color:#1d4ed8;text-decoration:none}a:hover{text-decoration:underline}
h1{font-size:16px;margin:0}
h2{font-size:11.5px;margin:0 0 12px;color:var(--faint);text-transform:uppercase;letter-spacing:.5px;font-weight:700}
:focus-visible{outline:none;box-shadow:var(--ring)}

/* nav bar */
header{position:sticky;top:0;z-index:90;background:var(--brand);color:var(--brand-ink)}
.hwrap{max-width:1280px;margin:0 auto;padding:8px 16px;min-height:56px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.brand{display:flex;align-items:center;flex-shrink:0}
.brand-logo{height:34px;width:auto;display:block}
.brand-sub{font-size:16px;font-weight:600;color:#fff;white-space:nowrap;letter-spacing:-.1px}
.sp{flex:1}
header .dot{width:9px;height:9px;border-radius:50%;display:inline-block;background:#b91c1c;vertical-align:-1px;margin-right:5px}
header .dot.on{background:#15803d}
#schedState{font-size:12.5px;font-weight:500;color:rgba(26,26,26,.82);white-space:nowrap}
header .logoutform{margin:0}
header button{background:#fff;color:var(--brand-ink);border:1px solid rgba(0,0,0,.06)}
header button:hover{background:#fffdf5}

/* tab toggle, on the yellow */
.tabs{display:flex;background:rgba(255,255,255,.55);border-radius:999px;padding:3px;gap:2px}
.tabs .tab{background:transparent;color:rgba(26,26,26,.62);border:0;border-radius:999px;padding:6px 14px;font-size:11.5px;font-weight:700;letter-spacing:.08em}
.tabs .tab:hover{background:rgba(255,255,255,.5);color:var(--brand-ink)}
.tabs .tab.on{background:#fff;color:var(--brand-ink);box-shadow:0 1px 3px rgba(15,17,21,.12)}

/* layout */
main{max-width:1280px;margin:0 auto;padding:18px 16px 40px}
/* minmax(0,1fr) + min-width:0: a grid track defaults to min-content, so one card
   with a wide table/row/pre would widen EVERY card past the viewport - the header
   then fits the phone while the body sits at ~660px (seen on the Scheduler tab). */
main>div{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-lg);padding:18px;box-shadow:var(--shadow);min-width:0;max-width:100%}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.mut{color:var(--mut)}
.small{font-size:12px}

/* controls */
button{background:var(--brand);color:var(--brand-ink);border:1px solid transparent;border-radius:999px;padding:8px 16px;font:inherit;font-weight:700;font-size:13px;cursor:pointer;transition:background .15s,filter .15s}
button:hover{filter:brightness(.97)}
button:disabled{opacity:.55;cursor:default;filter:none}
button.sec{background:var(--panel);color:var(--txt);border-color:var(--line);font-weight:600}
button.sec:hover{background:var(--input-bg);filter:none}
button.small{font-size:12px;padding:5px 11px}
button.danger{background:var(--bad);color:#fff}
label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--mut);font-weight:500}
label.inl{flex-direction:row;align-items:center;gap:8px;color:var(--txt);font-size:13px}
input,select,textarea{background:var(--panel);border:1px solid var(--line);color:var(--txt);border-radius:10px;padding:8px 10px;font:inherit;font-size:13px}
input::placeholder{color:var(--faint)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand-strong);box-shadow:var(--ring)}
input[type=checkbox]{width:17px;height:17px;accent-color:var(--brand-strong)}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--input-bg);border:1px solid var(--line);border-radius:4px;padding:0 4px;font-size:11.5px;color:var(--acc)}

/* tables */
table{width:100%;border-collapse:collapse;font-size:13.5px}
th{text-align:left;padding:0 6px 8px;color:var(--faint);font-size:10.5px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;border-bottom:1px solid var(--line)}
td{text-align:left;padding:10px 6px;border-bottom:1px solid var(--line);vertical-align:top}
tbody tr:hover>td{background:var(--input-bg)}
.disabled-row td{opacity:.5}

/* the film title is what people read, so it gets whatever is left;
   Status only needs to fit the widest pill ("TEMP SUSPENDED"). */
#tbl{table-layout:fixed}
/* the 980px floor exists only where there is 980px to give it; below that the
   table is a stack of cards and must never claim a width at all */
@media (min-width:980px){ #tbl{min-width:980px} }
/* columns: 1 on · 2 when · 3 type · 4 film · 5 accreditation · 6 status · 7 last check · 8 notified · 9 actions */
#tbl th:nth-child(1),#tbl td:nth-child(1){width:32px}
#tbl th:nth-child(2),#tbl td:nth-child(2){width:88px}
#tbl th:nth-child(3),#tbl td:nth-child(3){width:78px}
#tbl th:nth-child(5),#tbl td:nth-child(5){width:120px}
#tbl th:nth-child(6),#tbl td:nth-child(6){width:132px}
#tbl th:nth-child(7),#tbl td:nth-child(7){width:92px}
#tbl th:nth-child(8),#tbl td:nth-child(8){width:110px}
#tbl th:nth-child(9),#tbl td:nth-child(9){width:88px}
#tbl td:nth-child(4){word-break:break-word}
#tbl td.when{white-space:nowrap}
#tbl td .detail{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word;line-height:1.3;margin-top:4px;color:var(--faint)}
td.acts{white-space:nowrap}td.acts button+button{margin-left:6px}
button.small svg{width:1em;height:1em;vertical-align:-0.13em}
section.card:has(#tbl){overflow-x:auto}

/* status / type pills */
.pill{display:inline-flex;align-items:center;font-size:11px;font-weight:700;border-radius:999px;padding:3px 9px;border:1px solid transparent;line-height:1.4;white-space:nowrap;letter-spacing:.2px}
.AVAILABLE{color:#166534;background:#dcfce7;border-color:rgba(22,163,74,.35)}
.SOLD_OUT{color:#991b1b;background:#fee2e2;border-color:rgba(220,38,38,.28)}
.SUSPENDED{color:#5b21b6;background:#ede9fe;border-color:rgba(124,58,237,.3)}
.QUEUE{color:#1e40af;background:#dbeafe;border-color:rgba(59,130,246,.3)}
.UNKNOWN{color:#92400e;background:#fef3c7;border-color:rgba(245,158,11,.35)}
.none{color:var(--mut);background:#f1f3f7;border-color:var(--line)}
.k-pub{color:#166534;background:#dcfce7;border-color:rgba(22,163,74,.35)}
.k-acc{color:#991b1b;background:#fee2e2;border-color:rgba(220,38,38,.28)}
/* press conferences: their own light blue, so they read as a different kind of
   thing from a screening you can (or cannot) get a seat at */
.k-conf{color:#075985;background:#e0f2fe;border-color:rgba(14,165,233,.38)}

/* accreditation cell */
td.accr .chip{background:var(--input-bg);color:var(--txt);border:1px solid var(--line);border-radius:999px;padding:4px 11px;font:inherit;font-size:12.5px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
td.accr .chip:hover{border-color:var(--brand-strong);background:var(--brand-soft);filter:none}
td.accr select{width:100%;font-size:12.5px;padding:5px 6px}

/* inline editor */
tr.editrow>td{background:#fffdf3;border-left:3px solid var(--brand-strong);padding:16px 12px}
tr.editrow form{margin:0}
tr.editrow .sub,tr.editrow .row{grid-column:1/-1}
fieldset.sub{border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px 14px;margin:2px 0;display:grid;gap:10px;background:var(--panel)}
fieldset.sub legend{color:var(--faint);font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;font-weight:700;padding:0 6px}
fieldset.sub p{margin:0}
fieldset.sub label .cap{display:block}
input.pastebox{width:100%}
.preview{word-break:break-all;font-size:12px;margin:0}

/* settings / team */
.card.settings h2.toggle{cursor:pointer;display:flex;align-items:center;margin:0;user-select:none}
.card.settings h2.toggle .chev{margin-left:auto;font-size:20px;line-height:1;transition:transform .15s;transform:rotate(90deg);color:var(--faint)}
.card.settings.collapsed h2.toggle .chev{transform:rotate(0)}
.card.settings.collapsed .setbody{display:none}
.card.settings:not(.collapsed) h2.toggle{margin-bottom:14px}
h3.sub-h{margin:22px 0 4px;font-size:11.5px;color:var(--faint);text-transform:uppercase;letter-spacing:.5px;border-top:1px solid var(--line);padding-top:16px}
#teamTbl{margin-bottom:12px}
#teamTbl td.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--mut)}
#teamForm input{min-width:200px}

/* calendar */
.seg{display:flex;border:1px solid var(--line);border-radius:999px;background:var(--panel);padding:3px;gap:2px}
.seg button{background:none;color:var(--mut);border:0;border-radius:999px;padding:6px 14px;font-size:12.5px;font-weight:600}
.seg button:hover{background:var(--input-bg);color:var(--txt);filter:none}
.seg button.on{background:var(--brand);color:var(--brand-ink)}
/* one row per accreditation in the picker */
.accrow{display:flex;flex-direction:row;align-items:center;gap:10px;padding:9px 11px;border:1px solid var(--line);
  border-radius:10px;margin-bottom:7px;cursor:pointer;background:var(--panel)}
.accrow:hover{border-color:var(--brand-strong)}
.accrow.on{background:var(--brand-soft);border-color:var(--brand-strong)}
.accrow input{width:15px;height:15px;margin:0;padding:0;flex:0 0 auto;cursor:pointer}
.accrow .accname{font-weight:700;color:var(--txt);font-size:13px}

/* "Include past" reads as part of the PROGRAMME heading line, so it copies the h2
   exactly: same 11.5px, same uppercase, same tracking, same grey. */
.pastbox{display:inline-flex;flex-direction:row;align-items:center;gap:5px;font:inherit;font-size:11.5px;font-weight:700;
  color:var(--faint);text-transform:uppercase;letter-spacing:.5px;line-height:1;
  cursor:pointer;user-select:none;white-space:nowrap}
.pastbox:hover{color:var(--mut)}
.pastbox input{width:11px;height:11px;min-width:11px;margin:0;padding:0;border-radius:3px;cursor:pointer;
  flex:0 0 auto;vertical-align:middle;position:relative;top:-.5px}
.pastbox:has(input:checked){color:var(--txt)}

/* a calendar row is one big click target, but text stays selectable with the trackpad */
table.caltbl tr.crow{cursor:pointer}
table.caltbl tr.crow:hover td{background:var(--brand-soft)}
/* already screened: still there to look back on, but visibly done with */
table.caltbl tr.crow.past td{opacity:.5}
table.caltbl tr.crow.past:hover td{opacity:.75}
.modalhead{align-items:flex-start;gap:10px;margin-bottom:2px}
.modalhead h2{margin:0}
#filmForm .wide{grid-column:1/-1}
.prrow{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-bottom:8px}

/* heat 1-10 + the film detail sheet */
.heat{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;border-radius:7px;font-size:12px;font-weight:700;padding:0 5px}
.heat.hhi{background:#fee2e2;color:#991b1b;border:1px solid rgba(220,38,38,.3)}
.heat.hmid{background:var(--brand-soft);color:#92400e;border:1px solid rgba(245,158,11,.35)}
.heat.hlow{background:#f1f3f7;color:var(--mut);border:1px solid var(--line)}
.filmhead{display:flex;gap:12px;align-items:flex-start}
table.prtbl td{padding:7px 6px;border-bottom:1px solid var(--line);font-size:12.5px;vertical-align:top}

/* multi-select filter pills: tap to add, tap again to drop, All clears */
.fpills{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 4px;align-items:center}
.fbreak{flex-basis:100%;height:0}
.fpill{background:var(--panel);border:1px solid var(--line);color:var(--mut);border-radius:999px;padding:5px 12px;font-size:12.5px;font-weight:600}
.fpill:hover{border-color:var(--brand-strong);background:var(--brand-soft);color:var(--txt);filter:none}
.fpill.on{background:var(--brand);border-color:var(--brand-strong);color:var(--brand-ink)}
.fpill .n{font-weight:700;opacity:.55;font-size:11px;margin-left:3px}
.calmeta{margin:18px 0 0;padding-top:12px;border-top:1px solid var(--line)}
h3.day{margin:20px 0 4px;font-size:13px;font-weight:700;color:var(--txt);border-bottom:2px solid var(--brand);padding-bottom:6px;display:flex;gap:10px;align-items:baseline}
h3.day:first-child{margin-top:8px}
table.caltbl{table-layout:fixed}
/* One gutter value everywhere, so the gaps between all five columns are identical.
   The row's outer edges sit flush with the card, hence the 0 on first/last. */
table.caltbl td{padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere;overflow:hidden}
table.caltbl td:first-child{padding-left:0}
table.caltbl td:last-child{padding-right:0}
/* c-k must clear the widest pill ("Press & Industry" is nowrap, ~123px) plus the
   gutter, or it overflows into the title. */
table.caltbl col.c-fav{width:34px}
table.caltbl col.c-t{width:70px}
table.caltbl col.c-k{width:152px}
table.caltbl col.c-f{width:auto}
table.caltbl col.c-h{width:52px}
table.caltbl col.c-v{width:116px}
table.caltbl col.c-bk{width:78px}
table.caltbl td.t{color:var(--mut);font-variant-numeric:tabular-nums;font-weight:600}
/* the end time, under the start: only there when the running time is known */
table.caltbl td.t .endt{font-weight:500;font-size:11px;color:var(--faint);letter-spacing:-.1px}
table.caltbl td.hc{text-align:center;padding-left:0;padding-right:0}
table.caltbl td.fav{padding-left:0;padding-right:0}
table.caltbl td.bk{text-align:left;overflow:visible}
/* min-width holds the shape while the label swaps to "checking…", so the pill does
   not grow and shove the column about mid-click. */
a.bookbtn{display:inline-flex;align-items:center;justify-content:center;min-width:72px;
  background:var(--brand);color:#fff;border-radius:999px;padding:5px 13px;font-size:12px;font-weight:700;
  text-decoration:none;white-space:nowrap;letter-spacing:.2px}
a.bookbtn:hover{background:var(--brand-strong);color:#fff;text-decoration:none}
a.bookbtn.busy{opacity:.65;pointer-events:none}
/* the public-sale cell is a <button>, not a link (a link there was cancelled by the
   click handler) — same shape as Book so the column stays even */
button.bookbtn.buybtn{display:inline-flex;align-items:center;justify-content:center;min-width:72px;
  background:var(--brand);color:#fff;border:0;border-radius:999px;padding:5px 13px;font-size:12px;font-weight:700;
  white-space:nowrap;letter-spacing:.2px;cursor:pointer;font-family:inherit}
button.bookbtn.buybtn:hover{background:var(--brand-strong);filter:none}
.pill.bkd{background:#dcfce7;color:#166534;border-color:rgba(22,163,74,.35)}
/* BOOKED and SCHED are the same object in two colours: a state you can press for
   the detail behind it. One rule owns the shape so they can never drift apart. */
button.pill.bkd,button.pill.sched{cursor:pointer;font-family:inherit;font-size:11px;font-weight:700;
  padding:3px 9px;letter-spacing:.2px;line-height:1.4;border-radius:999px;border-width:1px}
button.pill.bkd:hover{background:#bbf7d0;filter:none}
.fpill.bkdpill.on{background:#dcfce7;border-color:#16a34a;color:#166534}
a.btnlike{display:inline-block;text-decoration:none;line-height:1.4}
/* the heart sits in the row but is its own control: clicking it must not open the film */
.heartbtn{background:none;border:0;padding:2px;border-radius:8px;color:var(--faint);line-height:0;cursor:pointer}
.heartbtn svg{width:17px;height:17px;display:block}
.heartbtn:hover{color:#e11d48;background:none;filter:none}
.heartbtn.on{color:#e11d48}
.fpill.fav.on{background:#ffe4e9;border-color:#e11d48;color:#9f1239}
table.caltbl td:last-child{color:var(--mut)}
@media(max-width:760px){
  table.caltbl td{padding:9px 8px}
  table.caltbl col.c-fav{width:30px}
  table.caltbl col.c-t{width:56px}
  table.caltbl col.c-k{width:140px}
  table.caltbl col.c-h{width:40px}
  table.caltbl col.c-v{width:96px}
  table.caltbl col.c-bk{width:70px}
}

/* log */
pre{background:var(--input-bg);border:1px solid var(--line);border-radius:var(--radius);padding:12px;max-height:340px;overflow:auto;font-size:12px;line-height:1.5;color:var(--mut);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}

/* modal + toast */
.modal{position:fixed;inset:0;background:rgba(11,16,32,.35);backdrop-filter:blur(2px);display:grid;place-items:center;padding:20px;z-index:110}
.modalbox{background:var(--panel);border-radius:var(--radius-lg);padding:22px;width:min(640px,94vw);max-height:86vh;overflow:auto;display:grid;gap:12px;box-shadow:0 24px 60px rgba(15,17,21,.25)}
.modalbox h2{margin:0;font-size:15px;color:var(--txt);text-transform:none;letter-spacing:0}
.picks{display:grid;gap:6px}
button.pick{background:var(--panel);border:1px solid var(--line);color:var(--txt);text-align:left;font-weight:400;font-size:13px;border-radius:var(--radius);padding:10px 12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
button.pick:hover{border-color:var(--brand-strong);background:var(--brand-soft);filter:none}
button.pick b{font-weight:600}
.toast{position:fixed;bottom:18px;right:18px;background:var(--txt);color:#fff;padding:12px 16px;border-radius:var(--radius);max-width:440px;display:none;box-shadow:0 12px 30px rgba(15,17,21,.25);font-size:13px;z-index:120}

/* login */
body.login{display:grid;place-items:center;min-height:100vh;background:var(--bg)}
.loginCard{width:min(380px,92vw);display:grid;gap:14px;padding:32px 28px;text-align:center;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.loginCard h1{font-size:20px}
.login-logo{height:42px;width:auto;margin:0 auto 2px;display:block}
.loginCard p.mut{margin:-8px 0 4px}
.loginCard label{text-align:left}
.loginCard input{padding:10px 12px;font-size:16px}
.loginCard button{padding:11px;font-size:15px;margin-top:4px}
.err{color:var(--bad);margin:0;min-height:1em}

/* on the watch list: same pill as BOOKED, amber instead of green */
button.pill.sched{background:var(--brand-soft);color:#92400e;border-color:rgba(245,158,11,.4)}
button.pill.sched:hover{background:var(--brand);color:var(--brand-ink);filter:none}

/* booking progress: the phases the server actually reports, so a stalled step is
   visibly the step that stalled rather than a spinner that says nothing */
ol.steps{list-style:none;margin:14px 0;padding:0;display:grid;gap:2px}
ol.steps li.st{display:flex;align-items:center;gap:10px;padding:8px 2px;font-size:13px;color:var(--faint)}
ol.steps li.st .stdot{width:20px;height:20px;border-radius:50%;flex:0 0 auto;display:inline-flex;
  align-items:center;justify-content:center;font-size:11px;font-weight:700;
  border:2px solid var(--line);background:var(--panel);color:var(--panel)}
ol.steps li.st.done{color:var(--mut)}
ol.steps li.st.done .stdot{background:var(--ok);border-color:var(--ok);color:#fff}
ol.steps li.st.now{color:var(--txt);font-weight:600}
ol.steps li.st.now .stdot{border-color:var(--brand-strong);background:var(--brand-soft);
  animation:stpulse 1.1s ease-in-out infinite}
ol.steps li.st.fail{color:var(--bad);font-weight:600}
ol.steps li.st.fail .stdot{background:var(--bad);border-color:var(--bad);color:#fff}
@keyframes stpulse{0%,100%{box-shadow:0 0 0 0 rgba(255,193,36,.55)}50%{box-shadow:0 0 0 6px rgba(255,193,36,0)}}
i.dots{font-style:normal;letter-spacing:2px;margin-left:2px}
i.dots b{font-weight:700;animation:stdot 1.2s infinite}
i.dots b:nth-child(2){animation-delay:.2s}
i.dots b:nth-child(3){animation-delay:.4s}
@keyframes stdot{0%,60%,100%{opacity:.2}30%{opacity:1}}
@media(prefers-reduced-motion:reduce){
  ol.steps li.st.now .stdot{animation:none}
  i.dots b{animation:none;opacity:.6}
}

/* ---- calendar on a phone -------------------------------------------------
   Seven columns cannot fit 375px, and squeezing them just makes every one of
   them unreadable. Below this width each row stops being a table row and
   becomes a small card: heart down the left, then time/audience/heat, the
   title on its own line, and the room with its Book control underneath. */
@media (max-width: 560px){
  table.caltbl{display:block}
  table.caltbl colgroup,table.caltbl col{display:none}
  table.caltbl tbody{display:block}
  table.caltbl tr.crow{
    display:grid;
    grid-template-columns:26px minmax(46px,auto) 1fr auto;
    grid-template-areas:
      "fav time  kind  heat"
      "fav film  film  film"
      "fav venue venue book";
    gap:3px 8px;
    align-items:center;
    padding:11px 0;
    border-bottom:1px solid var(--line);
  }
  table.caltbl tr.crow>td{border:0;padding:0;overflow:visible;vertical-align:middle}
  table.caltbl tr.crow:hover td{background:none}          /* no hover wash on touch */
  table.caltbl tr.crow:active td{background:var(--brand-soft)}
  table.caltbl td.fav{grid-area:fav;align-self:start;padding-top:2px}
  table.caltbl td.t{grid-area:time}
  table.caltbl tr.crow>td:nth-child(3){grid-area:kind;justify-self:start}
  table.caltbl tr.crow>td:nth-child(4){grid-area:film;line-height:1.35}
  table.caltbl td.hc{grid-area:heat;justify-self:end;text-align:right}
  table.caltbl tr.crow>td:nth-child(6){grid-area:venue;font-size:12.5px}
  table.caltbl td.bk{grid-area:book;justify-self:end;text-align:right}
  /* the film line carries the section underneath; keep it quiet and unwrapped-looking */
  table.caltbl tr.crow>td:nth-child(4) .small{font-size:11.5px}
  h3.day{margin-top:22px}
  .fpills{gap:5px}
  .fpill{padding:5px 10px;font-size:12px}
  .modalbox{padding:16px;width:96vw;max-height:90vh}
  ol.steps li.st{font-size:12.5px}
}

/* iOS zooms the page in whenever you focus a field whose text is under 16px, and
   then leaves you scrolled sideways. Nothing to do with the viewport meta - the
   only cure is 16px. Scoped to touch devices so the desktop layout stays compact. */
@media (hover: none) and (pointer: coarse){
  input,select,textarea,
  input[type=text],input[type=number],input[type=date],input[type=email],input[type=password]{
    font-size:16px;
  }
  /* 16px text needs a little more room, or the caret sits against the border */
  input,select,textarea{padding:9px 11px}
  input[type=checkbox]{font-size:inherit}          /* boxes keep their own size */
  .pastbox input{width:16px;height:16px}
  #calSearch{width:100%;min-width:0}
}

/* ---- the Scheduler table on a narrow screen --------------------------------
   The table's nine columns need 980px. The breakpoint therefore has to be 979px,
   not a phone width: between the two the table stays 980px while the header fits
   the window, so the page reads as two different widths stacked on each other -
   which is exactly what an iPhone in landscape (844px) was showing.
   Below 980px each screening becomes a card on a fixed grid:
       date  TYPE            [on] [edit] [x]
       title, people, notes, open link
       STATUS  detail
       accreditation        checked · notified                                  */
@media (max-width: 979px){
  section.card:has(#tbl){overflow-x:visible;padding:14px 12px 12px}
  section.card:has(#tbl) h2{margin:2px 0 12px 4px}
  #tbl tr.editrow{border:1px solid var(--brand-strong);border-radius:var(--radius);overflow:hidden}
  #tbl{display:block;table-layout:auto;min-width:0}
  #tbl thead{display:none}                       /* a card has no columns to label */
  #tbl tbody{display:grid;gap:10px}
  /* each screening is its own card: bordered, rounded, on the page grey so it
     lifts off the white section around it */
  #tbl tbody tr{
    display:grid;
    grid-template-columns:auto auto 1fr auto auto;
    grid-template-areas:
      "when   kind   .      on     acts"
      "film   film   film   film   film"
      "status status status status status"
      "accr   accr   .      chk    ntf";
    gap:7px 8px;align-items:center;
    padding:12px 14px 13px;
    background:var(--input-bg);border:1px solid var(--line);border-radius:var(--radius);
  }
  #tbl tbody tr.disabled-row{background:var(--panel)}
  #tbl tbody tr>td.status{padding-top:2px;margin-top:2px;border-top:1px dashed var(--line);padding-top:8px}
  #tbl tbody tr>td{display:block;border:0;padding:0;width:auto!important;min-width:0}
  #tbl tbody tr:hover>td{background:none}
  #tbl tbody tr>td.when{grid-area:when;font-weight:700;white-space:nowrap}
  #tbl tbody tr>td.kind{grid-area:kind}
  #tbl tbody tr>td.on{grid-area:on;display:flex;align-items:center;justify-self:end;margin-right:4px}
  #tbl tbody tr>td.acts{grid-area:acts;white-space:nowrap;justify-self:end}
  #tbl tbody tr>td.film{grid-area:film;font-size:14px;line-height:1.35;margin-top:2px}
  #tbl tbody tr>td.status{grid-area:status;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
  #tbl tbody tr>td.status .detail{display:block;margin:0;-webkit-line-clamp:unset;flex:1 1 160px}
  #tbl tbody tr>td.accr{grid-area:accr;max-width:100%}
  #tbl tbody tr>td.accr.empty{display:none}
  #tbl tbody tr>td.chk{grid-area:chk;justify-self:end;white-space:nowrap}
  #tbl tbody tr>td.chk::before{content:"checked ";color:var(--faint)}
  #tbl tbody tr>td.ntf{grid-area:ntf;justify-self:end;white-space:nowrap}
  #tbl tbody tr>td.ntf::before{content:"· notified ";color:var(--faint)}
  #tbl tbody tr>td.ntf.empty{display:none}
  #tbl tbody tr>td.ntf .lastn{display:none}   /* "1×" is enough on a phone; the full time is in the desktop table */

  /* the inline editor spans the whole card rather than a phantom 9 columns */
  #tbl tr.editrow{display:block;padding:0}
  #tbl tr.editrow>td{display:block;width:100%!important;padding:14px 10px}
  #tbl tr.editrow .grid{grid-template-columns:1fr}
  #setForm>.row>button{flex:1 1 45%}
  #setForm>.row #lastRun{flex:1 0 100%}
}

/* ---- the nav bar on a phone -----------------------------------------------
   Eight flex children on one line wrap into a ragged stack. Give them an explicit
   running order instead: identity and the way out on the first line, the tab
   toggle full width on the second, the scheduler state line below that. */
@media (max-width: 560px){
  .hwrap{padding:8px 12px;gap:8px 10px;min-height:0}
  .hwrap .sp{display:none}                  /* a flex spacer only fights the wrap */
  .brand{order:0}
  .brand-logo{height:28px}
  .brand-sub{order:1;font-size:15px}
  header .logoutform{order:2;margin-left:auto}
  .tabs{order:3;flex:1 0 100%;padding:3px}
  .tabs .tab{flex:1;text-align:center;padding:9px 8px;font-size:12px;letter-spacing:.06em}
  #schedState{order:4;flex:1 0 100%;font-size:12px}
  header button{padding:9px 12px;font-size:12.5px}
}

/* ---- Interviews tab (2026-09-04) ------------------------------------------
   Cards on top for what needs Filippo, the same set as a dense list below. */
.ivcards{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));margin:4px 0 6px}
.ivcard{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);padding:13px 14px;cursor:pointer;
        display:flex;flex-direction:column;gap:7px;transition:border-color .15s,box-shadow .15s;min-width:0}
.ivcard:hover{border-color:var(--brand-strong);box-shadow:var(--shadow)}
.ivcard.p-now{border-left:4px solid var(--bad)}
.ivcard.p-reply{border-left:4px solid var(--brand-strong)}
.ivcard.p-later{border-left:4px solid var(--line)}
.ivcard h4{margin:0;font-size:14.5px;line-height:1.3;color:var(--txt);overflow-wrap:anywhere}
.ivcard .ivtop{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ivcard .ivwho{margin:0;font-size:12.5px;font-weight:600;color:var(--mut);overflow-wrap:anywhere}
.ivsum2{margin:0;font-size:12.5px;color:var(--mut);line-height:1.45;overflow-wrap:anywhere}
.ivaction{margin:0;font-size:12.5px;font-weight:600;color:var(--brand-deeper);background:var(--brand-soft);
          border-radius:8px;padding:6px 9px;line-height:1.4;overflow-wrap:anywhere}
.ivcard .ivfoot{margin:auto 0 0;line-height:1.45;overflow-wrap:anywhere}
.pill.ivwhen{color:var(--txt);background:var(--input-bg);border-color:var(--line)}
.pill.ivt-interview,.pill.ivt-junket{color:#075985;background:#e0f2fe;border-color:rgba(14,165,233,.38)}
.pill.ivt-screener,.pill.ivt-materials{color:#3730a3;background:#e0e7ff;border-color:rgba(79,70,229,.3)}
.pill.ivt-press_screening,.pill.ivt-premiere,.pill.ivt-press_conference{color:#166534;background:#dcfce7;border-color:rgba(22,163,74,.35)}
.pill.ivt-other{color:var(--mut);background:#f1f3f7;border-color:var(--line)}
/* Filippo's own column — a pill in the cards, a dropdown in the list */
.pill.st-new{color:#92400e;background:#fef3c7;border-color:rgba(245,158,11,.35)}
.pill.st-interested{color:#1e40af;background:#dbeafe;border-color:rgba(59,130,246,.3)}
.pill.st-requested{color:#5b21b6;background:#ede9fe;border-color:rgba(124,58,237,.3)}
.pill.st-confirmed{color:#166534;background:#dcfce7;border-color:rgba(22,163,74,.35)}
.pill.st-done,.pill.st-passed{color:var(--mut);background:#f1f3f7;border-color:var(--line)}
select.ivstat{font:inherit;font-size:11.5px;font-weight:700;border-radius:999px;padding:4px 8px;border:1px solid var(--line);
              background:var(--input-bg);color:var(--txt);max-width:112px}
select.ivstat.st-new{background:#fef3c7;color:#92400e}
select.ivstat.st-interested{background:#dbeafe;color:#1e40af}
select.ivstat.st-requested{background:#ede9fe;color:#5b21b6}
select.ivstat.st-confirmed{background:#dcfce7;color:#166534}
#ivTbl{table-layout:auto}
#ivTbl td{vertical-align:top}
#ivTbl td.when{white-space:nowrap}
#ivTbl .detail{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3;margin-top:3px;color:var(--faint);font-size:12px}
#ivSkipWrap{margin-top:14px}
#ivSkipWrap .ivsum{cursor:pointer;user-select:none}
#ivSkipTbl td{padding:5px 8px;font-size:12px}
#ivSkipTbl td.nowrap{white-space:nowrap}
.ivdet td:first-child{white-space:nowrap;width:130px}
.sub-h{font-size:11.5px;margin:18px 0 8px;color:var(--faint);text-transform:uppercase;letter-spacing:.5px;font-weight:700}
/* On a phone the eight columns become one block per opportunity: three or four short
   lines that fit the width, rather than a table you have to drag sideways.
   Empty cells collapse - a row with no venue must not leave a blank line. */
@media (max-width:760px){
  .ivcards{grid-template-columns:1fr}
  #ivTbl,#ivTbl tbody{display:block;width:100%}
  #ivTbl thead{display:none}
  #ivTbl tr{display:grid;grid-template-columns:auto auto 1fr;gap:2px 8px;align-items:center;
    grid-template-areas:"status date time" "opp opp opp" "who who who" "loc loc loc" "contact contact contact";
    padding:11px 0;border-bottom:1px solid var(--line)}
  #ivTbl td{display:block;border:0;padding:0;white-space:normal;font-size:12.5px;min-width:0}
  #ivTbl td:nth-child(1){grid-area:status}
  #ivTbl td:nth-child(2){grid-area:date;font-weight:700}
  #ivTbl td:nth-child(3){grid-area:time;font-weight:700;justify-self:start}
  #ivTbl td:nth-child(4){grid-area:loc}
  #ivTbl td:nth-child(5){grid-area:who;font-weight:600}
  #ivTbl td:nth-child(6){grid-area:contact;font-size:12px;overflow-wrap:anywhere}
  /* the address is a tap away in the row's own panel — the name is enough here */
  #ivTbl td:nth-child(6) .detail{display:none}
  #ivTbl td:nth-child(4){font-size:12px;color:var(--mut)}
  #ivTbl td:nth-child(7){grid-area:opp;font-size:13.5px}
  #ivTbl td:nth-child(8){display:none}          /* thread count: not worth a line here */
  #ivTbl td:has(> .dash:only-child){display:none}
  #ivTbl .detail{-webkit-line-clamp:3}
  select.ivstat{max-width:none}
}

/* the list is the primary view: keep the schedule columns tight and readable */
#ivTbl th:nth-child(2),#ivTbl td:nth-child(2),#ivTbl th:nth-child(3),#ivTbl td:nth-child(3){white-space:nowrap}
#ivTbl td:nth-child(3){font-variant-numeric:tabular-nums}
#ivTbl td.nowrap{white-space:nowrap}
#ivTbl .ivfree{color:var(--faint)}
#ivTbl td a{word-break:break-all}
