/* AMM Members App V3 - Member Hub design (dark hero, overlapping member card, coloured icon grid, floating nav).
   Colour themes: set AppSettings "Theme" in web.config (orange, navy, red, green, pink, lilac, black); Site.Master writes it to
   <html data-theme="...">. Each theme only overrides the colour variables below.
   To add a theme, copy the [data-theme="navy"] block, rename it and change the colours. */

/* Orange (default) */
:root {
  --brand: #EE6A1A;
  --brand-2: #F7942F;
  --brand-rgb: 238, 106, 26;
  --brand-soft: #FDEBDD;
  --accent-on-dark: #EE6A1A;
  --tag-text: #B44E0E;
  --icon-soft: #D9A98A;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EE6A1A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #24282F;
  --header-2: #2E333B;
  --bg: #F5F3F1;
  --card: #FFFFFF;
  --card-warm: #FFF7F1;
  --ink: #1F2328;
  --muted: #6B7280;
  --line: #ECE6E1;
  --ok-bg: #E7F6EC;
  --ok-text: #1E6B3A;
  --error-bg: #FDE8E8;
  --error-text: #9B1C1C;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 6px 18px rgba(var(--brand-rgb), 0.10), 0 1px 3px rgba(31, 35, 40, 0.06);
  --nav-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Navy */
[data-theme="navy"] {
  --brand: #1E4A9A;
  --brand-2: #3368C4;
  --brand-rgb: 30, 74, 154;
  --brand-soft: #E2EAF8;
  --accent-on-dark: #7FA8F0;
  --tag-text: #163C80;
  --icon-soft: #9DB3DA;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E4A9A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #0D1B36;
  --header-2: #1A2E57;
  --bg: #F2F4F8;
  --card-warm: #F5F8FE;
  --line: #E1E6EF;
}

/* Red */
[data-theme="red"] {
  --brand: #C8102E;
  --brand-2: #E0344F;
  --brand-rgb: 200, 16, 46;
  --brand-soft: #FBE3E7;
  --accent-on-dark: #E8435C;
  --tag-text: #9A0D24;
  --icon-soft: #E2A3AE;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8102E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #1E1F24;
  --header-2: #2C2E35;
  --bg: #F6F3F3;
  --card-warm: #FFF6F7;
  --line: #EFE4E6;
}

/* Green */
[data-theme="green"] {
  --brand: #1E8E4F;
  --brand-2: #2FB066;
  --brand-rgb: 30, 142, 79;
  --brand-soft: #DFF3E7;
  --accent-on-dark: #3CC47A;
  --tag-text: #146B3A;
  --icon-soft: #9FCDB2;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E8E4F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #13241B;
  --header-2: #1F3A2B;
  --bg: #F2F6F3;
  --card-warm: #F5FBF7;
  --line: #E0EAE4;
}

/* Pink */
[data-theme="pink"] {
  --brand: #D6336C;
  --brand-2: #EC5A8D;
  --brand-rgb: 214, 51, 108;
  --brand-soft: #FCE4ED;
  --accent-on-dark: #F06A99;
  --tag-text: #A31F52;
  --icon-soft: #EBA9C2;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D6336C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #2A1E25;
  --header-2: #3D2A35;
  --bg: #F8F3F5;
  --card-warm: #FFF6F9;
  --line: #F0E2E8;
}

/* Lilac */
[data-theme="lilac"] {
  --brand: #8656C9;
  --brand-2: #A07BDD;
  --brand-rgb: 134, 86, 201;
  --brand-soft: #EEE6FA;
  --accent-on-dark: #B79AF0;
  --tag-text: #5E35A0;
  --icon-soft: #C5B2E6;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238656C9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #221C33;
  --header-2: #352B4F;
  --bg: #F5F3F9;
  --card-warm: #F9F6FE;
  --line: #E7E2F0;
}

/* Black */
[data-theme="black"] {
  --brand: #141414;
  --brand-2: #3A3A3A;
  --brand-rgb: 20, 20, 20;
  --brand-soft: #E9E9E9;
  --accent-on-dark: #C9C9C9;
  --tag-text: #141414;
  --icon-soft: #B5B5B5;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --header: #0A0A0A;
  --header-2: #1F1F1F;
  --bg: #F4F4F4;
  --card-warm: #FAFAFA;
  --line: #E4E4E4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--brand); }
h1, h2 { margin: 0; line-height: 1.15; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }

.ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.hub-header {
  position: relative;
  color: #FFFFFF;
  background: radial-gradient(120% 90% at 85% 10%, var(--header-2) 0%, var(--header) 60%);
  padding-top: var(--safe-top);
}

.hub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px 0;
}


.hub-actions { display: flex; gap: 6px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #FFFFFF;
}
.icon-btn .ico { width: 26px; height: 26px; }
.icon-btn:active { background: rgba(255, 255, 255, 0.1); }

.hub-hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 22px 20px 46px;
}

.hero-greet {
  border-left: 5px solid var(--accent-on-dark);
  padding-left: 18px;
}
.hero-greet h1 { font-size: 2rem; font-weight: 800; }
.hero-greet p { margin: 2px 0 0; font-size: 1.35rem; font-weight: 500; opacity: 0.92; }

.hero-page h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 800;
}
.hero-page h1 .ico { width: 36px; height: 36px; color: var(--accent-on-dark); stroke-width: 1.9; }
.hero-page p { margin: 10px 0 0; font-size: 1rem; opacity: 0.9; overflow-wrap: anywhere; }

.hub-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 40px;
  display: block;
}
.wave-accent { fill: var(--accent-on-dark); }
.wave-page { fill: var(--bg); }

/* ---------- Main ---------- */
.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px 32px;
}
.has-nav .app-main { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 24px); }

/* ---------- Hub sections and tiles ---------- */
.hub-section { margin-top: 18px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 12px;
  font-size: 1.2rem;
  font-weight: 800;
}
.section-title .ico { width: 28px; height: 28px; color: var(--brand); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) { .hub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.hub-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 12px 12px 16px;
  background: linear-gradient(135deg, var(--card) 0%, var(--card-warm) 100%);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.hub-tile:active { transform: scale(0.98); }
@media (hover: hover) { a.hub-tile:hover { box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.16), 0 1px 3px rgba(31, 35, 40, 0.06); } }

.tile-ico { display: inline-flex; color: var(--ink); }
.tile-ico .ico { width: 30px; height: 30px; stroke-width: 1.6; }
.tile-label { flex: 1; min-width: 0; font-weight: 600; font-size: 1rem; line-height: 1.2; }
.tile-chev { display: inline-flex; color: var(--brand); }
.tile-chev .ico { width: 20px; height: 20px; stroke-width: 2.4; }

.hub-tile.is-soon { opacity: 0.55; box-shadow: none; border: 1px dashed var(--line); }
.tile-soon {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------- Cards, install prompt ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 16px 0;
}
.card h2 { font-size: 1.15rem; margin-bottom: 8px; }

.install-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 8px;
  background: var(--card);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.install-card[hidden] { display: none; }
.install-card p { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }
.install-actions { display: flex; gap: 8px; }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #FFFFFF;
  box-shadow: 0 -4px 18px rgba(31, 35, 40, 0.07);
}
.nav-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
}
.nav-item .ico { width: 25px; height: 25px; stroke-width: 1.7; }
.nav-item.is-active { color: var(--brand); }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
}
.nav-item.is-soon { opacity: 0.35; }

@media (min-width: 768px) {
  .bottom-nav { max-width: 640px; margin: 0 auto; border-radius: 20px 20px 0 0; }
}

/* ---------- Forms ---------- */
.auth-card {
  max-width: 420px;
  margin: 12px auto 0;
  padding: 26px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.9rem; }
.hint { color: var(--muted); font-size: 0.8rem; }

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.check { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.btn-primary {
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3);
}
.btn-primary:active { filter: brightness(0.94); }
.btn-ghost { background: #FFFFFF; color: var(--ink); border-color: var(--line); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 0.9rem; }
.btn[hidden] { display: none; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }

.auth-links { margin: 18px 0 0; text-align: center; font-size: 0.92rem; }

/* ---------- Detail pages (cards, read-only lists, switches) ---------- */
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.card-title .ico { width: 24px; height: 24px; color: var(--brand); }
.card.form-stack { gap: 14px; }

.detail-list { margin: 8px 0 12px; }
.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 0.9rem; }
.detail-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.optional { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.4; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 0.97rem;
  cursor: pointer;
}
.switch input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 30px;
  margin: 0;
  border-radius: 999px;
  background: #D9D4CF;
  cursor: pointer;
  transition: background 0.15s ease;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }

.form-actions { margin: 20px 0 8px; }
.app-main > .alert { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 359px) { .field-row { grid-template-columns: 1fr; } }
select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
input[type="date"].input { min-height: 50px; }

/* ---------- Events ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(31, 35, 40, 0.06);
}
.chip.is-active {
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(var(--brand-rgb), 0.28);
}

.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-card {
  display: flex;
  gap: 12px;
  padding: 16px 16px 16px 18px;
  background: linear-gradient(135deg, var(--card) 0%, var(--card-warm) 100%);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.event-card.is-past { border-left-color: #C9C2BB; }
.event-body { flex: 1; min-width: 0; }
.event-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--brand);
  font-weight: 800;
  font-size: 1.05rem;
}
.event-date .ico { width: 20px; height: 20px; }
.event-title { font-size: 1.08rem; font-weight: 800; line-height: 1.25; margin-bottom: 8px; overflow-wrap: anywhere; }
.event-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.event-tags:empty { display: none; }
.event-art { flex-shrink: 0; width: 72px; display: flex; align-items: flex-start; justify-content: center; }
.event-art img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.event-icon { color: var(--icon-soft); }
.event-icon .ico { width: 54px; height: 54px; stroke-width: 1.4; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--tag-text);
  font-size: 0.76rem;
  font-weight: 700;
}
.tag .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.tag-ok { background: var(--ok-bg); color: var(--ok-text); }
.tag-warn { background: #FFF1D6; color: #8A5A00; }

.btn-pill { border-radius: 999px; }
.btn-pill .ico { width: 16px; height: 16px; stroke-width: 2.6; margin-left: 2px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .ico { width: 48px; height: 48px; color: var(--brand); stroke-width: 1.4; }
.empty-state p { margin: 12px 0 16px; }

/* Event details */
.hero-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -6px 0 12px;
  color: #FFFFFF;
  opacity: 0.85;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.hero-back .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.hero-title-long { font-size: 1.6rem; overflow-wrap: anywhere; }
.hero-date { display: flex; align-items: center; gap: 8px; color: var(--accent-on-dark); font-weight: 700; }
.hero-date .ico { width: 20px; height: 20px; }
.event-hero-img { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 14px; }
.card-ok { border-left: 5px solid #2E9D5B; }
.card-ok .card-title .ico { color: #2E9D5B; }
.booked-list { list-style: none; margin: 8px 0 0; padding: 0; }
.booked-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.booked-list li:last-child { border-bottom: 0; }
.event-content { line-height: 1.6; overflow-wrap: anywhere; }
.event-content img { max-width: 100%; height: auto; border-radius: 10px; }
.event-content > :first-child { margin-top: 0; }
.event-content > :last-child { margin-bottom: 0; }

/* Event booking */
.book-card { border-left: 5px solid var(--brand); }
.people-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.people-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
}
.people-list input { width: 22px; height: 22px; accent-color: var(--brand); flex-shrink: 0; }
.people-list label { flex: 1; font-weight: 600; cursor: pointer; }

/* ---------- Timetable (calendar) ---------- */
.tt-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 8px 0 4px;
  background: var(--card);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}
.tt-hint .ico { color: var(--brand); }
.tt-hint span { flex: 1; }
.tt-hint a { font-weight: 700; white-space: nowrap; }

.tt-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.tt-filter { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.tt-filter .input { min-height: 42px; padding: 8px 32px 8px 10px; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); background-position: right 8px center; }
.tt-filter .input:disabled { opacity: 0.5; }
@media (max-width: 380px) { .tt-filters { grid-template-columns: 1fr 1fr; } .tt-filter:last-child { grid-column: span 2; } }

.tt-weekbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 10px; }
.tt-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  color: var(--brand);
  box-shadow: var(--shadow);
}
.tt-arrow .ico { width: 22px; height: 22px; stroke-width: 2.4; }
.tt-weeklabel { text-align: center; display: flex; flex-direction: column; }
.tt-weeklabel strong { font-size: 1.05rem; }
.tt-weeklabel a { font-size: 0.8rem; font-weight: 600; }

.tt-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.tt-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(31, 35, 40, 0.06);
  border: 2px solid transparent;
}
.tt-dow { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.tt-dom { font-size: 1.15rem; font-weight: 800; }
.tt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.tt-dot.is-empty { background: transparent; }
.tt-day-btn.is-today { border-color: var(--brand-soft); }
.tt-day-btn.is-selected { background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%); color: #FFFFFF; box-shadow: 0 4px 10px rgba(var(--brand-rgb), 0.3); }
.tt-day-btn.is-selected .tt-dow { color: rgba(255, 255, 255, 0.85); }
.tt-day-btn.is-selected .tt-dot { background: #FFFFFF; }

/* Phones: only the selected day. Wide screens: the whole week as columns. */
.tt-col { display: none; }
.tt-col.is-selected { display: block; }
.tt-col-title { font-size: 1.05rem; font-weight: 800; margin: 0 2px 10px; }
.tt-none { color: var(--muted); padding: 18px; text-align: center; background: var(--card); border-radius: var(--radius-sm); }

@media (min-width: 960px) {
  .app-main { max-width: 1280px; }
  .tt-days { display: none; }
  .tt-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .tt-col { display: block; }
  .tt-col-title { font-size: 0.9rem; padding-bottom: 6px; border-bottom: 3px solid var(--line); }
  .tt-col.is-selected .tt-col-title { border-bottom-color: var(--brand); }
  .tt-class { padding: 10px 10px 10px 12px; }
  .tt-name { font-size: 0.95rem; }
  .tt-none { padding: 10px; font-size: 0.85rem; }
  .tt-place a { flex-basis: 100%; padding-left: 22px; } /* Directions on its own line under the location */
}

.tt-class {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, var(--card) 0%, var(--card-warm) 100%);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.tt-class.is-cancelled { border-left-color: #C9C2BB; opacity: 0.75; }
.tt-class.is-cancelled .tt-name { text-decoration: line-through; }
.tt-time { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--brand); font-weight: 800; }
.tt-time .ico { width: 18px; height: 18px; }
.tt-name { font-size: 1.05rem; font-weight: 800; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.tt-class .event-tags { margin: 0; }
.tag-dist { background: #EEF1F5; color: var(--ink); }
.tt-place { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.88rem; color: var(--muted); flex-wrap: wrap; }
.tt-place .ico { width: 16px; height: 16px; color: var(--brand); }
.tt-place span { flex: 1; min-width: 0; }
.tt-place a { font-weight: 700; }

/* ---------- Gradings ---------- */
.grade-card { border-left: 5px solid var(--brand); }
.belt {
  display: inline-block;
  flex-shrink: 0;
  width: 46px;
  height: 14px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}
.belt-sm { width: 28px; height: 9px; border-radius: 3px; margin: 0 6px 0 4px; }

.grade-current { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.grade-current:last-of-type { border-bottom: 0; }
.grade-current-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.grade-current-text strong { font-size: 1.05rem; }
.grade-current-text .muted { font-size: 0.85rem; }
.grade-next { display: inline-flex; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--brand); }

.grade-invite {
  margin: 12px 0 4px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  border: 1px solid var(--brand-soft);
}
.grade-invite p { margin: 0 0 4px; }
.grade-invite-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 0.95rem; }
.grade-invite-title .ico { width: 20px; height: 20px; color: var(--brand); margin-right: 4px; }
.grade-invite-when { font-weight: 700; }
.grade-cutoff { color: #8A5A00; font-size: 0.88rem; font-weight: 600; }
.grade-fees { list-style: none; margin: 8px 0 0; padding: 0; }
.grade-fees li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 0.92rem; }

.grade-history { margin-top: 12px; }
.grade-history summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 6px 0; }
.grade-history ul { list-style: none; margin: 6px 0 0; padding: 0; }
.grade-history li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.grade-history li:last-child { border-bottom: 0; }
.grade-history li .belt-sm { margin-top: 6px; }
.grade-history li div { display: flex; flex-direction: column; min-width: 0; }
.grade-history li .muted { font-size: 0.85rem; }
.grade-note { font-size: 0.85rem; font-style: italic; }

/* Home: grading invitation banner */
.invite-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 12px 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.3);
}
.invite-ico { display: inline-flex; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.invite-ico .ico { width: 26px; height: 26px; }
.invite-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.invite-body strong { font-size: 1.02rem; }
.invite-line { font-size: 0.88rem; opacity: 0.95; }
.invite-line em { font-style: normal; font-weight: 700; }
.invite-banner .tile-chev { color: #FFFFFF; }
.fee-method { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); margin-top: -4px; }
.grade-pay { margin-top: 12px; }
.grade-pay-hint { margin: 6px 0 0; text-align: center; }

/* Gradings tabs */
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
}
.chip:not(.is-active) .chip-count { background: var(--brand); color: #FFFFFF; }
.grade-history-title { font-size: 0.95rem; font-weight: 800; margin: 16px 0 4px; color: var(--brand); }
.grade-history-list { list-style: none; margin: 0; padding: 0; }
.grade-history-list li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.grade-history-list li:last-child { border-bottom: 0; }
.grade-history-list li .belt-sm { margin-top: 6px; }
.grade-history-list li div { display: flex; flex-direction: column; min-width: 0; }
.grade-history-list li .muted { font-size: 0.85rem; }

/* ---------- Licence ---------- */
.licence-card {
  position: relative;
  overflow: hidden;
  margin: 14px 0;
  padding: 18px 18px 16px;
  border-radius: 18px;
  color: #FFFFFF;
  background: radial-gradient(120% 120% at 100% 0%, var(--header-2) 0%, var(--header) 70%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.licence-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--accent-on-dark);
}
.licence-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.licence-name { font-size: 1.15rem; font-weight: 800; overflow-wrap: anywhere; }
.licence-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: #E7F6EC;
  color: #1E6B3A;
}
.licence-status .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.status-soon .licence-status { background: #FFF1D6; color: #8A5A00; }
.status-expired .licence-status { background: #FDE8E8; color: #9B1C1C; }
.status-inactive .licence-status,
.status-none { background: #EDEDED; color: #555555; }

.licence-number { display: flex; flex-direction: column; margin-bottom: 14px; }
.licence-number span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }
.licence-number strong { font-size: 1.6rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.licence-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.licence-dates div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); }
.licence-dates dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }
.licence-dates dd { margin: 2px 0 0; font-weight: 700; }

.licence-note { margin: 12px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--accent-on-dark); }
.status-expired .licence-note { color: #FFB4BC; }
.licence-pay { margin: 10px 0 0; font-size: 0.82rem; opacity: 0.75; }

.licence-card.is-none { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.licence-card.is-none::before { background: var(--line); }
.licence-empty { margin: 0; color: var(--muted); }

/* ---------- Terms & Conditions ---------- */
.terms-agreed { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.terms-agreed .ico { width: 20px; height: 20px; stroke-width: 2.4; flex-shrink: 0; }
.terms-content { font-size: 0.95rem; }
.terms-content h1, .terms-content h2, .terms-content h3, .terms-content h4 { margin: 18px 0 8px; line-height: 1.25; }
.terms-content h1 { font-size: 1.25rem; }
.terms-content h2 { font-size: 1.12rem; }
.terms-content h3, .terms-content h4 { font-size: 1rem; }
.terms-content ul, .terms-content ol { padding-left: 22px; }
.terms-content li { margin-bottom: 6px; }
.terms-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.terms-content td, .terms-content th { border: 1px solid var(--line); padding: 6px 8px; }
.terms-updated { text-align: center; }

/* ---------- Reviews ---------- */
.stars { display: inline-flex; gap: 2px; }
.star { display: inline-flex; color: #D8D2CC; }
.star .ico { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.star.is-on { color: #F5B301; }
.stars-lg .star .ico { width: 24px; height: 24px; }

.review-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  padding: 16px 18px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.review-summary > div { display: flex; flex-direction: column; gap: 2px; }
.review-avg { font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--ink); }

.review-form .card-title .ico { color: #F5B301; }
.field-label { font-weight: 700; font-size: 0.9rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { display: inline-flex; color: #D8D2CC; cursor: pointer; transition: transform 0.1s ease, color 0.1s ease; }
.star-input label .ico { width: 38px; height: 38px; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #F5B301; }
.star-input label:active { transform: scale(0.9); }
.star-input input:focus-visible + label { outline: 3px solid var(--brand-soft); outline-offset: 2px; border-radius: 6px; }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review {
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.review-head .muted { font-size: 0.82rem; }
.review-text { margin: 0 0 6px; line-height: 1.5; overflow-wrap: anywhere; }
.review-name { margin: 0; font-weight: 700; font-size: 0.9rem; color: var(--brand); }

/* ---------- Club Gallery ---------- */
.gal-note { margin: 10px 2px 4px; font-size: 0.85rem; color: var(--muted); text-align: center; }
.gal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 10px; }
.gal-year { width: auto; min-width: 104px; min-height: 42px; padding: 6px 36px 6px 14px; font-size: 15px; font-weight: 800; }
.gal-year-label { font-weight: 800; font-size: 1.1rem; }
.gal-count-label { font-weight: 700; color: var(--muted); font-size: 0.92rem; text-align: right; }

.gal-month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
@media (min-width: 768px) { .gal-month-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.gal-month {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}
.gal-month.is-active {
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(var(--brand-rgb), 0.28);
}
.gal-month.is-empty { background: transparent; color: var(--muted); opacity: 0.45; border-style: dashed; }

.gal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 576px) { .gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .gal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gal-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
@media (hover: hover) { .gal-item:hover img { transform: scale(1.04); } }
.gal-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 10px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Full-screen viewer */
body.gal-open { overflow: hidden; }
.gal-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 56px) 12px calc(var(--safe-bottom) + 16px);
  background: rgba(10, 10, 12, 0.94);
}
.gal-viewer[hidden] { display: none; }
.gal-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gal-figure img { max-width: 100%; max-height: calc(100vh - 200px); object-fit: contain; border-radius: 8px; }
.gal-figure figcaption { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #FFFFFF; text-align: center; }
.gal-count { font-size: 0.8rem; opacity: 0.7; }
.gal-caption { font-size: 0.95rem; max-width: 640px; white-space: pre-wrap; }
.gal-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  cursor: pointer;
}
.gal-btn .ico { width: 24px; height: 24px; stroke-width: 2.4; }
.gal-close { top: calc(var(--safe-top) + 10px); right: 12px; }
.gal-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.gal-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 575px) { .gal-prev, .gal-next { top: auto; bottom: calc(var(--safe-bottom) + 18px); transform: none; } }

/* ---------- Awards ---------- */
.award-card { border-left: 5px solid var(--brand); }
.award-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.award-head .card-title { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.award-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3);
}
.award-total strong { font-size: 1.6rem; line-height: 1; }
.award-total span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.award-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .award-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.award-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px dashed var(--line);
  text-align: center;
  opacity: 0.6;
}
.award-tile.is-earned { background: var(--card-warm); border: 1px solid var(--brand-soft); opacity: 1; }
.award-ico { color: #BDB6AF; }
.award-ico .ico { width: 40px; height: 40px; stroke-width: 1.5; }
.award-tile.is-earned .award-ico { color: var(--brand); }
.award-name { max-width: 100%; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.award-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #9A938C;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
}
.award-tile.is-earned .award-badge { background: #D62B2B; box-shadow: 0 2px 6px rgba(214, 43, 43, 0.35); }

/* ---------- Life Skills ---------- */
.ls-tabs { padding-top: 0; }
.ls-card { border-left: 5px solid var(--brand); }
.ls-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ls-head .card-title { margin: 0; }
.ls-head .muted { font-size: 0.88rem; }
.ls-tip { font-size: 0.85rem; color: var(--muted); margin: 0 0 14px; }

.ls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .ls-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ls-skill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 8px 12px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.ls-skill:active { transform: scale(0.97); }
.ls-ico { color: #BDB6AF; }
.ls-ico .ico { width: 40px; height: 40px; stroke-width: 1.5; }
.ls-name { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; line-height: 1.2; }
.ls-action { font-size: 0.72rem; color: var(--muted); }
.ls-check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #2E9D5B;
  color: #FFFFFF;
}
.ls-check .ico { width: 15px; height: 15px; stroke-width: 3; }
.ls-skill.is-awarded { border: 2px solid #2E9D5B; background: #EEF8F1; }
.ls-skill.is-awarded .ls-ico { color: #2E9D5B; }
.ls-skill.is-awarded .ls-check { display: inline-flex; }
.ls-skill.is-awarded .ls-action { color: #1E6B3A; font-weight: 600; }

.tt-arrow.is-disabled { opacity: 0.3; box-shadow: none; }
.ls-none { text-align: center; color: var(--muted); padding: 18px 0 6px; margin: 0; }
.ls-report-total { margin: 4px 0 8px; text-align: center; }
.ls-report-total strong { font-size: 1.4rem; color: var(--brand); }
.ls-report { list-style: none; margin: 0; padding: 0; }
.ls-report li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ls-report li:last-child { border-bottom: 0; }
.ls-report-ico { color: #2E9D5B; display: inline-flex; }
.ls-report-ico .ico { width: 22px; height: 22px; }
.ls-report-name { flex: 1; font-weight: 700; font-size: 0.92rem; }
.ls-report .muted { font-size: 0.85rem; }
/* Tabs as a segmented switch, so they look different from the child buttons above */
.ls-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 2px 0 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.ls-tabs .chip { border: 0; box-shadow: none; background: transparent; padding: 7px 18px; }
.ls-tabs .chip.is-active { background: var(--header); color: #FFFFFF; box-shadow: none; }

/* Admin "log in as member" banner */
.admin-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #FFD43B;
  color: #3D2E00;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.admin-banner a {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #3D2E00;
  color: #FFFFFF;
  font-weight: 800;
  text-decoration: none;
}

/* ---------- Family ---------- */
.family-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.family-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px 14px 14px;
  background: linear-gradient(135deg, var(--card) 0%, var(--card-warm) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}
.family-card:active { transform: scale(0.99); }
.family-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--header);
  color: #FFFFFF;
  font-weight: 800;
}
.family-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.family-body strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.family-body .muted { font-size: 0.85rem; }
.family-medical { font-size: 0.8rem; font-weight: 700; color: #1E6B3A; }
.family-medical.has-medical { color: #8A5A00; }

/* Medical questionnaire */
.medical-card { border-left: 5px solid var(--brand); }
.medical-list li label { font-weight: 600; }
.medical-list li:has(input:checked) { border-color: var(--brand); background: var(--card-warm); }
.medical-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 44px;
  color: var(--ink);
  text-decoration: none;
  border-left: 5px solid var(--brand);
}
.medical-link .tile-chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Emergency contacts ---------- */
.emergency-none { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.emergency-none .ico { flex-shrink: 0; }
.emergency-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.emergency-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--card);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.emergency-card.is-editing { outline: 3px solid var(--brand-soft); }
.emergency-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.emergency-main strong { font-size: 1.02rem; }
.emergency-line { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 0.92rem; text-decoration: none; overflow-wrap: anywhere; }
a.emergency-line { color: var(--brand); font-weight: 700; }
.emergency-line .ico { width: 18px; height: 18px; flex-shrink: 0; }
.emergency-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-danger-text { color: #B42318; }
.emergency-form { margin-top: 16px; }
.text-warn { color: #B42318; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.video-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.video-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #000000; border: 0; padding: 0; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb { cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.video-play svg { width: 30px; height: 30px; fill: #FFFFFF; margin-left: 4px; }
.video-title { margin: 0; padding: 12px 14px 14px; font-size: 1rem; font-weight: 800; line-height: 1.3; }

/* Chip rows that wrap onto more lines instead of scrolling sideways (video categories, people) */
.chips.chips-wrap { flex-wrap: wrap; overflow-x: visible; }
.chips.chips-wrap .chip { flex-shrink: 1; max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 420px) {
  .chips.chips-wrap { gap: 6px; }
  .chips.chips-wrap .chip { padding: 7px 12px; font-size: 0.82rem; }
}

/* ---------- Member Files ---------- */
.file-list { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 12px 0;
  background: linear-gradient(135deg, var(--card) 0%, var(--card-warm) 100%);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.file-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding-left: 14px; color: var(--ink); text-decoration: none; }
.file-ico {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.file-ico .ico { width: 30px; height: 30px; }
.file-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file-body strong { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.file-body .muted { font-size: 0.82rem; }
.file-download {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(var(--brand-rgb), 0.2);
}
.file-download .ico { width: 22px; height: 22px; stroke-width: 2.2; }

/* ---------- Shop ---------- */
.shop-banner { margin: 4px 0 16px; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); background: var(--card); }
.shop-banner img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
.shop-intro h2 { font-size: 1.2rem; margin: 0 0 8px; }
.shop-intro img { max-width: 100%; height: auto; }
.shop-contact { margin: 14px 0 0; }
.shop-contact .btn { display: inline-flex; align-items: center; gap: 8px; }
.shop-contact .ico { width: 20px; height: 20px; }

.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.shop-head .section-title { margin-bottom: 8px; }
.shop-count { color: var(--muted); font-size: 0.88rem; font-weight: 600; white-space: nowrap; margin-right: 4px; }
.shop-chips { padding-top: 0; }

.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.shop-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shop-card:hover, .shop-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
.shop-card-img { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; }
.shop-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shop-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(var(--brand-rgb), 0.08); }
.shop-noimg .ico { width: 44px; height: 44px; color: var(--brand); stroke-width: 1.5; }
.shop-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #D92D20;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.shop-card-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid rgba(0, 0, 0, 0.05); }
.shop-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-card-price { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.shop-price-now { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.shop-price-was { font-size: 0.85rem; color: var(--muted); text-decoration: line-through; }
.shop-save { padding: 2px 9px; border-radius: 999px; background: #D92D20; color: #FFFFFF; font-size: 0.78rem; font-weight: 700; }

/* Product page */
.pd-layout { display: grid; gap: 16px; margin-top: 4px; }
@media (min-width: 860px) {
  .pd-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .pd-gallery { position: sticky; top: 16px; }
}
.pd-gallery { position: relative; }
.pd-slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  scrollbar-width: none;
}
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; aspect-ratio: 1 / 1; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; }
.pd-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pd-noimg { flex-direction: column; gap: 8px; color: var(--muted); background: rgba(var(--brand-rgb), 0.06); }
.pd-noimg .ico { width: 56px; height: 56px; color: var(--brand); stroke-width: 1.4; }
.pd-gallery .shop-badge { top: 14px; left: 14px; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.pd-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb.is-active { opacity: 1; border-color: var(--brand); }

.pd-title { font-size: 1.35rem; line-height: 1.25; margin: 0 0 8px; overflow-wrap: anywhere; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pd-price .shop-price-now { font-size: 1.6rem; }
.pd-price .shop-price-was { font-size: 1rem; }
.pd-info .alert { margin-bottom: 14px; }
.pd-options { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.pd-buy .btn .ico { width: 20px; height: 20px; margin-right: 8px; }
.pd-contact { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); background: rgba(var(--brand-rgb), 0.08); font-size: 0.92rem; }
.pd-contact strong { display: block; margin-bottom: 2px; }
.pd-contact-icon .ico { width: 24px; height: 24px; color: var(--brand); }
.pd-description { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pd-description h3 { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pd-description img { max-width: 100%; height: auto; }

/* Basket button in the shop header */
.hero-basket {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 8px 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}
.hero-basket .ico { width: 18px; height: 18px; }
.hero-basket b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 0.75rem;
  line-height: 20px;
  text-align: center;
}
.alert-link { color: inherit; font-weight: 800; text-decoration: underline; }

/* Basket page */
.basket-layout { display: grid; gap: 16px; margin-top: 4px; }
@media (min-width: 900px) {
  .basket-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .basket-summary { position: sticky; top: 16px; }
}
.basket-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.basket-lines { display: flex; flex-direction: column; gap: 12px; }
.basket-line {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px 44px 12px 12px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.basket-line.is-unavailable { opacity: 0.7; }
.basket-img { position: relative; flex: 0 0 76px; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: #fff; }
.basket-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.basket-img .shop-noimg .ico { width: 28px; height: 28px; }
.basket-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.basket-name { color: var(--ink); font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.basket-opts { color: var(--muted); font-size: 0.82rem; }
.basket-warn { color: #B42318; font-size: 0.82rem; font-weight: 700; }
.basket-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.basket-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.basket-price strong { font-size: 1.02rem; }
.basket-price small { color: var(--muted); font-size: 0.75rem; }
.basket-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
}
.basket-remove:hover { color: #B42318; background: rgba(180, 35, 24, 0.08); }
.basket-remove .ico { width: 18px; height: 18px; }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 34px; color: var(--ink); }
.qty-btn:active { background: var(--brand-soft); }
.qty-btn .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.qty-value { min-width: 28px; text-align: center; font-weight: 800; }

.basket-card-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 12px; }
.basket-card-title .ico { width: 22px; height: 22px; color: var(--brand); }
.basket-radios { display: flex; flex-direction: column; gap: 8px; }
.basket-radios input { position: absolute; opacity: 0; pointer-events: none; }
.basket-radios label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}
.basket-radios input:checked + label { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.basket-radios input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.radio-price { white-space: nowrap; font-weight: 800; }

.voucher-row { display: flex; gap: 8px; }
.voucher-row .input { flex: 1; min-width: 0; text-transform: uppercase; }
.voucher-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok-text); }
.voucher-applied span { display: inline-flex; align-items: center; gap: 6px; }
.voucher-applied .ico { width: 18px; height: 18px; }
.basket-link { color: inherit; font-weight: 700; text-decoration: underline; }

.summary-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 16px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; text-align: right; font-weight: 700; }
.summary-discount { color: var(--ok-text); }
.summary-list .summary-total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 1.15rem; font-weight: 800; }
.basket-summary .pd-contact { margin-top: 4px; }
.basket-continue { display: block; margin-top: 12px; text-align: center; font-weight: 700; color: var(--brand); text-decoration: none; }

/* Checkout and orders */
.hero-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #FFFFFF; font-weight: 700; font-size: 0.92rem; opacity: 0.9; text-decoration: underline; }
.hero-link .ico { width: 18px; height: 18px; }
.order-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.order-lines li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-lines li:last-child { border-bottom: 0; }
.order-qty { flex: 0 0 auto; color: var(--muted); font-weight: 700; min-width: 30px; }
.order-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.order-name small { display: block; color: var(--muted); font-weight: 400; font-size: 0.8rem; margin-top: 2px; }
.order-price { flex: 0 0 auto; font-weight: 800; }
.checkout-edit { display: inline-block; margin-top: 10px; color: var(--brand); }
.checkout-line { margin: 0 0 4px; }
.checkout-address { margin: 6px 0 8px; line-height: 1.45; }
.checkout-note { margin: 10px 0 0; text-align: center; }
.order-card { text-decoration: none; color: var(--ink); align-items: center; }
.order-card-total { flex: 0 0 auto; padding: 0 16px; font-weight: 800; }

/* ---------- Book sessions ---------- */
.sess-members { padding-top: 4px; }
.sess-status { margin: 4px 0 14px; }
.sess-status p { margin: 0 0 10px; }
.sess-status .btn .ico { width: 18px; height: 18px; margin-right: 6px; }
.sess-meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 4px 0 10px; }
.sess-meter span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.sess-credits { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok-text); }
.sess-credits .ico { flex: 0 0 auto; width: 20px; height: 20px; }
.sess-weeks { margin-bottom: 4px; }

.sess-list { display: flex; flex-direction: column; gap: 10px; }
.sess-day { font-size: 1rem; margin: 14px 4px 2px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sess-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 18px;
  border-left: 5px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.sess-card.is-booked { border-left-color: var(--ok-text); }
.sess-card.is-reserved { border-left-color: #B54708; }
.sess-card.is-closed, .sess-card.is-locked { opacity: 0.65; }
.sess-time { flex: 0 0 62px; display: flex; flex-direction: column; line-height: 1.2; }
.sess-time strong { font-size: 1.1rem; }
.sess-time span { color: var(--muted); font-size: 0.78rem; }
.sess-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sess-name { font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.sess-place { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.82rem; }
.sess-place .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.sess-places { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); font-size: 0.75rem; font-weight: 700; }
.sess-places.is-full { background: rgba(180, 35, 24, 0.1); color: #B42318; }
.sess-action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.sess-state { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.sess-state .ico { width: 16px; height: 16px; }
.sess-booked { color: var(--ok-text); }
.sess-cancel { color: #B42318; }
.sess-note { margin: 16px 4px 0; }
.sess-buy { max-width: 480px; margin: 4px auto 0; }
@media (max-width: 380px) {
  .sess-card { flex-wrap: wrap; }
  .sess-action { flex-basis: 100%; flex-direction: row; justify-content: flex-end; align-items: center; }
}


/* ---------- Header bar and main menu ----------
   Phones and tablets: account button top right, menu as the bottom bar.
   Wide screens (960px+): the same menu runs across the header and the bottom bar is hidden. */
.hub-top { justify-content: flex-end; min-height: 60px; gap: 12px; }
.no-nav .hub-hero { padding-top: 40px; }
.top-nav { display: none; }

.bottom-nav .nav-item { min-width: 0; padding: 0 2px; font-size: 0.7rem; }
.bottom-nav .nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav .nav-item.is-active::after { bottom: 5px; width: 32px; }
.nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: 12px; }
@media (max-width: 359px) {
  .bottom-nav .nav-item { font-size: 0.62rem; }
  .bottom-nav .nav-item .ico { width: 22px; height: 22px; }
}

@media (min-width: 960px) {
  .hub-top, .hub-hero { max-width: 1280px; }
  .hub-top { justify-content: space-between; padding-top: 18px; }
  .hub-account { display: none; }

  .top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  .top-nav .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0.85;
    transition: background 0.15s ease, opacity 0.15s ease;
  }
  .top-nav .nav-item .ico { width: 20px; height: 20px; stroke-width: 2; }
  .top-nav .nav-item:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
  .top-nav .nav-item.is-active { opacity: 1; color: #FFFFFF; background: rgba(255, 255, 255, 0.18); }
  .top-nav .nav-item.is-active::after { display: none; }
  .top-nav .nav-item:focus-visible { outline-color: #FFFFFF; }

  .bottom-nav { display: none; }
  .has-nav .app-main { padding-bottom: 40px; }
}

/* ---------- Messages ---------- */
.msg-tabs { margin-bottom: 4px; }
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  color: var(--ink);
  text-decoration: none;
}
a.msg-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1); }
.msg-ico {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.msg-ico .ico { width: 22px; height: 22px; }
.msg-card.is-sms .msg-ico { background: var(--ok-bg); color: var(--ok-text); }
.msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.msg-subject { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.msg-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); font-size: 0.8rem; }
.msg-meta .ico { width: 14px; height: 14px; }
.msg-text { line-height: 1.5; overflow-wrap: anywhere; margin: 0; }
.msg-go { flex: 0 0 auto; align-self: center; color: var(--muted); }
.msg-go .ico { width: 18px; height: 18px; }
.msg-more { text-align: center; margin: 16px 0 0; }

.msg-attach { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; background: var(--brand-soft); }
.msg-attach .ico { width: 18px; height: 18px; flex: 0 0 auto; }
.msg-view { padding: 0; overflow: hidden; }
.msg-view > .msg-text, .msg-view > .muted { padding: 18px; }
.msg-frame { display: block; width: 100%; min-height: 240px; border: 0; background: #FFFFFF; }


/* ---------- Hub tiles: no arrow, brand edge on the left and underneath ---------- */
.hub-tile .tile-chev { display: none; }
.hub-tile {
  border-left: 4px solid var(--brand);
  box-shadow: 0 3px 0 rgba(var(--brand-rgb), 0.35), 0 6px 16px rgba(31, 35, 40, 0.07);
}
@media (hover: hover) {
  a.hub-tile:hover { box-shadow: 0 3px 0 rgba(var(--brand-rgb), 0.55), 0 10px 24px rgba(var(--brand-rgb), 0.16); }
}
.hub-tile .tile-label { overflow-wrap: normal; word-break: normal; hyphens: none; }
.hub-tile.is-soon { border-left-color: var(--line); }

/* ---------- Header: no top bar on phones/tablets, greeting sits right at the top ---------- */
.hub-top { display: none; }
.hub-hero { padding-top: 14px; padding-bottom: 40px; }
.hero-greet h1 { line-height: 1.1; }
@media (max-width: 420px) {
  .hub-hero { padding-top: 10px; }
  .hero-greet h1 { font-size: 1.8rem; }
  .hero-greet p { font-size: 1.2rem; }
}
@media (min-width: 960px) {
  .hub-top { display: flex; }
  .hub-hero { padding-top: 22px; padding-bottom: 46px; }
}


/* ---------- Hub tiles on phones: icon on top, name centred underneath ----------
   Words are never split; the name shrinks a little on narrow screens and wraps only between words,
   so it still fits when the phone uses a large text size. */
@media (max-width: 599px) {
  .hub-tile {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 14px 8px 12px 10px;
    text-align: center;
  }
  .hub-tile .tile-ico .ico { width: 28px; height: 28px; }
  .hub-tile .tile-label {
    flex: 0 0 auto;
    width: 100%;
    font-size: clamp(0.82rem, 3.7vw, 1rem);
    line-height: 1.2;
  }
}

/* ---------- Hub tiles: smaller icons and names ---------- */
.hub-tile { min-height: 58px; gap: 10px; }
.hub-tile .tile-ico .ico { width: 24px; height: 24px; }
.hub-tile .tile-label { font-size: 0.9rem; font-weight: 600; }
@media (max-width: 599px) {
  .hub-tile { min-height: 82px; gap: 6px; padding: 12px 6px 10px 8px; }
  .hub-tile .tile-ico .ico { width: 22px; height: 22px; }
  .hub-tile .tile-label { font-size: clamp(0.74rem, 3.2vw, 0.88rem); }
}


/* ---------- Change password ---------- */
.pw-card { max-width: 480px; margin: 4px auto 0; }


/* ---------- Gallery: grid captions on two lines, and a viewer where the photo, caption and Download always fit ---------- */
.gal-item img { background: var(--line); }
.gal-cap {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.gal-viewer {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: var(--safe-top) 0 var(--safe-bottom);
}
.gal-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #FFFFFF;
}
.gal-top .gal-count { flex: 1; font-size: 0.85rem; opacity: 0.8; }
.gal-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #111111;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.gal-dl .ico { width: 18px; height: 18px; }
.gal-viewer .gal-btn { position: static; transform: none; flex: 0 0 auto; }
.gal-viewer .gal-close { position: static; }

.gal-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}
.gal-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
.gal-viewer.is-loading .gal-stage img { opacity: 0.35; }
.gal-stage .gal-prev, .gal-stage .gal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(0, 0, 0, 0.45);
}
.gal-stage .gal-prev { left: 8px; }
.gal-stage .gal-next { right: 8px; }
.gal-viewer.is-single .gal-prev, .gal-viewer.is-single .gal-next { display: none; }
@media (max-width: 575px) {
  .gal-stage .gal-prev, .gal-stage .gal-next { top: 50%; bottom: auto; width: 40px; height: 40px; }
}

.gal-info {
  flex: 0 0 auto;
  max-height: 28vh;
  overflow-y: auto;
  padding: 10px 16px 14px;
  color: #FFFFFF;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}
.gal-info[hidden] { display: none; }
.gal-info .gal-caption { margin: 0 auto; max-width: 720px; font-size: 0.95rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }


/* =====================================================================================================
   V3 MEMBER HUB DESIGN
   Layout from MemberHub_Mockup.html: dark rounded header with a brand glow, member card overlapping it,
   coloured icon grid, feature cards, list rows and a floating dark menu with a round Book button.
   Colours follow the club theme (--brand / --header); the tile icon colours are fixed.
   ===================================================================================================== */
:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(20, 21, 26, 0.04), 0 8px 24px rgba(20, 21, 26, 0.06);
  --v3-blue: #2F6BFF; --v3-blue-soft: #EAF0FF;
  --v3-green: #14A46C; --v3-green-soft: #E6F7EF;
  --v3-amber: #C97A00; --v3-amber-soft: #FFF4E0;
  --v3-violet: #7C4DFF; --v3-violet-soft: #F1EBFF;
  --v3-teal: #0EA5B7; --v3-teal-soft: #E3F7FA;
  --v3-pink: #E64980; --v3-pink-soft: #FDEBF2;
  --v3-red: #D0102F; --v3-red-soft: #FDECEF;
  --v3-ink2: #2A2C35; --v3-ink-soft: #EEF0F4;
}
body { font-family: var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
.c-blue { background: var(--v3-blue-soft); color: var(--v3-blue); }
.c-green { background: var(--v3-green-soft); color: var(--v3-green); }
.c-amber { background: var(--v3-amber-soft); color: var(--v3-amber); }
.c-violet { background: var(--v3-violet-soft); color: var(--v3-violet); }
.c-teal { background: var(--v3-teal-soft); color: var(--v3-teal); }
.c-pink { background: var(--v3-pink-soft); color: var(--v3-pink); }
.c-red { background: var(--v3-red-soft); color: var(--v3-red); }
.c-ink { background: var(--v3-ink-soft); color: var(--v3-ink2); }

/* ---------- Header ---------- */
.hub-header.v3-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--brand-rgb), 0.55) 0%, rgba(var(--brand-rgb), 0) 55%),
    linear-gradient(160deg, var(--header-2) 0%, var(--header) 100%);
  padding: var(--safe-top) 0 0;
}
.v3-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.v3-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 0;
}
.v3-club { display: flex; align-items: center; gap: 10px; min-width: 0; color: #FFFFFF; text-decoration: none; }
.v3-club-logo {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  object-fit: contain;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.45);
}
img.v3-club-logo { background: rgba(255, 255, 255, 0.08); padding: 3px; }
.v3-club-name { font-size: 13px; font-weight: 600; line-height: 1.2; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3-club-name small { display: block; font-size: 11px; font-weight: 500; opacity: 0.65; }
.v3-bell {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.v3-bell .ico { width: 20px; height: 20px; stroke-width: 2; }
.v3-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--header); }
[data-theme="black"] .v3-dot { background: #E5484D; }

.v3-hero .hub-hero { position: relative; z-index: 1; max-width: 1280px; padding: 20px 20px 30px; }
.has-card .v3-hero .hub-hero { padding-bottom: 92px; }
.no-nav .v3-hero .hub-hero { padding-top: 40px; }

.v3-greet { display: flex; align-items: center; gap: 14px; }
.v3-avatar {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--brand) calc(var(--pct, 100) * 1%), rgba(255, 255, 255, 0.15) 0);
}
[data-theme="black"] .v3-avatar { background: conic-gradient(#FFFFFF calc(var(--pct, 100) * 1%), rgba(255, 255, 255, 0.15) 0); }
.v3-avatar span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2A2C35;
  border: 2px solid var(--header);
  font-weight: 800;
  font-size: 20px;
}
.v3-greet h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.v3-greet p { margin: 2px 0 0; font-size: 13px; opacity: 0.72; }

.hero-page h1 { font-size: 1.55rem; letter-spacing: -0.3px; }
.hero-page h1 .ico {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  stroke-width: 2;
}
.hero-page p { font-size: 0.92rem; opacity: 0.75; }
.hero-title-long { font-size: 1.4rem; }

/* ---------- Main area ---------- */
.app-main { padding-top: 14px; }
.has-nav .app-main { padding-bottom: calc(68px + 14px + var(--safe-bottom) + 28px); }
.card { border-radius: var(--radius); box-shadow: var(--shadow); }
.v3-card { background: var(--card); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.v3-alert { margin: 14px 0 0; }
.v3-label { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.v3-section-title { display: flex; justify-content: space-between; align-items: center; margin: 26px 4px 12px; }
.v3-section-title h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.v3-section-title a { font-size: 12px; font-weight: 700; color: var(--brand); text-decoration: none; }
.v3-foot { text-align: center; font-size: 11px; color: var(--muted); margin: 24px 0 8px; }

/* ---------- Member card ---------- */
.has-card .v3-member { position: relative; z-index: 2; margin-top: -86px; }
.v3-who { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.v3-who a {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--v3-ink-soft);
  color: var(--v3-ink2);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.v3-who a.is-active { background: var(--brand); color: #FFFFFF; }
.mc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mc-belt { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.mc-swatch { position: relative; flex: 0 0 34px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.mc-swatch::after { content: ""; position: absolute; right: 6px; top: 0; bottom: 0; width: 4px; background: #111111; }
.mc-belt strong { font-size: 17px; font-weight: 800; line-height: 1.25; }
.mc-belt em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 14px; }
.mc-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--v3-green-soft);
  color: var(--v3-green);
  font-size: 11px;
  font-weight: 700;
}
.mc-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--v3-green); }
.mc-progress { margin-top: 16px; }
.mc-progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.mc-progress-head b { color: var(--ink); white-space: nowrap; }
.mc-bar { height: 8px; margin-top: 8px; border-radius: 99px; background: #F0F0F4; overflow: hidden; }
.mc-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.mc-stat { text-align: center; }
.mc-stat + .mc-stat { border-left: 1px solid var(--line); }
.mc-stat b { display: block; font-size: 19px; font-weight: 800; }
.mc-stat small { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------- Up next ---------- */
.v3-next {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.28) 100%), var(--brand);
  box-shadow: 0 12px 28px rgba(var(--brand-rgb), 0.3);
}
.v3-next::before { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); right: -50px; top: -60px; }
.v3-date { position: relative; flex: 0 0 58px; padding: 8px 0; text-align: center; border-radius: 14px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); }
.v3-date small { font-size: 10px; font-weight: 700; letter-spacing: 1px; opacity: 0.85; }
.v3-date b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.v3-next-info { position: relative; flex: 1; min-width: 0; }
.v3-next-info h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.v3-next-info p { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 3px 0 0; font-size: 12px; opacity: 0.88; }
.v3-next-info p .ico { width: 13px; height: 13px; stroke-width: 2.4; }
.v3-pill {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
}
[data-theme="black"] .v3-pill { color: #111111; }
.v3-pill.is-done { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; }
.v3-pill .ico { width: 14px; height: 14px; stroke-width: 2.6; }

/* ---------- Install banner ---------- */
.v3-install { margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.v3-install[hidden] { display: none; }
.v3-install-ic { flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: #FFFFFF; }
.v3-install-ic .ico { width: 18px; height: 18px; }
.v3-install > div:not(.install-actions) { flex: 1; min-width: 0; }
.v3-install b { display: block; font-size: 13px; font-weight: 700; }
.v3-install small { font-size: 11px; color: var(--muted); }
.v3-install-go { border: 0; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: #FFFFFF; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.v3-install-go[hidden] { display: none; }

/* ---------- My account grid ---------- */
.v3-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 10px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
@media (min-width: 700px) { .v3-grid { grid-template-columns: repeat(6, 1fr); } }
.v3-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; border-radius: 14px; color: var(--v3-ink2); text-decoration: none; transition: transform 0.15s; }
.v3-tile:active { transform: scale(0.94); }
.v3-tile-ico { position: relative; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; }
.v3-tile-ico .ico { width: 22px; height: 22px; stroke-width: 2; }
.v3-tile-label { font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.v3-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  border: 2px solid #FFFFFF;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
@media (max-width: 359px) { .v3-tile-label { font-size: 10.5px; } .v3-tile-ico { width: 44px; height: 44px; } }

/* ---------- Club feature cards and list rows ---------- */
.v3-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v3-feature {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: var(--radius);
  color: #FFFFFF;
  text-decoration: none;
}
.v3-feature::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); right: -30px; bottom: -40px; }
.v3-fi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); }
.v3-fi .ico { width: 20px; height: 20px; stroke-width: 2; }
.v3-feature b { display: block; margin-top: 10px; font-size: 15px; font-weight: 800; }
.v3-feature small { display: block; margin-top: 2px; font-size: 11px; opacity: 0.8; }
.f-dark { background: linear-gradient(140deg, #262833, #14151A); }
.f-brand { background: linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.18)), var(--brand); }

.v3-list { display: block; margin-top: 10px; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.v3-list-gap { margin-top: 14px; }
.v3-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.v3-row + .v3-row { border-top: 1px solid var(--line); }
a.v3-row:active { background: var(--v3-ink-soft); }
.v3-row-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.v3-row-ico .ico { width: 20px; height: 20px; stroke-width: 2; }
.v3-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v3-row-body b { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.v3-row-body small { font-size: 12px; color: var(--muted); }
.v3-row-tag { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--tag-text); font-size: 10px; font-weight: 800; }
.v3-chev { flex: 0 0 auto; color: #B8BAC3; }
.v3-chev .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.v3-invite { margin-top: 14px; }
.v3-signout b { color: var(--v3-red); }

/* ---------- Payments, contact ---------- */
.pay-month { display: flex; justify-content: space-between; margin: 22px 4px 0; font-size: 15px; font-weight: 800; }
.pay-month span + span { color: var(--muted); font-weight: 700; }
.pay-amount { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pay-amount b { font-size: 14px; }
.pay-status { padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.pay-status.is-paid { background: var(--v3-green-soft); color: var(--v3-green); }
.pay-status.is-pending { background: var(--v3-amber-soft); color: var(--v3-amber); }
.pay-status.is-problem { background: var(--v3-red-soft); color: var(--v3-red); }
.pay-note { margin: 18px 4px 0; }
.contact-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.contact-actions { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .contact-actions { grid-template-columns: repeat(3, 1fr); } }
.contact-action { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg); color: var(--ink); text-decoration: none; }
.contact-action .v3-row-body small { overflow-wrap: anywhere; }

/* ---------- Floating menu with the round Book button (phones and tablets) ---------- */
.bottom-nav.v3-nav {
  left: 12px;
  right: 12px;
  bottom: calc(14px + var(--safe-bottom));
  height: 68px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  border-radius: 24px;
  background: rgba(20, 21, 26, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
.v3-nav .nav-item { color: #8C8F9B; font-size: 10.5px; font-weight: 600; gap: 4px; padding: 0; }
.v3-nav .nav-item .ico { width: 22px; height: 22px; stroke-width: 2; }
.v3-nav .nav-item.is-active { color: #FFFFFF; }
.v3-nav .nav-item.is-active .ico { color: var(--accent-on-dark); }
.v3-nav .nav-item.is-active::after { display: none; }
.v3-nav .nav-fab .fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.v3-fab {
  width: 58px;
  height: 58px;
  margin: -34px auto 0;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border: 4px solid var(--bg);
  box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.5);
}
.v3-fab .ico { width: 26px; height: 26px; stroke-width: 2.6; }
.v3-nav .nav-fab.is-active .ico { color: #FFFFFF; }
[data-theme="black"] .v3-fab { background: linear-gradient(140deg, #3A3A3A, #000000); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }

/* Wide screens: the menu runs across the header next to the club name */
@media (min-width: 960px) {
  .bottom-nav.v3-nav { display: none; }
  .v3-topbar, .v3-hero .hub-hero, .app-main { max-width: 1040px; }
  .v3-topbar .top-nav { display: flex; flex: 1; justify-content: center; }
  .has-nav .app-main { padding-bottom: 40px; }
  .has-card .v3-member { margin-top: -86px; }
}


/* ---------- Attendance between gradings ---------- */
.grade-att { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--brand-soft); }
.grade-att-count { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.grade-att-count .ico { width: 16px; height: 16px; color: var(--brand); stroke-width: 2.4; flex: 0 0 auto; }
.grade-att-rate { font-size: 0.8rem; }
.grade-att-list summary { cursor: pointer; margin-top: 4px; font-size: 0.82rem; font-weight: 700; color: var(--brand); }
.grade-att-list ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.grade-att-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.06); font-size: 0.82rem; }
.grade-att-list li:last-child { border-bottom: 0; }
.grade-history-list li .grade-att { margin-top: 6px; }


/* ---------- Gradings tidy-up: one member at a time, past gradings folded away, full-width rows ---------- */
.grade-members { margin-bottom: 4px; }
.grade-card .grade-current { padding: 14px 0 10px; }
.grade-current-text, .grade-history-list li > div { flex: 1 1 auto; min-width: 0; width: 100%; }
.grade-card .grade-att {
  width: 100%;
  margin: 10px 0 4px;
  padding: 14px 16px;
  gap: 4px;
}
.grade-att-list ul { padding: 0 2px; }
.grade-att-list li { padding: 7px 0; }

.grade-past { margin-top: 14px; border-top: 1px solid var(--line); }
.grade-past summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 2px 4px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: var(--brand);
}
.grade-past summary::-webkit-details-marker { display: none; }
.grade-past summary span:first-child { flex: 1; }
.grade-past-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); font-size: 0.8rem; text-align: center; }
.grade-past summary .ico { width: 18px; height: 18px; transition: transform 0.15s ease; }
.grade-past[open] summary .ico { transform: rotate(90deg); }
.grade-past .grade-history-list { margin-top: 6px; }
.grade-past .grade-history-list li { padding: 12px 0; }


/* Gradings: overall attendance line, and room for the session time next to the scrollbar */
.grade-total { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 0.88rem; color: var(--muted); }
.grade-total .ico { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }
.grade-total strong { color: var(--ink); }
.grade-att-list ul { padding: 0 14px 0 2px; }
.grade-att-list li span:last-child { padding-right: 4px; text-align: right; }


/* V3: menu without hidden items, single feature card full width */
.bottom-nav.v3-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.v3-features > :only-child { grid-column: 1 / -1; }
.grade-card { border-left: 0; }


/* Club Gallery: month switching in place */
#galMonth { transition: opacity 0.15s ease; }
#galMonth.is-switching { opacity: 0.45; pointer-events: none; }


/* Club News: list of posts (dbo.WebsiteBlog) and the post page */
.news-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) {
  .news-list { grid-template-columns: 1fr 1fr; }
  .news-card.is-lead { grid-column: 1 / -1; }
}
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 4px solid var(--brand);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.news-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.news-card:active { transform: scale(0.99); }
.news-img { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--brand-soft); }
.news-card.is-lead .news-img { aspect-ratio: 16 / 8; }
.news-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brand); opacity: 0.55; }
.news-noimg .ico { width: 48px; height: 48px; stroke-width: 1.4; }
.news-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.news-date { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--brand); }
.news-title { font-size: 1.05rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.news-card.is-lead .news-title { font-size: 1.2rem; }
.news-preview { font-size: 0.9rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.news-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 0.85rem; font-weight: 700; color: var(--brand); }
.news-more .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.news-hero-img { max-height: 340px; margin: 0 0 14px; }
.news-content { padding: 18px; }
.news-content h1, .news-content h2, .news-content h3 { line-height: 1.3; }
.news-content iframe, .news-content video { max-width: 100%; }
.news-content table { max-width: 100%; display: block; overflow-x: auto; }
.news-back { margin-top: 16px; }
.news-back .btn .ico { width: 16px; height: 16px; }


/* Membership: memberships, Direct Debit status, requests and the request form */
.mr-open[hidden], .mr-form[hidden], .mr-step[hidden] { display: none !important; }
.mr-card { margin-bottom: 14px; }
.mr-members { list-style: none; margin: 4px 0 0; padding: 0; }
.mr-members li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mr-members li:last-child { border-bottom: 0; }
.mr-member-name { font-weight: 700; overflow-wrap: anywhere; }
.mr-member-pkg { color: var(--muted); font-size: 0.88rem; text-align: right; overflow-wrap: anywhere; }

.mr-dd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 6px 0 10px; border-radius: 14px; background: var(--brand-soft); }
.mr-dd-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mr-dd-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.mr-dd-main strong { font-size: 1.25rem; }
.mr-dd-sub { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.mr-dd-mandate { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.9rem; font-weight: 600; }
.mr-dd-mandate .ico { width: 18px; height: 18px; flex: 0 0 auto; color: var(--brand); stroke-width: 2.4; }

.mr-pill { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; white-space: nowrap; }
.mr-pill.is-ok { background: var(--v3-green-soft, #E6F7EF); color: var(--v3-green, #14A46C); }
.mr-pill.is-warn { background: var(--v3-amber-soft, #FFF4E0); color: var(--v3-amber, #C97A00); }
.mr-pill.is-bad { background: var(--v3-red-soft, #FDECEF); color: var(--v3-red, #D0102F); }
.mr-pill.is-off { background: #EDEDED; color: #555555; }

.mr-requests { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 16px; }
.mr-req { padding: 14px 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.mr-req-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mr-req-meta, .mr-req-detail { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.mr-req-detail { color: var(--ink); }
.mr-req .btn { margin-top: 10px; }

.mr-note { background: var(--brand-soft); color: var(--ink); }
.mr-open { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 16px; }
.mr-open .ico { width: 20px; height: 20px; }
.mr-form { margin-bottom: 16px; }
.mr-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.mr-step legend { padding: 0; margin-bottom: 8px; font-weight: 800; font-size: 0.95rem; }
.mr-options { display: flex; flex-direction: column; gap: 8px; }
.mr-option {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--card);
}
.mr-option input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.mr-option span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mr-option b { font-size: 0.95rem; overflow-wrap: anywhere; }
.mr-option small { font-size: 0.82rem; color: var(--muted); }
.mr-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.mr-questions { display: flex; flex-direction: column; gap: 16px; }
.mr-choices { display: flex; flex-direction: column; gap: 8px; }
.mr-choices .check span { overflow-wrap: anywhere; }
.mr-req-mark { color: var(--v3-red, #D0102F); font-style: normal; }
.mr-confirm { align-items: flex-start; }
.mr-confirm input { margin-top: 2px; flex: 0 0 auto; }


/* Exit survey (/survey): public page, no menu */
.survey-card { max-width: 560px; }
.survey-card h1 { margin: 0 0 8px; font-size: 1.4rem; }
.survey-club { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 800; color: var(--brand); }
.survey-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); }
.survey-ico .ico { width: 20px; height: 20px; }
.survey-state { text-align: center; padding: 10px 0; }
.survey-done { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--v3-green-soft, #E6F7EF); color: var(--v3-green, #14A46C); }
.survey-done .ico { width: 32px; height: 32px; stroke-width: 2.6; }
.survey-foot { text-align: center; }
