:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #111;
  --raised: #191919;
  --green: #72D63B;
  --text: #fff;
  --muted: #a5a9b0;
  --line: #303030;
  --danger: #ff9292;
  --focus: #a4e8ff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--bg); color: var(--text); line-height: 1.5; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
button, .button { min-height: 44px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 6px; background: var(--green); color: #071004; font-weight: 650; text-decoration: none; text-align: center; line-height: 1.3; overflow-wrap: anywhere; }
.secondary, .text-button, .icon-button { background: transparent; color: var(--text); border-color: var(--line); }
.text-button { border-color: transparent; padding-inline: 10px; }
.danger { color: var(--danger); background: transparent; border-color: #704040; }
button:hover:not(:disabled), .button:hover { filter: brightness(1.13); }
.secondary:hover, .text-button:hover, .icon-button:hover { background: var(--raised); }
.icon-button { width: 44px; flex: 0 0 44px; padding: 6px; font-size: 24px; }
.green { color: var(--green); }
.muted, .meta { color: var(--muted); }
.small, .meta { font-size: 14px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 720; }
h2 { font-size: 21px; line-height: 1.3; }
h3 { font-size: 17px; line-height: 1.4; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1200px; margin: auto; padding: 16px 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 800; text-decoration: none; }
.brand img { object-fit: contain; }
nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
nav a[aria-current="page"] { color: var(--text); border-color: var(--green); }
.account { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); }
.shell { max-width: 1152px; margin: auto; padding: 36px 24px 64px; min-height: calc(100dvh - 180px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.stack { display: grid; gap: 20px; min-width: 0; }
.compact { gap: 10px; }
.toolbar, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar { margin-bottom: 24px; }
.toolbar label { flex: 1; max-width: 540px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trainer-card { display: flex; flex-direction: column; align-items: start; gap: 16px; padding: 22px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; min-width: 0; }
.trainer-card .button { margin-top: auto; }
.identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.identity > div:last-child { min-width: 0; }
.avatar { display: grid; place-items: center; width: 56px; height: 56px; flex: 0 0 56px; background: #252525; color: var(--green); border-radius: 50%; font-size: 20px; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.bio { white-space: pre-line; overflow-wrap: anywhere; }
.excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.profile-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.section { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.choice-list { display: grid; gap: 10px; }
.service-choice { display: flex; gap: 12px; align-items: start; border: 1px solid var(--line); padding: 16px; border-radius: 6px; cursor: pointer; color: var(--text); }
.service-choice:has(input:checked) { border-color: var(--green); background: #10150d; }
.service-choice input { margin-top: 4px; }
.service-choice .stack { flex: 1; }
label, .field { display: grid; gap: 7px; font-size: 14px; color: #d3d5d8; min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #454545; border-radius: 5px; background: var(--surface); color: var(--text); padding: 10px 12px; }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--green); }
input[type="date"], input[type="time"], input[type="datetime-local"] { max-width: 100%; }
textarea { resize: vertical; min-height: 110px; }
.checkbox { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.full { grid-column: 1 / -1; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 12px; padding: 0; font-size: 17px; font-weight: 650; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.slot { background: var(--surface); color: var(--text); border: 1px solid var(--line); font-size: 14px; min-height: 46px; }
.slot[aria-pressed="true"] { background: var(--green); color: #071004; border-color: var(--green); }
.summary { margin: 0; display: grid; gap: 10px; }
.summary > div { display: grid; grid-template-columns: minmax(90px, .65fr) minmax(0, 1fr); gap: 12px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.notice { padding: 14px 16px; border: 1px solid #466c30; background: #10170b; border-radius: 6px; margin-bottom: 20px; overflow-wrap: anywhere; }
.notice.error { background: #231212; color: #ffd5d5; border-color: #704040; }
.notice:empty { display: none; }
.empty, .loading { padding: 32px 0; color: var(--muted); }
.empty { display: grid; gap: 10px; }
.empty h2 { color: var(--text); }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 24px; }
.tabs button { background: transparent; color: var(--muted); border-radius: 4px; }
.tabs button[aria-selected="true"], .segmented button[aria-pressed="true"] { color: var(--text); background: #252525; box-shadow: inset 0 -2px var(--green); }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; }
.segmented button { background: var(--surface); color: var(--muted); font-size: 14px; }
.row { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row > .stack { flex: 1 1 230px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 13px; font-weight: 650; }
.status.cancelled { color: var(--muted); }
.status.completed { color: var(--focus); }
.schedule { display: grid; gap: 0; }
.day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.day h3 { padding-top: 10px; }
.interval { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; align-items: end; gap: 10px; }
.schedule-form { max-width: 740px; }
.editor { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; }
.site-footer { max-width: 1152px; margin: auto; padding: 20px 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; background: var(--green); color: #000; padding: 12px; }
.skip-link:focus { top: 12px; }
dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid #454545; border-radius: 8px; background: #111; color: var(--text); overflow: auto; }
dialog::backdrop { background: rgb(0 0 0 / .78); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
dialog .actions { justify-content: flex-end; margin-top: 12px; }
@media (max-width: 940px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-inner { gap: 12px 24px; }
  .header-inner nav { order: 3; flex-basis: 100%; }
  .profile-layout { gap: 28px; }
}
@media (max-width: 640px) {
  .shell { padding: 24px 16px 40px; }
  .header-inner { padding: 12px 16px; }
  .brand { font-size: 22px; }
  .account-name { max-width: 110px; }
  nav { gap: 4px 16px; }
  nav a { font-size: 13px; }
  h1 { font-size: 26px; }
  .grid, .profile-layout, .fields { grid-template-columns: minmax(0, 1fr); }
  .profile-layout { gap: 32px; }
  .day { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .day h3 { padding-top: 0; }
  .tabs button { padding-inline: 12px; font-size: 14px; }
  .row .actions { width: 100%; }
  dialog { padding: 20px 16px; }
  .toolbar { align-items: end; }
  .toolbar label { flex-basis: 180px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .button { transition: background-color .12s, border-color .12s; }
}
