:root {
  --background: oklch(0.9901 0.0161 95.2193);
  --foreground: oklch(0.2138 0.0019 286.2347);
  --card: oklch(0.9901 0.0161 95.2193);
  --primary: oklch(0.8480 0.1563 82.4419);
  --primary-foreground: oklch(0.2002 0 0);
  --secondary: oklch(0.9565 0.0204 74.6609);
  --muted: oklch(0.9665 0.0149 94.1982);
  --muted-foreground: oklch(0.5555 0 0);
  --destructive: oklch(0.5379 0.2186 25.9751);
  --destructive-foreground: oklch(1 0 0);
  --theme-border: oklch(0.9219 0 0);
  --theme-input: oklch(0.9219 0 0);
  --ring: oklch(0.8480 0.1563 82.4419);
  --chart-1: oklch(0.8093 0.0985 252.2024);
  --chart-2: oklch(0.6207 0.1894 259.9358);
  --chart-3: oklch(0.5495 0.2202 263.0917);
  --chart-4: oklch(0.4893 0.2202 264.0405);
  --chart-5: oklch(0.4210 0.1792 266.0094);
  --sidebar: oklch(0.9901 0.0161 95.2193);
  --sidebar-foreground: oklch(0.2138 0.0019 286.2347);
  --sidebar-primary: oklch(0.8480 0.1563 82.4419);
  --sidebar-primary-foreground: oklch(0.2002 0 0);
  --sidebar-accent: oklch(0.9702 0 0);
  --sidebar-border: oklch(0.9219 0 0);
  --tracking-normal: -0.01em;

  --navy-900: var(--foreground);
  --navy-800: oklch(0.28 0.008 286);
  --navy-700: oklch(0.35 0.02 82.4);
  --navy-100: oklch(0.94 0.012 95);
  --navy-50: var(--muted);
  --kanku-500: var(--primary);
  --kanku-600: oklch(0.78 0.16 82.4);
  --paper-50: var(--background);
  --paper-100: var(--card);
  --ink-900: var(--foreground);
  --mist-500: var(--muted-foreground);
  --ok-500: oklch(0.55 0.1 155);
  --warn-500: oklch(0.72 0.14 82);

  --bg: var(--background);
  --surface: var(--card);
  --surface-2: var(--muted);
  --text: var(--foreground);
  --text-muted: var(--muted-foreground);
  --accent: var(--primary);
  --accent-hover: var(--kanku-600);
  --on-accent: var(--primary-foreground);
  --border: var(--theme-border);
  --border-strong: oklch(0.86 0.01 95);
  --border-input: var(--theme-input);
  --surface-hover: var(--secondary);
  --danger-text: var(--destructive);
  --danger-soft: color-mix(in oklch, var(--destructive) 10%, transparent);
  --ok-soft: color-mix(in oklch, var(--ok-500) 16%, var(--surface));
  --warn-soft: color-mix(in oklch, var(--warn-500) 16%, var(--surface));
  --primary-soft: color-mix(in oklch, var(--primary) 18%, var(--surface));
  --on-inverse: var(--background);
  --on-inverse-muted: color-mix(in oklch, var(--background) 78%, transparent);
  --inverse-soft: color-mix(in oklch, var(--background) 10%, transparent);
  --inverse-line: color-mix(in oklch, var(--background) 20%, transparent);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 2px);
  --radius-pill: 999px;
  --shadow-sm: 0 4px 3px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
  --shadow-md: 0 4px 3px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Albert Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --z-nav: 20;
  --z-overlay: 30;
  --z-toast: 40;
  --dock-h: 0px;
  --dock-plus: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  letter-spacing: var(--tracking-normal);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

input,
select,
textarea {
  font: inherit;
  font-size: 16px;
  color: inherit;
  touch-action: manipulation;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: var(--z-overlay);
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 12px;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: 64px;
  display: flex;
  align-items: center;
  background: color-mix(in oklch, var(--card) 94%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink-900);
  text-decoration: none;
  line-height: 1;
}

.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.brand-mark-wrap {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--navy-900);
  box-shadow: 0 1px 2px color-mix(in oklch, var(--foreground) 16%, transparent);
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: inherit;
  white-space: nowrap;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--card);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
}

.obi {
  height: 6px;
  display: grid;
  grid-template-columns: 1fr 18px 1fr;
}

.obi span:nth-child(1) {
  background: var(--navy-700);
}

.obi span:nth-child(2) {
  background: var(--accent);
}

.obi span:nth-child(3) {
  background: var(--navy-900);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.field-input:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--navy-700);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--navy-700);
}

.btn:disabled,
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.btn-sm {
  min-height: 32px;
  padding: 4px 10px;
  font-size: var(--text-sm);
}

.btn-icon {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-100);
  color: var(--navy-800);
}

.btn-icon:hover {
  background: var(--surface-hover);
}

.btn-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-icon.is-danger {
  color: var(--danger-text);
}

.btn-icon.is-danger:hover {
  background: var(--danger-soft);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: end;
  padding: 48px 0 72px;
}

.hero-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--surface);
  margin-bottom: 16px;
}

.hero h1 {
  margin: 8px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 14ch;
}

.hero p {
  margin: 0 0 24px;
  color: var(--text-muted);
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.kicker {
  font-size: 13px;
  color: var(--navy-700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.live-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.live-board header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.live-board h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.session-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.session-row:last-child {
  border-bottom: 0;
}

.session-time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--navy-700);
}

.session-row strong {
  display: block;
}

.muted {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.section {
  padding: 64px 0;
}

.section h2 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trainer-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.trainer-card {
  min-height: 220px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.program-list {
  display: grid;
  gap: 0;
}

.program-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.program-item:last-child {
  border-bottom: 1px solid var(--border);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.trainer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.product .price {
  margin-top: auto;
  font-family: var(--font-mono);
}

.pass-table {
  display: grid;
  gap: 12px;
}

.pass-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.site-footer {
  padding: 32px 0 48px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-grid .brand-logo {
  display: block;
  margin-bottom: 12px;
}

.messages {
  width: min(1120px, calc(100% - 32px));
  margin: 16px auto 0;
  display: grid;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.toast.success {
  border-color: color-mix(in oklch, var(--ok-500) 45%, var(--border));
}

.toast.error {
  border-color: color-mix(in oklch, var(--destructive) 45%, var(--border));
}

.toast-float {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + 16px);
  transform: translateX(-50%);
  z-index: var(--z-toast);
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 10px 28px color-mix(in oklch, var(--foreground) 18%, transparent);
  animation: toast-float-out 3s ease forwards;
}

.toast-float.is-gone {
  opacity: 0;
  pointer-events: none;
}

@keyframes toast-float-out {
  0%,
  78% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast-float {
    animation: none;
  }
}

.mail-state {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--text-sm);
}

.mail-state.is-ready {
  border-color: color-mix(in oklch, var(--ok-500) 45%, var(--border));
}

.mail-state.is-off {
  color: var(--text-muted);
}

.cred-reveal {
  display: grid;
  gap: 12px;
}

.cred-reveal-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.cred-reveal-list div {
  display: grid;
  gap: 2px;
}

.cred-reveal-list dt {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.cred-reveal-list dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  word-break: break-all;
}

.page-head {
  padding: 32px 0 8px;
}

.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 24px 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field > span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.field-input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-input);
  background: var(--surface);
  transition: border-color 150ms ease;
}

.field-input:hover:not([readonly]):not(:disabled) {
  border-color: var(--border-strong);
}

.field-input[readonly] {
  background: var(--navy-50);
  cursor: default;
}

.auth-card {
  width: min(420px, calc(100% - 32px));
  margin: 48px auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.auth-card h1 {
  margin-top: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.auth-card form {
  display: grid;
  gap: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--navy-800);
  font-size: 12px;
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok-500);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--navy-700);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--destructive);
}

.staff-body {
  --side-w: 248px;
  min-height: 100dvh;
}

.staff-bar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--paper-100);
  border-bottom: 1px solid var(--border);
  transition: padding-left 180ms ease;
}

.staff-body.is-nav-open .staff-bar .brand {
  display: none;
}

.staff-nav-toggle,
.staff-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  min-width: 40px;
  width: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-100);
  color: var(--navy-800);
  cursor: pointer;
}

.staff-nav-toggle i {
  font-size: 20px;
}

.staff-nav-toggle .ph-sidebar-simple {
  display: none;
}

.staff-nav-toggle:focus-visible,
.staff-nav-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.staff-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in oklch, var(--foreground) 40%, transparent);
  z-index: var(--z-overlay);
}

.staff-side {
  position: fixed;
  top: 0;
  left: 0;
  z-index: calc(var(--z-overlay) + 1);
  display: flex;
  flex-direction: column;
  width: min(var(--side-w), 88vw);
  height: 100dvh;
  overflow: hidden;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  padding: 16px;
  color: var(--sidebar-foreground);
  transform: translateX(-105%);
  transition: transform 180ms ease;
}

.staff-side.is-open {
  transform: translateX(0);
}

.staff-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-side-head .staff-nav-close {
  background: transparent;
  color: var(--sidebar-foreground);
  border-color: var(--border);
}

.staff-side-head .brand {
  flex: 1;
  min-width: 0;
}

.staff-side .brand {
  color: var(--sidebar-foreground);
}

.staff-side .btn-secondary {
  color: var(--sidebar-foreground);
  border-color: var(--border-strong);
}

.staff-side .btn-secondary:hover {
  background: var(--secondary);
  border-color: var(--navy-700);
}

.staff-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin-top: 16px;
}

.staff-nav-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--sidebar-foreground);
}

.staff-nav-tile i {
  font-size: 22px;
  color: var(--text-muted);
}

.staff-nav-tile span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.staff-nav-tile:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.staff-nav-tile:hover i {
  color: var(--foreground);
}

.staff-nav-tile.is-active i,
.staff-nav-tile.is-active:hover i {
  color: var(--on-accent);
}

.staff-nav-tile.is-active {
  background: var(--sidebar-primary);
  border-color: transparent;
  color: var(--sidebar-primary-foreground);
}

.staff-nav-tile:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.staff-main {
  padding: 24px 32px 48px;
  transition: margin-left 180ms ease;
  min-width: 0;
  overflow-x: clip;
}

.staff-main:has(.journal-board) {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 56px);
  padding: 24px 32px;
  overflow: hidden;
}

@media (min-width: 960px) {
  .staff-body.is-nav-open .staff-bar,
  .staff-body.is-nav-open .staff-main {
    margin-left: var(--side-w);
  }

  .staff-body.is-nav-open .staff-side {
    transform: none;
  }

  .staff-body.is-nav-open .staff-backdrop {
    display: none;
  }

  .staff-side-head .staff-nav-close {
    display: none;
  }

  .staff-nav-toggle .ph-list {
    display: none;
  }

  .staff-nav-toggle .ph-sidebar-simple {
    display: inline-block;
  }

  .staff-dock {
    display: none;
  }
}

.staff-dock {
  display: none;
}

.staff-dock-item {
  flex: 1 1 0;
  min-width: 64px;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 4px 2px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.staff-dock-item i {
  font-size: 20px;
  color: var(--navy-700);
}

.staff-dock-item:hover {
  color: var(--navy-800);
}

.staff-dock-item:active {
  background: var(--surface-hover);
}

.staff-dock-item.is-active {
  color: var(--navy-800);
  background: var(--navy-50);
}

.staff-dock-item.is-active i {
  color: var(--navy-800);
}

.staff-dock-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.staff-dock-plus {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  margin-top: -18px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 2px solid var(--paper-100);
  border-radius: 50%;
  background: var(--kanku-500);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 1;
}

.staff-dock-plus i {
  font-size: 26px;
  color: var(--on-accent);
}

.staff-dock-plus:hover,
.staff-dock-plus:focus-visible {
  background: var(--kanku-600);
}

.staff-dock-plus:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 2px;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.quick-action i {
  font-size: 22px;
  color: var(--kanku-500);
}

.quick-action:hover,
.quick-action:focus-visible {
  background: var(--surface-2);
}

.quick-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 959px) {
  .staff-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-nav);
    overflow: visible;
    align-items: flex-end;
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--paper-100);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }

  .staff-body {
    --dock-h: calc(60px + env(safe-area-inset-bottom, 0px));
    --dock-plus: 18px;
  }

  .staff-side {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .staff-main {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .staff-main:has(.journal-board) {
    height: calc(100dvh - 56px - 64px - env(safe-area-inset-bottom, 0px));
    padding-bottom: 16px;
  }
}

.side-cal {
  margin-top: 16px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
}

.side-cal-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.side-cal-head strong {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.side-cal-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  color: var(--text-muted);
}

.side-cal-shift:hover,
.side-cal-shift:focus-visible {
  background: var(--secondary);
  color: var(--foreground);
}

.side-cal-week,
.side-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.side-cal-week {
  margin-bottom: 4px;
}

.side-cal-week span {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.side-cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-foreground);
  font-size: 12px;
  font-weight: 600;
}

.side-cal-day.is-empty {
  pointer-events: none;
}

.side-cal-day:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.side-cal-day.is-today {
  box-shadow: inset 0 0 0 1px var(--kanku-500);
}

.side-cal-day.is-in-week {
  background: var(--secondary);
  color: var(--foreground);
}

.side-cal-day.is-selected,
.side-cal-day.is-in-week.is-selected {
  background: var(--sidebar-primary);
  color: var(--sidebar-primary-foreground);
}

.side-cal-day:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.staff-side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.staff-side-foot form {
  margin: 0;
  flex-shrink: 0;
}

.staff-me {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--radius);
}

.staff-side a.staff-me {
  padding: 6px 8px;
  color: var(--sidebar-foreground);
}

.staff-side a.staff-me:hover,
.staff-side a.staff-me.is-active {
  background: var(--secondary);
  color: var(--foreground);
}

.staff-me-text {
  min-width: 0;
}

.staff-me-text strong,
.staff-me-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-me-text strong {
  font-size: 13px;
  line-height: 1.3;
}

.staff-me-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.avatar-sm {
  width: 36px;
  height: 36px;
  margin-bottom: 0;
  font-size: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.journal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-bottom: 12px;
}

.journal-toolbar h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 1.15em;
}

.journal-toolbar .muted {
  margin: 0;
}

.journal-day-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.view-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-100);
}

.view-switch-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-700);
}

.view-switch-name {
  font-weight: 600;
}

.view-switch-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
}

.view-switch-btn.is-active .view-switch-date {
  color: color-mix(in oklch, var(--on-accent) 72%, transparent);
}

.view-switch-btn:hover {
  color: var(--ink-900);
}

.view-switch-btn.is-active {
  background: var(--primary);
  color: var(--on-accent);
}

.view-switch-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.journal-shift {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journal-shift-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1;
  text-align: center;
}

.journal-shift-date {
  font-weight: 600;
  color: var(--navy-800);
  text-transform: capitalize;
}

.journal-board {
  --col-head: 56px;
  --hour-h: 64px;
  --hour-w: 56px;
  --col-min: 0px;
  --day-hours: 12;
  --day-h: max(100%, calc(var(--hour-h) * var(--day-hours)));
  --col-count: var(--trainer-count);
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--hour-w) minmax(0, 1fr);
  grid-template-rows: var(--col-head) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.journal-board.is-week {
  --col-count: 7;
  --col-min: 132px;
}

.journal-corner {
  grid-column: 1;
  grid-row: 1;
  z-index: 4;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.journal-heads {
  grid-column: 2;
  grid-row: 1;
  z-index: 3;
  overflow: auto;
  overscroll-behavior: none;
  scrollbar-width: none;
  touch-action: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.journal-heads::-webkit-scrollbar {
  display: none;
}

.journal-heads-inner {
  display: grid;
  grid-template-columns: repeat(var(--col-count), minmax(var(--col-min), 1fr));
  min-width: 100%;
  width: max(100%, calc(var(--col-count) * var(--col-min)));
  height: 100%;
}

.journal-hours {
  grid-column: 1;
  grid-row: 2;
  z-index: 3;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: none;
  scrollbar-width: none;
  touch-action: none;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.journal-hours::-webkit-scrollbar {
  display: none;
}

.journal-hours-scale {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  height: var(--day-h);
  min-height: max(100%, calc(var(--hour-h) * var(--day-hours)));
}

.journal-hours-scale span {
  position: absolute;
  left: 6px;
  transform: translateY(-50%);
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}

.journal-hours-scale span.is-start {
  transform: translateY(2px);
}

.journal-hours-scale span.is-end {
  transform: translateY(calc(-100% - 2px));
}

.journal-hours-scale span.is-half {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.journal-lanes {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  touch-action: pan-x pan-y;
}

.journal-lanes-inner {
  position: relative;
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: repeat(var(--col-count), minmax(var(--col-min), 1fr));
  min-width: 100%;
  width: max(100%, calc(var(--col-count) * var(--col-min)));
  height: var(--day-h);
  min-height: max(100%, calc(var(--hour-h) * var(--day-hours)));
}

.journal-col {
  min-width: 0;
  height: 100%;
}

.journal-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  min-width: 0;
  padding: 0 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.journal-col-head .muted {
  font-size: 12px;
}

.journal-day-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.journal-day-head strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.journal-day-head span {
  font-size: 12px;
  color: var(--text-muted);
}

.journal-col-head.is-today {
  background: var(--surface);
}

.journal-col-head.is-selected .journal-day-head strong,
.journal-col.is-selected .journal-day-head strong {
  color: var(--navy-900);
}

.journal-lane {
  position: relative;
  height: 100%;
  border-left: 1px solid var(--border);
  background-color: var(--surface);
  background-image:
    linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(50% - 1px),
      var(--navy-50) 50%,
      transparent calc(50% + 1px),
      transparent calc(100% - 1px),
      var(--navy-100) 100%
    );
  background-size: 100% calc(100% / (var(--day-hours) * 2));
  background-repeat: repeat-y;
}

.journal-slot {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.journal-slot:hover,
.journal-slot:focus-visible {
  background: var(--navy-50);
}

.journal-slot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.journal-block {
  --trainer: var(--navy-700);
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 2;
  overflow: hidden;
  padding: 8px 10px 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--navy-900);
  font-size: 13px;
  line-height: 1.35;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  box-shadow: inset 4px 0 0 var(--navy-700);
}

.journal-block.is-attendable {
  cursor: pointer;
}

.journal-block.is-attendable:hover,
.journal-block.is-attendable:focus-visible {
  background: var(--navy-100);
}

.journal-block.is-attendable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.journal-block-group {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.journal-block strong,
.journal-block-program {
  display: block;
  color: var(--navy-800);
  font-weight: 500;
}

.journal-block-program {
  font-weight: 400;
}

.journal-block-hint {
  margin-top: 2px;
  color: var(--kanku-600);
}

.journal-now {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  border-top: 2px solid var(--accent);
  pointer-events: none;
}

.journal-now span {
  position: absolute;
  left: 8px;
  transform: translateY(-50%);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.journal-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

dialog.journal-dialog:not([open]) {
  display: none;
}

.journal-dialog.is-opening {
  pointer-events: none;
}

.journal-dialog::backdrop {
  background: color-mix(in oklch, var(--foreground) 48%, transparent);
}

.journal-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.journal-dialog-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.journal-dialog-head .muted {
  margin: 0;
}

.journal-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-100);
  color: var(--navy-800);
  cursor: pointer;
}

.journal-dialog-close:hover,
.journal-dialog-close:focus-visible {
  border-color: var(--navy-700);
}

.journal-dialog-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.journal-dialog-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.journal-dialog-foot {
  display: flex;
  justify-content: end;
  gap: 8px;
  padding: 0 16px 16px;
}

.journal-dialog-attend {
  width: min(580px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.journal-dialog-attend[open] {
  display: flex;
}

.journal-dialog-attend > .attend-sheet {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(78dvh, calc(100dvh - 48px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.attend-attention {
  padding: 12px 16px;
  border: 1px solid color-mix(in oklch, var(--kanku-500) 35%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--kanku-500) 14%, var(--surface));
  color: var(--navy-900);
}

.attend-attention[hidden] {
  display: none;
}

.attend-attention strong {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
}

.attend-attention ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.attend-attention b {
  margin-right: 4px;
}

.attend-attention a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.attend-attention span {
  color: var(--text-muted);
}

.attend-foot {
  justify-content: space-between;
}

.attend-foot .btn[hidden] {
  display: none;
}

.attend-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.attend-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: start;
  gap: 10px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.attend-row:last-child {
  border-bottom: 0;
}

.attend-who {
  min-width: 0;
}

.attend-who strong a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.attend-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.attend-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}

.attend-call {
  align-self: stretch;
  min-height: 44px;
}

.attend-marks {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 220px;
}

.attend-lesson-note:not([hidden]) {
  display: grid;
  gap: 8px;
}

.attend-note-open {
  min-height: 44px;
  width: 100%;
}

.attend-note-edit:not([hidden]) {
  display: grid;
  gap: 6px;
}

.attend-note-edit label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.attend-note-edit .field-input {
  min-height: 64px;
  resize: vertical;
}

.rating-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rating-switch h2 {
  margin: 0 0 2px;
  font-size: var(--text-base);
}

.rating-switch p {
  margin: 0;
  font-size: var(--text-sm);
}

.rating-switch-act {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.attention-fold,
.attention-board {
  flex-shrink: 0;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.attention-fold summary,
.attention-board h2 {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.attention-fold summary {
  border-radius: var(--radius);
  transition: background 150ms ease;
}

.attention-fold[open] summary {
  border-radius: var(--radius) var(--radius) 0 0;
}

.attention-fold summary:hover {
  background: var(--surface-hover);
}

.attention-board h2 {
  margin: 0;
  cursor: default;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.attention-col h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.attention-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.attention-col li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hall-card {
  margin-bottom: 16px;
}

.hall-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hall-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.client-card-bar {
  margin-bottom: 16px;
}

.client-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--navy-700);
  font-weight: 600;
}

.client-back i {
  font-size: 18px;
}

.client-back:hover {
  color: var(--kanku-500);
}

.client-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dossier {
  --belt: #f4e8e2;
  --belt-image: none;
  position: relative;
  margin-bottom: 24px;
  padding: 24px;
  overflow: hidden;
  background: var(--navy-800);
  color: var(--on-inverse);
  border-radius: var(--radius);
}

.dossier-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "mark who actions"
    "belt belt belt";
  gap: 16px;
  align-items: start;
}

.dossier-mark {
  grid-area: mark;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--inverse-soft);
  border: 1px solid var(--inverse-line);
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.dossier-who {
  grid-area: who;
  min-width: 0;
}

.dossier h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: none;
}

.dossier-meta {
  margin: 8px 0 0;
  color: var(--on-inverse-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.dossier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.dossier .badge {
  background: var(--inverse-soft);
  color: var(--on-inverse);
}

.dossier .badge.ok {
  background: color-mix(in oklch, var(--ok-500) 28%, transparent);
  color: color-mix(in oklch, var(--ok-500) 55%, var(--on-inverse));
}

.dossier .pay-mark.is-paid {
  background: color-mix(in oklch, var(--ok-500) 28%, transparent);
  color: color-mix(in oklch, var(--ok-500) 55%, var(--on-inverse));
}

.dossier .pay-mark.is-unpaid {
  background: color-mix(in oklch, var(--primary) 28%, transparent);
  color: var(--primary);
}

.dossier .pay-mark.is-trial {
  background: var(--inverse-soft);
  color: var(--on-inverse);
}

.dossier .badge.dossier-belt-tag {
  grid-area: belt;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--belt-image) center / 100% 100% no-repeat, var(--belt);
  color: var(--destructive-foreground);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px color-mix(in oklch, var(--foreground) 55%, transparent);
}

.dossier-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dossier-actions .btn {
  min-height: 44px;
}

.btn-ghost-light {
  background: transparent;
  border-color: var(--inverse-line);
  color: var(--on-inverse);
}

.btn-ghost-light:hover {
  background: var(--inverse-soft);
}

.dossier-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--inverse-line);
}

.dossier-facts dt {
  margin: 0;
  color: var(--on-inverse-muted);
  font-size: 12px;
  font-weight: 600;
}

.dossier-facts dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.dossier-facts dd small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.dossier-facts dd.is-paid {
  color: color-mix(in oklch, var(--ok-500) 55%, var(--on-inverse));
}

.dossier-facts dd.is-unpaid {
  color: var(--primary);
}

.dossier-exam {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--inverse-line);
}

.dossier-exam > .btn {
  width: 100%;
  min-height: 44px;
}

.dossier-exam-meta,
.dossier-exam-ask {
  margin: 0;
  color: var(--on-inverse-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.dossier-exam-ask {
  margin-bottom: 12px;
  font-size: var(--text-base);
}

.dossier-exam-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dossier-exam-choice form {
  margin: 0;
}

.dossier-exam-choice .btn {
  width: 100%;
  min-height: 44px;
}

.dossier-note {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--belt);
  background: var(--inverse-soft);
  color: var(--on-inverse);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.client-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.client-sheet-main,
.client-sheet-side {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.client-sheet .panel h2 {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.client-sheet .field-input {
  min-height: 44px;
}

.client-sheet textarea.field-input {
  min-height: 96px;
  resize: vertical;
}

.switch-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-50);
  cursor: pointer;
}

.switch-row:has(.switch-input:checked) {
  border-color: color-mix(in srgb, var(--navy-700) 36%, var(--border));
  background: color-mix(in srgb, var(--navy-700) 8%, var(--paper-100));
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.switch-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.switch-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.switch-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: relative;
  z-index: 0;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color 200ms ease;
  pointer-events: none;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--paper-100);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
}

.switch-input:checked + .switch-track {
  background: var(--primary);
}

.switch-input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch-input:focus-visible + .switch-track {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.panel.client-fold {
  padding: 0;
  min-width: 0;
  max-width: 100%;
}

.client-fold > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: var(--text-lg);
  font-weight: 700;
  list-style: none;
  border-radius: var(--radius);
  transition: background 150ms ease;
}

.client-fold[open] > summary {
  border-radius: var(--radius) var(--radius) 0 0;
}

.client-fold > summary:hover {
  background: var(--surface-hover);
}

.client-fold > summary::-webkit-details-marker {
  display: none;
}

.client-fold > summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--navy-700);
  border-bottom: 2px solid var(--navy-700);
  transform: rotate(45deg);
}

.client-fold[open] > summary {
  border-bottom: 1px solid var(--border);
}

.client-fold[open] > summary::after {
  transform: rotate(-135deg);
}

.client-fold > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.client-fold-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.client-fold-preview {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-fold[open] > summary .client-fold-preview {
  display: none;
}

.client-fold-body {
  padding: 16px 20px 20px;
  display: grid;
  gap: 12px;
}

.client-save {
  width: 100%;
  min-height: 48px;
}

.pay-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.pay-mark {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.pay-mark.is-paid {
  color: var(--ok-500);
}

.pay-mark.is-unpaid {
  color: var(--navy-700);
}

.pay-mark.is-trial {
  color: var(--navy-800);
}

.attend-choice {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.attend-choice label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
}

.staff-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.staff-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

a.staff-card.is-link {
  color: inherit;
}

a.staff-card.is-link:hover,
a.staff-card.is-link:focus-visible {
  border-color: color-mix(in srgb, var(--navy-700) 40%, var(--border));
  box-shadow: var(--shadow-md);
}

a.staff-card.is-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.branch-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.branch-card-actions,
.row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}

.row-actions {
  justify-content: flex-end;
}

.branch-card-actions form,
.row-actions form {
  margin: 0;
}

.hours-edit-row:has(input[name^="hours_closed"]:checked) input[type="time"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn-danger-text {
  color: var(--destructive);
  border-color: color-mix(in oklch, var(--destructive) 32%, var(--border));
}

.btn-danger-text:hover {
  background: var(--danger-soft);
  color: var(--destructive);
  border-color: var(--destructive);
}

.branch-form-actions {
  display: grid;
  gap: 12px;
}

.branch-form-actions[hidden] {
  display: none;
}

.plan-edit {
  display: grid;
  gap: 12px;
}

.plan-edit-list {
  display: grid;
  gap: 12px;
}

.plan-row {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.plan-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.plan-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.plan-day {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.plan-day input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.plan-day span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--paper-100);
  font-size: var(--text-sm);
  font-weight: 600;
}

.plan-day:has(input:checked) span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.plan-day:has(input:focus-visible) span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.plan-times {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.plan-times .plan-remove {
  margin-left: auto;
}

.plan-time {
  display: grid;
  margin: 0;
  min-width: 0;
  width: auto;
  flex: 0 0 auto;
}

.plan-time .field-input[type="time"] {
  width: 6rem;
  min-width: 0;
  max-width: 100%;
  padding-inline: 8px;
  font-variant-numeric: tabular-nums;
}

.plan-time .field-input[type="time"]::-webkit-calendar-picker-indicator,
.plan-time .field-input[type="time"]::-webkit-inner-spin-button,
.plan-time .field-input[type="time"]::-webkit-clear-button {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.plan-time .field-input[type="time"]::-webkit-datetime-edit,
.plan-time .field-input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.hours-edit-row {
  display: grid;
  grid-template-columns: 120px auto 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.group-edit {
  display: grid;
  gap: 16px;
}

.award-editor {
  margin-top: 16px;
}

.award-editor > .muted {
  margin: 0 0 12px;
}

.award-edit-list {
  display: grid;
  gap: 8px;
}

.award-edit-list:empty {
  display: none;
}

.award-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.award-editor [data-award-add] {
  margin-top: 12px;
}

.group-edit-new {
  display: grid;
  gap: 8px;
}

.group-edit-list {
  display: grid;
  gap: 8px;
}

.group-edit-list:empty {
  display: none;
}

.group-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}

.group-edit-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
  line-height: 1.3;
}

.plan-row-top {
  display: grid;
  min-width: 0;
}

.group-plan-dialog {
  width: min(520px, calc(100vw - 24px));
}

.group-plan-dialog .journal-dialog-body {
  max-height: min(64vh, 560px);
  overflow: auto;
}

.group-plan-hint {
  color: var(--destructive);
}

.assign-row.is-read {
  cursor: default;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.assign-row.is-read a {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.assign-row.is-read a:hover,
.assign-row.is-read a:focus-visible {
  color: var(--accent);
}

.assign-row.is-read .muted {
  flex: none;
  text-align: left;
  font-size: 12px;
  line-height: 1.3;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.staff-card .avatar {
  margin-bottom: 0;
}

.staff-card-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.staff-card-students {
  display: grid;
  gap: 2px;
  font-size: var(--text-sm);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--navy-800);
  font-size: var(--text-xs);
}

.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: var(--text-sm);
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.form-panel {
  max-width: 640px;
}

.field-checks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.field-checks li label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hours-fieldset {
  margin: 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.hours-fieldset legend {
  padding: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hours-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.hours-closed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.dash-grain {
  margin: 0 0 8px;
}

.dash-grain .view-switch {
  width: 100%;
  max-width: 360px;
}

.dash-grain .view-switch-btn {
  flex: 1;
}

.dash-weeks.is-days {
  display: flex;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  grid-template-columns: none;
  gap: 6px;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.dash-weeks.is-days .dash-week {
  flex: 0 0 22px;
}

.dash-weeks.is-days .dash-week-bars i {
  width: 8px;
}

.stat {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat b {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 1.4rem;
}

.dash-weeks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
  height: 168px;
  margin-top: 16px;
}

.dash-week {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  min-width: 0;
}

.dash-week-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.dash-week-bars i {
  display: block;
  width: 12px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}

.dash-week-bars i.is-classes,
.dash-legend i.is-classes {
  background: var(--chart-3);
}

.dash-week-bars i.is-visits,
.dash-legend i.is-visits {
  background: var(--primary);
}

.dash-week span {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.dash-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}

.dash-mix {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.dash-mix i {
  display: block;
  min-width: 0;
}

.dash-mix i.is-paid {
  background: var(--ok-500);
}

.dash-mix i.is-unpaid {
  background: var(--warn-500);
}

.dash-mix i.is-trial {
  background: var(--chart-2);
}

.dash-mix-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.dash-mix-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.dash-subhead {
  margin-top: 24px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data th {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 960px) and (hover: hover) {
  table.data tbody tr:not(.is-empty):hover td {
    background: var(--surface-hover);
  }
}

.split-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.split-2 > * {
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  max-width: 100%;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

/* Помощь */
.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.help-toc-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--navy-800);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.help-toc-link:hover {
  background: var(--surface-hover);
  border-color: var(--navy-700);
}

.help-toc-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.help-stack {
  display: grid;
  gap: 16px;
}

.help-section {
  padding: 20px 24px 24px;
  scroll-margin-top: 80px;
}

.help-section h2 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.help-section h3 {
  margin: 20px 0 8px;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--navy-900);
}

.help-section p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.help-section p:last-child {
  margin-bottom: 0;
}

.help-list,
.help-steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

.help-steps {
  counter-reset: help-step;
  list-style: none;
  padding-left: 0;
  gap: 12px;
}

.help-steps > li {
  position: relative;
  padding-left: 44px;
  min-height: 32px;
}

.help-steps > li::before {
  counter-increment: help-step;
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.help-steps.is-compact {
  gap: 8px;
}

.help-steps.is-compact > li {
  padding-left: 36px;
  min-height: 26px;
}

.help-steps.is-compact > li::before {
  width: 26px;
  height: 26px;
  top: 0;
  font-size: 13px;
}

.help-steps strong {
  display: block;
  margin-bottom: 2px;
}

.help-ui {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--navy-900);
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: baseline;
}

.help-ui-icon i {
  font-size: 1.05em;
  color: var(--navy-700);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.help-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.help-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.help-card h3 i {
  font-size: 20px;
  color: var(--kanku-500);
}

.help-card p {
  font-size: var(--text-sm);
}

.help-note {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--kanku-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface-2);
  line-height: 1.55;
}

.help-note strong {
  display: block;
  margin-bottom: 2px;
}

.help-table td:first-child {
  white-space: nowrap;
}

.help-swatch-line {
  display: inline-block;
  width: 48px;
  height: 0;
  border-top: 2px solid var(--accent);
  vertical-align: middle;
}

.help-swatch-bar {
  display: inline-block;
  width: 48px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  box-shadow: inset 4px 0 0 var(--navy-700);
  vertical-align: middle;
}

.help-faq {
  margin: 0;
  display: grid;
  gap: 4px;
}

.help-faq dt {
  margin-top: 12px;
  font-weight: 700;
  color: var(--navy-900);
}

.help-faq dt:first-child {
  margin-top: 0;
}

.help-faq dd {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

@media (max-width: 959px) {
  .help-section {
    padding: 16px;
    scroll-margin-top: 72px;
  }

  .help-toc {
    margin-bottom: 16px;
  }

  .help-table td:first-child {
    white-space: normal;
  }
}

.stack {
  display: grid;
  gap: 16px;
}

.empty {
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero,
  .shop-grid,
  .trainer-grid,
  .stat-grid,
  .split-2,
  .footer-grid,
  .pass-row,
  .hours-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav {
    display: none;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: var(--paper-100);
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .staff-main {
    padding: 16px 16px calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.grow {
  flex: 1;
  min-width: 220px;
}

.date-trigger {
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}

.date-trigger:hover,
.date-trigger:focus-visible {
  border-color: var(--navy-700);
}

.date-trigger .muted {
  font-size: var(--text-xs);
}

.choice-switch {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}

.attend-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.attend-status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.attend-status-btn i {
  font-size: 18px;
}

.attend-status-btn.is-ok[aria-pressed="true"] {
  border-color: transparent;
  background: color-mix(in oklch, var(--ok-500) 16%, var(--surface));
  color: var(--ok-500);
}

.attend-status-btn.is-no[aria-pressed="true"] {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--destructive);
}

.attend-rate:not([hidden]) {
  display: grid;
  gap: 8px;
  width: 100%;
}

.attend-rate[hidden] {
  display: none;
}

.attend-rate-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.star-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 12;
  stroke-linejoin: round;
}

.star-icon.is-on {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.attend-stars {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 4px;
}

.attend-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 140ms ease, transform 140ms ease;
}

.attend-star .star-icon {
  width: 32px;
  height: 32px;
}

.attend-star.is-on {
  color: oklch(0.84 0.17 92);
}

.attend-star.is-on .star-icon {
  fill: currentColor;
  stroke-width: 0;
}

.attend-star:active {
  transform: scale(0.9);
}

.attend-note-send {
  width: 100%;
  min-height: 44px;
  scroll-margin-bottom: 12px;
}

.attend-saved {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ok-500);
}

.attend-saved.is-bad {
  color: var(--destructive);
}

.attend-hint {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.choice-pill {
  position: relative;
  display: inline-flex;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.choice-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.choice-pill span {
  display: inline-flex;
  align-items: center;
}

.choice-pill:has(input:checked) {
  background: var(--paper-100);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.choice-pill.is-ok:has(input:checked) {
  background: color-mix(in oklch, var(--ok-500) 16%, var(--surface));
  color: var(--ok-500);
}

.choice-pill.is-no:has(input:checked) {
  background: var(--danger-soft);
  color: var(--destructive);
}

.choice-pill.is-paid:has(input:checked) {
  background: color-mix(in oklch, var(--ok-500) 16%, var(--surface));
  color: var(--ok-500);
}

.choice-pill.is-unpaid:has(input:checked) {
  background: color-mix(in oklch, var(--warn-500) 16%, var(--surface));
  color: var(--navy-700);
}

.choice-pill.is-trial:has(input:checked) {
  background: color-mix(in srgb, var(--navy-700) 16%, var(--paper-100));
  color: var(--navy-800);
}

.choice-pill:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.field-checks ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-checks li {
  margin: 0;
}

.field-checks li label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: var(--text-sm);
}

.field-checks li input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.field-checks li label:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--navy-800);
  font-weight: 600;
}

.field-checks li label:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.hours-closed input[type="checkbox"],
.field-checks input[type="checkbox"] {
  accent-color: var(--navy-700);
  width: 16px;
  height: 16px;
}

.trainer-shop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.trainer-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.trainer-tile:hover {
  border-color: var(--navy-700);
}

.trainer-tile-actions,
.trainer-tile-actions form {
  display: flex;
  gap: 4px;
  margin: 0;
  align-items: center;
  justify-content: center;
}

.trainer-tile img,
.trainer-tile .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
}

.trainer-tile strong {
  font-size: var(--text-sm);
  line-height: 1.3;
}

.trainer-dialog {
  width: min(560px, calc(100vw - 32px));
}

.trainer-detail {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: start;
}

.trainer-detail-photo,
.avatar-lg {
  width: 112px;
  height: 112px;
  border-radius: var(--radius);
  object-fit: cover;
  margin: 0;
}

.trainer-detail h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.staff-form {
  display: grid;
  gap: 16px;
}

.staff-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.staff-form-grid > .panel {
  min-width: 0;
}

.form-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.form-cols > * {
  min-width: 0;
}

.form-cols .field-span {
  grid-column: 1 / -1;
}

.choice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-pills .choice-pill {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.choice-pills .choice-pill:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--navy-800);
}

.form-cols .field-input,
.form-cols input,
.form-cols select,
.form-cols textarea {
  width: 100%;
  min-width: 0;
}

.form-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.form-stack .field-input,
.form-stack input,
.form-stack textarea,
.form-stack select {
  width: 100%;
  min-width: 0;
}

.trainer-form-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.hall-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-checks li {
  width: auto;
}

.assign-box {
  display: grid;
  gap: 8px;
}

.assign-select-all {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 4px;
  color: var(--navy-800);
  font-weight: 600;
  cursor: pointer;
}

.assign-select-all input {
  accent-color: var(--navy-700);
  width: 16px;
  height: 16px;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.event-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.event-card header strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.event-card header .muted {
  display: block;
  margin-top: 2px;
}

.event-card-count {
  margin: 0;
  font-weight: 600;
}

.event-card-names {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.assign-list {
  display: grid;
  gap: 0;
  max-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.assign-list > .muted {
  padding: 12px;
}

.assign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.assign-row:last-child {
  border-bottom: 0;
}

.assign-row:hover {
  background: var(--surface-hover);
}

.assign-row:has(input:checked) {
  background: var(--primary-soft);
}

.assign-row input {
  accent-color: var(--navy-700);
  width: 16px;
  height: 16px;
}

.form-panel {
  max-width: none;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 0;
}

.pager [aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.search-select {
  position: relative;
}

.search-select-list {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.search-select-list button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-select-list button:hover,
.search-select-list button:focus-visible {
  background: var(--surface-2);
}

.sale-panel {
  max-width: 560px;
}

.sale-form {
  display: grid;
  gap: 16px;
}

.period-nav {
  display: flex;
  align-items: end;
  gap: 8px;
}

.analytics-period {
  flex-wrap: wrap;
}

.analytics-period .field {
  margin: 0;
  min-width: 148px;
}

.analytics-period-foot {
  margin-top: 24px;
}

.ledger-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ledger-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ledger-bar {
  height: 6px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.ledger-bar i {
  display: block;
  height: 100%;
  background: var(--navy-700);
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0 32px;
}

.stock-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stock-card.is-low {
  border-color: color-mix(in oklch, var(--warn-500) 50%, var(--border));
}

.stock-card header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.stock-card header > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stock-card header form {
  margin: 0;
  flex-shrink: 0;
}

.stock-qty b {
  font-family: var(--font-mono);
  font-size: 1.5rem;
}

.stock-actions {
  display: grid;
  grid-template-columns: 72px 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.section-title {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .staff-form-grid,
  .form-cols,
  .hall-split,
  .trainer-detail,
  .hours-edit-row,
  .attend-row,
  .client-sheet,
  .dossier-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .award-edit-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .award-edit-row input:first-child {
    grid-column: 1 / -1;
  }

  .attend-marks {
    align-items: stretch;
  }

  .attend-marks .choice-switch {
    width: 100%;
  }

  .attend-marks .choice-pill {
    flex: 1;
    justify-content: center;
  }

  .hall-card-top {
    flex-direction: column;
  }

  .hall-card-top .btn {
    width: 100%;
  }

  .attend-call {
    width: 100%;
    min-height: 44px;
  }

  .dossier {
    padding: 20px 16px;
  }

  .dossier h1 {
    font-size: clamp(1.375rem, 1.05rem + 2.4vw, 1.75rem);
  }

  .dossier-head {
    grid-template-areas:
      "mark"
      "who"
      "belt"
      "actions";
  }

  .dossier-actions {
    justify-content: stretch;
  }

  .dossier-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .attend-status-btn,
  .attend-star,
  .switch-track,
  .switch-track::after {
    transition: none;
  }

  .me-flame.is-lit .me-flame-icon {
    animation: none;
  }
}

@media (max-width: 959px) {
  .btn,
  .btn-sm,
  .view-switch-btn,
  .choice-pill,
  .search-select-list button,
  .assign-row {
    min-height: 44px;
  }

  .btn,
  .btn-icon,
  .staff-nav-toggle,
  .staff-nav-close,
  .view-switch-btn,
  .journal-dialog-close,
  .staff-dock-item,
  .staff-dock-plus,
  .quick-action {
    touch-action: manipulation;
  }

  .btn-icon,
  .staff-nav-toggle,
  .staff-nav-close,
  .journal-dialog-close {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .staff-bar {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding-inline: 12px;
    justify-content: flex-start;
  }

  .staff-bar .staff-nav-toggle {
    position: relative;
    z-index: 1;
  }

  .staff-bar .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .staff-main {
    padding: 16px 12px calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .staff-main:has(.client-save:not([hidden])) {
    padding-bottom: calc(var(--dock-h) + 60px);
  }

  .client-save {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--dock-h) + 8px);
    z-index: calc(var(--z-nav) + 1);
    width: auto;
    box-shadow: var(--shadow-md);
  }

  .staff-main:has(.journal-board) {
    height: calc(100dvh - 56px - 64px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 16px 12px 12px;
  }

  .staff-dock {
    gap: 4px;
    align-items: flex-end;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .staff-dock::-webkit-scrollbar {
    display: none;
  }

  .staff-dock-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
  }

  .staff-dock-plus {
    flex: 0 0 52px;
  }

  .quick-dialog .journal-dialog-body {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .journal-toolbar {
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .journal-toolbar h1 {
    font-size: clamp(1.375rem, 1.05rem + 2.4vw, 1.75rem);
  }

  .journal-toolbar > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .journal-toolbar > .btn,
  .journal-toolbar > a.btn {
    width: auto;
    flex: 0 0 auto;
  }

  .analytics-period {
    width: 100%;
  }

  .analytics-period .field {
    width: 100%;
    min-width: 0;
  }

  .analytics-period .btn,
  .analytics-period a.btn {
    width: 100%;
    min-height: 44px;
  }

  .journal-day-nav {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .journal-shift {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
  }

  .journal-shift-label {
    flex: 1;
    min-width: 0;
  }

  .journal-shift-date {
    font-size: 14px;
  }

  .journal-day-nav .view-switch {
    width: 100%;
    max-width: 260px;
  }

  .journal-day-nav .view-switch-btn {
    flex: 1;
    min-height: 44px;
    padding: 4px 8px;
  }

  .journal-board {
    --col-head: 48px;
    --hour-h: 48px;
    --hour-w: 44px;
  }

  .journal-board.is-week {
    --col-min: 88px;
  }

  .journal-hours-scale span {
    left: 2px;
    font-size: 11px;
    padding: 1px 2px;
  }

  .journal-hours-scale span.is-half {
    font-size: 9px;
  }

  .journal-col-head {
    padding: 0 6px;
    gap: 6px;
  }

  .journal-block {
    left: 2px;
    right: 2px;
    padding: 6px 8px 6px 10px;
    font-size: 12px;
  }

  .journal-dialog,
  .journal-dialog-attend,
  .trainer-dialog,
  .quick-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border: 0;
    border-radius: 16px 16px 0 0;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px)));
  }

  .journal-dialog-attend {
    background: transparent;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .journal-dialog-attend > form {
    border: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-md);
  }

  .attend-attention {
    margin: 0 12px;
  }

  .journal-dialog-head {
    padding: 20px 16px 0;
  }

  .journal-dialog-foot {
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
  }

  .journal-dialog-foot .btn {
    flex: 1 1 140px;
    min-height: 44px;
  }

  .journal-dialog-attend > .attend-sheet {
    max-height: min(86dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 12px));
  }

  .attend-body {
    max-height: none;
  }

  .filter-bar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 16px;
  }

  .grow {
    min-width: 0;
    width: auto;
  }

  .filter-bar .btn {
    width: auto;
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 14px;
  }

  .field-input,
  input.field-input,
  select.field-input,
  textarea.field-input,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px;
    min-height: 44px;
    touch-action: manipulation;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
  }

  .dash-grain .view-switch {
    max-width: none;
  }

  .stat {
    padding: 12px;
  }

  .stat b {
    font-size: 1.25rem;
    margin-top: 4px;
  }

  .dash-weeks {
    gap: 6px;
    height: 140px;
  }

  .dash-week span {
    font-size: 10px;
  }

  .panel {
    padding: 16px;
  }

  .staff-card-grid,
  .stock-grid {
    grid-template-columns: 1fr;
  }

  .branch-card-actions .btn-icon {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .plan-day span {
    min-width: 44px;
    min-height: 44px;
  }

  .hours-edit-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hours-edit-row > :first-child {
    font-weight: 600;
    align-self: center;
  }

  .hours-edit-row > .check-row {
    justify-self: end;
    min-height: 44px;
    align-items: center;
  }

  .pager {
    gap: 8px;
  }

  .pager .btn {
    flex: 1;
  }

  .auth-card {
    width: min(420px, calc(100% - 24px));
    margin: 24px auto;
    padding: 24px 16px;
  }

  .auth-card .btn {
    width: 100%;
    min-height: 48px;
  }

  .table-wrap:has(.data-cards) {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table.data.data-cards {
    display: block;
    width: 100%;
  }

  table.data.data-cards thead {
    display: none;
  }

  table.data.data-cards tbody {
    display: grid;
    gap: 12px;
  }

  table.data.data-cards tr {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  table.data.data-cards td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 0;
    border: 0;
  }

  table.data.data-cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 42%;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
  }

  table.data.data-cards td.is-title {
    display: block;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
  }

  table.data.data-cards td.is-title::before {
    display: none;
  }

  table.data.data-cards td.is-actions {
    justify-content: flex-end;
    padding-top: 4px;
  }

  table.data.data-cards td.is-actions::before {
    display: none;
  }

  table.data.data-cards td.is-actions .row-actions {
    width: 100%;
  }

  table.data.data-cards td.is-actions .btn-icon {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  table.data.data-cards tr.is-empty,
  table.data.data-cards td[colspan] {
    display: block;
  }

  table.data.data-cards td[colspan]::before {
    display: none;
  }

  .pay-cell {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .pay-cell .btn {
    min-width: 96px;
  }

  table.data.data-cards.client-roster tr {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 4px;
    padding: 14px 16px;
    align-items: start;
  }

  table.data.data-cards.client-roster td.is-title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
  }

  table.data.data-cards.client-roster td.is-actions {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
    align-self: center;
  }

  table.data.data-cards.client-roster td.is-actions .row-actions {
    width: auto;
  }

  table.data.data-cards.client-roster td.is-phone,
  table.data.data-cards.client-roster td.is-place,
  table.data.data-cards.client-roster td.is-pay {
    grid-column: 1 / -1;
  }

  table.data.data-cards.client-roster td.is-phone,
  table.data.data-cards.client-roster td.is-place {
    display: block;
    color: var(--text-muted);
  }

  table.data.data-cards.client-roster td.is-phone::before,
  table.data.data-cards.client-roster td.is-place::before,
  table.data.data-cards.client-roster td.is-pay::before {
    display: none;
  }

  table.data.data-cards.client-roster td.is-phone {
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
  }

  table.data.data-cards.client-roster td.is-place {
    font-size: 13px;
  }

  table.data.data-cards.client-roster td.is-pay {
    align-items: center;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  table.data.data-cards.client-roster .pay-cell {
    width: 100%;
    justify-content: space-between;
  }

  .stock-actions {
    grid-template-columns: 1fr 1fr;
  }

  .stock-actions .field-input {
    grid-column: 1 / -1;
  }

  .stock-actions .btn {
    min-height: 44px;
  }

  .trainer-shop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.me-body {
  min-height: 100dvh;
  background: var(--background);
  --dock-h: calc(56px + env(safe-area-inset-bottom, 0px));
}

.me-body .staff-bar {
  justify-content: center;
}

.me-main {
  width: min(560px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 calc(88px + env(safe-area-inset-bottom, 0px));
}

.me-head,
.me-block h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.me-head {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
}

.me-hello {
  text-transform: none;
}

.me-block {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.me-block h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
}

.me-next {
  margin: 0 0 20px;
  padding: 20px 20px 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--primary);
}

.me-next.is-now {
  box-shadow: inset 4px 0 0 var(--ok-500);
}

.me-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.me-next-time {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.me-next-day,
.me-next-meta {
  margin: 8px 0 0;
}

.me-next-meta {
  color: var(--text-muted);
}

.me-list,
.me-notes,
.me-lessons,
.me-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.me-list li,
.me-lessons li {
  display: grid;
  gap: 2px;
}

.me-list span,
.me-lessons span,
.me-notes span {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.me-path .me-belts {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
}

.me-path .me-belts.is-single {
  grid-template-columns: minmax(0, 160px);
  justify-content: center;
}

.me-belts figure {
  margin: 0;
  padding: 10px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.me-belts .is-now {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.me-belts .is-next img {
  opacity: 0.85;
}

.me-belts img {
  width: 100%;
  max-width: 92px;
  height: auto;
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--navy-900) 7%, var(--surface));
}

.me-belts figcaption {
  margin: 8px 0 0;
}

.me-belts figcaption b {
  display: block;
  font-size: var(--text-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.me-belts figcaption span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.me-belts .is-now figcaption span {
  color: var(--navy-700);
}

.me-belts-link {
  position: relative;
  align-self: center;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--on-inverse);
  font-size: 17px;
}

.me-belts-link::before,
.me-belts-link::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  border-top: 2px dashed var(--border-strong);
}

.me-belts-link::before {
  right: 100%;
  margin-right: 3px;
}

.me-belts-link::after {
  left: 100%;
  margin-left: 3px;
}

.me-exam {
  margin: 12px 0 0;
  font-size: var(--text-sm);
}

.me-flame {
  margin: 0 0 20px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.me-flame-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
}

.me-flame-head .me-kicker {
  margin: 0 0 2px;
}

.me-flame-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.85rem);
  font-weight: 500;
  line-height: 1.1;
}

.me-flame-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 52px;
}

.me-flame-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.me-flame-icon path:first-child {
  fill: color-mix(in oklch, var(--text-muted) 55%, var(--surface));
}

.me-flame-icon path:last-child {
  fill: color-mix(in oklch, var(--text-muted) 35%, var(--surface));
}

.me-flame.is-lit {
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--primary) 18%, var(--surface)) 0%, var(--surface) 72%);
  box-shadow: inset 4px 0 0 var(--primary);
}

.me-flame.is-lit .me-flame-icon {
  animation: me-flame-flicker 1.15s ease-in-out infinite;
  filter: drop-shadow(0 0 8px color-mix(in oklch, var(--primary) 70%, transparent));
}

.me-flame.is-lit .me-flame-icon path:first-child {
  fill: var(--primary);
}

.me-flame.is-lit .me-flame-icon path:last-child {
  fill: oklch(0.96 0.08 85);
}

.me-flame-track {
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--border) 70%, var(--surface));
}

.me-flame-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: color-mix(in oklch, var(--text-muted) 35%, var(--surface));
}

.me-flame.is-lit .me-flame-fill {
  background: linear-gradient(90deg, oklch(0.72 0.16 55), var(--primary));
  box-shadow: 0 0 12px color-mix(in oklch, var(--primary) 55%, transparent);
}

.me-flame-hint {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.35;
}

.me-flame.is-out .me-flame-head strong {
  color: var(--text-muted);
}

@keyframes me-flame-flicker {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  40% {
    transform: translateY(-1px) scale(1.04);
    opacity: 0.92;
  }
  70% {
    transform: translateY(1px) scale(0.98);
    opacity: 1;
  }
}

.me-rating {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.me-rating-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.me-rating-head strong {
  font-size: var(--text-lg);
}

.me-rating-stars {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  color: var(--warn-500);
}

.me-rating-stars .star-icon {
  width: 26px;
  height: 26px;
  color: color-mix(in oklch, var(--warn-500) 38%, var(--surface));
}

.me-rating-stars .star-icon.is-on {
  color: var(--warn-500);
}

.me-rating-hint {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.me-notes p,
.me-lessons p {
  margin: 6px 0 0;
  line-height: 1.4;
}

.me-mark {
  display: inline-block;
  margin-top: 4px;
  font-weight: 600;
}

.me-mark.is-attended {
  color: var(--ok-500);
}

.me-mark.is-no_show {
  color: var(--text-muted);
}

.me-form {
  display: grid;
  gap: 12px;
}

.me-facts div {
  display: grid;
  gap: 2px;
}

.me-facts dt {
  font-size: 12px;
  color: var(--text-muted);
}

.me-facts dd {
  margin: 0;
  font-weight: 600;
}

.me-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-nav);
  display: flex;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.me-dock .staff-dock-item {
  flex: 1;
}

.me-events,
.me-board ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.me-events li,
.me-board li {
  display: grid;
  gap: 2px;
}

.me-events span,
.me-board span,
.me-board-hint {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.me-board-hint {
  margin: -6px 0 12px;
}

.me-events em,
.me-board .is-me strong {
  font-style: normal;
  font-weight: 600;
  color: var(--ok-500);
}

.me-events .is-mine {
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.me-board li {
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 8px;
}

.me-board-place {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text);
}

.me-board .is-me {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--navy-50);
}

.me-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 20px;
  padding: 20px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in oklch, var(--belt, var(--primary)) 42%, transparent), transparent 58%),
    var(--navy-900);
  color: var(--on-inverse);
}

.me-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: var(--belt, var(--primary));
  pointer-events: none;
}

.me-card-top {
  position: relative;
  z-index: 1;
}

.me-card .me-kicker {
  margin: 0 0 2px;
  color: var(--on-inverse-muted);
}

.me-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.me-card-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--inverse-line);
  text-align: center;
}

.me-card-stats div {
  display: grid;
  gap: 2px;
}

.me-card-stats dt {
  order: 2;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-inverse-muted);
}

.me-card-stats dd {
  order: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}

.me-awards-count {
  margin: -6px 0 16px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.me-awards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.me-awards img,
.me-awards i {
  width: 100%;
  aspect-ratio: 1;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--navy-900) 7%, var(--surface));
}

.me-awards img {
  height: auto;
}

.me-awards i {
  display: grid;
  place-items: center;
  font-size: 40px;
}

.me-awards .is-belt.is-locked img {
  opacity: 0.85;
}

.me-awards-done {
  margin-top: 16px;
}

.me-awards-done summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.me-awards-done[open] summary {
  margin-bottom: 12px;
}

.me-awards li {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.me-awards strong {
  font-size: var(--text-sm);
}

.me-awards span {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
}

.me-awards b {
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.me-awards .is-earned {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.me-awards .is-earned b {
  background: var(--navy-900);
  color: var(--on-inverse);
}

.me-awards .is-locked {
  background: var(--surface-2);
}

.me-awards .is-locked strong {
  color: var(--text-muted);
}

.me-awards .is-locked i {
  color: color-mix(in oklch, var(--text-muted) 55%, transparent);
}

.me-awards .is-locked b {
  background: var(--surface);
  color: var(--text-muted);
}

.me-coach-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.me-coach-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.me-coach-photo.is-mark {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--on-inverse);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.me-coach-top strong {
  display: block;
  font-size: 1.0625rem;
}

.me-coach-top span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.me-coach-bio {
  margin: 14px 0 0;
  line-height: 1.5;
}

.me-coach-awards-title {
  margin: 16px 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.me-coach-awards {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.me-coach-awards li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.me-coach-awards i {
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--primary);
}

.me-coach-awards strong {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.me-coach-awards em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.me-coach .btn {
  margin-top: 14px;
}

.me-settings summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.me-settings[open] summary {
  margin-bottom: 12px;
}

.me-settings .me-facts,
.me-settings .me-form {
  margin-bottom: 16px;
}

.me-settings form {
  display: grid;
}

.me-settings .btn {
  width: 100%;
}

.me-push {
  display: grid;
  gap: 10px;
}

.me-push .btn {
  width: 100%;
}

.bill-mix-panel {
  margin-bottom: 16px;
}

.bill-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}

.bill-views {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 420px;
}

.bill-views .view-switch-btn {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.bill-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .bill-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bill-card {
  display: grid;
  gap: 16px;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--ok-500);
}

.bill-card.is-due {
  box-shadow: inset 4px 0 0 var(--warn-500);
}

.bill-card.is-off {
  box-shadow: inset 4px 0 0 var(--destructive);
  opacity: 0.92;
}

.bill-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bill-card-photo {
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  font-size: 12px;
}

.bill-card-who {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.bill-card-who h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.3;
}

.bill-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bill-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.bill-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bill-meta dt {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted-foreground);
}

.bill-meta dd {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.bill-form {
  display: grid;
  gap: 12px;
}

.bill-amount {
  margin: 0;
}

.bill-amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bill-amount-row .field-input {
  width: 100%;
  max-width: 160px;
  min-height: 40px;
}

.bill-paid {
  min-height: 40px;
  font-weight: 600;
}

.bill-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bill-card-actions .btn {
  min-height: 40px;
}

@media (max-width: 640px) {
  .bill-views {
    max-width: none;
  }

  .bill-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bill-amount-row .field-input {
    max-width: none;
  }

  .bill-card-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
  }
}
