:root {
  --cream: #f7f1e6;
  --cream-deep: #efe6d6;
  --ink: #2c2620;
  --ink-soft: #5a5044;
  --rose: #dba49b;
  --rose-deep: #cf8c82;
  --sage: #7d8a72;
  --line: #e3d8c4;
  --white: #ffffff;
  --gold: #c9a96a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3, h4 { font-weight: 400; margin: 0 0 0.4em; }

a { color: inherit; text-decoration: none; }

main { max-width: 1180px; margin: 0 auto; padding: 0 32px 80px; }

/* Header */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; letter-spacing: 0.02em; }
.brand img { height: 40px; width: auto; max-width: none; }
.main-nav { display: flex; align-items: center; gap: 28px; font-family: Helvetica, Arial, sans-serif; font-size: 0.95rem; }
.main-nav a { color: var(--ink-soft); transition: color 0.15s; }
.main-nav a:hover { color: var(--ink); }
.cart-link { position: relative; display: inline-flex; }
.cart-count {
  position: absolute; top: -8px; right: -10px;
  background: var(--rose-deep); color: white; font-size: 0.65rem;
  border-radius: 999px; padding: 1px 6px; font-family: Helvetica, sans-serif;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 64px;
}
.hero img { width: 100%; height: 420px; object-fit: cover; object-position: center; border-radius: 4px; }
.about-hero img { height: 280px; object-position: center 80%; }
.offerings-hero img { height: 320px; }
.hero-copy h1 { font-size: 3.2rem; line-height: 1.1; }
.hero-copy p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 1.05rem; }

/* Hero variant: image on top (capped width), copy below */
.hero.hero-stacked { grid-template-columns: 1fr; text-align: center; }
.hero.hero-stacked img { width: 100%; max-width: 640px; height: auto; margin: 0 auto 32px; display: block; }
.hero.hero-stacked .hero-copy { max-width: 640px; margin: 0 auto; }
.offerings-hero.hero-stacked img { max-width: 1180px; height: 380px; object-fit: contain; }

.btn {
  display: inline-block;
  font-family: Helvetica, Arial, sans-serif;
  background: var(--rose);
  color: white;
  padding: 14px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--rose-deep); }
.btn:active { transform: scale(0.98); }
.btn-outline { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-small { padding: 8px 18px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: #b4544a; }
.btn-danger:hover { background: #9c463d; }

/* Class / shop cards */
.section-title { font-size: 1.8rem; margin: 56px 0 24px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(44, 38, 32, 0.06);
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { color: var(--rose-deep); font-size: 1.4rem; }
.card-body p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.card-body .meta { font-family: Helvetica, Arial, sans-serif; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 8px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.price { font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 1.1rem; }

/* Forms */
.form-panel {
  max-width: 420px;
  margin: 64px auto;
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(44, 38, 32, 0.06);
}
.form-panel h1 { font-size: 1.8rem; margin-bottom: 4px; }
.form-panel .sub { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); margin-bottom: 24px; font-size: 0.9rem; }
label { display: block; font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; margin: 16px 0 6px; color: var(--ink-soft); }
input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  background: var(--cream);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--rose); border-color: transparent; }
.form-panel .btn { width: 100%; margin-top: 24px; text-align: center; }
.form-error { background: #f6dcd8; color: #8a3a30; padding: 10px 14px; border-radius: 6px; font-family: Helvetica, sans-serif; font-size: 0.85rem; margin-top: 16px; }
.form-note { font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; color: var(--ink-soft); margin-top: 18px; text-align: center; }

/* Tables / lists */
.panel {
  background: var(--white);
  border-radius: 8px;
  padding: 28px 30px;
  box-shadow: 0 4px 18px rgba(44, 38, 32, 0.06);
  margin-bottom: 28px;
}
.panel h2 { font-size: 1.3rem; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-family: Helvetica, Arial, sans-serif; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-soft); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-block;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}
.badge-awaiting_payment { background: #e9e1d0; color: #6b5f4a; }
.badge-pending_verification { background: #f4e2b8; color: #8a6a1f; }
.badge-approved { background: #dcead4; color: #3f6b2a; }
.badge-rejected { background: #f6dcd8; color: #8a3a30; }
.badge-confirmed { background: #dcead4; color: #3f6b2a; }
.badge-cancelled { background: #e9e1d0; color: #6b5f4a; }

.empty-state { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); padding: 24px 0; }

/* Capacity language (docs/design/05_class_management.md section 6) --
   capacity is never silent: every fraction carries its own state. */
.capacity-fraction { font-family: Helvetica, Arial, sans-serif; font-weight: 600; }
.capacity-fraction.state-normal { color: var(--ink-soft); }
.capacity-fraction.state-nearly_full { color: var(--gold); }
.capacity-fraction.state-full { color: var(--ink-soft); }
.capacity-hint { font-family: Helvetica, Arial, sans-serif; font-size: 0.78rem; color: var(--gold); margin-left: 6px; }
.session-row-inactive { opacity: 0.55; text-decoration: line-through; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; font-family: Helvetica, Arial, sans-serif; }
.tab-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); cursor: pointer; font-size: 0.85rem; color: var(--ink-soft);
}
.tab-btn.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.screenshot-thumb { max-width: 160px; border-radius: 4px; border: 1px solid var(--line); }

.qr-box { text-align: center; padding: 20px 0; }
.qr-box img { border: 8px solid white; box-shadow: 0 4px 18px rgba(44, 38, 32, 0.1); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; font-family: Helvetica, Arial, sans-serif; }
.filter-chip {
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: white;
  cursor: pointer; font-size: 0.85rem;
}
.filter-chip.active { background: var(--rose); border-color: var(--rose); color: white; }

.cart-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-family: Helvetica, Arial, sans-serif; }
.cart-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.cart-row .grow { flex: 1; }
.qty-input { width: 60px; }
.cart-summary { display: flex; justify-content: space-between; font-family: Helvetica, Arial, sans-serif; font-size: 1.1rem; padding: 16px 0; }

.site-footer { text-align: center; font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 0.82rem; }

/* Homepage: welcome / about preview */
.welcome-section { max-width: 720px; margin: 56px auto 0; text-align: center; }
.lead-text { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 1.05rem; }

/* Section rhythm: eyebrow kicker + gold accent underline */
.section-eyebrow {
  display: block;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 8px;
}
.section-title.with-accent { position: relative; padding-bottom: 16px; }
.section-title.with-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--rose));
}
.section-title.center-accent { text-align: center; }
.section-title.center-accent::after { left: 50%; transform: translateX(-50%); }
.section-header.center { text-align: center; max-width: 640px; margin: 0 auto; }

/* Homepage hero */
.hero-home {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 40px;
  overflow: hidden;
}
.hero-home::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(219, 164, 155, 0.28), rgba(201, 169, 106, 0.16) 60%, transparent 75%);
  z-index: 0;
  pointer-events: none;
}
.hero-home-copy { position: relative; z-index: 1; }
.hero-home-copy h1 { font-size: 3rem; line-height: 1.12; margin-bottom: 16px; }
.hero-home-copy .lead-text { font-size: 1.08rem; margin-bottom: 28px; }
.hero-home-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
}
.badge-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.hero-home-media {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-home-media img {
  width: 100%;
  max-width: 420px;
  border-radius: 50% 50% 46% 46% / 55% 55% 45% 45%;
  background: var(--cream-deep);
  box-shadow: 0 24px 50px rgba(44, 38, 32, 0.14);
  padding: 28px;
}
@media (max-width: 900px) {
  .hero-home { grid-template-columns: 1fr; padding-top: 24px; text-align: center; }
  .hero-home-actions, .hero-badges { justify-content: center; }
  .hero-home-copy h1 { font-size: 2.3rem; }
  .hero-home::before { top: -80px; right: -80px; width: 320px; height: 320px; }
}

/* Scroll-reveal (progressive enhancement; disabled for reduced-motion users) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Philosophy cards: icon + accent top border */
.philosophy-card { border-top: 3px solid var(--rose); text-align: center; }
.philosophy-icon {
  width: 44px;
  height: 44px;
  margin: 4px auto 12px;
  color: var(--rose-deep);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}
.split-section img { width: 100%; height: 320px; object-fit: cover; border-radius: 4px; }
.split-copy p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 1rem; }

/* Homepage: empty-state previews (Gallery / Events) */
.empty-preview {
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
}
.empty-preview h3 { font-family: Georgia, 'Times New Roman', serif; color: var(--rose-deep); font-size: 1.3rem; }
.empty-preview p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* Homepage: contact CTA banner */
.cta-banner {
  background: var(--ink);
  color: var(--cream);
  border-radius: 8px;
  text-align: center;
  padding: 56px 32px;
  margin: 56px 0 0;
}
.cta-banner h2 { font-size: 1.8rem; margin-bottom: 10px; }
.cta-banner p { font-family: Helvetica, Arial, sans-serif; color: var(--cream-deep); font-size: 1rem; margin-bottom: 28px; }
.cta-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.cta-banner .btn-outline { border-color: var(--cream); color: var(--cream); }
.cta-banner .btn-outline:hover { background: var(--cream); color: var(--ink); }

/* Professional footer */
.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  text-align: left;
}
.footer-grid h4 { font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; color: var(--ink); margin-bottom: 12px; }
.footer-grid p, .footer-grid a { font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; color: var(--ink-soft); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 32px;
  border-top: 1px solid var(--line);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 800px) {
  .split-section { grid-template-columns: 1fr; }
  .split-section img { height: 240px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-links { align-items: center; }
}

/* About page: why-choose-us highlights */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .highlight-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
.highlight {
  background: var(--white);
  border-radius: 6px;
  padding: 26px 24px;
  box-shadow: 0 4px 18px rgba(44, 38, 32, 0.06);
}
.highlight-icon { color: var(--rose-deep); margin-bottom: 12px; }
.highlight h3 { font-size: 1.1rem; color: var(--ink); }
.highlight p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

@media (max-width: 800px) {
  .about-hero .hero-copy h1 { font-size: 2.2rem; }
}

/* Offerings page: reversed split layout, learning journey, FAQ */
.split-reverse img { order: 2; }
.split-reverse .split-copy { order: 1; }

/* Offerings page: program image + copy side by side, alternating direction */
.program-split {
  display: grid;
  grid-template-columns: 534px 1fr;
  gap: 48px;
  align-items: stretch;
  padding: 40px 0;
}
.program-split img { width: 534px; height: 100%; min-height: 320px; object-fit: cover; border-radius: 4px; display: block; }
.program-split.split-reverse img { order: 2; }
.program-split.split-reverse .program-copy { order: 1; }
.program-copy p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 800px) {
  .program-split { grid-template-columns: 1fr; }
  .program-split img { width: 100%; max-width: 534px; height: auto; margin: 0 auto; }
  .program-split.split-reverse img,
  .program-split.split-reverse .program-copy { order: initial; }
}

.journey-image { width: 100%; max-width: 720px; display: block; margin: 0 auto; border-radius: 4px; }

/* FAQ carousel: one item shown at a time with prev/next navigation */
.faq-list { position: relative; max-width: 780px; margin: 0 auto; }
.faq-item {
  display: none;
  background: var(--white);
  border-radius: 10px;
  padding: 40px 72px;
  min-height: 140px;
  box-shadow: 0 6px 24px rgba(44, 38, 32, 0.08);
  text-align: center;
}
.faq-item.active { display: block; }
.faq-item h3 { font-size: 1.3rem; color: var(--rose-deep); margin-bottom: 10px; }
.faq-item p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 1rem; margin: 0; }
.faq-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(44, 38, 32, 0.08);
}
.faq-nav-btn:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.faq-nav-prev { left: -56px; }
.faq-nav-next { right: -56px; }
.faq-counter { text-align: center; font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; color: var(--ink-soft); margin-top: 16px; }
@media (max-width: 900px) {
  .faq-nav-prev { left: -4px; }
  .faq-nav-next { right: -4px; }
  .faq-item { padding: 36px 52px; }
}

@media (max-width: 800px) {
  .split-reverse img,
  .split-reverse .split-copy { order: initial; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero img { height: 280px; }
  .hero-copy h1 { font-size: 2.2rem; }
  .header-inner { flex-direction: column; gap: 14px; }
  .main-nav { flex-wrap: wrap; justify-content: center; }
}

/* Contact page: map placeholder (swap-in ready for a Google Maps iframe) */
.map-placeholder {
  width: 100%;
  height: 320px;
  border-radius: 4px;
  background: var(--cream-deep);
  border: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--rose-deep);
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
}
.map-placeholder p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; max-width: 220px; }

/* Contact page: success dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 38, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--white);
  border-radius: 8px;
  padding: 36px 32px;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 12px 40px rgba(44, 38, 32, 0.2);
}
.modal-box h3 { font-size: 1.3rem; color: var(--rose-deep); margin-bottom: 14px; }
.modal-box p { font-family: Helvetica, Arial, sans-serif; color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 24px; }

/* Shop: toolbar (search + dynamic category filters) */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.shop-search {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  background: var(--white);
}
.shop-search:focus { outline: 2px solid var(--rose); border-color: transparent; }

/* Shop: premium product cards */
.shop-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.shop-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(44, 38, 32, 0.12); }
.shop-card-media { position: relative; }
.shop-card-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shop-card-image { width: 100%; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 4; overflow: hidden; background: var(--cream-deep); }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(44, 38, 32, 0.55);
  color: white;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.shop-card-media:hover .gallery-nav { opacity: 1; }
.gallery-nav:hover { background: rgba(44, 38, 32, 0.85); }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
@media (hover: none) {
  .gallery-nav { opacity: 1; }
}
.shop-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.stock-badge { font-weight: 600; letter-spacing: 0.02em; }
.stock-badge.stock-in-stock { color: #2e7d46; }
.stock-badge.stock-low-stock { color: #a3791f; }
.stock-badge.stock-sold-out { color: #c0392b; }
.stock-badge.stock-info { color: var(--ink-soft); }

/* Back-to-top button */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--rose-deep);
  color: white;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(44, 38, 32, 0.25);
  z-index: 90;
  transition: background 0.15s;
}
#back-to-top:hover { background: var(--rose); }
#back-to-top[hidden] { display: none; }

/* Shop: loading skeleton */
.skeleton-card {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(44, 38, 32, 0.06);
  height: 360px;
  position: relative;
}
.skeleton-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--cream-deep) 30%, var(--white) 50%, var(--cream-deep) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 800px) {
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .shop-search { max-width: none; }
}

/* Shop card / related product links */
.shop-card-image { display: block; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--rose); }

/* Product Detail */
.breadcrumb {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 32px 0 8px;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--rose); }
.breadcrumb span { margin: 0 6px; }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 24px 0 64px;
}
.product-gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cream-deep);
}
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.product-gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  cursor: pointer;
  background: none;
}
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumb.active { border-color: var(--rose); }

.product-info h1 { font-size: 2rem; margin-bottom: 4px; }
.product-info .product-type { text-transform: uppercase; letter-spacing: 0.04em; }
.product-info .product-price { font-size: 1.5rem; margin: 10px 0; }
.product-info .stock-badge { display: inline-block; margin-bottom: 16px; }
.product-info .product-description {
  font-family: Helvetica, Arial, sans-serif;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 24px;
}
.qty-stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.qty-stepper .qty-input { width: 64px; text-align: center; }

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
}

/* Admin: Product Management */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.admin-toolbar select {
  width: auto;
  padding: 9px 14px;
  font-size: 0.85rem;
}
.table-scroll { overflow-x: auto; }
.product-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.product-thumb-cell { position: relative; width: 56px; height: 56px; }
.product-thumb-empty {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  border: 1px dashed var(--line);
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.62rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
}
.product-thumb-count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--rose-deep);
  color: white;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--white);
}
.current-photos-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.current-photo { position: relative; width: 64px; height: 64px; }
.current-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.current-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #b4544a;
  color: white;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--white);
}
.current-photo-remove:hover { background: #9c463d; }

.sku-row { display: grid; grid-template-columns: 1fr 1fr 90px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.sku-row input { margin: 0; }
.sku-remove { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: none; background: #b4544a; color: white; font-size: 1rem; line-height: 1; cursor: pointer; }
.sku-remove:hover { background: #9c463d; }

.modal-box-form { max-width: 480px; text-align: left; }
.modal-box-form h3 { text-align: center; }
.modal-box-form label { text-align: left; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-family: Helvetica, Arial, sans-serif; font-size: 0.9rem; color: var(--ink-soft); margin-top: 18px; }
.checkbox-label input { width: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.modal-actions .btn { width: auto; margin-top: 0; }

/* ------------------------------------------------------------------
   Phase 2: dashboard framework components (templates/components/ui.html)
   Not used by any V1 page yet -- new dashboards compose these instead of
   inventing one-off markup. Styling follows the existing design system.
   ------------------------------------------------------------------ */
.stat-card .card-body { text-align: center; }
.stat-value { font-size: 2rem; font-weight: bold; font-family: Helvetica, Arial, sans-serif; margin: 0; color: var(--ink); }
.stat-label { font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; color: var(--ink-soft); margin: 4px 0 0; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-hint { font-family: Helvetica, Arial, sans-serif; font-size: 0.8rem; color: var(--ink-soft); margin: 6px 0 0; }

.timeline { list-style: none; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif; }
.timeline-item { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.timeline-item:last-child { border-bottom: none; }
.timeline-time { color: var(--ink-soft); white-space: nowrap; font-size: 0.82rem; }
.timeline-text { color: var(--ink); }

.stepper { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif; }
.step { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 0.85rem; }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); font-size: 0.8rem;
}
.step-active { color: var(--ink); }
.step-active .step-dot { background: var(--rose); border-color: var(--rose); color: white; }
.step-done .step-dot { background: var(--sage); border-color: var(--sage); color: white; }

/* ------------------------------------------------------------------
   Phase 3.1: portal shell framework (templates/portal/base.html)
   Not used by any V1 page yet. Desktop: slim sidebar + content column;
   phone: sidebar hides and .bottom-nav takes over. Same cream world as
   the public site -- a change of purpose, never a change of world.
   ------------------------------------------------------------------ */
.portal-shell { display: grid; grid-template-columns: 210px 1fr; gap: 32px; padding-top: 32px; }
.portal-sidebar { display: flex; flex-direction: column; gap: 2px; font-family: Helvetica, Arial, sans-serif; }
.sidebar-group-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); margin: 18px 0 6px; padding-left: 14px;
}
.sidebar-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-left: 3px solid transparent; border-radius: 0 6px 6px 0;
  color: var(--ink-soft); font-size: 0.92rem; transition: color 0.15s, background 0.15s;
}
.sidebar-link:hover { color: var(--ink); background: var(--cream-deep); }
.sidebar-link.active { color: var(--ink); border-left-color: var(--rose); background: var(--cream-deep); }

.portal-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.portal-title { font-size: 2rem; margin: 0; }
.portal-actions { display: flex; gap: 12px; }

.nav-badge {
  background: #f3ead8; color: var(--ink); font-family: Helvetica, Arial, sans-serif;
  font-size: 0.72rem; border-radius: 999px; padding: 1px 8px;
}

.bottom-nav { display: none; }

.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.profile-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.profile-photo-empty {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream-deep); color: var(--ink-soft); font-size: 1.6rem;
}
.profile-header-text h2 { margin: 0; }
.profile-header-text .meta { font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; color: var(--ink-soft); margin: 2px 0 0; }

@media (max-width: 600px) {
  .portal-shell { grid-template-columns: 1fr; padding-top: 20px; }
  .portal-sidebar { display: none; }
  .portal-main { padding-bottom: 76px; } /* room for the fixed tab bar */
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--cream); border-top: 1px solid var(--line);
    font-family: Helvetica, Arial, sans-serif;
  }
  .bottom-nav-link {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 12px 4px 14px; font-size: 0.78rem; color: var(--ink-soft); position: relative;
  }
  .bottom-nav-link.active { color: var(--ink); box-shadow: inset 0 2px 0 var(--rose); }
  .bottom-nav-link .nav-badge { position: absolute; top: 6px; right: 18%; }
}

/* --- Phase 3.2: students module (parent portal home/profile, admin students) --- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
a.card { display: block; text-decoration: none; color: inherit; }
.badge-active { background: #dcead4; color: #3f6b2a; }
.badge-inactive { background: #e9e1d0; color: #6b5f4a; }
.badge-alumni { background: #f3ead8; color: #8a6a1f; }
.guardian-list { list-style: none; padding: 0; margin: 0 0 12px; font-family: Helvetica, Arial, sans-serif; font-size: 0.92rem; }
.guardian-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* --- Phase 3.7: admin dashboard --- */
.dashboard-band { margin-bottom: 32px; }
.dashboard-band h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; margin: 0 0 14px; }
.today-strip { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.session-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.session-mini { min-width: 130px; background: white; border: 1px solid var(--line); border-left: 3px solid var(--rose); border-radius: 4px; padding: 10px 12px; font-family: Helvetica, Arial, sans-serif; }
.session-mini.past { opacity: 0.6; }
.session-mini .s-time { font-weight: bold; font-size: 0.9rem; }
.session-mini .s-name { font-family: Georgia, 'Times New Roman', serif; margin: 2px 0; }
.session-mini .s-meta { font-size: 0.78rem; color: var(--ink-soft); }
.session-mini .s-enrol { text-align: right; font-size: 0.82rem; font-weight: bold; margin-top: 4px; }
.session-mini .s-enrol.full { color: var(--sage); }
.session-mini .s-enrol.low { color: var(--ink-soft); }
.lesson-list { list-style: none; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif; font-size: 0.9rem; }
.lesson-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lesson-list li:last-child { border-bottom: none; }
.queue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.queue-card-header { display: flex; align-items: center; gap: 8px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; margin-bottom: 10px; }
.queue-count { background: var(--gold); color: white; border-radius: 999px; padding: 1px 9px; font-size: 0.78rem; }
.queue-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.queue-row:last-child { border-bottom: none; }
.queue-row .q-age { color: var(--ink-soft); white-space: nowrap; }
.queue-row .q-age.aged { color: var(--rose-deep); font-weight: bold; }
.queue-footer { margin-top: 10px; text-align: right; }
.queue-footer a { color: var(--ink); font-size: 0.88rem; }
.trial-hint { margin-top: 10px; font-size: 0.85rem; color: var(--rose-deep); }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
@media (max-width: 900px) {
  .today-strip, .queue-grid { grid-template-columns: 1fr; }
}
