:root {
  --heh-bg: #f7f7f5;
  --heh-card: #ffffff;
  --heh-card-soft: #fbfbfa;
  --heh-ink: #37352f;
  --heh-muted: #787774;
  --heh-line: #e9e9e7;
  --heh-line-strong: #d8d8d4;
  --heh-accent: #2f6257;
  --heh-accent-soft: #e9f2ef;
  --heh-blue: #315f8c;
  --heh-blue-soft: #eaf0f6;
  --heh-gold: #9b7a3f;
  --heh-gold-soft: #f5efe2;
  --heh-success: #287a5f;
  --heh-success-soft: #e8f3ee;
  --heh-warning: #a86522;
  --heh-warning-soft: #f7eee3;
  --heh-danger: #b54949;
  --heh-danger-soft: #f8e9e9;
  --heh-shadow: 0 1px 2px rgba(15,15,15,.04), 0 8px 24px rgba(15,15,15,.025);
  --heh-radius: 12px;
  --heh-radius-sm: 8px;
  --heh-max: 980px;
}

.heh-standalone-page {
  margin: 0;
  background: var(--heh-bg);
}

.heh-portal,
.heh-access-screen {
  box-sizing: border-box;
  color: var(--heh-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.heh-portal *,
.heh-access-screen *,
.heh-portal *::before,
.heh-portal *::after,
.heh-access-screen *::before,
.heh-access-screen *::after { box-sizing: border-box; }

.heh-portal {
  min-height: 100vh;
  padding-bottom: 96px;
  background: var(--heh-bg);
}

.heh-portal a,
.heh-access-screen a { color: inherit; text-decoration: none; }

.heh-portal button,
.heh-portal input,
.heh-portal select,
.heh-portal textarea,
.heh-access-screen button,
.heh-access-screen input { font: inherit; }

.heh-portal-header {
  position: relative;
  padding: 18px max(20px, calc((100vw - var(--heh-max)) / 2 + 20px)) 20px;
  border-bottom: 1px solid var(--heh-line);
  background: rgba(255,255,255,.92);
  color: var(--heh-ink);
  backdrop-filter: blur(12px);
}

.heh-brand-row {
  display: flex;
  max-width: var(--heh-max);
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.heh-brand-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--heh-ink);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 18px;
}

.heh-brand-row > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.heh-brand-row span {
  color: var(--heh-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.heh-brand-row strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heh-header-link {
  position: absolute;
  top: 18px;
  right: max(20px, calc((100vw - var(--heh-max)) / 2 + 20px));
  padding: 7px 10px;
  border: 1px solid var(--heh-line-strong);
  border-radius: 8px;
  background: var(--heh-card);
  color: var(--heh-muted);
  font-size: 10px;
  font-weight: 700;
}

.heh-event-title {
  max-width: var(--heh-max);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--heh-line);
}

.heh-event-title > span,
.heh-page-intro > span,
.heh-section-heading span {
  color: var(--heh-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.heh-event-title h1 {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--heh-ink);
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 730;
  line-height: 1.32;
  letter-spacing: -.035em;
}

.heh-portal-main,
.heh-front-notice {
  width: min(calc(100% - 32px), var(--heh-max));
  margin-inline: auto;
}

.heh-portal-main {
  margin-top: 20px;
}

.heh-front-notice {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius-sm);
  background: var(--heh-card);
  font-size: 12px;
  font-weight: 650;
}

.heh-front-notice-success { color: var(--heh-success); border-color: #cae3d7; background: var(--heh-success-soft); }
.heh-front-notice-info { color: var(--heh-blue); border-color: #d6e0ea; background: var(--heh-blue-soft); }
.heh-front-notice-error { color: var(--heh-danger); border-color: #edcccc; background: var(--heh-danger-soft); }

.heh-welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 12px;
}

.heh-countdown-card,
.heh-action-summary,
.heh-session-card,
.heh-news-card,
.heh-lesson-card,
.heh-task-card,
.heh-price-card,
.heh-instructor-card,
.heh-empty-card,
.heh-success-empty {
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}

.heh-countdown-card {
  min-height: 160px;
  padding: 23px 25px;
}

.heh-countdown-card > span {
  color: var(--heh-muted);
  font-size: 11px;
  font-weight: 700;
}

.heh-countdown-card > strong {
  display: block;
  margin: 4px 0 0;
  color: var(--heh-ink);
  font-size: clamp(45px, 8vw, 66px);
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -.05em;
}

.heh-countdown-card > strong small {
  margin-left: 6px;
  color: var(--heh-muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.heh-countdown-card p {
  margin: 8px 0 0;
  color: var(--heh-muted);
  font-size: 11px;
}

.heh-action-summary {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.heh-action-summary a {
  display: flex;
  min-height: 53px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--heh-line);
}

.heh-action-summary a:last-child { border-bottom: 0; }
.heh-action-summary a:hover { background: var(--heh-card-soft); }
.heh-action-summary span { color: var(--heh-muted); font-size: 11px; font-weight: 650; }
.heh-action-summary strong { font-size: 20px; font-weight: 720; }

.heh-section { margin-top: 28px; }

.heh-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.heh-section-heading h2,
.heh-page-intro h2 {
  margin: 3px 0 0;
  color: var(--heh-ink);
  font-size: 21px;
  font-weight: 720;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.heh-section-heading > a {
  color: var(--heh-muted);
  font-size: 10px;
  font-weight: 700;
}

.heh-page-intro {
  margin-bottom: 16px;
  padding: 4px 2px 16px;
  border-bottom: 1px solid var(--heh-line);
}

.heh-page-intro p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--heh-muted);
  font-size: 12px;
}

.heh-filter-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin: 0 0 12px;
  padding: 0 0 4px;
  scrollbar-width: none;
}

.heh-filter-row::-webkit-scrollbar { display: none; }

.heh-filter-row button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--heh-line);
  border-radius: 8px;
  background: var(--heh-card);
  color: var(--heh-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.heh-filter-row button.is-active {
  border-color: var(--heh-ink);
  background: var(--heh-ink);
  color: #fff;
}

.heh-schedule-list,
.heh-task-list { display: grid; gap: 10px; }

.heh-session-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  overflow: hidden;
}

.heh-session-featured { border-color: #cadbd6; }

.heh-session-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 12px;
  border-right: 1px solid var(--heh-line);
  background: var(--heh-card-soft);
}

.heh-session-date span {
  color: var(--heh-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.heh-session-date strong {
  margin-top: 2px;
  color: var(--heh-ink);
  font-size: 24px;
  font-weight: 720;
  line-height: 1.1;
}

.heh-session-date small {
  margin-top: 4px;
  color: var(--heh-accent);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.heh-session-body { min-width: 0; padding: 20px 21px; }
.heh-session-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }

.heh-type-chip,
.heh-planned-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.heh-type-chip { background: var(--heh-blue-soft); color: var(--heh-blue); }
.heh-planned-chip { background: var(--heh-warning-soft); color: var(--heh-warning); }

.heh-session-body h3,
.heh-lesson-card h3,
.heh-task-card h3,
.heh-news-card h3,
.heh-instructor-card h3 {
  margin: 0;
  color: var(--heh-ink);
  font-size: 17px;
  font-weight: 720;
  line-height: 1.45;
}

.heh-session-time {
  margin: 4px 0 11px;
  color: var(--heh-accent);
  font-size: 13px;
  font-weight: 700;
}

.heh-session-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  margin: 5px 0;
  color: var(--heh-muted);
  font-size: 11px;
}

.heh-session-line span { color: var(--heh-ink); font-weight: 700; }
.heh-session-description,
.heh-task-description,
.heh-news-body { color: var(--heh-muted); font-size: 12px; }
.heh-session-description p,
.heh-task-description p,
.heh-news-body p { margin: 8px 0; }

.heh-zoom-button,
.heh-primary-button,
.heh-secondary-button,
.heh-read-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease;
}

.heh-zoom-button,
.heh-primary-button {
  padding: 9px 15px;
  border: 1px solid var(--heh-ink);
  background: var(--heh-ink);
  color: #fff !important;
}

.heh-zoom-button { margin-top: 9px; }
.heh-primary-button:hover,
.heh-zoom-button:hover { background: #1f1e1b; border-color: #1f1e1b; }
.heh-primary-button:disabled,
.heh-secondary-button:disabled,
.heh-read-button:disabled { opacity: .55; cursor: wait; }

.heh-secondary-button,
.heh-read-button {
  padding: 8px 13px;
  border: 1px solid var(--heh-line-strong);
  background: var(--heh-card);
  color: var(--heh-ink);
}

.heh-secondary-button:hover,
.heh-read-button:hover { background: #f1f1ef; }

.heh-agenda { margin-top: 13px; border-top: 1px solid var(--heh-line); }
.heh-agenda summary { padding: 12px 0 3px; color: var(--heh-blue); cursor: pointer; font-size: 10px; font-weight: 700; }
.heh-agenda p { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 9px; margin: 0; padding: 7px 0; border-bottom: 1px solid var(--heh-line); font-size: 11px; }
.heh-agenda time { color: var(--heh-accent); font-weight: 700; }

.heh-rsvp { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--heh-line); }
.heh-rsvp-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.heh-rsvp-current span { color: var(--heh-muted); font-size: 10px; font-weight: 650; }
.heh-rsvp-current strong { padding: 3px 8px; border-radius: 999px; background: #efefed; font-size: 9px; }

.heh-rsvp-form {
  display: grid;
  grid-template-columns: 145px minmax(150px, 1fr) auto;
  gap: 7px;
}

.heh-rsvp-form select,
.heh-rsvp-form input,
.heh-task-form input,
.heh-task-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--heh-line-strong);
  border-radius: 8px;
  background: var(--heh-card);
  color: var(--heh-ink);
}

.heh-rsvp-form select,
.heh-rsvp-form input { padding: 7px 10px; }
.heh-rsvp-form button { min-height: 40px; padding: 7px 13px; border: 1px solid var(--heh-ink); border-radius: 8px; background: var(--heh-ink); color: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }

.heh-news-card { position: relative; margin-bottom: 10px; padding: 20px; }
.heh-news-card.is-unread { border-left: 4px solid var(--heh-gold); }
.heh-news-urgent.is-unread { border-left-color: var(--heh-danger); }
.heh-news-important.is-unread { border-left-color: var(--heh-warning); }
.heh-news-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.heh-news-meta span { color: var(--heh-warning); font-size: 9px; font-weight: 800; }
.heh-news-meta time { color: var(--heh-muted); font-size: 9px; }
.heh-read-button { margin-top: 7px; }
.heh-read-state { display: inline-block; margin-top: 7px; color: var(--heh-success); font-size: 10px; font-weight: 700; }

.heh-lesson-grid,
.heh-instructor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.heh-lesson-card { padding: 20px; }
.heh-lesson-card form { margin: 13px 0 0; }
.heh-lesson-card form button { width: 100%; }
.heh-lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--heh-muted); font-size: 10px; font-weight: 700; }
.heh-lesson-top strong { color: var(--heh-accent); font-size: 12px; }
.heh-lesson-details { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }

.heh-lesson-details span,
.heh-lesson-details strong,
.heh-booking-state span,
.heh-booking-state strong {
  padding: 4px 8px;
  border-radius: 6px;
  background: #efefed;
  font-size: 9px;
}

.heh-lesson-details strong { background: var(--heh-success-soft); color: var(--heh-success); }
.heh-booking-state { display: flex; justify-content: space-between; gap: 8px; margin-top: 13px; }
.heh-booking-state strong { background: var(--heh-ink); color: #fff; }

.heh-task-card { padding: 21px; }
.heh-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.heh-task-head > div > span { color: var(--heh-warning); font-size: 9px; font-weight: 700; }
.heh-task-head > strong { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #efefed; font-size: 9px; }
.heh-task-status-approved { border-color: #cae3d7; }
.heh-task-status-needs_revision { border-color: #edcccc; }

.heh-task-form { display: grid; gap: 11px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--heh-line); }
.heh-task-form label { display: grid; gap: 5px; color: var(--heh-ink); font-size: 10px; font-weight: 700; }
.heh-task-form input,
.heh-task-form textarea { padding: 9px 10px; resize: vertical; font-weight: 400; }
.heh-task-form button { justify-self: start; min-width: 140px; }

.heh-success-empty,
.heh-empty-card { padding: 26px; color: var(--heh-muted); text-align: center; }
.heh-success-empty span { display: grid; width: 44px; height: 44px; place-items: center; margin: 0 auto 10px; border-radius: 8px; background: var(--heh-success-soft); color: var(--heh-success); font-size: 20px; }
.heh-success-empty h3 { margin: 0 0 6px; color: var(--heh-ink); }
.heh-success-empty p { margin: 0; font-size: 11px; }

.heh-price-card { margin-bottom: 13px; padding: 21px; }
.heh-price-card > h3 { margin: 0 0 13px; color: var(--heh-ink); font-size: 17px; }
.heh-price-card > p { margin: 13px 0 0; color: var(--heh-muted); font-size: 10px; }
.heh-price-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.heh-price-grid > div { display: grid; gap: 3px; padding: 11px; border: 1px solid var(--heh-line); border-radius: 8px; background: var(--heh-card-soft); }
.heh-price-grid strong { margin-bottom: 3px; color: var(--heh-ink); font-size: 9px; }
.heh-price-grid span { color: var(--heh-muted); font-size: 9px; }

.heh-instructor-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 17px; }
.heh-instructor-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 9px; background: #efefed; color: var(--heh-ink); font-size: 18px; font-weight: 700; }
.heh-instructor-card > div:last-child > span { color: var(--heh-gold); font-size: 9px; font-weight: 700; }
.heh-instructor-card p { margin: 3px 0 8px; color: var(--heh-muted); font-size: 10px; }
.heh-instructor-links { display: flex; flex-wrap: wrap; gap: 5px; }
.heh-instructor-links a { padding: 4px 7px; border: 1px solid var(--heh-line); border-radius: 6px; color: var(--heh-blue); font-size: 9px; font-weight: 700; }

.heh-bottom-nav {
  position: fixed;
  z-index: 1000;
  right: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: min(calc(100% - 20px), 690px);
  padding: 6px;
  transform: translateX(50%);
  border: 1px solid var(--heh-line-strong);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(15,15,15,.1);
  backdrop-filter: blur(14px);
}

.heh-bottom-nav a {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 9px;
  color: #999894;
}

.heh-bottom-nav a.is-active { background: #efefed; color: var(--heh-ink); }
.heh-bottom-nav i { height: 19px; color: inherit; font-size: 17px; font-style: normal; line-height: 1; }
.heh-bottom-nav span { overflow: hidden; max-width: 100%; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.heh-access-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--heh-bg);
}

.heh-access-card {
  width: min(100%, 450px);
  padding: 30px;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
  text-align: center;
}

.heh-access-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 10px;
  background: var(--heh-ink);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 24px;
}

.heh-access-card .heh-eyebrow { color: var(--heh-muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.heh-access-card h1 { margin: 6px 0 9px; font-size: 24px; }
.heh-access-card > p { color: var(--heh-muted); font-size: 12px; }
.heh-security-note { display: grid; gap: 3px; margin: 18px 0; padding: 12px; border-radius: 8px; background: var(--heh-warning-soft); color: var(--heh-warning); font-size: 10px; text-align: left; }

@media (max-width: 800px) {
  .heh-welcome-grid { grid-template-columns: 1fr; }
  .heh-action-summary { grid-template-columns: repeat(3,1fr); }
  .heh-action-summary a { min-height: 76px; flex-direction: column; align-items: flex-start; justify-content: center; border-right: 1px solid var(--heh-line); border-bottom: 0; }
  .heh-action-summary a:last-child { border-right: 0; }
  .heh-price-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .heh-portal-header { padding-inline: 16px; }
  .heh-header-link { right: 16px; }
  .heh-event-title { margin-top: 22px; padding-top: 16px; }
  .heh-portal-main,
  .heh-front-notice { width: min(calc(100% - 24px), var(--heh-max)); }
  .heh-event-title h1 { font-size: 26px; }
  .heh-session-card { grid-template-columns: 72px minmax(0,1fr); }
  .heh-session-date { padding: 17px 8px; }
  .heh-session-date strong { font-size: 21px; }
  .heh-session-body { padding: 17px 15px; }
  .heh-rsvp-form { grid-template-columns: 1fr; }
  .heh-lesson-grid,
  .heh-instructor-grid { grid-template-columns: 1fr; }
  .heh-task-head { flex-direction: column; }
  .heh-bottom-nav { width: calc(100% - 12px); bottom: max(5px,env(safe-area-inset-bottom)); border-radius: 12px; }
  .heh-bottom-nav a { min-height: 50px; }
}

@media (max-width: 420px) {
  .heh-brand-row strong { max-width: 185px; }
  .heh-countdown-card { min-height: 145px; padding: 20px; }
  .heh-action-summary a { padding: 10px; }
  .heh-action-summary span { font-size: 9px; }
  .heh-action-summary strong { font-size: 18px; }
  .heh-price-grid { grid-template-columns: 1fr; }
  .heh-bottom-nav span { font-size: 7px; }
}

/* =========================================================
 * v0.3.0: role portal / archive / directory profiles
 * ========================================================= */
.heh-brand-row strong em {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--heh-accent-soft);
  color: var(--heh-accent);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  vertical-align: 1px;
}

.heh-team-welcome {
  padding: 24px;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-team-welcome > span { color: var(--heh-accent); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.heh-team-welcome h2 { margin: 5px 0 6px; font-size: 25px; letter-spacing: -.03em; }
.heh-team-welcome p { max-width: 720px; margin: 0; color: var(--heh-muted); font-size: 12px; }

.heh-team-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.heh-team-kpi-grid a {
  display: grid;
  min-height: 112px;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-team-kpi-grid a:hover { border-color: var(--heh-line-strong); background: var(--heh-card-soft); }
.heh-team-kpi-grid span { color: var(--heh-muted); font-size: 10px; font-weight: 700; }
.heh-team-kpi-grid strong { font-size: 32px; font-weight: 730; letter-spacing: -.04em; }
.heh-team-kpi-grid small { margin-left: 4px; color: var(--heh-muted); font-size: 11px; }

.heh-home-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.heh-home-link-grid a {
  display: grid;
  gap: 5px;
  min-height: 112px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-home-link-grid a:hover { border-color: #cfdad7; background: var(--heh-accent-soft); }
.heh-home-link-grid strong { font-size: 14px; }
.heh-home-link-grid span { color: var(--heh-muted); font-size: 10px; }

.heh-portal-activity-list {
  overflow: hidden;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-portal-activity-list > div {
  display: grid;
  grid-template-columns: 8px minmax(0,1fr);
  gap: 11px;
  align-items: start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--heh-line);
}
.heh-portal-activity-list > div:last-child { border-bottom: 0; }
.heh-portal-activity-list > div > span { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--heh-accent); }
.heh-portal-activity-list p { display: grid; gap: 2px; margin: 0; }
.heh-portal-activity-list strong { font-size: 11px; font-weight: 680; }
.heh-portal-activity-list small { color: var(--heh-muted); font-size: 9px; }

.heh-back-link {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 7px 10px;
  border: 1px solid var(--heh-line);
  border-radius: 8px;
  background: var(--heh-card);
  color: var(--heh-muted) !important;
  font-size: 10px;
  font-weight: 700;
}

.heh-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.heh-archive-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-archive-card:hover { transform: translateY(-1px); border-color: var(--heh-line-strong); }
.heh-archive-card > img,
.heh-archive-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e9e9e7;
}
.heh-archive-thumb-placeholder { display: grid; place-items: center; background: linear-gradient(135deg,#e7eeeb,#f4f0e8); color: var(--heh-accent); }
.heh-archive-thumb-placeholder span { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.86); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.heh-archive-card > div:last-child { padding: 17px; }
.heh-archive-card > div:last-child > span { color: var(--heh-accent); font-size: 9px; font-weight: 750; }
.heh-archive-card h3 { margin: 5px 0 4px; font-size: 16px; line-height: 1.45; }
.heh-archive-card p { margin: 0 0 6px; color: var(--heh-muted); font-size: 10px; font-weight: 650; }
.heh-archive-card small { display: block; color: var(--heh-muted); font-size: 10px; line-height: 1.65; }

.heh-archive-detail,
.heh-profile-detail {
  overflow: hidden;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-archive-detail-image { width: 100%; max-height: 430px; object-fit: cover; }
.heh-archive-detail-head { padding: 23px 24px 14px; }
.heh-archive-detail-head span { color: var(--heh-accent); font-size: 10px; font-weight: 750; }
.heh-archive-detail-head h2 { margin: 5px 0; font-size: clamp(22px,4vw,31px); letter-spacing: -.03em; }
.heh-archive-detail-head p { margin: 0; color: var(--heh-muted); font-size: 11px; }
.heh-archive-summary { padding: 0 24px 20px; color: var(--heh-muted); font-size: 12px; }
.heh-archive-summary p:first-child { margin-top: 0; }
.heh-video-frame { position: relative; overflow: hidden; width: calc(100% - 48px); aspect-ratio: 16 / 9; margin: 0 24px 24px; border-radius: 10px; background: #111; }
.heh-video-frame iframe,
.heh-video-frame video { width: 100% !important; height: 100% !important; border: 0; }
.heh-archive-detail > .heh-primary-button { margin: 0 24px 24px; }

.heh-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 11px;
}
.heh-profile-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--heh-line);
  border-radius: var(--heh-radius);
  background: var(--heh-card);
  box-shadow: var(--heh-shadow);
}
.heh-profile-card:hover { transform: translateY(-1px); border-color: var(--heh-line-strong); }
.heh-profile-card > img,
.heh-profile-avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: #efefed;
}
.heh-profile-avatar { display: grid; place-items: center; color: var(--heh-muted); font-size: 42px; font-weight: 700; }
.heh-profile-card > div:last-child { min-height: 76px; padding: 13px 14px; }
.heh-profile-card h3 { margin: 0 0 3px; font-size: 14px; }
.heh-profile-card span,
.heh-profile-card small { display: block; color: var(--heh-muted); font-size: 9px; line-height: 1.55; }
.heh-profile-card .heh-card-label { margin-bottom: 3px; color: var(--heh-gold); font-weight: 750; }

.heh-profile-hero {
  display: grid;
  grid-template-columns: minmax(190px, 32%) minmax(0,1fr);
  gap: 25px;
  align-items: center;
  padding: 25px;
  border-bottom: 1px solid var(--heh-line);
}
.heh-profile-hero > img,
.heh-profile-avatar-large {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  background: #efefed;
}
.heh-profile-avatar-large { display: grid; place-items: center; color: var(--heh-muted); font-size: 62px; font-weight: 750; }
.heh-profile-hero > div:last-child > span { color: var(--heh-gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.heh-profile-hero h2 { margin: 6px 0 5px; font-size: clamp(26px,5vw,42px); line-height: 1.2; letter-spacing: -.04em; }
.heh-profile-hero p { margin: 0 0 13px; color: var(--heh-muted); font-size: 11px; }
.heh-profile-social-row { display: flex; flex-wrap: wrap; gap: 7px; }
.heh-social-button { display: inline-flex; padding: 8px 11px; border: 1px solid var(--heh-line-strong); border-radius: 8px; background: var(--heh-card); color: var(--heh-blue) !important; font-size: 10px; font-weight: 750; }
.heh-line-button { color: var(--heh-success) !important; }
.heh-profile-section { padding: 20px 25px; border-bottom: 1px solid var(--heh-line); }
.heh-profile-section:last-child { border-bottom: 0; }
.heh-profile-section h3 { margin: 0 0 9px; font-size: 14px; }
.heh-profile-section > div:not(.heh-profile-metrics) { color: var(--heh-muted); font-size: 12px; }
.heh-profile-section p:last-child { margin-bottom: 0; }
.heh-profile-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.heh-profile-metrics > div { display: grid; gap: 3px; padding: 13px; border: 1px solid var(--heh-line); border-radius: 8px; background: var(--heh-card-soft); }
.heh-profile-metrics span { color: var(--heh-muted); font-size: 9px; font-weight: 700; }
.heh-profile-metrics strong { font-size: 14px; }
.heh-private-note { margin: 10px 0 0; color: var(--heh-warning); font-size: 9px; }
.heh-line-qr-section { display: grid; grid-template-columns: 1fr 150px; gap: 20px; align-items: center; padding: 22px 25px; }
.heh-line-qr-section h3 { margin: 0 0 4px; }
.heh-line-qr-section p { margin: 0; color: var(--heh-muted); font-size: 11px; }
.heh-line-qr-section img { width: 150px; height: 150px; object-fit: contain; border: 1px solid var(--heh-line); border-radius: 8px; background: #fff; }

/* The nav is horizontally scrollable because roles have different menus. */
.heh-bottom-nav {
  display: block;
  width: min(calc(100% - 20px), 780px);
  padding: 5px;
}
.heh-bottom-nav-inner {
  display: flex;
  overflow-x: auto;
  gap: 2px;
  scrollbar-width: none;
}
.heh-bottom-nav-inner::-webkit-scrollbar { display: none; }
.heh-bottom-nav a { flex: 1 0 72px; }
.heh-bottom-nav a b { position: absolute; top: 4px; right: 12px; display: grid; min-width: 16px; height: 16px; place-items: center; padding: 0 4px; border-radius: 999px; background: var(--heh-danger); color: #fff; font-size: 8px; }

@media (max-width: 800px) {
  .heh-team-kpi-grid,
  .heh-home-link-grid { grid-template-columns: 1fr 1fr; }
  .heh-profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .heh-team-welcome { padding: 19px; }
  .heh-team-kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .heh-team-kpi-grid a { min-height: 95px; padding: 12px; }
  .heh-team-kpi-grid strong { font-size: 25px; }
  .heh-home-link-grid { grid-template-columns: 1fr; }
  .heh-archive-grid { grid-template-columns: 1fr; }
  .heh-profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .heh-profile-hero { grid-template-columns: 112px minmax(0,1fr); gap: 16px; padding: 18px; }
  .heh-profile-hero h2 { font-size: 25px; }
  .heh-profile-section { padding: 17px 18px; }
  .heh-profile-metrics { grid-template-columns: 1fr; }
  .heh-line-qr-section { grid-template-columns: 1fr 120px; padding: 18px; }
  .heh-line-qr-section img { width: 120px; height: 120px; }
  .heh-video-frame { width: calc(100% - 28px); margin-inline: 14px; }
  .heh-archive-detail-head { padding-inline: 16px; }
  .heh-archive-summary { padding-inline: 16px; }
  .heh-bottom-nav a { flex-basis: 66px; }
}

@media (max-width: 420px) {
  .heh-team-kpi-grid { grid-template-columns: 1fr; }
  .heh-team-kpi-grid a { min-height: 76px; }
  .heh-profile-card > div:last-child { min-height: 66px; padding: 10px; }
  .heh-profile-card h3 { font-size: 12px; }
  .heh-profile-hero { grid-template-columns: 92px minmax(0,1fr); padding: 14px; }
  .heh-profile-hero h2 { font-size: 21px; }
  .heh-line-qr-section { grid-template-columns: 1fr; }
}
