:root {
  --shadow-sm: 0 2px 10px color-mix(in srgb,var(--color-shadow) 6%,transparent);
  --shadow-md: 0 12px 30px color-mix(in srgb,var(--color-shadow) 10%,transparent);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Dana", "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.35;
}

p {
  margin: 0;
}

button:where(:not(.jh *)) {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:active:where(:not(.jh *)) {
  transform: translateY(1px);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-outline);
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb,var(--color-primary) 35%,transparent);
  border-color: var(--color-primary);
}

/* ---------- layout ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem max(1.25rem, env(safe-area-inset-left)) calc(4rem + env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-right));
}

.dark-page {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
}

.stack:where(:not(.jh *)) {
  display: grid;
  gap: 1rem;
}

.stack-lg {
  display: grid;
  gap: 1.75rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.grid > *,
.two-col > * {
  min-width: 0;
}

.space-between {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

/* ---------- typography ---------- */

.eyebrow:where(:not(.jh *)) {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.title-xl {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
}

.title-lg {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
}

.title-md {
  font-size: 1.25rem;
  font-weight: 700;
}

.muted:where(:not(.jh *)) {
  color: var(--color-text-muted);
}

.on-dark-muted {
  color: var(--color-text-muted);
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 800;
  box-shadow: 0 10px 24px color-mix(in srgb,var(--color-primary) 28%,transparent);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px color-mix(in srgb,var(--color-primary) 36%,transparent);
}

.btn-solid {
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 800;
}

.btn-white {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: color-mix(in srgb,var(--color-text) 12%,transparent);
  color: var(--color-on-primary);
  font-weight: 700;
  border: 1px solid color-mix(in srgb,var(--color-text) 35%,transparent);
}

.btn-quiet {
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

.btn-quiet:hover {
  color: var(--color-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* ---------- cards ---------- */

.card:where(:not(.jh *)) {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-outline);
}

.card-link {
  text-align: start;
  width: 100%;
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-outline);
  display: grid;
  gap: 0.35rem;
}

.card-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-gradient {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.stat {
  font-size: 1.9rem;
  font-weight: 800;
}

/* ---------- badges & pills ---------- */

.badge:where(:not(.jh *)) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.badge-light {
  background: color-mix(in srgb,var(--color-text) 14%,transparent);
  border: 1px solid color-mix(in srgb,var(--color-text) 40%,transparent);
  color: var(--color-on-primary);
}

.badge-cyan {
  background: color-mix(in srgb,var(--color-primary) 18%,transparent);
  border: 1px solid color-mix(in srgb,var(--color-primary) 50%,transparent);
  color: var(--color-text);
}

.badge-blue {
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.badge-ok {
  background: var(--c-ok-soft);
  color: var(--color-success);
}

.badge-warn {
  background: var(--c-warn-soft);
  color: var(--color-warning);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb,var(--color-bg) 92%,transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-outline);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: max(0.85rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 0.85rem max(1.25rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mobile-menu {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: var(--color-surface-container);
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 700;
}

.nav-toggle-dark {
  background: color-mix(in srgb,var(--color-text) 12%,transparent);
  color: var(--color-text);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  white-space: nowrap;
  background: transparent;
  padding: 0;
  color: inherit;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--color-primary);
  display: grid;
  place-items: center;
  color: var(--color-on-primary);
  font-size: 1.1rem;
}

.nav:where(:not(.jh *)) {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.panel-chrome {
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-chrome .topbar {
  position: static;
}

.brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-nav {
  display: none;
}

.panel-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.45rem max(1.25rem, env(safe-area-inset-right)) 0.55rem max(1.25rem, env(safe-area-inset-left));
}

.panel-nav-inner::-webkit-scrollbar {
  display: none;
}

.panel-nav button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.panel-nav button:hover {
  background: var(--color-surface-container);
}

.panel-nav button[aria-current="page"] {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.nav button:where(:not(.jh *)),
.nav-group-btn {
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}

.nav button:hover:where(:not(.jh *)),
.nav-group-btn:hover {
  background: var(--color-surface-container);
}

.nav button[aria-current="page"]:where(:not(.jh *)) {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.nav-group {
  position: relative;
}

.nav-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-group.is-current > .nav-group-btn {
  background: var(--color-surface-container);
  color: var(--color-text);
}

.nav-caret {
  font-size: 0.75rem;
  line-height: 1;
}

.nav-group.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 220px;
  padding: 0.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  z-index: 25;
}

.nav-group-account .nav-submenu {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.nav-group.is-open > .nav-submenu {
  display: grid;
  gap: 0.15rem;
}

.nav-submenu button {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
  white-space: nowrap;
}

/* ---------- attendance ---------- */

.roster {
  display: grid;
  gap: 0.6rem;
}

.roster-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-outline);
  border-radius: 14px;
  background: var(--color-surface);
}

.roster-item[data-status="present"] {
  border-color: color-mix(in srgb,var(--color-success) 45%,transparent);
  background: var(--c-ok-soft);
}

.roster-item[data-status="late"] {
  border-color: color-mix(in srgb,var(--color-warning) 55%,transparent);
  background: var(--c-warn-soft);
}

.roster-item[data-status="absent"] {
  border-color: color-mix(in srgb,var(--color-error) 45%,transparent);
  background: var(--c-bad-soft);
}

.roster-name {
  flex: 1;
  font-weight: 600;
}

.avatar:where(:not(.jh *)) {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--color-on-primary);
  background: var(--color-primary);
  flex-shrink: 0;
}

.toggle-group {
  display: flex;
  gap: 0.35rem;
}

.toggle-group button {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--color-surface-container);
  color: var(--color-text-muted);
  scroll-margin-top: 5.5rem;
  scroll-margin-bottom: 6.5rem;
}

.toggle-group button:active {
  transform: none;
}

.toggle-group button[aria-pressed="true"][data-value="present"] {
  background: var(--color-success);
  color: var(--c-on-ok);
}

.toggle-group button[aria-pressed="true"][data-value="late"] {
  background: var(--color-warning);
  color: var(--c-warn-ink);
}

.toggle-group button[aria-pressed="true"][data-value="absent"] {
  background: var(--color-error);
  color: var(--c-on-bad);
}

.dropzone {
  border: 2px dashed color-mix(in srgb,var(--color-primary) 45%,transparent);
  border-radius: var(--radius);
  background: var(--color-primary-soft);
  padding: 1.75rem;
  text-align: center;
  display: grid;
  gap: 0.75rem;
  place-items: center;
}

.dropzone[data-dragging="true"] {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--color-surface-container);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

/* ---------- ai output ---------- */

.ai-box {
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--color-primary-soft);
  border: 1px solid var(--color-outline);
  display: grid;
  gap: 0.6rem;
}

.bio-loading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.spinner:where(:not(.jh *)) {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border: 3px solid color-mix(in srgb,var(--color-primary) 25%,transparent);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.bio-loading-text {
  animation: bio-pulse 1.4s ease-in-out infinite;
}

.ai-box-error {
  background: var(--c-bad-soft);
  border-color: color-mix(in srgb,var(--color-error) 45%,transparent);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bio-pulse {
  50% {
    opacity: 0.45;
  }
}

.ai-box ul,
.plan-list {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.workout-output {
  font-variant-numeric: tabular-nums;
  display: grid;
  gap: 0.5rem;
}

.workout-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: var(--color-surface-container);
  border: 1px solid var(--color-outline);
}

/* ---------- misc ---------- */

.module-art {
  height: 110px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  margin-bottom: 0.9rem;
}

.chart:where(:not(.jh *)) {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  aspect-ratio: 640 / 240;
}

.field:where(:not(.jh *)) {
  display: grid;
  gap: 0.4rem;
}

.field > span {
  font-weight: 600;
}

.field-error {
  color: var(--color-error);
  font-size: 0.9rem;
}

.checkout-error {
  color: var(--color-error);
  font-size: 0.92rem;
  min-height: 1.2em;
}

.cart-total {
  align-items: center;
}

.checkbox-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.divider {
  height: 1px;
  background: var(--color-outline);
}

.plan-card-featured {
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* ---------- اجزای پلتفرم ---------- */

.site-header:where(:not(.jh *)) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  align-items: end;
  width: 100%;
}

.two-col {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.site-nav:where(:not(.jh *)) {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-inline: -0.25rem;
  padding: 0.35rem 0.25rem;
  background: linear-gradient(180deg, color-mix(in srgb,var(--color-bg) 94%,transparent), color-mix(in srgb,var(--color-bg) 78%,transparent) 72%, transparent);
}

.journey-step,
.journey-list li {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: color-mix(in srgb,var(--color-text) 6%,transparent);
  border: 1px solid color-mix(in srgb,var(--color-text) 12%,transparent);
  color: var(--color-text);
}

.journey-step p,
.journey-list span {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.journey-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kpi {
  display: grid;
  gap: 0.2rem;
}

.kpi-link,
button.plan-chip {
  text-align: start;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 1.5rem;
  font-weight: inherit;
  font-size: inherit;
}

.kpi-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-warn {
  border-color: color-mix(in srgb,var(--color-warning) 50%,transparent);
  background: var(--c-warn-soft);
}

.insight {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-radius: 14px;
  background: var(--color-surface);
  border-inline-start: 5px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.insight-warn {
  border-inline-start-color: var(--color-warning);
}

.insight-danger {
  border-inline-start-color: var(--color-error);
}

.insight-ok {
  border-inline-start-color: var(--color-success);
}

.tabs:where(:not(.jh *)) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: var(--color-surface-container);
  padding: 0.35rem;
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}

.tabs button:where(:not(.jh *)) {
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 700;
  padding: 0.55rem 1.2rem;
}

.tabs button[aria-current="page"]:where(:not(.jh *)) {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.session-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  font-size: 0.9rem;
}

.session-card {
  cursor: pointer;
  text-align: start;
  width: 100%;
}

.session-card:hover {
  border-color: color-mix(in srgb,var(--color-primary) 45%,transparent);
}

.session-card-today {
  border: 2px solid color-mix(in srgb,var(--color-primary) 35%,transparent);
}

.session-workout {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--color-surface-container);
  border: 1px solid var(--color-outline);
}

.ledger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--color-surface-container);
  border: 1px solid var(--color-outline);
}

.coach-row > span:first-child {
  flex: 1;
  min-width: 180px;
}

.manual-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--color-outline);
  background: var(--color-surface);
}

.manual-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  align-items: end;
}

.review-gate {
  border: 2px solid color-mix(in srgb,var(--color-warning) 55%,transparent);
  background: var(--c-warn-soft);
}

.gate {
  display: grid;
  gap: 0.75rem;
  border: 2px dashed color-mix(in srgb,var(--color-primary) 40%,transparent);
  background: var(--color-primary-soft);
}

.switch:where(:not(.jh *)) {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.switch input:where(:not(.jh *)) {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.event-advice {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.3rem;
}

.chips:where(:not(.jh *)) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip:where(:not(.jh *)) {
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.86rem;
  background: var(--color-surface-container);
  color: var(--color-text-muted);
}

.chip-present {
  background: var(--c-ok-soft);
  color: var(--color-success);
}

.chip-late {
  background: var(--c-warn-soft);
  color: var(--color-warning);
}

.chip-absent {
  background: var(--c-bad-soft);
  color: var(--color-error);
}

.code-box {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: var(--color-surface-container);
  color: var(--color-text);
  font-size: 0.82rem;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}

.site-credit {
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.site-credit.is-dark {
  color: var(--color-text-muted);
  padding-top: 0.25rem;
  padding-bottom: 0;
}

.ai-status {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--color-outline);
}

.ai-status p,
.ai-status ol {
  margin: 0;
  font-size: 0.95rem;
}

.ai-status-steps {
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.3rem;
}

.ai-status-live {
  background: var(--c-ok-soft);
  border-color: var(--color-success);
}

.ai-status-mock {
  background: var(--c-warn-soft);
  border-color: var(--color-warning);
}

.topbar-admin {
  background: var(--color-surface);
  border-bottom: 0;
}

.topbar-admin .brand {
  color: var(--color-text);
}

.nav-dark button {
  color: var(--color-text-muted);
}

.nav-dark button:hover {
  background: color-mix(in srgb,var(--color-text) 12%,transparent);
  color: var(--color-text);
}

.nav-dark button[aria-current="page"] {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.parent-portal {
  min-height: 100vh;
  background: var(--color-bg);
}

.parent-hero {
  background: var(--color-surface);
  padding: 2rem 0 2.5rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--c-scrim);
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  z-index: 60;
}

.modal-card {
  background: var(--color-surface);
  border-radius: 20px;
  padding: 1.5rem;
  width: min(640px, 100%);
  max-height: min(85vh, calc(100dvh - 2rem));
  overflow: auto;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.toggle-group {
  flex-wrap: wrap;
}

/* ---------- واکنش‌گرا ---------- */

@media (max-width: 1024px) {
  .nav:where(:not(.jh *)) {
    gap: 0.1rem;
  }

  .nav button:where(:not(.jh *)) {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 800px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand actions toggle"
      "nav nav nav";
    align-items: center;
    gap: 0.5rem 0.75rem;
  }

  .brand {
    grid-area: brand;
    justify-self: start;
    min-width: 0;
  }

  .topbar-actions {
    grid-area: actions;
    margin: 0;
  }

  .nav-toggle {
    display: inline-flex;
    grid-area: toggle;
  }

  .account-label {
    max-width: 5.5rem;
  }

  .nav:where(:not(.jh *)) {
    display: none;
    grid-area: nav;
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.2rem 0 0.35rem;
  }

  .nav button:where(:not(.jh *)) {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
    padding: 0.75rem 1rem;
  }

  .topbar.nav-open .nav:where(:not(.jh *)) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav .nav-group:where(:not(.jh *)),
  .nav .nav-group-btn:where(:not(.jh *)) {
    width: 100%;
  }

  .nav .nav-group-btn:where(:not(.jh *)) {
    justify-content: space-between;
    border-radius: 12px;
  }

  .topbar-panel .topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.35rem;
    column-gap: 0.5rem;
  }

  .topbar-panel .brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .topbar-panel .brand-name {
    flex: 1 1 auto;
  }

  .topbar-panel .topbar-actions {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    min-width: 0;
    justify-content: space-between;
  }

  .topbar-panel .account-label {
    max-width: 11rem;
  }

  .topbar-panel .nav-group-account .badge {
    display: none;
  }

  .topbar-panel .topbar-actions {
    position: relative;
  }

  .topbar-panel .nav-group-account {
    position: static;
  }

  .topbar-panel .nav-group-account .nav-submenu {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 0.35rem);
    width: auto;
    min-width: 0;
    z-index: 40;
  }

  .topbar-panel .nav-submenu button {
    white-space: normal;
    padding: 0.75rem 1rem;
  }

  .panel-app {
    padding-bottom: calc(6.4rem + env(safe-area-inset-bottom));
  }

  .desk-nav {
    display: none !important;
  }

  .mobile-menu {
    display: none;
    flex: 1 1 100%;
    gap: 0.2rem;
    padding-top: 0.35rem;
  }

  .topbar.nav-open .mobile-menu {
    display: grid;
  }

  .menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
    padding: 0.72rem 0.85rem;
    background: transparent;
    color: inherit;
    font-weight: 700;
    text-align: start;
  }

  .menu-link .dock-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
  }

  .menu-link > span:first-of-type {
    flex: 1;
  }

  .menu-lock .dock-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .menu-link[aria-current="page"] {
    background: var(--color-primary);
    color: var(--color-on-primary);
  }

  .panel-app .page {
    padding-bottom: 1.25rem;
  }

  .panel-nav {
    display: flex;
    justify-content: center;
    position: fixed;
    inset-inline: 0;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
    z-index: 30;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0.85rem;
    pointer-events: none;
  }

  .panel-nav-inner {
    pointer-events: auto;
    width: min(100%, 28rem);
    max-width: 100%;
    margin: 0;
    gap: 0.15rem;
    padding: 0.32rem;
    border-radius: 999px;
    background: color-mix(in srgb,var(--color-surface) 78%,transparent);
    border: 1px solid var(--color-outline);
    box-shadow: 0 14px 36px color-mix(in srgb,var(--color-shadow) 18%,transparent), 0 2px 8px color-mix(in srgb,var(--color-shadow) 6%,transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .panel-nav button {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    width: auto;
    height: auto;
    gap: 0.12rem;
    padding: 0.42rem 0.2rem;
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
  }

  .dock-label {
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }

  .dock-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
  }

  .panel-nav button .dock-icon + .dock-icon {
    position: absolute;
    width: 0.72rem;
    height: 0.72rem;
    top: 0.28rem;
    inset-inline-end: 0.28rem;
    padding: 0.08rem;
    border-radius: 999px;
    background: inherit;
  }

  .panel-nav button[aria-current="page"] {
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: 0 6px 16px color-mix(in srgb,var(--color-primary) 38%,transparent);
  }

  .nav .nav-submenu:where(:not(.jh *)) {
    position: static;
    inset: auto;
    min-width: 0;
    margin-top: 0.2rem;
    padding: 0.25rem 0.25rem 0.25rem 0.7rem;
    border: 0;
    box-shadow: none;
    background: var(--color-surface-container);
  }
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .workout-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workout-row > span:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .page {
    padding: 1.15rem max(0.9rem, env(safe-area-inset-left)) calc(3.25rem + env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-right));
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .card:where(:not(.jh *)),
  .card-gradient,
  .card-link {
    padding: 1.05rem;
  }

  .title-xl {
    font-size: clamp(1.4rem, 7.2vw, 2rem);
  }

  .title-lg {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
  }

  .stat {
    font-size: 1.55rem;
  }

  .site-header-actions,
  .row.hero-cta {
    width: 100%;
  }

  .site-header-actions > button {
    flex: 1 1 auto;
  }

  .tabs:where(:not(.jh *)) {
    width: 100%;
    border-radius: 16px;
  }

  .tabs button:where(:not(.jh *)) {
    flex: 1 1 auto;
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
  }

  .roster-item {
    flex-wrap: wrap;
  }

  .toggle-group {
    width: 100%;
  }

  .toggle-group button {
    flex: 1;
  }

  .session-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-row > span:first-child {
    min-width: 0;
  }

  .insight {
    align-items: flex-start;
  }

}

@media (max-width: 420px) {
  .badge:where(:not(.jh *)) {
    font-size: 0.82rem;
    padding: 0.28rem 0.7rem;
  }


}

@media (pointer: coarse) {
  .nav button:where(:not(.jh *)),
  .tabs button:where(:not(.jh *)),
  .toggle-group button {
    min-height: 44px;
  }
}

@media (min-width: 801px) {
  .nav-toggle {
    display: none !important;
  }

  .nav:where(:not(.jh *)) {
    flex: 1;
    justify-content: flex-end;
  }

  .nav button:where(:not(.jh *)) {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
  }

  .topbar.nav-open .nav:where(:not(.jh *)) {
    display: flex;
  }
}

.account-label {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.nav-group-account .nav-group-btn {
  width: auto;
  gap: 0.35rem;
}

.print-sheet {
  display: none;
}

.print-sheet h1,
.print-sheet h2 {
  margin: 0 0 0.6rem;
}

.print-sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
}

.print-sheet th,
.print-sheet td {
  border: 1px solid var(--color-print-line);
  padding: 0.45rem 0.6rem;
  text-align: start;
}

.print-sheet th {
  background: var(--color-print-head);
}

@media print {
  .panel-chrome,
  .panel-nav,
  .sidebar,
  .tabbar,
  #more-layer,
  .site-credit,
  .toast,
  .modal-backdrop,
  .no-print {
    display: none !important;
  }

  body,
  html,
  .panel-app,
  main.page {
    background: var(--color-print-paper) !important;
    color: var(--color-print-ink) !important;
  }

  .print-sheet {
    display: block !important;
    color: var(--color-print-ink);
    background: var(--color-print-paper);
  }
}

/* ---------- Task 4.5.0: بانک تمرین‌ها و تاریخچه تحلیل‌ها ---------- */

.bank-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.bank-filter-q {
  grid-column: 1 / -1;
}

.bank-filter-actions {
  grid-column: 1 / -1;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.bank-card .bank-date {
  font-size: 0.85rem;
}

.bank-snippet {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.bank-empty {
  text-align: center;
  align-items: center;
}

.bank-hint {
  font-size: 0.9rem;
}

.bank-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
}

.analysis-head {
  gap: 0.25rem;
}

.analysis-grid {
  align-items: start;
}

.analysis-item {
  border: 1px solid var(--color-outline);
  border-radius: 0.9rem;
  padding: 0.6rem 0.8rem;
}

.analysis-item > summary {
  cursor: pointer;
  list-style-position: inside;
  gap: 0.5rem;
}

.analysis-body {
  margin-top: 0.6rem;
}

.analysis-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.9;
}

.analysis-parent {
  border-top: 1px dashed var(--color-outline);
  padding-top: 0.6rem;
}

.portal-report {
  border-inline-start: 3px solid var(--color-primary);
  padding-inline-start: 0.8rem;
}

/* Task 4.5.2: parent view tables (attendance, swim times) */
.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.portal-table th,
.portal-table td {
  text-align: start;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--color-outline);
}

.badge-absent {
  background: color-mix(in srgb,var(--color-error) 12%,transparent);
  color: var(--color-error);
}

/* ---------- سپر صفحه‌های قدیمی ----------
   jahani.css و jahani-components.css کلاس‌هایی هم‌نام با این فایل دارند
   (.tabs، .chip، .switch و ...). ویژگی‌هایی که از آن دو فایل به عناصر قدیمی
   (بیرون از .jh) می‌رسید و این فایل تعیینشان نکرده بود، اینجا به مقدار قبلی
   برمی‌گردند. با بازطراحی هر صفحه، خط مربوط به آن حذف شود. */

.tabs:where(:not(.jh *)) {
  margin-inline: 0;
  overflow: visible;
  border-bottom: 0;
  scrollbar-width: auto;
}

.chips:where(:not(.jh *)) {
  margin-inline: 0;
  padding-inline: 0;
  overflow: visible;
  scrollbar-width: auto;
}

.chip:where(:not(.jh *)) {
  display: inline;
  flex: 0 1 auto;
  min-height: 0;
  border: 0;
  font-weight: inherit;
  white-space: normal;
  transition: none;
}

.chip:where(:not(.jh *)):hover {
  color: var(--color-text-muted);
}

.chip-present:where(:not(.jh *)):hover {
  color: var(--color-success);
}

.chip-late:where(:not(.jh *)):hover {
  color: var(--color-warning);
}

.chip-absent:where(:not(.jh *)):hover {
  color: var(--color-error);
}

.chip:where(:not(.jh *)):active {
  transform: none;
}

.switch:where(:not(.jh *)) {
  position: static;
  flex: 0 1 auto;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
}

.switch:where(:not(.jh *))::after {
  content: none;
}

.roster:where(:not(.jh *)) {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  animation: none;
}

.avatar:where(:not(.jh *)) {
  border: 0;
  font-size: inherit;
}

.badge:where(:not(.jh *)) {
  min-height: 0;
  line-height: inherit;
  white-space: normal;
}

.site-header:where(:not(.jh *)) {
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ---------- صفحه‌های بازطراحی‌شده (ریشه .jh) ----------
   ظاهر این صفحه‌ها از jahani.css و jahani-components.css می‌آید. قواعد قدیمی
   این فایل که با همان نام‌ها تداخل داشتند با :where(:not(.jh *)) بیرون از
   .jh نگه داشته شده‌اند (بدون تغییر specificity). اینجا فقط چیزهایی است که
   فایل‌های طراحی ندارند. */

.jh {
  color: var(--c-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* صفحه کامل بازطراحی‌شده (صفحه‌های عمومی). */
.jh--page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--c-bg);
}

/* ---------- پوسته پنل مربی ---------- */

.app {
  background: var(--c-bg);
}

/* صفحه‌های پنل که هنوز ظاهر قدیمی دارند، داخل پوسته جدید. */
.app__legacy {
  padding-top: var(--s-6);
}

.app__main > .site-credit {
  margin-top: var(--s-7);
}

/* نشان قفل Pro روی تب نوار پایین. */
.jh .tab {
  position: relative;
}

.jh .tab .tab__lock {
  position: absolute;
  top: 4px;
  inset-inline-start: calc(50% + 8px);
  width: 14px;
  height: 14px;
  color: var(--c-text-3);
}

.jh .badge--pro .icon {
  width: 12px;
  height: 12px;
}

.jh .sheet__account {
  padding: 0 var(--s-2) var(--s-4);
}

.jh .sidebar .who {
  padding-inline: var(--s-2);
}

.jh .alert__text {
  flex: 1;
}

.jh .alert .btn {
  flex: none;
}

/* نام کاربر و نشان اشتراک در هدر عمومی: روی موبایل جا نمی‌شوند. */
.jh .site-nav__meta {
  display: none;
  align-items: center;
  gap: var(--s-2);
}

@media (min-width: 600px) {
  .jh .site-nav__meta {
    display: inline-flex;
  }
}

/* جای خطای فرم تا وقتی خالی است فاصله نگیرد. */
.jh .field__error:empty {
  display: none;
}

/* فاصله انتهای صفحه‌های ساده (سبد خرید، تمرین رایگان) تا فوتر. */
.jh .page-end {
  padding-bottom: var(--s-10);
}

/* ---------- شاگردان و پرونده شاگرد ---------- */

/* ردیف شاگرد: دکمه‌ی باز کردن پرونده، با ظاهر ردیف فهرست. */
.jh .student-open {
  align-content: center;
  min-height: var(--tap);
  text-align: start;
}

/* موبایل: اکشن‌ها زیر نام می‌آیند؛ از ۶۰۰px به بعد کنار آن. */
.jh .student-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--s-3);
  padding-block: var(--s-3);
}

.jh .student-item .list__main {
  min-width: 0;
}

.jh .student-item .list__end {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (min-width: 600px) {
  .jh .student-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .jh .student-item .list__end {
    grid-column: auto;
  }
}

/* کلید روشن/خاموش با چک‌باکس واقعی: خود چک‌باکس دیده نمی‌شود، .switch حالتش را نشان می‌دهد. */
.jh .switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.jh .switch-input:checked + .switch {
  background: var(--c-accent);
}

.jh .switch-input:checked + .switch::after {
  background: var(--c-on-accent);
  transform: translateX(-20px);
}

.jh .switch-input:focus-visible + .switch {
  outline: 2px solid var(--c-accent-ink);
  outline-offset: 3px;
}

.jh .switch-input:disabled + .switch {
  opacity: 0.4;
}

.jh label.switch-row {
  cursor: pointer;
}

.jh .event-advice {
  display: grid;
  gap: var(--s-1);
  padding-inline-start: var(--s-5);
  list-style: decimal;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
}

.jh .code-box {
  display: block;
  padding: var(--s-3) var(--s-4);
  overflow-wrap: anywhere;
  direction: ltr;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

.jh .analysis-item {
  padding: var(--s-3) var(--s-4);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}

.jh .analysis-item > summary {
  min-height: var(--tap);
  cursor: pointer;
}

.jh .analysis-body {
  padding-top: var(--s-3);
}

/* SMS-code sign-in (3.4.0, auth-otp.js): the consent line under the button, a row of small actions, and the password
   box of the panel: small, at the bottom, never covering the page's own buttons on a phone (it scrolls with them). */
.auth__consent{text-align:center;line-height:1.9}
.auth__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s-2,8px)}
.pw-nudge{position:fixed;inset-inline:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px) + var(--tabbar-h,64px));z-index:40;max-width:420px;margin-inline:auto;box-shadow:0 12px 32px color-mix(in srgb,var(--color-shadow) 45%,transparent)}
.pw-nudge--small{display:grid;gap:var(--s-2,8px);padding:var(--s-3,12px)}
.pw-nudge__title{font-size:var(--fs-body,1rem);font-weight:var(--fw-semibold,600)}
@media (min-width:900px){.pw-nudge{bottom:24px;inset-inline-start:auto;inset-inline-end:24px}}

/* ---------- coach panel, quiet look (owner, 16 Aban 1405) ----------
   No pills, squircles, soft container borders or dividers, gradients or mono type inside the coach panel.
   Inputs, chips and dialogs keep the strong border so they still read as controls; admin and landing are untouched. */
.panel-app--coach{--r-sm:6px;--r-md:8px;--r-lg:10px;--r-xl:12px;--r-mark:8px;--r-pill:8px;--c-border:transparent}
.panel-app--coach .badge{min-height:0;padding:0;background:none;border:0;border-radius:0}
.panel-app--coach .btn-primary{background:var(--c-accent);color:var(--c-on-accent);box-shadow:none}
.panel-app--coach .progress{border-radius:var(--r-sm)}
.panel-app--coach .progress>span{background:var(--c-accent)}
.panel-app--coach .code,.panel-app--coach .code-box{font-family:inherit;letter-spacing:0;font-variant-numeric:tabular-nums}
.panel-app--coach .page-head__date{margin-top:4px}

/* ---------- motion, every page but the landing (owner, 16 Aban 1405) ----------
   app.js marks the page: html[data-surface="app"], and #app[data-enter="1"] only on the paint that opens a page,
   so a redraw of the same page does not replay entrances. Exits are 20% shorter than entrances; nothing bounces.
   prefers-reduced-motion (jahani.css) cuts all of this to 1ms, and ui.js then skips exits and page cross-fades. */
:root[data-surface="app"]{--dur-pop:200ms;--dur-pop-out:160ms;--dur-sheet:260ms;--ease-in:cubic-bezier(.4,0,1,1)}
@keyframes pop-in{from{opacity:0;transform:scale(.95)}}
@keyframes pop-out{to{opacity:0;transform:scale(.95)}}
@keyframes fade-out{to{opacity:0}}
@keyframes sheet-down{to{transform:translateY(100%)}}
@keyframes toast-out{to{opacity:0;transform:translateY(12px)}}
@keyframes ok-pulse{50%{transform:scale(1.18)}}
@keyframes mask-reveal{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 0 0)}}

/* dialogs, sheets, toasts: ease-out in, 200ms (sheets 260ms), dialogs from 0.95 out of the control that opened them */
:root[data-surface="app"] .scrim{animation-duration:var(--dur-pop)}
:root[data-surface="app"] .sheet{animation-duration:var(--dur-sheet)}
:root[data-surface="app"] .modal{animation-name:pop-in;animation-duration:var(--dur-pop)}
:root[data-surface="app"] .toast{animation-duration:var(--dur-pop)}
@media (min-width:960px){
  :root[data-surface="app"] .sheet--dialog{transform-origin:var(--origin,50% 50%);animation-name:pop-in;animation-duration:var(--dur-pop)}
}
/* exits back the same way, shorter, easing in */
.modal-layer--leaving{pointer-events:none}
.modal-layer--leaving .scrim{animation:fade-out var(--dur-pop-out) var(--ease-in) both}
.modal-layer--leaving .sheet{animation:sheet-down calc(var(--dur-sheet) * .8) var(--ease-in) both}
.modal-layer--leaving .modal{animation:pop-out var(--dur-pop-out) var(--ease-in) both}
@media (min-width:960px){.modal-layer--leaving .sheet--dialog{animation:pop-out var(--dur-pop-out) var(--ease-in) both}}
.toast--leaving{animation:toast-out var(--dur-pop-out) var(--ease-in) both;pointer-events:none}
/* a done toast confirms with one pulse of its tick */
:root[data-surface="app"] .toast:not(.toast--bad):not(.toast--leaving) .icon{animation:ok-pulse 360ms var(--ease-in-out) 120ms both}

/* a page enters once; list rows follow 30ms apart, then the details (numbers, key-values) settle after them */
:root[data-surface="app"] #app[data-enter="0"] .view{animation:none}
:root[data-surface="app"] #app[data-enter="1"] :is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row){animation:view-in var(--dur-3) var(--ease-out) both;animation-delay:calc(var(--i,0) * 30ms)}
:root[data-surface="app"] #app[data-enter="1"] :is(.metric,.kv,.stat){animation:view-in var(--dur-3) var(--ease-out) both;animation-delay:calc(120ms + var(--i,0) * 30ms)}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(2){--i:1}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(3){--i:2}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(4){--i:3}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(5){--i:4}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(6){--i:5}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(7){--i:6}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(8){--i:7}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(9){--i:8}
:is(.list__row,.sess-card,.attn-row,.roster__row,.note,.dtable__row,.metric,.kv,.stat):nth-child(n+10){--i:9}

/* revealed content opens with a mask, not a slide */
:root[data-surface="app"] :is(.sess__body,.disclosure[open] .checklist,.portal__panel.is-entering){animation:mask-reveal var(--dur-3) var(--ease-out) backwards}

/* every pressable thing gives to 0.97; while held it follows at once, it eases back on release */
:root[data-surface="app"] :is(.seg__btn,.att__btn,.tab,.nav-item,.chip,.choice,.list__row--btn,.list__row--link,.card--interactive,.sess-card,.attn-row,.pad__btn,.day,.swatch,.fab,.mic,.switch-row):active{transform:scale(.97);transition-duration:0ms}

/* things that move from place to place ease in and out; the switch knob stretches 12% while pressed */
:root[data-surface="app"] .switch::after{transition:transform var(--dur-2) var(--ease-in-out),width var(--dur-1) var(--ease-out)}
:root[data-surface="app"] .switch-row:active .switch::after{width:29px}
:root[data-surface="app"] [aria-checked="true"].switch-row:active .switch::after{transform:translateX(-17px)}
:root[data-surface="app"] .tabs__btn::after{transition-timing-function:var(--ease-in-out)}

/* the password eye: the two icons cross-fade with a little blur */
.input-wrap__btn .icon--eye,.input-wrap__btn .icon--eye-off{grid-area:1/1;transition:opacity 160ms var(--ease-out),filter 160ms var(--ease-out),transform 160ms var(--ease-out)}
.input-wrap__btn .icon--eye-off,.input-wrap__btn[aria-pressed="true"] .icon--eye{opacity:0;filter:blur(3px);transform:scale(.8)}
.input-wrap__btn[aria-pressed="true"] .icon--eye-off{opacity:1;filter:none;transform:none}

/* between pages: the old page fades out fast while the new one comes in over it; the current nav item and the
   page title are the same element on both pages and move to their new place */
::view-transition-old(root){animation:fade-out 160ms var(--ease-in,ease-in) both}
::view-transition-new(root){animation:fade-in 220ms var(--ease-out) both}
::view-transition-group(*){animation-duration:220ms;animation-timing-function:var(--ease-in-out)}
:root[data-surface="app"] .sidebar .nav-item[aria-current="page"]{view-transition-name:nav-current}
:root[data-surface="app"] .tabbar .tab[aria-current="page"]{view-transition-name:tab-current}
:root[data-surface="app"] .page-head__title{view-transition-name:page-title}
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

/* ---------- the six code boxes (auth-otp.js codeBoxes) ----------
   One real field over six cells. A wrong code shakes them; the right one folds them to the middle into a tick. */
.otp{position:relative;direction:ltr;width:min(100%,360px);margin-inline:auto}
.otp__cells{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.otp__cell{display:grid;place-items:center;aspect-ratio:1;background:var(--c-bg);border:1px solid var(--c-border-strong);border-radius:var(--r-md);color:var(--c-text);font-size:1.5rem;font-weight:var(--fw-bold);transition:border-color var(--dur-1) var(--ease-out)}
.otp__cell.is-current{border-color:var(--c-accent-ink);box-shadow:0 0 0 1px var(--c-accent-ink)}
.otp__input{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;color:transparent;caret-color:transparent;font-size:16px;outline:none}
.otp__input::selection{background:transparent}
.otp--wrong .otp__cell{border-color:var(--c-bad)}
.otp--wrong .otp__cells{animation:otp-shake 320ms var(--ease-in-out)}
@keyframes otp-shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.otp__tick{position:absolute;top:50%;left:50%;width:56px;height:56px;margin:-28px 0 0 -28px;fill:none;stroke:var(--c-accent-ink);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:20;stroke-dashoffset:20;opacity:0;transform:scale(.6);pointer-events:none}
.otp__cell:nth-child(1){--k:2.5}.otp__cell:nth-child(2){--k:1.5}.otp__cell:nth-child(3){--k:.5}.otp__cell:nth-child(4){--k:-.5}.otp__cell:nth-child(5){--k:-1.5}.otp__cell:nth-child(6){--k:-2.5}
.otp--done .otp__cell{opacity:0;transform:translateX(calc(var(--k) * (100% + 8px))) scale(.4);transition:transform 380ms var(--ease-in-out),opacity 300ms var(--ease-in) 80ms}
.otp--done .otp__tick{opacity:1;transform:none;stroke-dashoffset:0;transition:opacity 180ms var(--ease-out) 260ms,transform 260ms var(--ease-out) 260ms,stroke-dashoffset 320ms var(--ease-out) 300ms}

/* ---------- auth titles centred; the dashboard: one column of equal boxes at a reading width ---------- */
.auth__head{text-align:center}
.cockpit-page{width:100%;max-width:720px;margin-inline:auto}
.page-head--row{align-items:center}
.page-head--row .page-head__actions{display:flex;align-items:center;gap:var(--s-3)}
.page-head--row .page-head__date{margin-top:0}
.cockpit{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s-7)}
@media (min-width:960px){.cockpit{grid-template-columns:minmax(0,1fr)}.cockpit__main{grid-row:auto}}
.next__actions{display:flex;flex-wrap:wrap;gap:var(--s-2)}
.due__head{padding:var(--s-4) var(--s-5);border:0}
.due__list{display:grid;gap:var(--s-2);margin:0;padding:0;list-style:none}
.due__row{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);padding:var(--s-3) var(--s-5)}
.due__row .list__end{display:flex;align-items:center;gap:var(--s-2)}
/* each dashboard section is one box with its title inside; what was a box inside it becomes a plain part of it,
   except the fee rows, which stay small boxes of their own */
.cockpit__box{padding:var(--sp-16);background:var(--c-surface);border-radius:var(--r-lg)}
.cockpit__box .card{padding:0;background:none;border:0;border-radius:0}
.cockpit__box .empty{padding:var(--s-4) 0}
.cockpit__box .due__head,.cockpit__box .due__row{padding:var(--s-3) var(--s-4);background:var(--c-surface-2);border-radius:var(--r-md)}
.next__empty{padding:var(--s-2) 0;font-weight:var(--fw-bold)}
.next__status{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--s-2)}
.next__actions{justify-content:center;margin-top:var(--s-2)}
.due__all{justify-self:center}
.cockpit__box .panel__title{white-space:nowrap}.cockpit__box .panel__meta{text-align:end}
/* overdue total on one row: the label on one side, the amount on the other; the insight buttons share one width */
.cockpit__box .due__head{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3)}
.cockpit__box .alert{flex-wrap:wrap;align-items:center;justify-content:space-between}
.cockpit__box .alert .btn{flex:none;width:9rem}

/* ---------- swimmers: one toolbar (search | filter, add) and the filter mega menu ----------
   The menu grows out of the filter button (from 0.95, ease-out, 200ms); on a phone it is a sheet from the bottom. */
.student-tools{position:relative;display:flex;align-items:center;gap:var(--s-2);margin-bottom:var(--s-5)}
.student-tools__search{flex:1;min-width:0}
.student-tools__filter .badge{min-height:0;padding:0;margin-inline-start:var(--s-1)}
.student-tools__filter.is-on{border-color:var(--c-accent-ink);color:var(--c-accent-ink)}
.filter-scrim{position:fixed;inset:0;z-index:45;background:transparent}
.filter-menu{position:absolute;top:calc(100% + var(--s-2));inset-inline-end:0;z-index:46;width:min(760px,100%);display:grid;gap:var(--s-5);padding:var(--s-5);background:var(--c-surface);border:1px solid var(--c-border-strong);border-radius:var(--r-lg);box-shadow:var(--shadow-2);transform-origin:top left;animation:pop-in var(--dur-pop,200ms) var(--ease-out) both}
.filter-menu__head{display:flex;align-items:center;justify-content:space-between}
.filter-menu__groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-5)}
.filter-menu__label{margin-bottom:var(--s-2);font-size:var(--fs-sm);font-weight:var(--fw-bold);color:var(--c-text-2)}
.filter-menu__foot{display:flex;justify-content:flex-end;gap:var(--s-2)}
@media (max-width:959px){
  .filter-scrim{background:var(--c-scrim);animation:fade-in var(--dur-pop,200ms) var(--ease-out) both}
  .filter-menu{position:fixed;inset:auto 0 0 0;width:auto;max-height:86vh;overflow-y:auto;border-radius:var(--r-xl) var(--r-xl) 0 0;padding-bottom:calc(var(--s-6) + env(safe-area-inset-bottom));animation:sheet-up var(--dur-sheet,260ms) var(--ease-out) both}
  .filter-menu__groups{grid-template-columns:minmax(0,1fr)}
  .filter-menu__foot .btn{flex:1}
}
.sheet__foot .auth__consent{text-align:center}

/* a swimmer row answers the pointer with a light background */
@media (hover:hover){.student-item{border-radius:var(--r-md);transition:background-color var(--dur-1) var(--ease-out)}.student-item:hover{background:var(--c-surface-2)}}

/* the swimmer file: «روند رکوردها» with «فیلتر» and «افزودن رکورد» across from it; the biomech box apart */
.record-head{position:relative;display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);flex-wrap:wrap}
.record-head__title{font-size:1.5rem;font-weight:var(--fw-black)}
.record-head__actions{display:flex;align-items:center;gap:var(--s-2)}
.record-add{gap:var(--s-4)}
.record-add .modal__actions{display:flex;gap:var(--s-2)}
.record-add .modal__actions .btn{flex:1}
.file-boxes{display:grid;gap:var(--s-7)}
.metrics--rows{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s-2)}
.metrics--rows .metric{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s-3)}

/* ---------- swimmer file, round 2 ---------- */
/* the tabs across from the name (under it on a phone) */
/* owner, 2026-11-20: name row first (type and «بایگانی» on its left), the tabs under it at every width */
.profile-top{margin-bottom:var(--s-5)}
.profile-head__row{display:flex;align-items:center;justify-content:space-between;gap:var(--s-4)}
.profile-head__actions{display:flex;align-items:center;gap:var(--s-3);flex-shrink:0}
@media (max-width:959px){.profile-head__row{flex-wrap:wrap}.profile-head__actions{flex-basis:100%}}
.profile-top .profile-head{margin:0}
.profile-top .profile-tabs{margin:var(--s-4) 0 0}

/* biomech box: larger text */
.bio-box .metrics--rows dt{font-size:var(--fs-body)}
.bio-box .metrics--rows dd{font-size:1.5rem}
.bio-box .ai-box{font-size:var(--fs-body);line-height:1.8}
/* attendance: one box per number; past session: the select and the three buttons on one row, «حاضر» green */
.metrics--boxes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s-3)}
.metrics--boxes .metric{padding:var(--s-4);background:var(--c-surface);border-radius:var(--r-lg)}
.past-mark{display:flex;align-items:flex-end;gap:var(--s-3);flex-wrap:wrap}
.past-mark__field{flex:0 1 280px;min-width:0}
.past-mark__buttons{display:flex;gap:var(--s-2)}
.mark-btn--present{color:var(--c-ok)}
.mark-btn--present[aria-pressed="true"]{background:var(--c-ok);border-color:var(--c-ok);color:var(--c-on-ok)}
/* notes: the date with the parents badge across; a note with a session that day is a button */
.note .note__date{display:flex;align-items:center;justify-content:space-between;gap:var(--s-2)}
.note--link{display:block;width:100%;text-align:start;border-radius:var(--r-md);cursor:pointer}
@media (hover:hover){.note--link,.list__row--btn{transition:background-color var(--dur-1) var(--ease-out)}.note--link:hover{background:var(--c-surface-2)}}
.note-actions{display:flex;flex-wrap:wrap;gap:var(--s-2)}
/* parents tab: the two analysis columns are boxes of their own */
.analysis-grid > .analysis-column{padding:var(--s-4);background:var(--c-surface-2);border-radius:var(--r-md)}
.portal-preview{margin-top:var(--s-4);align-items:center;justify-content:space-between;flex-wrap:wrap}

/* ---------- attendance page ---------- */
/* the session box: its name with time, group, count and the marks on one row; «جلسه‌ی دیگر» and «همه حاضر» across */
.attn-session__head{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);flex-wrap:wrap}
.attn-session__name{display:flex;align-items:baseline;gap:var(--s-2) var(--s-3);flex-wrap:wrap;min-width:0}
.attn-session__name .list__meta,.attn-session__name .count{font-size:var(--fs-sm)}
.attn-session__name .count::before,.attn-session__name .list__meta::before{content:"•";margin-inline-end:var(--s-2);color:var(--c-text-3)}
.attn-session__actions{display:flex;gap:var(--s-2)}
/* from 1200px the pad stands beside the session box, the same height; the notes and the sheet go under the box */
@media (min-width:1200px){
  .attn{align-items:stretch}
  .attn > .pad{position:static;align-self:stretch;align-content:start}
  .attn > .attn-more{grid-column:1}
}
@media (max-width:1199px){.attn > .pad{order:3}}
/* the notes fold answers the pointer; the paper sheet is one row */
@media (hover:hover){.attn-notes > summary{border-radius:var(--r-md);cursor:pointer;transition:background-color var(--dur-1) var(--ease-out)}.attn-notes > summary:hover{background:var(--c-surface-2)}}
.attn-scan{display:flex;align-items:center;gap:var(--s-3);flex-wrap:wrap}
.attn-scan .list__title{margin-inline-end:auto}
/* the session cards of the list: one readable row, a little larger */
.sess-card__line{flex:1;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:var(--s-2) var(--s-3)}
.sess-card__line .sess-card__title{flex:none;font-size:1.125rem}
.sess-card__meta{font-size:var(--fs-body);color:var(--c-text-2)}
.sess-card__meta::before{content:"•";margin-inline-end:var(--s-3);color:var(--c-text-3)}
.sess-card__time{font-size:1.5rem}
/* the file's parents tab: «ولی» and «کارنامه» side by side */
.file-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--s-5)}
@media (max-width:640px){.file-pair{grid-template-columns:minmax(0,1fr)}}
/* «جلسه‌ی دیگر» and «همه حاضر» on top of the pad; the whole notes box answers the pointer */
.pad__actions{display:flex;gap:var(--s-2)}
.pad__actions .btn{flex:1}
@media (hover:hover){.attn-notes{cursor:pointer;transition:background-color var(--dur-1) var(--ease-out)}.attn-notes:hover{background:var(--c-surface-2)}.attn-notes > summary:hover{background:none}}

/* ---------- first-load outlines, one per kind of page (UI.bootSkeleton) ---------- */
.boot__page--narrow{max-width:720px}
.boot__row{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3)}
.boot__box{height:140px;border-radius:var(--r-lg)}
.boot__box--tall{height:220px}
.boot__box--chart{height:300px}
.boot__search{flex:1;height:48px;border-radius:var(--r-md)}
.boot__tabs{width:min(420px,60%);height:40px;border-radius:var(--r-md)}
.boot__tabs--full{width:100%}
.boot__who{display:flex;align-items:center;gap:var(--s-3)}
.boot__avatar{width:56px;height:56px}
.boot__sess{height:76px;border-radius:var(--r-lg)}
.boot__auth{max-width:420px;margin:0 auto;padding:var(--s-10) var(--gutter);display:grid;gap:var(--s-5)}
.boot__auth--wide{max-width:640px}
.boot__center{justify-self:center}
.boot__field{height:52px;border-radius:var(--r-md)}
.boot__auth .boot__btn{width:100%;margin-top:var(--s-2)}
/* a page that has just opened (not a redraw) comes in from the top down, over where its outline was */
/* the clip is held only until the reveal ends (backwards): a clip left on the page cut its pop-ups at the page edge; a page that opens with a pop-up shows at once */
:root[data-surface="app"] #app[data-enter="1"] :is(.app__main > .jh, .auth__box, .portal):not(:has(.sheet--dialog, .filter-menu)){animation:mask-reveal 420ms var(--ease-out) backwards}

/* ---------- transitions.dev (owner, 16 Aban 1405): the tokens of each recipe, wired by motion.js ----------
   Right-to-left: the pill measures from the left edge (offsetLeft), so it follows the RTL layout; the filter menus
   hang on the left side and open from their top-left corner. The number pop-in and the toggle keep the recipes'
   small overshoot (owner's choice); everything else has none. */
:root{
  --tabs-dur:250ms;--tabs-ease:cubic-bezier(.22,1,.36,1);
  --digit-dur:500ms;--digit-distance:8px;--digit-stagger:70ms;--digit-blur:2px;--digit-ease:cubic-bezier(.34,1.45,.64,1);
  --reel-dur:1400ms;--reel-cell:1.25em;--reel-spin-blur:3px;--reel-ease:cubic-bezier(.16,1,.3,1);
  --shake-distance:6px;--shake-overshoot:4px;--shake-ease:cubic-bezier(.22,1,.36,1);
  --clear-out-dur:400ms;--clear-in-dur:400ms;--clear-fly:12px;--clear-blur:2px;--clear-ease:cubic-bezier(.22,1,.36,1);
  --reveal-dur:400ms;--reveal-blur:2px;
  --stagger-dur:500ms;--stagger-distance:12px;--stagger-step:40ms;--stagger-blur:3px;--stagger-ease:cubic-bezier(.22,1,.36,1);
  --tt-in-dur:150ms;--tt-out-dur:50ms;--tt-scale:.98;
  --dropdown-open-dur:250ms;--dropdown-close-dur:150ms;--dropdown-pre-scale:.97;--dropdown-ease:cubic-bezier(.22,1,.36,1);
  --acc-dur:250ms;--acc-ease:cubic-bezier(.22,1,.36,1);
  --check-box:150ms;--check-draw:350ms;--check-ease:cubic-bezier(.22,1,.36,1);
  --toggle-dur:350ms;--toggle-ease:cubic-bezier(.34,1.35,.64,1);
}
/* tabs sliding: one pill per row; the static active look is handed to it */
.seg.has-pill,.tabs.has-pill{position:relative}
.t-pill{position:absolute;left:0;z-index:0;width:0;pointer-events:none;transition:transform var(--tabs-dur) var(--tabs-ease),width var(--tabs-dur) var(--tabs-ease);will-change:transform,width}
.seg.has-pill > .t-pill{top:4px;bottom:4px;border-radius:var(--r-pill);background:var(--c-surface-3)}
.tabs.has-pill > .t-pill{bottom:-1px;height:2px;border-radius:2px;background:var(--c-accent)}
.seg.has-pill > :not(.t-pill),.tabs.has-pill > :not(.t-pill){position:relative;z-index:1}
.seg.has-pill > .is-active,.seg.has-pill > [aria-pressed="true"],.seg.has-pill > [aria-selected="true"]{background:transparent}
.tabs.has-pill .tabs__btn::after{display:none}
/* number pop-in */
@keyframes t-digit-pop-in{0%{transform:translateY(var(--digit-distance));opacity:0;filter:blur(var(--digit-blur))}100%{transform:none;opacity:1;filter:none}}
.t-digit-group{display:inline-flex;align-items:baseline}
.t-digit{display:inline-block}
.t-digit-group.is-animating .t-digit{animation:t-digit-pop-in var(--digit-dur) var(--digit-ease) both}
.t-digit-group.is-animating .t-digit[data-stagger="1"]{animation-delay:var(--digit-stagger)}
.t-digit-group.is-animating .t-digit[data-stagger="2"]{animation-delay:calc(var(--digit-stagger) * 2)}
/* spinning counter: a reel per digit (the strip holds 0-9 three times; the target is in the last round) */
.t-reel{display:inline-flex;align-items:center;height:var(--reel-cell);line-height:var(--reel-cell);direction:ltr;vertical-align:bottom}
.t-reel-col{position:relative;height:var(--reel-cell);overflow:hidden;-webkit-mask-image:linear-gradient(to bottom,transparent 0,var(--color-text) 22%,var(--color-text) 78%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,var(--color-text) 22%,var(--color-text) 78%,transparent 100%)}
.t-reel-strip{display:flex;flex-direction:column;transition:transform var(--reel-dur) var(--reel-ease),filter var(--reel-dur) var(--reel-ease)}
.t-reel-strip.is-spinning{filter:blur(var(--reel-spin-blur))}
.t-reel-digit,.t-reel-static{display:flex;align-items:center;justify-content:center;height:var(--reel-cell)}
/* error state shake: left, right, a smaller overshoot, rest (280ms) */
@keyframes t-shake{0%{transform:none}28.57%{transform:translateX(calc(var(--shake-distance) * -1))}57.14%{transform:translateX(var(--shake-distance))}78.57%{transform:translateX(calc(var(--shake-overshoot) * -1))}100%{transform:none}}
.t-shake{animation:t-shake 280ms var(--shake-ease)}
/* search fields: the × and the dissolving text */
.t-clear-wrap{position:relative}
.t-clear{position:absolute;inset-inline-end:6px;top:50%;display:grid;place-items:center;width:32px;height:32px;margin-top:-16px;border-radius:var(--r-sm);color:var(--c-text-2)}
.t-clear:hover{color:var(--c-text);background:var(--c-surface-3)}
.t-clear-wrap .input[type="search"]{padding-inline-end:44px}
.t-clear-wrap .input[type="search"]::-webkit-search-cancel-button{display:none}
.t-dissolve{position:absolute;pointer-events:none;white-space:pre;color:var(--c-text)}
.t-dissolve__word{display:inline-block;animation:t-dissolve var(--clear-out-dur) var(--clear-ease) both}
.t-dissolve__word:nth-child(2){animation-delay:30ms}.t-dissolve__word:nth-child(3){animation-delay:60ms}
@keyframes t-dissolve{to{transform:translateY(var(--clear-fly));opacity:0;filter:blur(var(--clear-blur));text-shadow:0 6px 12px var(--c-accent-ink)}}
.input.t-clearing{color:transparent}
@keyframes t-placeholder-in{from{opacity:0;transform:translateY(calc(var(--clear-fly) * -1))}}
.input.t-placeholder-in::placeholder{animation:t-placeholder-in var(--clear-in-dur) var(--clear-ease) both}
/* skeleton reveal: the content that replaced the grey outline comes in from a light blur */
@keyframes t-reveal{from{opacity:0;filter:blur(var(--reveal-blur))}}
/* backwards: the blur is gone once the reveal ends (a filter left on a box would hold its fixed children) */
.t-reveal{animation:t-reveal var(--reveal-dur) ease-in-out backwards}
/* texts reveal: a page's headline, its line and its buttons rise in with a staggered blur */
@keyframes t-stagger{from{opacity:0;transform:translateY(var(--stagger-distance));filter:blur(var(--stagger-blur))}}
:root[data-surface="app"] #app[data-enter="1"] :is(.page-head__title,.auth__title,.lp-hero__title,.state__title,.portal-child__name){animation:t-stagger var(--stagger-dur) var(--stagger-ease) both}
:root[data-surface="app"] #app[data-enter="1"] :is(.page-head__date,.lp-hero__sub,.state__text,.portal-child__meta){animation:t-stagger var(--stagger-dur) var(--stagger-ease) var(--stagger-step) both}
:root[data-surface="app"] #app[data-enter="1"] :is(.lp-hero__cta,.state__actions){animation:t-stagger var(--stagger-dur) var(--stagger-ease) calc(var(--stagger-step) * 2) both}
/* tooltip: in after a short delay, out at once */
.t-tt{position:fixed;z-index:80;max-width:240px;padding:6px 10px;border-radius:var(--r-sm);background:var(--c-text);color:var(--c-bg);font-size:var(--fs-xs);font-weight:var(--fw-medium);white-space:nowrap;pointer-events:none;opacity:0;transform:translate(-50%,-100%) scale(var(--tt-scale));transition:opacity var(--tt-out-dur) ease-out,transform var(--tt-out-dur) ease-out}
.t-tt.is-open{opacity:1;transform:translate(-50%,-100%);transition:opacity var(--tt-in-dur) ease-out,transform var(--tt-in-dur) ease-out}
/* dropdown menus (the filter menus): open from their corner at 0.97 */
@keyframes t-dropdown-in{from{opacity:0;transform:scale(var(--dropdown-pre-scale))}}
@media (min-width:960px){.filter-menu{transform-origin:top left;animation:t-dropdown-in var(--dropdown-open-dur) var(--dropdown-ease) both}}
/* accordion: native details grow and shrink where the browser can animate to auto; the chevron flips */
:root{interpolate-size:allow-keywords}
details::details-content{block-size:0;overflow:clip;transition:block-size var(--acc-dur) var(--acc-ease),content-visibility var(--acc-dur) allow-discrete}
details[open]::details-content{block-size:auto}
details > summary .icon{transition:transform var(--acc-dur) var(--acc-ease)}
details[open] > summary .icon{transform:scaleY(-1)}
/* checkbox check: a chosen filter chip fills, then its tick draws */
.chip[aria-pressed]{transition:background var(--check-box) var(--check-ease),border-color var(--check-box) var(--check-ease),color var(--check-box) var(--check-ease)}
.chip[aria-pressed]::before{content:"";display:inline-block;width:0;height:.55em;margin-inline-end:0;border-inline-start:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg) translateY(-2px);clip-path:inset(0 100% 0 0);transition:width var(--check-box) var(--check-ease),margin var(--check-box) var(--check-ease),clip-path var(--check-draw) var(--check-ease)}
.chip[aria-pressed="true"]::before{width:.8em;margin-inline-end:6px;clip-path:inset(0 0 0 0)}
/* toggle: the knob overshoots a little and settles; the track changes colour on its own clock */
.switch::after,.jh .switch-input + .switch::after{transition:transform var(--toggle-dur) var(--toggle-ease),width var(--dur-1) var(--ease-out)}
.switch{transition:background var(--check-box) var(--check-ease)}
@media (prefers-reduced-motion:reduce){
  .t-pill,.t-reel-strip,.t-tt,.chip[aria-pressed],.chip[aria-pressed]::before,.switch::after,details::details-content{transition:none!important}
  .t-digit,.t-dissolve__word,.t-shake,.t-reveal,.filter-menu{animation:none!important}
}

/* every panel page puts its title in the same place: the dashboard and the workout page are as wide as the others,
   and the scrollbar's room is kept on short pages too, so nothing shifts between pages */
html{scrollbar-gutter:stable}
.cockpit-page{max-width:none}
.narrow.narrow--full,.page-head:has(~ .narrow--full){max-width:none}

/* ---------- sessions: full day names; the session card read like a card; sets as boxes ---------- */
.day__name{font-size:var(--fs-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;padding-inline:2px}
/* (the 10px day names on narrow phones are gone: the days scroll instead, M3 pass 2026-11-15) */
.sd-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:var(--s-2)}
.sd-fact{display:grid;gap:2px;padding:var(--s-3);background:var(--c-surface-2);border-radius:var(--r-md)}
.sd-fact--wide{grid-column:1 / -1}
.sd-fact__k{font-size:var(--fs-xs);color:var(--c-text-2)}
.sd-fact__v{font-weight:var(--fw-bold)}
.sd-work{background:var(--c-bg);border:1px solid var(--c-border-strong)}
.plan-sets{display:grid;gap:var(--s-2);margin:0;padding:0;list-style:none}
.plan-set{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:baseline;gap:var(--s-1) var(--s-3);padding:var(--s-3) var(--s-4);border:1px solid var(--c-border-strong);border-radius:var(--r-md);background:var(--c-surface)}
.plan-set__phase{font-weight:var(--fw-black);color:var(--c-accent-ink);white-space:nowrap}
.plan-set__detail{font-weight:var(--fw-medium);line-height:1.7}
.plan-set__m{font-size:var(--fs-sm);color:var(--c-text-2);white-space:nowrap}
.plan-set__note{grid-column:2 / -1;font-size:var(--fs-sm);color:var(--c-text-2)}
.plan-edit{display:grid;gap:var(--s-3);margin:0;padding:var(--s-4);border:1px solid var(--c-border-strong);border-radius:var(--r-md);background:var(--c-surface)}
.plan-edit__title{display:flex;align-items:center;justify-content:space-between;width:100%;padding:0;font-weight:var(--fw-black)}
.plan-edit__row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s-2)}
@media (max-width:640px){.plan-edit__row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.choices--3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:520px){.choices--3{grid-template-columns:minmax(0,1fr)}}
/* the manual designer: each set its own bordered box */
.sets{gap:var(--s-2)}
.sets .set{padding:var(--s-3) var(--s-4);border:1px solid var(--c-border-strong);border-radius:var(--r-md);background:var(--c-surface-2)}
.sets .set.is-editing{border-color:var(--c-accent-ink)}
/* the panel outlines use the panel's own layout; these are only the grey pieces inside it */
.boot .app__main{padding-top:0}
.boot__head{display:grid;gap:var(--s-3)}
.boot .page-head .boot__heading{width:200px;height:44px;border-radius:var(--r-md)}
.boot__date{width:150px;height:16px}
.boot__narrow-head{width:100%;max-width:780px;margin-inline:auto}
.boot__nav{display:grid;gap:var(--s-2)}
.boot__nav--foot{margin-top:auto}
.boot__navitem{height:40px;border-radius:var(--r-md)}
.boot .sidebar .boot__who{padding:var(--s-2) 0}
.boot .sidebar .boot__date{width:110px}
.boot__tab{height:44px;border-radius:var(--r-md)}
.boot .tabbar{gap:var(--s-2);padding-inline:var(--s-3)}
.boot__h26{height:26px}.boot__h74{height:74px;border-radius:var(--r-md)}.boot__h76{height:76px}.boot__h90{height:90px}.boot__h92{height:92px}
.boot__h115{height:115px}.boot__h140{height:140px}.boot__h155{height:155px}.boot__h157{height:157px}.boot__h200{height:200px}
.boot__h218{height:218px}.boot__h220{height:220px}.boot__h260{height:260px}.boot__h299{height:299px}.boot__h300{height:300px}
.boot__h320{height:320px}.boot__h380{height:380px}.boot__h389{height:389px;border-radius:var(--r-lg)}.boot__h435{height:435px}
.boot .panel > .boot__line{width:180px;height:24px}
/* the outline's head is as tall as a real one: a 58px title line, then the 24px date line */
.boot .page-head .boot__heading{height:58px}
.boot .page-head:not(.page-head--row) .boot__date{height:18px}
.boot .student-tools .boot__search,.boot .with-aside__side .boot__search{height:52px}
.boot__h400{height:400px;border-radius:var(--r-lg)}
.boot__h34{width:180px;height:34px}
.boot__back{width:70px;height:44px;border-radius:var(--r-md)}
.boot .profile-head__who .boot__avatar{width:72px;height:72px}
.boot__name{width:181px;height:50px;border-radius:var(--r-md)}
.boot .profile-top .boot__tabs{width:556px;max-width:100%;height:53px}

/* ---------- session card: six equal facts; a set's name and metres on one line, its words under it, smaller ---------- */
.sd-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:520px){.sd-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.plan-set{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.plan-set__head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s-3)}
.plan-set__detail{font-size:var(--fs-sm);font-weight:var(--fw-regular,400);color:var(--c-text-2);line-height:1.7}
/* the workout page: the buttons under the designer and under the preview are centred and all have a border */
.narrow--full .actions{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--s-2)}
.narrow--full .actions .btn{border:1px solid var(--c-border-strong)}
.narrow--full .actions .btn--primary{border-color:var(--c-accent-ink)}
.sets ~ div:has(> [data-action="manual:add"]),.sets ~ div:has(> [data-action="manual:update"]){display:flex;justify-content:center;gap:var(--s-2)}
.link-bar{flex-wrap:wrap;align-items:center;justify-content:space-between}
.link-bar__actions{display:flex;align-items:center;gap:var(--s-3)}
.bank-item .amount{color:var(--c-text-2);font-size:var(--fs-sm)}
/* numbers in motion: each run of digits is one left-to-right piece in its place inside the right-to-left text */
.t-digit-group,.t-reel{display:inline}
.t-digits{display:inline-flex;align-items:baseline;direction:ltr;unicode-bidi:isolate}
.t-reel .t-digits{align-items:center;height:var(--reel-cell);vertical-align:bottom}
/* bank rows: no avatar, so the title takes the width and the edit / delete icons sit at the left edge */
.jh .bank-item{grid-template-columns:minmax(0,1fr) auto}
.jh .bank-item .list__end{grid-column:auto;flex-wrap:nowrap;justify-content:flex-end}
/* «ثبت هوشمند با متن»: the whole closed box is the button and lights up on hover */
#pay-smart{position:relative;transition:background-color var(--dur-1) var(--ease-out)}
#pay-smart > summary{cursor:pointer}
#pay-smart:not([open]) > summary::after{content:"";position:absolute;inset:0;border-radius:inherit}
@media (hover:hover){#pay-smart:not([open]):hover,#pay-smart[open] > summary:hover{background:var(--c-surface-2)}}
/* the sidebar name: a button to the account page */
.jh .who--link{width:100%;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer;border-radius:var(--r-md);padding-block:var(--s-2);transition:background-color var(--dur-1) var(--ease-out)}
.jh .who--link[aria-current="page"]{background:var(--c-surface-2)}
@media (hover:hover){.jh .who--link:hover{background:var(--c-surface-2)}}
.jh .who--link:focus-visible{outline:2px solid var(--c-accent-ink);outline-offset:2px}
/* the dashboard: each of today's sessions its own row with hover; a click opens its card */
.jh .today-sessions{display:grid;gap:var(--tap-gap)}
.jh .today-sessions .list__row--btn{min-block-size:var(--tap-pool);border-radius:var(--r-md);transition:background-color var(--dur-1) var(--ease-out)}
@media (hover:hover){.jh .today-sessions .list__row--btn:hover{background:var(--c-surface-2)}}
.jh .today-sessions .amount{color:var(--c-text-2);font-size:var(--fs-sm)}
/* biomech: the swimmers that match the search, right under it */
.jh .bio-suggest{margin-block:calc(var(--s-2) * -1) var(--s-4)}
.jh .bio-suggest .list__row--btn{border-radius:var(--r-md)}
@media (hover:hover){.jh .bio-suggest .list__row--btn:hover{background:var(--c-surface-2)}}
#bio-suggest-empty{margin-bottom:var(--s-4)}
/* the methodology archive in boxes */
.jh .vault-grid{display:grid;gap:var(--s-4);grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.jh .vault-card__top{display:flex;align-items:center;justify-content:space-between;gap:var(--s-2)}
.jh .vault-card__icon{font-size:1.75rem;line-height:1}

/* ---------- five UX laws (every page, the admin panel included since 2026-11-15) ----------
   Fitts: nothing tappable under 48 × 48 px (--tap; 56 at the pool, --tap-pool). Hick: rare actions behind one ⋯ menu. Jakob: the menu works like every
   other app's (opens under its button, Esc and a tap outside close it). Proximity: a heading sits closer to its own
   content than to the box before it. Von Restorff: one blue button per box; menu items are never blue. */
:root:not([data-laws="off"]) :is(.btn,.chip,.seg__btn,.tabs__btn,.tab,.nav-item,.choice,.link,.list__row--btn,summary){min-block-size:var(--tap)}
:root:not([data-laws="off"]) .btn--icon{min-inline-size:var(--tap);min-block-size:var(--tap)}
:root:not([data-laws="off"]) .t-clear{width:var(--tap);height:var(--tap);margin-top:calc(var(--tap) / -2);inset-inline-end:0}
:root:not([data-laws="off"]) .lp-hero__sound{width:var(--tap);height:var(--tap)}
:root:not([data-laws="off"]) button.avatar{width:var(--tap);height:var(--tap)}
:root:not([data-laws="off"]) .scroll-row__arrow{width:var(--tap);height:var(--tap);margin-top:calc(var(--tap) / -2)}
:root:not([data-laws="off"]) summary{display:flex;align-items:center}
:root:not([data-laws="off"]) details > summary.list__title{display:flex}
/* links inside a sentence: a taller hit area with no change to the line */
:root:not([data-laws="off"]) :is(.auth__consent,.legal,.prose,.page-body) a{padding-block:12px;margin-block:-12px}
:root:not([data-laws="off"]) .panel{gap:var(--s-3)}
/* the ⋯ menu */
.more-menu{position:relative;display:inline-flex}
.more-menu__btn .icon{width:20px;height:20px}
.menu-scrim{position:fixed;inset:0;z-index:40}
.more-menu__list{position:absolute;top:calc(100% + 6px);inset-inline-end:0;z-index:41;display:grid;min-width:220px;padding:6px;background:var(--c-surface);border:1px solid var(--c-border);border-radius:var(--r-md);box-shadow:0 12px 32px color-mix(in srgb,var(--color-shadow) 28%,transparent)}
.more-menu__item{display:flex;align-items:center;min-height:var(--tap);padding-inline:var(--s-3);border:0;border-radius:var(--r-sm);background:none;color:var(--c-text);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--dur-1) var(--ease-out)}
.more-menu__item.is-danger{color:var(--c-bad)}
.more-menu__item[disabled]{opacity:.45;cursor:not-allowed}
@media (hover:hover){.more-menu__item:not([disabled]):hover{background:var(--c-surface-2)}}
.more-menu__item:focus-visible{outline:2px solid var(--c-accent-ink);outline-offset:-2px}
.sheet__tools{display:flex;align-items:center;gap:var(--s-1)}
/* phone (under 960px): today's sessions each in a box of its own; the session card takes the whole screen above
   the bottom bar and scrolls to its last button */
@media (max-width:959.98px){
  .jh .today-sessions{gap:var(--s-2)}
  .jh .today-sessions .list__row--btn{padding:var(--s-3) var(--s-4);background:var(--c-surface-2);border:1px solid var(--c-border);border-radius:var(--r-lg)}
  .jh .today-sessions .list__row--btn + .list__row--btn{border-top:1px solid var(--c-border)}
  /* the card runs to the bottom of the screen; the bottom bar is drawn over its last strip, which is padding */
  :root:has(.sheet--full) .tabbar{z-index:52}
  .sheet--full{top:0;bottom:0;max-height:none;border-radius:0;border-top:0;padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s-6));overscroll-behavior:contain}
  .sheet--full .sheet__grab{display:none}
}
/* the dashboard's «هوش عملیاتی امروز»: a card with a page behind it is one button (the whole card) */
.jh .insight-link{width:100%;font:inherit;color:inherit;text-align:start;cursor:pointer;transition:background-color var(--dur-1) var(--ease-out),border-color var(--dur-1) var(--ease-out)}
@media (hover:hover){.jh .insight-link:hover{border-color:var(--c-border-hover)}}
.jh .insight-link:focus-visible{outline:2px solid var(--c-accent-ink);outline-offset:2px}
.jh .insight-link__more{display:inline-grid;place-items:center;flex:none;width:var(--tap);height:var(--tap);border-radius:var(--r-pill);border:1px solid var(--c-border-strong);background:var(--c-surface-2)}
@media (max-width:959.98px){
  .jh .insight-link{flex-wrap:nowrap;min-width:0}
  .jh .insight-link .alert__text{flex:1 1 0;min-width:0}
  .jh .cockpit__box > *{min-width:0}
  .jh .cockpit__box > .panel__head{flex-wrap:wrap;row-gap:var(--s-2)}
  /* phone: «تحلیل هوش مصنوعی» is the blue button, with the AI sparkle */
  .jh .cockpit-ai-btn{--btn-bg:var(--c-accent);--btn-fg:var(--c-on-accent);border-color:var(--c-accent-ink)}
  .jh .next__actions .btn{flex:1}
}
/* the swimmers list: the trash button is red; on a phone the row is one line (name on the right, edit and delete on the left) */
.jh .btn--trash{color:var(--c-bad)}
/* owner, 2026-11-20: the skill rows; the «ویژه» trash is quiet (muted) and set apart from the two state buttons */
.skill-add{justify-content:flex-end}
.skill-row__end{display:flex;align-items:center;gap:var(--s-4);flex:0 1 auto;margin-inline-start:auto}
.skill-row__end .seg{flex:0 1 auto}
.jh .skill-row__del{color:var(--c-text-2)}
@media (hover:hover){.jh .btn--trash:hover{--btn-bg:var(--c-bad-soft);color:var(--c-bad)}}
@media (max-width:599.98px){
  .jh .student-list .student-item:not(.bank-item){grid-template-columns:auto minmax(0,1fr) auto}
  .jh .student-list .student-item:not(.bank-item) .list__end{grid-column:auto;flex-wrap:nowrap;justify-content:flex-end;gap:0}
}
.record-chart--phone .chart{width:100%;height:auto}
/* transitions.dev «Menu dropdown»: the menu grows from its trigger (.is-open), and on close shrinks a little while it
   fades (.is-closing, removed after --dropdown-close-dur by app.js) */
:root{--dropdown-closing-scale:.99}
.t-dropdown{transform-origin:top left;transform:scale(var(--dropdown-pre-scale));opacity:0;pointer-events:none;visibility:hidden;transition:transform var(--dropdown-open-dur) var(--dropdown-ease),opacity var(--dropdown-open-dur) var(--dropdown-ease),visibility 0s linear var(--dropdown-open-dur);will-change:transform,opacity}
.t-dropdown[data-origin="top-right"]{transform-origin:top right}
.t-dropdown[data-origin="top-center"]{transform-origin:top center}
.t-dropdown[data-origin="bottom-left"]{transform-origin:bottom left}
.t-dropdown[data-origin="bottom-center"]{transform-origin:bottom center}
.t-dropdown[data-origin="bottom-right"]{transform-origin:bottom right}
.t-dropdown.is-open{transform:scale(1);opacity:1;pointer-events:auto;visibility:visible;transition:transform var(--dropdown-open-dur) var(--dropdown-ease),opacity var(--dropdown-open-dur) var(--dropdown-ease),visibility 0s}
.t-dropdown.is-closing{transform:scale(var(--dropdown-closing-scale));opacity:0;pointer-events:none;visibility:visible;transition:transform var(--dropdown-close-dur) var(--dropdown-ease),opacity var(--dropdown-close-dur) var(--dropdown-ease)}
@media (prefers-reduced-motion:reduce){.t-dropdown{transition:none!important}}
/* the swimmer file, biomech box: the AI report sits on the same colour as the «ریت دست» boxes, and the three labels
   read as clearly as their numbers */
.jh .bio-box .ai-box,html[data-theme] .jh .bio-box .ai-box{background:var(--c-bg);border:1px solid var(--c-border);color:var(--c-text)}
.jh .bio-box .metrics--rows dt{font-size:1.25rem;font-weight:var(--fw-medium,500);color:var(--c-text)}
/* «ثبت حضور جلسه‌های قبل»: the colours of the attendance pad; the chosen one is filled */
.jh .mark-btn{border:1px solid transparent}
.jh .mark-btn--present{--btn-bg:var(--c-ok-soft);border-color:var(--c-ok);color:var(--c-ok)}
.jh .mark-btn--late{--btn-bg:var(--c-warn-soft);border-color:var(--c-warn);color:var(--c-warn)}
.jh .mark-btn--absent{--btn-bg:var(--c-bad-soft);border-color:var(--c-bad);color:var(--c-bad)}
.jh .mark-btn--present[aria-pressed="true"]{--btn-bg:var(--c-ok);color:var(--c-on-ok)}
.jh .mark-btn--late[aria-pressed="true"]{--btn-bg:var(--c-warn-fill,var(--c-warn));color:var(--c-warn-ink,var(--c-on-accent))}
.jh .mark-btn--absent[aria-pressed="true"]{--btn-bg:var(--c-bad-fill,var(--c-bad));color:var(--c-on-bad)}
/* notes: a line between one note and the next */
#event-timeline .note + .note{border-top:1px solid var(--c-border);padding-top:var(--s-4);margin-top:var(--s-4)}
/* payments: long notes wrap inside the row instead of pushing it off the screen */
#ledger-section .list__row{flex-wrap:wrap;min-width:0}
#ledger-section .list__main{flex:1 1 12rem;min-width:0}
#ledger-section .list__main .list__meta,#ledger-section .list__title{overflow-wrap:anywhere}
#ledger-section .list__end{flex:none;flex-wrap:nowrap}
#ledger-section .card,#ledger-section .field,#ledger-section .input{min-width:0;max-width:100%}
.jh .row--center{justify-content:center}
/* the workout page: a preview set on two rows (its name and what to swim; then its metres and ×) */
.jh .sets .set--two{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s-2);align-items:stretch}
.jh .set--two .set__top{overflow-wrap:anywhere}
.jh .set--two .set__bottom{display:flex;align-items:center;justify-content:space-between;gap:var(--s-2)}
/* a manual set is one button that opens it for editing; × (delete) sits above it */
.jh .sets .set--link{position:relative;cursor:pointer;transition:background-color var(--dur-1) var(--ease-out),border-color var(--dur-1) var(--ease-out)}
.jh .set__open{flex:1;min-width:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer;overflow-wrap:anywhere}
.jh .set__open::after{content:"";position:absolute;inset:0;border-radius:inherit}
.jh .set--link .set__edit{position:relative;z-index:1}
.jh .set--link .set__edit .set__m{pointer-events:none}
@media (hover:hover){.jh .sets .set--link:hover{border-color:var(--c-border-hover)}}
.jh .set__open:focus-visible{outline:none}
.jh .set--link:has(.set__open:focus-visible){outline:2px solid var(--c-accent-ink);outline-offset:2px}
.jh .sets .set--link.is-editing{border-color:var(--c-accent-ink)}
/* «تأیید و انتشار» and its ⋯ on one row */
.narrow--full .actions .more-menu .btn{border:1px solid var(--c-border-strong)}
/* an AI button on a phone is the AI mark alone (its words are its aria-label); on a computer, the mark is hidden */
.icon--ai{width:20px;height:20px}
@media (max-width:959.98px){
  .jh .ai-icon-btn{min-width:var(--tap);padding-inline:var(--s-3)}
  .jh .ai-icon-btn:not([aria-busy="true"]){width:44px;padding:0}
  .jh .analysis-column > .row{flex-wrap:nowrap;align-items:center}
  .jh .analysis-column > .row .panel__title{margin:0}
}
/* attendance: «جلسه‌ی دیگر» and «همه حاضر» above the session box, at its left; the session's lines wrap inside it */
.jh .attn-tools{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:var(--s-2);margin-bottom:var(--s-3)}
.jh .attn-session__head{flex-wrap:nowrap;align-items:flex-start}
.jh .attn-session__name{min-width:0;flex:1}
.jh .attn-session__name > *{overflow-wrap:anywhere}
.jh .attn-session,.jh .attn > *{min-width:0}
/* a ⋯ menu whose items are choices: the chosen one carries a tick */
.more-menu__item{gap:var(--s-2)}
.more-menu__item .icon,.more-menu__tick{width:16px;height:16px;flex:none}
.jh .attn-session__name .list__title{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
/* biomech on a phone: a chart near its real size, the three figures as rows (label right, number left), and a test
   row shows only its day, its seconds and ⋯ */
.bio-chart--phone .chart{width:100%;height:auto}
.jh .bio-test{align-items:center}
.jh .bio-test__more{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;border-radius:var(--r-pill);border:1px solid var(--c-border-strong);background:var(--c-surface-2)}
@media (hover:hover){.jh .bio-test:hover{background:var(--c-surface-2)}}
@media (max-width:959.98px){
  .jh .bio-metrics{grid-template-columns:minmax(0,1fr);gap:var(--s-2)}
  .jh .bio-metrics .metric{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);min-height:56px}
  .jh .bio-metrics .metric dt{font-size:var(--fs-body);color:var(--c-text)}
  .jh .bio-metrics .metric dd{font-size:1.5rem;margin:0}
  .jh .bio-test .list__end{margin-inline-start:auto}
}
.jh .bio-test__facts .metric dd{font-size:var(--fs-body);font-weight:var(--fw-bold)}
/* ---------- the loader (owner's motion): a soft light running round a ring ---------- */
.loader{height:80px;aspect-ratio:1;box-sizing:border-box;position:relative;-webkit-mask:radial-gradient(transparent 47%,var(--color-text) 48% 71%,transparent 72%) exclude,conic-gradient(var(--color-text) 0 0) no-clip;mask:radial-gradient(transparent 47%,var(--color-text) 48% 71%,transparent 72%) exclude,conic-gradient(var(--color-text) 0 0) no-clip;animation:l11 1.5s linear infinite}
.loader::before{content:"";position:absolute;inset:0 35% 70%;border-radius:50%;background:var(--loader-color,var(--color-text));filter:blur(15px)}
@keyframes l11{to{rotate:1turn}}
.loader--sm{height:18px;--loader-color:currentColor}
.loader--sm::before{filter:blur(4px)}
@media (prefers-reduced-motion:reduce){.loader{animation-duration:4s}}
/* the landing's film: the loader on its poster until the film plays */
.lp-hero__media{position:relative}
.lp-hero__loader{position:absolute;inset:0;margin:auto;height:72px;pointer-events:none;transition:opacity var(--dur-2,200ms) ease-out}
.lp-hero__media.is-playing .lp-hero__loader{opacity:0;animation-play-state:paused}
/* «در حال ذخیره…» / «ذخیره شد»: a small line at the bottom, above the bottom bar on a phone */
.save-status{position:fixed;z-index:60;inset-inline-start:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 14px;border:1px solid var(--c-border);border-radius:999px;background:var(--c-surface);color:var(--c-text);font-size:var(--fs-sm);box-shadow:0 8px 24px color-mix(in srgb,var(--color-shadow) 25%,transparent);animation:save-in var(--dur-2,200ms) var(--ease-out,ease-out)}
.save-status[hidden]{display:none}
.save-status[data-state="saved"]{color:var(--c-ok)}
.save-status .icon{width:16px;height:16px}
@media (max-width:959.98px){.save-status{bottom:calc(var(--tabbar-h,68px) + 12px + env(safe-area-inset-bottom,0px))}}
@keyframes save-in{from{opacity:0;transform:translateY(6px)}}
@media (prefers-reduced-motion:reduce){.save-status{animation:none}}
/* the records under the chart: each one opens its edit window */
.jh .record-list{display:grid;gap:var(--s-2)}
.jh .record-list__title{font-size:var(--fs-sm);color:var(--c-text-2);font-weight:var(--fw-medium,500);margin:0}
.jh .record-row .list__end{gap:var(--s-2);color:var(--c-text-2)}
@media (hover:hover){.jh .record-row:hover{background:var(--c-surface-2)}}
.jh .btn--danger{--btn-bg:var(--c-bad);--btn-fg:var(--c-on-bad);border-color:var(--c-bad)}
/* the smart payment saved at once: what was saved, and «برگردان» */
.jh .alert--ok{background:var(--c-ok-soft);border-color:var(--c-ok);color:var(--c-text);flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s-2)}
.jh .alert--warn{background:var(--c-warn-soft);border-color:var(--c-warn);color:var(--c-text)}

/* ---------- هر مورد یک کارت (پنل مربی و ادمین، شب و روز) ----------
   Wherever a page lists items (a swimmer, a session, a payment, a workout, a note, an attendance row, a setting) each
   item is a grey box of its own (surface-2 with a border), with a gap between; the big box that used to hold the whole
   list with lines between its rows is gone. Sidebar, tab bar, tables (.dtable) and the key–value facts (.kv) stay as they were.
   The first rules are 0,3,0 like the older .jh rules above; this block comes last, so it wins. */
.panel-app .card--list{display:grid;gap:var(--s-2);padding:0;background:none;border:0;border-radius:0}
.panel-app .list{gap:var(--s-2)}
.panel-app .attn-list{display:grid;gap:var(--s-2)}
.panel-app .app__main :is(.list__row,.note,.roster__row,.attn-row,.card--list .nav-item,.card--list .switch-row){
  background:var(--c-surface-2);border:1px solid var(--c-border);border-radius:var(--r-lg);padding-inline:var(--s-4)}
.panel-app .app__main :is(.list__row,.note,.roster__row,.attn-row,.card--list .nav-item,.card--list .switch-row):last-child{border:1px solid var(--c-border)}
.panel-app .app__main .attn-row.is-current{background:var(--c-surface);border-color:var(--c-accent-ink)}
.panel-app .app__main .note{padding-block:var(--s-4)}
.panel-app #event-timeline .note + .note{margin-top:0;padding-top:var(--s-4)}
@media (hover:hover){
  .panel-app .app__main :is(.list__row--btn,.list__row--link,.note--link,.attn-row,.card--list .nav-item,label.switch-row):hover{background:var(--c-surface-3)}
}
/* the swimmer row: the tuition badge keeps its own width inside the box (the old fixed 96px column let it spill past the box's edge) */
.panel-app .app__main .student-item:not(.bank-item){grid-template-columns:auto minmax(0,1fr) auto}
.panel-app .app__main .student-item .list__end{width:auto;min-width:96px;justify-content:flex-end}
@media (hover:hover){.panel-app .app__main .student-item:hover{background:var(--c-surface-3)}}
/* the session cards of «حضور و غیاب» and «جلسات»: the same grey box as every other item */
.panel-app .app__main .sess-card{background:var(--c-surface-2)}
@media (hover:hover){.panel-app .app__main .sess-card:hover{background:var(--c-surface-3)}}
/* the profile card at the top of the settings page: grey like the boxes below it */
.panel-app .app__main #account{background:var(--c-surface-2)}
.panel-app .app__main #account .avatar{background:var(--c-surface-3)}
/* old light-palette boxes that still show inside the panels: the AI verdict box and the progress track take the tokens (night and day) */
.panel-app .jh .ai-box{background:var(--c-surface-2);border:1px solid var(--c-border);color:var(--c-text);border-radius:var(--r-lg)}
.panel-app .jh .ai-box-error{background:var(--c-bad-soft);border-color:var(--c-bad)}
.panel-app .jh .progress{background:var(--c-surface-3)}
/* the small number boxes (a swimmer's attendance rate, late, absent; the biomechanics rate, stroke gain, speed) are grey boxes like every item */
.panel-app .app__main .metric{background:var(--c-surface-2)}
/* the three boxes on a swimmer's attendance tab: rate green, late yellow, absent red (a tinted box and its number) */
.panel-app .app__main .metric--ok{background:var(--c-ok-soft);border-color:var(--c-ok)}
.panel-app .app__main .metric--ok dd{color:var(--c-ok)}
.panel-app .app__main .metric--warn{background:var(--c-warn-soft);border-color:var(--c-warn-fill,var(--c-warn))}
.panel-app .app__main .metric--warn dd{color:var(--c-warn)}
.panel-app .app__main .metric--bad{background:var(--c-bad-soft);border-color:var(--c-bad)}
.panel-app .app__main .metric--bad dd{color:var(--c-bad)}
/* a swimmer's «اولیا و تحلیل» tab: the parent's name and phone are grey boxes like every other item */
.panel-app .app__main #st-panel-parents dl{display:grid;gap:var(--s-2)}
.panel-app .app__main #st-panel-parents .kv{padding-inline:var(--s-4);background:var(--c-surface-2);border:1px solid var(--c-border);border-radius:var(--r-lg)}
.panel-app .app__main #st-panel-parents .kv:last-child{border:1px solid var(--c-border)}
/* the parents' portal link: a grey box with readable text (the old dark-navy box showed pale text on white in day mode) */
.panel-app .jh .code-box{padding:var(--s-3) var(--s-4);background:var(--c-surface-2);border:1px solid var(--c-border);border-radius:var(--r-lg);color:var(--c-text-2)}
/* the three cards of «اولیا و تحلیل» (parent, portal, analyses) are grey; the boxes inside them take the card colour (white by day) so they still stand out */
.panel-app .app__main #st-panel-parents section.card{background:var(--c-surface-2)}
.panel-app .app__main #st-panel-parents section.card :is(.kv,.code-box){background:var(--c-surface)}

/* ---------- Material 3 pass: home (owner, 2026-11-15) ----------
   Poolside actions are 56px (--tap-pool): today's session rows and «حضور و غیاب». The boxes pad 16 on phones and 24 on
   wide windows (4/8 steps only). One filled button per page: «همه در مالی» is outlined. */
.jh .next__actions .btn--primary{min-block-size:var(--tap-pool)}
.jh .next__actions{gap:var(--tap-gap)}
@media (min-width:960px){.cockpit__box{padding:var(--sp-24)}}

/* ---------- Material 3 pass: attendance (owner, 2026-11-15) ----------
   At the pool: «جلسه‌ی دیگر» and «همه حاضر» 56px, 8px apart; session cards and swimmer rows are already taller.
   The done state is a quiet confirmation, not a second filled button. */
.jh .attn-tools .btn{min-block-size:var(--tap-pool)}
.jh .attn-tools{gap:var(--tap-gap);margin-bottom:var(--sp-16)}
.jh .sess-card{min-block-size:var(--tap-pool)}
/* page titles never break (M3 headline): on a narrow phone the date and the buttons beside it wrap instead */
.jh .page-head__title{white-space:nowrap}
.jh .page-head--row .page-head__actions{flex:0 1 auto;min-width:0;flex-wrap:wrap;justify-content:flex-end}
.jh .page-head--row .page-head__date{text-align:end}
/* the coach's notes: a clear box with a chevron that flips when it opens (accordion recipe), so it reads as tappable;
   «پاک کردن حضور این جلسه»: an outlined red button, so it reads as a button and as destructive */
.jh .attn-notes{border:1px solid var(--c-outline);border-radius:var(--r-lg)}
.jh .attn-notes__summary{justify-content:space-between;gap:var(--sp-8);min-block-size:var(--tap)}
.jh .attn-notes__chev{flex:none;color:var(--c-text-2)}
.jh .attn-clear{border:1px solid var(--c-bad)}

/* ---------- Material 3 pass: finance (owner, 2026-11-15) ----------
   Fold-out boxes read as tappable: an outline and a chevron (same as the coach's notes). «تسویه» has its word beside
   the tick; the avatar of a ledger row is desktop-only so the row fits a phone. One filled action per page: «افزودن
   پرداخت» (the FAB on phones); the smart-entry button is outlined. The payment dialog's submit is 56px (at the pool). */
.jh .disclosure-box{border:1px solid var(--c-outline);border-radius:var(--r-lg)}
.jh .disclosure__summary{justify-content:space-between;gap:var(--sp-8);min-block-size:var(--tap)}
.jh .disclosure__chev{flex:none;color:var(--c-text-2)}
.jh .fin-settle{flex:none;gap:var(--sp-4)}
.jh #fin-submit{min-block-size:var(--tap-pool)}
/* the summary numbers sit in grey boxes like the rest of the page (a number never floats on the background) */
.jh .summary > .card{background:var(--c-surface-2);border:1px solid var(--c-border-strong);border-radius:var(--r-lg)}
/* the payment form's error is a small alert dialog above the form (one line and «فهمیدم») */
.alert-layer .scrim{z-index:52}
.alert-layer .modal{z-index:53}

/* ---------- Material 3 pass: sessions (owner, 2026-11-15) ----------
   On phones the week scrolls sideways (each day 64px with its full name at 14px, the chosen day in view, the shared
   scroll arrows) instead of squeezing seven days into 10px names. «بدون ساعت» is a quiet label, not a big time. */
.jh .sess-card__time--none{font-size:var(--fs-sm);font-weight:var(--fw-bold);color:var(--c-text-2)}
.jh .sess-card{gap:var(--sp-16)}
@media (max-width:959px){
  .jh .days{display:flex;gap:var(--tap-gap);overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none;padding-bottom:var(--sp-4)}
  .jh .days::-webkit-scrollbar{display:none}
  .jh .day{flex:0 0 64px;scroll-snap-align:center}
  .jh .day__name{font-size:var(--fs-xs);overflow:visible;text-overflow:clip;max-width:none}
}

/* ---------- Material 3 pass: swimmers (owner, 2026-11-15) ----------
   Edit and delete are 48px each with 8px between them (they touched before); search, filter and add keep 8px. */
.panel-app .app__main .student-item .list__end,.jh .student-list .student-item:not(.bank-item) .list__end{gap:var(--tap-gap);min-width:calc(var(--tap) * 2 + var(--tap-gap))}
.student-tools{gap:var(--tap-gap)}

/* ---------- Material 3 pass: swimmer file (owner, 2026-11-15) ----------
   The analysis text of biomechanics is a labelled, outlined box: a new coach sees what it is («خلاصه‌ی آزمون‌ها» from the
   tests, «تحلیل هوش مصنوعی» after the AI button). */
html[data-theme] .panel-app .jh .ai-box,.panel-app .jh .ai-box{border:1px solid var(--c-outline);padding:var(--sp-16)}
.jh .ai-box__label{margin:0 0 var(--sp-8);font-size:var(--fs-xs);font-weight:var(--fw-bold);color:var(--c-text-2)}
/* filters: select fields in the menu (two side by side on wide windows), and the filters in use as removable input chips
   (M3 input chip: outlined, 32px look with a 48px hit area, the × at its end) */
.jh .filter-menu__groups--fields{display:grid;gap:var(--sp-16)}
@media (min-width:960px){.jh .filter-menu__groups--fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
.jh .filter-chips{display:flex;flex-wrap:wrap;gap:var(--tap-gap);margin:0 0 var(--sp-16)}
.jh .input-chip{display:inline-flex;align-items:center;gap:var(--sp-8);min-block-size:var(--tap);padding-inline:var(--sp-16) var(--sp-12);border:1px solid var(--c-outline);border-radius:var(--r-pill);background:transparent;color:var(--c-text);font-size:var(--fs-sm);font-weight:var(--fw-medium);cursor:pointer;transition:background-color var(--dur-1) var(--ease-out)}
.jh .input-chip .icon{color:var(--c-text-2)}
@media (hover:hover){.jh .input-chip:hover{background:var(--c-surface-2)}}
.jh .input-chip:active{transform:scale(.97)}
/* (the page, tab-panel, session body and portal panel entrances end with "backwards", not "both": a transform left on
   them made fixed windows inside them sit in the panel, e.g. «افزودن رکورد» below the fold) */

/* ---------- Material 3 pass: workout writer (owner, 2026-11-15) ----------
   A removed set (or «پاک کردن همه») can be taken back from the snackbar: «برگردان», a 48px text button. */
.toast__action{flex:none;min-block-size:var(--tap);margin-inline-start:var(--sp-8);padding-inline:var(--sp-12);border:0;border-radius:var(--r-pill);background:none;color:var(--c-accent-ink);font:inherit;font-weight:var(--fw-bold);cursor:pointer}
@media (hover:hover){.toast__action:hover{background:var(--c-accent-soft)}}
.toast:has(.toast__action){pointer-events:auto}


/* M3 step 10, methodology archive: each module is one outlined card that is itself the button (a stretched
   link flickered: the button lifts on hover and its overlay shrank back to it); each lesson is its own grey box */
.jh .vault-card{display:flex;flex-direction:column;align-items:stretch;gap:var(--sp-8);inline-size:100%;text-align:start;font:inherit;color:inherit;cursor:pointer;border:1px solid var(--c-outline);transition:border-color var(--dur-2) var(--ease-out),background-color var(--dur-2) var(--ease-out),transform var(--dur-1) var(--ease-out)}
.jh .vault-card__title{display:block}
.jh .vault-card__more{display:inline-flex;align-items:center;gap:var(--sp-4);margin-top:auto;min-block-size:var(--tap);font-weight:var(--fw-bold);color:var(--c-accent-ink)}
@media (hover:hover){.jh .vault-card:hover{border-color:var(--c-accent-ink);background:var(--c-surface-2)}}
.jh .vault-card:active{transform:scale(.97);transition-duration:0ms}
.jh .vault-card:focus-visible{outline:2px solid var(--c-accent-ink);outline-offset:2px}
.vault-lessons{display:grid;gap:var(--tap-gap);margin:0;padding:0;list-style:none}
.vault-lessons li{min-block-size:var(--tap);display:flex;align-items:center;padding:var(--sp-12) var(--sp-16);border-radius:var(--r-md);background:var(--c-surface-2)}

/* M3 step 11, settings: a row that opens another page ends with a chevron; an off switch has an outline (M3), so it reads as a control on the grey row */
.jh .row-chev{display:inline-flex;margin-inline-start:auto;color:var(--c-text-2)}
.jh .nav-item .badge + .row-chev{margin-inline-start:var(--sp-8)}
.jh .nav-item:has(.badge) .badge{margin-inline-start:auto}
.jh .switch-input:not(:checked) + .switch{box-shadow:inset 0 0 0 2px var(--c-outline)}

/* M3, the «بیشتر» popup: each destination is a grey box with a chevron (like the old «بخش‌ها» box); logout is red with a red outline */
#more-sheet .nav{display:grid;gap:var(--tap-gap)}
.jh .sheet-row{min-block-size:56px;padding-inline:var(--sp-16);border-radius:var(--r-md);background:var(--c-surface-2);color:var(--c-text)}
@media (hover:hover){.jh .sheet-row:hover{background:var(--c-surface-3)}}
.jh .sheet-row.is-active{color:var(--c-accent-ink);font-weight:var(--fw-bold)}
.jh .nav-item--danger,.jh .nav-item--danger:hover{color:var(--c-bad);border:1px solid var(--c-bad);background:transparent}
.jh .nav-item--danger .icon{color:var(--c-bad)}

/* M3 step 14, parent portal: the calendar month arrows are 48px wide (were 41) */
.btn:has(> .portal-arrow){min-inline-size:var(--tap);justify-content:center}

/* the panel tour (views-coach.js Tour): a still scrim with a hole of light on the real control, and a small card.
   Between steps nothing slides around: the light and the card fade out (ease-in, short), the page changes under the
   plain scrim, and they fade in once on the settled control (ease-out); the card rises in from 0.95 (rule 10). While
   shown they follow scrolling frame by frame, without easing. */
.tour{position:fixed;inset:0;z-index:90;background:transparent;transition:background-color var(--dur-pop-out,160ms) var(--ease-in)}
.tour.is-moving{background:var(--c-scrim)}
.tour__spot{position:fixed;top:0;left:0;border-radius:var(--r-md);box-shadow:0 0 0 9999px var(--c-scrim),0 0 0 3px var(--c-accent),0 0 24px color-mix(in srgb,var(--color-primary) 55%,transparent);pointer-events:none;transition:opacity var(--dur-pop,200ms) var(--ease-out)}
.tour.is-moving .tour__spot,.tour.is-moving .tour__bubble{opacity:0;transition:opacity var(--dur-pop-out,160ms) var(--ease-in)}
.tour__bubble{position:fixed;top:0;left:0;width:min(340px,calc(100vw - 32px));display:grid;gap:var(--sp-8);padding:var(--sp-16);border-radius:var(--r-lg);background:var(--c-surface);border:1px solid var(--c-outline);box-shadow:var(--shadow-3,0 12px 32px color-mix(in srgb,var(--color-shadow) 35%,transparent));color:var(--c-text);transition:opacity var(--dur-pop,200ms) var(--ease-out)}
.tour__bubble.is-in{animation:tour-in var(--dur-pop,200ms) var(--ease-out) backwards}
.tour__count{font-size:var(--fs-xs);color:var(--c-text-2)}
.tour__title{font-size:var(--fs-h3);font-weight:var(--fw-bold)}
.tour__text{line-height:1.7}
.tour__actions{display:flex;justify-content:space-between;gap:var(--tap-gap);margin-top:var(--sp-8)}
@keyframes tour-in{from{opacity:0;scale:.95}}
@media (prefers-reduced-motion:reduce){.tour,.tour__spot,.tour__bubble,.tour.is-moving .tour__spot,.tour.is-moving .tour__bubble{transition:none}.tour__bubble.is-in{animation:none}}

/* Apple Navy, night (owner, 2026-11-15): white on #0A84FF is 3.65:1 and on #FF453A 3.41:1, enough only for large text.
   So at night every label on a filled primary or error is at least 17px and bold; a small label that cannot grow
   (a badge, a calendar day, the selection) keeps the tint and takes the normal text instead. */
html:not([data-day="on"]) :is(.btn--primary,.btn--danger,.cockpit-ai-btn,.lp-btn,.mark-btn--absent[aria-pressed="true"]):is(.btn--sm,.lp-btn--sm){font-size:var(--fs-body)}
html:not([data-day="on"]) :is(.btn--primary,.btn--danger,.cockpit-ai-btn,.lp-btn,.lp-pr-card__cta,.lp-pr-link,.skip-link,.mark-btn--absent[aria-pressed="true"]){font-weight:var(--fw-bold)}
html:not([data-day="on"]) .lp-pr-card__badge{background:var(--c-surface);border:1px solid var(--c-accent);color:var(--c-text)}
html:not([data-day="on"]) :is(.day.is-active,.day.is-active:hover){background:var(--c-accent-soft);box-shadow:inset 0 0 0 1px var(--c-accent)}
html:not([data-day="on"]) .day.is-active :is(.day__num,.day__name){color:var(--c-text)}
html:not([data-day="on"]) .day.is-active .day__dot{background:var(--c-accent)}
html:not([data-day="on"]) ::selection{background:var(--c-accent-soft);color:var(--c-text)}

/* Card glow (owner, 2026-11-20): every card has a soft pool of light (--color-glow-soft, half of --color-glow) at its
   top; only the image is set, so each card keeps its own colour. The five key places keep the full --color-glow: the
   hero, «جلسه‌های امروز», the landing's closing section, the checkout and the parents' «جلسه بعدی» (their own rules). */
:is(.card:not(.card--list,.next,.cockpit__box--today),.cockpit__box:not(.cockpit__box--today),.lp-pr-card,.lp-sub,.lp-problem,.lp-quote,.sess-card){background-image:radial-gradient(120% 90% at 50% 0,var(--color-glow-soft),transparent 75%)}
.cockpit__box .card{background-image:none}

/* open from the source (motion.js): a card and the page it opens share one box while the page changes */
::view-transition-group(jc-source){animation-duration:var(--dur-3);animation-timing-function:var(--ease-out)}
::view-transition-old(jc-source),::view-transition-new(jc-source){height:100%;object-fit:cover;object-position:top}
/* the copy of a closing window, shrinking into its control */
.motion-ghost{position:fixed;inset:0;z-index:1000;pointer-events:none}

/* ---------- Our own fields (owner, 2026-11-20, Part D) ----------
   Every field: 48px (the touch rule), the design system's radius, the label above (.field__label), an optional helper
   (.field__hint), an error state in --color-error (aria-invalid or .field--error) and a focus ring in --color-primary.
   No browser look is left: number fields have no spinners, checkboxes and radios are drawn here, selects are the
   «button to bubble» (ui-fields.js), time fields are those selects too. */
.input{min-height:var(--tap);border-radius:var(--r-md);background:var(--color-bg);border:1px solid var(--color-outline);color:var(--color-text);transition:border-color var(--dur-1) ease,box-shadow var(--dur-1) ease}
.input::placeholder{color:var(--color-text-muted)}
.input:focus,.input:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:var(--shadow-focus)}
.input[aria-invalid="true"],.field--error .input{border-color:var(--color-error)}
.input[aria-invalid="true"]:focus,.field--error .input:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--color-error) 35%,transparent)}
.field__error{color:var(--color-error)}
.field__error:empty{display:none}
.input:disabled{opacity:.55;cursor:not-allowed}
input[type="number"].input{-moz-appearance:textfield;appearance:textfield}
input[type="number"].input::-webkit-inner-spin-button,input[type="number"].input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
input[type="checkbox"]:not(.switch-input),input[type="radio"]{-webkit-appearance:none;appearance:none;flex:none;display:inline-grid;place-content:center;box-sizing:border-box;width:24px;height:24px;min-height:0;padding:0;margin:0;border:2px solid var(--color-outline);border-radius:6px;background:var(--color-bg);cursor:pointer;transition:background-color var(--dur-1) ease,border-color var(--dur-1) ease}
input[type="radio"]{border-radius:50%}
input[type="checkbox"]:not(.switch-input)::before{content:"";width:14px;height:14px;background:var(--color-on-primary);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.25 12.7 9.4 17.37 18.75 6.87'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.25 12.7 9.4 17.37 18.75 6.87'/%3E%3C/svg%3E") center/contain no-repeat;transform:scale(0);transition:transform var(--dur-1) var(--ease-out)}
input[type="radio"]::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--color-on-primary);transform:scale(0);transition:transform var(--dur-1) var(--ease-out)}
input[type="checkbox"]:not(.switch-input):checked,input[type="radio"]:checked{background:var(--color-primary);border-color:var(--color-primary)}
input[type="checkbox"]:not(.switch-input):checked::before,input[type="radio"]:checked::before{transform:scale(1)}
input[type="checkbox"]:not(.switch-input):focus-visible,input[type="radio"]:focus-visible{outline:none;box-shadow:var(--shadow-focus)}
input[type="checkbox"]:not(.switch-input):disabled,input[type="radio"]:disabled{opacity:.5;cursor:not-allowed}

/* «button to bubble» select (ui-fields.js). Motion as the component has it; --stage-* -> palette tokens:
   bg/surface -> --color-surface-container, fg -> --color-text, muted -> --color-text-muted, border -> --color-outline,
   accent -> --color-primary (the focus ring), the field itself looks like every other field. */
:root{--morph-open-dur:400ms;--morph-close-dur:400ms;--morph-ease:cubic-bezier(0.22,1,0.36,1);--morph-content-delay:120ms;--morph-fade-dur:150ms;--morph-blur:2px;--tabs-dur:250ms;--tabs-ease:cubic-bezier(0.22,1,0.36,1);--press-scale:0.97;--press-dur:150ms;--fsel-chip:color-mix(in srgb,var(--color-text) 6%,transparent);--fsel-chip-hover:color-mix(in srgb,var(--color-text) 9%,transparent)}
.fsel{position:relative}
.fsel__native{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;opacity:0!important;pointer-events:none!important}
.fsel + .icon,.fsel ~ .icon{display:none!important}
.fsel__field{display:flex;align-items:center;justify-content:space-between;gap:var(--s-2);width:100%;min-height:var(--tap);padding:0 var(--s-4);border:1px solid var(--color-outline);border-radius:var(--r-md);background:var(--color-bg);color:var(--color-text);font:inherit;font-size:var(--fs-body);text-align:start;cursor:pointer;transition:border-color var(--dur-1) ease,box-shadow var(--dur-1) ease,transform var(--press-dur) var(--morph-ease)}
.fsel__field:active{transform:scale(var(--press-scale))}
.fsel__field:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:var(--shadow-focus)}
.fsel__field:disabled{opacity:.55;cursor:not-allowed}
.fsel__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fsel__chev{flex:none;width:18px;height:18px;fill:none;stroke:var(--color-text-muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fsel.is-open .fsel__field{visibility:hidden}
.field--error .fsel__field,.fsel__native[aria-invalid="true"] ~ .fsel__field{border-color:var(--color-error)}
.fsel-layer{position:fixed;inset:0;z-index:1200;pointer-events:none}
.fsel-morph{position:fixed;pointer-events:auto;overflow:hidden;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-outline);border-radius:var(--r-md);box-shadow:0 1px 2px 0 color-mix(in srgb,var(--color-shadow) 20%,transparent);transition:left var(--morph-close-dur) var(--morph-ease),top var(--morph-close-dur) var(--morph-ease),width var(--morph-close-dur) var(--morph-ease),height var(--morph-close-dur) var(--morph-ease),border-radius var(--morph-close-dur) var(--morph-ease),background-color var(--morph-close-dur) var(--morph-ease),box-shadow var(--morph-close-dur) var(--morph-ease)}
.fsel-morph[data-open="true"]{border-radius:16px;background:var(--color-surface-container);box-shadow:0 4px 42px color-mix(in srgb,var(--color-shadow) 12%,transparent),0 2px 6px color-mix(in srgb,var(--color-shadow) 10%,transparent),0 0 0 1px var(--color-outline);transition-duration:var(--morph-open-dur)}
.fsel-morph__face{position:absolute;inset:0;display:flex;align-items:center;padding:0 var(--s-4);font-size:var(--fs-body);white-space:nowrap;overflow:hidden;transition:opacity var(--morph-fade-dur) ease-in-out,filter var(--morph-fade-dur) ease-in-out;transition-delay:var(--morph-content-delay)}
.fsel-morph[data-open="true"] .fsel-morph__face{opacity:0;filter:blur(var(--morph-blur));transition-delay:0ms}
.fsel-bubble{box-sizing:border-box;position:absolute;inset:0;padding:16px;display:flex;flex-direction:column;gap:4px;opacity:0;filter:blur(var(--morph-blur));pointer-events:none;transition:opacity var(--morph-fade-dur) ease-in-out,filter var(--morph-fade-dur) ease-in-out}
.fsel-morph[data-open="true"] .fsel-bubble{opacity:1;filter:blur(0);pointer-events:auto;transition-delay:var(--morph-content-delay)}
.fsel-bubble__head{display:flex;align-items:center;justify-content:space-between;min-height:24px;flex:none}
.fsel-bubble__title{font-size:var(--fs-sm);line-height:20px;font-weight:var(--fw-medium);color:var(--color-text-muted)}
.fsel-bubble__close{display:grid;place-items:center;width:32px;height:32px;margin-inline-end:-6px;border:0;border-radius:50%;background:none;color:var(--color-text-muted);cursor:pointer;transition:background-color 120ms ease,transform var(--press-dur) var(--morph-ease)}
.fsel-bubble__close:active{transform:scale(0.95)}
.fsel-bubble__opts{position:relative;display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.fsel-bubble__hl{position:absolute;top:0;inset-inline:0;height:44px;border-radius:8px;background:var(--fsel-chip);transform:translateY(0);transition:transform var(--tabs-dur) var(--tabs-ease);pointer-events:none}
.fsel-bubble__opt{position:relative;flex:none;height:44px;padding:0 8px;border:0;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:var(--s-2);background:none;color:inherit;font:inherit;font-size:var(--fs-body);text-align:start;cursor:pointer;transition:background-color 120ms ease,transform var(--press-dur) var(--morph-ease)}
.fsel-bubble__opt:active{transform:scale(0.99)}
.fsel-bubble__opt:disabled{opacity:.45;cursor:not-allowed}
.fsel-bubble__chk{display:grid;flex:none;color:var(--color-primary);opacity:0;transform:scale(.25);filter:blur(var(--morph-blur));transition:opacity var(--tabs-dur) ease-in-out,transform var(--tabs-dur) ease-in-out,filter var(--tabs-dur) ease-in-out}
.fsel-bubble__opt[aria-checked="true"] .fsel-bubble__chk{opacity:1;transform:scale(1);filter:blur(0)}
@media (hover:hover){.fsel-bubble__opt:hover{background:var(--fsel-chip)}.fsel-bubble__close:hover{background:var(--fsel-chip-hover)}.fsel__field:hover{border-color:var(--color-outline-hover)}}
.fsel-morph :focus-visible{outline:none;box-shadow:0 0 0 2px var(--color-surface-container),0 0 0 4px var(--color-primary)}
@media (prefers-reduced-motion:reduce){.fsel-morph,.fsel-morph__face,.fsel-bubble,.fsel-bubble__close,.fsel-bubble__hl,.fsel-bubble__chk,.fsel-bubble__opt,.fsel__field{transition-duration:1ms!important;transition-delay:0ms!important}.fsel-bubble__opt:active,.fsel-bubble__close:active,.fsel__field:active{transform:none}}

.field[hidden]{display:none}

/* «شروع کار» (Part E): the card on home and the lit fields of an open step */
.start-path__list{display:grid;gap:var(--s-2);margin:0;padding:0;list-style:none}
.start-step{display:flex;align-items:center;gap:var(--s-3);min-height:var(--tap);padding:var(--s-2) 0}
.start-step__mark{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--color-outline);color:var(--color-text-muted);font-weight:var(--fw-bold)}
.start-step__text{flex:1;min-width:0;display:grid;gap:2px}
.start-step.is-next .start-step__mark{border-color:var(--color-primary);color:var(--color-primary)}
.start-step.is-done .start-step__mark{background:var(--color-success);border-color:var(--color-success);color:var(--color-on-primary)}
.start-step.is-done .start-step__mark .icon{stroke:currentColor}
.start-step.is-skipped .list__title{color:var(--color-text-muted);text-decoration:line-through}
.start-path__actions{flex-wrap:wrap;gap:var(--s-3)}
.is-guided{border-radius:var(--r-md);box-shadow:0 0 0 2px var(--color-surface),0 0 0 4px color-mix(in srgb,var(--color-primary) 55%,transparent)}
.guide-hint{margin:var(--s-2) 0 0;font-size:var(--fs-xs);line-height:1.8;color:var(--color-primary)}
.start-step .list__title{white-space:normal;overflow:visible;text-overflow:clip}

/* ---------- The success check (owner, 2026-11-20, Part C; ui.js successCheck) ----------
   The circle: 0.6 -> 1 with the price digits' spring (--digit-ease) and a 2px blur-in, 360ms; the tick draws itself
   (stroke-dashoffset) from 200ms, 320ms: about 520ms in all. Colours: --color-success, the tick in --color-bg.
   Reduced motion: no scale, no draw, it is simply there (the end state is the resting state). */
.ok-check{display:inline-grid;flex:none;width:22px;height:22px;--ok-ease:cubic-bezier(.34,1.45,.64,1)}
.ok-check--lg{width:44px;height:44px}
.ok-check--xl{width:72px;height:72px}
.ok-check svg{width:100%;height:100%;overflow:visible}
.ok-check__ring{fill:var(--color-success);transform-box:fill-box;transform-origin:center;animation:ok-ring 360ms var(--ok-ease) both}
.ok-check__mark{fill:none;stroke:var(--color-bg);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:0;animation:ok-draw 320ms var(--ease-out) 200ms both}
.ok-check{animation:ok-blur 200ms ease-out both}
@keyframes ok-ring{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes ok-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes ok-blur{from{filter:blur(2px)}to{filter:blur(0)}}
@media (prefers-reduced-motion:reduce){.ok-check,.ok-check__ring,.ok-check__mark{animation:none!important}}
.co-mark--check{background:none}
.co-mark--check .ok-check{width:72px;height:72px}

/* the welcome after a correct code (auth-otp.js welcome): the large success check in the middle, one line under it */
.auth-welcome{display:grid;justify-items:center;gap:var(--s-4);padding:var(--s-7) 0;text-align:center}
.auth-welcome__text{margin:0;font-size:var(--fs-h3,1.25rem);font-weight:var(--fw-bold);color:var(--color-text);animation:fade-in 240ms var(--ease-out) 260ms both}
.auth-welcome--calm .auth-welcome__text{animation:none}

/* «اولیا و تحلیل» (owner, 2026-11-20): every button's label centered, the action rows centered, one height (the touch
   size) for every action button; the icon menus of the card heads stay where they are */
#st-panel-parents .btn{justify-content:center;text-align:center}
#st-panel-parents .btn:not(.btn--icon):not(.ai-icon-btn){min-height:var(--tap)}
#st-panel-parents #portal-link-box .row,#st-panel-parents .row--center{justify-content:center}
#st-panel-parents #portal-link-box .field__label,#st-panel-parents #portal-link-box > p{text-align:center}

/* ---------- «حضور و غیاب»: the week (transitions.dev «Calendar Day Card», ported; owner, 2026-11-20) ----------
   Motion as the component has it: pill 250ms cubic-bezier(0.22,1,0.36,1); the day's sessions slide 8px and unblur
   3px in 250ms; the header's text cross-blurs 2px in 200ms (its width 240ms); attendees lift 4px, 1.05x, 320ms (back
   with the bouncy ease); a tab presses to 0.95 in 150ms. --stage-*: fg -> --color-text, muted -> --color-text-muted,
   surface -> --color-surface (the card), the track -> --color-text at 4%/6%, accent -> --color-primary. No rgba/#hex.
   Seven days fit a phone: the strip spans the card from edge to edge, each day at least 48px wide. */
:root{--cal-tabs-dur:250ms;--cal-tabs-ease:cubic-bezier(0.22,1,0.36,1);--page-slide-dur:250ms;--page-fade-dur:250ms;--page-slide-distance:8px;--page-blur:3px;--page-stagger:0ms;--page-exit-enabled:1;--page-slide-ease:cubic-bezier(0.22,1,0.36,1);--page-fade-ease:cubic-bezier(0.22,1,0.36,1);--text-soft-dur:200ms;--text-soft-blur:2px;--text-soft-ease:ease-in-out;--text-soft-resize-dur:240ms;--text-soft-resize-ease:cubic-bezier(0.22,1,0.36,1);--avatar-lift:-4px;--avatar-dur:320ms;--avatar-scale:1.05;--avatar-falloff:0.45;--avatar-ease-in:cubic-bezier(0.22,1,0.36,1);--avatar-ease-out:cubic-bezier(0.34,3.85,0.64,1);--cal-track:color-mix(in srgb,var(--color-text) 5%,transparent);--cal-hover:color-mix(in srgb,var(--color-text) 6%,transparent);--cal-pill:var(--color-surface-container);--cal-pill-shadow:0 0 0 1px var(--color-outline),0 2px 6px color-mix(in srgb,var(--color-shadow) 10%,transparent);--mtg-tint:12%}
.cal{display:flex;flex-direction:column;gap:var(--s-4)}
.cal :is(h2,p,ul){margin:0;padding:0}
.cal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s-3)}
.cal-head__text{display:flex;flex-direction:column;gap:4px;min-width:0}
.cal-lead{font-size:28px;line-height:34px;font-weight:var(--fw-bold)}
.cal-meta{font-size:var(--fs-sm);line-height:20px;color:var(--color-text-muted);display:flex;white-space:pre}
.cal-num{font-variant-numeric:tabular-nums}
.cal-nav{display:flex;gap:var(--s-1,4px);flex:none}
.t-text-soft{display:inline-grid;justify-items:start;transition:width var(--text-soft-resize-dur) var(--text-soft-resize-ease)}
.t-text-soft>span{grid-area:1/1;white-space:pre;transition:filter var(--text-soft-dur) var(--text-soft-ease),opacity var(--text-soft-dur) var(--text-soft-ease)}
.t-text-soft-new{opacity:0;filter:blur(var(--text-soft-blur))}
.t-text-soft.is-swapping .t-text-soft-old{opacity:0;filter:blur(var(--text-soft-blur))}
.t-text-soft.is-swapping .t-text-soft-new{opacity:1;filter:blur(0)}
.cal .t-tabs{position:relative;display:flex;align-items:center;gap:0;padding:2px;margin-inline:calc(var(--s-5) * -1);border-radius:16px;background:var(--cal-track)}
.cal .t-tab{--press-scale:0.95;position:relative;appearance:none;border:0;background:transparent;flex:1;min-width:var(--tap);height:52px;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;color:var(--color-text);cursor:pointer;border-radius:12px;z-index:1;transition:color var(--cal-tabs-dur) var(--cal-tabs-ease),background-color var(--cal-tabs-dur) var(--cal-tabs-ease),transform var(--press-dur,150ms) cubic-bezier(0.22,1,0.36,1)}
.cal .t-tab .dow{font-size:var(--fs-xs);line-height:16px;color:var(--color-text-muted);transition:color var(--cal-tabs-dur) var(--cal-tabs-ease)}
.cal .t-tab .dnum{font-size:15px;line-height:20px;font-variant-numeric:tabular-nums}
.cal .t-tab.is-today .dnum{color:var(--color-primary);font-weight:var(--fw-bold)}
.cal .t-tab:is(:active,.is-pressed){transform:scale(var(--press-scale))}
.cal .t-tab[aria-selected="true"] .dow{color:var(--color-text)}
@media (hover:hover) and (pointer:fine){.cal .t-tab:not([aria-selected="true"]):hover{background-color:var(--cal-hover)}}
.cal .t-tab:focus-visible{outline:none;box-shadow:0 0 0 2px var(--color-surface),0 0 0 4px var(--color-primary)}
.cal .t-tabs-pill{position:absolute;top:2px;left:0;height:52px;width:0;background:var(--cal-pill);box-shadow:var(--cal-pill-shadow);border-radius:12px;transform:translateX(0);transition:transform var(--cal-tabs-dur) var(--cal-tabs-ease),width var(--cal-tabs-dur) var(--cal-tabs-ease);will-change:transform,width;z-index:0;pointer-events:none}
.cal .t-page-slide{position:relative;display:grid}
.cal .t-page-slide .t-page[data-page-id]{--t-page-from-x:var(--page-slide-distance)}
.cal .t-page-slide .t-page{grid-area:1/1;min-width:0;opacity:0;pointer-events:none;transform:translateX(calc(var(--t-page-from-x,0px) * var(--page-exit-enabled)));filter:blur(calc(var(--page-blur) * var(--page-exit-enabled)));transition:opacity var(--page-fade-dur) var(--page-fade-ease),transform var(--page-slide-dur) var(--page-slide-ease),filter var(--page-slide-dur) var(--page-slide-ease);will-change:opacity,transform,filter}
.cal .t-page-slide:is([data-page="1"]) .t-page[data-page-id="1"],.cal .t-page-slide[data-page="2"] .t-page[data-page-id="2"],.cal .t-page-slide[data-page="3"] .t-page[data-page-id="3"],.cal .t-page-slide[data-page="4"] .t-page[data-page-id="4"],.cal .t-page-slide[data-page="5"] .t-page[data-page-id="5"],.cal .t-page-slide[data-page="6"] .t-page[data-page-id="6"],.cal .t-page-slide[data-page="7"] .t-page[data-page-id="7"]{opacity:1;pointer-events:auto;transform:translateX(0);filter:blur(0);transition-delay:var(--page-stagger)}
.mtg-list{list-style:none;display:flex;flex-direction:column;gap:8px}
.mtg{--c:var(--color-primary);border-radius:12px;background:color-mix(in srgb,var(--c) var(--mtg-tint),transparent)}
.mtg--missed{--c:var(--color-warning)}
.mtg--saved{--c:var(--color-success)}
.mtg--cancelled{--c:var(--color-text-muted)}
.mtg--cancelled .mtg-title{text-decoration:line-through;color:var(--color-text-muted)}
.mtg__btn{display:flex;align-items:center;gap:12px;width:100%;min-height:var(--tap);padding:8px 8px 8px 12px;border:0;border-radius:inherit;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:transform var(--press-dur,150ms) cubic-bezier(0.22,1,0.36,1)}
.mtg__btn:active{transform:scale(0.99)}
.mtg__btn:disabled{cursor:default}
.mtg__btn:focus-visible{outline:none;box-shadow:0 0 0 2px var(--color-surface),0 0 0 4px var(--color-primary)}
.mtg-bar{flex:none;align-self:stretch;width:3px;border-radius:2px;background:var(--c)}
.mtg-text{flex:1;min-width:0;display:grid;gap:2px}
.mtg-title{font-size:var(--fs-sm);line-height:20px;font-weight:var(--fw-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mtg-meta{font-size:var(--fs-xs);line-height:16px;color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mtg-time{font-variant-numeric:tabular-nums}
.mtg-flag{color:var(--c);font-weight:var(--fw-bold)}
.mtg--cancelled .mtg-flag{color:var(--color-text-muted)}
.t-avatar-group{flex:none;align-self:center;display:flex;align-items:center}
.t-avatar{display:flex;width:24px;height:24px;border-radius:50%;transform-origin:center;transform:translateY(var(--shift,0px)) scale(var(--scale-active,1));transition:transform var(--avatar-dur) var(--avatar-ease-in);will-change:transform}
.t-avatar+.t-avatar{margin-inline-start:-6px}
.t-av{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--c) 30%,var(--color-surface));color:var(--color-text);font-size:10px;font-weight:var(--fw-bold);line-height:1;box-shadow:0 0 0 1.5px var(--color-surface);user-select:none}
.t-av--more{background:var(--color-surface-container);color:var(--color-text-muted)}
.cal-empty{display:grid;justify-items:center;gap:var(--s-3);padding:var(--s-6) 0;text-align:center}
.cal-empty__text{color:var(--color-text-muted)}
@media (prefers-reduced-motion:reduce){.cal .t-tabs-pill,.cal .t-tab{transition:none!important}.cal .t-tab:is(:active,.is-pressed),.mtg__btn:active{transform:none}.cal .t-page-slide .t-page{transition:none!important}.t-text-soft,.t-text-soft>span{transition:none!important}.t-avatar{transition:none!important;transform:none!important}}
.cal-meta>span{unicode-bidi:isolate}
