/* ---- Lollapalooza-inspired theme -------------------------------------- */
:root {
  --pink:      #f2b8e0;   /* torn-paper background */
  --pink-deep: #e79fd4;
  --cyan:      #35c9e6;   /* grid empty cells */
  --cyan-dark: #1fb2d4;
  --lime:      #d4e64a;   /* default set blocks */
  --lime-dark: #b9cc2f;
  --ink:       #0e0e0e;   /* headers / text */
  --must:      #35c463;   /* green */
  --must-dark: #26a54f;
  --maybe:     #ff9d2e;   /* orange */
  --maybe-dark:#e8851a;
  --no:        #ec4d4d;   /* red */
  --no-dark:   #d13636;

  --rail-w: 46px;
  --col-min: 116px;
  --px-per-min: 1.28;     /* vertical scale of the time grid */
  --hdr-h: 46px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Archivo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, #b7e3f0 0 0, transparent 30%),
    radial-gradient(circle at 90% 4%, #b7e3f0 0 0, transparent 24%),
    var(--pink);
  -webkit-text-size-adjust: 100%;
}

/* torn-paper stripes top/left like the poster edges */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 6%, rgba(53,201,230,.28) 6% 9%, transparent 9% 12%),
    linear-gradient(115deg, transparent 0 88%, rgba(147,116,220,.22) 88% 92%, transparent 92%);
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 12px 12px 64px; }

/* ---- header ----------------------------------------------------------- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 6px 2px 12px;
}
.logo {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(30px, 7vw, 56px);
  line-height: .9; letter-spacing: -.02em; color: var(--ink);
  margin: 0;
}
.logo .p2 { color: var(--ink); }
.tagline { font-weight: 800; font-size: 13px; opacity: .7; margin-top: 2px; }

.top .spacer { flex: 1 1 auto; }

.me {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px;
  padding: 6px 10px; box-shadow: 3px 3px 0 var(--ink);
}
.me label { font-weight: 800; font-size: 12px; text-transform: uppercase; }
.me input {
  border: none; outline: none; font: inherit; font-weight: 800; font-size: 15px;
  width: 130px; background: transparent;
}
.btn {
  font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 12px; background: var(--lime);
  padding: 8px 14px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .05s ease, box-shadow .05s ease;
  text-transform: uppercase; letter-spacing: .01em; color: var(--ink);
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--cyan); }
.btn.ghost { background: #fff; }

/* ---- controls: day + view -------------------------------------------- */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  font-family: inherit; font-weight: 800; cursor: pointer; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px 12px 0 0; background: var(--pink-deep);
  padding: 9px 14px; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink);
  font-size: 14px;
}
.tab .d { display: block; font-size: 10px; font-weight: 700; opacity: .75; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab[aria-selected="true"] .d { opacity: .85; }

.viewtoggle { display: flex; margin-left: auto; border: 3px solid var(--ink);
  border-radius: 12px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); }
.viewtoggle button {
  font-family: inherit; font-weight: 800; cursor: pointer; border: none;
  padding: 9px 16px; background: #fff; text-transform: uppercase; font-size: 13px; color: var(--ink);
}
.viewtoggle button[aria-selected="true"] { background: var(--ink); color: #fff; }

/* ---- legend ----------------------------------------------------------- */
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 2px 0 12px; font-weight: 700; font-size: 13px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 4px; display: inline-block; }
.swatch.must { background: var(--must); }
.swatch.maybe { background: var(--maybe); }
.swatch.no { background: var(--no); }
.swatch.unset { background: var(--lime); }

/* ---- layout switcher -------------------------------------------------- */
.layoutswitch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lslabel { font-weight: 800; font-size: 12px; text-transform: uppercase; opacity: .7; }
.ls {
  font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 10px; background: #fff; padding: 7px 12px;
  box-shadow: 2px 2px 0 var(--ink);
}
.ls[aria-selected="true"] { background: var(--ink); color: #fff; }

/* ---- schedule grid ---------------------------------------------------- */
.board.layout-grid {
  border: 4px solid var(--ink); border-radius: 14px; overflow: hidden;
  background: var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.25);
}
.board-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- agenda (list + stages layouts) ----------------------------------- */
.agenda { display: flex; flex-direction: column; gap: 7px; }
.ag-empty { font-weight: 700; padding: 20px; text-align: center; opacity: .6; }
.ag-row {
  display: flex; align-items: stretch; gap: 10px; width: 100%; text-align: left;
  background: var(--lime); border: 3px solid var(--ink); border-radius: 12px;
  padding: 9px 11px; box-shadow: 2px 2px 0 var(--ink); font: inherit; color: var(--ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ag-row.dim { opacity: .5; }
.ag-time {
  flex: 0 0 52px; display: flex; flex-direction: column; justify-content: center;
  font-weight: 800; font-size: 12px; line-height: 1.15; border-right: 2px solid rgba(14,14,14,.25); padding-right: 8px;
}
.ag-time b { font-family: 'Archivo Black', sans-serif; font-size: 14px; }
.ag-time span { opacity: .7; }
.ag-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.ag-stage { font-weight: 800; font-size: 10px; letter-spacing: .04em; opacity: .7; text-transform: uppercase; }
.ag-name { font-family: 'Archivo Black', sans-serif; font-size: 16px; line-height: 1.08; }
.ag-main .chips { margin-top: 3px; }

/* rating states colour the whole row */
.ag-row[data-r="must"]  { background: var(--must); }
.ag-row[data-r="maybe"] { background: var(--maybe); }
.ag-row[data-r="no"]    { background: var(--no); opacity: .6; }

.ag-badge {
  flex: 0 0 auto; align-self: center; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink);
  background: #fff; font-weight: 900; font-size: 18px;
}
.ag-badge.must { background: var(--must); } .ag-badge.maybe { background: var(--maybe); } .ag-badge.no { background: var(--no); }
.ag-count { flex: 0 0 auto; align-self: center; display: flex; gap: 4px; font-size: 12px; font-weight: 900; }
.ag-count .c { padding: 3px 6px; border-radius: 9px; border: 2px solid var(--ink); }
.ag-count .c.m { background: var(--must); } .ag-count .c.y { background: var(--maybe); }

/* stage tab bar for the 'stages' layout */
.stagebar {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 0 0 10px; margin: 0 0 4px; scrollbar-width: thin;
}
.stab {
  flex: 0 0 auto; font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 20px; background: #fff; padding: 8px 14px; box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}
.stab[aria-selected="true"] { background: var(--ink); color: #fff; }
.grid {
  display: grid;
  grid-template-columns: var(--rail-w) repeat(7, minmax(var(--col-min), 1fr));
  min-width: 680px; background: var(--ink);
}
.grid.head { position: sticky; top: 0; z-index: 6; }

.cell-hdr {
  background: var(--ink); color: #fff; font-family: 'Archivo Black', sans-serif;
  font-size: 12.5px; text-align: center; padding: 10px 4px; line-height: 1.05;
  border-right: 1px solid #333; display: flex; align-items: center; justify-content: center;
  min-height: var(--hdr-h);
}
.cell-hdr.rail { background: var(--ink); }

.railcol { position: relative; background: var(--cyan); border-right: 2px solid var(--ink); }
.railcol .hr {
  position: absolute; left: 0; right: 0; border-top: 2px solid rgba(14,14,14,.35);
  font-family: 'Archivo Black', sans-serif; font-size: 10.5px; color: var(--ink);
  padding: 2px 3px 0; text-align: right;
}

.stagecol {
  position: relative; background:
    repeating-linear-gradient(var(--cyan) 0, var(--cyan) 102px, var(--cyan-dark) 102px, var(--cyan-dark) 102.5px);
  border-right: 2px solid var(--ink);
}
.stagecol:last-child { border-right: none; }

/* a performance block */
.set {
  position: absolute; left: 4px; right: 4px;
  background: var(--lime); border: 2.5px solid var(--ink); border-radius: 8px;
  padding: 5px 6px; overflow: hidden; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(14,14,14,.5);
  transition: transform .05s ease, filter .1s ease;
  display: flex; flex-direction: column; gap: 2px;
  -webkit-user-select: none; user-select: none;
}
.set:hover { transform: translateY(-1px); filter: brightness(1.03); z-index: 4; }
.set-head { display: flex; align-items: flex-start; gap: 4px; }
.set .nm { flex: 1 1 auto; min-width: 0; font-family: 'Archivo Black', sans-serif; font-size: 12.5px; line-height: 1.02; letter-spacing: -.01em; }
.set .tm { font-size: 10.5px; font-weight: 800; opacity: .82; }
.set.tiny .nm { font-size: 11px; }
.set.tiny .tm { display: none; }

/* badge slot (rating tag in My view, counts in Group view) */
.badge { flex: 0 0 auto; }
.badge:empty { display: none; }

/* rating states (My Picks view) */
.set[data-r="must"]  { background: var(--must); }
.set[data-r="maybe"] { background: var(--maybe); }
.set[data-r="no"]    { background: var(--no); opacity: .62; filter: saturate(.85); }
.rtag {
  font-size: 12px; font-weight: 900; line-height: 1; padding: 2px 5px;
  border: 1.5px solid var(--ink); border-radius: 20px; background: #fff;
}
.rtag.must  { background: var(--must); }
.rtag.maybe { background: var(--maybe); }
.rtag.no    { background: var(--no); }

/* group view: member chips inside a block */
.chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.chip {
  font-size: 9.5px; font-weight: 900; line-height: 1; padding: 2px 4px;
  border: 1.5px solid var(--ink); border-radius: 20px; background: #fff; color: var(--ink);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.must  { background: var(--must); }
.chip.maybe { background: var(--maybe); }
/* Group-view blocks grow to fit everyone who picked the set (never clip names) */
.set.group { cursor: default; height: auto; overflow: visible; z-index: 2; }
.set.group:has(.chips) { z-index: 3; }        /* rated blocks sit above empty ones */
.set.group:hover { z-index: 8; }
.set.group.dim { opacity: .5; z-index: 1; }
.set .count { display: flex; gap: 3px; font-size: 10px; font-weight: 900; }
.set .count .c { padding: 1px 4px; border-radius: 8px; border: 1.5px solid var(--ink); line-height: 1.2; }
.set .count .c.m { background: var(--must); }
.set .count .c.y { background: var(--maybe); }

/* ---- members / filter bar --------------------------------------------- */
.members { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; font-weight: 800; font-size: 13px; }
.members .mlabel { text-transform: uppercase; opacity: .7; font-size: 12px; }
.members .mchip { background: #fff; border: 2.5px solid var(--ink); border-radius: 20px; padding: 4px 10px; box-shadow: 2px 2px 0 var(--ink); }
.members .mchip.you { background: var(--cyan); }

/* interactive filter chips (group view) */
.fchip {
  display: inline-flex; align-items: stretch; border: 2.5px solid var(--ink); border-radius: 20px;
  overflow: hidden; box-shadow: 2px 2px 0 var(--ink); background: var(--cyan); font: inherit; font-weight: 800; font-size: 13px;
}
.fchip .solo, .fchip .ftoggle {
  font: inherit; font-weight: 800; border: none; background: transparent; cursor: pointer; color: var(--ink); padding: 4px 6px;
}
.fchip .solo { border-right: 2px solid rgba(14,14,14,.25); font-size: 12px; opacity: .65; }
.fchip .solo:hover { opacity: 1; }
.fchip .ftoggle { padding: 4px 11px 4px 8px; }
.fchip.off { background: repeating-linear-gradient(45deg,#e7e7e7 0 6px,#dcdcdc 6px 12px); opacity: .55; }
.fchip.off .ftoggle { text-decoration: line-through; }
.chipbtn {
  font: inherit; font-weight: 800; font-size: 12px; cursor: pointer; color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 20px; background: var(--lime); padding: 5px 11px; box-shadow: 2px 2px 0 var(--ink);
}

/* ---- side stages ------------------------------------------------------ */
.sides { margin: 16px 0; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.sidebox { border: 3px solid var(--ink); border-radius: 12px; background: var(--lime); padding: 10px 12px; box-shadow: 3px 3px 0 var(--ink); }
.sidebox h3 { margin: 0 0 6px; font-family: 'Archivo Black', sans-serif; font-size: 13px; text-transform: uppercase; }
.sidebox ul { margin: 0; padding-left: 16px; font-weight: 700; font-size: 12.5px; line-height: 1.5; }

/* ---- toast / banners -------------------------------------------------- */
.banner {
  border: 3px solid var(--ink); border-radius: 12px; background: #fff; padding: 10px 14px;
  font-weight: 700; font-size: 13px; margin: 0 0 12px; box-shadow: 3px 3px 0 var(--ink);
}
.banner.warn { background: #fff2c2; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font-weight: 800; padding: 10px 16px; border-radius: 12px;
  opacity: 0; transition: all .2s ease; z-index: 50; font-size: 14px; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.foot { text-align: center; font-weight: 700; font-size: 12px; opacity: .6; margin-top: 20px; }

@media (max-width: 640px) {
  :root { --col-min: 104px; --rail-w: 40px; }
  .logo { font-size: 34px; }
  .viewtoggle { margin-left: 0; }
  .sides { grid-template-columns: 1fr; }
}

/* dialog for sharing */
dialog.share { border: 4px solid var(--ink); border-radius: 16px; padding: 0; max-width: 440px; width: 92vw; box-shadow: 6px 6px 0 rgba(0,0,0,.3); }
dialog.share::backdrop { background: rgba(14,14,14,.5); }
.share-inner { padding: 18px; }
.share-inner h2 { font-family: 'Archivo Black', sans-serif; margin: 0 0 8px; font-size: 20px; }
.share-inner p { font-weight: 700; font-size: 13px; margin: 6px 0; }
/* capture banner (only present during image export) */
.capbanner { background: var(--pink); border-bottom: 4px solid var(--ink); padding: 16px 18px; }
.capttl { font-family: 'Archivo Black', sans-serif; font-size: 40px; line-height: .9; color: var(--ink); }
.capsub { font-weight: 800; font-size: 16px; margin-top: 6px; color: var(--ink); }

/* image preview dialog */
dialog.imgdlg { border: 4px solid var(--ink); border-radius: 16px; padding: 0; max-width: 92vw; width: auto; box-shadow: 6px 6px 0 rgba(0,0,0,.3); background: #fff; }
dialog.imgdlg::backdrop { background: rgba(14,14,14,.6); }
.imgwrap { padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.imgwrap img { max-width: 100%; max-height: 68vh; border: 3px solid var(--ink); border-radius: 8px; display: block; }
.imgwrap .hint { font-weight: 700; font-size: 12.5px; opacity: .75; margin: 0; text-align: center; max-width: 380px; }
.imgbtns { display: flex; gap: 8px; }

.linkrow { display: flex; gap: 6px; margin: 8px 0; }
.linkrow input { flex: 1; min-width: 0; border: 3px solid var(--ink); border-radius: 10px; padding: 8px; font: inherit; font-weight: 700; font-size: 12px; }
.share-inner .lbl { font-weight: 800; font-size: 13px; margin: 14px 0 2px; }
.share-inner .hint { font-weight: 600; font-size: 11.5px; opacity: .7; margin: 4px 0 0; }
.resume-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.resume-btn { padding: 7px 12px; }
.share-inner .done { margin-top: 16px; width: 100%; }
.share-inner .orline { text-align: center; font-weight: 800; font-size: 12px; opacity: .55; margin: 12px 0 4px; }
.nickbig { flex: 1; min-width: 0; border: 3px solid var(--ink); border-radius: 10px; padding: 11px 12px; font: inherit; font-weight: 800; font-size: 16px; }
