
/* "Website building in progress" (before launch, see js/site-status.js).
   While gated, everything on the page is hidden except the gate screen. */
html.gated body > *:not(.gate) { display: none !important; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-left, 0px)); }
.gate-inner { width: min(520px, 100%); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.gate .logo { font-size: 26px; margin-bottom: 18px; }
.gate h1 { font-size: 56px; margin: 0; text-wrap: balance; }
.gate .intro { margin: 0; font-size: 16px; }
.gate .msg { margin: 0; min-height: 0; }
.gate .msg:empty { display: none; }
.gate-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.gate .btn:focus-visible, .gate .link-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 600px) { .gate h1 { font-size: 42px; } }

/* Strip shown to you while previewing before launch */
.owner-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding: 8px 24px; background: rgba(255, 181, 71, 0.12); border-bottom: 1px solid rgba(255, 181, 71, 0.35);
  color: var(--text); font-size: 13px;
}
.owner-bar b { color: var(--amber); }
.owner-bar-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.owner-bar a { text-decoration: none; font-weight: 600; }
.owner-bar .link-btn { padding: 0; }
@media (max-width: 600px) { .owner-bar { padding: 8px 16px; } }

/* Two typefaces (loaded from Google Fonts in each page's <head>):
   Inter for names, headings and reading text; JetBrains Mono, in capitals, for labels, times, menus and buttons. */

:root {
  color-scheme: dark;   /* tells the browser to draw dropdown menus, scrollbars and date pickers dark */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Labels used to be JetBrains Mono; now the same sans as everything else (the coder-mono look read as templated). */
  --mono: "DM Sans", "Inter", system-ui, sans-serif;
  --bg: #0a0a0c;
  --surface: #131316;
  --surface-2: #1a1a1e;
  --border: rgba(255, 255, 255, 0.13);   /* hairlines: card edges, dividers */
  --fill: rgba(255, 255, 255, 0.05);     /* chips and inputs: a faint fill instead of an outline */
  --text: #f7f8f8;
  --muted: #8a8f98;
  --btn: #e6e6e7;                        /* primary button: off-white with dark text */
  --btn-text: #0a0a0c;
  --focus: rgba(255, 255, 255, 0.35);
  --line: rgba(255, 255, 255, 0.17);     /* grid lines shared between studio and course cells (stronger after feedback that cards were hard to see) */
  /* Red means "act here": "Book" and "Sign up" buttons, plus the red dot in the logo, Cancelled notes and Full badges. */
  --accent: #ff3b3b;
  --accent-fill: #d91f26;
  --red: #ff5c5c;
  --amber: #ffb547;
  --blue: #5c9dff;
  --green: #3ecf8e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100vh; }
a { color: var(--text); }
body { -webkit-font-smoothing: antialiased; }

/* Header */
header.top {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1; color: var(--text); text-decoration: none; }
.logo { white-space: nowrap; }
/* Logo: a small red Singapore (the island's outline, "the little red dot") then "Dance Classes".
   Traced by hand (Tuas, Changi, the north-coast inlets) so it reads as a map; offshore islands left out, they looked like splashes at this size.
   It's a plain red block cut to the island's shape with a mask, so it stays one colour token. "SG" stays in the link text for screen readers. */
.logo .dot {
  display: inline-block; width: 1.75em; height: 0.82em; margin-right: 0.36em; vertical-align: middle; position: relative; top: -0.11em;   /* centred on the capital letters */
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 47.1'%3E%3Cpath d='M0.0 33.6 L2.3 38.6 L6.2 42.5 L11.5 40.5 L17.2 38.6 L21.8 37.5 L29.9 38.6 L34.5 40.9 L39.1 43.7 L44.8 45.1 L50.6 47.1 L55.2 46.0 L58.2 43.7 L60.0 40.9 L63.2 39.5 L69.0 38.6 L75.9 37.2 L82.8 35.2 L89.7 33.6 L96.6 31.7 L100.0 28.3 L98.9 24.4 L93.6 19.5 L87.4 19.1 L80.5 19.5 L75.9 17.5 L70.6 12.9 L66.2 11.0 L62.8 9.9 L60.5 13.3 L58.2 11.5 L59.1 6.4 L55.2 3.0 L49.9 0.0 L44.8 1.8 L39.1 4.1 L35.6 5.3 L33.8 8.3 L31.5 9.2 L29.9 5.7 L26.0 3.7 L21.8 4.8 L19.1 8.3 L16.8 13.3 L12.6 17.9 L8.7 22.1 L5.3 26.0 L1.6 29.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 47.1'%3E%3Cpath d='M0.0 33.6 L2.3 38.6 L6.2 42.5 L11.5 40.5 L17.2 38.6 L21.8 37.5 L29.9 38.6 L34.5 40.9 L39.1 43.7 L44.8 45.1 L50.6 47.1 L55.2 46.0 L58.2 43.7 L60.0 40.9 L63.2 39.5 L69.0 38.6 L75.9 37.2 L82.8 35.2 L89.7 33.6 L96.6 31.7 L100.0 28.3 L98.9 24.4 L93.6 19.5 L87.4 19.1 L80.5 19.5 L75.9 17.5 L70.6 12.9 L66.2 11.0 L62.8 9.9 L60.5 13.3 L58.2 11.5 L59.1 6.4 L55.2 3.0 L49.9 0.0 L44.8 1.8 L39.1 4.1 L35.6 5.3 L33.8 8.3 L31.5 9.2 L29.9 5.7 L26.0 3.7 L21.8 4.8 L19.1 8.3 L16.8 13.3 L12.6 17.9 L8.7 22.1 L5.3 26.0 L1.6 29.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.logo small { font-family: var(--font); letter-spacing: 0; vertical-align: middle; }
header.top nav { display: flex; align-items: center; gap: 18px; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
header.top nav a.btn { color: var(--btn-text); }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 6px; border: 1px solid var(--btn);
  background: var(--btn); color: var(--btn-text); font: 500 14px var(--font);
  cursor: pointer; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, 0.16); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.link-btn { background: none; border: 0; color: var(--muted); font: 500 13px var(--font); cursor: pointer; }
.link-btn:hover { color: var(--red); }

label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.3px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent; background: var(--fill); color: var(--text);
  font: 400 14px var(--font); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
/* The open dropdown list: solid dark rows with light text (the see-through fill on the closed box doesn't apply here) */
select option { background: var(--surface); color: var(--text); }
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* Public page */
section.listing { padding: 36px 0 56px; }
.section-head { padding: 0 24px; margin-bottom: 16px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
h1, h2 { font-family: var(--font); font-weight: 500; letter-spacing: -0.022em; line-height: 1.1; text-wrap: balance; }
h2, .section-head h1 { font-size: 48px; }
.section-head h1 { margin: 0; }
.intro { margin: 10px 0 0; max-width: 65ch; color: var(--muted); font-size: 15px; line-height: 1.55; }
/* Two-tone intro: a white claim, then grey support (as on linear.app) */
.intro b { color: var(--text); font-weight: 500; }
/* Live counts (admin Teachers list only) */
.stats-line { margin: 14px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.stats-line b { color: var(--text); font-weight: 600; }
.admin-counts { margin: -4px 0 12px; line-height: 1.6; }
.banner { margin: 0 24px 18px; padding: 10px 14px; border-radius: 10px; background: rgba(92, 157, 255, 0.12); color: var(--text); font-size: 13px; }

.search { padding: 0 24px 18px; }
.search input {
  max-width: 420px; padding: 11px 14px 11px 38px; border-radius: 6px; background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50.9'%3E%3Cpath d='M88.1 16.3 L95.1 17.5 L99.0 19.0 L100.0 20.7 L97.0 25.9 L92.1 31.4 L86.2 36.0 L80.2 38.0 L73.3 38.3 L68.4 40.7 L58.5 47.2 L57.5 48.6 L56.5 49.4 L54.6 49.9 L51.6 50.9 L44.7 50.4 L41.7 49.4 L39.8 48.1 L37.8 44.4 L31.9 41.5 L24.9 40.2 L19.0 39.3 L7.2 39.8 L2.2 38.3 L0.0 34.6 L1.2 30.6 L10.1 19.0 L11.1 13.8 L12.1 10.6 L15.1 7.9 L19.0 5.7 L22.0 5.2 L27.9 6.2 L33.8 5.2 L41.7 1.5 L45.7 0.0 L52.6 0.5 L59.5 3.0 L80.2 13.6 L88.1 16.3Z' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center;
}
.filter-label { padding: 0 24px 8px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 8px; padding: 0 24px 16px; overflow-x: auto; }
.chips button {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 6px;
  border: 1px solid transparent; background: var(--fill); color: var(--muted);
  font: 500 13px var(--font); cursor: pointer;
}
.chips button:hover { color: var(--text); }
.chips button.active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Teacher cards: grid, 3–4 across on laptops, one column on phones */
.strip {
  display: grid; gap: 20px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 4px 24px 16px;
}
.card {
  min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
}
.teacher { display: flex; gap: 14px; align-items: center; padding: 18px 18px 10px; }
.teacher h3 { font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: 0; line-height: 1.25; }
.teacher .sub { color: var(--muted); font-size: 13px; }
.bio { padding: 0 18px 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.notes { display: flex; flex-direction: column; gap: 6px; padding: 0 18px 12px; }
.note-item {
  display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--muted);
}
.note-item.cancelled { border-left-color: var(--red); background: rgba(255, 92, 92, 0.1); }
.note-item.replacement { border-left-color: var(--amber); background: rgba(255, 181, 71, 0.1); }
.note-item.info { border-left-color: var(--blue); background: rgba(92, 157, 255, 0.1); }
.note-badge { flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-top: 1px; }
.cancelled .note-badge { background: var(--red); color: #fff; }
.replacement .note-badge { background: var(--amber); color: #1a1a1a; }
.info .note-badge { background: var(--blue); color: #fff; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 14px; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 6px; background: var(--surface-2); }
.tag.popup { color: var(--accent); }

.classes { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.classes .label { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.cls { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.cls.dim { opacity: 0.35; }
.cls .day { font: 700 13px var(--font); color: var(--text); }
.cls .what { font-size: 14px; font-weight: 600; }
.cls .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.ig-frame { width: 100%; height: 460px; border: 0; background: #fff; display: block; border-top: 1px solid var(--border); }
/* Phones: "Show Instagram posts" button that loads the feed on tap */
.ig-show {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border: 0; border-top: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: 600 14px var(--font);
  text-align: left; cursor: pointer;
}
.ig-show:hover, .ig-show:focus-visible { background: var(--border); }
.ig-show:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ig-show-arrow { color: var(--muted); font-size: 12px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; margin-top: auto; }
.card-foot a { text-decoration: none; font-weight: 500; color: var(--text); }
.card-foot span { color: var(--muted); }
.empty { padding: 24px; color: var(--muted); font-size: 14px; }

/* Login */
.auth-wrap { max-width: 400px; margin: 48px auto; padding: 0 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.panel h1 { font-size: 34px; margin-bottom: 6px; }
.panel p.lead { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.divider { text-align: center; color: var(--muted); font-size: 12px; margin: 16px 0; }
.msg { font-size: 13px; margin-top: 12px; min-height: 18px; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--green); }
.full { width: 100%; }

/* Dashboard */
.dash { max-width: 760px; margin: 0 auto; padding: 28px 16px 64px; display: flex; flex-direction: column; gap: 20px; }
.dash .panel h2 { font-size: 20px; margin-bottom: 4px; }
.dash .panel p.hint { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.status { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.pill.on { background: rgba(62, 207, 142, 0.15); color: var(--green); }
.pill.off { background: rgba(255, 92, 92, 0.15); color: var(--red); }
.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.list .empty-line { color: var(--muted); font-size: 13px; }
.add-box { border-top: 1px dashed var(--border); padding-top: 16px; }

/* Admin */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
[hidden] { display: none !important; }
.admin-edit, #editPanels { display: flex; flex-direction: column; gap: 20px; }
.admin-edit .panel h2 { font-size: 28px; margin-bottom: 4px; }
.admin-edit .panel p.hint { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.admin-list { position: sticky; top: 16px; align-self: start; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.list-head h2 { font-size: 28px; }
.t-row {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; margin-bottom: 6px; border-radius: 10px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--text); font: 600 14px var(--font); text-align: left; cursor: pointer;
}
.t-row small { color: var(--muted); font-weight: 400; font-size: 12px; }
.t-row.active { border-color: var(--focus); }
.t-row .pill { font-size: 11px; white-space: nowrap; }
.toggle { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.toggle input { width: auto; }
.site-foot { padding: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; text-align: center; }
.site-foot a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.3); }

/* Nav links (Classes / Workshops) */
header.top nav a.navlink { padding: 6px 2px; border-bottom: 2px solid transparent; }
header.top nav a.navlink.active { color: var(--text); }
header.top nav a.navlink:hover { color: var(--text); }

/* Admin tabs */
.admin-tabs { max-width: 1100px; margin: 20px auto 0; padding: 0 16px; display: flex; gap: 8px; }
.admin-tabs button {
  padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font: 600 14px var(--font); cursor: pointer;
}
.admin-tabs button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.admin + .admin { margin-top: 0; }
.poster-edit { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; margin: 16px 0; }
.poster-box {
  aspect-ratio: 4 / 5; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  border: 1px dashed var(--border); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center;
}
.poster-box img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Workshops page */
.posters {
  display: grid; gap: 20px; padding: 4px 24px 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.poster-card {
  display: flex; flex-direction: column; padding: 0; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; color: var(--text); font: inherit;
}
.poster-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.poster-img { aspect-ratio: 4 / 5; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.poster-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-cap { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.poster-cap .when { color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.poster-cap .what { font-weight: 600; font-size: 16px; line-height: 1.3; }
.poster-cap .meta { color: var(--muted); font-size: 12px; }

/* Studios page: A to Z, compact row cards, whole card is a link */
.studio-grid { display: grid; gap: 10px; padding: 4px 24px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.studio {
  display: flex; align-items: center; gap: 16px; min-width: 0; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); text-decoration: none; transition: border-color 0.15s;
}
a.studio:hover { border-color: rgba(255, 255, 255, 0.2); background: var(--surface-2); }
a.studio:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.studio-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.studio-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; min-width: 0; }
.studio h3 {
  font-family: var(--font);
  font-weight: 600; font-size: 16px; letter-spacing: 0; line-height: 1.3;
  max-width: 100%; overflow-wrap: anywhere;
}
/* Cards never cut text off: long names, places, descriptions and links wrap onto the next line. */
.studio-area { min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; overflow-wrap: anywhere; }
.studio-desc { color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.studio-link { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.studio-host { color: var(--muted); max-width: 200px; overflow-wrap: anywhere; }
.studio-cta { color: var(--text); font-weight: 600; white-space: nowrap; }
/* Admin: studio locations editor */
/* Style pages and the "Browse by style" row */
.style-links { margin: 40px 24px 0; padding-top: 28px; border-top: 1px solid var(--line); }
.style-links .filter-label { padding: 0 0 10px; }
.style-links .chips { flex-wrap: wrap; overflow: visible; padding: 0; }
.chips a {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 6px; background: var(--fill); color: var(--muted); text-decoration: none;
  font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: 0.04em;
}
.chips a:hover { color: var(--text); }
.chips a.active { background: var(--text); color: var(--bg); }
.sub-head { padding: 0 24px; margin: 32px 0 6px; font-size: 22px; }
.style-courses .trow { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; }
.course-cta a:not(.btn) { color: var(--text); font-size: 13px; text-underline-offset: 3px; }
.course-cta .btn { background: var(--accent); border-color: var(--accent); color: #0a0a0c; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }
.tmain .meta a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--border); }
.tmain .meta a:hover { text-decoration-color: var(--text); }
@media (max-width: 600px) {
  .sub-head { padding: 0 16px; }
  .style-links { margin: 32px 16px 0; }
  .style-courses .trow { grid-template-columns: 62px minmax(0, 1fr); }
  .style-courses .course-cta { grid-column: 2; }
}

/* Admin: teacher share link */
.slug-row { display: flex; align-items: center; gap: 8px; }
.slug-prefix { color: var(--muted); font: 400 12px var(--mono); white-space: nowrap; }
.slug-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }
.field-hint { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
@media (max-width: 600px) { .slug-row { flex-wrap: wrap; } .slug-prefix { width: 100%; } }

/* Classes page opened from a teacher's share link: one card, and a way back to everything */
.focus-bar {
  margin: 0 24px 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  color: var(--muted); font-size: 14px;
}
.focus-bar b { color: var(--text); font-weight: 500; }
.focus-bar button { background: none; border: 0; padding: 0; color: var(--text); font: 500 14px var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.3); }
.strip.strip-one { grid-template-columns: minmax(0, 520px); }
@media (max-width: 600px) { .focus-bar { margin: 0 16px 16px; } .strip.strip-one { grid-template-columns: minmax(0, 1fr); } }

/* Admin: the text box under a Style dropdown when "Other (type your own)" is picked */
.style-custom { margin-top: 8px; }
.loc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.loc-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
@media (max-width: 600px) {
  .studio-grid { padding: 4px 16px 16px; }
  .loc-row { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .studio { padding: 11px 14px; gap: 12px; }
  .studio-host { display: none; }
}

/* Courses page */
.course-grid { display: grid; gap: 20px; padding: 4px 24px 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.course { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; min-width: 0; }
.course-poster { aspect-ratio: 16 / 10; background: var(--surface-2); }
.course-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.course-body .eyebrow { margin: 0; color: var(--text); }
.course-body h3 { font-family: var(--font); font-weight: 600; font-size: 21px; letter-spacing: 0; line-height: 1.25; }
.course-when { margin: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.course-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 13px; width: 100%; }
.course-facts dt { color: var(--muted); }
.course-facts dd { margin: 0; }
.course-facts dd.no-class { color: var(--amber); }
.spots { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(62, 207, 142, 0.15); color: var(--green); }
.spots.few { background: rgba(255, 181, 71, 0.15); color: var(--amber); }
.spots.is-full { background: rgba(255, 92, 92, 0.15); color: var(--red); }
.full-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.date-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.date-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.date-chip button:hover { color: var(--red); background: var(--surface); }
.date-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-add input[type=date] { max-width: 190px; }
.fill-weekly { margin-top: 12px; font-size: 13px; color: var(--muted); }
.fill-weekly summary { cursor: pointer; margin-bottom: 8px; }
.course-dates { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.course-dates b { display: inline-block; min-width: 2.6em; font-weight: 600; color: var(--muted); }

.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 8, 0.85);
  display: grid; place-items: center; padding: 16px;
}
.lightbox-inner {
  position: relative; width: min(520px, 100%); max-height: 100%; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.lightbox-inner img { width: 100%; display: block; }
.lightbox-info { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lightbox-info h3 { font-family: var(--font); font-weight: 600; font-size: 21px; letter-spacing: 0; line-height: 1.25; }
.lightbox-info .btn { margin-top: 8px; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}


/* For teachers page */
.teach { max-width: 820px; margin: 0 auto; padding: 36px 24px 64px; display: flex; flex-direction: column; gap: 40px; }
.teach h1 { font-size: 52px; margin: 0; }
.teach h2 { font-size: 34px; margin: 0 0 14px; }
.teach h3 { font-family: var(--font); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; margin: 0 0 4px; }
.teach .intro { font-size: 16px; }
.teach .hint { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }
.teach-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.founding { font-size: 13px; font-weight: 700; color: var(--green); background: rgba(62, 207, 142, 0.12); padding: 6px 12px; border-radius: 6px; }
.wa-number { color: var(--muted); font-size: 14px; }
.wa-number b { color: var(--text); font-variant-numeric: tabular-nums; user-select: all; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.steps li::before { content: counter(step); display: block; font: 500 13px var(--font); color: var(--muted); margin-bottom: 10px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.template { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.template pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text); padding-right: 70px; }
.template .copy { position: absolute; top: 10px; right: 10px; }
.tpl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tpl-label { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-bottom: 8px; background: var(--surface-2); color: var(--muted); }
.tpl-label.cancelled { background: var(--red); color: #fff; }
.tpl-label.replacement { background: var(--amber); color: #1a1a1a; }
.price-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
/* For teachers page: one price table. Tighter on phones so all three columns fit. */
.price-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.price-table th, .price-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.price-table tr:first-child > * { border-top: 0; }
.price-table tbody th { font-weight: 600; width: 50%; }
.price-table th small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.price-table .free { color: var(--green); font-weight: 600; }
@media (max-width: 520px) {
  .price-table { font-size: 13px; }
  .price-table th, .price-table td { padding: 10px 8px; }
}
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.teach-end { border-top: 1px solid var(--border); padding-top: 32px; }
@media (max-width: 600px) {
  .teach { padding: 28px 16px 48px; gap: 32px; }
  .teach h1 { font-size: 38px; }
  .teach h2 { font-size: 28px; }
  .tpl-grid { grid-template-columns: minmax(0, 1fr); }
}


/* Admin: stats */
.stats-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 20px; }
.stats-wrap .panel h2 { font-size: 28px; margin-bottom: 4px; }
.stats-wrap .hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.stats-filter { display: flex; align-items: center; gap: 8px; margin: 0; }
.stats-filter select { width: auto; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 18px; }
.tile { background: var(--surface-2); border-radius: 8px; padding: 14px 16px; }
.tile-label { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.tile-value { font-family: var(--font); font-weight: 600; font-size: 34px; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--muted); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .baseline { stroke: var(--muted); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .bar { fill: var(--accent); }
.chart .bar.today { fill: var(--accent-fill); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover { fill: rgba(255, 255, 255, 0.04); }
.chart .tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.chart .tip span { color: var(--muted); }
.table-scroll { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stats-table td { padding: 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stats-table td small { color: var(--muted); }


/* Classes page: one compact filter bar + "By time" list */
.count { padding: 0 24px 10px; color: var(--muted); font-size: 13px; }
.filterbar { padding: 12px 24px; margin-bottom: 8px; background: var(--bg); }
@media (min-width: 760px) { .filterbar { position: sticky; top: 0; z-index: 20; } }
.filterbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.filterbar .chips { padding: 0; flex-wrap: wrap; overflow: visible; }
.seg { display: inline-flex; background: var(--fill); border-radius: 6px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 6px; font: 600 13px var(--font); cursor: pointer; }
.seg button.active { background: var(--text); color: var(--bg); }
.filter-selects { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.filter-selects select { width: auto; padding: 8px 12px; border-radius: 6px; background: var(--fill); font-size: 13px; }
/* Dance style picker sits right after By time / By teacher */
.filterbar .style-pick { width: auto; padding: 8px 12px; border-radius: 6px; background: var(--fill); font-size: 13px; }
.filter-selects input { width: 210px; padding: 8px 14px; border-radius: 6px; background: var(--fill); font-size: 13px; }
.timeline { padding: 4px 24px 16px; display: flex; flex-direction: column; gap: 22px; max-width: 900px; margin: 0 auto; }   /* reading width, centred */
.tday-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.tday-head b { font-size: 15px; }
.tday-head span { color: var(--muted); font-size: 13px; }
.trow { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.trow:last-child { border-bottom: 0; }
.ttime { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tmain .what { font-weight: 600; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tmain .meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.tmain .meta button:not(.share-t) { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); cursor: pointer; }
.tmain .meta button:not(.share-t):hover { text-decoration-color: var(--text); }
.tnote { margin-top: 8px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 181, 71, 0.1); color: var(--text); border-left: 3px solid var(--amber); }
.tnote.cancelled { background: rgba(255, 92, 92, 0.1); border-left-color: var(--red); }
.empty-hint { padding: 8px 24px 24px; color: var(--muted); font-size: 14px; }
.empty-hint button { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) {
  .filterbar { padding: 12px 16px; }
  .filter-selects { margin-left: 0; width: 100%; }
  .filter-selects select { flex: 1; }
  .filter-selects input { width: 100%; }
  .timeline { padding: 4px 16px 16px; }
  .trow { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
  .count { padding: 0 16px 10px; }
  .empty-hint { padding: 8px 16px 24px; }
}

@media (max-width: 800px) {
  .admin { grid-template-columns: 1fr; }
  .admin-list { position: static; }
}

@media (max-width: 600px) {
  .strip { padding: 4px 16px 16px; grid-template-columns: minmax(0, 1fr); }
  h2, .section-head h1 { font-size: 34px; }
  .intro { font-size: 14px; }
  .logo { font-size: 16px; }
  header.top nav { gap: 12px; }
  header.top nav a.navlink { font-size: 13px; }
  .hide-sm { display: none !important; }
  header.top { padding: 14px 16px; }
  .course-grid { padding: 4px 16px 16px; grid-template-columns: minmax(0, 1fr); }
  .posters { padding: 4px 16px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .poster-edit { grid-template-columns: 110px 1fr; }
}

/* Phones and narrow tablets: the logo on its own line, the menu on a line underneath (it no longer fits beside the logo under ~760px). */
@media (max-width: 760px) {
  header.top { flex-wrap: wrap; row-gap: 8px; padding: 14px 16px 6px; }
  header.top nav { width: 100%; gap: 20px; overflow-x: auto; scrollbar-width: none; }
  header.top nav::-webkit-scrollbar { display: none; }
  header.top nav a.navlink { padding: 8px 0; flex: none; }
}

/* Wide screens: keep header, listings and footer in one centred 1000px column. */
@media (min-width: 1049px) {
  header.top, .owner-bar { padding-left: calc((100% - 1000px) / 2); padding-right: calc((100% - 1000px) / 2); }
  section.listing { padding-left: calc((100% - 1048px) / 2); padding-right: calc((100% - 1048px) / 2); }
}
/* Classes pages (the ones with the timeline): heading, filters and classes share one centred 900px reading column. */
@media (min-width: 949px) {
  section.listing:has(> #timeline) { padding-left: calc((100% - 900px) / 2); padding-right: calc((100% - 900px) / 2); }
}

/* Nov 2026 pass after Cassette and Apple ---------------------------------
   1. Red only on the actions: "Book" and "Sign up" are solid red pills.
   2. Mono capitals for labels, times, menus and chips (Inter stays for names and text).
   3. Studios and courses sit on a square grid with shared 1px lines.
   4. Page labels are outlined pills that carry a fact ("Studios · 5 listed"). */

/* 2. Small capitals only for tiny labels and badges; menus, tabs, chips and times read as normal words. */
.eyebrow, .filter-label, .count, .studio-area, .classes .label, .note-badge, .tpl-label, .spots, .poster-cap .when {
  text-transform: uppercase; letter-spacing: 0.06em;
}
header.top nav a.navlink, header.top nav a.btn { font-size: 14px; font-weight: 500; }
.filter-label, .count, .studio-area, .tag, .classes .label { font-size: 11px; font-weight: 600; }
.chips button, .seg button, .chips a { font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.stats-line { font-size: 12px; }
.ttime { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cls .day { font-size: 13px; font-weight: 600; }
.tday-head span { font-size: 13px; }

/* 4. Page labels: plain small text above the headline, no outlined pill */
.eyebrow { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 600; color: var(--accent); }
.course-body .eyebrow { border: 0; padding: 0; margin: 0; font-size: 12px; color: var(--text); }

/* 1. Red action pills */
.studio-cta { padding: 6px 12px; border-radius: 6px; background: var(--accent); color: #0a0a0c; font-size: 12px; font-weight: 500; }
a.studio:hover .studio-cta { background: #ff5757; }
.course .btn { background: var(--accent); border-color: var(--accent); color: #0a0a0c; font-size: 13px; }
.course .btn:hover { background: #ff5757; border-color: #ff5757; }

/* 3. Square grid with shared lines (the grid draws the top and left edge, each cell its right and bottom) */
.studio-grid, .course-grid { gap: 0; padding: 0; margin: 4px 24px 16px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.studio, .course { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.studio { padding: 16px 18px; }
a.studio:hover { border-color: var(--line); background: var(--fill); }
a.studio:focus-visible { outline-offset: -2px; }
.course-grid { align-items: stretch; }
.course-body { padding: 20px; }
@media (max-width: 600px) {
  .studio-grid, .course-grid { margin: 4px 16px 16px; }
  .studio { padding: 14px; }
}

/* "On now" / "Starts in 40 min" on today's classes (updateLive in js/shared.js). A still red dot. */
.live { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--font); color: var(--text); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.live.is-now { color: var(--accent); }
@keyframes live-ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

/* Studios page map (js/studio-map.js): Earth → Singapore, then the five regions with a dot and count each. */
.studio-map { position: relative; height: 300px; margin: 4px 24px 20px; border: 1px solid var(--line); overflow: hidden; }
.studio-map canvas { position: absolute; inset: 0; display: block; }
.map-pins { position: absolute; inset: 0; pointer-events: none; }
.map-pin {
  position: absolute; transform: translate(-6px, -50%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 0; background: none; border: 0; cursor: pointer;
  font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap;
}
.map-pin i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.map-pin:hover, .map-pin.active { color: var(--text); }
.map-pin.active i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.map-pin.empty { cursor: default; color: rgba(255, 255, 255, 0.28); }
.map-pin.empty i { background: rgba(255, 255, 255, 0.22); width: 6px; height: 6px; margin: 0 2px; }
.map-pin:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 600px) {
  .studio-map { height: 210px; margin: 4px 16px 16px; }
  .map-pin span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .map-pin.active i::after { animation: none; display: none; } }

/* Admin → Story: previews of the Instagram story pictures */
.story-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 18px; }
.story-controls select { width: auto; }
.story-pick { margin: 0 0 18px; }
.story-pick summary { cursor: pointer; font-weight: 600; }
.story-pick-day { margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.story-pick-day label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.story-pick-day input { width: auto; }
.story-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.story-slide { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.story-slide canvas { width: 100%; height: auto; aspect-ratio: 9 / 16; border: 1px solid var(--line); border-radius: 8px; display: block; }
.story-slide figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: 0.05em; }
.story-slide figcaption span { margin-right: auto; }

/* Course poster placeholder while its image loads (posters load as they come near the screen) */
.course-poster.is-loading { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 200% 100%; animation: poster-shimmer 1.4s linear infinite; }
@keyframes poster-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .course-poster.is-loading { animation: none; } }

/* "Check before you go" note under the listings (Classes, Courses, style pages) */
.disclaimer { margin: 28px 24px 0; max-width: 72ch; color: var(--muted); font-size: 13px; line-height: 1.55; }
.disclaimer b { color: var(--text); font-weight: 500; }
@media (max-width: 600px) { .disclaimer { margin: 24px 16px 0; } }

/* "By time" list (and style pages): a printed timetable. Each day opens with a heavy rule and a big day name. */
.timeline > section { border-top: 2px solid var(--text); }
.timeline > section .tday-head { padding: 12px 0 4px; margin: 0; border-bottom: 1px solid var(--border); gap: 12px; }
.timeline > section .tday-head b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.style-courses #courseList { margin: 4px 24px 16px; padding: 0 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); gap: 0; max-width: 852px; }
@media (max-width: 600px) {
  .style-courses #courseList { margin: 4px 16px 16px; padding: 0 14px; }
}

/* ---------- Light theme (the default) ----------
   The dark colours above apply when <html> has class "dark" (sun/moon button in the header, js/theme.js).
   Without it, these light overrides apply. Same layout and red; only colours change. */
html:not(.dark) {
  color-scheme: light;
  --bg: #ffffff;            /* pure white page (chosen 10 Nov 2026) */
  --surface: #ffffff;       /* cards: same white, told apart by their borders */
  --surface-2: #f4f4f3;
  --border: rgba(0, 0, 0, 0.12);
  --fill: rgba(0, 0, 0, 0.045);
  --text: #121214;
  --muted: #5d6169;
  --btn: #121214;           /* main buttons: near-black with white text */
  --btn-text: #ffffff;
  --focus: rgba(0, 0, 0, 0.35);
  --line: rgba(0, 0, 0, 0.13);
  --accent: #e3262d;        /* a slightly deeper red so white text on it stays readable */
  --accent-fill: #c81e25;
  --red: #d42a2a;
  --amber: #a86400;
  --blue: #2a68d6;
  --green: #12875a;
}
html:not(.dark) .btn.ghost { border-color: rgba(0, 0, 0, 0.18); }
html:not(.dark) .site-foot a, html:not(.dark) .focus-bar button { text-decoration-color: rgba(0, 0, 0, 0.3); }
html:not(.dark) a.studio:hover, html:not(.dark) .poster-card:hover { border-color: rgba(0, 0, 0, 0.2); }
html:not(.dark) .studio-cta, html:not(.dark) .course .btn, html:not(.dark) .course-cta .btn { color: #fff; }
html:not(.dark) a.studio:hover .studio-cta, html:not(.dark) .course .btn:hover { background: #c81e25; border-color: #c81e25; }
html:not(.dark) .map-pin.empty { color: rgba(0, 0, 0, 0.35); }
html:not(.dark) .map-pin.empty i { background: rgba(0, 0, 0, 0.25); }
html:not(.dark) .chart .hit:hover { fill: rgba(0, 0, 0, 0.04); }
html:not(.dark) .tag { background: rgba(0, 0, 0, 0.06); }
html:not(.dark) .banner { background: rgba(42, 104, 214, 0.08); }
/* The Studios map is drawn in white lines; flip it to dark lines (the red dots are separate and stay red). */
html:not(.dark) .studio-map canvas { filter: invert(1) hue-rotate(180deg); }

/* Sun/moon button at the end of the header menu: just the icon, no circle around it */
.theme-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; padding: 0;
  border: 0; background: none; color: var(--muted); cursor: pointer;
}
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn:hover { color: var(--text); }
.theme-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Classes page: "By time / By teacher" and the day choices are tabs: plain text, the picked one underlined in red
   (added 10 Nov 2026). Style and region buttons elsewhere stay as filled buttons. */
.filterbar .seg { background: none; padding: 0 20px 0 0; gap: 20px; border-radius: 0; border-right: 1px solid var(--border); }
.filterbar .seg button, .filterbar #days button {
  background: none; border: 0; border-radius: 0; padding: 8px 0 6px; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.filterbar .seg button.active, .filterbar #days button.active {
  background: none; color: var(--text); border-bottom-color: var(--accent);
}
.filterbar .seg button:hover, .filterbar #days button:hover { color: var(--text); }
.filterbar #days { gap: 20px; }

/* ---------- Motion (added 10 Nov 2026) ---------- */
/* 1. Sliding red underline on the Classes page tabs (js/tab-ink.js). The active tab's own underline is
      hidden and one red bar per group slides between tabs. */
.filterbar .has-ink { position: relative; }
.filterbar .has-ink button.active { border-bottom-color: transparent; }
.tab-ink {
  position: absolute; left: 0; top: 0; height: 2px; background: var(--accent); pointer-events: none;
}
.ink-ready > .tab-ink { transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.28s cubic-bezier(0.3, 0.7, 0.2, 1); }
.filterbar .seg button, .filterbar #days button { transition: color 0.2s; }

/* Results and buttons don't animate in or lift: things just appear, like a printed page. */
.btn, .studio-cta, .course .btn, .course-cta .btn { transition: background-color 0.15s ease; }
/* Share button next to a course's Sign up: outlined, not red. */
.course-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.course .btn.ghost, html:not(.dark) .course .btn.ghost { background: transparent; color: var(--text); border-color: rgba(127, 127, 127, 0.35); }
.course .btn.ghost:hover, html:not(.dark) .course .btn.ghost:hover { background: rgba(127, 127, 127, 0.12); border-color: rgba(127, 127, 127, 0.35); }

@media (prefers-reduced-motion: reduce) {
  .ink-ready > .tab-ink { transition: none; }
}

/* "Get listed" in the header: no button shape, just bold text in the main text colour (black in light, white in dark). */
header.top nav a.btn { background: none; border-color: transparent; color: var(--text); font-weight: 700; padding-left: 0; padding-right: 0; }
header.top nav a.btn:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Ideas borrowed from the Dimension style (Refero), added 10 Nov 2026 ---------- */
/* 3. DM Sans instead of Inter: warmer, rounder letters */
:root { --font: "DM Sans", "Inter", system-ui, sans-serif; }

/* 4. Type rules: big headlines medium weight and tight; small labels slightly open; more room between sections */
h1, h2 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; }
h2, .section-head h1 { font-size: 56px; }
.teach h1 { font-size: 60px; }
.intro, .section-head p { font-size: 17px; }
:is(.count, .filter-label, .tday-head span, .studio-area, .studio-host, .tag) { letter-spacing: 0.06em; }
.section-head { padding-top: 24px; padding-bottom: 8px; }
.teach { gap: 56px; }
@media (max-width: 600px) {
  h2, .section-head h1 { font-size: 40px; }
  .teach h1 { font-size: 42px; }
  .section-head { padding-top: 16px; }
}

/* 2. Numbered rows on the For teachers page: 01, 02, 03 … with thin lines, no boxes */
.steps { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--border); }
.steps li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 20px; align-items: baseline;
  background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 20px 0;
}
.steps li::before { content: counter(step, decimal-leading-zero); margin: 0; font: 500 15px var(--mono); color: var(--accent); }
.steps h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.steps p { font-size: 15px; }
@media (max-width: 600px) {
  .steps li { grid-template-columns: 44px minmax(0, 1fr); }
  .steps li p { grid-column: 2; }
}

/* 5. Dark mode: body text a touch softer than pure white */
html.dark { --text: #ededed; }

/* More room between the last card and the footer on every page (10 Nov 2026) */
.site-foot { margin-top: 56px; }
.foot-ig { display: block; margin-top: 6px; }
@media (max-width: 600px) { .site-foot { margin-top: 40px; } }
/* Classes page: the big heading is hidden, so close up the space it left above the intro line */
.section-head:has(> h1.sr) { padding-top: 0; }
section.listing:has(.section-head > h1.sr) { padding-top: 24px; }
.section-head:has(> h1.sr) .intro { margin-top: 0; }

/* Courses: the teacher's name comes first, above the course name, because students choose by teacher (10 Nov 2026) */
.course-body .course-teacher { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: -6px; }
.what .course-teacher { display: block; flex-basis: 100%; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: -6px; }

/* For teachers page: community photo between the intro and "How it works" (11 Nov 2026) */
.teach-photo { margin: 0; }
.teach-photo img { width: 100%; height: auto; aspect-ratio: 7 / 3; object-fit: cover; object-position: center bottom; border-radius: 8px; display: block; background: var(--surface-2); }
.teach-photo figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .teach-photo img { aspect-ratio: 8 / 5; } }

/* "Book ↗" after a class, to the studio's booking page. Red = act here. */
.meta a.book { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.meta a.book:hover { text-decoration: underline; }
.share-t { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.share-t:hover { color: var(--text); }
.teacher .share-t { margin-left: auto; font-size: 13px; }
.cls:has(> .link-btn + .link-btn) { grid-template-columns: 52px 1fr auto auto; }
.cls:has(> .link-btn + .link-btn + .link-btn) { grid-template-columns: 52px 1fr auto auto auto; }   /* Booking link + Remove in the editors */

/* Resources page: one heading per group, above a grid of link cards (same cards as Studios). */
.resource-head { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; padding: 18px 24px 8px; }
.resource-desc { color: var(--muted); max-width: 640px; padding: 0 24px 8px; margin: -4px 0 0; }
/* Resources: one card per row. */
.resource-grid { grid-template-columns: 1fr; }
.is-mix { flex-wrap: wrap; }
.mix-play { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; }
.mix-player { display: block; width: 100%; height: 166px; border: 0; }
/* Floating player along the bottom of the screen. */
.mix-bar { position: fixed; z-index: 50; right: 16px; bottom: 16px; width: min(560px, calc(100% - 32px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); }
.mix-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.mix-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-close { width: 28px; height: 28px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.mix-close:hover { color: var(--text); }
body.has-mix-bar { padding-bottom: 230px; }
/* Play mix: outlined white, so red stays for the glow and the record; the playing one fills white. */
.res-mixes .studio-cta.mix-play { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.55); transition: background-color 0.15s ease; }
.res-mixes .studio-cta.mix-play:hover { background: rgba(255, 255, 255, 0.12); }
.res-mixes .studio-cta.mix-play.is-playing { background: var(--text); color: var(--bg); border-color: var(--text); }
/* Turntable above the Mixes heading: the record spins and the arm drops while a mix is playing. */
.deck { position: relative; height: 200px; margin: 16px 16px 0; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.vinyl {
  position: absolute; top: 50%; left: 50%; width: 164px; height: 164px; margin: -82px 0 0 -82px; border-radius: 50%;
  background:
    radial-gradient(circle, #f3d27a 0 3px, #f6eed9 4px, #efe4c8 20px, #e2d3ae 29px, #e2b84a 29.5px 31px, #111 31.5px 33px, transparent 34px),   /* gold spindle, cream label, gold ring */
    repeating-radial-gradient(circle, #151517 0 2px, #1d1d20 2px 3px),
    #151517;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.vinyl::after {   /* light catching the grooves, so the spin shows */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 40deg, rgba(255, 255, 255, 0.08) 60deg, transparent 80deg 220deg, rgba(255, 255, 255, 0.06) 240deg, transparent 260deg);
}
.tonearm {   /* brushed gold */
  position: absolute; top: 18px; left: calc(50% + 92px); width: 6px; height: 120px; border-radius: 3px;   /* pivot sits just right of the record, wherever the record is */
  background: linear-gradient(90deg, #d9a92e, #fff1b8 45%, #f0c454);
  transform-origin: 3px 3px; transform: rotate(8deg); transition: transform 0.8s ease;
}
.tonearm::before { content: ""; position: absolute; top: -8px; left: -7px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff1b8, #d9a92e); }
.tonearm::after { content: ""; position: absolute; bottom: -10px; left: -4px; width: 14px; height: 18px; border-radius: 2px; background: linear-gradient(90deg, #d9a92e, #fff1b8 45%, #f0c454); }
body.has-mix-bar .vinyl { animation: spin 1.8s linear infinite; }
body.mix-paused .vinyl { animation-play-state: paused; }
body.has-mix-bar .tonearm { transform: rotate(26deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { body.has-mix-bar .vinyl { animation: none; } }
/* Resources layout: panels on the left, mixes on the right (stacked on phones). */
.res-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; padding: 8px 24px 0; }
.res-layout.no-mixes { grid-template-columns: 1fr; }
.res-panels { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.res-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.res-panel .resource-head { font-size: 18px; padding: 14px 16px 6px; }
.res-panel .resource-desc { padding: 0 16px 10px; }
.res-panel .studio-grid { margin: 0; border-left: 0; }
.res-panel .studio { border-right: 0; }
.res-panel .studio:last-child { border-bottom: 0; }
.res-panel .studio-host { display: none; }
.res-mixes { position: sticky; top: 16px; }
/* The Mixes box and the floating player are always dark, in both site themes. */
.res-mixes, .mix-bar {
  color-scheme: dark; --bg: #0a0a0c; --surface: #131316; --surface-2: #1a1a1e; --border: rgba(255, 255, 255, 0.13);
  --text: #f7f8f8; --muted: #8a8f98; --line: rgba(255, 255, 255, 0.17); --accent: #ff3b3b;
  background: var(--bg); color: var(--text);
}
/* Dark, with a soft red glow from behind the turntable, like a DJ booth under a stage light. */
.res-mixes {
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(255, 59, 59, 0.35) 0%, rgba(255, 59, 59, 0.08) 45%, transparent 70%),
    linear-gradient(180deg, #1c1416 0%, #121214 50%, #0a0a0c 100%);
  border-color: rgba(255, 90, 90, 0.25);
}
.res-mixes .deck { background: none; border-color: transparent; }
@media (max-width: 900px) {
  .res-layout { grid-template-columns: 1fr; padding: 8px 16px 0; }
  .res-mixes { position: static; }
}
