/* Pineville Team + Schedule (hours calendar) — PREVIEW Oct 27 2026. Pineville only.
   Rides on the cm-page tokens from lais-manager-stub.css (Classic / Maroon / Enterprise). */
body.ph-page { padding-bottom: 96px; }
body.ph-page .ph-main { display: grid; gap: var(--s3); padding: var(--s1) 0 var(--s4); }
body.ph-page .cm-top .sub { margin: 0; font-family: var(--cm-sans); font-size: 15px; color: var(--cm-muted) !important; }
.ph-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 11px/1 var(--cm-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cm-ink); background: var(--cm-well); border: 1px solid var(--cm-line); }
.ph-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--cm-gold); }

/* ---------- gate ---------- */
.ph-gate { width: min(440px, 100%); margin: var(--s4) auto; text-align: center; padding: var(--s4) var(--s3) !important; }
.ph-gate .ms-icon { margin-bottom: var(--s2); }
.ph-gate p { margin: var(--s1) 0 var(--s3); font-family: var(--cm-sans); font-size: 15px; line-height: 1.5; color: var(--cm-muted); }
.ph-pinrow { display: flex; gap: 10px; justify-content: center; margin-bottom: var(--s2); }
.ph-pinrow input { width: 52px; height: 60px; text-align: center; font: 700 24px/1 var(--cm-num); border-radius: 12px; border: 1px solid var(--cm-line); background: var(--cm-well); color: var(--cm-ink); outline: none; }
.ph-pinrow input:focus { border-color: var(--cm-accent); box-shadow: var(--cm-focus); }
.ph-err { min-height: 20px; margin: 0; font: 600 13px/1.4 var(--cm-sans); color: var(--cm-burnout); }
.ph-shake { animation: phShake .4s; }
@keyframes phShake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

/* ---------- team page ---------- */
.ph-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: var(--s3); padding: var(--s4) !important; overflow: hidden; }
.ph-hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--cm-gold), var(--cm-accent)); border-radius: var(--cm-r) var(--cm-r) 0 0; }
.ph-hero .ms-icon { margin: 0; width: 76px; height: 76px; }
.ph-hero h2 { font-size: clamp(26px, 3vw, 34px) !important; }
.ph-hero p { margin: 6px 0 0; font: 400 16px/1.5 var(--cm-sans); color: var(--cm-muted); max-width: 52ch; }
.ph-cta { height: 56px !important; padding: 0 30px !important; font-size: 17px !important; text-decoration: none; letter-spacing: .01em; }
.ph-cta svg { width: 20px; height: 20px; }
.ph-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.ph-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--cm-r-sm); background: var(--cm-well); border: 1px solid var(--cm-line); }
.ph-ava { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font: 600 15px/1 var(--cm-num); color: var(--cm-accent); background: var(--cm-card-solid); border: 2px solid var(--cm-gold); }
.ph-person b { display: block; font: 600 15px/1.25 var(--cm-sans); color: var(--cm-ink); }
.ph-person small { display: block; margin-top: 2px; font: 500 12px/1.3 var(--cm-sans); color: var(--cm-soft); }

/* ---------- schedule toolbar ---------- */
.ph-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: var(--s3); }
.ph-range { margin: 0; font-family: var(--cm-head) !important; font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); color: var(--cm-ink); }
.ph-nav, .ph-seg { display: inline-flex; align-items: center; gap: 6px; }
.ph-seg { padding: 4px; border-radius: 999px; background: var(--cm-well); border: 1px solid var(--cm-line); }
.ph-seg button { appearance: none; border: 0; cursor: pointer; height: 32px; padding: 0 16px; border-radius: 999px; background: transparent; color: var(--cm-muted); font: 700 13px/1 var(--cm-sans); }
.ph-seg button.is-on { color: #fff; background: linear-gradient(135deg, var(--cm-accent), var(--cm-accent-2)); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-seg button.is-on { color: #1a0533; background: linear-gradient(135deg, #f0abfc, #e879f9 40%, #c026d3); }
.ph-icon-btn { width: 36px; padding: 0 !important; }
.ph-icon-btn svg { width: 16px; height: 16px; }
.ph-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 var(--s2); font: 500 14px/1.4 var(--cm-sans); color: var(--cm-muted); }
.ph-empty { margin: 0 0 var(--s2); padding: 12px 16px; border-radius: var(--cm-r-sm); border: 1px dashed var(--cm-line); background: var(--cm-well); font: 500 14px/1.5 var(--cm-sans); color: var(--cm-muted); }

/* ---------- week grid (desktop) ---------- */
.ph-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ph-week { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-family: var(--cm-sans); color: var(--cm-ink); }
.ph-week th, .ph-week td { border-bottom: 1px solid var(--cm-line-2); }
.ph-week thead th { padding: 0 6px 12px; text-align: center; vertical-align: bottom; font: 700 11px/1.2 var(--cm-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cm-gold); border-bottom: 1px solid var(--cm-line); }
.ph-week thead th span { display: block; margin-top: 4px; font: 600 18px/1 var(--cm-num); letter-spacing: 0; color: var(--cm-ink); }
.ph-week thead th.is-today span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--cm-accent); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-week thead th.is-today span { color: #1a0533; background: #e879f9; }
.ph-week th.ph-n { width: 190px; text-align: left; padding-left: 4px; }
.ph-week th.ph-tot { width: 74px; text-align: right; }
.ph-week tbody th { padding: 10px 8px 10px 4px; text-align: left; font: 600 15px/1.25 var(--cm-sans); }
.ph-week tbody td { padding: 6px 4px; height: 64px; vertical-align: middle; }
.ph-week td.ph-totc { text-align: right; font: 600 15px/1 var(--cm-num); color: var(--cm-muted); font-variant-numeric: tabular-nums; }
.ph-week td.is-today { background: var(--cm-well); }
.ph-cell { width: 100%; min-height: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 6px 4px; border-radius: var(--cm-r-sm); border: 1px solid transparent; background: transparent; color: var(--cm-ink); font: 600 13px/1.2 var(--cm-num); font-variant-numeric: tabular-nums; text-align: center; }
button.ph-cell { appearance: none; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
button.ph-cell:hover { border-color: var(--cm-accent); background: var(--cm-well); }
.ph-cell.is-empty { color: var(--cm-none); font-weight: 500; }
.ph-cell.is-empty .ph-add { font: 700 12px/1 var(--cm-sans); color: var(--cm-soft); opacity: .75; }
.ph-cell.is-work { background: linear-gradient(180deg, rgba(226,182,92,.16), rgba(226,182,92,.08)); border-color: rgba(226,182,92,.42); }
.ph-cell.is-off { color: var(--cm-muted); background: var(--cm-well); border-color: var(--cm-line); font: 700 12px/1 var(--cm-sans); letter-spacing: .12em; text-transform: uppercase; }
.ph-cell .ph-nt { font: 500 11px/1.2 var(--cm-sans); color: var(--cm-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-cell sup { font-size: 9px; color: var(--cm-gold); }

/* ---------- day list (phone) ---------- */
.ph-days { display: none; }
.ph-day { padding: 14px 0; border-bottom: 1px solid var(--cm-line-2); }
.ph-day h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--cm-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cm-gold); }
.ph-day.is-today h3::after { content: "Today"; padding: 3px 8px; border-radius: 999px; font-size: 10px; color: #fff; background: var(--cm-accent); }
.ph-day-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); align-items: center; gap: 10px; padding: 4px 0; }
.ph-day-row b { font: 600 15px/1.25 var(--cm-sans); color: var(--cm-ink); }
.ph-day-row .ph-cell { min-height: 40px; align-items: flex-end; text-align: right; }

/* ---------- month glance ---------- */
.ph-month { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.ph-month .ph-dow { padding: 0 0 6px; text-align: center; font: 700 11px/1 var(--cm-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cm-gold); }
.ph-mday { appearance: none; cursor: pointer; min-height: 92px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px 9px; border-radius: var(--cm-r-sm); border: 1px solid var(--cm-line-2); background: var(--cm-well); color: var(--cm-ink); text-align: left; font-family: var(--cm-sans); transition: border-color .2s, box-shadow .2s; }
.ph-mday:hover { border-color: var(--cm-accent); }
.ph-mday.is-out { opacity: .4; }
.ph-mday.is-today { border-color: var(--cm-accent); box-shadow: 0 0 0 1px var(--cm-accent) inset; }
.ph-mday .d { font: 600 15px/1 var(--cm-num); }
.ph-mday .w { font: 600 12px/1.3 var(--cm-sans); color: var(--cm-ink); }
.ph-mday .o { font: 500 12px/1.3 var(--cm-sans); color: var(--cm-soft); }
.ph-ini { display: flex; flex-wrap: wrap; gap: 3px; }
.ph-ini i { font: 700 10px/1 var(--cm-num); font-style: normal; padding: 3px 5px; border-radius: 6px; background: rgba(226,182,92,.22); color: var(--cm-ink); }

/* ---------- dialogs ---------- */
dialog.ph-dlg { width: min(460px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--cm-line); border-radius: var(--cm-r); background: var(--cm-card-solid); color: var(--cm-ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.55); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) dialog.ph-dlg { background: #1d0f38; }
dialog.ph-dlg::backdrop { background: rgba(10,6,20,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ph-dlg form { padding: var(--s3); display: grid; gap: var(--s2); }
.ph-dlg h3 { margin: 0; font-family: var(--cm-head); font-weight: 400; font-size: 24px; }
.ph-dlg .ph-k { margin: 0; font: 700 11px/1 var(--cm-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cm-gold); }
.ph-dlg p { margin: 0; font: 400 14px/1.5 var(--cm-sans); color: var(--cm-muted); }
.ph-dlg label { font: 600 13px/1.2 var(--cm-sans); color: var(--cm-muted); }
.ph-dlg input[type=time], .ph-dlg input[type=text], .ph-dlg input[type=password] { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--cm-line); background: var(--cm-well); color: var(--cm-ink); font: 600 15px/1 var(--cm-num); color-scheme: light; }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-dlg input { color-scheme: dark; }
.ph-dlg input:focus { outline: none; border-color: var(--cm-accent); box-shadow: var(--cm-focus); }
.ph-blk { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: end; gap: 8px; }
.ph-blk .to { padding-bottom: 12px; color: var(--cm-soft); font: 600 13px/1 var(--cm-sans); }
.ph-blk .ph-x { height: 42px; width: 42px; padding: 0; }
.ph-acts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.ph-acts > div { display: flex; gap: 8px; }
.ph-hide { display: none !important; }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .ph-hero { grid-template-columns: 1fr; text-align: center; padding: var(--s3) var(--s2) !important; }
  .ph-hero .ms-icon { margin: 0 auto; }
  .ph-hero p { margin-left: auto; margin-right: auto; }
  .ph-cta { width: 100%; }
  .ph-team-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ph-person { flex-direction: column; text-align: center; }
  .ph-scroll { display: none; }
  .ph-days { display: block; }
  .ph-bar { flex-direction: column; align-items: stretch; }
  .ph-nav { justify-content: space-between; }
  .ph-seg { align-self: flex-start; }
  .ph-month { gap: 3px; }
  .ph-mday { min-height: 58px; padding: 5px; }
  .ph-mday .w, .ph-mday .o { display: none; }
  .ph-ini i { font-size: 9px; padding: 2px 3px; }
  body.ph-page .cm-card { padding: var(--s2); }
}

/* ---------- v2: compact shifts, time off, legend, 5-week stack ---------- */
.ph-cell .ph-t { white-space: nowrap; font: 600 13px/1.15 var(--cm-num); }
.ph-cell .ph-h { font: 500 11px/1 var(--cm-num); color: var(--cm-soft); }
.ph-cell.is-empty span { font: 500 12px/1 var(--cm-sans); color: var(--cm-none); }
.ph-cell.is-off { color: var(--cm-soft); background: transparent; border: 1px dashed var(--cm-line); font-weight: 600; }
.ph-cell.is-timeoff {
  color: var(--cm-accent); border-color: var(--cm-accent); font: 700 12px/1 var(--cm-sans); letter-spacing: .1em; text-transform: uppercase;
  background: repeating-linear-gradient(135deg, var(--cm-c1-soft) 0 2px, transparent 2px 9px), var(--cm-card-solid);
}
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-cell.is-timeoff { color: #f5d0fe; background: repeating-linear-gradient(135deg, rgba(232,121,249,.30) 0 2px, transparent 2px 9px), rgba(26,14,52,.9); }
.ph-cell.is-changed { box-shadow: inset 3px 0 0 var(--cm-accent); }
.ph-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 var(--s2); font: 500 13px/1 var(--cm-sans); color: var(--cm-muted); }
.ph-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ph-legend i { width: 18px; height: 12px; border-radius: 4px; border: 1px solid transparent; }
.ph-legend .lg-work { background: rgba(226,182,92,.22); border-color: rgba(226,182,92,.5); }
.ph-legend .lg-off { border: 1px dashed var(--cm-line); border-color: var(--cm-soft); }
.ph-legend .lg-to { border-color: var(--cm-accent); background: repeating-linear-gradient(135deg, var(--cm-c1-soft) 0 2px, transparent 2px 5px); }
.ph-legend .lg-ns { background: var(--cm-well); border: 1px solid var(--cm-line); }
.ph-legend .lg-chg { background: rgba(226,182,92,.22); box-shadow: inset 3px 0 0 var(--cm-accent); }
.ph-wk + .ph-wk { margin-top: var(--s3); }
.ph-wcap { caption-side: top; text-align: left; padding: 0 0 10px 4px; margin: 0; font: 700 12px/1 var(--cm-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-ink); }
.ph-week tbody td { height: 58px; }
.ph-mday .ph-to { color: var(--cm-accent); font-weight: 700; }
.ph-dlg #phEdReg { font-weight: 600; color: var(--cm-ink); }
@media (max-width: 720px) {
  .ph-days .ph-wcap { padding: var(--s2) 0 0; color: var(--cm-gold); }
  .ph-day-row .ph-cell { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; }
  .ph-legend { gap: 8px 12px; font-size: 12px; }
}

/* ---------- v3: available shifts (PREVIEW Oct 27 2026) ---------- */
body.ph-page { --ph-av: #34d399; --ph-av-ink: #d1fae5; --ph-av-soft: rgba(52,211,153,.14); --ph-av-line: rgba(52,211,153,.55); --ph-rq: #fbbf24; --ph-rq-soft: rgba(251,191,36,.14); }
html[data-theme="maroon"] body.ph-page { --ph-av: #1E7A55; --ph-av-ink: #14563C; --ph-av-soft: rgba(30,122,85,.09); --ph-av-line: rgba(30,122,85,.55); --ph-rq: #A36A12; --ph-rq-soft: rgba(180,138,60,.14); }
html[data-theme="enterprise"] body.ph-page { --ph-av: #0E7C66; --ph-av-ink: #0A5A4A; --ph-av-soft: rgba(14,124,102,.08); --ph-av-line: rgba(14,124,102,.5); --ph-rq: #9A6A12; --ph-rq-soft: rgba(200,144,46,.14); }

/* panel */
.ph-av { position: relative; overflow: hidden; }
.ph-av::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--ph-av), var(--cm-gold)); }
.ph-av-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: var(--s2); }
.ph-av-head h2 { margin: 0; font-family: var(--cm-head) !important; font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); color: var(--cm-ink); }
.ph-av-count { margin: 6px 0 0; font: 700 15px/1.3 var(--cm-sans); color: var(--ph-av-ink); }
.ph-av-hint { margin: 4px 0 0; font: 400 14px/1.45 var(--cm-sans); color: var(--cm-muted); max-width: 62ch; }
.ph-av-filter { display: grid; gap: 6px; font: 700 11px/1 var(--cm-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-gold); }
.ph-av-filter select, .ph-dlg select { height: 40px; min-width: 200px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--cm-line); background: var(--cm-well); color: var(--cm-ink); font: 600 14px/1 var(--cm-sans); letter-spacing: 0; text-transform: none; }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-av-filter select, html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-dlg select { color-scheme: dark; background: rgba(26,14,52,.9); }
.ph-dlg select { width: 100%; margin-top: 6px; }
.ph-av-list { display: grid; gap: 8px; }
.ph-av-row { display: grid; grid-template-columns: 76px minmax(0,1.3fr) minmax(0,1.1fr) auto; align-items: center; gap: 8px 16px; padding: 12px 14px; border-radius: var(--cm-r-sm); border: 1px solid var(--cm-line); background: var(--cm-well); }
.ph-av-row.is-available { border: 1px dashed var(--ph-av-line); background: var(--ph-av-soft); }
.ph-av-row.is-requested { border-color: color-mix(in srgb, var(--ph-rq) 45%, transparent); background: var(--ph-rq-soft); }
.ph-av-row.is-mine { box-shadow: inset 3px 0 0 var(--cm-gold); }
.ph-av-d { display: grid; gap: 2px; font: 600 14px/1.1 var(--cm-num); color: var(--cm-muted); }
.ph-av-d b { font: 700 11px/1 var(--cm-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-gold); }
.ph-av-i { display: grid; gap: 3px; min-width: 0; }
.ph-av-i b { font: 600 16px/1.2 var(--cm-num); color: var(--cm-ink); font-variant-numeric: tabular-nums; }
.ph-av-i em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--cm-soft); margin-left: 4px; }
.ph-av-i small { font: 500 13px/1.3 var(--cm-sans); color: var(--cm-muted); }
.ph-av-s { display: grid; gap: 4px; justify-items: start; }
.ph-av-when { font: 500 12px/1.3 var(--cm-sans); color: var(--cm-soft); }
.ph-av-a { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ph-av-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 12px/1.1 var(--cm-sans); white-space: nowrap; border: 1px solid var(--cm-line); color: var(--cm-muted); }
.ph-av-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ph-av-pill.is-available { color: var(--ph-av-ink); border-color: var(--ph-av-line); background: var(--ph-av-soft); }
.ph-av-pill.is-available::before { background: var(--ph-av); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ph-av) 25%, transparent); }
.ph-av-pill.is-requested { color: var(--ph-rq); border-color: color-mix(in srgb, var(--ph-rq) 50%, transparent); background: var(--ph-rq-soft); }
.ph-av-pill.is-covered { color: var(--cm-ink); background: var(--cm-well); }
.ph-av-pill.is-covered::before { content: "✓"; width: auto; height: auto; background: none; color: var(--ph-av); font-size: 12px; }
.ph-av-warn { grid-column: 1 / -1; margin: 0; font: 600 13px/1.4 var(--cm-sans); color: var(--ph-rq); }
.ph-av-warn:empty { display: none; }
.ph-av-empty { margin: 0; padding: 18px 16px; border-radius: var(--cm-r-sm); border: 1px dashed var(--cm-line); background: var(--cm-well); text-align: center; font: 500 15px/1.5 var(--cm-sans); color: var(--cm-muted); }
.ph-req { white-space: nowrap; }

/* team page mini list */
.ph-av-team .ph-av-head { margin-bottom: 12px; }
.ph-av-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-av-mini li { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--cm-r-sm); border: 1px dashed var(--ph-av-line); background: var(--ph-av-soft); }

/* calendar cells */
.ph-cell.is-slot { appearance: none; cursor: pointer; gap: 2px; border: 1.5px dashed var(--ph-av-line); background: var(--ph-av-soft); color: var(--ph-av-ink); transition: transform .15s, box-shadow .2s; }
.ph-cell.is-slot:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ph-av) 22%, transparent); transform: translateY(-1px); }
.ph-cell.is-slot .ph-sl { font: 700 11px/1.1 var(--cm-sans); letter-spacing: .02em; }
.ph-cell.is-slot .ph-t { font-size: 12px; }
.ph-cell .ph-to-mini { font: 600 9px/1 var(--cm-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-accent); opacity: .85; }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-cell .ph-to-mini { color: #f5d0fe; }
.ph-cell.is-slot.is-requested { border-color: color-mix(in srgb, var(--ph-rq) 60%, transparent); background: var(--ph-rq-soft); color: var(--ph-rq); }
.ph-cell.is-slot.is-covered { border-style: solid; border-color: var(--cm-accent); color: var(--cm-ink); background: repeating-linear-gradient(135deg, var(--cm-c1-soft) 0 2px, transparent 2px 9px), var(--cm-card-solid); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-cell.is-slot.is-covered { background: repeating-linear-gradient(135deg, rgba(232,121,249,.22) 0 2px, transparent 2px 9px), rgba(26,14,52,.9); }
.ph-cell.is-cover { box-shadow: inset 3px 0 0 var(--ph-av); border-color: var(--ph-av-line); }
.ph-cell .ph-cv { font: 700 10.5px/1.15 var(--cm-sans); color: var(--ph-av-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-legend .lg-av { border: 1.5px dashed var(--ph-av-line); background: var(--ph-av-soft); }
.ph-legend .lg-cv { background: rgba(226,182,92,.22); box-shadow: inset 3px 0 0 var(--ph-av); }
.ph-mday .ph-av-m { color: var(--ph-av-ink); font-weight: 700; }

/* dialog + toast */
.ph-sh-info { font: 500 15px/1.5 var(--cm-sans) !important; color: var(--cm-ink) !important; }
.ph-sh-info b { font-family: var(--cm-num); }
#phShActs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ph-sh-hist:empty { display: none; }
.ph-sh-hist ul { margin: 6px 0 0; padding: 0 0 0 16px; font: 400 13px/1.5 var(--cm-sans); color: var(--cm-muted); }
.ph-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; font: 600 14px/1.4 var(--cm-sans); color: var(--cm-ink); background: var(--cm-card-solid); border: 1px solid var(--ph-av-line); box-shadow: 0 18px 40px -14px rgba(0,0,0,.5); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-toast { background: #1d0f38; }

@media (max-width: 720px) {
  .ph-av-head { align-items: stretch; }
  .ph-av-filter, .ph-av-filter select { width: 100%; }
  .ph-av-row { grid-template-columns: 64px minmax(0,1fr); gap: 8px 12px; }
  .ph-av-s { grid-column: 2; }
  .ph-av-a { grid-column: 1 / -1; justify-content: stretch; }
  .ph-av-a .cm-btn { flex: 1 1 0; height: 42px; }
  .ph-av-mini li { grid-template-columns: 60px minmax(0,1fr); }
  .ph-av-mini li .ph-av-pill { grid-column: 2; justify-self: start; }
  .ph-day-row .ph-cell.is-slot { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------- v3: interpreter self-service (PREVIEW Oct 27 2026) ---------- */
.ph-pill.is-me i { background: var(--ph-av); }
.ph-me { margin: 0 0 var(--s2); padding: 14px 16px; border-radius: var(--cm-r-sm); border: 1px solid var(--cm-line); background: var(--cm-well); }
.ph-me-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ph-me-row > div { display: grid; gap: 3px; flex: 1 1 220px; }
.ph-me-row b { font: 700 16px/1.25 var(--cm-sans); color: var(--cm-ink); }
.ph-me-row small { font: 400 14px/1.4 var(--cm-sans); color: var(--cm-muted); }
.ph-me-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--cm-sans); color: #fff; background: linear-gradient(135deg, var(--ph-av), var(--cm-accent)); flex: none; }
.ph-me select { height: 44px; min-width: 210px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--cm-line); background: var(--cm-card-solid); color: var(--cm-ink); font: 600 15px/1 var(--cm-sans); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-me select { color-scheme: dark; background: rgba(26,14,52,.9); }
.ph-me .cm-btn { height: 44px; }
.ph-link { appearance: none; border: 0; background: none; padding: 6px 2px; font: 600 14px/1 var(--cm-sans); color: var(--cm-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-link { color: #f0abfc; }
.ph-me-trust { margin: 10px 0 0; font: 400 12.5px/1.45 var(--cm-sans); color: var(--cm-soft); }
.ph-week tr.is-me th[scope=row], .ph-day-row.is-me b { color: var(--cm-ink); }
.ph-week tr.is-me > * { background: color-mix(in srgb, var(--ph-av) 7%, transparent); }
.ph-you { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; font: 700 10px/1.2 var(--cm-sans); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--ph-av); vertical-align: 1px; }
.ph-cell[data-ph-self] { appearance: none; cursor: pointer; font: inherit; outline: 1.5px solid color-mix(in srgb, var(--ph-av) 55%, transparent); outline-offset: -1.5px; transition: transform .15s, box-shadow .2s; }
.ph-cell[data-ph-self]:hover, .ph-cell[data-ph-self]:focus-visible { transform: translateY(-1px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ph-av) 25%, transparent); }
.ph-cell .ph-by { font: 600 9.5px/1.15 var(--cm-sans); color: var(--cm-gold); letter-spacing: .02em; }

.ph-se-now { font: 500 15px/1.5 var(--cm-sans) !important; color: var(--cm-ink) !important; }
.ph-se-now small { color: var(--cm-gold); font-weight: 600; font-size: 12.5px; }
.ph-se-choices { display: grid; gap: 8px; }
.ph-se-c { appearance: none; display: grid; gap: 3px; text-align: left; padding: 14px 16px; min-height: 56px; border-radius: 12px; border: 1.5px solid var(--cm-line); background: var(--cm-well); color: var(--cm-ink); cursor: pointer; font-family: var(--cm-sans); }
.ph-se-c b { font-size: 16px; font-weight: 700; }
.ph-se-c small { font-size: 13px; color: var(--cm-muted); }
.ph-se-c[aria-pressed="true"] { border-color: var(--ph-av); background: var(--ph-av-soft); box-shadow: inset 4px 0 0 var(--ph-av); }
.ph-se-hours { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ph-se-hours label { display: grid; gap: 6px; }
.ph-se-hours select { height: 48px; font-size: 16px; margin: 0; }
.ph-se-len { grid-column: 1 / -1; font: 700 14px/1.3 var(--cm-num) !important; color: var(--ph-av-ink) !important; }
.ph-se-msg { padding: 12px 14px; border-radius: 10px; background: var(--ph-av-soft); color: var(--cm-ink) !important; }
.ph-dlg .ph-acts .cm-btn[type=submit] { min-width: 120px; }
.ph-se-foot { font-size: 12.5px !important; color: var(--cm-soft) !important; }
.ph-changes h2 { margin: 0; font-family: var(--cm-head) !important; font-weight: 400; font-size: clamp(20px, 2.2vw, 26px); color: var(--cm-ink); }
.ph-changes .ph-av-list { margin-top: var(--s2); }
.ph-ch-row { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; align-items: center; gap: 8px 16px; padding: 10px 14px; border-radius: var(--cm-r-sm); border: 1px solid var(--cm-line); background: var(--cm-well); }
.ph-ch-row.is-undone { opacity: .6; }
.ph-ch-st { font: 600 12.5px/1.3 var(--cm-sans); color: var(--cm-soft); }
@media (max-width: 720px) {
  .ph-me select, .ph-me .cm-btn { width: 100%; }
  .ph-ch-row { grid-template-columns: 60px minmax(0,1fr); }
  .ph-ch-row .ph-av-a { grid-column: 1 / -1; }
  dialog.ph-self { box-sizing: border-box; width: 100%; max-width: 100%; border-left: 0; border-right: 0; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .ph-dlg .ph-acts .cm-btn { flex: 1 1 0; height: 48px; }
}

/* self editor: never wider than the sheet */
dialog.ph-self, dialog.ph-self * { box-sizing: border-box; }
dialog.ph-self form, .ph-se-choices, .ph-se-c, .ph-se-hours select { min-width: 0; max-width: 100%; }

/* toast clears the floating theme button */
.ph-toast { bottom: 76px; }

/* exact hours ("8 h 15 min") never wrap mid-value */
.ph-cell .ph-h, .ph-week td.ph-totc, .ph-av-i em, .ph-se-len { white-space: nowrap; }
.ph-week td.ph-totc { font-size: 14px; }
/* self editor: note that the manager set this day */
.ph-se-mgr { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--cm-line); border-left: 3px solid var(--cm-gold); background: var(--cm-well); font: 500 13.5px/1.45 var(--cm-sans); color: var(--cm-muted); }
/* recent changes: old -> new on its own line */
.ph-ch-what { font: 600 14px/1.35 var(--cm-num); color: var(--cm-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* General "Edit schedule" sign-in (PREVIEW Oct 27 2026) */
.ph-pill.is-edit { color: var(--cm-accent); border-color: color-mix(in srgb, var(--cm-accent) 40%, var(--cm-line)); background: color-mix(in srgb, var(--cm-accent) 9%, var(--cm-well)); }
.ph-pill.is-edit i { background: var(--cm-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cm-accent) 22%, transparent); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-pill.is-edit { color: #f0abfc; border-color: rgba(240,171,252,.35); background: rgba(240,171,252,.08); }
html:not([data-theme="maroon"]):not([data-theme="enterprise"]) .ph-pill.is-edit i { background: #f0abfc; box-shadow: 0 0 0 3px rgba(240,171,252,.18); }
#phMode #phWhoSwitch { padding: 4px 2px; font-size: 13px; }
.ph-who-l { display: grid; gap: 0; }
.ph-blk select { min-width: 0; width: 100%; font-family: var(--cm-num); }
.ph-week th.ph-tot { width: 96px; }
.ph-week td.ph-totc { white-space: nowrap; }
#phMode #phWhoSwitch { margin: 0 8px 0 -2px; }
/* Oct 27 2026 (all-campus schedules): on phones the Week / 5 weeks / Month + arrows row was 16px wider than the
   screen (the Next arrow got clipped). Tighten it so the whole row fits on 360–430px phones. */
@media (max-width: 430px) {
  /* phone: view switch on its own row, prev / This week / next below — no wrapped labels, no clipped arrow */
  .ph-nav { flex-wrap: wrap; row-gap: 8px; gap: 6px; width: 100%; }
  .ph-seg { flex: 1 0 100%; display: flex; gap: 2px; padding: 4px; }
  .ph-seg button { flex: 1; padding: 0 10px; white-space: nowrap; }
  .ph-nav > .cm-btn { white-space: nowrap; }
  .ph-nav > #phToday { flex: 1; }
}
