/* The cassette-and-ticket page, and the look the show page and notes panel share. */

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/caveat-latin-700-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Special Elite";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/special-elite-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/libre-baskerville-latin-700-normal.woff2) format("woff2");
}

:root {
  --paper: #e9dfc8;
  --band: #d9cbaa;
  --card: #f7efdc;
  --label: #f4ecd8;
  --ink: #2c251d;
  --pen: #1f2f4a;
  --oxblood: #7c3324;
  --teal: #3f6a6a;
  --rule: #a8987a;
  --dim: #5e5240;
  --perf: #9a8c6e;
  --tape: #4a4339;
  --typed: "Special Elite", "Courier New", Courier, monospace;
  --serif: "Libre Baskerville", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--typed);
  font-synthesis: none;
  overflow-wrap: anywhere;
}
a { color: inherit; }

.page {
  max-width: 460px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right))
           calc(22px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}

.top {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.brand { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.2; }
.tag { margin: 3px 0 0; font-size: 12px; line-height: 1.35; }

.kick {
  margin: 15px 0 6px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oxblood);
}

/* The cassette, at a real compact cassette's 100.4 x 63.8 mm. Everything inside is
   absolutely placed, so no content can grow the shell, and sized in cqw, so the whole
   drawing scales as one: the shell is 100cqw wide and 63.5cqw high. */
.cass {
  position: relative;
  width: 100%;
  aspect-ratio: 100.4 / 63.8;
  align-self: start;
  container-type: inline-size;
  background: linear-gradient(#4a4339, #2f2a23);
  border-radius: 11px;
  box-shadow: 0 3px 0 #1c1813;
}
.screw {
  position: absolute;
  z-index: 2;
  width: 2.4cqw;
  height: 2.4cqw;
  border-radius: 50%;
  background: #8d8473;
  box-shadow: inset 0 0 0 1px #2b261f;
}
.s1 { left: 1.5cqw; top: 1.5cqw; }
.s2 { right: 1.5cqw; top: 1.5cqw; }
.s3 { left: 1.5cqw; bottom: 1.5cqw; }
.s4 { right: 1.5cqw; bottom: 1.5cqw; }

/* The paper wraps the window, top corners cut for the screws: the small line and the
   artist above the window, the venue and date below it. The window sits over the paper.
   The artist's line height stays put in cqw, so a smaller name keeps its baseline. */
.clabel {
  position: absolute;
  top: 4.4cqw;
  left: 5cqw;
  right: 5cqw;
  height: 45.6cqw;
  display: flex;
  flex-direction: column;
  padding: 1.5cqw 3cqw 1.6cqw;
  overflow: hidden;
  background: var(--label);
  border-radius: 1.2cqw;
  clip-path: polygon(2.6cqw 0, calc(100% - 2.6cqw) 0, 100% 2.6cqw, 100% 100%, 0 100%, 0 2.6cqw);
}
.ln {
  display: flex;
  flex: none;
  justify-content: space-between;
  font-size: 3.2cqw;
  line-height: 1.2;
  letter-spacing: .14em;
  color: var(--oxblood);
}
/* The pen's J tail hangs left of its box: .12em of room inside the clip, taken back by the margin so
 * the text does not move. The rule is painted as a background so it keeps its old extent. */
.hand {
  flex: none;
  padding-left: .12em;
  margin-left: -.12em;
  border-bottom: 1px solid transparent;
  background: linear-gradient(#c9b78f, #c9b78f) right bottom / calc(100% - .12em) 1px no-repeat border-box;
  overflow: hidden;
  font-family: var(--hand);
  font-weight: 700;
  white-space: nowrap;
  color: var(--pen);
}
.hand.h1 {
  height: 10.2cqw;
  font-size: 7.6cqw;
  line-height: 10.2cqw;
  text-overflow: ellipsis;
}
.hand.h1.long { font-size: 6.2cqw; }
.hand.h1.longer { font-size: 5cqw; }
/* The venue gives way to the date. The date's padding keeps the pen's overhang unclipped. */
.hand.h2 {
  display: flex;
  gap: 2.4cqw;
  height: 7.4cqw;
  margin-top: auto;
  font-size: 5.2cqw;
  line-height: 7.4cqw;
}
#label-where { flex: 1 1 0; min-width: 0; padding-left: .12em; margin-left: -.12em; overflow: hidden; text-overflow: ellipsis; }
/* The right padding is .2em: the last digit of "2008" reaches past .12em. */
#label-date { flex: none; max-width: 60%; padding-left: .12em; margin-left: -.12em; padding-right: .2em; overflow: hidden; text-overflow: ellipsis; }

/* Hub centres 42.3cqw apart, the real 42.5 mm, each 7.85cqw in from the window's edge. */
.window {
  position: absolute;
  top: 21.4cqw;
  left: 21cqw;
  width: 58cqw;
  height: 17.2cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.35cqw;
  overflow: hidden;
  background: #191511;
  border-radius: 2.2cqw;
}
.pack { position: absolute; top: 50%; transform: translateY(-50%); border-radius: 50%; background: #3a2a1e; }
.pack.l { left: -2.65cqw; width: 21cqw; height: 21cqw; }
.pack.r { right: 1.05cqw; width: 13.6cqw; height: 13.6cqw; }
.hub {
  position: relative;
  z-index: 2;
  width: 11cqw;
  height: 11cqw;
  border-radius: 50%;
  background: conic-gradient(#e9dfc8 0 20deg, #4a4339 20deg 40deg, #e9dfc8 40deg 80deg, #4a4339 80deg 100deg,
    #e9dfc8 100deg 140deg, #4a4339 140deg 160deg, #e9dfc8 160deg 200deg, #4a4339 200deg 220deg,
    #e9dfc8 220deg 260deg, #4a4339 260deg 280deg, #e9dfc8 280deg 320deg, #4a4339 320deg 340deg, #e9dfc8 340deg);
}
.hub::after { content: ""; position: absolute; inset: 29%; border-radius: 50%; background: #191511; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .turning .hub { animation: spin 4s linear infinite; }
}
.trap {
  position: absolute;
  bottom: 0;
  left: 15.5cqw;
  width: 69cqw;
  height: 12.5cqw;
  background: #3a342b;
  clip-path: polygon(9% 0, 91% 0, 100% 100%, 0 100%);
}
/* The holes in the shell's bottom edge, and its centre screw. Positions are the trapezoid's own:
   the shell's centre is 34.5cqw in, the row's centre line 8.56cqw down. */
.trap i { position: absolute; background: #191511; }
.trap .hole {
  top: 6.11cqw;
  width: 4.9cqw;
  height: 4.9cqw;
  border-radius: 50%;
  box-shadow: inset 0 0.25cqw 0.4cqw rgba(0, 0, 0, 0.75), 0 0.2cqw 0 rgba(255, 255, 255, 0.06);
}
.trap .hole.sq {
  top: 6.66cqw;
  width: 3.4cqw;
  height: 3.8cqw;
  border-radius: 30%;
}
.trap .h-l { left: 7.85cqw; }
.trap .h-r { left: 56.25cqw; }
.trap .sq.h-l { left: 18.8cqw; }
.trap .sq.h-r { left: 46.8cqw; }
.trap .screw.centre {
  top: 0.54cqw;
  left: 32.9cqw;
  width: 3.2cqw;
  height: 3.2cqw;
  background: #8d8473;
}

/* The tape-deck keys. */
.keys { display: flex; gap: 6px; margin-top: 12px; }
.key {
  flex: 1;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(#d7ccb5, #b4a88f);
  box-shadow: 0 3px 0 #6f6553;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.key.on { flex: 2; background: linear-gradient(#a23a2a, #7c3324); box-shadow: 0 3px 0 #4e2017; color: var(--label); }
.key.on::before {
  content: "";
  display: inline-block;
  margin-right: 9px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 #6f6553; }
.key.on:active { box-shadow: 0 1px 0 #4e2017; }
.key:focus-visible, .ticket:focus-visible, .more:focus-visible, .now-notes:focus-visible,
.days button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.key.retry { display: block; flex: none; min-height: 40px; margin-top: 10px; font-size: 13px; }

.np { margin: 0; font-size: 18px; line-height: 1.25; }
.now-show { margin: 6px 0 0; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.now-notes { display: inline-block; padding: 12px 0 8px; font-size: 12.5px; color: #5e5240; }

.log { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.55; }
.log li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--rule); }
.log li > :last-child { flex: none; }
.log li { position: relative; padding-left: 12px; }
.log li.off { display: none; }
.log li.now { font-weight: 700; font-synthesis: weight; } /* Special Elite has only a 400 face */
.log li.now::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--oxblood);
}
.log li.next { color: var(--dim); }
.tape-log .more { margin-top: 7px; }

.sched-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.zone { margin: 0; font-size: 11px; color: #5e5240; }
.schedule-note { margin: 0 0 8px; font-size: 13px; line-height: 1.35; }

/* A ticket, as page.js builds it:
   <a class="ticket" href="...">
     <span class="stub"><span class="day"></span><b class="time"></b><span class="adm"></span></span>
     <span class="main"><span class="presents"></span><b class="artist"></b><span class="where"></span>
       <span class="sr"></span></span>
   </a>
   The notches are this paper's colour, so a ticket sits straight on the page. */
.tickets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.ticket {
  position: relative;
  display: flex;
  height: 92px;
  background-color: var(--card);
  background-image: repeating-linear-gradient(135deg, rgba(60, 106, 106, .08) 0 3px, transparent 3px 7px);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.stub {
  position: relative;
  display: block;
  flex: none;
  width: 78px;
  padding: 7px 6px;
  border-right: 2px dashed var(--perf);
  font-size: 10.5px;
  line-height: 1.3;
  text-transform: uppercase;
}
.stub::before, .stub::after {
  content: "";
  position: absolute;
  right: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
}
.stub::before { top: -7px; }
.stub::after { bottom: -7px; }
.stub > span { display: block; }
.stub .time { display: block; font-size: 14px; font-weight: 400; color: var(--oxblood); text-transform: none; }
.stub .adm::after { content: "LMA RADIO"; display: block; }
.main { position: relative; display: block; flex: 1; min-width: 0; padding: 7px 10px; }
.presents { display: block; font-size: 9.5px; letter-spacing: .1em; color: var(--teal); }
.ticket .presents { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* a ticket's height is fixed */
.artist, .where { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.artist { margin: 2px 0 1px; font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.3; }
.sr {
  position: absolute;
  right: 10px;
  bottom: 6px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #5e5240;
  text-transform: uppercase;
}
.sr::after { content: "NO REFUNDS"; flex: none; }

.ticket.torn {
  clip-path: polygon(0 0, 86% 0, 88% 12%, 85% 25%, 89% 38%, 86% 52%, 90% 66%, 86% 79%, 89% 91%, 86% 100%, 0 100%);
  opacity: .72;
  filter: saturate(.55);
}
/* clip-path removes an outside outline, so the ring sits inside the tear. */
.ticket.torn:focus-visible { outline-offset: -3px; }
.torn .main { padding-right: 16%; }
.torn .artist { font-size: 13.5px; }
.torn .sr { right: 16%; }
.torn .sr::after { content: none; }

/* The three schedule sections' headings sit a size above the block headings. */
.sched-head .kick, .schedule > .kick { font-size: 14px; }

/* Coming up: one group per block occurrence, its heading in the .kick style, then
   its own ticket grid, so each block starts a new row. */
.block-group + .block-group { margin-top: 14px; }
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 12px;
  margin: 0 0 7px;
  padding-bottom: 2px;
  border-bottom: 1px dotted var(--rule);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.block-title { min-width: 0; }
.block-span { flex: none; margin-left: auto; white-space: nowrap; text-transform: none; letter-spacing: .06em; }

/* The weekly lineup: a row of day tabs over the chosen day's blocks. */
.days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.days button {
  padding: 6px 9px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.days button.today { border-color: var(--oxblood); color: var(--oxblood); font-weight: 700; font-synthesis: weight; }
.days button[aria-selected="true"] { border-color: var(--oxblood); background: var(--oxblood); color: var(--label); }
.lineup-list { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.35; }
.lineup-list li { display: flex; gap: 10px; padding: 4px 0 4px 12px; border-bottom: 1px dotted var(--rule); }
.lineup-list .at { flex: none; width: 4.2em; color: var(--dim); }
.lineup-list .t { min-width: 0; }
.lineup-list .variety .t { font-style: italic; font-synthesis: style; } /* Special Elite has no italic face */
.lineup-list li.on-air { position: relative; color: var(--oxblood); font-weight: 700; font-synthesis: weight style; }
.lineup-list li.on-air .at { color: inherit; }
.lineup-list li.on-air::before {
  content: "";
  position: absolute;
  top: .5em;
  left: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--oxblood);
}

.more {
  margin-top: 9px;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.foot { margin-top: 22px; padding-top: 8px; border-top: 1px dotted var(--rule); font-size: 11px; line-height: 1.45; }
.foot p { margin: 0 0 3px; }
.foot code { font-family: inherit; }

/* The slide-up notes panel: off screen and out of the tab order until .open. */
.panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  max-width: 900px;
  height: calc(100% - 24px - env(safe-area-inset-top));
  margin: 0 auto;
  padding: 14px calc(16px + env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom))
           calc(16px + env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .35);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.panel.open { transform: none; visibility: visible; transition: transform .25s ease; }
@media (prefers-reduced-motion: reduce) {
  .panel, .panel.open { transition: none; }
}
.panel-bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; margin-bottom: 8px; }
.panel-bar .more { margin-top: 0; }

/* The show page's look, shared by show.html and the panel. */
.bigt {
  display: flex;
  min-height: 150px;
  background-color: var(--card);
  background-image: repeating-linear-gradient(135deg, rgba(60, 106, 106, .08) 0 3px, transparent 3px 7px);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.bstub {
  position: relative;
  flex: none;
  width: 104px;
  padding: 12px 10px;
  border-right: 2px dashed var(--perf);
  font-size: 11px;
  line-height: 1.4;
}
.bstub::before, .bstub::after {
  content: "";
  position: absolute;
  right: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
}
.bstub::before { top: -9px; }
.bstub::after { bottom: -9px; }
.bstub b { display: block; font-size: 17px; font-weight: 400; color: var(--oxblood); }
.bmain { flex: 1; min-width: 0; padding: 12px 16px; }
.bmain h2 { margin: 3px 0 4px; font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.bmain .w { font-size: 14px; line-height: 1.35; }
.btn {
  display: inline-block;
  margin-top: 11px;
  padding: 7px 12px;
  background: var(--oxblood);
  border-radius: 3px;
  color: var(--label);
  font-size: 12.5px;
  text-decoration: none;
}
.jcard {
  padding: 10px 12px;
  background: #fbf6e9;
  border: 1px solid #bfae8a;
  box-shadow: 2px 3px 0 #d8caaa;
  font-size: 13px;
  line-height: 1.55;
}
.jcard ol { margin: 0; padding-left: 24px; }
.jcard li.dropped { list-style: none; color: var(--perf); }
.liner { font-family: Georgia, serif; font-size: 14.5px; line-height: 1.5; }
.liner h3 {
  margin: 12px 0 3px;
  font-family: var(--typed);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.liner p, .liner ul { margin: 0 0 6px; }
.meta { margin-top: 10px; font-size: 12.5px; line-height: 1.5; }
.meta b { font-weight: 400; color: var(--oxblood); }
.fineprint { margin-top: 16px; font-size: 11px; line-height: 1.4; color: #5e5240; }

/* Layout B: the tape in a band across the top, rows of tickets beneath. */
@media (min-width: 800px) {
  .page {
    max-width: 1000px;
    padding: calc(20px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right))
             calc(26px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  }
  .top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .tag { margin: 0; }
  .band {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--band);
    border-radius: 6px;
  }
  .deck { display: flex; flex-direction: column; }
  .playing { order: -1; }
  .playing .kick { margin-top: 0; }
  .np { font-size: 24px; }
  .keys { max-width: 320px; margin-top: 14px; }
  .key { min-height: 40px; }
  .tickets { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; }
  .lineup-list { max-width: 620px; }
  .ticket { height: 84px; font-size: 11.5px; }
  .stub { width: 74px; }
  .stub .adm::after { content: none; }
  .ticket.torn {
    clip-path: polygon(0 0, 91% 0, 93% 12%, 90% 25%, 94% 38%, 91% 52%, 95% 66%, 91% 79%, 94% 91%, 91% 100%, 0 100%);
  }
  .torn .main { padding-right: 11%; }
  .torn .sr { right: 11%; }
  .sr::after { content: none; }
  .bstub { width: 130px; }
  .bmain h2 { font-size: 36px; }
  .panel {
    padding: 16px calc(24px + env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom))
             calc(24px + env(safe-area-inset-left));
  }
  .cols { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; }
}

/* Browsers without container units get plain sizes. */
@supports not (width: 1cqw) {
  .screw { width: 7px; height: 7px; }
  .s1, .s3 { left: 5px; } .s2, .s4 { right: 5px; } .s1, .s2 { top: 5px; } .s3, .s4 { bottom: 5px; }
  .clabel {
    top: 7%; left: 5%; right: 5%; height: 71.7%; padding: 4px 9px 4px; border-radius: 3px;
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px);
  }
  .ln { font-size: 9px; }
  .hand.h1 { height: 29px; font-size: 22px; line-height: 29px; }
  .hand.h1.long { font-size: 18px; }
  .hand.h1.longer { font-size: 15px; }
  .hand.h2 { gap: 7px; height: 22px; font-size: 15px; line-height: 22px; }
  .window { top: 33.7%; left: 21%; width: 58%; height: 27%; padding: 0 2.35%; border-radius: 6px; }
  .pack.l { left: -4.6%; width: 36%; aspect-ratio: 1; }
  .pack.r { right: 1.8%; width: 23.4%; aspect-ratio: 1; }
  .hub { width: 20.6%; aspect-ratio: 1; }
  .trap { left: 15.5%; width: 69%; height: 19.7%; }
  .trap .hole { width: 16px; height: 16px; top: calc(68.5% - 8px); }
  .trap .hole.sq { width: 11px; height: 12.5px; top: calc(68.5% - 6.25px); }
  .trap .h-l { left: calc(14.9% - 8px); }
  .trap .h-r { left: calc(85.1% - 8px); }
  .trap .sq.h-l { left: calc(29.7% - 5.5px); }
  .trap .sq.h-r { left: calc(70.3% - 5.5px); }
  .trap .screw.centre { width: 10px; height: 10px; top: calc(17.1% - 5px); left: calc(50% - 5px); }
}
