/* Trapier Ticketing — shared theme.
   Red, white, blue, purple, gold. Navy as the ground, gold for emphasis. */

:root{
  --navy:#132456;   --navy-d:#0b1637;  --navy-l:#1e3576;
  --red:#b3202e;    --red-d:#8c1824;
  --purple:#5b2a86; --purple-l:#7a44ab;
  --gold:#d4a02c;   --gold-l:#f0c75e;  --gold-d:#a97c17;
  --cream:#fbf9f4;  --paper:#ffffff;
  --ink:#16192145;  /* overridden below - kept for safety */
  --ink:#191c24;    --muted:#5f6675;   --line:#e2e0d8;
  --ok:#1a7f37;     --warn:#b45309;
  --shadow:0 1px 2px rgba(11,22,55,.07), 0 6px 20px rgba(11,22,55,.08);
  --radius:12px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--cream); color:var(--ink);
  font:16px/1.55 "Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{margin:0 0 .4em; line-height:1.2; font-weight:700; letter-spacing:-.01em}
h1{font-size:30px} h2{font-size:21px} h3{font-size:16px}
a{color:var(--navy-l)}
.wrap{max-width:960px;margin:0 auto;padding:0 20px}
.wide{max-width:1180px}

/* ---------- masthead ------------------------------------------------- */
.masthead{
  /* Navy from the left, easing into purple only at the right-hand end — the
     title sits on the left, so it keeps a flat navy ground to read against. */
  background:linear-gradient(90deg,
    var(--navy-d) 0%,
    var(--navy) 45%,
    var(--purple) 100%);
  color:#fff; border-bottom:4px solid var(--gold); position:relative;
}
/* The edge under the banner is a single gold band; the four-colour version it
   replaced competed with the banner above it. */
.masthead::after{
  content:""; position:absolute; left:0; right:0; bottom:-4px; height:4px;
  background:var(--gold);
}
.mast-in{display:flex;align-items:center;gap:16px;padding:16px 0;flex-wrap:wrap}
.crest{
  width:46px;height:46px;border-radius:50%;flex:none;
  background:radial-gradient(circle at 32% 28%,var(--gold-l),var(--gold) 62%,var(--gold-d));
  display:grid;place-items:center;color:var(--navy-d);font-weight:800;font-size:17px;
  box-shadow:0 0 0 3px rgba(255,255,255,.18);
}
/* The banner is a link back to the page's own start — clicking it reloads and
   returns to the top. It must not look or behave like body text. */
.mast-name{padding-left:10px;text-decoration:none;color:inherit;display:block;border-radius:6px}
a.mast-name:hover .mast-title{color:var(--gold-l)}
a.mast-name:focus-visible{outline:2px solid var(--gold-l);outline-offset:3px}

/* A thin red line directly under the purple notice bar at the top of the page. */
.mast-rule{height:3px;background:var(--red)}
.mast-title{font-size:20px;font-weight:700;letter-spacing:.01em}
.mast-sub{font-size:12.5px;opacity:.78;letter-spacing:.04em;text-transform:uppercase}
.mast-nav{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.mast-nav a{
  color:#fff;text-decoration:none;font-size:13px;padding:6px 13px;border-radius:999px;
  border:1px solid rgba(255,255,255,.28);
}
.mast-nav a:hover{background:rgba(255,255,255,.13)}
.mast-nav a.on{background:var(--gold);color:var(--navy-d);border-color:var(--gold);font-weight:650}

/* ---------- layout ---------------------------------------------------- */
main{padding:26px 0 70px}
.card{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;box-shadow:var(--shadow);margin-bottom:18px;
}
.card.tight{padding:14px 16px}

/* Admin > Groups stacks one of these per performance date above the roster
   table, so every pixel of chrome here is a pixel of scrolling before the table
   shows up. About half the height of a standard card: a tighter header, no
   double gap between the header and the buttons, and none at all below them. */
.card.card-slim{padding:12px 14px;margin-bottom:8px}
.card.card-slim .card-hd{margin:-12px -14px 8px;padding:6px 14px}
.card.card-slim .card-hd h2{font-size:13.5px}
.card.card-slim .tabs{margin-bottom:0}
/* Between the full-size tab and the half-size .tabs-mini used for the long
   unscheduled list: short enough to halve the block, still a comfortable
   target. A list is never given both classes -- mini would lose, being the
   earlier rule of equal weight. */
.tabs-slim .tab{padding:3px 9px;font-size:12px;border-radius:6px}
.tabs-slim .tab .muted{font-size:10.5px}
.card-hd{
  display:flex;align-items:center;gap:10px;margin:-20px -20px 16px;padding:12px 20px;
  border-bottom:1px solid var(--line);border-radius:var(--radius) var(--radius) 0 0;
  background:linear-gradient(180deg,#fff,#faf8f2);
}
.card-hd h2{margin:0;font-size:16px}
.card-hd .badge{margin-left:auto}
.row{display:flex;gap:14px;flex-wrap:wrap}
.row>*{flex:1;min-width:180px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:640px){.grid2{grid-template-columns:1fr}}
.muted{color:var(--muted)}
.small{font-size:13px}
.tiny{font-size:11.5px}
.center{text-align:center}
.right{text-align:right}
hr{border:0;border-top:1px solid var(--line);margin:18px 0}

/* ---------- hero ------------------------------------------------------ */
.hero{display:flex;gap:22px;flex-wrap:wrap;align-items:flex-start}
.poster{
  /* 147px is 210px less 30%, asked for 2026-09-19: the poster was taking most
     of a phone screen before any of the booking steps came into view. */
  width:147px;flex:none;aspect-ratio:2/3;border-radius:10px;overflow:hidden;
  background:linear-gradient(155deg,var(--navy),var(--purple));
  display:grid;place-items:center;color:#fff;text-align:center;padding:14px;
  border:3px solid var(--gold);box-shadow:var(--shadow);
}
/* The poster is shown whole. contain is the floor: on a browser without :has()
   below, the image letterboxes inside the 2:3 box rather than being cropped. */
.poster img{width:100%;height:100%;object-fit:contain;display:block}
/* With a real image in it, the frame takes that image's shape -- so there is
   nothing to crop and no bars either, whatever was uploaded. The 2:3 box and
   the 14px of padding stay for the built-in placeholder, which has no image to
   take a shape from. */
.poster:has(img){aspect-ratio:auto;padding:0}
.poster:has(img) img{height:auto}
.poster .ph{font-size:11px;opacity:.85;line-height:1.35}
.poster .ph b{display:block;font-size:19px;letter-spacing:.06em;margin-bottom:5px;color:var(--gold-l)}
.hero-body{flex:1;min-width:260px}
/* The show's own description, under the whole hero rather than under the 147px
   poster column, where a paragraph would be a word wide. Line breaks are kept
   as typed, and the measure is capped so it stays readable on a wide screen. */
.blurb{
  margin:16px 0 0;font-size:11px;line-height:1.55;color:var(--ink);
  white-space:pre-wrap;max-width:64ch
}
.showname{font-size:30px;color:var(--navy);margin:0 0 6px}
/* The performance dates, under the show's name. These are not controls -- nothing
   happens if you press one; the date is chosen from the dropdown in step 1. As
   bordered, rounded, white-filled chips they looked exactly like the buttons
   further down the page, so they read as a row of things to click. Set as a plain
   stacked list instead, with a small purple mark keeping the accent the left
   border used to carry. */
.dates{display:flex;flex-direction:column;gap:1px;margin:10px 0 0}
.datechip{
  position:relative;padding:3px 0 3px 15px;font-size:14px;line-height:1.45;
  background:none;border:0;border-radius:0;
}
.datechip::before{
  content:"";position:absolute;left:3px;top:0.72em;
  width:5px;height:5px;border-radius:50%;background:var(--purple);
}
.datechip.muted::before{background:var(--muted)}
.sold-tag{color:var(--red);font-weight:700}
/* Join the waitlist: who the tickets are for, three across, one chosen */
.wtype-row{display:flex;gap:8px}
.wtype-row button{flex:1 1 0;min-width:0;padding:11px 6px;white-space:nowrap}
.wtype-row button.on{background:var(--navy);border-color:var(--navy);color:#fff}
@media(max-width:400px){.wtype-row button{font-size:13px;padding:11px 2px}}
.wait-link{margin-left:6px;padding:1px 9px;font:inherit;font-size:12px;line-height:1.5;color:var(--purple);
  background:none;border:1px solid var(--purple);border-radius:999px;cursor:pointer;vertical-align:1px}
.wait-link:hover{background:var(--purple);color:#fff}
/* Step 1's date dropdown and step 2's type buttons, 50% taller than the
   defaults (43px and 46.8px measured live) so they are easier to hit, with
   the text grown to match. A phone keeps the old size: there the height
   pushed the choices below the fold. */
#perfPick{padding:15px 11px;font-size:22px;font-weight:700}
#typeButtons button{min-height:70px}
.type-name{font-size:22px}
@media(max-width:640px){
  #perfPick{padding:9px 11px;font-size:16px;font-weight:400}
  #typeButtons button{min-height:0}
  .type-name{font-size:16px}
}

/* ---------- the Student ID screenshot --------------------------------- */
/* The arrow pointing at the ID is drawn into the screenshot itself, so it could
   not be made to move. Measured in both captures it sits at x 338-406, y 848-874
   of a 950px square, on plain white -- one of 230 sampled pixels around it is
   anything else. So the printed arrow is covered and an SVG one drawn over it,
   which can then be animated. The cover is a shade off pure white only because
   the JPEG is: #fefefe matches what is actually there. */
.shot{position:relative;display:block;line-height:0}
.shot img{width:100%;height:auto;display:block}
/* The drawn arrow sits in the Address card, to the right of the one printed
   into the screenshot, which is left showing. As far left as it can go: at this
   height the card starts at x 491 on the NCS capture and x 475 on the STA one,
   so x 493-573 is just inside both, and blank in each -- zero non-white pixels
   under it. Further left is the grey gutter between the two panels. */
.shot-arrow{
  position:absolute;
  left:51.9%;top:88.6%;width:8.4%;height:3.9%;
  display:flex;align-items:center;
  /* The picture is its own dismiss control -- "Click the picture to go back" --
     and this sits on top of it, right where the eye is being sent. Clicks pass
     straight through. */
  pointer-events:none;
  /* Grows from its tail, so the tip reaches further toward the ID rather than
     the whole thing swelling in place. */
  transform-origin:100% 50%;
  animation:shot-point 1.4s ease-in-out infinite;
}
.shot-arrow svg{display:block;overflow:visible}
@keyframes shot-point{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.22)}
}
/* Someone who has asked for less movement still gets the arrow, just still. */
@media(prefers-reduced-motion:reduce){
  .shot-arrow{animation:none}
}

/* ---------- controls -------------------------------------------------- */
label{display:block;font-size:12.5px;font-weight:650;color:var(--navy);margin:0 0 4px;
  letter-spacing:.02em}
input,select,textarea{
  width:100%;font:inherit;color:inherit;background:#fff;
  border:1.5px solid var(--line);border-radius:9px;padding:9px 11px;
}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:var(--navy-l);box-shadow:0 0 0 3px rgba(30,53,118,.14);
}
input[type=checkbox]{width:auto}
/* A browser's own [hidden] rule is a user-agent rule, and ANY author rule beats
   it -- so `label{display:block}` above quietly re-showed every label that
   JavaScript had set hidden. That is how the "Quantity" heading ended up
   sitting over the x column on a student row, where there is no quantity at
   all. Stated here as an author rule so `el.hidden = true` means what it says,
   whatever the element. */
[hidden]{display:none!important}
input:disabled,select:disabled{background:#f4f3ef;color:var(--muted);cursor:not-allowed}
.field{margin-bottom:13px}
.err{border-color:var(--red)!important}
.errmsg{color:var(--red);font-size:12px;margin-top:3px}

button,.btn{
  font:inherit;font-weight:650;cursor:pointer;border-radius:9px;padding:10px 18px;
  border:1.5px solid transparent;background:#eef0f4;color:var(--ink);
  transition:transform .06s ease, filter .12s ease;
}
button:active{transform:translateY(1px)}
button:disabled{opacity:.45;cursor:not-allowed}
.btn-primary{background:var(--gold);border-color:var(--gold-d);color:var(--navy-d)}
.btn-primary:hover:not(:disabled){filter:brightness(1.06)}
.btn-navy{background:var(--navy);color:#fff;border-color:var(--navy-d)}
.btn-navy:hover:not(:disabled){background:var(--navy-l)}
.btn-red{background:var(--red);color:#fff;border-color:var(--red-d)}
.btn-purple{background:var(--purple);color:#fff;border-color:#46206a}
/* The waitlist button sits beside Continue, and only appears when the night is
   sold out -- a thick red edge is what makes it read as the other way forward
   rather than a second-choice Continue. The padding gives back the 1.5px the
   wider border takes, so it still lines up with the button next to it. */
.btn-thickred{border:4px solid var(--red);padding:7.5px 15.5px}
/* A label on two lines. The tighter leading keeps the two words reading as one
   label, and the flex row they sit in stretches the button beside it to match
   the new height. */
.btn-2line{line-height:1.15;text-align:center}
/* Checkout on a free order: the heading and the line under the pay buttons
   swap looks. Element-qualified so they outrank h3 and .small/.muted. */
button.pay-big{min-height:94px}
.datebox{position:relative}
.daytag{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-weight:650;pointer-events:none}
.has-day input{padding-left:44px}
body.at-cart #showBlurb{display:none}
h3.pay-quiet{font-size:13px;font-weight:400;color:var(--muted)}
p.pay-loud{font-size:16px;font-weight:700;color:var(--ink)}
/* A ticket-type button on its own (a Cast/Crew-only show). The row shares its
   width out equally, so one button alone became a bar the width of the card
   and stopped reading as a button. It keeps the width it has as one of four
   (three 14px gaps), and a thicker edge marks it as the thing to press. The
   padding gives back the 1.5px the wider border takes. Paired with .btn-ghost
   so it outranks that rule's own border color, which comes later. */
.btn-ghost.type-solo{flex:0 1 calc((100% - 42px) / 4);border-width:3px;border-color:var(--navy);padding:8.5px 16.5px}

/* A name row on the details step, and the single header that labels them all:
   a number in a gutter, the two name boxes, a quantity, and the column the x
   sits in. Both share one template so every row lines up with the header and
   with each other -- row 1 included, which is why it leaves an empty cell where
   the others carry their x. The quantity column is dropped on a student row: a
   student ticket is one ticket, so there is nothing to choose. */
.namehd,.namerow{display:grid;gap:9px;grid-template-columns:20px 1fr 1fr 74px 46px}
.namehd.noqty,.namerow.noqty{grid-template-columns:20px 1fr 1fr 46px}
.namehd{align-items:end;margin-bottom:4px}
.namehd label{margin:0;font-size:13px}
.namerow{align-items:center;margin:0 0 9px}
.namerow .rowerr{grid-column:2/-1;margin:-2px 0 2px}
.namerow select{width:100%}
/* The row's own number, quiet: it is a position, not a value to read out. */
/* The row centres its own items, so no height is assumed here -- an input that
   grows with the font would otherwise leave the number sitting high. */
.rownum{color:var(--muted);font-size:13px;font-weight:650;text-align:right}
/* Square, quiet until pointed at: it destroys a row, so it should not look like
   the thing to press. */
/* 44x44 is the smallest a touch target should be, and this one sits a few
   pixels from a much larger Last-name box -- an easy thumb to mis-hit. */
.rowx{background:#fff;border:1.5px solid var(--line);color:var(--ink);
      padding:0;line-height:1;font-weight:700;width:100%;
      min-width:44px;min-height:44px}
.rowx:hover{border-color:var(--red);color:var(--red);background:#fdf0f0}
@media(max-width:560px){
  .namehd,.namerow{grid-template-columns:18px 1fr 1fr 62px 46px}
  .namehd.noqty,.namerow.noqty{grid-template-columns:18px 1fr 1fr 46px}
}
.btn-ghost{background:#fff;border-color:var(--line);color:var(--navy)}
.btn-ghost:hover{border-color:var(--navy-l)}
.btn-sm{padding:5px 11px;font-size:13px;border-radius:7px}
.btn-lg{padding:13px 26px;font-size:17px}
.btn-block{display:block;width:100%}
button.dimmed{opacity:.45;filter:grayscale(.55)}

/* Warning beside a student ID that is the wrong length. Sits inside the cell
   against the right edge of the input, and says why on hover or tap. */
.sid-warn{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  pointer-events:none;                  /* a marker, not a control */
  color:var(--red);font-size:15px;line-height:1;
}
input.err{border-color:var(--red);background:#fff7f7}
/* A named row whose ID has not been filled in. A steady glow rather than the
   warning triangle: nothing has been typed wrongly, it is just not done yet.
   Steady, not pulsing — a roster of twenty blinking cells would be unusable. */
input.sid-missing{
  border-color:var(--red);background:#fff7f7;
  box-shadow:0 0 0 3px rgba(179,32,46,.20)
}
input.sid-missing:focus{box-shadow:0 0 0 3px rgba(179,32,46,.30)}

/* "Change production" is the way out of a grade sheet, and a plain ghost button
   disappeared against the table below it. Heavier border and navy text, without
   promoting it to a primary action. */
.btn-out{
  background:#fff;border:2.5px solid var(--navy);color:var(--navy);font-weight:700;
}
.btn-out:hover{background:var(--navy);color:#fff;border-color:var(--navy)}
button.dimmed:hover{opacity:.75;filter:none}
.btn.selected,button.selected{
  box-shadow:0 0 0 3px var(--gold-l);border-color:var(--gold-d);
}

/* ---------- tabs ------------------------------------------------------ */
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.tabs-split{align-items:center}
/* Date tabs with their own row of actions beneath: the tabs give up most of
   their bottom margin so the two rows read as one toolbar rather than as two
   unrelated bands. */
.tabs-tight{margin-bottom:8px}
.toolrow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:16px}
.toolrow:empty{display:none}

/* Special accommodations: a date heading, then one block per request. The text
   is what somebody typed, so it keeps its own line breaks. */
.accom-day{
  margin:18px 0 8px;padding-bottom:5px;border-bottom:1.5px solid var(--line);
  font-size:14px;color:var(--navy)
}
.accom-day:first-child{margin-top:4px}
.accom{border-left:3px solid var(--line);padding:8px 0 8px 12px;margin-bottom:10px}
.accom-hd{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.accom-hd>div:first-child{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.accom-acts{display:flex;gap:6px;flex:none}
.accom-time{font-variant-numeric:tabular-nums}
.accom-body{white-space:pre-wrap;margin-top:4px;font-size:14px;line-height:1.45}
.tabgap{flex:1 1 auto;min-width:12px}
.tab{
  background:#fff;border:1.5px solid var(--line);border-radius:8px;padding:7px 14px;
  font-size:13.5px;font-weight:650;cursor:pointer;color:var(--navy);
}
.tab:hover{border-color:var(--navy-l)}

/* Half-size buttons, for the "not yet scheduled" list in admin — 18 grades and
   forms at full size pushed everything else off the screen. */
.tabs-mini{gap:4px}
.tabs-mini .tab{padding:3px 7px;font-size:11px;font-weight:600;border-radius:6px}
.tabs-mini .tab .muted{font-size:10px}
.tab.on{background:var(--navy);color:#fff;border-color:var(--navy-d)}
/* The counts in brackets are muted grey, which all but disappears once the tab
   it sits on is filled navy. Lightened against that ground rather than left to
   fade out — it is the seat count, not decoration. */
.tab.on .muted{color:#cfd6ea}
/* A group can be selected and inactive at once. Selection is the thing being
   looked for, so it keeps full strength and the faded state eases off. */
.tab.on.off{opacity:.78}
.tab.off{opacity:.42}
/* A grade that cannot be opened: not merely faded, but plainly unavailable. */
.tab.off:disabled{cursor:not-allowed;background:#f1f0ee;color:var(--muted)}
.tab.off:disabled:hover{border-color:var(--line)}
.tabrow{display:grid;grid-template-columns:repeat(9,1fr);gap:6px;margin-bottom:6px}
@media(max-width:900px){.tabrow{grid-template-columns:repeat(5,1fr)}}
@media(max-width:560px){.tabrow{grid-template-columns:repeat(3,1fr)}}
.tabrow .tab{padding:7px 4px;text-align:center;font-size:12.5px}
.tabrow-label{
  font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);
  font-weight:700;margin:0 0 4px;
}

/* ---------- which night, on the details step --------------------------- */
/* Navy, like the badge the type step uses for the same fact, so the two read as
   one thread rather than two unrelated boxes. Not a .note: those carry a gold
   left bar and mean "read this warning", and this is a statement of where you
   are. baseline alignment keeps the small label sitting on the date's line
   instead of floating above it, and it wraps to two lines on a narrow phone
   rather than squeezing the date. */
.perfline{
  display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;
  margin:0 0 14px;padding:9px 13px;font-size:15px;
  background:#e9edf7;border:1px solid #ccd6ec;border-radius:9px;color:var(--navy);
}
.perfline-lb{
  font-size:11px;text-transform:uppercase;letter-spacing:.09em;
  font-weight:700;opacity:.72;
}

/* ---------- badges / notes -------------------------------------------- */
.badge{
  display:inline-block;font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:999px;
  letter-spacing:.03em;
}
.badge-gold{background:#fdf3d8;color:var(--gold-d);border:1px solid #eedba5}
.badge-red{background:#fdecec;color:var(--red);border:1px solid #f3cccf}
.badge-navy{background:#e9edf7;color:var(--navy);border:1px solid #ccd6ec}
.badge-purple{background:#f2e9fa;color:var(--purple);border:1px solid #ddc9ee}
.badge-green{background:#e6f5eb;color:var(--ok);border:1px solid #c2e3cd}

.note{
  border-left:4px solid var(--gold);background:#fdf9ef;padding:11px 15px;border-radius:0 9px 9px 0;
  font-size:13.5px;margin:14px 0;
}
.note-red{border-left-color:var(--red);background:#fdf0f0}
.note-purple{border-left-color:var(--purple);background:#f7f2fb}

/* ---------- tables ---------------------------------------------------- */
/* A table wider than its box scrolls sideways, which works and is invisible --
   on a phone the Name column just looked cut off. The fade on the right edge
   is the hint that there is more to swipe to; it is painted only while the
   box is actually scrollable, because it is attached to the scrolling
   container's own background. */
.tablewrap{
  overflow-x:auto;border:1px solid var(--line);border-radius:10px;background:#fff;
  background-image:linear-gradient(to right,rgba(0,0,0,0),rgba(0,0,0,.055));
  background-size:26px 100%;
  background-position:right center;
  background-repeat:no-repeat;
  background-attachment:local,scroll;
}
table{border-collapse:collapse;width:100%;font-size:14px}
th{
  background:var(--navy);color:#fff;text-align:left;padding:9px 11px;font-size:12px;
  text-transform:uppercase;letter-spacing:.05em;font-weight:700;white-space:nowrap;
}
/* One header carrying a long word in a column sized for a checkbox. Smaller,
   untracked and tighter against its edges, which together keep "CHAPERONE"
   inside the 74px the shorter "ADULT" used -- the alternative was a column
   half again as wide for a tick box. */
th.chap{font-size:9.5px;letter-spacing:0;padding-left:5px;padding-right:5px}
td{padding:6px 9px;border-bottom:1px solid var(--line);vertical-align:middle}

/* The two schools are told apart by colour on the group sheet: NCS purple,
   STA the house navy. Set on the card, so the header, the row banding and the
   hover all follow from one switch. */
.school-ncs th{background:var(--purple)}
.school-ncs tbody tr:nth-child(even){background:#faf7fd}
.school-ncs tbody tr:hover{background:#f3ecfa}
tbody tr:nth-child(even){background:#fbfaf7}
/* The box office table shades a whole booking rather than every other row, so it
   sets its own bands and must not also be striped by position -- a party of three
   would otherwise be cut into light, dark, light. */
/* One colour per reservation, so the lines of a party read as one block. The
   first pair of tones were #fff against #fbfaf7 -- a contrast of 1.04:1, which
   measured as a band and looked like nothing at all, least of all in a dim
   lobby. Deepened to about 1.12:1: still quiet on a white page, but now an
   actual stripe you can follow across the row. */
tbody tr.band,tbody tr.band-alt{background:#fff}
tbody tr.band-alt{background:#f1efe8}
.school-ncs tbody tr.band-alt{background:#eee9f6}
tbody tr:hover{background:#f4f6fb}
/* Figures read better lined up under their headings than ragged against the
   left edge. The first column stays left — it is a label, not a number. */
.t-centre th, .t-centre td{text-align:center}
.t-centre th:first-child, .t-centre td:first-child{text-align:left}
.t-centre td input{margin:0 auto;text-align:center}
.t-centre td.cost{text-align:center}

/* A column heading you can sort by. The arrow only appears on the column
   actually in use, so the header row stays quiet. */
th.sortable{cursor:pointer;user-select:none}
th.sortable:hover{background:var(--navy-l)}
/* Real characters, not a CSS escape: the escape was mangled on the way into
   this file and showed as stray text in the header. */
th.sortable[data-dir]::after{content:" ▲";font-size:9px}
th.sortable[data-dir="desc"]::after{content:" ▼";font-size:9px}

td input{padding:6px 8px;border-radius:6px;border-width:1px}
td input.interin{max-width:104px;text-align:right;font-variant-numeric:tabular-nums;
  -moz-appearance:textfield;appearance:textfield}
td input.interin::-webkit-outer-spin-button,
td input.interin::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
td.num{width:44px;text-align:center;color:var(--muted);font-variant-numeric:tabular-nums}
td.cost{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
tr.released{background:#f2f1ec!important;color:var(--muted)}
tr.released td{opacity:.6}
tr.released td:last-child{opacity:1}
tr.totalrow{background:#fdf9ef!important;font-weight:700}
tr.totalrow td{border-top:2px solid var(--gold);padding:10px 9px}

/* ---------- cart ------------------------------------------------------- */
.cartline{
  display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--line);
  flex-wrap:wrap;
}
.cartline:last-of-type{border-bottom:0}
.cartline .who{flex:1;min-width:170px}
.cartline .who b{display:block}
.cartline .qty{width:74px;flex:none}
.cartline .amt{width:78px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums}

/* A show with no intermission has no intermission takings, so that column and
   its tile come off the reporting table. Done in CSS, on the whole column at
   once, rather than by leaving cells out: the table has a footer, a colspan and
   tiles addressed by position, and renumbering all of that to drop one column
   is a great deal of risk for a column that is simply not wanted. The figures
   stay in the database either way, and the column comes back the moment the
   show is marked as having an interval again. */
.no-interval thead th:nth-child(7),
.no-interval tbody td:nth-child(7),
.no-interval tfoot td:nth-child(7){display:none}
.stat.no-interval .statbox:nth-child(3){display:none}

/* An order can cover several nights, so the lines are grouped under the date
   they are for. The heading is the thing the eye should land on first: without
   it a three-night order is one undifferentiated list of names. */
.nighthd{
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  margin:16px 0 0;padding:7px 10px;
  background:var(--navy);border-radius:7px 7px 0 0;
}
.nighthd:first-child{margin-top:0}
.nighthd .when{font-weight:750;font-size:14.5px;color:#fff}
.nighthd .muted{margin-left:auto;color:#cfd6ea}
/* The first line under a heading sits tight to it, so the two read as one
   block rather than a floating bar above a list. */
.nighthd + .cartline{border-top:0;padding-top:9px}
.totalbar{
  display:flex;align-items:baseline;gap:12px;padding:14px 0 4px;border-top:2px solid var(--gold);
  margin-top:6px;
}
.totalbar .lbl{font-size:14px;font-weight:650;color:var(--navy)}
.totalbar .val{margin-left:auto;font-size:27px;font-weight:800;color:var(--navy)}

/* ---------- steps ------------------------------------------------------ */
.steps{display:flex;gap:6px;margin-bottom:18px;flex-wrap:wrap}
.step{
  flex:1;min-width:110px;font-size:12px;font-weight:700;text-align:center;padding:8px 6px;
  border-radius:8px;background:#fff;border:1.5px solid var(--line);color:var(--muted);
}
.step.on{background:var(--navy);border-color:var(--navy-d);color:#fff}
.step.done{background:#e9edf7;border-color:#ccd6ec;color:var(--navy)}
.step.clickable{cursor:pointer}
.step.clickable:hover{border-color:var(--navy-l);background:#dde4f3}
.step.clickable::before{content:"‹ ";font-weight:800}

/* ---------- dialogs ---------------------------------------------------- */
dialog{
  border:0;border-radius:14px;padding:0;max-width:460px;width:92vw;
  box-shadow:0 18px 60px rgba(11,22,55,.35);color:var(--ink);
  border-top:5px solid var(--gold);
}
dialog::backdrop{background:rgba(11,22,55,.55)}
/* Wide enough for a portal screenshot to stay readable. */
.dlg-wide{max-width:760px}
/* Royalty and Group list popups: what the file holds, scrolling inside. */
.rep-body{max-height:62vh;overflow:auto;margin:0 -4px;padding:0 4px}
.rep-table{font-size:13.5px;margin-bottom:6px}
.rep-table td,.rep-table th{padding:5px 8px}
.rep-table tr.totalrow td{font-weight:700}
.rep-n{text-align:right;font-weight:700;white-space:nowrap}
.rep-wait td{color:var(--muted,#777);font-style:italic}
.rep-wait .rep-n{font-weight:400}
.rep-night{display:flex;justify-content:space-between;gap:12px;margin-top:16px;padding-bottom:4px;
  border-bottom:2px solid var(--navy);color:var(--navy)}
.rep-night span{font-size:13px}
.rep-none{margin:6px 8px 4px;font-style:italic}
.rep-h{color:var(--navy);margin:18px 0 6px;font-size:15px}
.rep-body:focus{outline:none}
/* Group list: a bold horizontal line between dates */
.rep-newdate td{border-top:3px solid var(--navy)}
/* every night's table is its own, so fixed columns keep them lined up */
.rep-roy{table-layout:fixed}
.rep-roy td:nth-child(1){width:46%}
.rep-roy td:nth-child(2){width:34%}
@media (max-width:480px){
  .rep-table{font-size:12.5px}
  .rep-table td,.rep-table th{padding:4px 5px}
  .rep-table th{font-size:10px;letter-spacing:0}
}
.dlg{padding:22px}

/* The "where is my Student ID" helper. */
#idHelpShot{margin:14px 0 0}
#idHelpShot img{
  display:block;width:100%;height:auto;max-height:58vh;object-fit:contain;
  border:1px solid var(--line);border-radius:9px;cursor:zoom-out;background:#fff
}
#idHelpShot figcaption{margin-top:6px;text-align:center}

/* Pointing at a control after a dialog has sent someone to it. The outline
   carries the message on its own, so nothing is lost when motion is off. */
@keyframes attn-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(179,32,46,0)}
  50%{box-shadow:0 0 0 7px rgba(179,32,46,.26)}
}
.attn{outline:2.5px solid var(--red);outline-offset:2px;animation:attn-pulse 1.15s ease-in-out 4}
@media(prefers-reduced-motion:reduce){.attn{animation:none}}
.dlg h3{color:var(--navy);font-size:18px;margin-bottom:10px}
.dlg-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}
/* Used by the step-by-step confirmations, which move the buttons from one side
   to the other between steps so four "yes" clicks cannot be one reflex in the
   same spot. Reversing the row also puts the confirm button at the far edge,
   so it travels the full width of the dialog between steps. Visual order only:
   the tab order is untouched. */
.dlg-actions.flip{flex-direction:row-reverse;justify-content:flex-end}
.dlg-actions .left{margin-right:auto}
.dlg-actions > span{display:flex;gap:9px;flex-wrap:wrap}
.dlg-actions > span:last-child{margin-left:auto}
.bn-list{max-height:55vh;overflow:auto;margin-top:8px}
.bn-row{display:flex;align-items:center;gap:8px;padding:7px 4px;border-bottom:1px solid rgba(128,128,128,.2);cursor:pointer}
.bn-row .muted{margin-left:auto;font-size:.9em}
.royalty-row{display:flex;gap:8px;align-items:center;max-width:360px;margin-bottom:8px}
.royalty-row input{flex:1}
.bn-count{font-variant-numeric:tabular-nums;font-size:.9em;padding:1px 8px;border-radius:10px;background:rgba(128,128,128,.14)}

/* ---------- misc -------------------------------------------------------- */
.empty{text-align:center;color:var(--muted);padding:46px 20px}
.stat{display:flex;gap:10px;flex-wrap:wrap}
.statbox{
  flex:1;min-width:130px;background:#fff;border:1px solid var(--line);border-radius:10px;
  padding:12px 14px;border-top:3px solid var(--purple);
}
.statbox .k{font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);
  font-weight:700}
.statbox .v{font-size:23px;font-weight:800;color:var(--navy);font-variant-numeric:tabular-nums}
.statbox.gold{border-top-color:var(--gold)}
.statbox.red{border-top-color:var(--red)}
.statbox.navy{border-top-color:var(--navy)}
.footer{
  border-top:1px solid var(--line);margin-top:34px;padding:18px 0 40px;
  font-size:12.5px;color:var(--muted);
}
.softnote{
  background:var(--purple);color:#fff;font-size:12px;text-align:center;padding:5px 12px;
  letter-spacing:.03em;
}
.softnote b{color:var(--gold-l)}

/* Queue arrows on the waitlist. Small, quiet, and side by side so a row can be
   nudged without the buttons dominating it. */
/* Moving somebody up or down the queue is a real decision, and these were
   19x19 with 3px between them -- small enough to promote the wrong family with
   a thumb. 34px with a proper gap: not the full 44, because they sit inside a
   dense table row, but no longer a coin toss. */
.qmove{display:flex;gap:7px}
.qmove button{
  min-width:34px;min-height:34px;
  padding:0;font-size:14px;line-height:1;border-radius:6px;
  background:#fff;border:1.5px solid var(--line);color:var(--navy);cursor:pointer;
}
.qmove button:hover:not(:disabled){border-color:var(--navy-l)}
.qmove button:disabled{opacity:.3;cursor:default}

/* ---------- touch targets ----------------------------------------------
   44x44 is the smallest a control should be when the pointer is a thumb.
   Measured across the admin page, the small buttons came out 26 to 37px
   tall -- under it everywhere, and the box office is run from a phone at a
   table in the lobby, which is exactly where a mis-tap costs something.

   Raising them for everyone would be the wrong fix: the admin tables are
   dense on purpose, and a mouse does not need the room. So the minimum is
   applied only where the pointer actually is coarse. A desktop keeps the
   tight rows; a phone or tablet gets targets a thumb can hit.

   The mini tabs are included deliberately. They were shrunk because
   eighteen grades and forms at full size pushed the page sideways, and at
   44px they will wrap onto more rows on a narrow screen -- which is the
   right trade: a taller list beats promoting the wrong family by accident. */
@media (pointer: coarse) {
  button, .btn, .tab,
  input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    min-height: 44px;
  }
  /* Square controls need the width as well, or 44px tall and 24px wide is
     still a miss waiting to happen. */
  .qmove button, .rowx, .btn-sm.btn-icon { min-width: 44px; }
  /* The small buttons keep their type size -- it is the box that was too
     small, not the label -- so only the padding opens up. */
  .btn-sm { padding: 7px 13px; }
  /* A checkbox cannot be stretched by min-height, so it is scaled instead.
     16px is a tenth of a thumb. */
  input[type="checkbox"], input[type="radio"] {
    width: 22px; height: 22px;
  }
}

/* ---------- program builder (/editprogram/) ------------------------------ */
.pg-bar{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}
.pg-grid{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:18px;align-items:start}
.pg-preview{position:sticky;top:10px}
.pg-preview iframe{width:100%;height:calc(100vh - 90px);min-height:420px;border:1px solid var(--line);border-radius:6px;background:#fff}
@media(max-width:1000px){.pg-grid{grid-template-columns:1fr}.pg-preview{position:static}.pg-preview iframe{height:70vh}}
.pg-rows{display:flex;flex-direction:column;gap:8px}
.pg-rows > button{align-self:flex-start;margin-top:4px}
.pg-row{display:flex;gap:8px;align-items:flex-start;padding-bottom:8px;border-bottom:1px solid rgba(128,128,128,.15)}
.pg-row > :first-child{flex:1;min-width:0}
.pg-tools{display:flex;gap:4px;flex:none}
.pg-tools .btn-sm{padding:5px 9px}
.pg-x:hover{border-color:var(--red);color:var(--red)}
.pg-2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pg-2w{grid-template-columns:1fr 2fr}
.pg-person{display:flex;gap:12px;align-items:flex-start}
.pg-person > div:last-child{flex:1;display:flex;flex-direction:column;gap:8px}
.pg-person > input{flex:1}
.pg-photo{display:flex;flex-direction:column;gap:5px;align-items:flex-start;flex:none}
.pg-thumb{width:72px;height:90px;border:1.5px dashed var(--line);border-radius:6px;display:flex;align-items:center;justify-content:center;
  text-align:center;font-size:11.5px;color:var(--muted);cursor:pointer;overflow:hidden;background:#fafaf7}
.pg-thumb:hover{border-color:var(--navy-l)}
.pg-thumb img{width:100%;height:100%;object-fit:cover}
.pg-photo.wide .pg-thumb{width:150px;height:200px}
.pg-photo.wide .pg-thumb img{object-fit:contain}
.pg-photos{display:flex;gap:12px;flex-wrap:wrap}
/* group photos are usually wider than tall */
.pg-photo.land .pg-thumb{width:240px;height:160px}
/* a text box that takes Ctrl+B, Ctrl+I, Ctrl+U -- looks like the others */
.pg-rich{width:100%;color:inherit;background:#fff;border:1.5px solid var(--line);border-radius:9px;padding:9px 11px;
  white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;line-height:1.45}
.pg-rich:focus{outline:none;border-color:var(--navy-l);box-shadow:0 0 0 3px rgba(30,53,118,.14)}
.pg-rich:empty::before{content:attr(data-ph);color:var(--muted)}
.pg-tick{display:flex;gap:10px;align-items:flex-start;cursor:pointer;margin:4px 0 10px;font-size:14.5px}
.pg-tick input{margin-top:3px;flex:none}
/* a photo file being dragged over its box */
.pg-photo.drop .pg-thumb{border:2px solid var(--purple);background:#f1eafa}
.pg-btns{display:flex;gap:4px}
.pg-btns .btn-sm{padding:3px 8px;font-size:12px}
.pg-size{align-items:center}
.pg-size .btn-sm{min-width:28px;font-size:14px;line-height:1}
.pg-size span{min-width:36px;text-align:center}
/* the crop window */
.pg-cropdlg{border:0;border-radius:12px;padding:18px;width:fit-content;min-width:300px;max-width:calc(100vw - 24px)}
.pg-cropdlg .row > *{flex:none}
.pg-cropdlg .row button{width:auto;min-width:0;padding:6px 16px}
.pg-crop{display:block;width:fit-content;margin:0 auto}
.pg-cropdlg::backdrop{background:rgba(10,16,40,.55)}
.pg-crop{position:relative;display:inline-block;line-height:0;user-select:none;touch-action:none;overflow:hidden;background:#222}
.pg-crop img{display:block;pointer-events:none}
.pg-cropbox{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.5);cursor:move;touch-action:none}
.pg-h{position:absolute;width:16px;height:16px;background:#fff;border:2px solid var(--navy);border-radius:3px}
/* inside the box's corners: the crop area clips, so a handle hanging outside
   would be cut in half whenever the box reaches the photo's edge */
.pg-h.nw{left:-2px;top:-2px;cursor:nwse-resize}.pg-h.se{right:-2px;bottom:-2px;cursor:nwse-resize}
.pg-h.ne{right:-2px;top:-2px;cursor:nesw-resize}.pg-h.sw{left:-2px;bottom:-2px;cursor:nesw-resize}
.pg-paste{margin-bottom:6px}
.pg-paste summary{cursor:pointer;font-weight:650;color:var(--navy);font-size:13.5px}
.pg-paste textarea{margin:6px 0 8px;font-family:inherit}
@media(max-width:560px){.pg-2,.pg-2w{grid-template-columns:1fr}}
