:root {
  /* Parents On Pointe — bright "POP" palette (coolors.co)
     sun #FFD154 · coral #FC8853 · pink #FF4D9A · purple #A873F2 · blue #74A9FF */
  --sun:    #ffd154;
  --coral:  #fc8853;
  --pink:   #ff4d9a;
  --purple: #a873f2;
  --blue:   #74a9ff;

  --navy:   #6d28d9;    /* primary deep purple: buttons, app bar, active */
  --navy-2: #7c3aed;    /* link purple (accessible on white) */
  --ink:    #003049;    /* main text color (deep navy) */
  --bg:     #fdf2fb;    /* soft pink-lavender */
  --card:   #ffffff;
  --line:   #f1ddee;
  --muted:  #8a7b93;
  --accent: #ff4d9a;    /* hot pink */
  --accent-dark: #c81e63;
  --go:     #16a75c;    /* RSVP going (kept green for instant read) */
  --maybe:  #f0930b;    /* RSVP maybe */
  --out:    #a99db0;    /* RSVP can't */
  --radius: 16px;
  --shadow: 0 3px 14px rgba(124, 58, 237, .10);
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--navy-2); }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: linear-gradient(120deg, var(--purple) 0%, var(--pink) 55%, var(--coral) 115%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(70, 20, 90, .25);
}
.appbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.appbar__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--sun), var(--pink) 55%, var(--blue));
  color: #fff; font-weight: 800; font-size: 12px; letter-spacing: -0.3px;
  flex: none; box-shadow: 0 2px 6px rgba(255, 77, 154, .4); text-shadow: none;
}
.appbar__logo { width: 42px; height: 42px; flex: none; display: block; border-radius: 11px; }
.appbar__titles { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.appbar__titles strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar__titles small { font-size: 11px; opacity: .8; }

/* Account menu */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.avatar {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; font-weight: 700;
  border: 1.5px solid rgba(255,255,255,.4);
}
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  width: 240px; padding: 12px; z-index: 40;
}
.menu__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.menu__form label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.menu__form input { width: 100%; margin-bottom: 8px; }
.menu__link { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Content shell ---------- */
.content {
  max-width: 680px; margin: 0 auto;
  padding: 16px 16px calc(var(--tab-h) + var(--safe-b) + 20px);
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.page-head h1 { font-size: 22px; margin: 0; }
h1, h2, h3 { color: var(--navy); font-family: 'Montserrat', sans-serif; font-weight: 700; letter-spacing: .1px; }
/* UI chrome stays in the crisp sans; only reading copy uses Lora */
.appbar__titles strong, .auth__card h1, .appbar__mark,
.btn, .chip, .badge, .tabbar__item, .rsvp__btn, .linkbtn,
input, select, textarea, .evt__mon, .evt__day, .evt__date {
  font-family: 'Montserrat', sans-serif;
}
.back { display: inline-block; margin-bottom: 12px; color: var(--accent); text-decoration: none; font-weight: 800; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.card__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-link { text-decoration: none; color: var(--navy-2); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; border-radius: 11px;
  padding: 11px 16px; font-size: 15px; font-weight: 600;
  background: #eef1f8; color: var(--ink); cursor: pointer; text-decoration: none;
  text-align: center; -webkit-appearance: none;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:active { background: var(--navy-2); }
.btn--block { display: block; width: 100%; }
.btn--sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn--danger { background: #c23a45; color: #fff; }
.btn--danger:active { background: #a12e38; }

/* Google Drive folder link card */
.drive-box { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.drive-box:active { background: #f2f4fb; }
.drive-box__icon { font-size: 26px; line-height: 1; }
.drive-box__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.drive-box__text strong { font-size: 15px; }
.drive-box__go { color: var(--navy); font-weight: 700; font-size: 14px; white-space: nowrap; }
.section-h { margin: 22px 2px 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.glvid { width: min(92vw, 900px); aspect-ratio: 16 / 9; }
.glvid iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }

/* Cute colorful folder tiles in the Drive gallery */
.folder-ico { width: 74px; height: auto; color: var(--fc, #FF4D9A);
  filter: drop-shadow(0 5px 9px rgba(0,0,0,.18)); transition: transform .12s ease; }
.folder-card:active .folder-ico { transform: scale(0.94); }
.folder-card .album-card__cover { background: var(--fbg, #FFE4F1); }
.folder-card:nth-child(5n+1) { --fc:#FF4D9A; --fbg:#FFE7F2; }  /* magenta */
.folder-card:nth-child(5n+2) { --fc:#FC8853; --fbg:#FFEBDD; }  /* orange  */
.folder-card:nth-child(5n+3) { --fc:#F4B740; --fbg:#FFF5D9; }  /* gold    */
.folder-card:nth-child(5n+4) { --fc:#A873F2; --fbg:#EFE4FD; }  /* purple  */
.folder-card:nth-child(5n+5) { --fc:#74A9FF; --fbg:#E3EEFF; }  /* blue    */
.linkbtn { border: none; background: none; color: var(--navy-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.linkbtn--danger { color: #c23a45; }
.inline-r { display: inline; }

/* ---------- Chips / filters ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips__spacer { flex: 1 1 auto; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: #eef1f8; color: var(--navy-2); text-transform: uppercase;
}
.badge.small { text-transform: none; padding: 1px 7px; }
.badge--admin { background: var(--navy); color: #fff; }
.badge--mini { background: #ffe3ef; color: var(--accent-dark); }
.badge--urgent { background: #ffe0e6; color: #d81b60; }
.badge--competition, .badge--performance, .badge--convention { background: #ffe3ef; color: var(--accent-dark); }
.badge--closure, .badge--term { background: #efeaf3; color: var(--muted); }
.badge--costumes { background: #ede7fb; color: #6b4bd6; }
.badge--payment { background: #e6f6ee; color: var(--go); }
.badge--reminder { background: #fff2d6; color: #b87400; }
.badge--schedule { background: #d9f6f5; color: #0a807c; }
.badge--rehearsal { background: #d9f6f5; color: #0a807c; }
.badge--studio, .badge--meeting { background: #ede7fb; color: #6b4bd6; }

/* ---------- Bulletins ---------- */
.bulletin__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bulletin__top .muted { margin-left: auto; }
.bulletin__title { font-size: 18px; margin: 2px 0 8px; }
.bulletin__title a { color: var(--navy); text-decoration: none; }
.pin { font-size: 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.admin-actions { display: inline-flex; gap: 14px; align-items: center; margin-left: auto; }

/* ---------- Prose (markdown) ---------- */
.prose { font-size: 15.5px; }
.prose h2 { font-size: 18px; margin: 18px 0 8px; }
.prose h3 { font-size: 15px; margin: 16px 0 6px; }
.prose p { margin: 10px 0; }
.prose ul, .prose ol { margin: 10px 0; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--accent-dark); }
.prose strong { color: var(--ink); }

/* ---------- Comments ---------- */
.comments { margin-top: 4px; }
.comments h2 { font-size: 17px; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment__head { display: flex; align-items: center; gap: 8px; }
.comment__head .muted { margin-right: auto; }
.comment__body { white-space: pre-wrap; margin-top: 3px; font-size: 15px; }
.comment-form, .chat-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.comment-form textarea, .chat-compose textarea { flex: 1; }

/* ---------- Forms ---------- */
input[type=text], input[type=password], input[type=date], input[type=file],
select, textarea {
  width: 100%; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-family: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(29,63,118,.12); }
.stack > label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.stack > label input, .stack > label select, .stack > label textarea { margin-top: 6px; font-weight: 400; }
.form small { font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: auto; }
.row-icon { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.icon-field { width: 84px; flex: none; font-weight: 600; font-size: 14px; }
.row-icon .grow { flex: 1; font-weight: 600; font-size: 14px; }
.row-icon label input { margin-top: 6px; font-weight: 400; }

/* ---------- Empty / flash ---------- */
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty.big { padding: 60px 10px; }
.empty.big h1 { font-size: 46px; margin: 0; color: var(--navy); }
.flash-wrap { margin-bottom: 12px; }
.flash { padding: 11px 14px; border-radius: 11px; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.flash--ok { background: #e6f6ee; color: #157347; border: 1px solid #b7e2c8; }
.flash--error { background: #fde8ea; color: #b02a37; border: 1px solid #f3c2c7; }

/* ---------- Schedule ---------- */
.evt { padding: 0; overflow: hidden; }
.evt__link { display: flex; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.evt__date { flex: none; width: 52px; text-align: center; background: #eef1f8; border-radius: 11px; padding: 8px 0; align-self: flex-start; }
.evt__mon { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--accent-dark); }
.evt__day { display: block; font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1; }
.evt__main { min-width: 0; }
.evt__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.evt__title { font-size: 16.5px; margin: 2px 0; }
.evt__meta { font-size: 13.5px; color: var(--muted); margin: 0; }
.evt__meta.big { font-size: 15px; line-height: 1.8; color: var(--ink); }
.evt--closed .evt__day { color: var(--muted); }
.evt--closed { opacity: .82; }

.rsvp { border-top: 1px solid var(--line); padding: 10px 12px; }
.rsvp__btns { display: flex; gap: 8px; margin-bottom: 8px; }
.rsvp__btns.big { margin: 6px 0 18px; }
.rsvp__btn {
  flex: 1; padding: 10px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted);
}
.rsvp__btn--going.is-on { background: var(--go); border-color: var(--go); color: #fff; }
.rsvp__btn--maybe.is-on { background: var(--maybe); border-color: var(--maybe); color: #fff; }
.rsvp__btn--out.is-on { background: var(--out); border-color: var(--out); color: #fff; }
.rsvp__counts { display: block; font-size: 13px; color: var(--muted); text-decoration: none; }
.rsvp__counts b { color: var(--go); }

.rsvp-lists { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 6px; }
.rsvp-lists h3 { font-size: 13px; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.rsvp-lists .count { background: #eef1f8; border-radius: 999px; padding: 0 7px; font-size: 11px; color: var(--muted); }
.rsvp-lists ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.rsvp-lists li { padding: 3px 0; }

/* ---------- Info ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 14px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.info-tile__icon { font-size: 30px; }
.info-tile__title { font-weight: 700; font-size: 14.5px; }
.info-head { font-size: 22px; }

/* ---------- Photos ---------- */
.upload summary { list-style: none; margin: 0; }
.upload summary::-webkit-details-marker { display: none; }
.upload[open] summary { margin-bottom: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.gallery__item { margin: 0; }
.gallery__item a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #dde3ee; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.gallery__cap { color: var(--ink); font-weight: 600; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,15,30,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; }
.lightbox__cap { color: #fff; margin-top: 12px; text-align: center; }
.lightbox__close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; background: rgba(255,255,255,.15); color: #fff; border: none; font-size: 20px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }

/* ---------- Albums ---------- */
.album-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.album-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink); display: block; }
.album-card__cover { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f3e9fd, #ffe3ef); display: grid; place-items: center; overflow: hidden; }
.album-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-card__ph { font-size: 34px; }
.album-card__meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.album-card__meta strong { font-family: 'Montserrat', sans-serif; font-size: 14px; }

.gallery__item a.media-link { position: relative; }
.media-thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #dde3ee; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.55); pointer-events: none; }
.play-badge::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.lightbox video { max-width: 100%; max-height: 82vh; border-radius: 8px; }

/* ---------- Chat ---------- */
.chat-compose { flex-direction: column; align-items: stretch; }
.chat-compose textarea { margin-bottom: 8px; }
.msg__head { display: flex; align-items: center; gap: 10px; }
.msg__who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg__head .pin { margin-left: auto; }
.avatar--sm { width: 30px; height: 30px; font-size: 13px; background: var(--navy-2); border: none; flex: none; }
.avatar--admin { background: var(--accent); }
.msg__body { white-space: pre-wrap; margin: 8px 0; font-size: 15px; }
.msg__actions { display: flex; gap: 14px; }
.replies { margin-top: 10px; border-left: 2px solid var(--line); padding-left: 12px; }
.reply { display: flex; gap: 8px; padding: 7px 0; }
.reply__main { min-width: 0; }
.reply__body { white-space: pre-wrap; font-size: 14.5px; }
.reply-toggle { margin-top: 8px; }
.reply-toggle summary { cursor: pointer; color: var(--navy-2); font-weight: 600; font-size: 13px; list-style: none; }
.reply-toggle summary::-webkit-details-marker { display: none; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.reply-form textarea { flex: 1; }

/* ---------- Auth ---------- */
.auth { min-height: 84vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth__card { background: #fffdf7; border-radius: 20px; box-shadow: 0 12px 40px rgba(18,39,77,.15); padding: 30px 26px 34px; width: 100%; max-width: 380px; text-align: center; }
.auth__logo-img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto 6px; }
.auth__logo { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, var(--sun), var(--coral) 30%, var(--pink) 55%, var(--purple) 78%, var(--blue)); color: #fff; font-weight: 800; font-size: 24px; letter-spacing: -0.5px; display: grid; place-items: center; margin: 0 auto 14px; box-shadow: 0 8px 22px rgba(255, 77, 154, .35); text-shadow: 0 1px 3px rgba(80, 20, 100, .3); }
.auth__card h1 { margin: 0; font-size: 22px; }
.auth__sub { color: var(--muted); margin: 2px 0 22px; }
.auth .stack { text-align: left; }
.auth__hint { font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  box-shadow: 0 -2px 12px rgba(18,39,77,.05);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 2px; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 800;
  min-height: var(--tab-h);
}
.tabbar__item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar__item.is-active { color: var(--navy); }
.tabbar__item.is-active svg { stroke: var(--accent); }

/* ---------- Contacts + schedule admin ---------- */
.contact__head { display: flex; align-items: center; gap: 8px; }
.contact__meta { margin: 4px 0 8px; word-break: break-word; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.evt__admin { display: flex; gap: 14px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.evt__admin a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }

@media (max-width: 400px) {
  .rsvp-lists { grid-template-columns: 1fr; }
}
@media (min-width: 720px) {
  .content { padding-top: 22px; }
}
