/* Mobile-first. Base styles target ~375px; larger screens are enhancements. */
:root {
  /* Client color board: primary d0006f 0f5b77 b7df56 000000 ffffff; secondary 4d2822 ffd400 325369 f8c2e0 */
  --pink: #D0006F;
  --pink-soft: #F18FC5;   /* client chose this over the board's f8c2e0 */
  --ink: #000000;
  --pink-rgb: 208 0 111;   /* same as --pink, for translucent glows */
  --paper: #FFFFFF;
  --yellow: #FFD400;
  --lime: #B7DF56;
  --slate: #325369;
  --radius: 16px;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --script: "Damion", "Brush Script MT", cursive;   /* matches the "Quietly Unhinged Presents" flyer lettering */
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); line-height: 1.5; color: var(--paper); background: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- Buttons (44px+ tap targets) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 22px; border: 3px solid var(--ink); border-radius: 999px; white-space: nowrap;
  font: 800 1rem/1 var(--body); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: transform .08s;
}
.btn:active { transform: translate(2px, 2px); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--ink  { background: var(--ink); color: var(--yellow); }
.btn--off  { background: transparent; color: var(--pink-soft); border-color: var(--slate); cursor: default; }
.btn--danger { background: var(--pink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero { background: var(--pink-soft); color: var(--ink); padding: 14px 16px 28px; text-align: center; }
.hero__inner { max-width: 720px; margin: 0 auto; display: grid; gap: 14px; justify-items: center; }
.hero__title { margin: 0; line-height: 0; }   /* holds the logo image */
.hero__logo { width: min(88vw, 560px); height: auto; }
.hero__photo { width: min(78vw, 320px); border: 4px solid var(--ink); border-radius: 50%; overflow: hidden; background: var(--ink); }
.hero__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- Shows ---------- */
.shows__inner { max-width: 760px; margin: 0 auto; }
.empty { padding: 24px; border: 2px dashed var(--slate); border-radius: var(--radius); text-align: center; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.card { background: var(--pink); border: 3px solid var(--pink-soft); border-radius: var(--radius); overflow: hidden; }
.card__when { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--pink-soft); color: var(--ink); padding: 12px 18px; }
.card__dow  { font: 400 1.1rem/1 var(--display); text-transform: uppercase; letter-spacing: .08em; }
.card__md   { font: 400 1.9rem/1 var(--display); text-transform: uppercase; }
.card__time { margin-left: auto; font-weight: 800; }
.card__body { padding: 16px 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.card__title { margin: 0; font: 400 1.5rem/1.1 var(--script); color: var(--pink-soft); white-space: nowrap; }
.card__venue { margin: 0; font: 400 1.6rem/1.1 var(--display); text-transform: uppercase; white-space: nowrap; }
.card__addr { display: inline-block; padding: 8px 0; color: var(--pink-soft); text-underline-offset: 3px; }   /* padding = comfortable tap target */
.card__who  { margin: 4px 0 0; font-weight: 800; color: var(--yellow); }
.card__desc { margin: 0; color: var(--paper); }
.card__cta  { margin-top: 10px; width: 100%; }

.foot { padding: 32px 16px 48px; text-align: center; color: var(--pink-soft); font-size: .9rem; }
.foot p { margin: 4px 0; }
.foot__links a { margin: 0 8px; color: var(--pink-soft); }

/* ---------- Admin ---------- */
.admin { background: var(--paper); color: var(--ink); min-height: 100vh; }
.admin a { color: var(--ink); }
.admin__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--pink); padding: 12px 16px; border-bottom: 4px solid var(--ink); }
.admin__brand { font: 400 1.4rem/1 var(--display); text-transform: uppercase; text-decoration: none; }
.admin__nav { display: flex; gap: 12px; align-items: center; font-weight: 800; }
.admin__nav form { margin: 0; }
.link-btn { background: none; border: 0; padding: 8px 0; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; color: var(--ink); min-height: 44px; }
.admin__main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.admin h1 { font: 400 2rem/1 var(--display); text-transform: uppercase; margin: 0 0 16px; }

.notice { padding: 12px 16px; border: 3px solid var(--ink); border-radius: 12px; font-weight: 800; margin-bottom: 16px; background: var(--yellow); }
.notice--error { background: var(--pink); color: var(--paper); }

.login { max-width: 420px; margin: 0 auto; padding: 48px 16px; }
.login__box { background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); padding: 24px; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; }
.field small { color: var(--slate); }
.field .err { color: var(--pink); font-weight: 800; }
.form input, .form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper);
  border: 3px solid var(--ink); border-radius: 12px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form .row { display: grid; gap: 16px; }
.form__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.item { background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; }
.item--past { opacity: .6; }
.item__when { font-weight: 800; }
.item__venue { font: 400 1.3rem/1.1 var(--display); text-transform: uppercase; }
.item__actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.item__actions form { margin: 0; }
.item__actions .btn { min-height: 44px; padding: 0 16px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--yellow); font-size: .75rem; font-weight: 800; text-transform: uppercase; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .hero { padding: 24px 24px 40px; }
  .card { display: grid; grid-template-columns: 170px 1fr; }
  .card__when { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 18px; }
  .card__time { margin-left: 0; margin-top: 8px; }
  .card__cta { width: auto; justify-self: start; }
  .form .row { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

.card__doors { display: block; font-weight: 600; font-size: .85rem; }


.card__top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.card__main { display: grid; gap: 6px; min-width: 0; }
.card__flyer { flex: 0 0 96px; padding: 5px; border-radius: 10px; line-height: 0; background: var(--paper); }   /* white frame; padding keeps the flyer's square corners clear of the rounded edge */
.card__flyer img { width: 100%; height: auto; border-radius: 0; }
.flyer-preview { max-width: 200px; border: 3px solid var(--ink); border-radius: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; }
.form input[type=file] { padding: 8px; }
.form .check input { width: 22px; min-height: 22px; }
@media (min-width: 640px) { .card__flyer { flex-basis: 150px; } }

/* "Hosted by" badge: sits below the photo, overlapping its bottom edge */
.hero__host {
  position: relative; z-index: 1; margin: -52px 0 22px; display: inline-flex; flex-direction: column; align-items: center;
  background: var(--ink); color: var(--paper); padding: 10px 18px 14px; border-radius: 22px;
  transform: rotate(-2deg);
}
.hero__host-label { font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; color: var(--lime); }
.hero__host-name { font: 400 clamp(1.6rem, 8.6vw, 3.6rem)/1 var(--script); color: var(--pink); white-space: nowrap; }

/* ---------- Flyer lightbox ---------- */
body.modal-open { overflow: hidden; }
.flyer-dialog {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%; margin: 0; overflow: hidden;
}
.flyer-dialog[open] { display: flex; align-items: center; justify-content: center; }
.flyer-dialog::backdrop { background: rgba(0, 0, 0, .88); }
.flyer-dialog img {
  max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); width: auto; height: auto;
  object-fit: contain; border-radius: 10px;
}
.flyer-dialog__close {
  position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--ink); background: var(--pink); color: var(--paper); font: 700 2rem/1 var(--body);
  cursor: pointer; display: grid; place-items: center; padding: 0 0 4px; z-index: 1;
}

/* ---------- Desktop: flyer gets its own column ---------- */
@media (min-width: 900px) {
  .shows__inner { max-width: 980px; }
  .card__body { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 28px; align-content: start; }
  .card__top { display: contents; }               /* lets the flyer become a grid column of the body */
  .card__body > *, .card__main { grid-column: 1; }
  .card__flyer { grid-column: 2; grid-row: 1 / span 6; flex: none; align-self: start; width: 220px; }
  .card__body:not(:has(.card__flyer)) { grid-template-columns: minmax(0, 1fr); }
  /* pin the ticket button to the bottom of the card, level with the flyer's bottom edge */
  .card__body { grid-template-rows: auto auto auto auto auto 1fr; }
  .card__cta { grid-row: 6; align-self: end; }
}

/* ---------- Hero buttons ---------- */
.hero__ctas { display: flex; gap: 12px; justify-content: center; width: 100%; max-width: 460px; }
.hero__ctas .btn { flex: 1 1 0; min-width: 0; padding: 0 8px; text-align: center; line-height: 1.15; font-size: clamp(.78rem, 3.6vw, 1.05rem); }
@media (max-width: 339px) { .hero__ctas { flex-direction: column; } }

/* ---------- About ---------- */
.about { padding: 24px 16px 24px; }
.about__inner { max-width: 760px; margin: 0 auto; }
.about p { font-size: 1.05rem; color: var(--paper); }
.script-title { margin: 32px 0 12px; font: 400 clamp(1.7rem, 8.4vw, 2.6rem)/1 var(--script); color: var(--pink); white-space: nowrap; }
.about__inner > .script-title:first-child { margin-top: 0; }
.note { margin: 28px 0 0; padding: 14px 16px 12px; border: 2px solid var(--lime); border-radius: 14px; background: var(--ink); color: var(--paper); }
.note p { margin: 0; font-size: .98rem; line-height: 1.45; }
.note .note__label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.note__label::before { content: "i"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--pink); color: var(--paper); font: italic 700 .8rem/1 Georgia, serif; }

/* ---------- Public forms ---------- */
.panel { background: var(--paper); color: var(--ink); }
.panel--alt { background: var(--pink-soft); }
.panel__inner { max-width: 620px; margin: 0 auto; }
.panel .script-title { margin-top: 0; }
.panel__lead { margin: 0 0 20px; font-weight: 600; font-size: 1.05rem; }
.opt { font-weight: 400; color: var(--slate); font-size: .85em; }
.counter { text-align: right; }
.notice--ok { background: var(--yellow); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join { background: var(--pink-soft); color: var(--ink); }
.join .script-title { margin-top: 0; }
.join .field label, .join .field small { color: var(--ink); }
.join .opt { color: var(--slate); }
.join .field .err { color: var(--paper); background: var(--ink); padding: 2px 8px; border-radius: 6px; display: inline-block; }
.join .notice { color: var(--ink); }
.foot__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-bottom: 12px; }
.foot__nav a { color: var(--pink-soft); display: inline-block; padding: 10px 4px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }

.admin__nav { flex-wrap: wrap; }
.item > span { overflow-wrap: anywhere; }

/* =====================================================================
   Multi-page layout
   ===================================================================== */
body.public { padding-bottom: 110px; }          /* room so the bubble never covers content */

/* ---------- Page banner (every page except Home) ---------- */
.pagebanner { background: var(--pink-soft); color: var(--ink); text-align: center; padding: 22px 16px 24px; border-bottom: 4px solid var(--ink); }
.pagebanner__title { color: var(--pink); margin: 0; font: 400 clamp(2.2rem, 10.5vw, 5rem)/1 var(--script); white-space: nowrap; }
.pagebanner__sub { margin: 6px 0 0; font-weight: 700; }

main.shows, main.panel, main.join { min-height: 55vh; }
.shows--next { min-height: 0; }
.more { margin: 20px 0 0; text-align: center; }
.panel > .panel__inner > .panel__lead:first-child { margin-top: 0; }

/* ---------- Floating bubble menu ---------- */
.bubble { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50; }
.bubble summary { list-style: none; }
.bubble summary::-webkit-details-marker { display: none; }
.bubble[open]::before { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: -1; }

.bubble__btn {
  width: 72px; height: 72px; border-radius: 50%; cursor: pointer; user-select: none;
  background: var(--pink); color: var(--paper); border: 4px solid var(--ink);
  box-shadow: 0 0 0 0 rgb(var(--pink-rgb) / .6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  animation: bubble-pulse 2.6s ease-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.bubble[open] .bubble__btn { animation: none; background: var(--lime); color: var(--ink); }
.bubble__btn:active { transform: translate(2px, 2px); }

/* hamburger that turns into an X */
.bubble__icon { position: relative; width: 26px; height: 3px; background: currentColor; border-radius: 2px; transition: background .15s; }
.bubble__icon::before, .bubble__icon::after { content: ""; position: absolute; left: 0; width: 26px; height: 3px; background: currentColor; border-radius: 2px; transition: transform .2s, top .2s; }
.bubble__icon::before { top: -8px; }
.bubble__icon::after  { top: 8px; }
.bubble[open] .bubble__icon { background: transparent; }
.bubble[open] .bubble__icon::before { top: 0; transform: rotate(45deg); }
.bubble[open] .bubble__icon::after  { top: 0; transform: rotate(-45deg); }

.bubble__menu { position: absolute; right: 0; bottom: 88px; }
.bubble__menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; justify-items: end; }
.bubble__link {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; min-height: 52px; padding: 0 22px;
  background: var(--paper); color: var(--ink); text-decoration: none; font: 800 1.05rem/1 var(--body);
  border: 3px solid var(--ink); border-radius: 999px;
}
.bubble__link[aria-current="page"] { background: var(--lime); }
.bubble__link:hover { background: var(--pink-soft); }
.bubble[open] .bubble__menu li { animation: bubble-pop .22s ease-out backwards; }
.bubble[open] .bubble__menu li:nth-last-child(1) { animation-delay: .00s; }
.bubble[open] .bubble__menu li:nth-last-child(2) { animation-delay: .04s; }
.bubble[open] .bubble__menu li:nth-last-child(3) { animation-delay: .08s; }
.bubble[open] .bubble__menu li:nth-last-child(4) { animation-delay: .12s; }
.bubble[open] .bubble__menu li:nth-last-child(5) { animation-delay: .16s; }
.bubble[open] .bubble__menu li:nth-last-child(6) { animation-delay: .20s; }

@keyframes bubble-pop   { from { opacity: 0; transform: translateY(14px) scale(.85); } }
@keyframes bubble-pulse { 0% { box-shadow: 0 0 0 0 rgb(var(--pink-rgb) / .55); }
                          70%, 100% { box-shadow: 0 0 0 18px rgb(var(--pink-rgb) / 0); } }

@media (min-width: 900px) {
  .bubble { right: 28px; bottom: 28px; }
  .bubble__btn { width: 80px; height: 80px; }
  .bubble__menu { bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble__btn { animation: none; }
  .bubble[open] .bubble__menu li { animation: none; }
  .bubble__icon, .bubble__icon::before, .bubble__icon::after { transition: none; }
}

/* ---------- Mobile polish ---------- */
.bubble--hidden { opacity: 0; pointer-events: none; }                  /* hidden while typing in a form */
.bubble__menu { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; padding: 4px 4px 6px 12px; overscroll-behavior: contain; }
@media (max-height: 500px) {                                           /* phone held sideways */
  .bubble__btn { width: 60px; height: 60px; }
  .bubble__menu { bottom: 72px; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); }
  .bubble__menu ul { gap: 6px; }
  .bubble__link { min-height: 44px; padding: 0 18px; font-size: .95rem; }
}

/* Admin top bar: tap-friendly links (owner will often edit from a phone) */
.admin__bar { padding: 6px 12px; }
.admin__brand, .admin__nav a { display: inline-flex; align-items: center; min-height: 44px; }
.admin__nav a { padding: 0 8px; }
.admin__nav { gap: 2px 4px; }

.mailto-alt { margin: 20px 0 0; font-weight: 600; }
.mailto-alt a { color: var(--pink); font-weight: 800; }

/* Secondary header band under the pink page banner */
.subbanner { background: var(--ink); color: var(--pink-soft); text-align: center; padding: 14px 16px 16px; }
.subbanner__title { margin: 0; font: 400 clamp(1.3rem, 7vw, 2.6rem)/1.05 var(--script); white-space: nowrap; }

/* ---------- Uniform page rhythm: every content page shares the same section padding ---------- */
main.shows, main.panel, main.join { padding: 40px 16px 48px; }
@media (min-width: 640px) { main.shows, main.panel, main.join { padding: 48px 24px 56px; } }
main.shows--next { padding-bottom: 0; }

/* ---------- Social buttons: fan out beside the menu button when it is open (same size as the menu button) ---------- */
.bubble__socials { position: absolute; right: 84px; bottom: 0; display: flex; gap: 8px; }
.bubble__social {
  width: min(72px, calc((100vw - 150px) / 3)); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); border: 4px solid var(--ink); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bubble__social svg { width: 34px; height: 34px; }
.bubble__social:hover { background: var(--pink-soft); }
.bubble[open] .bubble__social { animation: bubble-pop .22s ease-out backwards; }
.bubble[open] .bubble__social:nth-child(3) { animation-delay: .00s; }
.bubble[open] .bubble__social:nth-child(2) { animation-delay: .05s; }
.bubble[open] .bubble__social:nth-child(1) { animation-delay: .10s; }
@media (min-width: 900px) { .bubble__socials { right: 94px; } .bubble__social { width: 80px; } .bubble__social svg { width: 38px; height: 38px; } }
@media (max-height: 500px) { .bubble__socials { right: 72px; } .bubble__social { width: 60px; } .bubble__social svg { width: 28px; height: 28px; } }
