/* Slice, Slice, Baby: a pizza party on a red-and-cream striped tablecloth. Every section (the invitation and the
   footer too, When & Where like the rest) is a scalloped paper placemat with a red double rule, the name
   ideas fill an open pizza box with its lid attached (six names in the box, six on the lid, then the next box), the
   notes are order slips in a ticket rail, and a few things are left on the cloth. Border-images keep every piece's corners and edges as photographed. Colors and
   fonts come from vars.css. */

/* ---------- the table: the tablecloth runs under everything, the header too ---------- */
html{background:var(--desk) url(../art/cloth.jpg) repeat; background-size:490px auto}   /* on html, so the cloth runs past the footer */
body{background:transparent}
main{overflow-x:clip; padding-left:max(14px, env(safe-area-inset-left,0px) + 10px); padding-right:max(14px, env(safe-area-inset-right,0px) + 10px)}

/* ---------- the header: the pizzeria in the early evening, two photographed planes (slice_hero.py). The back wall
   (window onto dusk, the oven glowing, shelves) slides behind the counter as the page scrolls. Both pictures end at the
   marble's front edge, and both layers stand on the header's foot, so the counter ends clean there at every screen size
   and the tablecloth starts right under it: no fade (Aaron). The neon sign floats big in the middle of the header, lit,
   its glow lying over the room like light, never hung on the wall (Aaron). A phone held upright gets the tall pair. ---------- */
.hero.painted{background:none}
.hero.painted::after{display:none}
.hero.painted .layer{top:-10%; bottom:0; background-position:center bottom}
.hero-title{width:min(94vw, 560px); top:26%; transform:translate(-50%, -50%); filter:none}   /* mostly on the plaster, above the tile (Aaron) */
/* on a laptop the header is a little taller than other themes', so the plaster and lamps up top stay in view; the
   sign sizes with the header's height */
@media (min-width:900px){
  .hero.painted{height:clamp(460px, min(80svh, 52vw), 900px)}
  .hero-title{width:min(44vw, 760px, calc(clamp(460px, min(80svh, 52vw), 900px) * .74))}
}
/* a very wide screen shows the photos at its width, so the header grows with it; a phone turned sideways gets a header
   as tall as its screen, the counter's edge at its foot */
@media (min-aspect-ratio:2/1) and (min-width:900px){.hero.painted{height:clamp(460px, min(92svh, 46vw), 1100px)}}
@media (orientation:landscape) and (max-height:560px){
  .hero.painted{height:max(300px, 100svh)}
  .hero-title{width:min(48vw, 560px, 62svh); top:22%}
}
@media (max-aspect-ratio:3/4) and (max-width:700px){
  .hero.painted .back{background-image:url(../art/hero-back-phone.webp)}
  .hero.painted .front{background-image:url(../art/hero-front-phone.webp)}
}

/* ---------- every section a placemat: one quarter of Gemini's placemat mirrored into a whole one (slice_paper.py), so
   the four corners match and each side's repeat starts and ends on a crest of the scallops and the red rule, joining
   with no break; the placemat's own blank middle tiled inside, one soft shadow on the cloth ---------- */
.card, .invite, footer{border-style:solid; border-width:32px 31px 32px 32px; border-radius:0;
  border-image:url(../art/sheet.webp) 190 257 / 95px 128px round;   /* wider than the border: the corners hold the rule's whole turn */
  background:var(--paper) url(../art/paper-plain.jpg) repeat padding-box; background-size:240px;   /* the placemat's own blank middle */
  filter:drop-shadow(0 1px 1px rgba(var(--shadow-rgb),.2)) drop-shadow(0 10px 12px rgba(var(--shadow-rgb),.22))}
.card{padding:12px max(8px, 2.6vw) 14px; box-shadow:none}
/* a page of its own's header (the board) on a placemat too, so its words never sit on the cloth */
.page-head{border-style:solid; border-width:32px 31px 32px 32px; border-image:url(../art/sheet.webp) 190 257 / 95px 128px round;
  background:var(--paper) url(../art/paper-plain.jpg) repeat padding-box; background-size:240px; max-width:min(92vw, 560px); margin:18px auto 0;
  padding:4px 12px 10px; filter:drop-shadow(0 1px 1px rgba(var(--shadow-rgb),.2)) drop-shadow(0 10px 12px rgba(var(--shadow-rgb),.22))}
.page-head .page-party{margin-top:10px}
.card::before{display:none}
.invite{padding:14px max(8px, 2.6vw) 16px; margin-top:26px}
.honoree{font-size:clamp(38px, 10.5vw, 58px); line-height:1.04}
section{padding-block:26px 6px}
.sec-title{font-size:clamp(31px, 8.8vw, 44px); line-height:1.08; margin-bottom:10px; letter-spacing:.01em}
.lede{color:var(--soft)}
/* a photographed piece over most titles, set down on the placemat with its own shadow (slice_pieces.py) */
.sec-title::before{content:""; display:none; width:116px; height:104px; margin:0 auto 6px; background:var(--doodle) no-repeat center / contain;
  filter:drop-shadow(0 2px 2px rgba(var(--shadow-rgb),.22)) drop-shadow(0 6px 8px rgba(var(--shadow-rgb),.14))}
#poll{--doodle:url(../art/photo-slice.webp)}
#pool{--doodle:url(../art/photo-pram.webp)}
#wishes{--doodle:url(../art/photo-basil.webp)}
#registry{--doodle:url(../art/photo-box.webp)}
#checkin{--doodle:url(../art/photo-pizza.webp)}
#raffle{--doodle:url(../art/photo-box.webp)}
#quiz{--doodle:url(../art/photo-pizza.webp)}
#match{--doodle:url(../art/photo-stork.webp)}
#photos{--doodle:url(../art/photo-olives.webp)}
:is(#poll, #pool, #wishes, #registry, #checkin, #raffle, #photos, #quiz, #match) .sec-title::before{display:block}

/* the countdown: a ruled row printed on the placemat */
.log{border:0; border-block:2px solid rgba(var(--ink-rgb),.55); border-radius:0; background:transparent}
.log::before{display:none}
.count div{border-left:1.5px solid rgba(var(--ink-rgb),.3)}

/* ---------- When & Where: on the placemat like every section (Aaron); two columns on a laptop ---------- */
.detail-grid h3{letter-spacing:.14em}
.detail-grid .addr{border-bottom:1.5px solid rgba(var(--ink-rgb),.25); padding-bottom:8px}
@media (min-width:900px){
  .col{max-width:700px}
  .detail-grid{grid-template-columns:1fr 1fr; gap:22px 44px}
  .detail-grid > .span{grid-column:auto}
}

/* ---------- the vote: two picks on the placemat, then a wedge of cheese and a slice of pepperoni race (Aaron). Both are
   wider than tall, so each racer's box is 1.7 times as wide as --racer-size and the lane stops that much short, so the
   racer still ends at the lane's end (the page moves it across 100% minus --racer-size). ---------- */
.pick{background:var(--field); border-radius:6px; border-width:2px}
.pick .script{font-size:30px; line-height:1.15; margin-bottom:4px}
.lane{border-bottom:2px dashed rgba(var(--ink-rgb),.3); margin-right:calc(var(--racer-size) * .7)}
.lane .boat{width:calc(var(--racer-size) * 1.7)}
:root{--racer-size:60px}

/* ---------- name ideas: one open pizza box per list, its lid still attached at the hinge and laid flat: one Gemini
   photo (box-tall.webp), never stretched, never two pieces. The box holds names 1-6 and the lid's inside names 7-12, so
   the box is on top and the lid below it; the thirteenth name starts the next box. Every name is one row (the name,
   then its note and who suggested it on one line, cut with "…" if longer); the rows sit on the box's and the lid's flat
   insides, measured from the photo in its own pixels (slice_paper.py BOX). The box is drawn by its first name, and the
   last name keeps the rest of the box and the lid as empty room. Until a list has a seventh name it sits in the first
   box photo alone (box.webp, below). One list alone on a wide screen turns the open box on its side (box-wide.webp: the
   box left, the lid right). An empty list is an empty box. ---------- */
.name-lists > div{container-type:inline-size}
/* each list's heading: in the section titles' face (so it changes with them), centered over its box, with the
   placemat's red double rule under it */
.name-lists h3{font:400 clamp(21px, 6.4vw, 27px)/1.15 var(--f-script); letter-spacing:.01em; text-transform:none; color:var(--ink);
  text-align:center; width:fit-content; min-width:58%; margin:0 auto 14px; padding:0 6px 7px; border-bottom:4px double rgba(var(--ink-rgb),.7)}
.name-list{--k:calc(100cqw / 1057); --rt:calc(var(--k) * 82); --row:calc(var(--k) * 157); --mid:calc(var(--k) * 168);
  --rb:calc(var(--k) * 59); --gap:22px; position:relative; isolation:isolate; display:grid; grid-template-columns:100%}
.name-list li{position:relative; box-sizing:border-box; height:var(--row); border-bottom:0;
  padding:0 calc(var(--k) * 72 + 8px) 0 calc(var(--k) * 65 + 8px);
  grid-template-columns:minmax(0, 1fr) auto auto; grid-template-rows:auto auto; align-content:center; gap:0 10px}
.name-list li:nth-child(12n+1){margin-top:var(--rt)}
.name-list li:nth-child(12n+1):not(:first-child){margin-top:calc(var(--rt) + var(--gap))}
.name-list li:nth-child(12n+6){margin-bottom:var(--mid)}
.name-list li:nth-child(12n+12){margin-bottom:var(--rb)}
.name-list li:nth-child(12n+1)::before{content:""; position:absolute; z-index:-1; pointer-events:none;
  top:calc(-1 * var(--rt)); left:0; width:100cqw; height:calc(var(--k) * 2193);
  background:url(../art/box-tall.webp) no-repeat 0 0 / 100% 100%; filter:drop-shadow(0 10px 10px rgba(var(--shadow-rgb),.26))}
/* the last name keeps the rest of its box and the whole lid */
.name-list li:nth-child(12n+1):last-child{margin-bottom:calc(var(--row) * 11 + var(--mid) + var(--rb))}
.name-list li:nth-child(12n+2):last-child{margin-bottom:calc(var(--row) * 10 + var(--mid) + var(--rb))}
.name-list li:nth-child(12n+3):last-child{margin-bottom:calc(var(--row) * 9 + var(--mid) + var(--rb))}
.name-list li:nth-child(12n+4):last-child{margin-bottom:calc(var(--row) * 8 + var(--mid) + var(--rb))}
.name-list li:nth-child(12n+5):last-child{margin-bottom:calc(var(--row) * 7 + var(--mid) + var(--rb))}
.name-list li:nth-child(12n+6):last-child{margin-bottom:calc(var(--row) * 6 + var(--mid) + var(--rb))}
.name-list li:nth-child(12n+7):last-child{margin-bottom:calc(var(--row) * 5 + var(--rb))}
.name-list li:nth-child(12n+8):last-child{margin-bottom:calc(var(--row) * 4 + var(--rb))}
.name-list li:nth-child(12n+9):last-child{margin-bottom:calc(var(--row) * 3 + var(--rb))}
.name-list li:nth-child(12n+10):last-child{margin-bottom:calc(var(--row) * 2 + var(--rb))}
.name-list li:nth-child(12n+11):last-child{margin-bottom:calc(var(--row) + var(--rb))}
.name-list .nm{display:block; grid-column:1; grid-row:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-size:clamp(19px, 7cqw, 26px); line-height:1.05}
.name-list .why{grid-column:1; grid-row:2; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-size:17px; line-height:1.2}
/* the heart: a small paper tag on the liner, always inside it */
.name-list .heart{grid-column:2; grid-row:1 / span 2; align-self:center; min-height:34px; padding:4px 10px; gap:5px; font-size:17px; position:relative;
  background:rgba(var(--card-rgb),.9); border-color:rgba(var(--ink-rgb),.35); box-shadow:0 1px 2px rgba(var(--shadow-rgb),.12)}
.name-list .heart svg{width:16px; height:16px}
.name-list .heart::before{content:""; position:absolute; inset:-5px 0}   /* the tag stays small on the liner; the finger gets 44px */
/* her own name's Remove: a small round × beside the heart, so a long name still has room (the word stays for screen readers) */
.name-list li > button:not(.heart){grid-column:3; grid-row:1 / span 2; align-self:center; width:34px; height:34px; padding:0;
  border:1px solid rgba(var(--ink-rgb),.3); border-radius:50%; background:rgba(var(--card-rgb),.8); font-size:0; line-height:0; color:var(--soft)}
.name-list li > button:not(.heart)::before{content:"\00d7"; font:400 20px/32px var(--f-body)}
.name-list li{column-gap:6px}
.name-lists .empty:not([hidden]){box-sizing:border-box; width:100cqw; height:100cqw; margin:0; display:grid; place-items:center;
  padding:0 14%; text-align:center;
  background:url(../art/box.webp) no-repeat 0 0 / 100% 100%; filter:drop-shadow(0 10px 10px rgba(var(--shadow-rgb),.26))}
/* six names or fewer: the first box photo, the box alone with its checked rim and liner (box.webp; Aaron: the open
   box with its lid only once the list needs the lid), square, never stretched past its rim */
.name-list:not(:has(> li:nth-child(7))){--sq:100cqw; --rt:calc(var(--sq) * .115); --rb:calc(var(--sq) * .125);
  --row:calc((var(--sq) - var(--rt) - var(--rb)) / 6); grid-template-columns:var(--sq)}
.name-list:not(:has(> li:nth-child(7))) > li{padding:0 calc(var(--sq) * .135) 0 calc(var(--sq) * .1); grid-column:1}   /* the liner runs 6.3% to 91.4% across */
.name-list:not(:has(> li:nth-child(7))) > li:first-child{margin-top:var(--rt)}
.name-list:not(:has(> li:nth-child(7))) > li:first-child::before{left:0; width:var(--sq); height:var(--sq);
  background-image:url(../art/box.webp)}
.name-list:not(:has(> li:nth-child(7))) > li:nth-child(1):last-child{margin-bottom:calc(var(--row) * 5 + var(--rb))}
.name-list:not(:has(> li:nth-child(7))) > li:nth-child(2):last-child{margin-bottom:calc(var(--row) * 4 + var(--rb))}
.name-list:not(:has(> li:nth-child(7))) > li:nth-child(3):last-child{margin-bottom:calc(var(--row) * 3 + var(--rb))}
.name-list:not(:has(> li:nth-child(7))) > li:nth-child(4):last-child{margin-bottom:calc(var(--row) * 2 + var(--rb))}
.name-list:not(:has(> li:nth-child(7))) > li:nth-child(5):last-child{margin-bottom:calc(var(--row) + var(--rb))}
.name-list:not(:has(> li:nth-child(7))) > li:nth-child(6):last-child{margin-bottom:var(--rb)}

@media (min-width:700px){
  .name-lists.one .name-list{--k:calc(100cqw / 2193); --rt:calc(var(--k) * 65); --row:calc(var(--k) * 153.5); --rb:calc(var(--k) * 71);
    grid-template-columns:calc(var(--k) * 82) calc(var(--k) * 940) calc(var(--k) * 170) calc(var(--k) * 945) minmax(0, 1fr);
    grid-auto-flow:row dense}
  .name-lists.one .name-list li{padding:0 8px; grid-column:2}
  .name-lists.one .name-list li:is(:nth-child(12n+7), :nth-child(12n+8), :nth-child(12n+9), :nth-child(12n+10),
    :nth-child(12n+11), :nth-child(12n+12)){grid-column:4}
  .name-lists.one .name-list li:nth-child(12n+7){margin-top:var(--rt)}
  .name-lists.one .name-list li:nth-child(12n+19){margin-top:calc(var(--rt) + var(--gap))}
  .name-lists.one .name-list li:nth-child(12n+6){margin-bottom:var(--rb)}
  .name-lists.one .name-list li:nth-child(12n+1)::before{left:calc(-1 * var(--k) * 82); height:calc(var(--k) * 1057);
    background-image:url(../art/box-wide.webp)}
  .name-lists.one .name-list li:nth-child(12n+1):last-child{margin-bottom:calc(var(--row) * 5 + var(--rb))}
  .name-lists.one .name-list li:nth-child(12n+2):last-child{margin-bottom:calc(var(--row) * 4 + var(--rb))}
  .name-lists.one .name-list li:nth-child(12n+3):last-child{margin-bottom:calc(var(--row) * 3 + var(--rb))}
  .name-lists.one .name-list li:nth-child(12n+4):last-child{margin-bottom:calc(var(--row) * 2 + var(--rb))}
  .name-lists.one .name-list li:nth-child(12n+5):last-child{margin-bottom:calc(var(--row) + var(--rb))}
  .name-lists.one .name-list li:nth-child(12n+6):last-child{margin-bottom:var(--rb)}
  .name-lists.one .name-list li:is(:nth-child(12n+7), :nth-child(12n+8), :nth-child(12n+9), :nth-child(12n+10),
    :nth-child(12n+11)):last-child{margin-bottom:0}
  .name-lists.one .empty:not([hidden]){width:50cqw; height:50cqw; margin-inline:auto}
  .name-lists.one .name-list:not(:has(> li:nth-child(7))){--sq:50cqw; --rt:calc(var(--sq) * .115); --rb:calc(var(--sq) * .125);
    --row:calc((var(--sq) - var(--rt) - var(--rb)) / 6); grid-template-columns:var(--sq); justify-content:center}
  .name-lists.one .name-list:not(:has(> li:nth-child(7))) > li{padding:0 calc(var(--sq) * .135) 0 calc(var(--sq) * .1); grid-column:1}   /* the liner runs 6.3% to 91.4% across */
  .name-lists.one .name-list:not(:has(> li:nth-child(7))) > li:first-child::before{left:0; width:var(--sq); height:var(--sq);
    background-image:url(../art/box.webp)}
}

/* ---------- notes: blank receipts (receipt-1/2.webp, by turns; their torn zigzag foot repeats along the bottom), each
   slid into its own short brushed-gold ticket rail (rail.webp: the end brackets kept, the middle stretched) that holds
   only the receipt's top edge, so a guest's words are never under it. The words are printed like a receipt. ---------- */
.note{--tilt:0deg; --nudge:0px; background:none; box-shadow:none; border-radius:0; border-style:solid;
  border-width:22px 14px 16px; border-image:url(../art/receipt-1.webp) 22 14 16 fill / 22px 14px 16px round stretch;
  padding:14px 6px 8px; margin-top:26px; filter:drop-shadow(0 1px 1px rgba(var(--shadow-rgb),.16)) drop-shadow(0 6px 8px rgba(var(--shadow-rgb),.14))}
.note:nth-child(2n){border-image-source:url(../art/receipt-2.webp)}
.note::before{content:""; position:absolute; z-index:1; pointer-events:none; top:-38px; left:-26px; right:-26px; height:22px;
  border-style:solid; border-width:0 12px; border-image:url(../art/rail.webp) 0 40 fill / 0 12px stretch;
  filter:drop-shadow(0 4px 3px rgba(var(--shadow-rgb),.3))}
/* the words printed like a receipt: one typewriter face, the kind as a heading between dashed rules, the name in
   capitals under a dashed tear line, all in the receipt's dark ink */
.note :is(.kind, p, .by){font-family:"Courier Prime","Courier New",Courier,monospace; color:var(--soft); letter-spacing:0}
.note .kind{font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; text-align:center;
  border-block:1.5px dashed rgba(var(--soft-rgb),.5); padding:4px 0; margin-bottom:8px}
.note p{font-size:17px; line-height:1.45}
.note .by{font-size:15px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-deep);
  border-top:1.5px dashed rgba(var(--soft-rgb),.5); padding-top:6px; margin-top:8px}
.note .del{top:-8px; right:-6px; color:var(--soft)}

/* ---------- the footer: a placemat like every section, the same size and inset ---------- */
footer{margin:28px auto 22px; width:min(720px, calc(100% - 28px)); box-sizing:border-box; padding:14px 16px 16px}   /* inset like the sections */
/* on a phone the placemat ends above the section bar, its whole scalloped foot in view */
.foot-line{color:var(--ink-deep)}

/* ---------- on the cloth between the placemats: a few things set down by hand, by turns right and left (at most one a
   section; the 3rd to the 8th): a leftover slice on its plate, garlic knots, a red cup, the crushed red pepper packet, a
   pizza saver and the parmesan packet. On a phone each lies over its placemat's top corner, half on the cloth (Lucia), in
   the corner's empty room beside the title; on a laptop's wide table they sit out beside the placemats, behind them. ---------- */
.col > section{position:relative}
.col > section:is(:nth-of-type(10n+3), :nth-of-type(10n+4), :nth-of-type(10n+5), :nth-of-type(10n+6), :nth-of-type(10n+7), :nth-of-type(10n+8))::after{
  content:""; position:absolute; z-index:3; pointer-events:none; width:96px; height:96px; top:-16px;
  background:var(--touch) no-repeat center / contain; filter:drop-shadow(0 3px 3px rgba(var(--shadow-rgb),.28)) drop-shadow(0 8px 10px rgba(var(--shadow-rgb),.18))}
.col > section:nth-of-type(10n+3)::after{--touch:url(../art/touch-plate.webp); right:-22px; top:-28px; width:112px; height:112px; transform:rotate(14deg)}
.col > section:nth-of-type(10n+4)::after{--touch:url(../art/touch-knots.webp); left:-22px; width:108px; transform:rotate(-12deg)}
.col > section:nth-of-type(10n+5)::after{--touch:url(../art/touch-cup.webp); right:-20px; height:104px; transform:rotate(8deg)}
.col > section:nth-of-type(10n+6)::after{--touch:url(../art/touch-pepper.webp); left:-16px; width:76px; height:76px; transform:rotate(-14deg)}
.col > section:nth-of-type(10n+7)::after{--touch:url(../art/touch-saver.webp); right:-10px; width:62px; height:62px; transform:rotate(10deg)}
.col > section:nth-of-type(10n+8)::after{--touch:url(../art/touch-parm.webp); left:-16px; width:84px; height:84px; transform:rotate(12deg)}
/* a tablet's placemat is wide and its title runs near the corners, so each thing sits further out on the cloth */
@media (min-width:600px) and (max-width:899px){
  .col > section:is(:nth-of-type(10n+3), :nth-of-type(10n+5), :nth-of-type(10n+7))::after{right:-60px}
  .col > section:is(:nth-of-type(10n+4), :nth-of-type(10n+6), :nth-of-type(10n+8))::after{left:-60px}
}
@media (min-width:900px){
  .col > section:is(:nth-of-type(10n+3), :nth-of-type(10n+4), :nth-of-type(10n+5), :nth-of-type(10n+6), :nth-of-type(10n+7), :nth-of-type(10n+8))::after{
    z-index:-1; top:40%; filter:drop-shadow(0 3px 3px rgba(var(--shadow-rgb),.2))}
  .col > section:nth-of-type(10n+3)::after{width:320px; height:320px; right:-350px}
  .col > section:nth-of-type(10n+4)::after{width:300px; height:300px; left:-330px}
  .col > section:nth-of-type(10n+5)::after{width:260px; height:280px; right:-290px}
  .col > section:nth-of-type(10n+6)::after{width:170px; height:170px; left:-220px}
  .col > section:nth-of-type(10n+7)::after{width:130px; height:130px; right:-200px}
  .col > section:nth-of-type(10n+8)::after{width:180px; height:180px; left:-230px}
}

/* ---------- small things ---------- */
.yourpart li.done a{background:rgba(var(--wash-rgb),.4)}

/* the big screen: names at their biggest (52px from across the room), and a name landing over the header comes in on
   a placemat, so its heading never sits on the header */
#tv .tv-names .name-list .nm{font-size:26px}
#tv .tv-arrive .tv-name-in{border-style:solid; border-width:32px 31px 32px 32px; border-image:url(../art/sheet.webp) 190 257 / 95px 128px round;
  background:var(--paper) url(../art/paper-plain.jpg) repeat padding-box; background-size:240px; padding:12px 20px 14px}
