/*
 * Hablo Español · Teacher Portal
 * A full-screen working tool. Everything is scoped to .hp-app so the theme
 * never leaks in and the portal never leaks out.
 */


body.he-app-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 8% -8%, rgba(248, 8, 0, 0.12), transparent 30%),
    radial-gradient(circle at 96% 0%, rgba(248, 8, 0, 0.07), transparent 24%),
    linear-gradient(180deg, #fffaf3 0%, #f7f3ee 42%, #fff 100%) fixed;
}

.hp-app {
  --ink: #0f0f10;
  --ink-2: #2a2a2e;
  --text: #0f0f10;
  --muted: #4b5563;
  --faint: #8b919b;
  --canvas: transparent;
  --surface: #ffffff;
  --line: #ece6df;
  --line-strong: #dcd4ca;
  --red: #f80800;
  --red-dark: #d10700;
  --red-soft: #fff1f0;
  --online: #2453c9;
  --online-soft: #e9effc;
  --person: #0d7a5f;
  --person-soft: #e3f3ee;
  --amber: #9a5b00;
  --amber-soft: #fff3dc;
  --green: #1d6b3a;
  --green-soft: #e4f3e9;
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 26px;
  --shadow: 0 1px 0 rgba(15, 15, 16, 0.04), 0 18px 44px rgba(16, 24, 40, 0.07);
  --sans: var(--wp--preset--font-family--system, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  --serif: var(--sans);
  --red-glow: 0 14px 30px rgba(248, 8, 0, 0.22);
  --nav-w: 248px;

  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0, "cv11" 1;
  min-height: 100vh;
  box-sizing: border-box;
}
.hp-app *,
.hp-app *::before,
.hp-app *::after {
  box-sizing: border-box;
}
.hp-app :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) {
  margin: 0;
  padding: 0;
}
.hp-app :where(h1, h2, h3, h4) {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.hp-app a {
  color: var(--ink);
  text-underline-offset: 3px;
}
.hp-app :focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 6px;
}
.hp-app .hp-display {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.hp-app .hp-muted {
  color: var(--muted);
}
.hp-app .hp-num {
  font-variant-numeric: tabular-nums;
}
.hp-app svg.hp-icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Boot ---------- */
.hp-app .hp-boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.hp-app .hp-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: hp-spin 0.8s linear infinite;
}
@keyframes hp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Buttons & form controls ---------- */
.hp-app .hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.hp-app .hp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.hp-app .hp-btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 800;
  box-shadow: var(--red-glow);
}
.hp-app .hp-btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}
.hp-app .hp-btn-dark {
  background: var(--ink);
  color: #fff;
}
.hp-app .hp-btn-dark:hover:not(:disabled) {
  background: var(--ink-2);
}
.hp-app .hp-btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.hp-app .hp-btn-ghost:hover:not(:disabled) {
  border-color: var(--ink);
}
.hp-app .hp-btn-quiet {
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
}
.hp-app .hp-btn-quiet:hover:not(:disabled) {
  background: rgba(23, 32, 51, 0.06);
}
.hp-app .hp-btn-danger {
  background: transparent;
  color: var(--red-dark);
  padding: 0 10px;
}
.hp-app .hp-btn-danger:hover:not(:disabled) {
  background: var(--red-soft);
}
.hp-app .hp-btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}
.hp-app .hp-btn-block {
  width: 100%;
  min-height: 46px;
}
.hp-app .hp-icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
}

.hp-app .hp-form {
  display: grid;
  gap: 16px;
}
.hp-app .hp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.hp-app .hp-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.hp-app .hp-field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.hp-app .hp-field small {
  color: var(--muted);
  font-size: 12px;
}
.hp-app input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])),
.hp-app select,
.hp-app textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: 400 15px/1.4 var(--sans);
  box-shadow: none;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
.hp-app select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235b6475' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.hp-app textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}
.hp-app input:focus,
.hp-app select:focus,
.hp-app textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(248, 8, 0, 0.12);
}
.hp-app input[type="time"] {
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.hp-app .hp-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
.hp-app .hp-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--red);
  flex: none;
}

/* ---------- Alerts & toasts ---------- */
.hp-app .hp-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--amber-soft);
  color: #5c3a00;
}
.hp-app .hp-alert-error {
  background: var(--red-soft);
  color: var(--red-dark);
}
.hp-app .hp-alert-ok {
  background: var(--green-soft);
  color: var(--green);
}
.hp-app .hp-toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(460px, calc(100vw - 32px));
  pointer-events: none;
}
.hp-app .hp-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.25);
  font-size: 14px;
  animation: hp-toast-in 0.2s ease-out;
}
.hp-app .hp-toast.is-error {
  background: var(--red-dark);
}
.hp-app .hp-toast .hp-toast-body {
  flex: 1;
  display: grid;
  gap: 8px;
}
.hp-app .hp-toast button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  opacity: 0.8;
}
.hp-app .hp-toast .hp-btn {
  justify-self: start;
  background: #fff;
  color: var(--ink);
  opacity: 1;
}
@keyframes hp-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Shell ---------- */
.hp-app .hp-shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  min-height: 100vh;
  background: linear-gradient(to right, var(--ink) var(--nav-w), transparent var(--nav-w));
}
.hp-app .hp-main:focus {
  outline: none;
}
.hp-app :where(.hp-btn, .hp-nav-link, .hp-tab, .hp-brand, .hp-nav-brand) {
  text-decoration: none;
}
.hp-app .hp-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 14px 18px;
  background: var(--ink);
  color: #e7e5e2;
}
.hp-app .hp-nav-brand {
  display: block;
  padding: 2px 12px 22px;
  color: #fff;
  text-decoration: none;
}
.hp-app .hp-nav-brand strong {
  display: block;
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 26px;
  line-height: 1;
}
.hp-app .hp-nav-brand span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #a8a29e;
}
.hp-app .hp-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d6d3d1;
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.hp-app .hp-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.hp-app .hp-nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 3px 0 0 var(--red);
}
.hp-app .hp-nav-link .hp-badge {
  margin-left: auto;
}
.hp-app .hp-nav-spacer {
  flex: 1;
}
.hp-app .hp-nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hp-app .hp-nav-user div {
  min-width: 0;
}
.hp-app .hp-nav-user strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hp-app .hp-nav-user div span {
  display: block;
  font-size: 12px;
  color: #a8a29e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hp-app .hp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  overflow: hidden;
  object-fit: cover;
}
.hp-app .hp-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.hp-app .hp-topbar {
  display: none;
}
.hp-app .hp-tabbar {
  display: none;
}

.hp-app .hp-main {
  min-width: 0;
  padding: 40px clamp(20px, 4vw, 56px) 80px;
}
.hp-app .hp-page {
  max-width: 1120px;
  margin: 0 auto;
}
.hp-app .hp-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hp-app .hp-page-head h1 {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: clamp(38px, 4.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hp-app .hp-page-head p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 60ch;
}
.hp-app .hp-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Surfaces ---------- */
.hp-app .hp-panel {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-l);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}
.hp-app .hp-panel + .hp-panel {
  margin-top: 20px;
}
.hp-app .hp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.hp-app .hp-panel-head h2 {
  font-size: 17px;
}
.hp-app .hp-panel-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}
.hp-app .hp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ---------- Chips ---------- */
.hp-app .hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #eef0f4;
  color: var(--ink-2);
}
.hp-app .hp-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
.hp-app .hp-chip-online {
  background: var(--online-soft);
  color: var(--online);
}
.hp-app .hp-chip-in_person {
  background: var(--person-soft);
  color: var(--person);
}
.hp-app .hp-chip-confirmed,
.hp-app .hp-chip-approved,
.hp-app .hp-chip-completed {
  background: var(--green-soft);
  color: var(--green);
}
.hp-app .hp-chip-pending,
.hp-app .hp-chip-submitted,
.hp-app .hp-chip-needs_reassignment {
  background: var(--amber-soft);
  color: var(--amber);
}
.hp-app .hp-chip-cancelled,
.hp-app .hp-chip-rejected,
.hp-app .hp-chip-no_show {
  background: var(--red-soft);
  color: var(--red-dark);
}
.hp-app .hp-chip-draft,
.hp-app .hp-chip-resolved {
  background: #eef0f4;
  color: var(--muted);
}

/* ---------- Today ---------- */
.hp-app .hp-today {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.hp-app .hp-dayhead {
  margin-bottom: 28px;
}
.hp-app .hp-dayhead .hp-weekday {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}
.hp-app .hp-dayhead h1 {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 4px;
}
.hp-app .hp-dayhead .hp-summary {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text);
}

.hp-app .hp-next {
  position: relative;
  background: radial-gradient(circle at 100% 0%, rgba(248, 8, 0, 0.35), transparent 45%), var(--ink);
  color: #ece9e5;
  border-radius: var(--radius-l);
  padding: 24px 26px;
  margin-bottom: 24px;
  overflow: hidden;
}
.hp-app .hp-next-label {
  font-size: 13px;
  color: #b8b3ad;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hp-app .hp-next-label .hp-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(248, 8, 0, 0.3);
}
.hp-app .hp-next-time {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: clamp(48px, 6vw, 68px);
  line-height: 1;
  color: #fff;
  margin: 10px 0 14px;
  font-variant-numeric: tabular-nums;
}
.hp-app .hp-next-time small {
  font-weight: 600;
  letter-spacing: 0;
  font-size: 0.34em;
  color: #b8b3ad;
  margin-left: 8px;
}
.hp-app .hp-next h2 {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}
.hp-app .hp-next-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: #d6d3d1;
  font-size: 14px;
}
.hp-app .hp-next .hp-chip {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.hp-app .hp-next-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #e7e5e2;
  font-size: 14px;
  max-width: 62ch;
}
.hp-app .hp-next-actions {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hp-app .hp-next .hp-btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.hp-app .hp-next .hp-btn-ghost:hover {
  border-color: #fff;
}
.hp-app .hp-next.is-empty {
  background: var(--surface);
  color: var(--text);
  border: 1px dashed var(--line-strong);
}
.hp-app .hp-next.is-empty h2 {
  color: var(--ink);
}

/* Timeline */
.hp-app .hp-timeline {
  list-style: none;
  display: grid;
  gap: 0;
}
.hp-app .hp-slot {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  position: relative;
  padding: 0 0 14px;
}
.hp-app .hp-slot-time {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
  padding-top: 14px;
  font-size: 15px;
}
.hp-app .hp-slot-time small {
  display: block;
  color: var(--faint);
  font-weight: 400;
  font-size: 12px;
}
.hp-app .hp-slot.is-past .hp-slot-time {
  color: var(--faint);
}
.hp-app .hp-lesson {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  background: var(--surface);
  border: 0;
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(15, 15, 16, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
  padding: 14px 16px;
}
.hp-app .hp-lesson.is-online {
  border-left-color: var(--online);
}
.hp-app .hp-lesson.is-in_person {
  border-left-color: var(--person);
}
.hp-app .hp-slot.is-past .hp-lesson {
  background: #fafbfc;
}
.hp-app .hp-lesson h3 {
  font-size: 16px;
  font-weight: 600;
}
.hp-app .hp-lesson-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.hp-app .hp-lesson-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  background: var(--canvas);
  padding: 8px 10px;
  border-radius: 8px;
}
.hp-app .hp-lesson-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.hp-app .hp-now {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: -4px 0 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hp-app .hp-now span:first-child {
  text-align: right;
}
.hp-app .hp-now span:last-child {
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  position: relative;
}
.hp-app .hp-now span:last-child::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* Side column */
.hp-app .hp-side {
  display: grid;
  gap: 16px;
}
.hp-app .hp-stat-list {
  display: grid;
  gap: 0;
}
.hp-app .hp-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.hp-app .hp-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.hp-app .hp-stat:first-child {
  padding-top: 0;
}
.hp-app .hp-stat strong {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hp-app .hp-todo {
  border-color: #f3c9a0;
  background: #fffaf3;
}
.hp-app .hp-todo-item {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid #f3dfc6;
  font-size: 14px;
}
.hp-app .hp-todo-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.hp-app .hp-todo-item strong {
  font-weight: 600;
}
.hp-app .hp-note-list {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.hp-app .hp-note-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

/* ---------- Empty states ---------- */
.hp-app .hp-empty {
  text-align: left;
  padding: 28px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
}
.hp-app .hp-empty h3 {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 26px;
  margin-bottom: 6px;
}
.hp-app .hp-empty .hp-btn {
  margin-top: 14px;
}

/* ---------- Schedule ---------- */
.hp-app .hp-segment {
  display: inline-flex;
  padding: 3px;
  background: rgba(15, 15, 16, 0.06);
  border-radius: 999px;
  gap: 2px;
}
.hp-app .hp-segment button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 13px/1 var(--sans);
  cursor: pointer;
}
.hp-app .hp-segment button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(23, 32, 51, 0.12);
}
.hp-app .hp-day-group {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.hp-app .hp-day-group:first-child {
  border-top: 0;
  padding-top: 4px;
}
.hp-app .hp-day-label {
  position: sticky;
  top: 20px;
  align-self: start;
}
.hp-app .hp-day-label strong {
  display: block;
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
}
.hp-app .hp-day-label span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.hp-app .hp-day-label.is-today strong {
  color: var(--red);
}
.hp-app .hp-day-lessons {
  display: grid;
  gap: 10px;
}
.hp-app .hp-row-lesson {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.hp-app .hp-row-lesson .hp-slot-time {
  padding: 0;
  text-align: left;
  white-space: nowrap;
}
.hp-app .hp-photo-section + form .hp-form-section:first-child {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.hp-app .hp-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Availability ---------- */
.hp-app .hp-week {
  display: grid;
}
.hp-app .hp-weekday-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.hp-app .hp-weekday-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.hp-app .hp-weekday-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 600;
  color: var(--ink);
}
.hp-app .hp-switch {
  position: relative;
  width: 36px;
  height: 22px;
  flex: none;
}
.hp-app .hp-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.hp-app .hp-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color 0.15s ease;
}
.hp-app .hp-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.hp-app .hp-switch input:checked + span {
  background: var(--red);
}
.hp-app .hp-switch input:checked + span::after {
  transform: translateX(14px);
}
.hp-app .hp-switch input:focus-visible + span {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.hp-app .hp-ranges {
  display: grid;
  gap: 8px;
}
.hp-app .hp-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hp-app .hp-range input[type="time"] {
  width: 144px;
  min-height: 40px;
}
.hp-app .hp-range .hp-dash {
  color: var(--faint);
}
.hp-app .hp-off {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--faint);
  font-size: 14px;
}
.hp-app .hp-row-tools {
  display: flex;
  gap: 4px;
}
.hp-app .hp-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 12px 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.3);
  font-size: 14px;
}
.hp-app .hp-savebar[hidden] {
  display: none;
}
.hp-app .hp-savebar .hp-btn-quiet {
  color: #fff;
}
.hp-app .hp-savebar .hp-btn-quiet:hover {
  background: rgba(255, 255, 255, 0.1);
}
.hp-app .hp-exc-list {
  list-style: none;
  display: grid;
  gap: 8px;
}
.hp-app .hp-exc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.hp-app .hp-exc strong {
  display: block;
  font-weight: 600;
}
.hp-app .hp-exc span {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Hours ---------- */
.hp-app .hp-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius-l);
  margin-bottom: 24px;
}
.hp-app .hp-figure {
  padding: 20px 24px;
  border-left: 1px solid var(--line);
}
.hp-app .hp-figure:first-child {
  border-left: 0;
}
.hp-app .hp-figure span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.hp-app .hp-figure strong {
  display: block;
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 44px;
  line-height: 1.05;
  margin-top: 6px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hp-app .hp-figure small {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  margin-left: 4px;
}
.hp-app .hp-list {
  list-style: none;
}
.hp-app .hp-list-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 70px 110px auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.hp-app .hp-list-row:first-child {
  border-top: 0;
}
.hp-app .hp-list-row .hp-when {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hp-app .hp-list-row .hp-when small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.hp-app .hp-list-row .hp-what small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.hp-app .hp-list-row .hp-qty {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
.hp-app .hp-list-row .hp-row-end {
  text-align: right;
}

/* ---------- Profile ---------- */
.hp-app .hp-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.hp-app .hp-preview {
  position: sticky;
  top: 24px;
}
.hp-app .hp-preview-card {
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.hp-app .hp-preview-photo {
  aspect-ratio: 4 / 3;
  background: #e9ebf0;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 96px;
  color: var(--ink);
  overflow: hidden;
}
.hp-app .hp-preview-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hp-app .hp-preview-body {
  padding: 18px 20px 20px;
}
.hp-app .hp-preview-body h3 {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 30px;
  line-height: 1.05;
}
.hp-app .hp-preview-body p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.hp-app .hp-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.hp-app .hp-preview-tags .hp-chip::before {
  display: none;
}
.hp-app .hp-photo-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hp-app .hp-photo-row .hp-avatar {
  width: 64px;
  height: 64px;
  font-size: 24px;
}
.hp-app .hp-file {
  position: relative;
  overflow: hidden;
}
.hp-app .hp-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.hp-app .hp-form-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.hp-app .hp-form-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.hp-app .hp-form-section h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

/* ---------- Dialog ---------- */
.hp-dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  box-shadow: 0 30px 80px rgba(23, 32, 51, 0.35);
  color: #1d2433;
  background: #fff;
}
.hp-dialog::backdrop {
  background: rgba(23, 32, 51, 0.45);
}
.hp-dialog .hp-dialog-inner {
  padding: 22px 24px 24px;
}
.hp-dialog .hp-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.hp-dialog .hp-dialog-head h2 {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 32px;
  line-height: 1.05;
}
.hp-dialog .hp-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.hp-app .hp-kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hp-app .hp-kind {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}
.hp-app .hp-kind input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hp-app .hp-kind strong {
  font-weight: 600;
  color: var(--ink);
}
.hp-app .hp-kind span {
  color: var(--muted);
  font-size: 12px;
}
.hp-app .hp-kind:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: #f7f8fa;
}
.hp-app .hp-kind:has(input:focus-visible) {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------- Login ---------- */
.hp-app.hp-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  min-height: 100vh;
  background: transparent;
}
.hp-app .hp-login-art {
  background: radial-gradient(circle at 0% 100%, rgba(248, 8, 0, 0.45), transparent 50%), var(--ink);
  color: #fff;
  padding: 40px clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.hp-app .hp-brand {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 28px;
  line-height: 1;
}
.hp-app .hp-login-quote {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  display: grid;
}
.hp-app .hp-login-quote span:nth-child(2) {
  padding-left: 0.35em;
  color: #b8b3ad;
}
.hp-app .hp-login-quote span:nth-child(3) {
  color: var(--red);
}
.hp-app .hp-login-foot {
  color: #a8a29e;
  font-size: 14px;
}
.hp-app .hp-login-card {
  align-self: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  gap: 18px;
}
.hp-app .hp-login-card h1 {
  font-size: 44px;
  color: var(--ink);
}
.hp-app .hp-login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hp-app .hp-today,
  .hp-app .hp-profile {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-app .hp-preview {
    position: static;
    order: -1;
  }
  .hp-app .hp-preview-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
  }
  .hp-app .hp-preview-photo {
    aspect-ratio: auto;
    font-size: 56px;
  }
}
@media (max-width: 860px) {
  .hp-app {
    --nav-w: 0px;
  }
  .hp-app .hp-shell {
    display: block;
  }
  .hp-app .hp-nav {
    display: none;
  }
  .hp-app .hp-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 56px;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top);
    background: var(--ink);
    color: #fff;
  }
  .hp-app .hp-topbar .hp-brand {
    font-size: 22px;
    color: #fff;
    text-decoration: none;
  }
  .hp-app .hp-topbar button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
  }
  .hp-app .hp-avatar.is-small {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .hp-app .hp-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .hp-app .hp-tab {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--faint);
    font: 600 11px/1.1 var(--sans);
    cursor: pointer;
  }
  .hp-app .hp-tab svg.hp-icon {
    width: 22px;
    height: 22px;
  }
  .hp-app .hp-tab[aria-current="page"] {
    color: var(--ink);
  }
  .hp-app .hp-tab[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: -6px;
    width: 24px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--red);
  }
  .hp-app .hp-tab .hp-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    padding: 0 4px;
  }
  .hp-app .hp-main {
    padding: 22px 16px calc(96px + env(safe-area-inset-bottom));
  }
  .hp-app .hp-toasts {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .hp-app .hp-savebar {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
  .hp-app .hp-page-head {
    margin-bottom: 20px;
  }
  .hp-app .hp-page-head h1 {
    font-size: 40px;
  }
  .hp-app .hp-dayhead h1 {
    font-size: 56px;
  }
  .hp-app .hp-panel {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .hp-app .hp-next {
    padding: 20px 18px;
  }
  .hp-app .hp-slot,
  .hp-app .hp-now {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }
  .hp-app .hp-lesson {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-app .hp-lesson-actions {
    justify-content: flex-start;
  }
  .hp-app .hp-day-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .hp-app .hp-day-label {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .hp-app .hp-day-label strong {
    font-size: 32px;
  }
  .hp-app .hp-row-lesson {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .hp-app .hp-weekday-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .hp-app .hp-weekday-row .hp-ranges {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .hp-app .hp-range input[type="time"] {
    width: auto;
    flex: 1;
  }
  .hp-app .hp-figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hp-app .hp-figure {
    padding: 14px 12px;
  }
  .hp-app .hp-figure strong {
    font-size: 30px;
  }
  .hp-app .hp-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .hp-app .hp-list-row .hp-what {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .hp-app .hp-list-row .hp-qty {
    grid-column: 2;
    grid-row: 1;
  }
  .hp-app .hp-list-row .hp-status-cell {
    grid-column: 1;
    grid-row: 3;
  }
  .hp-app .hp-list-row .hp-row-end {
    grid-column: 2;
    grid-row: 3;
  }
  .hp-app .hp-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-app .hp-preview-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .hp-app .hp-preview-body h3 {
    font-size: 24px;
  }
  .hp-app.hp-login {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-app .hp-login-art {
    min-height: 220px;
    padding: 24px 20px;
  }
  .hp-app .hp-login-quote {
    font-size: 54px;
    margin: 18px 0;
  }
  .hp-app .hp-login-card {
    padding: 28px 20px 40px;
  }
  .hp-app .hp-login-card h1 {
    font-size: 36px;
  }
}
@media (max-width: 420px) {
  .hp-app .hp-kinds {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hp-app *,
  .hp-app *::before,
  .hp-app *::after {
    animation: none !important;
    transition: none !important;
  }
}

.hp-app .hp-login-help {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* The website's floating cookie button: hidden inside the portal (reachable from Account). */
body.he-app-body .hp-hide-site-widget,
body.he-app-body #cmplz-manage-consent,
body.he-app-body .cky-btn-revisit-wrapper,
body.he-app-body #cookie-law-info-again,
body.he-app-body .cn-revoke-cookie,
body.he-app-body #CookiebotWidget,
body.he-app-body .iubenda-tp-btn {
  display: none !important;
}
