:root {
  --sc-bg: #fffaf8;
  --sc-bg-soft: #fff6f9;
  --sc-bg-lavender: #faf7ff;
  --sc-panel: rgba(255, 255, 255, 0.94);
  --sc-panel-strong: #ffffff;
  --sc-border: #ead8e1;
  --sc-border-soft: #f2e6ec;
  --sc-text: #5f4f59;
  --sc-text-strong: #443640;
  --sc-text-soft: #8d7b85;
  --sc-heading: #73596a;
  --sc-accent: #d9a1b7;
  --sc-accent-strong: #bd7894;
  --sc-accent-soft: #f7dfea;
  --sc-lavender: #c8b9e8;
  --sc-lavender-strong: #9d8ac8;
  --sc-lavender-soft: #f0eafa;
  --sc-gold-soft: #fff4ea;
  --sc-gold-text: #a46a4c;
  --sc-shadow: 0 16px 38px rgba(150, 112, 132, 0.11);
  --sc-shadow-soft: 0 8px 22px rgba(150, 112, 132, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 239, 246, 0.86) 0%, rgba(255, 239, 246, 0) 34%),
    radial-gradient(circle at top right, rgba(244, 239, 255, 0.9) 0%, rgba(244, 239, 255, 0) 30%),
    linear-gradient(180deg, #fffdfc 0%, #fff8fb 52%, #faf7ff 100%);
  color: var(--sc-text);
  min-height: 100vh;
  line-height: 1.8;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.site-hero { padding: 24px 12px 18px; text-align: center; }
.site-hero__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,250,253,0.96));
  border: 1px solid rgba(234, 216, 225, 0.88);
  border-radius: 28px;
  box-shadow: var(--sc-shadow);
  backdrop-filter: blur(8px);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--sc-accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}
h1, h2, h3, h4, h5, p { margin-top: 0; }
h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  font-weight: 900;
  color: var(--sc-heading);
  letter-spacing: 0.03em;
}
.lead {
  max-width: 760px;
  margin: 0 auto 16px;
  color: var(--sc-text-soft);
  font-size: 14px;
  line-height: 1.9;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--sc-border);
  color: var(--sc-heading);
  font-size: 13px;
  font-weight: 900;
}
.main-content { width: min(1180px, 100%); margin: 0 auto; padding: 0 12px 48px; }
.panel, .state-panel, .modal__dialog, .instructor-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,250,253,0.96));
  border: 1px solid rgba(234, 216, 225, 0.88);
  border-radius: 28px;
  box-shadow: var(--sc-shadow-soft);
}
.controls-panel { padding: 22px; margin-bottom: 18px; }
.control-grid { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, 0.8fr)); gap: 15px; align-items: end; }
.field span { display: inline-block; margin-bottom: 8px; color: var(--sc-heading); font-size: 13px; font-weight: 900; }
input, select {
  width: 100%;
  border: 1px solid var(--sc-border);
  background: linear-gradient(180deg, #ffffff, #fffbfd);
  color: var(--sc-text-strong);
  border-radius: 17px;
  padding: 13px 15px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(150, 112, 132, 0.04);
}
input:focus, select:focus { border-color: var(--sc-accent); box-shadow: 0 0 0 4px rgba(217, 161, 183, 0.16); }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.summary-text { color: var(--sc-text-soft); font-weight: 900; }
.ghost-button, .primary-button, .text-link, .related-link {
  appearance: none;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.ghost-button, .text-link {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--sc-border);
  background: linear-gradient(180deg, #fff, #fff8fb);
  color: var(--sc-heading);
}
.primary-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--sc-accent), var(--sc-lavender));
  box-shadow: 0 14px 24px rgba(150,112,132,0.18);
}
.text-link { display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.text-link.accent { color: #fff; background: linear-gradient(135deg, var(--sc-accent), var(--sc-lavender)); border-color: transparent; }
.ghost-button:hover, .primary-button:hover, .text-link:hover, .related-link:hover { transform: translateY(-1px); }

.instructor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.instructor-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 16px;
  border-radius: 28px;
  border-color: rgba(236, 224, 232, 0.92);
  background:
    radial-gradient(circle at top left, rgba(255, 230, 243, 0.54), rgba(255, 230, 243, 0) 40%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,249,252,0.96));
  box-shadow: 0 14px 30px rgba(150, 112, 132, 0.09);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.instructor-card:hover, .instructor-card:focus-visible { transform: translateY(-3px); border-color: #e2b8ca; box-shadow: 0 22px 38px rgba(150,112,132,.15); outline: none; }
.card-top { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-thumb-wrap, .detail-main-image {
  width: 86px;
  height: 86px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(242, 229, 238, 0.95);
  background: linear-gradient(135deg, #fff7fb 0%, #f5f0ff 100%);
  box-shadow: 0 10px 18px rgba(150,112,132,.08);
  flex: 0 0 auto;
}
.profile-thumb-wrap img, .detail-main-image img, .sub-image img, .activity-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.image-placeholder { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; color: #9b7e8b; font-size: 12px; font-weight: 900; }
.card-image.is-missing .image-placeholder { display: flex; }
.card-head { min-width: 0; }
.card-topline { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 6px; }
.pill, .area, .mini-chip, .activity-badge, .directory-event-summary-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}
.pill.rank { padding: 6px 10px; background: linear-gradient(135deg, rgba(157,134,255,.14), rgba(242,131,199,.14)); color: var(--sc-accent-strong); }
.area { padding: 6px 10px; background: rgba(255,246,249,.94); color: var(--sc-gold-text); border: 1px solid var(--sc-border-soft); }
.instructor-card h2 { margin: 0; color: #5d496a; font-size: 20px; font-weight: 900; line-height: 1.35; word-break: break-word; }
.activity-badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 0; }
.activity-badge { min-height: 28px; padding: 6px 10px; }
.activity-badge::before { content: "✦"; margin-right: 5px; font-size: 10px; }
.activity-badge.active { background: linear-gradient(135deg, rgba(255,159,205,.16), rgba(141,128,255,.16)); color: #7a5577; border: 1px solid rgba(233,208,229,.9); }
.activity-badge.upcoming { background: rgba(255,242,220,.95); color: #a26a43; border: 1px solid rgba(247,220,193,.9); }
.activity-badge.report { background: rgba(234,241,255,.95); color: #5370a0; border: 1px solid rgba(211,223,250,.9); }
.card-body { padding: 0; }
.profile-excerpt { min-height: 78px; margin: 0 0 14px; color: var(--sc-text); font-size: 14px; line-height: 1.9; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 15px; }
.mini-chip { padding: 7px 11px; background: rgba(255,255,255,.92); border: 1px solid rgba(236,224,232,.92); color: var(--sc-heading); }
.mini-chip.muted { background: rgba(246,243,241,.92); color: var(--sc-text-soft); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.state-panel { padding: 22px; margin: 18px 0; }
.state-panel.is-error { border-color: #e8a3b8; background: #fff8fb; }
.skeleton { pointer-events: none; }
.skeleton .card-image, .skeleton .card-body div { background: linear-gradient(90deg, #f4e8e2, #fff8f4, #f4e8e2); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 40; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(49, 36, 44, 0.42); backdrop-filter: blur(6px); }
.modal__dialog {
  position: relative;
  width: min(1180px, calc(100vw - 24px));
  max-height: min(900px, calc(100vh - 24px));
  overflow: auto;
  margin: 12px auto;
  padding: 26px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,250,253,.98));
  box-shadow: 0 24px 80px rgba(90, 58, 75, 0.24);
}
.modal__close { position: sticky; top: 0; z-index: 3; float: right; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--sc-border); background: #fff; color: var(--sc-text-soft); font-size: 28px; cursor: pointer; }
.detail-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.detail-main-image { width: 260px; height: 260px; border-radius: 28px; }
.detail-content h2 { margin: 0 0 10px; color: #5d496a; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; }
.detail-badges { margin: 8px 0 14px; }
.detail-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.meta-item { padding: 12px; border-radius: 18px; border: 1px solid var(--sc-border-soft); background: rgba(255,248,251,.9); }
.meta-item span { display: block; color: var(--sc-text-soft); font-size: 12px; font-weight: 900; }
.meta-item strong { display: block; margin-top: 3px; color: var(--sc-text-strong); line-height: 1.55; }
.detail-profile { color: var(--sc-text); font-size: 15px; line-height: 2; }
.detail-links { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-image-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; }
.sub-image { overflow: hidden; aspect-ratio: 1 / 1; border-radius: 18px; background: var(--sc-bg-soft); border: 1px solid var(--sc-border-soft); }
.detail-section { margin-top: 24px; padding: 24px; border: 1px solid var(--sc-border); border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: var(--sc-shadow-soft); }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.section-head h3 { margin-bottom: 0; color: #5b426a; }
.section-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.section-counts span { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--sc-border); background: #fff; font-size: 13px; font-weight: 900; color: #846070; }
.activity-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
.activity-detail-grid h4 { margin-bottom: 12px; color: #6a516c; font-size: 16px; }
.activity-card-list { display: grid; gap: 12px; }
.activity-card { overflow: hidden; display: grid; grid-template-columns: 112px minmax(0,1fr); min-height: 112px; border: 1px solid var(--sc-border); border-radius: 22px; background: #fff; }
.activity-card.no-image { grid-template-columns: 1fr; }
.activity-card.no-image .activity-card-image { display: none; }
.activity-card-image { position: relative; min-height: 112px; background: linear-gradient(135deg, #fff1f6, #f8f1ff); color: #8d6b7b; font-weight: 900; }
.activity-card-image span { position: absolute; left: 8px; top: 8px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 900; }
.activity-card-body { padding: 12px 14px; min-width: 0; }
.activity-date { color: #9c7692; font-size: 12px; font-weight: 900; }
.activity-card-body h5 { margin: 2px 0 6px; font-size: 15px; line-height: 1.45; color: #4d3a52; }
.activity-card-body p { margin-bottom: 8px; color: var(--sc-text); font-size: 13px; line-height: 1.65; }
.activity-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.activity-card-meta span { padding: 3px 7px; border-radius: 999px; background: #fff8fb; border: 1px solid var(--sc-border); color: #7b6573; font-size: 11px; font-weight: 800; }
.activity-card-links { display: flex; gap: 10px; margin-top: 10px; }
.activity-card-links a { color: var(--sc-accent-strong); font-weight: 900; text-decoration: none; }
.muted-note { color: var(--sc-text-soft); }
.related-pages { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(250,242,255,.9)); }
.related-pages p { color: var(--sc-text-soft); }
.related-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.related-link { display: flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--sc-border); background: #fff; color: #684d64; text-align: center; }
.related-link.primary { background: linear-gradient(135deg, var(--sc-accent), var(--sc-lavender)); color: #fff; border-color: transparent; }

@media (max-width: 920px) {
  .control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-main-image { width: min(360px, 100%); height: auto; aspect-ratio: 1 / 1; }
  .detail-meta { grid-template-columns: 1fr; }
  .activity-detail-grid { grid-template-columns: 1fr; }
  .sub-image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-hero { padding-top: 12px; }
  .site-hero__inner, .controls-panel, .modal__dialog, .detail-section { padding: 18px; border-radius: 24px; }
  .control-grid, .instructor-grid, .related-link-grid { grid-template-columns: 1fr; }
  .summary-row { flex-direction: column; align-items: stretch; }
  .ghost-button { width: 100%; }
  .card-top { grid-template-columns: 76px minmax(0,1fr); }
  .profile-thumb-wrap { width: 76px; height: 76px; border-radius: 21px; }
  .activity-card { grid-template-columns: 1fr; }
  .activity-card-image { min-height: 180px; }
}

/* P-1d: instructor activity polish */
.activity-compact-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--sc-border-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,249,252,.94));
}
.activity-compact-counts,
.activity-compact-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.activity-compact-counts span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--sc-border);
  background: #fff;
  color: #745968;
  font-weight: 900;
}
.activity-mini-card {
  display: grid;
  grid-template-columns: auto auto minmax(120px, 1fr);
  align-items: center;
  gap: 8px 10px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--sc-border);
  background: #fff;
  min-width: min(420px, 100%);
}
.activity-mini-card.upcoming { background: #fbfff8; border-color: #d8ecca; }
.activity-mini-card.report { background: #fffaf4; border-color: #f0d7b5; }
.activity-mini-card .mini-kind {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: #6a516c;
  font-size: 12px;
  font-weight: 900;
}
.activity-mini-card .mini-date,
.activity-mini-card small {
  color: var(--sc-text-soft);
  font-size: 12px;
  font-weight: 900;
}
.activity-mini-card strong {
  color: #5d496a;
  font-size: 14px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-mini-card small { grid-column: 3 / 4; margin-top: -6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-expand-toggle {
  justify-self: start;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--sc-border);
  background: linear-gradient(135deg, var(--sc-accent), var(--sc-lavender));
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(150,112,132,.13);
}
.activity-expanded { margin-top: 18px; }
.activity-expanded[hidden] { display: none !important; }
.activity-card {
  align-items: start;
  grid-template-columns: 148px minmax(0,1fr);
  min-height: 0;
}
.activity-card-image {
  width: 148px;
  height: 112px;
  min-height: 0;
  align-self: start;
  border-radius: 20px 0 0 20px;
  overflow: hidden;
}
.activity-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.activity-card.no-image { grid-template-columns: 1fr; }
.activity-card.no-image .activity-card-image { display: none; }

@media (max-width: 640px) {
  .activity-mini-card {
    grid-template-columns: auto minmax(0,1fr);
    min-width: 100%;
  }
  .activity-mini-card strong { grid-column: 1 / -1; white-space: normal; }
  .activity-mini-card small { grid-column: 1 / -1; margin-top: -2px; white-space: normal; }
  .activity-card {
    grid-template-columns: 96px minmax(0,1fr);
  }
  .activity-card-image {
    width: 96px;
    height: 96px;
    min-height: 0;
    border-radius: 18px 0 0 18px;
  }
  .activity-card-body { padding: 10px 12px; }
  .activity-card-body p { display: none; }
}

/* P-1e: gallery, compact typography, card height consistency, strict public display polish */
body { font-size: 14px; line-height: 1.68; }
.site-hero__inner { padding: 22px 22px; }
h1 { font-size: clamp(24px, 3vw, 34px); }
.lead { font-size: 13px; line-height: 1.75; }
.hero-status { font-size: 12px; min-height: 32px; }
.controls-panel { padding: 18px; }
.field span { font-size: 12px; }
input, select { padding: 10px 13px; font-size: 13px; }
.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.quick-filter {
  appearance: none;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--sc-border);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,248,251,.96));
  color: var(--sc-heading);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.quick-filter:hover { transform: translateY(-1px); border-color: rgba(217,161,183,.78); }
.quick-filter.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--sc-accent), var(--sc-lavender));
  box-shadow: 0 10px 20px rgba(150,112,132,.16);
}
.summary-text { font-size: 13px; }
.instructor-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; align-items: stretch; }
.instructor-card { display: flex; flex-direction: column; min-height: 370px; padding: 15px; border-radius: 24px; }
.instructor-card::before {
  content: "";
  position: absolute;
  inset: -42%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255,255,255,.74) 48%, rgba(255,232,246,.62) 53%, transparent 66%);
  opacity: 0;
  transform: translateX(-58%) rotate(10deg);
  mix-blend-mode: screen;
}
.instructor-card .card-top,
.instructor-card .card-body { position: relative; z-index: 2; }
.instructor-card:hover::before,
.instructor-card:focus-visible::before {
  animation: cardShineSweep .92s ease forwards;
}
@keyframes cardShineSweep {
  0% { opacity: 0; transform: translateX(-58%) rotate(10deg); }
  18% { opacity: .88; }
  100% { opacity: 0; transform: translateX(58%) rotate(10deg); }
}
.card-top { grid-template-columns: 88px minmax(0, 1fr); gap: 13px; min-height: 94px; align-items: start; }
.profile-thumb-wrap { width: 88px; height: 88px; border-radius: 22px; }
.profile-thumb-wrap img { object-fit: cover; }
.instructor-card h2 { font-size: 19px; line-height: 1.28; }
.area, .pill, .mini-chip, .activity-badge { font-size: 10.5px; }
.activity-badge { min-height: 26px; padding: 5px 9px; }
.activity-badge.active {
  position: relative;
  overflow: hidden;
  color: #7b4774;
  background: linear-gradient(135deg, rgba(255,235,246,.98), rgba(242,235,255,.98));
  border-color: rgba(223, 162, 193, .95);
  box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset, 0 0 16px rgba(217, 161, 183, .28);
  animation: activeBadgeGlow 2.8s ease-in-out infinite;
}
.activity-badge.active::after {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -45%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.92), transparent);
  transform: skewX(-22deg);
  animation: activeBadgeShine 3.2s ease-in-out infinite;
}
@keyframes activeBadgeGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset, 0 0 12px rgba(217, 161, 183, .22); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,.86) inset, 0 0 22px rgba(217, 161, 183, .48); }
}
@keyframes activeBadgeShine {
  0%, 52% { left: -48%; opacity: 0; }
  62% { opacity: .9; }
  82%, 100% { left: 118%; opacity: 0; }
}
.profile-excerpt {
  min-height: 68px;
  font-size: 13px;
  line-height: 1.72;
  margin-bottom: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chip-row { margin-bottom: 10px; gap: 6px; }
.card-body { display: flex; flex: 1 1 auto; flex-direction: column; }
.card-actions { margin-top: auto; min-height: 82px; align-content: flex-end; }
.primary-button { min-height: 39px; padding: 8px 15px; font-size: 14px; }
.text-link { min-height: 36px; padding: 7px 13px; font-size: 12.5px; }
.card-sub-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 11px;
}
.card-sub-thumb {
  width: 30px;
  height: 30px;
  display: inline-flex;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--sc-border-soft);
  background: #fff;
}
.card-sub-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.modal__dialog { width: min(1080px, calc(100vw - 24px)); padding: 22px; scroll-behavior: smooth; }
.detail-mini-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 52px 16px 0;
  padding: 7px;
  border: 1px solid rgba(234,216,225,.78);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(150,112,132,.08);
}
.detail-mini-nav button {
  appearance: none;
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #74586b;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.detail-mini-nav button:hover {
  background: linear-gradient(135deg, rgba(255,235,246,.95), rgba(242,235,255,.95));
}
.detail-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
.detail-main-image { width: 190px; height: 190px; border-radius: 26px; }
.detail-content h2 { font-size: clamp(24px, 3.1vw, 36px); }
.detail-profile { font-size: 13.5px; line-height: 1.85; }
.detail-meta { gap: 8px; margin-bottom: 14px; }
.meta-item { padding: 10px; border-radius: 16px; }
.meta-item span { font-size: 11px; }
.meta-item strong { font-size: 13px; }
.detail-section { margin-top: 18px; padding: 18px; border-radius: 24px; }
.section-head { margin-bottom: 13px; align-items: center; }
.section-head h3 { font-size: 19px; }
.section-head.compact { margin-bottom: 10px; }
.section-counts span { padding: 6px 11px; font-size: 12px; }
.image-gallery { padding: 20px; }
.gallery-main-wrap {
  position: relative;
}
.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  color: var(--sc-text-soft);
}
.gallery-counter {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--sc-border);
  background: rgba(255,255,255,.86);
  color: #73596a;
  font-size: 13px;
  font-weight: 900;
}
.gallery-meta strong { font-size: 13px; font-weight: 900; }
.gallery-main {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  height: clamp(440px, 70vh, 820px);
  min-height: 360px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--sc-border-soft);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff7fb, #f7f1ff);
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 14px 34px rgba(150,112,132,.08);
}
.gallery-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,246,250,.88), rgba(250,244,255,.88), rgba(255,246,250,.88));
  background-size: 220% 100%;
  animation: imageLoadingShimmer 1.4s ease-in-out infinite;
}
.gallery-main:has(img.is-loaded)::before { display: none; }
.gallery-main img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: contain; }
.profile-thumb-wrap img,
.detail-main-image img,
.card-sub-thumb img,
.gallery-main img,
.gallery-thumb img,
.activity-card-image img,
.image-lightbox__dialog img {
  opacity: 0;
  transition: opacity .34s ease;
}
.profile-thumb-wrap img.is-loaded,
.detail-main-image img.is-loaded,
.card-sub-thumb img.is-loaded,
.gallery-main img.is-loaded,
.gallery-thumb img.is-loaded,
.activity-card-image img.is-loaded,
.image-lightbox__dialog img.is-loaded {
  opacity: 1;
}
.gallery-main span {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #7a6475;
  font-size: 11px;
  font-weight: 900;
}
.gallery-main.is-missing { display: none; }
.gallery-step {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: 1px solid var(--sc-border);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #74586b;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(150,112,132,.14);
}
.gallery-step.prev { left: 12px; }
.gallery-step.next { right: 12px; }
.gallery-step:hover { background: #fff; color: var(--sc-accent-strong); }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.gallery-thumb {
  position: relative;
  width: 74px;
  height: 74px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(150,112,132,.10);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.gallery-thumb:hover { transform: translateY(-2px); border-color: rgba(217,161,183,.58); }
.gallery-thumb.active { border-color: var(--sc-accent-strong); box-shadow: 0 12px 24px rgba(189,120,148,.22); }
.gallery-thumb span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  display: none;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #76546a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.gallery-thumb.active span { display: flex; }
.gallery-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.activity-section { padding: 17px; }
.activity-section .eyebrow { font-size: 11px; margin-bottom: 4px; }
.activity-compact-panel { padding: 13px; border-radius: 20px; gap: 10px; }
.activity-compact-counts span { min-height: 32px; padding: 6px 12px; font-size: 12px; }
.activity-compact-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.activity-mini-card { min-width: 0; min-height: 48px; padding: 9px 11px; border-radius: 16px; gap: 5px 8px; }
.activity-mini-card .mini-kind, .activity-mini-card .mini-date, .activity-mini-card small { font-size: 10.5px; }
.activity-mini-card strong { font-size: 12.5px; }
.activity-expand-toggle { min-height: 36px; padding: 7px 15px; font-size: 13px; }
.activity-detail-grid { gap: 14px; }
.activity-detail-grid h4 { font-size: 14px; margin-bottom: 9px; }
.activity-card { grid-template-columns: 118px minmax(0, 1fr); border-radius: 18px; }
.activity-card-image { width: 118px; height: 90px; border-radius: 18px 0 0 18px; }
.activity-card-body { padding: 9px 11px; }
.activity-date { font-size: 11px; }
.activity-card-body h5 { font-size: 13px; line-height: 1.35; }
.activity-card-body p { font-size: 12px; line-height: 1.55; }
.activity-card-meta span { font-size: 10.5px; }
.image-lightbox[hidden] { display: none; }
.image-lightbox { position: fixed; inset: 0; z-index: 80; }
.image-lightbox__backdrop { position: absolute; inset: 0; background: rgba(35, 26, 33, .78); backdrop-filter: blur(4px); }
.image-lightbox__dialog {
  position: relative;
  width: min(1040px, calc(100vw - 24px));
  height: min(88vh, 820px);
  margin: 6vh auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-lightbox__dialog img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 20px 80px rgba(0,0,0,.35); }
.image-lightbox__close,
.image-lightbox__nav {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #5b426a;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.image-lightbox__close { top: -18px; right: 0; width: 44px; height: 44px; font-size: 28px; }
.image-lightbox__nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 34px; }
.image-lightbox__nav.prev { left: 0; }
.image-lightbox__nav.next { right: 0; }
.image-lightbox__count { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); color: #fff; font-weight: 900; font-size: 13px; }
.mobile-sticky-cta { display: none; }
@keyframes imageLoadingShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (min-width: 980px) {
  .activity-section .activity-compact-panel { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .activity-compact-counts { flex-wrap: nowrap; }
  .activity-expand-toggle { justify-self: end; }
}
@media (max-width: 920px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-main-image { width: 160px; height: 160px; }
  .activity-compact-preview { grid-template-columns: 1fr; }
  .gallery-main { height: clamp(320px, 58vh, 560px); }
  .detail-mini-nav { margin-right: 48px; border-radius: 22px; }
}
@media (max-width: 640px) {
  body { font-size: 13px; }
  .main-content { padding-inline: 10px; }
  .quick-filter-row { gap: 7px; }
  .quick-filter { flex: 1 1 auto; min-width: 30%; padding-inline: 10px; }
  .instructor-grid { grid-template-columns: 1fr; gap: 14px; }
  .instructor-card { min-height: 0; padding: 14px; }
  .card-actions { min-height: 0; }
  .card-top { grid-template-columns: 76px minmax(0, 1fr); min-height: 80px; }
  .profile-thumb-wrap { width: 76px; height: 76px; border-radius: 20px; }
  .instructor-card h2 { font-size: 18px; }
  .profile-excerpt { min-height: 0; font-size: 12.8px; }
  .modal__dialog { padding-bottom: 86px; }
  .detail-mini-nav {
    top: 0;
    margin: 0 42px 12px 0;
    padding: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    border-radius: 999px;
  }
  .detail-mini-nav button { flex: 0 0 auto; min-height: 32px; padding: 6px 11px; }
  .detail-section { padding: 14px; }
  .gallery-main { height: clamp(260px, 52vh, 430px); min-height: 240px; border-radius: 18px; }
  .gallery-step { width: 36px; height: 36px; font-size: 26px; }
  .gallery-step.prev { left: 7px; }
  .gallery-step.next { right: 7px; }
  .gallery-meta { align-items: flex-start; flex-direction: column; gap: 7px; }
  .gallery-meta strong { font-size: 12px; }
  .gallery-thumbs { gap: 9px; }
  .gallery-thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 0 8px;
    scroll-snap-type: x proximity;
  }
  .gallery-thumb { flex: 0 0 auto; scroll-snap-align: start; }
  .gallery-thumb { width: 58px; height: 58px; border-radius: 14px; }
  .gallery-thumb span { font-size: 9px; min-height: 16px; }
  .activity-section .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .activity-card { grid-template-columns: 82px minmax(0,1fr); }
  .activity-card-image { width: 82px; height: 82px; border-radius: 16px 0 0 16px; }
  .activity-card-body h5 { font-size: 12.5px; }
  .image-lightbox__dialog { height: min(82vh, 720px); margin-top: 9vh; }
  .mobile-sticky-cta {
    position: sticky;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 18px -8px -72px;
    padding: 10px;
    border: 1px solid rgba(234,216,225,.86);
    border-radius: 22px 22px 0 0;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 -12px 28px rgba(150,112,132,.12);
  }
  .mobile-sticky-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--sc-border);
    background: linear-gradient(180deg, #fff, #fff8fb);
    color: var(--sc-heading);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
  }
  .mobile-sticky-cta a.primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--sc-accent), var(--sc-lavender));
  }
}
@media (prefers-reduced-motion: reduce) {
  .instructor-card:hover::before,
  .instructor-card:focus-visible::before,
  .activity-badge.active,
  .activity-badge.active::after,
  .gallery-main::before {
    animation: none;
  }
}
